Browse Source

rng-utils: version 6.6 is now available

Work around automake demanding README with a symlink.
Add new dependency on libsysfs.
Avoid dependency on libxml, curl, openssl by disabling NIST beacon support.
  We also continue to remove gcrypt, and jitterentropy is not packaged.
Remove patch that no longer cleanly applies.
  If newlines in log messages are a problem, we should take it up with
  upstream.

Signed-off-by: Nathaniel Wesley Filardo <nwfilardo@gmail.com>

Fixes: github #7303
lilik-openwrt-22.03
Nathaniel Wesley Filardo 6 years ago
parent
commit
fd26981a03
2 changed files with 16 additions and 144 deletions
  1. +16
    -7
      utils/rng-tools/Makefile
  2. +0
    -137
      utils/rng-tools/patches/100-message-no-newline.patch

+ 16
- 7
utils/rng-tools/Makefile View File

@ -8,12 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=rng-tools
PKG_VERSION:=5
PKG_RELEASE:=6
PKG_VERSION:=6.6
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/gkernel/rng-tools/$(PKG_VERSION)/
PKG_HASH:=60a102b6603bbcce2da341470cad42eeaa9564a16b4490e7867026ca11a3078e
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/nhorman/rng-tools.git
PKG_SOURCE_VERSION:=4ebc21d6f387bb7b4b3f6badc429e27b21c0a6ee
PKG_MIRROR_HASH:=d942283b7482337d40a4933f7b24a5d1361518dacf9c87928f5ea06d492e95b0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
PKG_LICENSE:=GPLv2
PKG_MAINTAINER:=Nathaniel Wesley Filardo <nwfilardo@gmail.com>
@ -27,7 +29,8 @@ define Package/rng-tools
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Daemon for adding entropy to kernel entropy pool
URL:=http://sourceforge.net/projects/gkernel/
URL:=https://github.com/nhorman/rng-tools
DEPENDS:=+libsysfs
endef
define Package/rng-tools/description
@ -47,7 +50,13 @@ CONFIGURE_VARS += \
endif
CONFIGURE_ARGS += \
--without-libgcrypt
--without-libgcrypt \
--without-nistbeacon
define Build/Prepare
$(call Build/Prepare/Default)
(cd $(PKG_BUILD_DIR); ln -s README.md README)
endef
define Package/rng-tools/install
$(INSTALL_DIR) $(1)/etc/init.d


+ 0
- 137
utils/rng-tools/patches/100-message-no-newline.patch View File

