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 0000000000000000000000000000000000000000..ecfffe4834ae707bdf451c159fb5fb673253bafe --- /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 dc50bf925b4853325cb831d7de0124c466821275..204bcfb4b2833424a4f1d50fec5bc27001123a91 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