diff -Nru logrotate-3.19.0/debian/changelog logrotate-3.19.0/debian/changelog --- logrotate-3.19.0/debian/changelog 2022-01-24 16:37:01.000000000 +0100 +++ logrotate-3.19.0/debian/changelog 2022-01-30 22:51:59.000000000 +0100 @@ -1,3 +1,20 @@ +logrotate (3.19.0-2ubuntu1) kinetic; urgency=low + + * Merge from Debian unstable. Remaining changes (LP: #1973607): + - debian/control: Drop mailx to Suggests for Ubuntu; it's only used + on request, and we don't configure an MTA by default. + - debian/patches/ubuntu/logrotate.conf-use-group-adm.patch: + Use group 'adm' by default when rotating logs. + + -- Ubuntu Merge-o-Matic Sun, 30 Jan 2022 21:51:59 +0000 + +logrotate (3.19.0-2) unstable; urgency=medium + + * d/patches: cherry-pick commit skip locking /dev/null, + should fix FTBFS on GNU/Hurd + + -- Christian Göttsche Sun, 30 Jan 2022 16:15:24 +0100 + logrotate (3.19.0-1ubuntu1) jammy; urgency=low * Merge from Debian unstable (LP: #1958887). Remaining changes: @@ -1420,3 +1437,4 @@ * Initial Release. -- Joseph Carter Thu, 22 Apr 1999 15:33:04 -0700 + diff -Nru logrotate-3.19.0/debian/patches/series logrotate-3.19.0/debian/patches/series --- logrotate-3.19.0/debian/patches/series 2022-01-24 16:37:01.000000000 +0100 +++ logrotate-3.19.0/debian/patches/series 2022-01-30 22:51:59.000000000 +0100 @@ -1,3 +1,4 @@ +upstream/Do-not-lock-state-file-dev-null.patch debian/skip-cronjob-when-running-with-systemd.patch debian/logrotate.conf-disable-dateext-on-Debian.patch ubuntu/logrotate.conf-use-group-adm.patch diff -Nru logrotate-3.19.0/debian/patches/upstream/Do-not-lock-state-file-dev-null.patch logrotate-3.19.0/debian/patches/upstream/Do-not-lock-state-file-dev-null.patch --- logrotate-3.19.0/debian/patches/upstream/Do-not-lock-state-file-dev-null.patch 1970-01-01 01:00:00.000000000 +0100 +++ logrotate-3.19.0/debian/patches/upstream/Do-not-lock-state-file-dev-null.patch 2022-01-30 16:15:24.000000000 +0100 @@ -0,0 +1,48 @@ +From: =?utf-8?q?Christian_G=C3=B6ttsche?= +Date: Mon, 17 Jan 2022 17:39:08 +0100 +Applied-Upstream: https://github.com/logrotate/logrotate/commit/c7078c2b393fce376d79317a9a03de8b8e404cde +Subject: Do not lock state file /dev/null + +#395 introduced /dev/null as supported state file path for cases when no +state file is desired. +lockState() tries to open and lock the state file to avoid issues with +concurrent instances, see #295. +Locking the character file /dev/null might either be not supported, e.g. +on Debian GNU/Hurd (hurd-i386), nor not allowed, e.g. by SELinux. +--- + logrotate.8.in | 2 +- + logrotate.c | 8 +++++++- + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/logrotate.8.in b/logrotate.8.in +index fb0cc3e..9a28fe2 100644 +--- a/logrotate.8.in ++++ b/logrotate.8.in +@@ -76,7 +76,7 @@ log files. To prevent parallel execution \fBlogrotate\fR by default + acquires a lock on the state file, if it cannot be acquired \fBlogrotate\fR + will exit with value 3. The default state file is \fI@STATE_FILE_PATH@\fR. + If \fI/dev/null\fR is given as the state file, then \fBlogrotate\fR will +-not try to write the state file. ++not try to lock or write the state file. + + .TP + \fB\-\-skip-state-lock\fR +diff --git a/logrotate.c b/logrotate.c +index cca7a5f..279ecb9 100644 +--- a/logrotate.c ++++ b/logrotate.c +@@ -3000,7 +3000,13 @@ static int readState(const char *stateFilename) + + static int lockState(const char *stateFilename, int skip_state_lock) + { +- int lockFd = open(stateFilename, O_RDWR | O_CLOEXEC); ++ int lockFd; ++ ++ if (!strcmp(stateFilename, "/dev/null")) { ++ return 0; ++ } ++ ++ lockFd = open(stateFilename, O_RDWR | O_CLOEXEC); + if (lockFd == -1) { + if (errno == ENOENT) { + message(MESS_DEBUG, "Creating stub state file: %s\n",