Merge ~bryce/ubuntu/+source/logwatch:sru-lp1880211-bionic into ubuntu/+source/logwatch:ubuntu/bionic-devel

Proposed by Bryce Harrington
Status: Merged
Approved by: Bryce Harrington
Approved revision: b226d5277a7ca3f2ef460ef63cb518dbeebbea69
Merge reported by: Christian Ehrhardt 
Merged at revision: b226d5277a7ca3f2ef460ef63cb518dbeebbea69
Proposed branch: ~bryce/ubuntu/+source/logwatch:sru-lp1880211-bionic
Merge into: ubuntu/+source/logwatch:ubuntu/bionic-devel
Diff against target: 118 lines (+52/-35)
4 files modified
debian/changelog (+9/-0)
debian/patches/0010-zz-zfs-detect-zfs-location.patch (+42/-0)
debian/patches/series (+1/-1)
dev/null (+0/-34)
Reviewer Review Type Date Requested Status
Christian Ehrhardt  (community) Approve
git-ubuntu developers Pending
Canonical Server Pending
Review via email: mp+401256@code.launchpad.net

Description of the change

This corrects an earlier URL that pulled in upstream's reimplementation of our proposed fix, but which actually introduced a regression. The new code assumed Perl's -x operator considers the $PATH, but it doesn't appear to do so. Instead, we need to explicitly check abspaths in order to find zfs.

This also tightens up requirements to require both `zfs` and `zpool` to be available, and not just assume if one is the other will too.

Note that installing zfsutils-linux in LXC seems to be pretty fussy about kernel module versions, so my testing has been a bit synthetic (and I suppose is why the original issue slipped through). So extra attention on testing in review would be appreciated.

To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

/me was confused by Hirsutes "debian/patches/0001-00-debspecific-disable-su-reporting-in-secure.diff.patch" being so very different to Bionics "d/p/0010-00-debspecific-disable-su-reporting-in-secure.diff.patch" - but yeah - if I ignore that and just look at Bionic it seems fine.
We replace the former (non-perfect) solution with the new better fix.

Other than that hickup the change still is the same as in Hirsute which LGTM

+1

Revision history for this message
Christian Ehrhardt  (paelzer) :
review: Approve
Revision history for this message
Bryce Harrington (bryce) wrote :

$ git ubuntu tag --upload
$ git push pkg upload/7.4.3+git20161207-2ubuntu1.3
Counting objects: 11, done.
Delta compression using up to 12 threads.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 1.99 KiB | 678.00 KiB/s, done.
Total 11 (delta 7), reused 0 (delta 0)
To ssh://git.launchpad.net/ubuntu/+source/logwatch
 * [new tag] upload/7.4.3+git20161207-2ubuntu1.3 -> upload/7.4.3+git20161207-2ubuntu1.3
$ dput ubuntu logwatch_7.4.3+git20161207-2ubuntu1.3_source.changes
Checking signature on .changes
gpg: /home/bryce/pkg/Logwatch/sru-lp1880211/logwatch_7.4.3+git20161207-2ubuntu1.3_source.changes: Valid signature from E603B2578FB8F0FB
Checking signature on .dsc
gpg: /home/bryce/pkg/Logwatch/sru-lp1880211/logwatch_7.4.3+git20161207-2ubuntu1.3.dsc: Valid signature from E603B2578FB8F0FB
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading logwatch_7.4.3+git20161207-2ubuntu1.3.dsc: done.
  Uploading logwatch_7.4.3+git20161207-2ubuntu1.3.debian.tar.xz: done.
  Uploading logwatch_7.4.3+git20161207-2ubuntu1.3_source.buildinfo: done.
  Uploading logwatch_7.4.3+git20161207-2ubuntu1.3_source.changes: done.
Successfully uploaded packages.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

This appeared in -proposed and is in git-ubuntu

 logwatch | 7.4.3+git20161207-2ubuntu1.3 | bionic-proposed | source, all
 logwatch | 7.5.2-1ubuntu1.2 | focal-proposed | source, all
 logwatch | 7.5.4-0ubuntu3.1 | groovy-proposed | source, all

