Skip to content

Commit

Permalink
Fix distcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
npmccallum committed Oct 19, 2016
1 parent f1c4650 commit 93b0b21
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
4 changes: 3 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
DISTCHECK_CONFIGURE_FLAGS = --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)

TESTS = tests/adv tests/rec
EXTRA_DIST = COPYING $(TESTS) [email protected] tangd.socket.in tangd-update.path.in tangd-update.service.in
CLEANFILES = tangd.serivce tangd.socket tangd-update.path tangd-update.service
CLEANFILES = $(systemdsystemunit_DATA)

systemdsystemunit_DATA = [email protected] tangd.socket tangd-update.path tangd-update.service
dist_libexec_SCRIPTS = tangd-update
Expand Down
12 changes: 9 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,15 @@ AC_CHECK_LIB([http_parser], [http_parser_execute],
PKG_CHECK_MODULES([jose_zlib], [jose-zlib >= 5])
PKG_CHECK_MODULES([jose_openssl], [jose-openssl >= 5])

PKG_CHECK_MODULES([systemd], [systemd],
[AC_SUBST([systemdsystemunitdir], [$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])],
[AC_SUBST([systemdsystemunitdir], [${prefix}/lib/systemd/system])])
PKG_CHECK_MODULES([systemd], [systemd])

AC_ARG_WITH([systemdsystemunitdir],
[AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],
[],
[with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])

AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])


TANG_CFLAGS="\
-Wall \
Expand Down
4 changes: 3 additions & 1 deletion tests/adv
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

srcdir=${srcdir:-.}

function on_exit() {
if [ "$PID" ]; then kill $PID; wait $PID || true; fi
[ -d "$TMP" ] && rm -rf $TMP
Expand All @@ -40,7 +42,7 @@ jose gen -t '{"alg": "ES256"}' -o $TMP/d
jose gen -t '{"alg": "ES256"}' -o $TMP/db/.sig.jwk
jose gen -t '{"alg": "ES256"}' -o $TMP/db/.oth.jwk
jose gen -t '{"kty": "EC", "crv": "P-256", "key_ops": ["deriveKey"] }' -o $TMP/db/exc.jwk
./tangd-update $TMP/db $TMP/cache
$srcdir/tangd-update $TMP/db $TMP/cache

for addr in "127.0.0.1" "[::1]"; do
port=`shuf -i 1024-65536 -n 1`
Expand Down
4 changes: 3 additions & 1 deletion tests/rec
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

srcdir=${srcdir:-.}

function on_exit() {
if [ "$PID" ]; then kill $PID; wait $PID || true; fi
[ -d "$TMP" ] && rm -rf $TMP
Expand All @@ -39,7 +41,7 @@ mkdir -p $TMP/cache
# Generate the server keys
jose gen -t '{"alg": "ES256"}' -o $TMP/db/sig.jwk
jose gen -t '{"kty": "EC", "crv": "P-256", "key_ops": ["deriveKey"] }' -o $TMP/db/exc.jwk
./tangd-update $TMP/db $TMP/cache
${srcdir}/tangd-update $TMP/db $TMP/cache

# Generate the client keys
exc_kid=`jose thp -i $TMP/db/exc.jwk`
Expand Down

0 comments on commit 93b0b21

Please sign in to comment.