From f66e85011d8bb98b9973f09c2e557f7b73398871 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Mon, 27 May 2019 22:27:04 -0400 Subject: [PATCH] Remove debian patches for v1.45.2 release Signed-off-by: Theodore Ts'o --- ...b-stop-cron-spam-if-lvm2-is-not-installed.patch | 103 --------------------- ...-avoid-scrubbing-all-devices-when-there-i.patch | 39 -------- ...-fix-missing-getopts-argument-which-broke.patch | 29 ------ debian/patches/series | 3 - 4 files changed, 174 deletions(-) delete mode 100644 debian/patches/0001-e2scrub-stop-cron-spam-if-lvm2-is-not-installed.patch delete mode 100644 debian/patches/0002-e2scrub_all-avoid-scrubbing-all-devices-when-there-i.patch delete mode 100644 debian/patches/0003-e2scrub_all-fix-missing-getopts-argument-which-broke.patch delete mode 100644 debian/patches/series diff --git a/debian/patches/0001-e2scrub-stop-cron-spam-if-lvm2-is-not-installed.patch b/debian/patches/0001-e2scrub-stop-cron-spam-if-lvm2-is-not-installed.patch deleted file mode 100644 index abb4a55..0000000 --- a/debian/patches/0001-e2scrub-stop-cron-spam-if-lvm2-is-not-installed.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 9d41a057d9643505942628c919869a7019646276 Mon Sep 17 00:00:00 2001 -From: Theodore Ts'o -Date: Thu, 16 May 2019 14:56:37 -0400 -Subject: [PATCH 1/2] e2scrub: stop cron spam if lvm2 is not installed. - -Addresses-Debian-Bug: #928977 - -Signed-off-by: Theodore Ts'o ---- - scrub/e2scrub_all.cron.in | 2 +- - scrub/e2scrub_all.in | 12 ++++++++++-- - scrub/e2scrub_all.service.in | 2 +- - scrub/e2scrub_all_cron.in | 2 +- - scrub/e2scrub_reap.service.in | 2 +- - 5 files changed, 14 insertions(+), 6 deletions(-) - -diff --git a/scrub/e2scrub_all.cron.in b/scrub/e2scrub_all.cron.in -index 7d42c3f2e..5bf83ec97 100644 ---- a/scrub/e2scrub_all.cron.in -+++ b/scrub/e2scrub_all.cron.in -@@ -1,2 +1,2 @@ - 30 3 * * 0 root test -e /run/systemd/system || @pkglibdir@/e2scrub_all_cron --10 3 * * * root test -e /run/systemd/system || @root_sbindir@/e2scrub_all -A -r -+10 3 * * * root test -e /run/systemd/system || @root_sbindir@/e2scrub_all -C -A -r -diff --git a/scrub/e2scrub_all.in b/scrub/e2scrub_all.in -index 31ebc7970..7ee653158 100644 ---- a/scrub/e2scrub_all.in -+++ b/scrub/e2scrub_all.in -@@ -26,6 +26,7 @@ if (( $EUID != 0 )); then - fi - - scrub_all=0 -+run_from_cron=0 - snap_size_mb=256 - reap=0 - conffile="@root_sysconfdir@/e2scrub.conf" -@@ -73,6 +74,7 @@ while getopts "nrAV" opt; do - "n") DBG="echo Would execute: " ;; - "r") scrub_args="${scrub_args} -r"; reap=1;; - "A") scrub_all=1;; -+ "C") run_from_cron=1;; - "V") print_version; exitcode 0;; - *) print_help; exitcode 2;; - esac -@@ -84,13 +86,19 @@ shift "$((OPTIND - 1))" - # when e2scrub_all is run out of cron or a systemd timer. - - if ! type lsblk >& /dev/null ; then -+ if [ "${run_from_cron}" -eq 1 ] ; then -+ exitcode 0 -+ fi - echo "e2scrub_all: can't find lsblk --- is util-linux installed?" -- exitcode 0 -+ exitcode 1 - fi - - if ! type lvcreate >& /dev/null ; then -+ if [ "${run_from_cron}" -eq 1 ] ; then -+ exitcode 0 -+ fi - echo "e2scrub_all: can't find lvcreate --- is lvm2 installed?" -- exitcode 0 -+ exitcode 1 - fi - - # Find scrub targets, make sure we only do this once. -diff --git a/scrub/e2scrub_all.service.in b/scrub/e2scrub_all.service.in -index 20f42bfe3..77b6ad599 100644 ---- a/scrub/e2scrub_all.service.in -+++ b/scrub/e2scrub_all.service.in -@@ -8,5 +8,5 @@ Documentation=man:e2scrub_all(8) - [Service] - Type=oneshot - Environment=SERVICE_MODE=1 --ExecStart=@root_sbindir@/e2scrub_all -+ExecStart=@root_sbindir@/e2scrub_all -C - SyslogIdentifier=e2scrub_all -diff --git a/scrub/e2scrub_all_cron.in b/scrub/e2scrub_all_cron.in -index f9cff878c..bc26fee3d 100644 ---- a/scrub/e2scrub_all_cron.in -+++ b/scrub/e2scrub_all_cron.in -@@ -65,4 +65,4 @@ on_ac_power() { - test -e /run/systemd/system && exit 0 - on_ac_power || exit 0 - --exec @root_sbindir@/e2scrub_all -+exec @root_sbindir@/e2scrub_all -C -diff --git a/scrub/e2scrub_reap.service.in b/scrub/e2scrub_reap.service.in -index cf26437cd..40511f735 100644 ---- a/scrub/e2scrub_reap.service.in -+++ b/scrub/e2scrub_reap.service.in -@@ -16,7 +16,7 @@ NoNewPrivileges=yes - User=root - IOSchedulingClass=idle - CPUSchedulingPolicy=idle --ExecStart=@root_sbindir@/e2scrub_all -A -r -+ExecStart=@root_sbindir@/e2scrub_all -C -A -r - SyslogIdentifier=%N - RemainAfterExit=no - --- -2.19.1 - diff --git a/debian/patches/0002-e2scrub_all-avoid-scrubbing-all-devices-when-there-i.patch b/debian/patches/0002-e2scrub_all-avoid-scrubbing-all-devices-when-there-i.patch deleted file mode 100644 index f07974a..0000000 --- a/debian/patches/0002-e2scrub_all-avoid-scrubbing-all-devices-when-there-i.patch +++ /dev/null @@ -1,39 +0,0 @@ -From fbb9bfa4a5925f8049ef51d8f59eb94920781ec8 Mon Sep 17 00:00:00 2001 -From: Theodore Ts'o -Date: Sat, 18 May 2019 23:04:49 -0400 -Subject: [PATCH 2/2] e2scrub_all: avoid scrubbing all devices when there is - nothing to scrub - -Running lsblk when there are no valid block devicse results in -generating all block devices as the list of devices to scrub; this -results in a lot of e2scrub_all failures. - -Addresses-Debian-Bug: #929186 - -Signed-off-by: Theodore Ts'o ---- - scrub/e2scrub_all.in | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/scrub/e2scrub_all.in b/scrub/e2scrub_all.in -index 7ee653158..abc237e42 100644 ---- a/scrub/e2scrub_all.in -+++ b/scrub/e2scrub_all.in -@@ -103,8 +103,12 @@ fi - - # Find scrub targets, make sure we only do this once. - ls_scan_targets() { -- lsblk -o NAME,MOUNTPOINT,FSTYPE -P -n -p \ -- $(lvs -o lv_path --noheadings -S "lv_active=active,lv_role=public,lv_role!=snapshot,vg_free>${snap_size_mb}") | \ -+ local devices=$(lvs -o lv_path --noheadings -S "lv_active=active,lv_role=public,lv_role!=snapshot,vg_free>${snap_size_mb}") -+ -+ if [ -z "$devices" ]; then -+ return 0; -+ fi -+ lsblk -o NAME,MOUNTPOINT,FSTYPE -P -n -p $devices | \ - grep FSTYPE=\"ext\[234\]\" | while read vars ; do - eval "${vars}" - --- -2.19.1 - diff --git a/debian/patches/0003-e2scrub_all-fix-missing-getopts-argument-which-broke.patch b/debian/patches/0003-e2scrub_all-fix-missing-getopts-argument-which-broke.patch deleted file mode 100644 index 23b13ef..0000000 --- a/debian/patches/0003-e2scrub_all-fix-missing-getopts-argument-which-broke.patch +++ /dev/null @@ -1,29 +0,0 @@ -From cf62b892ebe0b4fef82057939979417014427882 Mon Sep 17 00:00:00 2001 -From: Theodore Ts'o -Date: Mon, 20 May 2019 20:34:59 -0400 -Subject: [PATCH] e2scrub_all: fix missing getopts argument which broke - e2scrub_all -C - -Addresses-Debian-Bug: #929287 - -Signed-off-by: Theodore Ts'o ---- - scrub/e2scrub_all.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/scrub/e2scrub_all.in b/scrub/e2scrub_all.in -index abc237e42..d99c81978 100644 ---- a/scrub/e2scrub_all.in -+++ b/scrub/e2scrub_all.in -@@ -69,7 +69,7 @@ exitcode() { - exit "${ret}" - } - --while getopts "nrAV" opt; do -+while getopts "nrACV" opt; do - case "${opt}" in - "n") DBG="echo Would execute: " ;; - "r") scrub_args="${scrub_args} -r"; reap=1;; --- -2.19.1 - diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index 15a3b0b..0000000 --- a/debian/patches/series +++ /dev/null @@ -1,3 +0,0 @@ -0001-e2scrub-stop-cron-spam-if-lvm2-is-not-installed.patch -0002-e2scrub_all-avoid-scrubbing-all-devices-when-there-i.patch -0003-e2scrub_all-fix-missing-getopts-argument-which-broke.patch -- 1.8.3.1