summaryrefslogtreecommitdiff
path: root/system/haveged
diff options
context:
space:
mode:
authorErik Falor <ewfalor@gmail.com>2017-09-13 09:04:22 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-09-16 07:15:04 +0700
commit39dab9181378d1d7443ffe4c5a32a57663be07af (patch)
tree062b341f4dda4b1f3d6564dbd6834228ff8293e0 /system/haveged
parenta9fa4b628fce56b8cd8a302241b965141956fed6 (diff)
downloadslackbuilds-39dab9181378d1d7443ffe4c5a32a57663be07af.tar.gz
system/haveged: SlackBuild updated (thanks to Nikos Giotis).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'system/haveged')
-rw-r--r--system/haveged/haveged.SlackBuild32
-rw-r--r--system/haveged/rc.haveged6
2 files changed, 28 insertions, 10 deletions
diff --git a/system/haveged/haveged.SlackBuild b/system/haveged/haveged.SlackBuild
index b21881f871..48bafb4913 100644
--- a/system/haveged/haveged.SlackBuild
+++ b/system/haveged/haveged.SlackBuild
@@ -22,14 +22,20 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Modified by Nikos Giotis 20170903, Athens, GR
+# Use static building
+# Changed install target to /sbin, /lib[64]
+# Added check for existing installation due to problems when rebuilding
+# produces binary that segfaults if any previous installation is there
+
PRGNAM=haveged
VERSION=${VERSION:-1.9.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -40,8 +46,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -56,6 +62,16 @@ fi
set -e
+# Try to detect any previous installations and bail out if true
+if [ -f "/usr/lib$LIBDIRSUFFIX/libhavege.so" -o \
+ -f "/usr/lib$LIBDIRSUFFIX/libhavege.a" -o \
+ -f "/lib$LIBDIRSUFFIX/libhavege.so" -o \
+ -f "/lib$LIBDIRSUFFIX/libhavege.a" ]; then
+ echo 'Detected libhaveged!' >&2
+ echo 'Please remove libhaveged before building a new one.' >&2
+ exit 1
+fi
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -67,18 +83,20 @@ find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# Static build for easier inclusion in initrd
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
+LDFLAGS="-static" \
./configure \
--prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sbindir=/sbin \
+ --libdir=/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
- --disable-static \
--build=$ARCH-slackware-linux
make
diff --git a/system/haveged/rc.haveged b/system/haveged/rc.haveged
index 7f6f5e4fc2..404d9ca800 100644
--- a/system/haveged/rc.haveged
+++ b/system/haveged/rc.haveged
@@ -9,9 +9,9 @@ haveged_start() {
if [ -f $PIDFILE ]; then
echo "HAVEGE daemon is already running as PID $(cat $PIDFILE) " >&2
exit 3
- elif [ -x /usr/sbin/haveged ]; then
- echo "Starting HAVEGE daemon: /usr/sbin/haveged"
- /usr/sbin/haveged $HAVEGED_OPTS
+ elif [ -x /sbin/haveged ]; then
+ echo "Starting HAVEGE daemon: /sbin/haveged"
+ /sbin/haveged $HAVEGED_OPTS
fi
}