tlspool: 20170123 -> 20180227 and fix

This commit is contained in:
Silvan Mosberger 2018-03-25 19:02:56 +02:00 committed by Robin Gloster
parent a26a68da1e
commit 7ffbbd334f
3 changed files with 24 additions and 101 deletions

View File

@ -1,36 +0,0 @@
From 8561789ba70ae5d741992b143ee288b8e11a5e2b Mon Sep 17 00:00:00 2001
From: joachim schiele <js@lastlog.de>
Date: Wed, 1 Mar 2017 15:15:22 +0100
Subject: [PATCH] fix to
https://github.com/arpa2/tlspool/issues/58#issuecomment-283333738
---
tool/Makefile | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tool/Makefile b/tool/Makefile
index 9a15012..0f655e9 100644
--- a/tool/Makefile
+++ b/tool/Makefile
@@ -38,7 +38,6 @@ pgp11genkey_LIBS = $(P11KIT_LIBS) -lcrypto
configvar_CFLAGS = $(tlspool_CFLAGS)
configvar_LDFLAGS = $(tlspool_LDFLAGS)
-configvar_LIBS = $(tlspool_LIBS)
P11KIT_CFLAGS = $(shell pkg-config --cflags p11-kit-1)
P11KIT_LIBS = $(shell pkg-config --libs p11-kit-1)
@@ -96,8 +95,8 @@ have_db: have_db.c
pgp11_genkey: pgp11_genkey.c
gcc -std=gnu11 $(CFLAGS) $(pgp11genkey_CFLAGS) -o "$@" "$<" $(pgp11genkey_LIBS)
-configvar: configvar.c $(configvar_LIBS)
- gcc -std=gnu11 $(CFLAGS) $(configvar_CFLAGS) $(configvar_LDFLAGS) $(configvar_CFLAGS) -o "$@" "$<" $(configvar_LIBS)
+configvar: configvar.c
+ gcc -std=gnu11 $(CFLAGS) $(configvar_CFLAGS) $(configvar_LDFLAGS) $(configvar_CFLAGS) -o "$@" "$<"
$(tlspool_LIBS):
$(MAKE) -C ../lib `basename $(tlspool_LIBS)`
--
2.12.0

View File

@ -1,56 +1,51 @@
{ pkgs, stdenv, fetchFromGitHub, unzip, libtool, pkgconfig, git, p11-kit,
libtasn1, db, openldap, libmemcached, cyrus_sasl, openssl, softhsm, bash,
python, libkrb5, quickder, unbound, ldns, gnupg, gnutls-kdh,
useSystemd ? true, systemd, swig
{ stdenv, fetchFromGitHub
, cmake, pkgconfig, arpa2cm
, openldap, p11-kit, unbound, libtasn1, db, openssl, quickder, libkrb5, ldns, gnutls-kdh
, softhsm
}:
let
pname = "tlspool";
version = "20170123";
version = "20180227";
in
stdenv.mkDerivation rec {
name = "${pname}-${version}";
src = fetchFromGitHub {
src = fetchFromGitHub {
owner = "arpa2";
repo = "tlspool";
rev = "90cfa0758b02849114ba6373f280a4f2d3e534bf";
sha256 = "1qyq6da5bsgb8y9f3jhfrnhbvjns4k80lpkrydkvfx83bg494370";
rev = "b4459637d71c7602e94d455e23c74f3973b9cf30";
sha256 = "0x78f2bdsiglwicwn3injm5ysfjlfa0yzdpnc0r3iw4z0n89rj2r";
};
propagatedBuildInputs = [ python softhsm openldap p11-kit.dev p11-kit.out gnupg ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ unbound unzip git libtasn1 db libmemcached cyrus_sasl openssl bash quickder
libkrb5 ldns libtool swig pkgs.pythonPackages.pip gnutls-kdh ]
++ stdenv.lib.optional useSystemd systemd;
nativeBuildInputs = [
cmake pkgconfig arpa2cm
];
patches = [ ./fixing-rpath.patch ./configvar-fix.patch ];
buildInputs = [
openldap p11-kit unbound libtasn1 db openssl quickder libkrb5 ldns gnutls-kdh
];
postPatch = ''
# CMake is probably confused because the current version isn't 1.2.6, but 1.2-6
substituteInPlace CMakeLists.txt \
--replace "Quick-DER 1.2.4" "Quick-DER 1.2"
substituteInPlace etc/tlspool.conf \
--replace "dnssec_rootkey ../etc/root.key" "dnssec_rootkey $out/etc/root.key" \
--replace "pkcs11_path /usr/local/lib/softhsm/libsofthsm2.so" "pkcs11_path ${softhsm}/lib/softhsm/libsofthsm2.so"
substituteInPlace lib/Makefile \
--replace "DESTDIR=\$(DESTDIR) PREFIX=\$(PREFIX)" "DESTDIR=\$(DESTDIR) PREFIX=\$(PREFIX) SWIG=${swig}/bin/swig"
'';
buildPhase = ''
make clean
make DESTDIR=$out PREFIX=/ all
'';
installPhase = ''
mkdir -p $out/bin $out/lib $out/sbin $out/etc/tlspool/ $out/include/${pname}/pulleyback
make DESTDIR=$out PREFIX=/ install
cp -R etc/* $out/etc/tlspool/
cp include/tlspool/*.h $out/include/${pname}
cp pulleyback/*.h $out/include/${pname}/pulleyback/
cp src/*.h $out/include/${pname}
postInstall = ''
mkdir -p $out/include/${pname}/pulleyback $out/etc/tlspool
cp -R $src/etc/* $out/etc/tlspool/
cp $src/include/tlspool/*.h $out/include/${pname}
cp $src/pulleyback/*.h $out/include/${pname}/pulleyback/
cp $src/src/*.h $out/include/${pname}
'';
meta = with stdenv.lib; {
description = "A supercharged TLS daemon that allows for easy, strong and consistent deployment";
license = licenses.bsd2;
license = licenses.gpl3;
homepage = http://www.tlspool.org;
maintainers = with maintainers; [ leenaars qknight ];
};

View File

@ -1,36 +0,0 @@
From 8082f050794f771d1afb8e5c3d08862fc633922b Mon Sep 17 00:00:00 2001
From: joachim schiele <js@lastlog.de>
Date: Wed, 1 Mar 2017 13:12:19 +0100
Subject: [PATCH] RPATH is back
https://github.com/arpa2/tlspool/issues/58#issuecomment-283318767
---
tool/Makefile | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tool/Makefile b/tool/Makefile
index c1e6ce9..9a15012 100644
--- a/tool/Makefile
+++ b/tool/Makefile
@@ -18,9 +18,17 @@ LIBS =
PREFIX = /usr/local
+DIR := ${CURDIR}
+LIBDIR := ""
+ifndef DESTDIR
+ LIBDIR=$(DIR)/../lib/
+else
+ LIBDIR=$(DESTDIR)/lib
+endif
+
tlspool_CFLAGS =
tlspool_LIBS = ../lib/libtlspool.so
-tlspool_LDFLAGS = -L ../lib -ltlspool
+tlspool_LDFLAGS = -L ../lib -ltlspool -Wl,-rpath,$(LIBDIR)
donai_CFLAGS = -DDONAI_ONLY_TEXTPROC
donai_SRC = ../src/donai.c
--
2.11.1