rebase e2fsprogs patch to CentOS7.5

src rpm package is dropped to replaced by rpm since no change is needed for e2fsprogs

Story: 2003389
Task: 24490
Depends-On: https://review.openstack.org/#/c/594898/

Change-Id: Ifee5ad90c5b5efb5a98990369a66903120d18a1f
Signed-off-by: slin14 <shuicheng.lin@intel.com>
This commit is contained in:
slin14 2018-08-15 04:10:30 +08:00
parent cde4a2727c
commit c787890473
9 changed files with 0 additions and 208 deletions

View File

@ -16,7 +16,6 @@ utilities/update-motd
python/python-2.7.5
python/python-django
python/python-setuptools
filesystem/e2fsprogs
virt/libvirt
virt/libvirt-python
base/lighttpd

View File

@ -1 +0,0 @@
TIS_PATCH_VER=3

View File

@ -1,27 +0,0 @@
From 1e7c28725307d612681f43002fe4a901e2fade8e Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 16:09:29 -0400
Subject: [PATCH 1/3] WRS: 0001-Update-package-versioning-for-TIS-format.patch
Conflicts:
SPECS/e2fsprogs.spec
---
SPECS/e2fsprogs.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SPECS/e2fsprogs.spec b/SPECS/e2fsprogs.spec
index 1b1d08c..b5babce 100644
--- a/SPECS/e2fsprogs.spec
+++ b/SPECS/e2fsprogs.spec
@@ -1,7 +1,7 @@
Summary: Utilities for managing ext2, ext3, and ext4 filesystems
Name: e2fsprogs
Version: 1.42.9
-Release: 10%{?dist}
+Release: 10.el7%{?_tis_dist}.%{tis_patch_ver}
# License tags based on COPYING file distinctions for various components
License: GPLv2
--
1.9.1

View File

@ -1,38 +0,0 @@
From cf44fd061e7be981fbea0d5625ddf124d1991e4e Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 16:09:29 -0400
Subject: [PATCH 2/3] WRS: 0002-SPEC-tamper-proof-bash-log.patch
Conflicts:
SPECS/e2fsprogs.spec
---
SPECS/e2fsprogs.spec | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/SPECS/e2fsprogs.spec b/SPECS/e2fsprogs.spec
index b5babce..38ff00b 100644
--- a/SPECS/e2fsprogs.spec
+++ b/SPECS/e2fsprogs.spec
@@ -35,6 +35,9 @@ Patch22: e2fsprogs-1.42.9-resize2fs-clear-uninit-BG.patch
Patch23: e2fsprogs-1.43.3-libext2fs-don-t-ignore-fsync-errors.patch
Patch24: e2fsprogs-1.42.10-Fix-nroff-macro-issue-in-chattr-man-page.patch
+# WRS patches
+Patch100: 0100-tamper-proof-bash-log.patch
+
Url: http://e2fsprogs.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: e2fsprogs-libs%{?_isa} = %{version}-%{release}
@@ -208,6 +211,9 @@ It was originally inspired by the Multics SubSystem library.
%patch23 -p1
%patch24 -p1
+# WRS patches
+%patch100 -p1
+
%build
%configure --enable-elf-shlibs --enable-nls --disable-uuidd --disable-fsck \
--disable-e2initrd-helper --disable-libblkid --disable-libuuid \
--
1.9.1

View File

@ -1,3 +0,0 @@
0001-Update-package-versioning-for-TIS-format.patch
0002-SPEC-tamper-proof-bash-log.patch
meta-e2fsprogs-disable-tests.patch

View File

