From 3c54a69a00835c38cc66d5059262e7a489341002 Mon Sep 17 00:00:00 2001 From: Björn Esser Date: Sep 26 2020 22:46:48 +0000 Subject: Make shell wrapper exit with the exit code of fipscheck on failure --- diff --git a/AusweisApp2.spec b/AusweisApp2.spec index a3af0ba..a6df3b2 100644 --- a/AusweisApp2.spec +++ b/AusweisApp2.spec @@ -27,7 +27,7 @@ fipshmac %{buildroot}%{_bindir}/%{name} \\\ Name: AusweisApp2 Version: 1.20.2 -Release: 7%{?dist} +Release: 8%{?dist} Summary: %{pkg_sum} # Init forge packaging helpers. @@ -146,12 +146,14 @@ install -pm 0644 %{SOURCE1} LICENSE.en.txt # Create the shell wrapper. cat << EOF > fedora_%{name}_wrapper.sh #!/bin/sh -/usr/bin/fipscheck %{_bindir}/%{name} \\ - %{_datadir}/%{name}/config.json \\ - %{_datadir}/%{name}/openssl.cnf \\ - %{_libexecdir}/%{name} || exit 1 -OPENSSL_CONF=%{_datadir}/%{name}/openssl.cnf \\ -%{_libexecdir}/%{name} "\$@" +/usr/bin/fipscheck \\ + %{_bindir}/%{name} \\ + %{_libexecdir}/%{name} \\ + %{_datadir}/%{name}/config.json \\ + %{_datadir}/%{name}/openssl.cnf \\ +|| exit \$?; +OPENSSL_CONF=%{_datadir}/%{name}/openssl.cnf \\ +%{_libexecdir}/%{name} "\$@"; EOF @@ -265,6 +267,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %changelog +* Sat Sep 26 2020 Björn Esser - 1.20.2-8 +- Make shell wrapper exit with the exit code of fipscheck on failure + * Sat Sep 26 2020 Björn Esser - 1.20.2-7 - Calculate fipshmac for config files and shell wrapper - Run fipscheck in shell wrapper before application starts