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 = $@) { 2a52a3d5d841e1dfad6b13e26082a5750'>daemon: Do not deduplicate files smaller than 8 KiB....Files smaller than 8 KiB typically represent ~70% of the entries in /gnu/store/.links but only contribute to ~4% of the space savings afforded by deduplication. Not considering these files for deduplication speeds up file insertion in the store and, more importantly, leaves 'removeUnusedLinks' with fewer entries to traverse, thereby speeding it up proportionally. Partly fixes <https://issues.guix.gnu.org/24937>. * config-daemon.ac: Remove symlink hard link check and CAN_LINK_SYMLINK definition. * guix/store/deduplication.scm (%deduplication-minimum-size): New variable. (deduplicate)[loop]: Do not recurse when FILE's size is below %DEDUPLICATION-MINIMUM-SIZE. (dump-port): New procedure. (dump-file/deduplicate)[hash]: Turn into... [dump-and-compute-hash]: ... this thunk. Call 'deduplicate' only when SIZE is greater than %DEDUPLICATION-MINIMUM-SIZE; otherwise call 'dump-port'. * nix/libstore/gc.cc (LocalStore::removeUnusedLinks): Drop files where st.st_size < deduplicationMinSize. * nix/libstore/local-store.hh (deduplicationMinSize): New declaration. * nix/libstore/optimise-store.cc (deduplicationMinSize): New variable. (LocalStore::optimisePath_): Return when PATH is a symlink or smaller than 'deduplicationMinSize'. * tests/derivations.scm ("identical files are deduplicated"): Produce files bigger than %DEDUPLICATION-MINIMUM-SIZE. * tests/nar.scm ("restore-file-set with directories (signed, valid)"): Likewise. * tests/store-deduplication.scm ("deduplicate, below %deduplication-minimum-size"): New test. ("deduplicate", "deduplicate, ENOSPC"): Produce files bigger than %DEDUPLICATION-MINIMUM-SIZE. * tests/store.scm ("substitute, deduplication"): Likewise. Ludovic Courtès 2021-06-18Start enabling substitutes from bordeaux.guix.gnu.org....In addition to substitutes from ci.guix.gnu.org. There are more changes that can be made in the future, but these changes seem like a good start. * config-daemon.ac (guix_substitute_urls): Add https://bordeaux.guix.gnu.org. * guix/scripts/substitute.scm (%default-substitute-urls): Add http://bordeaux.guix.gnu.org. * guix/store.scm (%default-substitute-urls): Add bordeaux.guix.gnu.org. * doc/guix.texi: Adjust accordingly. * doc/contributing.texi: Adjust accordingly. Christopher Baines 2020-12-11maint: Remove unused 'NIX_VERSION' macro....* config-daemon.ac: Do not define NIX_VERSION. Ludovic Courtès 2020-12-11maint: Avoid macros obsolete in Autoconf 2.70....* configure.ac: Require Autoconf 2.69. Use 'AS_HELP_STRING' instead of 'AC_HELP_STRING'. * m4/guix.m4: Likewise. * config-daemon.ac: Use 'AC_CONFIG_HEADERS' instead of the singular variant. Ludovic Courtès