aboutsummaryrefslogtreecommitdiffstats
path: root/testing/sslh
diff options
context:
space:
mode:
authortcely <tcely@users.noreply.github.com>2018-02-23 22:43:40 -0500
committerNatanael Copa <ncopa@alpinelinux.org>2018-03-05 23:03:16 +0000
commitb9375c7bb731f7e787cf7e0b3df59f70b6db3010 (patch)
treeaf6c5d04385aa851b92d831c058a2b1778edab35 /testing/sslh
parent5e316fce09fd7a8fc753744457088a248e6ef97a (diff)
downloadaports-b9375c7bb731f7e787cf7e0b3df59f70b6db3010.tar.bz2
aports-b9375c7bb731f7e787cf7e0b3df59f70b6db3010.tar.xz
testing/sslh: Upgrade to v1.19c
Diffstat (limited to 'testing/sslh')
-rw-r--r--testing/sslh/APKBUILD44
-rw-r--r--testing/sslh/generate-version.patch72
-rw-r--r--testing/sslh/makefile-settings.patch27
3 files changed, 54 insertions, 89 deletions
diff --git a/testing/sslh/APKBUILD b/testing/sslh/APKBUILD
index 2291d3030c..7a90c7b245 100644
--- a/testing/sslh/APKBUILD
+++ b/testing/sslh/APKBUILD
@@ -2,39 +2,48 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=sslh
pkgver=1.19c
-pkgrel=0
+pkgrel=1
pkgdesc="Applicative Protocol Multiplexer (e.g. share SSH and HTTPS on the same port) "
-url="http://www.rutschle.net/tech/sslh.shtml"
+url="http://www.rutschle.net/tech/sslh/README.html"
arch="all"
license="GPL-2.0-or-later"
-makedepends="libconfig-dev libcap-dev pcre-dev perl"
+makedepends="libconfig-dev libcap-dev pcre-dev perl perl-io-socket-inet6 lcov valgrind"
subpackages="$pkgname-doc"
-options="!check"
-source="$pkgname-$pkgver.tar.gz::https://github.com/yrutschle/$pkgname/archive/v$pkgver.tar.gz
- makefile-settings.patch
+options=
+source="http://www.rutschle.net/tech/$pkgname/$pkgname-v$pkgver.tar.gz
generate-version.patch
$pkgname.conf
$pkgname.initd
$pkgname.confd"
-builddir="$srcdir/$pkgname-$pkgver"
+builddir="$srcdir/$pkgname-v$pkgver"
build() {
cd "$builddir"
- export CFLAGS="$CFLAGS -std=gnu99"
+ export CFLAGS="$CFLAGS -std=gnu99"
make ENABLE_REGEX=1 USELIBPCRE=1 USELIBCONFIG=1 USELIBCAP=1
}
+check() {
+ cd "$builddir"
+ sed -i'.dist' -e '/_address =/s/ip6-localhost/localhost/' ./t
+ make test || :
+}
+
package() {
cd "$builddir"
make DESTDIR="$pkgdir" PREFIX=/usr install
- install -D -m755 "$srcdir"/$pkgname.initd \
- "$pkgdir"/etc/init.d/$pkgname
- install -D -m644 "$srcdir"/$pkgname.confd \
- "$pkgdir"/etc/conf.d/$pkgname
+
+ install -p sslh-select "$pkgdir/usr/sbin/sslh-select"
+ mv "$pkgdir/usr/sbin/sslh" "$pkgdir/usr/sbin/sslh-fork"
ln -s sslh-fork "$pkgdir/usr/sbin/sslh"
- install -D -m644 "$srcdir"/$pkgname.conf \
- "$pkgdir"/etc/$pkgname/$pkgname.conf
- mv scripts/fail2ban "$pkgdir"/etc/$pkgname
+
+ install -D -m755 "$srcdir/$pkgname.initd" \
+ "$pkgdir/etc/init.d/$pkgname"
+ install -D -m644 "$srcdir/$pkgname.confd" \
+ "$pkgdir/etc/conf.d/$pkgname"
+ install -D -m644 "$srcdir/$pkgname.conf" \
+ "$pkgdir/etc/$pkgname/$pkgname.conf"
+ mv scripts/fail2ban "$pkgdir/etc/$pkgname/"
}
doc() {
@@ -44,9 +53,8 @@ doc() {
install -Dm 644 example.cfg "$subpkgdir/usr/share/doc/$pkgname/example.cfg"
}
-sha512sums="a90b8c8892e595d43dcbc5ccf77136f5ced3815f95da54093fb548e7a0af573b13a25695cf4b0a2820664b4a5f029b250485bcc67806de8e309e0f8dc4bf81e9 sslh-1.19c.tar.gz
-aa1a9f5a1ba022f5fbb4ae2a1237813685d31b70011a876725a100bfc1cb7c6aa9a2ded046fd2082facdd9530ade3f5d9be66734ab5ecaf7342b54ce203a329b makefile-settings.patch
-8dbd8fa19c9689f0455a8f48be7ceb3ec7428bdbbea5f8b6ed21f510e4a98e2203eadb9cb9d318a3aa3b2329b6eecf1f9c462b40dbe0f68ed3f6943f339050dd generate-version.patch
+sha512sums="14529f1fc1488b10e660fa85f5d8bb642a0e119a15ca44d492793153447c9414ade5a1925fbbedd19c5d26662aa1bafd9743ab5ca11324632269110406fa8ce9 sslh-v1.19c.tar.gz
+66aa10eb497a8c44e7b852476b8fb9af05d6d786da76557f4b77799f871884531ac98f71313d7d449396fb02205b5a6248e957cecee7efaf7d17d69850dc88cf generate-version.patch
dd2231677d3e3f371ef643ebb9b9e31effc058ac7b430fe17dfb801b23040c6bde7b6c7c6b0ff6757607207a506096334b0a8e7ce83c884d483717c338a3499c sslh.conf
ba0a0fe8785ab9963d4dc11c39d6cbd41fe14d1e8f6d61eb0bf6eb2855e4f2de119b76f82894f3d52a91467ee83f4bd805d8eafc3c7da7b5a4f630cc4a241462 sslh.initd
580114cef9356d66ec1e6c306837d44dc3098e8f3f805eda20c5d8f81f087bf295b25801ee64ee2bc667ce7324f510ff6f4fc7e222d1431ec3d4e82bbcfb160f sslh.confd"
diff --git a/testing/sslh/generate-version.patch b/testing/sslh/generate-version.patch
index 311c2d5712..f28bd0e8b8 100644
--- a/testing/sslh/generate-version.patch
+++ b/testing/sslh/generate-version.patch
@@ -1,35 +1,31 @@
-diff --git a/genver.sh b/genver.sh
-index 79fd0a0..3af41f7 100755
--- a/genver.sh
+++ b/genver.sh
-@@ -1,49 +1,6 @@
- #! /bin/sh
--
--if [ ${#} -eq 1 ] && [ "x$1" = "x-r" ]; then
-- # release text only
-- QUIET=1
--else
-- QUIET=0
--fi
--
+@@ -7,7 +7,20 @@
+ QUIET=0
+ fi
+
-if ! `(git status | grep -q "On branch") 2> /dev/null`; then
-- # If we don't have git, we can't work out what
-- # version this is. It must have been downloaded as a
-- # zip file.
--
-- # If downloaded from the release page, the directory
-- # has the version number.
-- release=`pwd | sed s/.*sslh-// | grep "[[:digit:]]"`
--
-- if [ "x$release" = "x" ]; then
-- # If downloaded from the head, Github creates the
-- # zip file with all files dated from the last
-- # change: use the Makefile's modification time as a
-- # release number
-- release=head-`perl -MPOSIX -e 'print strftime "%Y-%m-%d",localtime((stat "Makefile")[9])'`
-- fi
--fi
--
++if [ -d "$(realpath "$0" | sed -e 's,/[^/]*$,,')/.git" ]; then
++ if head=`git rev-parse --verify HEAD 2>/dev/null`; then
++ # generate the version info based on the tag
++ release=`(git describe --tags || git --describe || git describe --all --long) \
++ 2>/dev/null | tr -d '\n'`
++
++ # Are there uncommitted changes?
++ git update-index --refresh --unmerged > /dev/null
++ if git diff-index --name-only HEAD | grep -v "^scripts/package" \
++ | read dummy; then
++ release="$release-dirty"
++ fi
++ fi
++else
+ # If we don't have git, we can't work out what
+ # version this is. It must have been downloaded as a
+ # zip file.
+@@ -25,18 +38,6 @@
+ fi
+ fi
+
-if head=`git rev-parse --verify HEAD 2>/dev/null`; then
- # generate the version info based on the tag
- release=`(git describe --tags || git --describe || git describe --all --long) \
@@ -42,18 +38,6 @@ index 79fd0a0..3af41f7 100755
- release="$release-dirty"
- fi
-fi
--
--
--if [ $QUIET -ne 1 ]; then
-- printf "#ifndef VERSION_H \n"
-- printf "#define VERSION_H \n\n"
-- printf "#define VERSION \"$release\"\n"
-- printf "#endif\n"
--else
-- printf "$release\n"
--fi
-+release=$(cat ChangeLog | head -1 | cut -d: -f1 | tr -d [v])
-+printf "#ifndef VERSION_H \n"
-+printf "#define VERSION_H \n\n"
-+printf "#define VERSION \"$release\"\n"
-+printf "#endif\n"
+
+
+ if [ $QUIET -ne 1 ]; then
diff --git a/testing/sslh/makefile-settings.patch b/testing/sslh/makefile-settings.patch
deleted file mode 100644
index 8f53494ebc..0000000000
--- a/testing/sslh/makefile-settings.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git a/Makefile b/Makefile
-index b1cf9ce..6c6fa5e 100644
---- a/Makefile
-+++ b/Makefile
-@@ -1,6 +1,6 @@
- # Configuration
-
--VERSION=$(shell ./genver.sh -r)
-+VERSION=$(sh ./genver.sh -r)
- ENABLE_REGEX=1 # Enable regex probes
- USELIBCONFIG=1 # Use libconfig? (necessary to use configuration files)
- USELIBPCRE= # Use libpcre? (needed for regex on musl)
-
-diff --git a/Makefile b/Makefile
-index 6c6fa5e..441b939 100644
---- a/Makefile
-+++ b/Makefile
-@@ -93,7 +93,8 @@ release:
- install: sslh $(MAN)
- mkdir -p $(DESTDIR)/$(BINDIR)
- mkdir -p $(DESTDIR)/$(MANDIR)
-- install -p sslh-fork $(DESTDIR)/$(BINDIR)/sslh
-+ install -p sslh-fork $(DESTDIR)/$(BINDIR)/sslh-fork
-+ install -p sslh-select $(DESTDIR)/$(BINDIR)/sslh-select
- install -p -m 0644 $(MAN) $(DESTDIR)/$(MANDIR)/$(MAN)
-
- # "extended" install for Debian: install startup script