[arch-commits] Commit in rng-tools/repos/community-x86_64 (8 files)

Massimiliano Torromeo mtorromeo at gemini.archlinux.org
Mon Jul 19 08:29:50 UTC 2021


    Date: Monday, July 19, 2021 @ 08:29:50
  Author: mtorromeo
Revision: 978597

archrelease: copy trunk to community-x86_64

Added:
  rng-tools/repos/community-x86_64/PKGBUILD
    (from rev 978596, rng-tools/trunk/PKGBUILD)
  rng-tools/repos/community-x86_64/rngd-test-signal-in-loop.patch
    (from rev 978596, rng-tools/trunk/rngd-test-signal-in-loop.patch)
  rng-tools/repos/community-x86_64/rngd.conf
    (from rev 978596, rng-tools/trunk/rngd.conf)
  rng-tools/repos/community-x86_64/rngd.service
    (from rev 978596, rng-tools/trunk/rngd.service)
Deleted:
  rng-tools/repos/community-x86_64/PKGBUILD
  rng-tools/repos/community-x86_64/rngd-test-signal-in-loop.patch
  rng-tools/repos/community-x86_64/rngd.conf
  rng-tools/repos/community-x86_64/rngd.service

--------------------------------+
 PKGBUILD                       |   86 +++++++++++++++++++--------------------
 rngd-test-signal-in-loop.patch |   72 ++++++++++++++++----------------
 rngd.conf                      |    2 
 rngd.service                   |   34 ++++++++-------
 4 files changed, 98 insertions(+), 96 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-07-19 08:29:34 UTC (rev 978596)
+++ PKGBUILD	2021-07-19 08:29:50 UTC (rev 978597)
@@ -1,43 +0,0 @@
-# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
-# Contributor: Alasdair Haswell <ali at arhaswell dot co dot uk>
-
-pkgname=rng-tools
-pkgver=6.13
-pkgrel=1
-pkgdesc="Random number generator related utilities"
-arch=('x86_64')
-url="https://github.com/nhorman/rng-tools"
-license=('GPL')
-depends=('curl' 'libxml2' 'sysfsutils' 'jitterentropy' 'libp11' 'jansson' 'rtl-sdr')
-optdepends=('opensc: PKCS11 entropy engine')
-backup=(etc/conf.d/rngd)
-source=(https://github.com/nhorman/rng-tools/archive/v$pkgver/$pkgname-$pkgver.tar.gz
-        rngd.conf
-        rngd.service)
-sha256sums=('8caabebcb8024a4d4a3d35637a18996553994d4546cb50ce55de83cf33d2f916'
-            'f4fd197dd682cdab07ddeabe8d3b73b1bc2e1cf322237be238a26b49a7dcb047'
-            '005c039f853596459230395c397599aa9647cfc8fec1d10bf39f5d5b2c2840e1')
-
-prepare() {
-	cd "$srcdir"/$pkgname-$pkgver
-	mv README{.md,}
-
-	libtoolize --force
-	aclocal
-	autoheader
-	automake --force-missing --add-missing
-	autoconf
-}
-
-build() {
-	cd "$srcdir"/$pkgname-$pkgver
-	./configure --prefix=/usr --sbindir=/usr/bin
-	make
-}
-
-package() {
-	cd "$srcdir"/$pkgname-$pkgver
-	make DESTDIR="$pkgdir" install
-	install -Dm0644 "$srcdir"/rngd.service "$pkgdir"/usr/lib/systemd/system/rngd.service
-	install -Dm0644 "$srcdir"/rngd.conf "$pkgdir"/etc/conf.d/rngd
-}

