* add haveged

This commit is contained in:
Alexander Baldeck 2019-03-26 22:50:33 +00:00
parent adb2d6515e
commit 03147d27d7
2 changed files with 62 additions and 0 deletions

39
haveged/PKGBUILD Normal file
View File

@ -0,0 +1,39 @@
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Christian Hesse <mail@eworm.de>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: kfgz <kfgz at interia dot pl>
# Contributor: pootzko <pootzko at gmail dot com>
pkgname=haveged
pkgver=1.9.4
pkgrel=3
pkgdesc='Entropy harvesting daemon using CPU timings'
arch=(x86_64 powerpc64le)
url='https://github.com/jirka-h/haveged'
license=('GPL')
depends=('glibc')
validpgpkeys=('8F6B7293B03E5AC5762B65CE2E2F252B05CCA168') # Jirka Hladky <hladky.jiri@gmail.com>
source=("$pkgname-$pkgver.tar.gz::https://github.com/jirka-h/$pkgname/archive/$pkgver.tar.gz"
"https://github.com/jirka-h/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz.asc"
'haveged.service')
sha256sums=('c4959d3cb1fa6391d16a3aa1ba4d82cd3a0d497206ae4b87d638088c0664e5aa'
'SKIP'
'1e78d296ebb5f4d46108094997c51e3fccf475f54d637f20212a3aa3730ef847')
build() {
cd $pkgname-$pkgver
./configure \
--prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/bin
make
}
package() {
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
install -D -m0644 "${srcdir}"/haveged.service "$pkgdir"/usr/lib/systemd/system/haveged.service
}

23
haveged/haveged.service Normal file
View File

@ -0,0 +1,23 @@
[Unit]
Description=Entropy Harvesting Daemon
Documentation=man:haveged(8)
DefaultDependencies=no
ConditionVirtualization=!container
After=systemd-random-seed.service
Before=sysinit.target shutdown.target
[Service]
ExecStartPre=+/usr/bin/sysctl -w kernel.random.write_wakeup_threshold=1024
ExecStart=/usr/bin/haveged --Foreground --verbose=1
SuccessExitStatus=143
DynamicUser=on
AmbientCapabilities=CAP_SYS_ADMIN
NoNewPrivileges=on
PrivateDevices=on
PrivateNetwork=on
PrivateTmp=on
ProtectSystem=full
ProtectHome=on
[Install]
WantedBy=sysinit.target