From 2e4fc872fa2193089ac13a0fb68cdceabe34ed88 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Wed, 25 Mar 2020 12:06:59 -0500 Subject: [PATCH] Remove local elements from e2scrub PATH --- 0001-remove-local-PATH.patch | 26 ++++++++++++++++++++++++++ e2fsprogs.spec | 11 +++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 0001-remove-local-PATH.patch diff --git a/0001-remove-local-PATH.patch b/0001-remove-local-PATH.patch new file mode 100644 index 0000000..0f38eb1 --- /dev/null +++ b/0001-remove-local-PATH.patch @@ -0,0 +1,26 @@ +Index: e2fsprogs-1.45.6/scrub/e2scrub.in +=================================================================== +--- e2fsprogs-1.45.6.orig/scrub/e2scrub.in ++++ e2fsprogs-1.45.6/scrub/e2scrub.in +@@ -23,7 +23,7 @@ + # check filesystems in VGs that have at least 256MB (or so) of + # free space. + +-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin ++PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH + + if (( $EUID != 0 )); then + echo "e2scrub must be run as root" +Index: e2fsprogs-1.45.6/scrub/e2scrub_all.in +=================================================================== +--- e2fsprogs-1.45.6.orig/scrub/e2scrub_all.in ++++ e2fsprogs-1.45.6/scrub/e2scrub_all.in +@@ -18,7 +18,7 @@ + # along with this program; if not, write the Free Software Foundation, + # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin ++PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH + + if (( $EUID != 0 )); then + echo "e2scrub_all must be run as root" diff --git a/e2fsprogs.spec b/e2fsprogs.spec index 992d70e..9ad6b95 100644 --- a/e2fsprogs.spec +++ b/e2fsprogs.spec @@ -1,7 +1,7 @@ Summary: Utilities for managing ext2, ext3, and ext4 file systems Name: e2fsprogs Version: 1.45.6 -Release: 1%{?dist} +Release: 2%{?dist} # License tags based on COPYING file distinctions for various components License: GPLv2 @@ -27,6 +27,8 @@ BuildRequires: gettext BuildRequires: multilib-rpm-config BuildRequires: systemd +Patch0: 0001-remove-local-PATH.patch + %description The e2fsprogs package contains a number of utilities for creating, checking, modifying, and correcting any inconsistencies in second, @@ -154,6 +156,8 @@ managed device with some free space available in respective volume group. %prep %setup -q +%patch0 -p1 + %global _udevdir %{_prefix}/lib/udev/rules.d %build @@ -320,7 +324,10 @@ make fullcheck %{_udevdir}/96-e2scrub.rules %changelog -* Tue Mar 24 2020 Lukas Czerner - 1.45.6-1 +* Wed Mar 25 2020 Eric Sandeen - 1.45.6-2 +- Remove local/ elements from e2scrub PATH + +* Tue Mar 24 2020 Eric Sandeen - 1.45.6-1 - New upstream release * Thu Jan 30 2020 Lukas Czerner - 1.45.5-3