From 0a00e641debe00c1ba8678962d6a1aeddfc0ae64 Mon Sep 17 00:00:00 2001 From: yueyuankun Date: Mon, 16 Oct 2023 15:26:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8SELINUX=5FFLAG=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E5=89=8D=EF=BC=8C=E9=9C=80=E8=A6=81=E5=AF=B9SELINUX?= =?UTF-8?q?=5FFLAG=E5=8F=98=E9=87=8F=E8=BF=9B=E8=A1=8C=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tore.sh-check-if-SELINUX_FLAG-is-set.patch | 25 +++++++++++++++++++ oemaker.spec | 9 ++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 0005-fix-env_restore.sh-check-if-SELINUX_FLAG-is-set.patch diff --git a/0005-fix-env_restore.sh-check-if-SELINUX_FLAG-is-set.patch b/0005-fix-env_restore.sh-check-if-SELINUX_FLAG-is-set.patch new file mode 100644 index 0000000..ecfffe4 --- /dev/null +++ b/0005-fix-env_restore.sh-check-if-SELINUX_FLAG-is-set.patch @@ -0,0 +1,25 @@ +From e188e3f0679fb417c40ef94b36ce8c92ae60610b Mon Sep 17 00:00:00 2001 +From: yueyuankun +Date: Thu, 31 Aug 2023 11:38:57 +0800 +Subject: [PATCH] fix(env_restore.sh): check if SELINUX_FLAG is set + +--- + isomaker/env_restore.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/isomaker/env_restore.sh b/isomaker/env_restore.sh +index 15f6311..d9bccb1 100644 +--- a/isomaker/env_restore.sh ++++ b/isomaker/env_restore.sh +@@ -20,7 +20,7 @@ function env_restore() + { + # 使用环境变量执行恢复 + source /etc/profile >> /dev/null +- if [ "$SELINUX_FLAG" -eq 0 ] || [ "$SELINUX_FLAG" -eq 1 ]; then ++ if [ -n "$SELINUX_FLAG" ] && ([ "$SELINUX_FLAG" -eq 0 ] || [ "$SELINUX_FLAG" -eq 1 ]); then + setenforce "${SELINUX_FLAG}" + else + echo "/etc/profile have no value: SELINUX_FLAG" +-- +2.33.0 + diff --git a/oemaker.spec b/oemaker.spec index dc50bf9..204bcfb 100644 --- a/oemaker.spec +++ b/oemaker.spec @@ -11,7 +11,7 @@ Summary: a building tool for DVD ISO making and ISO cutting License: Mulan PSL v2 Group: System/Management Version: 3.0.2 -Release: 7 +Release: 8 BuildRoot: %{_tmppath}/%{name} Source: https://gitee.com/openeuler/oemaker/repository/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz @@ -29,6 +29,7 @@ Patch0001: 0001-change-rescue-parameter-with-new-anaconda.patch Patch0002: 0002-enable-eject-in-install.img.patch Patch0003: 0003-add-fpi_to_tail-off-for-x86-legacy.patch Patch0004: 0004-repo-source-traversal-bugfix.patch +Patch0005: 0005-fix-env_restore.sh-check-if-SELINUX_FLAG-is-set.patch %description a building tool for DVD ISO making and ISO cutting @@ -159,6 +160,12 @@ rm -rf %{buildroot} rm -rf $RPM_BUILD_DIR/%{name} %changelog +* Mon Oct 16 2023 yueyuankun - 3.0.2-8 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: fix(env_restore.sh): check if SELINUX_FLAG is set + * Mon Aug 21 2023 xiangyuning - 3.0.2-7 - Type:bugfix - ID:NA -- Gitee