@ -1,32 +0,0 @@
From f57e1196deb8890c143ebd978f0b83e4c0e749f8 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 16:09:29 -0400
Subject: [PATCH 3/3] WRS: meta-e2fsprogs-disable-tests.patch
---
SPECS/e2fsprogs.spec | 2 ++
1 file changed, 2 insertions(+)
diff --git a/SPECS/e2fsprogs.spec b/SPECS/e2fsprogs.spec
index 38ff00b..0eb885a 100644
--- a/SPECS/e2fsprogs.spec
+++ b/SPECS/e2fsprogs.spec
@@ -37,6 +37,7 @@ Patch24: e2fsprogs-1.42.10-Fix-nroff-macro-issue-in-chattr-man-page.patch
# WRS patches
Patch100: 0100-tamper-proof-bash-log.patch
+Patch101: 0101-e2fsprogs-disable-tests.patch
Url: http://e2fsprogs.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -213,6 +214,7 @@ It was originally inspired by the Multics SubSystem library.
# WRS patches
%patch100 -p1
+%patch101 -p1
%build
%configure --enable-elf-shlibs --enable-nls --disable-uuidd --disable-fsck \
--
1.9.1

View File

@ -1,78 +0,0 @@
From 21f104089cf3a8ee8eb295bafa47dff6ab1000ac Mon Sep 17 00:00:00 2001
From: David Balme <david.balme@windriver.com>
Date: Sun, 29 Jan 2017 18:14:25 -0500
Subject: [PATCH 1/1] tamper proof bash log
---
misc/chattr.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/misc/chattr.c b/misc/chattr.c
index f130108..44db04b 100644
--- a/misc/chattr.c
+++ b/misc/chattr.c
@@ -188,6 +188,49 @@ static int decode_arg (int * i, int argc, char ** argv)
return 1;
}
+//
+// returns true (1) if name looks like
+// bash.log
+// bash.log*
+// */bash.log
+// */bash.log*
+//
+static int is_bash_log_file(const char * name) {
+ if (name == NULL) {
+ return 0;
+ }
+ char * srchresult = strstr(name, "bash.log");
+ if (srchresult != NULL) {
+ if (srchresult == name) {
+ // starts with scenario
+ return 1;
+ }
+ // contained scenario
+ // let's ensure preceding char is a /
+ srchresult --;
+ if (*srchresult == '/') {
+ return 1;
+ }
+ return 0;
+ }
+ return 0;
+}
+
+// returns true (1) if user is trying to remove append-only flag
+// from bash.log file.
+static int is_remove_append_only_on_bash_log(const char * name, unsigned long flags, int rem) {
+ if (!rem) {
+ return 0; // no attribute remove operation specified
+ }
+ if (!(flags & EXT2_APPEND_FL)) { //
+ return 0;
+ }
+ // at this point we are trying to remove append only attribute!
+ // now check if its a bash.log file
+ return is_bash_log_file(name);
+}
+
+
static int chattr_dir_proc(const char *, struct dirent *, void *);
static int change_attributes(const char * name)
@@ -208,6 +251,11 @@ static int change_attributes(const char * name)
_("while reading flags on %s"), name);
return -1;
}
+
+ if (is_remove_append_only_on_bash_log(name, flags, rem)) {
+ return 0;
+ }
+
if (set) {
if (verbose) {
printf (_("Flags of %s set as "), name);
--
1.9.1

View File

@ -1,27 +0,0 @@
From a6c86c1badb9cebb44ffbb53a8ff5d5529b12fd5 Mon Sep 17 00:00:00 2001
From: Matt Peters <matt.peters@windriver.com>
Date: Fri, 3 Feb 2017 16:06:51 -0500
Subject: [PATCH 1/1] e2fsprogs disable tests
---
Makefile.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index f327d19..7faca16 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -16,8 +16,8 @@ INSTALL = @INSTALL@
QUOTA_LIB_SUBDIR= lib/quota
LIB_SUBDIRS=lib/et lib/ss lib/e2p $(UUID_LIB_SUBDIR) lib/ext2fs $(BLKID_LIB_SUBDIR) $(QUOTA_LIB_SUBDIR) intl
-PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po
-SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
+PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) po
+SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS)
SUBS= util/subst.conf lib/config.h lib/dirpaths.h \
lib/ext2fs/ext2_types.h lib/blkid/blkid_types.h lib/uuid/uuid_types.h
--
1.8.3.1

View File

@ -1 +0,0 @@
mirror:Source/e2fsprogs-1.42.9-10.el7.src.rpm