From 1a14e1037698dba9c5b7ec4bc9f9d8adf8eb9f74 Mon Sep 17 00:00:00 2001 From: zhanchengbin Date: Wed, 16 Mar 2022 15:20:15 +0800 Subject: [PATCH 1/2] tests: add warning for selinux in m_rootdir_acl Signed-off-by: zhanchengbin --- ...warning-for-selinux-in-m_rootdir_acl.patch | 28 +++++++++++++++++++ e2fsprogs.spec | 6 +++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 0012-tests-add-warning-for-selinux-in-m_rootdir_acl.patch diff --git a/0012-tests-add-warning-for-selinux-in-m_rootdir_acl.patch b/0012-tests-add-warning-for-selinux-in-m_rootdir_acl.patch new file mode 100644 index 0000000..d69a097 --- /dev/null +++ b/0012-tests-add-warning-for-selinux-in-m_rootdir_acl.patch @@ -0,0 +1,28 @@ +From 012560701c876c5630d5d8f17c25227b91037d0e Mon Sep 17 00:00:00 2001 +From: zhanchengbin +Date: Wed, 16 Mar 2022 14:56:20 +0800 +Subject: [PATCH] tests: add warning for selinux in m_rootdir_acl + +Signed-off-by: zhanchengbin +--- + tests/m_rootdir_acl/script | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tests/m_rootdir_acl/script b/tests/m_rootdir_acl/script +index e81c82c..8a52543 100644 +--- a/tests/m_rootdir_acl/script ++++ b/tests/m_rootdir_acl/script +@@ -99,6 +99,10 @@ if [ "$status" = 0 ] ; then + else + echo "$test_name: $test_description: failed" + diff $DIFF_OPTS $EXP $OUT > $test_name.failed ++ selinux=`grep -nRE "^SELINUX=" /etc/selinux/config | awk -F "=" '{print $2}'` ++ if [ $selinux != "disabled" ] ; then ++ echo "m_rootdir_acl: selinux is $selinux, please disable it and try again." ++ fi + fi + + rm -rf $TMPFILE.cmd $MKFS_DIR +-- +1.8.3.1 + diff --git a/e2fsprogs.spec b/e2fsprogs.spec index 6058a84..4a36674 100644 --- a/e2fsprogs.spec +++ b/e2fsprogs.spec @@ -1,6 +1,6 @@ Name: e2fsprogs Version: 1.46.4 -Release: 6 +Release: 7 Summary: Second extended file system management tools License: GPLv2+ and LGPLv2 and MIT URL: http://e2fsprogs.sourceforge.net/ @@ -17,6 +17,7 @@ Patch8: 0008-e2fsck-add-env-param-E2FS_UNRELIABLE_IO-to-fi.patch Patch9: 0009-e2mmpstatus.8.in-detele-filesystem-can-be-UUID-or-LA.patch Patch10: 0010-tests-update-expect-file-for-u_direct_io.patch Patch11: 0011-libext2fs-don-t-old-the-CACHE_MTX-while-doing-I-O.patch +Patch12: 0012-tests-add-warning-for-selinux-in-m_rootdir_acl.patch BuildRequires: gcc pkgconfig texinfo @@ -139,6 +140,9 @@ exit 0 %{_mandir}/man8/* %changelog +* Wed Feb 16 2022 zhanchengbin - 1.46.4-7 +- tests: add warning for selinux in m_rootdir_acl + * Wed Feb 9 2022 zhanchengbin - 1.46.4-6 - libext2fs: don't old the CACHE_MTX while doing I/O -- Gitee From 4a0d10630f3fd52db64f98f78a2aeeb14454d87b Mon Sep 17 00:00:00 2001 From: zhanchengbin Date: Thu, 17 Mar 2022 11:05:42 +0800 Subject: [PATCH 2/2] tests: skip m_rootdir_acl if selinux is not disabled Signed-off-by: zhanchengbin --- ...warning-for-selinux-in-m_rootdir_acl.patch | 28 ----------------- ...otdir_acl-if-selinux-is-not-disabled.patch | 30 +++++++++++++++++++ e2fsprogs.spec | 6 ++-- 3 files changed, 33 insertions(+), 31 deletions(-) delete mode 100644 0012-tests-add-warning-for-selinux-in-m_rootdir_acl.patch create mode 100644 0012-tests-skip-m_rootdir_acl-if-selinux-is-not-disabled.patch diff --git a/0012-tests-add-warning-for-selinux-in-m_rootdir_acl.patch b/0012-tests-add-warning-for-selinux-in-m_rootdir_acl.patch deleted file mode 100644 index d69a097..0000000 --- a/0012-tests-add-warning-for-selinux-in-m_rootdir_acl.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 012560701c876c5630d5d8f17c25227b91037d0e Mon Sep 17 00:00:00 2001 -From: zhanchengbin -Date: Wed, 16 Mar 2022 14:56:20 +0800 -Subject: [PATCH] tests: add warning for selinux in m_rootdir_acl - -Signed-off-by: zhanchengbin ---- - tests/m_rootdir_acl/script | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/tests/m_rootdir_acl/script b/tests/m_rootdir_acl/script -index e81c82c..8a52543 100644 ---- a/tests/m_rootdir_acl/script -+++ b/tests/m_rootdir_acl/script -@@ -99,6 +99,10 @@ if [ "$status" = 0 ] ; then - else - echo "$test_name: $test_description: failed" - diff $DIFF_OPTS $EXP $OUT > $test_name.failed -+ selinux=`grep -nRE "^SELINUX=" /etc/selinux/config | awk -F "=" '{print $2}'` -+ if [ $selinux != "disabled" ] ; then -+ echo "m_rootdir_acl: selinux is $selinux, please disable it and try again." -+ fi - fi - - rm -rf $TMPFILE.cmd $MKFS_DIR --- -1.8.3.1 - diff --git a/0012-tests-skip-m_rootdir_acl-if-selinux-is-not-disabled.patch b/0012-tests-skip-m_rootdir_acl-if-selinux-is-not-disabled.patch new file mode 100644 index 0000000..3ab1d0d --- /dev/null +++ b/0012-tests-skip-m_rootdir_acl-if-selinux-is-not-disabled.patch @@ -0,0 +1,30 @@ +From e71489b24a49899ca016068cbe39ad0576c52eb5 Mon Sep 17 00:00:00 2001 +From: zhanchengbin +Date: Thu, 17 Mar 2022 10:53:18 +0800 +Subject: [PATCH] tests: skip m_rootdir_acl if selinux is not disabled + +Signed-off-by: zhanchengbin +--- + tests/m_rootdir_acl/script | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/tests/m_rootdir_acl/script b/tests/m_rootdir_acl/script +index e81c82c..6b78d3d 100644 +--- a/tests/m_rootdir_acl/script ++++ b/tests/m_rootdir_acl/script +@@ -16,6 +16,12 @@ if [ "$os" = "GNU" ]; then + return 0 + fi + ++selinux=`grep -nRE "^SELINUX=" /etc/selinux/config | awk -F "=" '{print $2}'` ++if [ $selinux != "disabled" ]; then ++ echo "$test_name: $test_description: skipped (selinux is not disabled)" ++ return 0 ++fi ++ + MKFS_DIR=$TMPFILE.dir + OUT=$test_name.log + EXP=$test_dir/expect +-- +1.8.3.1 + diff --git a/e2fsprogs.spec b/e2fsprogs.spec index 4a36674..d9245e8 100644 --- a/e2fsprogs.spec +++ b/e2fsprogs.spec @@ -17,7 +17,7 @@ Patch8: 0008-e2fsck-add-env-param-E2FS_UNRELIABLE_IO-to-fi.patch Patch9: 0009-e2mmpstatus.8.in-detele-filesystem-can-be-UUID-or-LA.patch Patch10: 0010-tests-update-expect-file-for-u_direct_io.patch Patch11: 0011-libext2fs-don-t-old-the-CACHE_MTX-while-doing-I-O.patch -Patch12: 0012-tests-add-warning-for-selinux-in-m_rootdir_acl.patch +Patch12: 0012-tests-skip-m_rootdir_acl-if-selinux-is-not-disabled.patch BuildRequires: gcc pkgconfig texinfo @@ -140,8 +140,8 @@ exit 0 %{_mandir}/man8/* %changelog -* Wed Feb 16 2022 zhanchengbin - 1.46.4-7 -- tests: add warning for selinux in m_rootdir_acl +* Thu Feb 17 2022 zhanchengbin - 1.46.4-7 +- tests: skip m_rootdir_acl if selinux is not disabled * Wed Feb 9 2022 zhanchengbin - 1.46.4-6 - libext2fs: don't old the CACHE_MTX while doing I/O -- Gitee