Setting to merged

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 4c1d72e..c0ee647 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
1logwatch (7.4.3+git20161207-2ubuntu1.3) bionic; urgency=medium
2
3 * Replace zfs/zpool executable detection change with fixed version.
4 - Add d/p/0010-zz-zfs-detect-zfs-location.patch
5 - Drop d/p/0010-00-debspecific-disable-su-reporting-in-secure.diff.patch
6 (LP: #1880211)
7
8 -- Bryce Harrington <bryce@canonical.com> Wed, 14 Apr 2021 19:32:23 +0000
9
1logwatch (7.4.3+git20161207-2ubuntu1.2) bionic; urgency=medium10logwatch (7.4.3+git20161207-2ubuntu1.2) bionic; urgency=medium
211
3 [ Bryce Harrington ]12 [ Bryce Harrington ]
diff --git a/debian/patches/0010-00-debspecific-disable-su-reporting-in-secure.diff.patch b/debian/patches/0010-00-debspecific-disable-su-reporting-in-secure.diff.patch
4deleted file mode 10064413deleted file mode 100644
index 0afcc6d..0000000
--- a/debian/patches/0010-00-debspecific-disable-su-reporting-in-secure.diff.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1From 01136a8b3e14a58660db6cc39138d3e40a852737 Mon Sep 17 00:00:00 2001
2From: bjorn <bjorn1@users.sourceforge.net>
3Date: Sat, 6 Jun 2020 18:03:32 -0700
4Subject: [PATCH] [zz-zfs] Use $PATH to determine location of zpool and zfs.
5 Reported by Paride Legovini, and previously by Stephen Sewell.
6
7Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
8---
9 scripts/services/zz-zfs | 4 ++--
10 1 file changed, 2 insertions(+), 2 deletions(-)
11
12Origin: upstream, https://sourceforge.net/p/logwatch/git/ci/01136a8b3e14a58660db6cc39138d3e40a852737
13Bug: https://sourceforge.net/p/logwatch/bugs/83
14Ubuntu-Bug: https://bugs.launchpad.net/ubuntu/+source/logwatch/+bug/1880211
15Last-Updated: 2020-09-08
16
17diff --git a/scripts/services/zz-zfs b/scripts/services/zz-zfs
18index 2234403..95eff2c 100644
19--- a/scripts/services/zz-zfs
20+++ b/scripts/services/zz-zfs
21@@ -52,8 +52,8 @@ if ($ENV{'LOGWATCH_ONLY_HOSTNAME'} && ($logwatch_hostname ne $host)) {
22 exit 0;
23 }
24
25-my $pathto_zpool = $ENV{'pathto_zpool'} || '/usr/sbin/zpool';
26-my $pathto_zfs = $ENV{'pathto_zfs'} || '/usr/sbin/zfs';
27+my $pathto_zpool = $ENV{'pathto_zpool'} || 'zpool';
28+my $pathto_zfs = $ENV{'pathto_zfs'} || 'zfs';
29 my $summary_only = $ENV{'summary_only'} || ($detail < 5);
30 my $detail_only = $ENV{'detail_only'} || 0;
31
32--
332.25.1
34
diff --git a/debian/patches/0010-zz-zfs-detect-zfs-location.patch b/debian/patches/0010-zz-zfs-detect-zfs-location.patch
35new file mode 1006440new file mode 100644
index 0000000..9a74a36
--- /dev/null
+++ b/debian/patches/0010-zz-zfs-detect-zfs-location.patch
@@ -0,0 +1,42 @@
1From d9bc6c1b096be0c469bcc13dde3d083d52eb580a Mon Sep 17 00:00:00 2001
2From: Bryce Harrington <bryce@canonical.com>
3Date: Wed, 7 Apr 2021 13:55:38 -0700
4Subject: [PATCH] zz-zfs Detect zfs location
5
6Some Linux distributions have installed zpool and zfs to /sbin, others
7to /usr/sbin. Since the -x test does not take PATH into account, the
8code needs to explicitly check both locations.
9
10---
11 scripts/services/zz-zfs | 16 ++++++++++++----
12 1 file changed, 12 insertions(+), 4 deletions(-)
13
14Bug: https://sourceforge.net/p/logwatch/bugs/83
15Ubuntu-Bug: https://bugs.launchpad.net/ubuntu/+source/logwatch/+bug/1880211
16Last-Updated: 2021-04-07
17
18diff --git a/scripts/services/zz-zfs b/scripts/services/zz-zfs
19index 3d6da9e..6461fd6 100644
20--- a/scripts/services/zz-zfs
21+++ b/scripts/services/zz-zfs
22@@ -55,9 +55,14 @@ my $pathto_zfs = $ENV{'pathto_zfs'} || '/usr/sbin/zfs';
23 my $summary_only = $ENV{'summary_only'} || ($detail < 5);
24 my $detail_only = $ENV{'detail_only'} || 0;
25
26-if (!-x $pathto_zpool) {
27- # Doesn't support ZFS
28- exit 0;
29+if (!-x $pathto_zpool || !-x $pathto_zfs) {
30+ if (-x '/sbin/zpool' && -x '/sbin/zfs') {
31+ $pathto_zpool = '/sbin/zpool';
32+ $pathto_zfs = '/sbin/zfs';
33+ } else {
34+ # Doesn't support ZFS
35+ exit 0;
36+ }
37 }
38
39 if ( $debug >= 5 ) {
40--
412.25.1
42
diff --git a/debian/patches/series b/debian/patches/series
index c4a4ac6..6b6e63a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,7 +10,7 @@
1010
11ssh-ignore-disconnected.patch11ssh-ignore-disconnected.patch
12ignore-ras-correctable-errors.patch12ignore-ras-correctable-errors.patch
130010-00-debspecific-disable-su-reporting-in-secure.diff.patch130010-zz-zfs-detect-zfs-location.patch
140011-postfix-Ignore-Resolved-loghost-to-127.0.0.1.patch140011-postfix-Ignore-Resolved-loghost-to-127.0.0.1.patch
150012-postfix-Handle-backwards-compatible-mode.patch150012-postfix-Handle-backwards-compatible-mode.patch
160014-zz-sys-Suppress-warnings-if-Sys-CPU-or-Sys-MemInfo-a.patch160014-zz-sys-Suppress-warnings-if-Sys-CPU-or-Sys-MemInfo-a.patch

Subscribers

People subscribed via source and target branches