From patchwork Mon Oct 21 21:38:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 1180888 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=rockwellcollins.com Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46xqlP6nrLz9sP3 for ; Tue, 22 Oct 2019 08:38:57 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 348A6226DB; Mon, 21 Oct 2019 21:38:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yGJTPAHpuhiX; Mon, 21 Oct 2019 21:38:48 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 4519422654; Mon, 21 Oct 2019 21:38:48 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 75CDE1BF32C for ; Mon, 21 Oct 2019 21:38:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 6408887ED9 for ; Mon, 21 Oct 2019 21:38:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Smd5kRyycpu6 for ; Mon, 21 Oct 2019 21:38:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ch3vs03.rockwellcollins.com (ch3vs03.rockwellcollins.com [205.175.226.47]) by hemlock.osuosl.org (Postfix) with ESMTPS id 4DB4D87EC5 for ; Mon, 21 Oct 2019 21:38:41 +0000 (UTC) IronPort-SDR: Y3Enw8OnhExuFgBFe2yyvSCMcy7jq4CF9HNo4PNyR4mMxBSk9F/eqz4IDrVGeC9jfQu7Taj1bf zBizLhe4IVWw2Y4JKzddrPu3hg/nDFcKfvFrTONaLG4qNTlVak0ysS8v9Kpx+uwmJLoS5RLt4S B3ikkGX41/bQlXu/aMMBdk3IawOXh8gVaNiLqAzTVRR4USwFUDfBRYDTgDKkQNQ/M3OT+2yUB3 EICwuVHeGi2+7Yu5VJHzpFxggtNb30Xrlxy7MIMPuv22Jr0yZ8O6xJEsYebfyGaywswdc2aSTG nTA= Received: from ofwch3n02.rockwellcollins.com (HELO crulimr01.rockwellcollins.com) ([205.175.226.14]) by ch3vs03.rockwellcollins.com with ESMTP; 21 Oct 2019 16:38:41 -0500 X-Received: from biscuits.rockwellcollins.lab (biscuits.rockwellcollins.lab [10.148.119.137]) by crulimr01.rockwellcollins.com (Postfix) with ESMTP id 655AD60335; Mon, 21 Oct 2019 16:38:40 -0500 (CDT) From: Matt Weber To: buildroot@buildroot.org Date: Mon, 21 Oct 2019 16:38:39 -0500 Message-Id: <20191021213839.46139-2-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191021213839.46139-1-matthew.weber@rockwellcollins.com> References: <20191021213839.46139-1-matthew.weber@rockwellcollins.com> Subject: [Buildroot] [PATCH v4 2/2] package/rng-tools: bump to 6.7 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabrice Fontaine MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" * Switch to new site and add license file hash * Add new libsysfs dependency for rng available check * Remove patch adding special return code when no RNG module is available. This has been replaced by using the jitter library to always have a source (new jitterentropy dependency) * Change to a autotools build and add patch to allow README file to not be found during autoreconfig Cc: Fabrice Fontaine Signed-off-by: Matthew Weber Tested-by: Romain Naour --- Changes v4 - None v2 -> v3 [Thomas P - Add patch to set AM_INIT_AUTOMAKE to foreign to prevent missing README file from breaking the reconfigure. Thanks Fabrice for already starting the upstream up this. v1 -> v2 [Thomas P - Added host automake/autotools dependencies and checked for no libtool dependency. [Baruch - Removed cut paste error in comment for autoreconf --- .../0001-configure.ac-fix-autoreconf.patch | 34 +++++++++++++++++++ package/rng-tools/0001-rngd-exit-code.patch | 22 ------------ package/rng-tools/Config.in | 2 ++ package/rng-tools/rng-tools.hash | 6 ++-- package/rng-tools/rng-tools.mk | 12 +++++-- package/rng-tools/rngd.service | 1 - 6 files changed, 49 insertions(+), 28 deletions(-) create mode 100644 package/rng-tools/0001-configure.ac-fix-autoreconf.patch delete mode 100644 package/rng-tools/0001-rngd-exit-code.patch diff --git a/package/rng-tools/0001-configure.ac-fix-autoreconf.patch b/package/rng-tools/0001-configure.ac-fix-autoreconf.patch new file mode 100644 index 0000000000..567a7a2891 --- /dev/null +++ b/package/rng-tools/0001-configure.ac-fix-autoreconf.patch @@ -0,0 +1,34 @@ +From 1af1b4aab717a58da1dff8888c36c741b0f6ac03 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Fri, 5 Apr 2019 19:22:22 +0200 +Subject: [PATCH] configure.ac: fix autoreconf + +Use foreign instead of gnu in AM_INIT_AUTOMAKE otherwise autoreconf will +fail on: +Makefile.am: error: required file './README' not found + +Upstream: +https://github.com/nhorman/rng-tools/commit/1af1b4aab717a58da1dff8888c36c741b0f6ac03 + +Signed-off-by: Fabrice Fontaine +Signed-off-by: Matt Weber +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index d00a6f1..26b4806 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -21,7 +21,7 @@ AC_INIT(rng-tools, 6.7, [Neil Horman ]) + AC_PREREQ(2.52) + AC_CONFIG_SRCDIR([rngd.c]) + AC_CANONICAL_TARGET +-AM_INIT_AUTOMAKE([gnu]) ++AM_INIT_AUTOMAKE([foreign]) + AC_CONFIG_HEADERS([rng-tools-config.h]) + AC_CONFIG_MACRO_DIRS([m4]) + +-- +2.17.1 + diff --git a/package/rng-tools/0001-rngd-exit-code.patch b/package/rng-tools/0001-rngd-exit-code.patch deleted file mode 100644 index 709e20c70d..0000000000 --- a/package/rng-tools/0001-rngd-exit-code.patch +++ /dev/null @@ -1,22 +0,0 @@ -Exit with a special value when RNG modules are not available - -Instead of returning with an error, exit with a special value when the -RNG kernel modules are not present in the kernel. This is not really a -hard failure. - -Patch borrowed from Fedora, at -http://pkgs.fedoraproject.org/cgit/rng-tools.git/tree/rngd-exit-code.patch. - -Signed-off-by: Maxim Mikityanskiy - ---- a/rngd.c -+++ b/rngd.c -@@ -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/package/rng-tools/Config.in b/package/rng-tools/Config.in index b00477d336..18521bdd90 100644 --- a/package/rng-tools/Config.in +++ b/package/rng-tools/Config.in @@ -4,6 +4,8 @@ config BR2_PACKAGE_RNG_TOOLS select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL # For rdrand ligcrypt is required and it's not obvious to users select BR2_PACKAGE_LIBGCRYPT if BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_LIBSYSFS + select BR2_PACKAGE_JITTERENTROPY_LIBRARY help Daemon to use hardware random number generators. diff --git a/package/rng-tools/rng-tools.hash b/package/rng-tools/rng-tools.hash index 09769e4622..a0771034fe 100644 --- a/package/rng-tools/rng-tools.hash +++ b/package/rng-tools/rng-tools.hash @@ -1,3 +1,3 @@ -# From http://sourceforge.net/projects/gkernel/files/rng-tools/5/ -md5 6726cdc6fae1f5122463f24ae980dd68 rng-tools-5.tar.gz -sha1 3092768ac45315a5dcc0170d05566d1d00dbad96 rng-tools-5.tar.gz +# Locally computed +sha256 b85e3530dbf943b6da03ebecaf64d0a4febfcc4f562fc7f8d886483906b15f08 rng-tools-6.7.tar.gz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/rng-tools/rng-tools.mk b/package/rng-tools/rng-tools.mk index bbb1a64c15..1e8092be38 100644 --- a/package/rng-tools/rng-tools.mk +++ b/package/rng-tools/rng-tools.mk @@ -4,10 +4,18 @@ # ################################################################################ -RNG_TOOLS_VERSION = 5 -RNG_TOOLS_SITE = http://downloads.sourceforge.net/project/gkernel/rng-tools/$(RNG_TOOLS_VERSION) +RNG_TOOLS_VERSION = 6.7 +RNG_TOOLS_SITE = $(call github,nhorman,$(RNG_TOOLS_NAME),v$(RNG_TOOLS_VERSION)) RNG_TOOLS_LICENSE = GPL-2.0 RNG_TOOLS_LICENSE_FILES = COPYING +RNG_TOOLS_DEPENDENCIES = libsysfs jitterentropy-library host-automake \ + host-autoconf + +RNG_TOOLS_AUTORECONF = YES + +RNG_TOOLS_CONF_OPTS = \ + --without-nistbeacon \ + --without-pkcs11 # Work around for uClibc or musl toolchains which lack argp_*() # functions. diff --git a/package/rng-tools/rngd.service b/package/rng-tools/rngd.service index c0bcffe59e..11386d1e5d 100644 --- a/package/rng-tools/rngd.service +++ b/package/rng-tools/rngd.service @@ -3,7 +3,6 @@ Description=Hardware RNG Entropy Gatherer Daemon [Service] ExecStart=/usr/sbin/rngd -f $DAEMON_ARGS -SuccessExitStatus=66 EnvironmentFile=-/etc/default/rngd [Install]