aboutsummaryrefslogtreecommitdiffstats
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rwxr-xr-xdebian/patches/01_fetchmailconf.patch14
-rw-r--r--debian/patches/04_invoke-rc.d.diff19
-rw-r--r--debian/patches/07_properly_report_size_of_mailboxes.patch142
-rw-r--r--debian/patches/08_remove_forced_OpenSSL_check.patch26
-rw-r--r--debian/patches/series4
5 files changed, 205 insertions, 0 deletions
diff --git a/debian/patches/01_fetchmailconf.patch b/debian/patches/01_fetchmailconf.patch
new file mode 100755
index 00000000..24557339
--- /dev/null
+++ b/debian/patches/01_fetchmailconf.patch
@@ -0,0 +1,14 @@
+Description: Remove header from fetchmailconf.py since it is a library.
+Author: Hector Garcia <hector@debian.org>
+
+Remove header from fetchmailconf.py since it is a library.
+Index: fetchmail-6.3.13/fetchmailconf.py
+===================================================================
+--- fetchmail-6.3.13.orig/fetchmailconf.py 2009-09-24 01:11:14.000000000 +0200
++++ fetchmail-6.3.13/fetchmailconf.py 2010-02-01 16:33:46.000000000 +0100
+@@ -1,5 +1,3 @@
+-#!/usr/bin/env python
+-#
+ # A GUI configurator for generating fetchmail configuration files.
+ # by Eric S. Raymond, <esr@snark.thyrsus.com>,
+ # Matthias Andree <matthias.andree@gmx.de>
diff --git a/debian/patches/04_invoke-rc.d.diff b/debian/patches/04_invoke-rc.d.diff
new file mode 100644
index 00000000..8fc1bcf5
--- /dev/null
+++ b/debian/patches/04_invoke-rc.d.diff
@@ -0,0 +1,19 @@
+Description: patch contrib files to run invoke-rc.d instead of /etc/init.d/* directly
+ This is required by policy 4.0.0.
+Author: Nicolas Boulenguez <nicolas@debian.org>
+
+--- a/contrib/fetchmail.logrotate
++++ b/contrib/fetchmail.logrotate
+@@ -46,11 +46,7 @@
+ sharedscripts
+ postrotate
+ if [ -f /var/run/fetchmail/fetchmail.pid ]; then \
+- if [ -x /usr/sbin/invoke-rc.d ]; then \
+- invoke-rc.d fetchmail restart > /dev/null; \
+- else \
+- /etc/init.d/fetchmail restart > /dev/null; \
+- fi; \
++ invoke-rc.d fetchmail restart > /dev/null;
+ fi;
+ endscript
+ }
diff --git a/debian/patches/07_properly_report_size_of_mailboxes.patch b/debian/patches/07_properly_report_size_of_mailboxes.patch
new file mode 100644
index 00000000..1f68bd0d
--- /dev/null
+++ b/debian/patches/07_properly_report_size_of_mailboxes.patch
@@ -0,0 +1,142 @@
+From 87626c2707cc0d82e49e160ab3c85430ff33534f Mon Sep 17 00:00:00 2001
+From: Matthias Andree <matthias.andree@gmx.de>
+Date: Sat, 24 Aug 2019 17:53:08 +0200
+Subject: [PATCH] Properly report size of mailboxes of 2 GibiB or above.
+
+To fix Debian Bug#873668, reported by Andreas Schmidt.
+This requires C99's new long long type.
+---
+ NEWS | 7 +++++++
+ driver.c | 7 ++++---
+ etrn.c | 2 +-
+ fetchmail.h | 2 +-
+ imap.c | 2 +-
+ odmr.c | 2 +-
+ pop2.c | 2 +-
+ pop3.c | 4 ++--
+ 8 files changed, 18 insertions(+), 10 deletions(-)
+
+diff --git a/driver.c b/driver.c
+index d21a32ab..a5033729 100644
+--- a/driver.c
++++ b/driver.c
+@@ -948,7 +948,7 @@ static int do_session(
+ {
+ /* sigsetjmp returned zero -> normal operation */
+ char buf[MSGBUFSIZE+1], *realhost;
+- int count, newm, bytes;
++ int count, newm;
+ int fetches, dispatches, transient_errors, oldphase;
+ struct idlist *idp;
+
+@@ -1322,6 +1322,7 @@ is restored."));
+
+ /* compute # of messages and number of new messages waiting */
+ stage = STAGE_GETRANGE;
++ unsigned long long bytes;
+ err = (ctl->server.base_protocol->getrange)(mailserver_socket, ctl, idp->id, &count, &newm, &bytes);
+ if (err != 0)
+ goto cleanUp;
+@@ -1351,10 +1352,10 @@ is restored."));
+ "%d messages for %s",
+ count),
+ count, buf);
+- if (bytes == -1)
++ if (bytes == (unsigned long long)-1) // mailbox size unsupported
+ report_complete(stdout, ".\n");
+ else
+- report_complete(stdout, GT_(" (%d octets).\n"), bytes);
++ report_complete(stdout, GT_(" (%llu octets).\n"), bytes);
+ }
+ else
+ {
+diff --git a/etrn.c b/etrn.c
+index f3fab0ce..12b9d3fd 100644
+--- a/etrn.c
++++ b/etrn.c
+@@ -34,7 +34,7 @@ static int etrn_ok (int sock, char *argbuf)
+ }
+
+ static int etrn_getrange(int sock, struct query *ctl, const char *id,
+- int *countp, int *newp, int *bytes)
++ int *countp, int *newp, unsigned long long *bytes)
+ /* send ETRN and interpret the response */
+ {
+ int ok, opts;
+diff --git a/fetchmail.h b/fetchmail.h
+index 23ba6e6e..72259e10 100644
+--- a/fetchmail.h
++++ b/fetchmail.h
+@@ -226,7 +226,7 @@ struct method /* describe methods for protocol state machine */
+ /* response_parsing function */
+ int (*getauth)(int, struct query *, char *);
+ /* authorization fetcher */
+- int (*getrange)(int, struct query *, const char *, int *, int *, int *);
++ int (*getrange)(int, struct query *, const char *, int *, int *, unsigned long long *);
+ /* get message range to fetch */
+ int (*getsizes)(int, int, int *);
+ /* get sizes of messages */
+diff --git a/imap.c b/imap.c
+index 7b80679a..7836acd7 100644
+--- a/imap.c
++++ b/imap.c
+@@ -876,7 +876,7 @@ static int imap_search(int sock, struct query *ctl, int count)
+ static int imap_getrange(int sock,
+ struct query *ctl,
+ const char *folder,
+- int *countp, int *newp, int *bytes)
++ int *countp, int *newp, unsigned long long *bytes)
+ /* get range of messages to be fetched */
+ {
+ int ok;
+diff --git a/odmr.c b/odmr.c
+index 85decb6d..d1c011c4 100644
+--- a/odmr.c
++++ b/odmr.c
+@@ -45,7 +45,7 @@ static int odmr_ok (int sock, char *argbuf)
+ }
+
+ static int odmr_getrange(int sock, struct query *ctl, const char *id,
+- int *countp, int *newp, int *bytes)
++ int *countp, int *newp, unsigned long long *bytes)
+ /* send ODMR and then run a reverse SMTP session */
+ {
+ int ok, opts, smtp_sock;
+diff --git a/pop2.c b/pop2.c
+index 7c843616..5a5a1bd1 100644
+--- a/pop2.c
++++ b/pop2.c
+@@ -84,7 +84,7 @@ static int pop2_getauth(int sock, struct query *ctl, char *buf)
+ }
+
+ static int pop2_getrange(int sock, struct query *ctl, const char *folder,
+- int *countp, int *newp, int *bytes)
++ int *countp, int *newp, unsigned long long *bytes)
+ /* get range of messages to be fetched */
+ {
+ (void)ctl;
+diff --git a/pop3.c b/pop3.c
+index 6efe1b7e..25efbaad 100644
+--- a/pop3.c
++++ b/pop3.c
+@@ -957,7 +957,7 @@ static int pop3_slowuidl( int sock, struct query *ctl, int *countp, int *newp)
+ static int pop3_getrange(int sock,
+ struct query *ctl,
+ const char *folder,
+- int *countp, int *newp, int *bytes)
++ int *countp, int *newp, unsigned long long *bytes)
+ /* get range of messages to be fetched */
+ {
+ int ok;
+@@ -980,7 +980,7 @@ static int pop3_getrange(int sock,
+ if (ok == 0) {
+ int asgn;
+
+- asgn = sscanf(buf,"%d %d", countp, bytes);
++ asgn = sscanf(buf,"%d %llu", countp, bytes);
+ if (asgn != 2)
+ return PS_PROTOCOL;
+ } else
+--
+2.22.0
+
diff --git a/debian/patches/08_remove_forced_OpenSSL_check.patch b/debian/patches/08_remove_forced_OpenSSL_check.patch
new file mode 100644
index 00000000..12a1d6e6
--- /dev/null
+++ b/debian/patches/08_remove_forced_OpenSSL_check.patch
@@ -0,0 +1,26 @@
+Description: Remove forced OpenSSL version check
+ Not needed, linker should take care of proper library loading.
+Author: Laszlo Boszormenyi (GCS) <gcs@debian.org>
+Bug-Debian: https://bugs.debian.org/973472
+Forwarded: no
+Last-Update: 2023-01-10
+
+---
+
+--- a/socket.c
++++ b/socket.c
+@@ -1123,12 +1123,12 @@ int SSLOpen(int sock, char *mycert, char
+ }
+ }
+ #endif
+-
++/*
+ if (ver < OPENSSL_VERSION_NUMBER) {
+ report(stderr, GT_("Loaded OpenSSL library %#lx older than headers %#lx, refusing to work.\n"), (long)ver, (long)(OPENSSL_VERSION_NUMBER));
+ return -1;
+ }
+-
++*/
+ if (ver > OPENSSL_VERSION_NUMBER && outlevel >= O_VERBOSE) {
+ report(stdout, GT_("Loaded OpenSSL library %#lx newer than headers %#lx, trying to continue.\n"), (long)ver, (long)(OPENSSL_VERSION_NUMBER));
+ }
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 00000000..50da97c1
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,4 @@
+01_fetchmailconf.patch
+04_invoke-rc.d.diff
+07_properly_report_size_of_mailboxes.patch
+08_remove_forced_OpenSSL_check.patch