From: Tobias Geerinckx-Rice Date: Fri, 01 Mar 2019 20:51:32 +0100 Subject: [PATCH] dkimproxy: Add IPv6 support. The following patch was copied verbatim from Debian[0]. [0]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=656041 --- --- dkimproxy-1.4.1.orig/lib/MSDW/SMTP/Server.pm +++ dkimproxy-1.4.1/lib/MSDW/SMTP/Server.pm @@ -11,7 +11,7 @@ # Written by Bennett Todd package MSDW::SMTP::Server; -use IO::Socket; +use IO::Socket::INET6; use IO::File; =head1 NAME @@ -88,14 +88,14 @@ =item new(interface => $interface, port => $port); The interface and port to listen on must be specified. The interface -must be a valid numeric IP address (0.0.0.0 to listen on all -interfaces, as usual); the port must be numeric. If this call -succeeds, it returns a server structure with an open -IO::Socket::INET in it, ready to listen on. If it fails it dies, so -if you want anything other than an exit with an explanatory error -message, wrap the constructor call in an eval block and pull the -error out of $@ as usual. This is also the case for all other -methods; they succeed or they die. +must be a valid numeric IPv4 or IPv6 address (0.0.0.0 or :: to listen +on all interfaces, as usual); the port must be numeric. If this call +succeeds, it returns a server structure with an open IO::Socket::INET6 +in it, ready to listen on. If it fails it dies, so if you want +anything other than an exit with an explanatory error message, wrap +the constructor call in an eval block and pull the error out of $@ as +usual. This is also the case for all other methods; they succeed or +they die. =item accept([debug => FD]); @@ -154,7 +154,7 @@ my ($this, @opts) = @_; my $class = ref($this) || $this; my $self = bless { @opts }, $class; - $self->{sock} = IO::Socket::INET->new( + $self->{sock} = IO::Socket::INET6->new( LocalAddr => $self->{interface}, LocalPort => $self->{port}, Proto => 'tcp', only in patch2: unchanged: --- dkimproxy-1.4.1.orig/scripts/dkimproxy.out +++ dkimproxy-1.4.1/scripts/dkimproxy.out @@ -314,17 +314,11 @@ { my $self = shift; - # try to determine peer's address - use Socket; - my $peersockaddr = getpeername(STDOUT); - my ($port, $iaddr) = sockaddr_in($peersockaddr); - $ENV{REMOTE_ADDR} = inet_ntoa($iaddr); - # initialize syslog eval { openlog("dkimproxy.out", "perror,pid,ndelay", "mail"); - syslog("debug", '%s', "connect from $ENV{REMOTE_ADDR}"); + syslog("debug", '%s', "connect from $self->{server}->{peeraddr}"); }; if (my $E = $@) { d)Author 2021-06-23build: Makefile splits Scheme compilation in four steps....Fixes <https://bugs.gnu.org/48963>. Reported by Julien Lepiller <julien@lepiller.eu>. This reduces peak memory consumption to something less unreasonable. * Makefile.am (make-go): Depend on 'make-*-go' targets; remove body. (guile-compilation-rule): New function. (MODULES_CORE, MODULES_PACKAGES, MODULES_SYSTEM, MODULES_CLI): New variables. <top level>: Call 'guile-compilation-rule' 4 times. * build-aux/compile-all.scm <top level>: Expect "--total" and "--processed". Take them into account when displaying progress reports. Ludovic Courtès 2021-06-18build: Remove Guile 2.2 workaround....* build-aux/compile-all.scm <top level>: Remove Guile 2.2 workaround. Ludovic Courtès 2020-04-12build: Cap build parallelism on i686....Works around <https://bugs.gnu.org/40522>. * build-aux/compile-all.scm (parallel-job-count*): New procedure. <top level>: Use it instead of 'parallel-job-count'. Ludovic Courtès 2019-06-25build: Report build errors via 'report-load-error'....* build-aux/compile-all.scm: Wrap 'compile-files' call in 'catch'. Attempt to resort to 'report-load-error' in (guix ui) to print the error. Ludovic Courtès 2019-04-19build: Show completion percentage while building....* build-aux/compile-all.scm (%): New procedure. (command-line): Use it to report completion. Ludovic Courtès 2017-11-28build: Explicitly flush the "LOAD" and "GUILEC" lines....* build-aux/compile-all.scm <top level>: Add calls to 'force-output' in the #:report-load and #:report-compilation procedures. Fixes a regression introduced in 2890ad332fcdfd4bc92b127d783975437c8b718b whereby compilation output would be buffered, leading to a weird visual effect. Ludovic Courtès 2017-10-22build: Honor make's '-j' flag....* build-aux/compile-all.scm (parallel-job-count): New procedure. <top level>: Pass it to 'compile-files' as #:workers. Ludovic Courtès 2017-10-22build: Factorize module compilation in (guix build compile)....* guix/build/compile.scm: New file. * Makefile.am (MODULES): Add it. * build-aux/compile-all.scm: Use it. (warnings, file->module, load-module-file) (%default-optimizations, %lightweight-optimizations) (optimization-options, compile-file*): Remove. <top level>: Use 'compile-files'. * guix/build/pull.scm (%default-optimizations) (%lightweight-optimizations, optimization-options): Remove. (build-guix): Rewrite as a call to 'compile-files'. * guix/discovery.scm (file-name->module-name): Export. Ludovic Courtès