@ -1,137 +0,0 @@
From d401b23149a89fc14806dc8c347f2a85205a95cd Mon Sep 17 00:00:00 2001
From: Philip Prindeville <philipp@redfish-solutions.com>
Date: Mon, 26 Jun 2017 18:34:04 -0600
Subject: [PATCH v1 1/1] Cleanup calls to message() containing newlines
To: Philipp Rumpf <prumpf@mandrakesoft.com>, Jeff Garzik <jgarzik@pobox.com>, Henrique de Moraes Holschuh <hmh@debian.org>, Andrew Morton <akpm@linux-foundation.org>
Cc: Philip Prindeville <philipp@redfish-solutions.com>
Newlines are added automatically by logging daemons, and having
embedded newlines can cause extra blank lines in syslog-ng,
busybox, etc.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
---
rngd.c | 8 ++++----
rngd_entsource.c | 6 +++---
rngd_linux.c | 2 +-
rngd_rdrand.c | 6 +++---
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/rngd.c b/rngd.c
index 0205d40e0abb970fb126460306398388bd7462a0..f10198682a14f2f1460100a1d274ad0d724cb326 100644
--- a/rngd.c
+++ b/rngd.c
@@ -271,7 +271,7 @@ static void do_loop(int random_step)
} else if (iter->failures >= MAX_RNG_FAILURES) {
if (!arguments->quiet)
message(LOG_DAEMON|LOG_ERR,
- "too many FIPS failures, disabling entropy source\n");
+ "too many FIPS failures, disabling entropy source");
iter->disabled = true;
}
}
@@ -282,7 +282,7 @@ static void do_loop(int random_step)
if (!arguments->quiet)
message(LOG_DAEMON|LOG_ERR,
- "No entropy sources working, exiting rngd\n");
+ "No entropy sources working, exiting rngd");
}
static void term_signal(int signo)
@@ -317,7 +317,7 @@ int main(int argc, char **argv)
message(LOG_DAEMON|LOG_ERR,
"can't open any entropy source");
message(LOG_DAEMON|LOG_ERR,
- "Maybe RNG device modules are not loaded\n");
+ "Maybe RNG device modules are not loaded");
}
return 1;
}
@@ -337,7 +337,7 @@ int main(int argc, char **argv)
&& (rc_tpm || !arguments->enable_tpm)) {
if (!arguments->quiet)
message(LOG_DAEMON|LOG_ERR,
- "No entropy source available, shutting down\n");
+ "No entropy source available, shutting down");
return 1;
}
diff --git a/rngd_entsource.c b/rngd_entsource.c
index f0e219d7af674204e5bdcf96e9045c40717872c3..8c1d7cb33159c9a0e03a4ea83f3a3358c706e2e3 100644
--- a/rngd_entsource.c
+++ b/rngd_entsource.c
@@ -64,7 +64,7 @@ int xread(void *buf, size_t size, struct rng *ent_src)
}
if (size) {
- message(LOG_DAEMON|LOG_ERR, "read error\n");
+ message(LOG_DAEMON|LOG_ERR, "read error");
return -1;
}
return 0;
@@ -114,7 +114,7 @@ int xread_tpm(void *buf, size_t size, struct rng *ent_src)
sizeof(rng_cmd) - r);
if (retval < 0) {
message(LOG_ERR|LOG_INFO,
- "Error writing %s\n",
+ "Error writing %s",
ent_src->rng_name);
retval = -1;
goto error_out;
@@ -123,7 +123,7 @@ int xread_tpm(void *buf, size_t size, struct rng *ent_src)
}
if (r < sizeof(rng_cmd)) {
message(LOG_ERR|LOG_INFO,
- "Error writing %s\n", ent_src->rng_name);
+ "Error writing %s", ent_src->rng_name);
retval = -1;
goto error_out;
}
diff --git a/rngd_linux.c b/rngd_linux.c
index c4f45dedecad0fd3bf80a35d7c240b917bf5ffdd..481c6bb15def3f06989766988b61f35d91207b58 100644
--- a/rngd_linux.c
+++ b/rngd_linux.c
@@ -131,7 +131,7 @@ void random_add_entropy(void *buf, size_t size)
memcpy(entropy.data, buf, size);
if (ioctl(random_fd, RNDADDENTROPY, &entropy) != 0) {
- message(LOG_DAEMON|LOG_ERR, "RNDADDENTROPY failed: %s\n",
+ message(LOG_DAEMON|LOG_ERR, "RNDADDENTROPY failed: %s",
strerror(errno));
exit(1);
}
diff --git a/rngd_rdrand.c b/rngd_rdrand.c
index 4d7a5a7b3f52c3af8e677d3c4d758d4d235f1dd6..c1919d538428a8647dbce88d7d76384761e5b6cc 100644
--- a/rngd_rdrand.c
+++ b/rngd_rdrand.c
@@ -162,7 +162,7 @@ static inline int gcrypt_mangle(unsigned char *tmp)
if (gcry_error) {
message(LOG_DAEMON|LOG_ERR,
- "gcry_cipher_encrypt error: %s\n",
+ "gcry_cipher_encrypt error: %s",
gcry_strerror(gcry_error));
return -1;
}
@@ -257,7 +257,7 @@ static int init_gcrypt(const void *key)
if (!gcry_check_version(MIN_GCRYPT_VERSION)) {
message(LOG_DAEMON|LOG_ERR,
- "libgcrypt version mismatch: have %s, require >= %s\n",
+ "libgcrypt version mismatch: have %s, require >= %s",
gcry_check_version(NULL), MIN_GCRYPT_VERSION);
return 1;
}
@@ -278,7 +278,7 @@ static int init_gcrypt(const void *key)
if (gcry_error) {
message(LOG_DAEMON|LOG_ERR,
- "could not set key or IV: %s\n",
+ "could not set key or IV: %s",
gcry_strerror(gcry_error));
gcry_cipher_close(gcry_cipher_hd);
return 1;
--
2.7.4

Loading…
Cancel
Save