Browse Source

n/hash-slinger: Added hash-slinger-2.5.

slackware-14.2
Damien Goutte-Gattat 8 years ago
parent
commit
ac64aa08ca
  1. 28
      n/hash-slinger/hash-slinger-2.5-slackware-paths.diff
  2. 1
      n/hash-slinger/hash-slinger-2.5.tar.gz.sha1
  3. 98
      n/hash-slinger/hash-slinger.SlackBuild
  4. 12
      n/hash-slinger/slack-desc

28
n/hash-slinger/hash-slinger-2.5-slackware-paths.diff

@ -0,0 +1,28 @@
diff -Naur hash-slinger-2.5.orig/tlsa hash-slinger-2.5/tlsa
--- hash-slinger-2.5.orig/tlsa 2014-01-15 08:22:49.000000000 +0100
+++ hash-slinger-2.5/tlsa 2014-04-23 23:30:53.892872752 +0200
@@ -27,9 +27,9 @@
from hashlib import sha256, sha512
from ipaddr import IPv4Address, IPv6Address
-ROOTKEY="/etc/unbound/root.key"
-DLVKEY="/etc/unbound/dlv.isc.org.key"
-CAFILE='/etc/pki/tls/certs/ca-bundle.crt'
+ROOTKEY=" /var/lib/unbound/root.key"
+DLVKEY="/var/lib/unbound/dlv.isc.org.key"
+CAFILE='/etc/ssl/certs/ca-certificates.crt'
def genTLSA(hostname, protocol, port, certificate, output='generic', usage=1, selector=0, mtype=1):
"""This function generates a TLSARecord object using the data passed in the parameters,
@@ -130,9 +130,9 @@
"""Do a lookup of a name and a rrtype, returns a list of binary coded strings. Only queries for rr_class IN."""
global resolvconf
ctx = unbound.ub_ctx()
- #ctx.add_ta_file(ROOTKEY)
+ ctx.add_ta_file(ROOTKEY)
unbound.ub_ctx_trustedkeys(ctx,ROOTKEY)
- ctx.set_option("dlv-anchor-file:", DLVKEY)
+ #ctx.set_option("dlv-anchor-file:", DLVKEY)
# Use the local cache
if resolvconf and os.path.isfile(resolvconf):
ctx.resolvconf(resolvconf)

1
n/hash-slinger/hash-slinger-2.5.tar.gz.sha1

@ -0,0 +1 @@
ae4d40956fe53763ffc4ecf78b2d16a7de85fcf1 hash-slinger-2.5.tar.gz

98
n/hash-slinger/hash-slinger.SlackBuild

@ -0,0 +1,98 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2014 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest hash-slinger sourcecode is available at:
# <http://people.redhat.com/pwouters/hash-slinger/>.
#
# Depends: l/dnspython, n/unbound, l/ipaddr-py
# Source package infos
NAMESRC=${NAMESRC:-hash-slinger}
VERSION=${VERSION:-2.5}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
WGET=${WGET:-http://people.redhat.com/pwouters/hash-slinger/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-hash-slinger}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
# Sanity checks
if [ $UID -eq 0 ]; then
echo "You should NOT run this script as ROOT!"
exit 1
fi
if [ ! -d $TMP ]; then
echo "$TMP does not exists or is not a directory!"
exit 1
fi
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha1sum -c $ARCHIVE.sha1
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# Install
cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
patch -p 1 < $CWD/hash-slinger-2.5-slackware-paths.diff
mkdir -p $PKG/usr/bin $PKG/usr/doc/$NAME $PKG/usr/man/man1
install -m 755 openpgpkey sshfp tlsa $PKG/usr/bin/
install -m 644 openpgpkey.1 sshfp.1 tlsa.1 $PKG/usr/man/man1
install -m 644 BUGS CHANGES COPYING README docs/CHANGES.sshfp $PKG/usr/doc/$NAME
# Compress man pages
find $PKG/usr/man -type f -exec gzip -9 {} \;
# Copy slack-desc file
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
# Package the tree
cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi

12
n/hash-slinger/slack-desc

@ -0,0 +1,12 @@
|-----handy-ruler-----------------------------------------------------|
hash-slinger: hash-slinger (generate special DNS records)
hash-slinger:
hash-slinger: This package contains various tools to generate and verify special
hash-slinger: DNS records such as SSHFP records (RFC 4255) and TLSA records
hash-slinger: (RFC 6698).
hash-slinger:
hash-slinger:
hash-slinger:
hash-slinger:
hash-slinger:
hash-slinger:
Loading…
Cancel
Save