diff options
author | Henrik Riomar <henrik.riomar@gmail.com> | 2019-04-25 15:43:10 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-05-01 06:40:45 +0000 |
commit | 812ef94384de98339248ed7728e0405e45d97675 (patch) | |
tree | fab785ea6213542041e94f8f7046abcce340e012 /community/rng-tools | |
parent | cad8e790ad795cf6614a3d57bb90e2ac08e063a2 (diff) | |
download | aports-812ef94384de98339248ed7728e0405e45d97675.tar.bz2 aports-812ef94384de98339248ed7728e0405e45d97675.tar.xz |
main/rng-tools: move from community
Maintaining the system entropy pool with a HWRNG is quite important on embedded
devices (e.g. RPI3) and on virtual instances, due to that these systems
generate very little entropy on their own.
Starting rng-tools early in the boot of a system with a hwrng avoids that the
Linux kernel "blocks" for a couple of minutes during boot, before any services
using entropy can start.
This package supports feeding the kernel entopy pool with random data from
different sources, among these /dev/hwrng and the Intel rdrand instruction.
The reason for moving it to main is that rng-tools for these reasons
also will be beneficial to provide on the Alpine installer media.
Diffstat (limited to 'community/rng-tools')
-rw-r--r-- | community/rng-tools/APKBUILD | 62 | ||||
-rw-r--r-- | community/rng-tools/fix-textrels-on-PIC-x86.patch | 53 | ||||
-rw-r--r-- | community/rng-tools/rngd.confd | 4 | ||||
-rw-r--r-- | community/rng-tools/rngd.initd | 14 |
4 files changed, 0 insertions, 133 deletions
diff --git a/community/rng-tools/APKBUILD b/community/rng-tools/APKBUILD deleted file mode 100644 index 8884792810..0000000000 --- a/community/rng-tools/APKBUILD +++ /dev/null @@ -1,62 +0,0 @@ -# Contributor: Dennis Przytarski <dennis@przytarski.com> -# Maintainer: ScrumpyJack <scrumypjack@st.ilet.to> -pkgname=rng-tools -pkgver=6.7 -pkgrel=0 -pkgdesc="A random number generator daemon" -url="https://github.com/nhorman/rng-tools" -arch="all" -license="GPL-2.0-or-later" -makedepends="argp-standalone autoconf automake linux-headers libtool sysfsutils-dev" -subpackages="$pkgname-doc $pkgname-openrc" -source="$pkgname-$pkgver.tar.gz::https://github.com/nhorman/$pkgname/archive/v$pkgver.tar.gz - fix-textrels-on-PIC-x86.patch - rngd.confd - rngd.initd - " -builddir="$srcdir/$pkgname-$pkgver" - -# power DARN support requires libgcrypt -_flags="" -case "$CARCH" in - ppc64le) makedepends="$makedepends libgcrypt-dev";; - *) _flags="--without-libgcrypt";; -esac - -prepare() { - default_prepare - ./autogen.sh -} - -build() { - cd "$builddir" - - export LIBS="-largp" - - # NOTE: nistbeacon depends on libxml2 and libcurl, so it would - # significantly increase rng-tools' total size. - # Likewise for libgcrypt. - ./configure \ - --prefix=/usr \ - --libexecdir=/usr/lib/rng-tools \ - --sysconfdir=/etc \ - --disable-silent-rules \ - --without-nistbeacon \ - --without-pkcs11 \ - $_flags - make -} - -package() { - cd "$builddir" - - make DESTDIR="$pkgdir" install - - install -m 644 -D "$srcdir"/rngd.confd "$pkgdir"/etc/conf.d/rngd - install -m 755 -D "$srcdir"/rngd.initd "$pkgdir"/etc/init.d/rngd -} - -sha512sums="2f09edacb5448087041257326faf570c303b42f90bb695a1999b2c7543f20a28b15cdf705a2eca55cae8e9cf9fb5205c056fc26cfaf6af958bcda2cde1952b4d rng-tools-6.7.tar.gz -7b02c94cf3fb278c5c265713040f1026170fc05b8572c9879a478311d4a9ce1fb0c2b9b9cdd8eda0a0016ee4464ef0ab6b577baf7e41baf8347d87b495949b7a fix-textrels-on-PIC-x86.patch -363b5aa431a0da37fc9eb8c93cffed0b75f43064530318fb41c774acd8aab8a1e109cf6c294b77fa6b8f97aa355b2849f56e83d8b06bcd9e0e9f3aa4f3ba49ac rngd.confd -86a6a7446eda64c075e468bc304008314b710629e06146582c5ce3fcc307a6b4baf5f8e8a47b72f1bab0bb608d76f953f2712cddd35809abcb02b8320c682535 rngd.initd" diff --git a/community/rng-tools/fix-textrels-on-PIC-x86.patch b/community/rng-tools/fix-textrels-on-PIC-x86.patch deleted file mode 100644 index 09a0d87cda..0000000000 --- a/community/rng-tools/fix-textrels-on-PIC-x86.patch +++ /dev/null @@ -1,53 +0,0 @@ ---- a/rdrand_asm.S -+++ b/rdrand_asm.S -@@ -83,6 +83,7 @@ - jmp 4b - ENDPROC(x86_rdseed_or_rdrand_bytes) - -+#define INIT_PIC() - #define SETPTR(var,ptr) leaq var(%rip),ptr - #define PTR0 %rdi - #define PTR1 %rsi -@@ -172,7 +173,16 @@ - jmp 4b - ENDPROC(x86_rdseed_or_rdrand_bytes) - -+#if defined(__PIC__) -+#undef __i686 /* gcc builtin define gets in our way */ -+#define INIT_PIC() \ -+ call __i686.get_pc_thunk.bx ; \ -+ addl $_GLOBAL_OFFSET_TABLE_, %ebx -+#define SETPTR(var,ptr) leal (var)@GOTOFF(%ebx),ptr -+#else -+#define INIT_PIC() - #define SETPTR(var,ptr) movl $(var),ptr -+#endif - #define PTR0 %eax - #define PTR1 %edx - #define PTR2 %ecx -@@ -180,6 +190,7 @@ - #define NPTR2 1 /* %rcx = %r1 */ - - #endif -+ INIT_PIC() - - ENTRY(x86_aes_mangle) - #ifdef __i386__ -@@ -283,6 +294,17 @@ - #endif - ret - ENDPROC(x86_aes_mangle) -+ -+#if defined(__i386__) && defined(__PIC__) -+ .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits -+.globl __i686.get_pc_thunk.bx -+ .hidden __i686.get_pc_thunk.bx -+ .type __i686.get_pc_thunk.bx,@function -+__i686.get_pc_thunk.bx: -+ movl (%esp), %ebx -+ ret -+#endif -+ - - /* aeskeygenassist $imm,%xmm0,%xmm1 */ - #define AESKEYGENASSIST(imm) .byte 0x66,0x0f,0x3a,0xdf,0xc8,imm diff --git a/community/rng-tools/rngd.confd b/community/rng-tools/rngd.confd deleted file mode 100644 index 65187508df..0000000000 --- a/community/rng-tools/rngd.confd +++ /dev/null @@ -1,4 +0,0 @@ -# Configuration for /etc/init.d/rngd - -# Additional options to pass into rngd(8). -# RNGD_OPTS="" diff --git a/community/rng-tools/rngd.initd b/community/rng-tools/rngd.initd deleted file mode 100644 index 92ca90aa35..0000000000 --- a/community/rng-tools/rngd.initd +++ /dev/null @@ -1,14 +0,0 @@ -#!/sbin/openrc-run - -description="Random number generator daemon" - -pidfile="/run/$RC_SVCNAME.pid" -command="/usr/sbin/rngd" -command_args="--quiet --background --pid-file $pidfile $RNGD_OPTS" -start_stop_daemon_args="--wait 5" - -depend() { - need localmount - after urandom - provide entropy -} |