From fca1a2040ba5a6eb5c9bb92522682172989f21f9c7f87bbb3cdad62f4a4ab9e3 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Fri, 28 Jan 2022 13:58:29 +0000 Subject: [PATCH] Accepting request 949314 from home:rfrohl:branches:security update openscap to 1.3.6: put oscap-remediate into libexec at least on opensuse (bin is actually the wrost folder as it is not supposed to be called directly:/ ) OBS-URL: https://build.opensuse.org/request/show/949314 OBS-URL: https://build.opensuse.org/package/show/security/openscap?expand=0&rev=271 --- openscap.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/openscap.spec b/openscap.spec index 8d6fad1..1db193d 100644 --- a/openscap.spec +++ b/openscap.spec @@ -41,7 +41,9 @@ Source6: oscap-scan.sh Patch1: openscap-opensuse-cpe.patch Patch2: openscap-suse-cpe.patch Patch3: openscap-docker-add-suse.patch +%if 0%{?suse_version} != 1599 Patch4: oscap-remediate.service.in.patch +%endif BuildRequires: asciidoc # Use package name cause of "have choice for perl(XML::Parser): brp-check-suse perl-XML-Parser" BuildRequires: cmake @@ -223,12 +225,16 @@ mv %{buildroot}%{_sysconfdir}/bash_completion.d/* %{buildroot}%{_datadir}/bash-c ln -s %{_datadir}/openscap/scap-yast2sec-oval.xml %{buildroot}/%{_datadir}/openscap/scap-oval.xml ln -s %{_datadir}/openscap/scap-yast2sec-xccdf.xml %{buildroot}/%{_datadir}/openscap/scap-xccdf.xml -%if 0%{?sle_version} > 150200 || 0%{?suse_version} == 1599 +# oscap-remediate should be in /usr/libexec but this is not well supported in +# older versions of the distro +%if 0%{?suse_version} != 1599 +%if 0%{?sle_version} > 150200 mv %{buildroot}/%{_libexecdir}/oscap-remediate %{buildroot}/%{_bindir} %else # in older versions _libexecdir expands to /usr/lib, which does not help mv %{buildroot}/%{_prefix}/libexec/oscap-remediate %{buildroot}/%{_bindir} %endif +%endif %post -n libopenscap%{sover} -p /sbin/ldconfig %postun -n libopenscap%{sover} -p /sbin/ldconfig @@ -300,7 +306,11 @@ mv %{buildroot}/%{_prefix}/libexec/oscap-remediate %{buildroot}/%{_bindir} %{_datadir}/bash-completion/completions/* %{_bindir}/oscap-remediate-offline %{_prefix}/lib/systemd/system/oscap-remediate.service +%if 0%{?suse_version} != 1599 %{_bindir}/oscap-remediate +%else +%{_libexecdir}/oscap-remediate +%endif %files content %{_datadir}/openscap/scap*.xml