aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2020-11-27 20:42:07 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-11-29 01:02:53 +0700
commit0248f7f6f82b37957196e21a34b2de922473604b (patch)
treed01f5df6244bb700b2c9256ccaf0985ee8dfbe92 /system
parentddbdf980c402840d5dc675da290e9c073c6dcb5b (diff)
system/apg: Added (automated password generator)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/apg/README18
-rw-r--r--system/apg/apg.SlackBuild77
-rw-r--r--system/apg/apg.info10
-rw-r--r--system/apg/slack-desc19
4 files changed, 124 insertions, 0 deletions
diff --git a/system/apg/README b/system/apg/README
new file mode 100644
index 000000000000..5185c1ddd419
--- /dev/null
+++ b/system/apg/README
@@ -0,0 +1,18 @@
+apg (automated password generator)
+
+apg generates random passwords according to several algorithms. The
+default algorithm is pronounceable password generation algorithm
+designed by Morrie Gasser and described in 'A Random Word Generator
+For Pronounceable Passwords (National Technical Information Service
+(NTIS) AD-A-017676)'.
+
+This SlackBuild by default patches apg to use /dev/urandom rather than
+/dev/random for generating random seeds, to avoid apg blocking while
+waiting for the kernel to gather more entropy. If you're worried about
+this being possibly insecure, first read:
+
+http://web.archive.org/web/20201109034537/https://www.2uo.de/myths-about-urandom/
+
+Then, if you remain unconvinced, you can run this script with
+URANDOM=no in the environment to use /dev/random. Remember, apg is
+only using this to generate *seeds* for its own built-in PRNG!
diff --git a/system/apg/apg.SlackBuild b/system/apg/apg.SlackBuild
new file mode 100644
index 000000000000..a213d6346e6c
--- /dev/null
+++ b/system/apg/apg.SlackBuild
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+# Slackware build script for apg
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# TODO: figure out what's wrong with apgd. It works fine when called
+# from the command line, but when starting it from inetd it seems
+# to get stuck in a loop, never prints any output, logs hundreds
+# of requests, and never generates any output. This is low-priority
+# because nobody actually *uses* a password-generation TCP service...
+
+PRGNAM=apg
+VERSION=${VERSION:-2.2.3}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+[ "${URANDOM:-yes}" = "no" ] || sed -i 's,/dev/random,/dev/urandom,' rnd.h
+
+# If we were going to build the daemon, we'd use "make all".
+
+make FLAGS="$SLKCFLAGS -Wl,-s"
+make install INSTALL_PREFIX=$PKG/usr
+gzip -9 $PKG/usr/man/man?/*.?
+
+rm -rf doc/man
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a CHANGES COPYING LICENSE README README.md THANKS TODO doc/* \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/apg/apg.info b/system/apg/apg.info
new file mode 100644
index 000000000000..89d7456f134c
--- /dev/null
+++ b/system/apg/apg.info
@@ -0,0 +1,10 @@
+PRGNAM="apg"
+VERSION="2.2.3"
+HOMEPAGE="https://github.com/jabenninghoff/apg/blob/master/rnd.c"
+DOWNLOAD="https://github.com/jabenninghoff/apg/archive/v2.2.3/apg-2.2.3.tar.gz"
+MD5SUM="6d1490d7835dbf5a04ade75fbad3d726"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/system/apg/slack-desc b/system/apg/slack-desc
new file mode 100644
index 000000000000..7278d8984934
--- /dev/null
+++ b/system/apg/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+apg: apg (automated password generator)
+apg:
+apg: apg generates random passwords according to several algorithms. The
+apg: default algorithm is pronounceable password generation algorithm
+apg: designed by Morrie Gasser and described in 'A Random Word Generator
+apg: For Pronounceable Passwords (National Technical Information Service
+apg: (NTIS) AD-A-017676)'.
+apg:
+apg:
+apg:
+apg: