diff --git a/rng-tools.spec b/rng-tools.spec index 7a3dcf2..2f5d2ea 100644 --- a/rng-tools.spec +++ b/rng-tools.spec @@ -1,17 +1,18 @@ - +%global _hardened_build 1 %global _sbindir /sbin Summary: Random number generator related utilities Name: rng-tools Version: 5 -Release: 3%{?dist} +Release: 4%{?dist} Group: System Environment/Base License: GPLv2+ URL: http://sourceforge.net/projects/gkernel/ Source0: http://downloads.sourceforge.net/project/gkernel/rng-tools/4/rng-tools-%{version}.tar.gz Source1: rngd.service +Patch0: rngd-exit-code.patch -BuildRequires: groff gettext +BuildRequires: gettext BuildRequires: systemd-units Requires(post): systemd-units Requires(preun): systemd-units @@ -22,6 +23,7 @@ Hardware random number generation tools. %prep %setup -q +%patch0 -p1 %build %configure @@ -52,6 +54,11 @@ install -m 644 %{SOURCE1} %{buildroot}%{_unitdir} %attr(0644,root,root) %{_unitdir}/rngd.service %changelog +* Wed Dec 10 2014 Zbigniew Jędrzejewski-Szmek - 5-4 +- Build with hardening flags (#1051344) +- Fail nicely if no hardware generator is found (#892178) +- Drop unneeded dependency + * Mon Aug 18 2014 Fedora Release Engineering - 5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild diff --git a/rngd-exit-code.patch b/rngd-exit-code.patch new file mode 100644 index 0000000..2cda08e --- /dev/null +++ b/rngd-exit-code.patch @@ -0,0 +1,12 @@ +diff -up rng-tools-5/rngd.c.rfail rng-tools-5/rngd.c +--- rng-tools-5/rngd.c.rfail 2014-12-10 09:18:25.333873892 +0100 ++++ rng-tools-5/rngd.c 2014-12-10 09:19:06.096070334 +0100 +@@ -319,7 +319,7 @@ int main(int argc, char **argv) + message(LOG_DAEMON|LOG_ERR, + "Maybe RNG device modules are not loaded\n"); + } +- return 1; ++ return 66; + } + + if (arguments->verbose) { diff --git a/rngd.service b/rngd.service index 3d9dcb5..33829f6 100644 --- a/rngd.service +++ b/rngd.service @@ -3,6 +3,7 @@ Description=Hardware RNG Entropy Gatherer Daemon [Service] ExecStart=/sbin/rngd -f +SuccessExitStatus=66 [Install] WantedBy=multi-user.target