Copied: rng-tools/repos/community-x86_64/PKGBUILD (from rev 978596, rng-tools/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-07-19 08:29:50 UTC (rev 978597)
@@ -0,0 +1,43 @@
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+# Contributor: Alasdair Haswell <ali at arhaswell dot co dot uk>
+
+pkgname=rng-tools
+pkgver=6.13
+pkgrel=2
+pkgdesc="Random number generator related utilities"
+arch=('x86_64')
+url="https://github.com/nhorman/rng-tools"
+license=('GPL')
+depends=('curl' 'libxml2' 'sysfsutils' 'jitterentropy' 'libp11' 'jansson' 'rtl-sdr')
+optdepends=('opensc: PKCS11 entropy engine to gather entropy from smart card readers')
+backup=(etc/conf.d/rngd)
+source=(https://github.com/nhorman/rng-tools/archive/v$pkgver/$pkgname-$pkgver.tar.gz
+        rngd.conf
+        rngd.service)
+sha256sums=('8caabebcb8024a4d4a3d35637a18996553994d4546cb50ce55de83cf33d2f916'
+            'f4fd197dd682cdab07ddeabe8d3b73b1bc2e1cf322237be238a26b49a7dcb047'
+            '733733457a2470da0d09a5a4e6d98fb0a773d3acf0722d16258caa2997a3fd4b')
+
+prepare() {
+	cd "$srcdir"/$pkgname-$pkgver
+	mv README{.md,}
+
+	libtoolize --force
+	aclocal
+	autoheader
+	automake --force-missing --add-missing
+	autoconf
+}
+
+build() {
+	cd "$srcdir"/$pkgname-$pkgver
+	./configure --prefix=/usr --sbindir=/usr/bin
+	make
+}
+
+package() {
+	cd "$srcdir"/$pkgname-$pkgver
+	make DESTDIR="$pkgdir" install
+	install -Dm0644 "$srcdir"/rngd.service "$pkgdir"/usr/lib/systemd/system/rngd.service
+	install -Dm0644 "$srcdir"/rngd.conf "$pkgdir"/etc/conf.d/rngd
+}

Deleted: rngd-test-signal-in-loop.patch
===================================================================
--- rngd-test-signal-in-loop.patch	2021-07-19 08:29:34 UTC (rev 978596)
+++ rngd-test-signal-in-loop.patch	2021-07-19 08:29:50 UTC (rev 978597)
@@ -1,36 +0,0 @@
-From: Leonardo Chiquitto <leonardo at ngdn.org>
-Subject: Check for signals in update_kernel_random()
-
-When running as a daemon, a signal handler is installed to catch
-SIGINT/SIGTERM. This handler sets a flag that's tested in the main
-loop. However, rngd loops in update_kernel_random() as well, where
-the flag was not tested.
-
-This patch adds the check to update_kernel_random() so that the
-daemon exits properly after receiving a SIGINT/SIGTERM signal.
-
-Index: rng-tools-5/rngd.c
-===================================================================
---- rng-tools-5.orig/rngd.c
-+++ rng-tools-5/rngd.c
-@@ -218,6 +218,8 @@ static int update_kernel_random(int rand
- 
- 	for (p = buf; p + random_step <= &buf[FIPS_RNG_BUFFER_SIZE];
- 		 p += random_step) {
-+		if (!server_running)
-+			return 0;
- 		random_add_entropy(p, random_step);
- 		random_sleep();
- 	}
-@@ -239,10 +241,10 @@ static void do_loop(int random_step)
- 		{
- 			int rc;
- 
-+		retry_same:
- 			if (!server_running)
- 				return;
- 
--		retry_same:
- 			if (iter->disabled)
- 				continue;	/* failed, no work */
- 

Copied: rng-tools/repos/community-x86_64/rngd-test-signal-in-loop.patch (from rev 978596, rng-tools/trunk/rngd-test-signal-in-loop.patch)
===================================================================
--- rngd-test-signal-in-loop.patch	                        (rev 0)
+++ rngd-test-signal-in-loop.patch	2021-07-19 08:29:50 UTC (rev 978597)
@@ -0,0 +1,36 @@
+From: Leonardo Chiquitto <leonardo at ngdn.org>
+Subject: Check for signals in update_kernel_random()
+
+When running as a daemon, a signal handler is installed to catch
+SIGINT/SIGTERM. This handler sets a flag that's tested in the main
+loop. However, rngd loops in update_kernel_random() as well, where
+the flag was not tested.
+
+This patch adds the check to update_kernel_random() so that the
+daemon exits properly after receiving a SIGINT/SIGTERM signal.
+
+Index: rng-tools-5/rngd.c
+===================================================================
+--- rng-tools-5.orig/rngd.c
++++ rng-tools-5/rngd.c
+@@ -218,6 +218,8 @@ static int update_kernel_random(int rand
+ 
+ 	for (p = buf; p + random_step <= &buf[FIPS_RNG_BUFFER_SIZE];
+ 		 p += random_step) {
++		if (!server_running)
++			return 0;
+ 		random_add_entropy(p, random_step);
+ 		random_sleep();
+ 	}
+@@ -239,10 +241,10 @@ static void do_loop(int random_step)
+ 		{
+ 			int rc;
+ 
++		retry_same:
+ 			if (!server_running)
+ 				return;
+ 
+-		retry_same:
+ 			if (iter->disabled)
+ 				continue;	/* failed, no work */
+ 

Deleted: rngd.conf
===================================================================
--- rngd.conf	2021-07-19 08:29:34 UTC (rev 978596)
+++ rngd.conf	2021-07-19 08:29:50 UTC (rev 978597)
@@ -1 +0,0 @@
-RNGD_OPTS=""

Copied: rng-tools/repos/community-x86_64/rngd.conf (from rev 978596, rng-tools/trunk/rngd.conf)
===================================================================
--- rngd.conf	                        (rev 0)
+++ rngd.conf	2021-07-19 08:29:50 UTC (rev 978597)
@@ -0,0 +1 @@
+RNGD_OPTS=""

Deleted: rngd.service
===================================================================
--- rngd.service	2021-07-19 08:29:34 UTC (rev 978596)
+++ rngd.service	2021-07-19 08:29:50 UTC (rev 978597)
@@ -1,16 +0,0 @@
-[Unit]
-Description=Hardware RNG Entropy Gatherer Daemon
-DefaultDependencies=no
-Before=sysinit.target shutdown.target
-
-[Service]
-EnvironmentFile=/etc/conf.d/rngd
-ExecStart=/usr/bin/rngd -f $RNGD_OPTS
-NoNewPrivileges=on
-PrivateNetwork=on
-PrivateTmp=on
-ProtectSystem=full
-ProtectHome=on
-
-[Install]
-WantedBy=sysinit.target

Copied: rng-tools/repos/community-x86_64/rngd.service (from rev 978596, rng-tools/trunk/rngd.service)
===================================================================
--- rngd.service	                        (rev 0)
+++ rngd.service	2021-07-19 08:29:50 UTC (rev 978597)
@@ -0,0 +1,18 @@
+[Unit]
+Description=Hardware RNG Entropy Gatherer Daemon
+DefaultDependencies=no
+Conflicts=shutdown.target
+Before=sysinit.target shutdown.target
+ConditionVirtualization=!container
+
+[Service]
+EnvironmentFile=/etc/conf.d/rngd
+ExecStart=/usr/bin/rngd -f $RNGD_OPTS
+NoNewPrivileges=on
+PrivateNetwork=on
+PrivateTmp=on
+ProtectSystem=full
+ProtectHome=on
+
+[Install]
+WantedBy=sysinit.target




More information about the arch-commits mailing list