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
1diff --git a/debian/changelog b/debian/changelog
2index 4c1d72e..c0ee647 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+logwatch (7.4.3+git20161207-2ubuntu1.3) bionic; urgency=medium
7+
8+ * Replace zfs/zpool executable detection change with fixed version.
9+ - Add d/p/0010-zz-zfs-detect-zfs-location.patch
10+ - Drop d/p/0010-00-debspecific-disable-su-reporting-in-secure.diff.patch
11+ (LP: #1880211)
12+
13+ -- Bryce Harrington <bryce@canonical.com> Wed, 14 Apr 2021 19:32:23 +0000
14+
15 logwatch (7.4.3+git20161207-2ubuntu1.2) bionic; urgency=medium
16
17 [ Bryce Harrington ]
18diff --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
19deleted file mode 100644
20index 0afcc6d..0000000
21--- a/debian/patches/0010-00-debspecific-disable-su-reporting-in-secure.diff.patch
22+++ /dev/null
23@@ -1,34 +0,0 @@
24-From 01136a8b3e14a58660db6cc39138d3e40a852737 Mon Sep 17 00:00:00 2001
25-From: bjorn <bjorn1@users.sourceforge.net>
26-Date: Sat, 6 Jun 2020 18:03:32 -0700
27-Subject: [PATCH] [zz-zfs] Use $PATH to determine location of zpool and zfs.
28- Reported by Paride Legovini, and previously by Stephen Sewell.
29-
30-Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
31----
32- scripts/services/zz-zfs | 4 ++--
33- 1 file changed, 2 insertions(+), 2 deletions(-)
34-
35-Origin: upstream, https://sourceforge.net/p/logwatch/git/ci/01136a8b3e14a58660db6cc39138d3e40a852737
36-Bug: https://sourceforge.net/p/logwatch/bugs/83
37-Ubuntu-Bug: https://bugs.launchpad.net/ubuntu/+source/logwatch/+bug/1880211
38-Last-Updated: 2020-09-08
39-
40-diff --git a/scripts/services/zz-zfs b/scripts/services/zz-zfs
41-index 2234403..95eff2c 100644
42---- a/scripts/services/zz-zfs
43-+++ b/scripts/services/zz-zfs
44-@@ -52,8 +52,8 @@ if ($ENV{'LOGWATCH_ONLY_HOSTNAME'} && ($logwatch_hostname ne $host)) {
45- exit 0;
46- }
47-
48--my $pathto_zpool = $ENV{'pathto_zpool'} || '/usr/sbin/zpool';
49--my $pathto_zfs = $ENV{'pathto_zfs'} || '/usr/sbin/zfs';
50-+my $pathto_zpool = $ENV{'pathto_zpool'} || 'zpool';
51-+my $pathto_zfs = $ENV{'pathto_zfs'} || 'zfs';
52- my $summary_only = $ENV{'summary_only'} || ($detail < 5);
53- my $detail_only = $ENV{'detail_only'} || 0;
54-
55---
56-2.25.1
57-
58diff --git a/debian/patches/0010-zz-zfs-detect-zfs-location.patch b/debian/patches/0010-zz-zfs-detect-zfs-location.patch
59new file mode 100644
60index 0000000..9a74a36
61--- /dev/null
62+++ b/debian/patches/0010-zz-zfs-detect-zfs-location.patch
63@@ -0,0 +1,42 @@
64+From d9bc6c1b096be0c469bcc13dde3d083d52eb580a Mon Sep 17 00:00:00 2001
65+From: Bryce Harrington <bryce@canonical.com>
66+Date: Wed, 7 Apr 2021 13:55:38 -0700
67+Subject: [PATCH] zz-zfs Detect zfs location
68+
69+Some Linux distributions have installed zpool and zfs to /sbin, others
70+to /usr/sbin. Since the -x test does not take PATH into account, the
71+code needs to explicitly check both locations.
72+
73+---
74+ scripts/services/zz-zfs | 16 ++++++++++++----
75+ 1 file changed, 12 insertions(+), 4 deletions(-)
76+
77+Bug: https://sourceforge.net/p/logwatch/bugs/83
78+Ubuntu-Bug: https://bugs.launchpad.net/ubuntu/+source/logwatch/+bug/1880211
79+Last-Updated: 2021-04-07
80+
81+diff --git a/scripts/services/zz-zfs b/scripts/services/zz-zfs
82+index 3d6da9e..6461fd6 100644
83+--- a/scripts/services/zz-zfs
84++++ b/scripts/services/zz-zfs
85+@@ -55,9 +55,14 @@ my $pathto_zfs = $ENV{'pathto_zfs'} || '/usr/sbin/zfs';
86+ my $summary_only = $ENV{'summary_only'} || ($detail < 5);
87+ my $detail_only = $ENV{'detail_only'} || 0;
88+
89+-if (!-x $pathto_zpool) {
90+- # Doesn't support ZFS
91+- exit 0;
92++if (!-x $pathto_zpool || !-x $pathto_zfs) {
93++ if (-x '/sbin/zpool' && -x '/sbin/zfs') {
94++ $pathto_zpool = '/sbin/zpool';
95++ $pathto_zfs = '/sbin/zfs';
96++ } else {
97++ # Doesn't support ZFS
98++ exit 0;
99++ }
100+ }
101+
102+ if ( $debug >= 5 ) {
103+--
104+2.25.1
105+
106diff --git a/debian/patches/series b/debian/patches/series
107index c4a4ac6..6b6e63a 100644
108--- a/debian/patches/series
109+++ b/debian/patches/series
110@@ -10,7 +10,7 @@
111
112 ssh-ignore-disconnected.patch
113 ignore-ras-correctable-errors.patch
114-0010-00-debspecific-disable-su-reporting-in-secure.diff.patch
115+0010-zz-zfs-detect-zfs-location.patch
116 0011-postfix-Ignore-Resolved-loghost-to-127.0.0.1.patch
117 0012-postfix-Handle-backwards-compatible-mode.patch
118 0014-zz-sys-Suppress-warnings-if-Sys-CPU-or-Sys-MemInfo-a.patch

Subscribers

People subscribed via source and target branches