diff options
author | Arthur W. Green <awg@posteo.us> | 2016-11-30 20:30:57 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-12-03 07:17:45 +0700 |
commit | d20e4d268ae7a2f370b7e80e3d4f70e0085a0921 (patch) | |
tree | 7bc2a03fcbe3dec87cd52ffd606bae39ec7087f3 | |
parent | f4ba03f021ab3ef7321f5e2daba474ae7ceab290 (diff) |
system/bit-babbler: Updated for version 0.6.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
-rw-r--r-- | system/bit-babbler/README | 28 | ||||
-rw-r--r-- | system/bit-babbler/bit-babbler.SlackBuild | 7 | ||||
-rw-r--r-- | system/bit-babbler/bit-babbler.info | 6 | ||||
-rw-r--r-- | system/bit-babbler/doinst.sh | 25 | ||||
-rw-r--r-- | system/bit-babbler/rc.seedd.new (renamed from system/bit-babbler/rc.seedd) | 2 | ||||
-rw-r--r-- | system/bit-babbler/slack-desc | 2 |
6 files changed, 49 insertions, 21 deletions
diff --git a/system/bit-babbler/README b/system/bit-babbler/README index 81e5a69cbe30..d81f09fdda33 100644 --- a/system/bit-babbler/README +++ b/system/bit-babbler/README @@ -1,15 +1,15 @@ -The BitBabbler is a hardware-based True Random Number generator -(TRNG). It is offered in both "White" and "Black" varieties that are -functionally almost identical apart from throughput and cost. This -package installs the software necessary to control and perform basic -health checks on connected BB devices. +The BitBabbler is a hardware True Random Number Generator (TRNG) +manufactured by Voicetronix of Australia. This package installs the +software necessary to control and perform basic health checks on both +"white" or "black" varieties of BB devices. After installing this +package: -After installing the package, "groupadd bit-babbler", or adjust +1. Add group "bit-babbler", or modify /etc/udev/rules.d/90-bit-babbler.rules to use an existing group (e.g., -wheel or adm) that will have permissions for the BB devices in your -system. +"wheel" or "adm"). Beside root, only members of this designated group +will be able to directly access BB devices on your system. -Typically, you'll probably want your BitBabbler device(s) to start +2a. Typically, you'll probably want your BitBabbler device(s) to start feeding entropy to the kernel at boot. Include these lines in /etc/rc.d/rc.local: @@ -18,12 +18,14 @@ if [ -x /etc/rc.d/rc.seedd ]; then . /etc/rc.d/rc.seedd start fi -It is also a good idea to stop your BB device from feeding entropy to -the kernel before capturing the random number seed on shutdown/reboot. -Put these lines in /etc/rc.d/rc.local_shutdown, which you'll need to -create if it doesn't already exist: +2b. It is also a good idea to stop your BB device from feeding entropy +to the kernel before capturing the random number seed on +shutdown/reboot. Put these lines in /etc/rc.d/rc.local_shutdown, +which you'll need to create if it doesn't already exist: # Stop BitBabbler TRNG. if [ -x /etc/rc.d/rc.seedd ]; then . /etc/rc.d/rc.seedd stop fi + +Enjoy! diff --git a/system/bit-babbler/bit-babbler.SlackBuild b/system/bit-babbler/bit-babbler.SlackBuild index 739d560a07ba..479a328b1d7f 100644 --- a/system/bit-babbler/bit-babbler.SlackBuild +++ b/system/bit-babbler/bit-babbler.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -e -# SlackBuild for BitBabbler TRNG software, 1 November 2016 +# SlackBuild for BitBabbler TRNG software, 28 November 2016 # Arthur W. Green <awg@posteo.us> # All rights reserved. # @@ -27,7 +27,7 @@ # bit-babbler source distribution for more on this. PRGNAM=bit-babbler -VERSION=${VERSION:-0.5} +VERSION=${VERSION:-0.6} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -100,10 +100,11 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild # install sysctl setting, udev rules, and init script. install -D -m 0644 debian/bit-babbler-sysctl.conf $PKG/etc/sysctl.d/bit-babbler-sysctl.conf install -D -m 0644 debian/bit-babbler.udev $PKG/etc/udev/rules.d/90-bit-babbler.rules -install -D -m 0644 $CWD/rc.seedd $PKG/etc/rc.d/rc.seedd +install -D -m 0644 $CWD/rc.seedd.new $PKG/etc/rc.d/rc.seedd.new mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/bit-babbler/bit-babbler.info b/system/bit-babbler/bit-babbler.info index e958362cb84d..430ba1ba0069 100644 --- a/system/bit-babbler/bit-babbler.info +++ b/system/bit-babbler/bit-babbler.info @@ -1,8 +1,8 @@ PRGNAM="bit-babbler" -VERSION="0.5" +VERSION="0.6" HOMEPAGE="http://bit-babbler.org/" -DOWNLOAD="http://bit-babbler.org/downloads/bit-babbler_0.5.tar.gz" -MD5SUM="f4d49fd768b90eea50dbf75146de8856" +DOWNLOAD="http://bit-babbler.org/downloads/bit-babbler_0.6.tar.gz" +MD5SUM="1f4c62b7d116d6a3f7b551b24da8cf18" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/system/bit-babbler/doinst.sh b/system/bit-babbler/doinst.sh new file mode 100644 index 000000000000..ec1e814a599c --- /dev/null +++ b/system/bit-babbler/doinst.sh @@ -0,0 +1,25 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} + +preserve_perms etc/rc.d/rc.seedd.new diff --git a/system/bit-babbler/rc.seedd b/system/bit-babbler/rc.seedd.new index de304c37b6ae..a31d035c257e 100644 --- a/system/bit-babbler/rc.seedd +++ b/system/bit-babbler/rc.seedd.new @@ -1,7 +1,7 @@ #!/bin/sh # /etc/rc.d/rc.seedd: start and stop BitBabbler TRNG(s). # -# Revised 2 October 2015, AWG +# Revised 1 November 2016 seedd_start() { if [ -S /var/run/bit-babbler/seedd.socket ]; then diff --git a/system/bit-babbler/slack-desc b/system/bit-babbler/slack-desc index 227822110b9f..6161837d2a6e 100644 --- a/system/bit-babbler/slack-desc +++ b/system/bit-babbler/slack-desc @@ -12,7 +12,7 @@ bit-babbler: The BitBabbler is a hardware True Random Number generator (TRNG). bit-babbler: This package installs the software necessary to control and perform bit-babbler: basic health checks on BitBabbler devices. bit-babbler: -bit-babbler: http://bitbabbler.org/ +bit-babbler: http://bit-babbler.org/ bit-babbler: bit-babbler: bit-babbler: |