diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/Fix-struct-flock-and-timeval-packing-on-armhf.patch | 61 | ||||
-rw-r--r-- | debian/patches/Generate-X.509-version-3-CA-in-testsuite.patch | 31 | ||||
-rw-r--r-- | debian/patches/Mention-the-Debian-BTS-in-the-manpages.patch | 51 | ||||
-rw-r--r-- | debian/patches/Skip-randomized-tests.patch | 60 | ||||
-rw-r--r-- | debian/patches/series | 4 |
5 files changed, 207 insertions, 0 deletions
diff --git a/debian/patches/Fix-struct-flock-and-timeval-packing-on-armhf.patch b/debian/patches/Fix-struct-flock-and-timeval-packing-on-armhf.patch new file mode 100644 index 0000000..460672f --- /dev/null +++ b/debian/patches/Fix-struct-flock-and-timeval-packing-on-armhf.patch @@ -0,0 +1,61 @@ +From: Simon Chopin <simon.chopin@canonical.com> +Date: Tue, 26 Mar 2024 13:19:53 +0100 +Subject: Fix struct flock and timeval packing on armhf + +armhf uses a 64-bit off_t, and t64-enabled armhf 64-bit time_t. + +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/interimap/+bug/2059120 +Bug-Debian: https://bugs.debian.org/1067763 +--- + lib/Net/IMAP/InterIMAP.pm | 6 +++++- + pullimap | 6 +++++- + 2 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/lib/Net/IMAP/InterIMAP.pm b/lib/Net/IMAP/InterIMAP.pm +index 55a18a0..7824988 100644 +--- a/lib/Net/IMAP/InterIMAP.pm ++++ b/lib/Net/IMAP/InterIMAP.pm +@@ -23,6 +23,7 @@ use strict; + + use Compress::Raw::Zlib qw/Z_OK Z_STREAM_END Z_FULL_FLUSH Z_SYNC_FLUSH MAX_WBITS/; + use Config::Tiny (); ++use Config; + use Errno qw/EEXIST EINTR/; + use Net::SSLeay 1.86_06 (); + use List::Util qw/all first/; +@@ -1492,7 +1493,10 @@ sub _tcp_connect($$$) { + # timeout connect/read/write/... after 30s + # XXX we need to pack the struct timeval manually: not portable! + # https://stackoverflow.com/questions/8284243/how-do-i-set-so-rcvtimeo-on-a-socket-in-perl +- my $timeout = pack('l!l!', 30, 0); ++ # On Ubuntu, armhf is the only arch where time_t != long ++ my $is_arm = $Config{archname} =~ /^arm-/; ++ my $tpl = $is_arm ? 'qq' : 'l!l!'; ++ my $timeout = pack($tpl, 30, 0); + setsockopt($s, Socket::SOL_SOCKET, Socket::SO_RCVTIMEO, $timeout) + or $self->fail("setsockopt SO_RCVTIMEO: $!"); + setsockopt($s, Socket::SOL_SOCKET, Socket::SO_SNDTIMEO, $timeout) +diff --git a/pullimap b/pullimap +index 8be78da..1964c63 100755 +--- a/pullimap ++++ b/pullimap +@@ -31,6 +31,8 @@ use Getopt::Long qw/:config posix_default no_ignore_case gnu_getopt auto_version + use List::Util 'first'; + use Socket qw/PF_INET PF_INET6 SOCK_STREAM IPPROTO_TCP/; + ++use Config; ++ + use lib "./lib"; + use Net::IMAP::InterIMAP 0.5.7 qw/xdg_basedir read_config compact_set/; + +@@ -88,7 +90,9 @@ do { + + sysopen($STATE, $statefile, $mode, 0600) or die "Can't open $statefile: $!"; + # XXX we need to pack the struct flock manually: not portable! +- my $struct_flock = pack('s!s!l!l!i!', F_WRLCK, SEEK_SET, 0, 0, 0); ++ my $is_arm = $Config{archname} =~ /^arm-/; ++ my $tpl = $is_arm ? 's!s!qqi!' : 's!s!l!l!i!'; ++ my $struct_flock = pack($tpl, F_WRLCK, SEEK_SET, 0, 0, 0); + fcntl($STATE, F_SETLK, $struct_flock) or die "Can't lock $statefile: $!"; + my $flags = fcntl($STATE, F_GETFD, 0) or die "fcntl F_GETFD: $!"; + fcntl($STATE, F_SETFD, $flags | FD_CLOEXEC) or die "fcntl F_SETFD: $!"; diff --git a/debian/patches/Generate-X.509-version-3-CA-in-testsuite.patch b/debian/patches/Generate-X.509-version-3-CA-in-testsuite.patch new file mode 100644 index 0000000..74b2890 --- /dev/null +++ b/debian/patches/Generate-X.509-version-3-CA-in-testsuite.patch @@ -0,0 +1,31 @@ +From: Guilhem Moulin <guilhem@fripost.org> +Date: Wed, 6 Mar 2024 14:37:29 +0100 +Subject: tests/certs/generate: Generate X.509 version 3 CA. + +And pass CA:TRUE as basic constraint. This fixes the test suite with +OpenSSL 3.2 with defaults to X.509v3 and CA:FALSE. + +Origin: https://git.guilhem.org/interimap/commit/?id=eb254348085047702ee37e405d171d894dc5ffff +Bug-Debian: https://bugs.debian.org/1065529 +--- + tests/certs/generate | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/tests/certs/generate b/tests/certs/generate +index 8e9c451..f449764 100755 +--- a/tests/certs/generate ++++ b/tests/certs/generate +@@ -22,7 +22,12 @@ genpkey() { + # generate CA (we intentionally throw away the private key and serial + # file to avoid reuse) + genpkey "$cadir/ca.key" -algorithm RSA +-openssl req -new -x509 -rand /dev/urandom -subj "/OU=$OU/CN=Fake Root CA" -key "$cadir/ca.key" -out ./ca.crt ++openssl req -new -x509 -rand /dev/urandom \ ++ -subj "/OU=$OU/CN=Fake Root CA" \ ++ -addext subjectKeyIdentifier="hash" \ ++ -addext authorityKeyIdentifier="keyid:always,issuer" \ ++ -addext basicConstraints="critical,CA:TRUE" \ ++ -key "$cadir/ca.key" -out ./ca.crt + + SERIAL=1 + new() { diff --git a/debian/patches/Mention-the-Debian-BTS-in-the-manpages.patch b/debian/patches/Mention-the-Debian-BTS-in-the-manpages.patch new file mode 100644 index 0000000..fefcf37 --- /dev/null +++ b/debian/patches/Mention-the-Debian-BTS-in-the-manpages.patch @@ -0,0 +1,51 @@ +From: Guilhem Moulin <guilhem@debian.org> +Date: Sun, 20 Jan 2019 21:09:43 +0100 +Subject: Mention the Debian BTS in the manpages. + +Forwarded: not-needed +--- + doc/interimap.1.md | 10 +++++++++- + doc/pullimap.1.md | 6 ++++++ + 2 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/doc/interimap.1.md b/doc/interimap.1.md +index 2d588ae..03adbf5 100644 +--- a/doc/interimap.1.md ++++ b/doc/interimap.1.md +@@ -574,10 +574,18 @@ Standards + and Quick Mailbox Resynchronization (`QRESYNC`)_, + [RFC 7162], May 2014. + ++Bugs and feedback ++================= ++ ++Bugs or feature requests for `interimap` should be filed with the ++Debian project's bug tracker at <<https://www.debian.org/Bugs/>>. ++ + See also + ======== + +-A _getting started_ guide is available [there](getting-started.html). ++A _getting started_ guide is available locally at ++<<file:///usr/share/doc/interimap/getting-started.md.gz>>, and ++online at <<https://guilhem.org/interimap/getting-started.html>>. + + [RFC 7162]: https://tools.ietf.org/html/rfc7162 + [RFC 5258]: https://tools.ietf.org/html/rfc5258 +diff --git a/doc/pullimap.1.md b/doc/pullimap.1.md +index 89969b2..900221a 100644 +--- a/doc/pullimap.1.md ++++ b/doc/pullimap.1.md +@@ -391,6 +391,12 @@ Standards + * J. Klensin, _Simple Mail Transfer Protocol_, + [RFC 5321], October 2008. + ++Bugs and feedback ++================= ++ ++Bugs or feature requests for `pullimap` should be filed with the ++Debian project's bug tracker at <<https://www.debian.org/Bugs/>>. ++ + [RFC 4315]: https://tools.ietf.org/html/rfc4315 + [RFC 2177]: https://tools.ietf.org/html/rfc2177 + [RFC 2595]: https://tools.ietf.org/html/rfc2595 diff --git a/debian/patches/Skip-randomized-tests.patch b/debian/patches/Skip-randomized-tests.patch new file mode 100644 index 0000000..d8c5e88 --- /dev/null +++ b/debian/patches/Skip-randomized-tests.patch @@ -0,0 +1,60 @@ +From: Guilhem Moulin <guilhem@debian.org> +Date: Wed, 29 Jan 2020 13:49:10 +0100 +Subject: Avoid running randomized tests on the build daemons. + +These tests are racy and can fail in subtle ways depending on the +machine load and speed. Basically `interimap --watch=1` is spawnedin +the background, then random events (new messages, deletions, flag +changes, etc.) are sent for for one minute, and the background process +is later terminated and the mail stores compared. The problem is how to +stop the background process after the loop. What's done right now is it +waits for 5 seconds and sends a SIGTERM; unfortunately $n sec is +arbitrary and might not be enough, depending on the machine and load. +Ideally a SIGUSR1 would cause it to continue until a clean state is +reached, then stop. + +These tests most sense in the context of upstream development, so for +now we skip them in the Debian context. + +Forwarded: not-needed +--- + tests/interimap.list | 8 -------- + tests/pullimap/t | 4 ++-- + 2 files changed, 2 insertions(+), 10 deletions(-) + +diff --git a/tests/interimap.list b/tests/interimap.list +index 559daed..61cb37f 100644 +--- a/tests/interimap.list ++++ b/tests/interimap.list +@@ -41,8 +41,6 @@ repair --repair + preauth-plaintext abort on MiTM via PREAUTH greeting + + compress COMPRESS=DEFLATE +-condstore CONDSTORE +-split-set Split large sets to avoid extra-long command lines + + . SSL/TLS + starttls-logindisabled LOGINDISABLED STARTTLS +@@ -55,9 +53,3 @@ split-set Split large sets to avoid extra-long command lines + tls-sni TLS servername extension (SNI) + tls-protocols force TLS protocol versions + tls-ciphers force TLS cipher list/suites +- +-. Live synchronization (60s) +- sync-live local/remote simulation +- sync-live-crippled local/remote simulation (crippled remote) +- sync-live-tls local/remote simulation (TLS remote) +- sync-live-multi local/remote1+remote2+remote3 simulation (3 local namespaces) +diff --git a/tests/pullimap/t b/tests/pullimap/t +index 58a19ca..88010c3 100644 +--- a/tests/pullimap/t ++++ b/tests/pullimap/t +@@ -1,6 +1,6 @@ + MAILBOX="INBOX" +-TIMEOUT=60 +-N=2048 ++TIMEOUT=0 ++N=64 + + step_start "\`pullimap --idle\` refuses to create the state file" + ! pullimap --idle "remote" || error diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..0df587c --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,4 @@ +Mention-the-Debian-BTS-in-the-manpages.patch +Skip-randomized-tests.patch +Generate-X.509-version-3-CA-in-testsuite.patch +Fix-struct-flock-and-timeval-packing-on-armhf.patch |