From 2a5ab18f1a74b1d1e59e5d45ee425da8808eb289 Mon Sep 17 00:00:00 2001 From: Göktürk Yüksek Date: Wed, 25 Oct 2017 21:05:05 -0400 Subject: sys-apps/rng-tools: add support for NP_TPM and NO_DRNG options in v6 rng-tools-6 removes the command line options '--no-tpm' and '--no-drng'. Instead, it allows the inclusion and exclusion of a particular entropy source using the command line options '-n' and 'x' respectively. Maintain backwards compatibility by translating the NP_TPM and NO_DRNG options in the conf file to exclusion options. Closes: https://bugs.gentoo.org/630798 Package-Manager: Portage-2.3.8, Repoman-2.3.2 --- sys-apps/rng-tools/files/rngd-initd-6 | 16 ++++++++ sys-apps/rng-tools/rng-tools-6-r1.ebuild | 46 +++++++++++++++++++++++ sys-apps/rng-tools/rng-tools-6.1-r1.ebuild | 60 ++++++++++++++++++++++++++++++ sys-apps/rng-tools/rng-tools-6.1.ebuild | 60 ------------------------------ sys-apps/rng-tools/rng-tools-6.ebuild | 46 ----------------------- 5 files changed, 122 insertions(+), 106 deletions(-) create mode 100644 sys-apps/rng-tools/files/rngd-initd-6 create mode 100644 sys-apps/rng-tools/rng-tools-6-r1.ebuild create mode 100644 sys-apps/rng-tools/rng-tools-6.1-r1.ebuild delete mode 100644 sys-apps/rng-tools/rng-tools-6.1.ebuild delete mode 100644 sys-apps/rng-tools/rng-tools-6.ebuild (limited to 'sys-apps/rng-tools') diff --git a/sys-apps/rng-tools/files/rngd-initd-6 b/sys-apps/rng-tools/files/rngd-initd-6 new file mode 100644 index 000000000000..c3b48bf22099 --- /dev/null +++ b/sys-apps/rng-tools/files/rngd-initd-6 @@ -0,0 +1,16 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need localmount + after urandom + provide entropy +} + +command=/usr/sbin/rngd +pidfile="/var/run/${SVCNAME}.pid" +command_args="--pid-file ${pidfile} --background --random-step ${STEP:-64} ${NO_TPM:+-x 1} \ + ${NO_DRNG:+-x 2} --fill-watermark ${WATERMARK} ${DEVICE:+--rng-device ${DEVICE}}" +start_stop_daemon_args="--wait 1000" +retry="SIGKILL/5000" diff --git a/sys-apps/rng-tools/rng-tools-6-r1.ebuild b/sys-apps/rng-tools/rng-tools-6-r1.ebuild new file mode 100644 index 000000000000..0dcc7e1fd35b --- /dev/null +++ b/sys-apps/rng-tools/rng-tools-6-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils autotools systemd toolchain-funcs + +DESCRIPTION="Daemon to use hardware random number generators" +HOMEPAGE="https://github.com/nhorman/rng-tools" +SRC_URI="https://github.com/nhorman/${PN}/archive/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~x86" +IUSE="selinux" + +DEPEND="dev-libs/libgcrypt:0 + dev-libs/libgpg-error" +RDEPEND="${DEPEND} + sys-fs/sysfsutils + selinux? ( sec-policy/selinux-rngd )" + +S="${WORKDIR}/${PN}-${P}" + +PATCHES=( + "${FILESDIR}"/test-for-argp.patch + "${FILESDIR}"/${PN}-5-fix-textrels-on-PIC-x86.patch #469962 + "${FILESDIR}"/${PN}-5-man-fill-watermark.patch #555094 + "${FILESDIR}"/${PN}-6-fix-noctty.patch #556456 +) + +src_prepare() { + echo 'bin_PROGRAMS = randstat' >> contrib/Makefile.am || die + default + eautoreconf + + sed -i '/^AR /d' Makefile.in || die + tc-export AR +} + +src_install() { + default + newinitd "${FILESDIR}"/rngd-initd-6 rngd + newconfd "${FILESDIR}"/rngd-confd-4.1 rngd + systemd_dounit "${FILESDIR}"/rngd.service +} diff --git a/sys-apps/rng-tools/rng-tools-6.1-r1.ebuild b/sys-apps/rng-tools/rng-tools-6.1-r1.ebuild new file mode 100644 index 000000000000..2c149789b757 --- /dev/null +++ b/sys-apps/rng-tools/rng-tools-6.1-r1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools systemd toolchain-funcs + +DESCRIPTION="Daemon to use hardware random number generators" +HOMEPAGE="https://github.com/nhorman/rng-tools" +SRC_URI="https://github.com/nhorman/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~x86" +IUSE="nistbeacon selinux" + +DEPEND="dev-libs/libgcrypt:0 + dev-libs/libgpg-error + nistbeacon? ( + net-misc/curl[ssl] + dev-libs/libxml2:2= + dev-libs/openssl:0= + ) +" +RDEPEND="${DEPEND} + sys-fs/sysfsutils + selinux? ( sec-policy/selinux-rngd )" +DEPEND="${DEPEND} + nistbeacon? ( + virtual/pkgconfig + ) +" + +PATCHES=( + "${FILESDIR}"/test-for-argp.patch + "${FILESDIR}"/${PN}-5-fix-textrels-on-PIC-x86.patch #469962 +) + +src_prepare() { + echo 'bin_PROGRAMS = randstat' >> contrib/Makefile.am || die + default + + mv README.md README || die + + eautoreconf + + sed -i '/^AR /d' Makefile.in || die + tc-export AR +} + +src_configure() { + econf $(use_with nistbeacon) +} + +src_install() { + default + newinitd "${FILESDIR}"/rngd-initd-6 rngd + newconfd "${FILESDIR}"/rngd-confd-4.1 rngd + systemd_dounit "${FILESDIR}"/rngd.service +} diff --git a/sys-apps/rng-tools/rng-tools-6.1.ebuild b/sys-apps/rng-tools/rng-tools-6.1.ebuild deleted file mode 100644 index 2b37de32bff9..000000000000 --- a/sys-apps/rng-tools/rng-tools-6.1.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit autotools systemd toolchain-funcs - -DESCRIPTION="Daemon to use hardware random number generators" -HOMEPAGE="https://github.com/nhorman/rng-tools" -SRC_URI="https://github.com/nhorman/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~x86" -IUSE="nistbeacon selinux" - -DEPEND="dev-libs/libgcrypt:0 - dev-libs/libgpg-error - nistbeacon? ( - net-misc/curl[ssl] - dev-libs/libxml2:2= - dev-libs/openssl:0= - ) -" -RDEPEND="${DEPEND} - sys-fs/sysfsutils - selinux? ( sec-policy/selinux-rngd )" -DEPEND="${DEPEND} - nistbeacon? ( - virtual/pkgconfig - ) -" - -PATCHES=( - "${FILESDIR}"/test-for-argp.patch - "${FILESDIR}"/${PN}-5-fix-textrels-on-PIC-x86.patch #469962 -) - -src_prepare() { - echo 'bin_PROGRAMS = randstat' >> contrib/Makefile.am || die - default - - mv README.md README || die - - eautoreconf - - sed -i '/^AR /d' Makefile.in || die - tc-export AR -} - -src_configure() { - econf $(use_with nistbeacon) -} - -src_install() { - default - newinitd "${FILESDIR}"/rngd-initd-r1-4.1 rngd - newconfd "${FILESDIR}"/rngd-confd-4.1 rngd - systemd_dounit "${FILESDIR}"/rngd.service -} diff --git a/sys-apps/rng-tools/rng-tools-6.ebuild b/sys-apps/rng-tools/rng-tools-6.ebuild deleted file mode 100644 index 3a559236e0c7..000000000000 --- a/sys-apps/rng-tools/rng-tools-6.ebuild +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit eutils autotools systemd toolchain-funcs - -DESCRIPTION="Daemon to use hardware random number generators" -HOMEPAGE="https://github.com/nhorman/rng-tools" -SRC_URI="https://github.com/nhorman/${PN}/archive/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~x86" -IUSE="selinux" - -DEPEND="dev-libs/libgcrypt:0 - dev-libs/libgpg-error" -RDEPEND="${DEPEND} - sys-fs/sysfsutils - selinux? ( sec-policy/selinux-rngd )" - -S="${WORKDIR}/${PN}-${P}" - -PATCHES=( - "${FILESDIR}"/test-for-argp.patch - "${FILESDIR}"/${PN}-5-fix-textrels-on-PIC-x86.patch #469962 - "${FILESDIR}"/${PN}-5-man-fill-watermark.patch #555094 - "${FILESDIR}"/${PN}-6-fix-noctty.patch #556456 -) - -src_prepare() { - echo 'bin_PROGRAMS = randstat' >> contrib/Makefile.am || die - default - eautoreconf - - sed -i '/^AR /d' Makefile.in || die - tc-export AR -} - -src_install() { - default - newinitd "${FILESDIR}"/rngd-initd-r1-4.1 rngd - newconfd "${FILESDIR}"/rngd-confd-4.1 rngd - systemd_dounit "${FILESDIR}"/rngd.service -} -- cgit v1.2.3-65-gdbad