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

Proposed by Bryce Harrington
Status: Merged
Approved by: Bryce Harrington
Approved revision: 696555e715a79f9b80fb36e255604938ccef4258
Merge reported by: Christian Ehrhardt 
Merged at revision: 696555e715a79f9b80fb36e255604938ccef4258
Proposed branch: ~bryce/ubuntu/+source/logwatch:sru-lp1880211-focal
Merge into: ubuntu/+source/logwatch:ubuntu/focal-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) Needs Fixing
git-ubuntu developers Pending
Canonical Server Pending
Review via email: mp+401257@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 :

Hmm, LP is confused by the Focal MP for this case.

Current packages:
 logwatch | 7.5.2-1ubuntu1 | focal | source, all
 logwatch | 7.5.2-1ubuntu1.1 | focal-updates | source, all

Checking it in git

commit c7185e41e4a9554b1611d0c6a801abf8f78911ed (HEAD -> sru-lp1880211-focal, tag: pkg/upload/7.5.2-1ubuntu1.1, tag: pkg/import/7.5.2-1ubuntu1.1, tag: bryce/upload/7.5.2-1ubuntu1.1, pkg/ubuntu/focal-updates, pkg/ubuntu/focal-proposed, pkg/ubuntu/focal-devel, bryce/sru-lp1880211-focal, bryce/fix-unmatched-entries-focal)
Author: Bryce Harrington <email address hidden>
Date: Fri Sep 4 11:58:57 2020 -0700

    changelog

That is a bit noisy, but the following is empty:
$ git diff sru-lp1880211-focal..pkg/ubuntu/focal-devel

Therefore this is missing ... something ...

review: Needs Fixing
696555e... by Bryce Harrington

changelog

55d2f9d... by Bryce Harrington

  * Replace zfs/zpool executable detection change with fixed version.
    - Add d/p/0010-zz-zfs-detect-zfs-location.patch
    - Drop d/p/0010-00-debspecific-disable-su-reporting-in-secure.diff.patch
    (LP: #1880211)

Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

Hello,

Looks good now, I guess. Go ahead with the upload, Bryce! \o/

Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks Utkarsh

$ git ubuntu tag --upload
$ git push pkg upload/7.5.2-1ubuntu1.2
Enumerating objects: 16, done.
Counting objects: 100% (16/16), done.
Delta compression using up to 12 threads
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 1.98 KiB | 507.00 KiB/s, done.
Total 11 (delta 7), reused 0 (delta 0)
To ssh://git.launchpad.net/ubuntu/+source/logwatch
 * [new tag] upload/7.5.2-1ubuntu1.2 -> upload/7.5.2-1ubuntu1.2
$ dput ubuntu logwatch_7.5.2-1ubuntu1.2_source.changes
Checking signature on .changes
gpg: /home/bryce/pkg/Logwatch/sru-lp1880211/logwatch_7.5.2-1ubuntu1.2_source.changes: Valid signature from E603B2578FB8F0FB
Checking signature on .dsc
gpg: /home/bryce/pkg/Logwatch/sru-lp1880211/logwatch_7.5.2-1ubuntu1.2.dsc: Valid signature from E603B2578FB8F0FB
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading logwatch_7.5.2-1ubuntu1.2.dsc: done.
  Uploading logwatch_7.5.2-1ubuntu1.2.debian.tar.xz: done.
  Uploading logwatch_7.5.2-1ubuntu1.2_source.buildinfo: done.
  Uploading logwatch_7.5.2-1ubuntu1.2_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 aa7efed..9bc9fae 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+logwatch (7.5.2-1ubuntu1.2) focal; 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> Fri, 16 Apr 2021 16:05:11 +0000
14+
15 logwatch (7.5.2-1ubuntu1.1) focal; 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 bd08f5a..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 c6cdcf7..66ce090 100644
108--- a/debian/patches/series
109+++ b/debian/patches/series
110@@ -2,7 +2,7 @@
111 0002-logfiles-vsftpd.conf-Use-custom-pattern-for-applystd.patch
112 0003-Ignore-ecryptfs-automounting-messages-in-cron.patch
113 0004-scripts-mdadm-Fix-parsing-of-mdadm.conf-handle-ignor.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 0013-secure-Ignore-warnings-about-gnome-keyring-daemon-it.patch

Subscribers

People subscribed via source and target branches