aboutsummaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog15
-rw-r--r--debian/control2
-rw-r--r--debian/patches/Fix-struct-flock-and-timeval-packing-on-armhf.patch61
-rw-r--r--debian/patches/Generate-X.509-version-3-CA-in-testsuite.patch31
-rw-r--r--debian/patches/series2
5 files changed, 108 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index 5e67404..de9b536 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,21 @@
-interimap (0.5.7-2) UNRELEASED; urgency=medium
+interimap (0.5.7-3) unstable; urgency=medium
+
+ * d/patches:
+ + Add upstream patch to generate X.509 version 3 CA prior to running the
+ test suite. (Closes: #1065529)
+ + Add patch from Simon Chopin to fix struct flock & timeval packing on
+ armhf. (Closes: #1067763, LP: #2059120)
+ * Update Standards-Version to 4.7.0 (no changes necessary).
+
+ -- Guilhem Moulin <guilhem@debian.org> Sat, 04 May 2024 14:41:54 +0200
+
+interimap (0.5.7-2) unstable; urgency=medium
* DEP-8: Name inline tests.
* Bump Standards-Version to 4.6.2 (no changes needed).
* Salsa CI: Include recipes/debian.yml.
- -- Guilhem Moulin <guilhem@debian.org> Fri, 21 Oct 2022 00:48:04 +0200
+ -- Guilhem Moulin <guilhem@debian.org> Wed, 25 Jan 2023 02:35:21 +0100
interimap (0.5.7-1.1) unstable; urgency=medium
diff --git a/debian/control b/debian/control
index ec36e36..f77699e 100644
--- a/debian/control
+++ b/debian/control
@@ -15,7 +15,7 @@ Build-Depends: debhelper-compat (= 13),
sqlite3 <!nocheck>,
xxd <!nocheck>
Rules-Requires-Root: no
-Standards-Version: 4.6.2
+Standards-Version: 4.7.0
Homepage: https://guilhem.org/interimap
Vcs-Git: https://salsa.debian.org/debian/interimap.git -b debian/latest
Vcs-Browser: https://salsa.debian.org/debian/interimap
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/series b/debian/patches/series
index e237c35..0df587c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +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