From e8e279ff6baeadd331d425c248dc9e3fc24ba409c51035569ef4c6ff31db8a90 Mon Sep 17 00:00:00 2001 From: Johannes Segitz Date: Thu, 4 Jun 2020 10:54:18 +0000 Subject: [PATCH] Accepting request 811357 from home:dimstar:Factory - Drop suse_path.patch: replace it with a grep/sed logic replacing /usr/libexec in all files with the correct value for all distros (taking into account that openSUSE is in progress of migrating from /usr/lib to /usr/libexec). By using %{_libexecdir} we don't have to worry anymore what the real value is: the spec file will set the righe value no matter what. OBS-URL: https://build.opensuse.org/request/show/811357 OBS-URL: https://build.opensuse.org/package/show/security:SELinux/libsemanage?expand=0&rev=80 --- libsemanage.changes | 10 +++++++++- libsemanage.spec | 6 ++---- python-semanage.changes | 8 ++++++++ python-semanage.spec | 6 ++---- suse_path.patch | 26 -------------------------- 5 files changed, 21 insertions(+), 35 deletions(-) delete mode 100644 suse_path.patch diff --git a/libsemanage.changes b/libsemanage.changes index 11f8e29..fdc8608 100644 --- a/libsemanage.changes +++ b/libsemanage.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Jun 4 09:57:51 UTC 2020 - Dominique Leuenberger + +- Drop suse_path.patch: replace it with a grep/sed logic replacing + /usr/libexec in all files with the correct value for all distros + (taking into account that openSUSE is in progress of migrating + from /usr/lib to /usr/libexec). + ------------------------------------------------------------------- Fri May 29 12:51:17 UTC 2020 - Johannes Segitz @@ -17,7 +25,7 @@ Tue Mar 3 12:23:51 UTC 2020 - Johannes Segitz ------------------------------------------------------------------- Thu Jun 20 10:22:04 UTC 2019 - Martin Liška -- Disable LTO due to symbol versioning (boo#1138812). +- Disable LTO due to symbol versioning (boo#1138812). ------------------------------------------------------------------- Wed Mar 20 15:10:21 UTC 2019 - jsegitz@suse.com diff --git a/libsemanage.spec b/libsemanage.spec index a8da903..eabc72b 100644 --- a/libsemanage.spec +++ b/libsemanage.spec @@ -26,7 +26,6 @@ URL: https://github.com/SELinuxProject/selinux/wiki/Releases Source: https://github.com/SELinuxProject/selinux/releases/download/20191204/%{name}-%{version}.tar.gz Source1: baselibs.conf Source2: semanage.conf -Patch0: suse_path.patch BuildRequires: audit-devel BuildRequires: bison BuildRequires: fdupes @@ -91,9 +90,8 @@ stores must be migrated before any commands that modify or use the store %prep %setup -q -%if 0%{?suse_version} < 1550 -%patch0 -%endif +# Replace /usr/libexec with whatever the distro defines as libexecdir - across all files +grep /usr/libexec . -rl | xargs sed -i "s|/usr/libexec|%{_libexecdir}|g" %build %define _lto_cflags %{nil} diff --git a/python-semanage.changes b/python-semanage.changes index 06fc867..ab70035 100644 --- a/python-semanage.changes +++ b/python-semanage.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Jun 4 09:57:51 UTC 2020 - Dominique Leuenberger + +- Drop suse_path.patch: replace it with a grep/sed logic replacing + /usr/libexec in all files with the correct value for all distros + (taking into account that openSUSE is in progress of migrating + from /usr/lib to /usr/libexec). + ------------------------------------------------------------------- Fri May 29 12:51:17 UTC 2020 - Johannes Segitz diff --git a/python-semanage.spec b/python-semanage.spec index 7f43e60..3f540f8 100644 --- a/python-semanage.spec +++ b/python-semanage.spec @@ -26,7 +26,6 @@ Group: Development/Languages/Python URL: https://github.com/SELinuxProject/selinux Source: https://github.com/SELinuxProject/selinux/releases/download/20191204/libsemanage-%{version}.tar.gz Source1: baselibs.conf -Patch0: suse_path.patch BuildRequires: %{python_module devel} BuildRequires: audit-devel BuildRequires: bison @@ -47,9 +46,8 @@ SELinux policy management applications. %prep %setup -q -n libsemanage-%{version} -%if 0%{?suse_version} < 1550 -%patch0 -%endif +# Replace /usr/libexec with whatever the distro defines as libexecdir - across all files +grep /usr/libexec . -rl | xargs sed -i "s|/usr/libexec|%{_libexecdir}|g" %build %define _lto_cflags %{nil} diff --git a/suse_path.patch b/suse_path.patch deleted file mode 100644 index ca6704d..0000000 --- a/suse_path.patch +++ /dev/null @@ -1,26 +0,0 @@ -Index: man/man5/semanage.conf.5 -=================================================================== ---- man/man5/semanage.conf.5.orig -+++ man/man5/semanage.conf.5 -@@ -37,7 +37,7 @@ Specify an alternative store_root path t - - .TP - .B compiler-directory --Specify an alternative directory that contains HLL to CIL compilers. The default value is "/usr/libexec/selinux/hll". -+Specify an alternative directory that contains HLL to CIL compilers. The default value is "/usr/lib/selinux/hll". - - .TP - .B ignore-module-cache -Index: src/conf-parse.y -=================================================================== ---- src/conf-parse.y.orig -+++ src/conf-parse.y -@@ -353,7 +353,7 @@ static int semanage_conf_init(semanage_c - conf->store_path = strdup(basename(selinux_policy_root())); - conf->ignoredirs = NULL; - conf->store_root_path = strdup("/var/lib/selinux"); -- conf->compiler_directory_path = strdup("/usr/libexec/selinux/hll"); -+ conf->compiler_directory_path = strdup("/usr/lib/selinux/hll"); - conf->policyvers = sepol_policy_kern_vers_max(); - conf->target_platform = SEPOL_TARGET_SELINUX; - conf->expand_check = 1;