]> the.earth.li Git - onak.git/commitdiff
Support --runstatedir with autoconf 2.70+
authorJonathan McDowell <noodles@earth.li>
Tue, 25 Aug 2015 14:22:24 +0000 (15:22 +0100)
committerJonathan McDowell <noodles@earth.li>
Tue, 25 Aug 2015 14:22:24 +0000 (15:22 +0100)
Rather than putting our socket in $localstatedir/run use $runstatedir
which is support by the Debian package autoconf 2.69-9 and will be in
autoconf 2.70. Fall back to $localstatedir/run when an older version
of autoconf is used.

Makefile.in
configure.ac
debian/onak.socket
debian/rules
onak.conf.in

index 75f1df5f4572662ef99d29fb2d2d02c664aff273..08a06bfc90ea9a93d1ec889506c3c0d600d48fd7 100644 (file)
@@ -154,6 +154,7 @@ keydctl.o: keydctl.c keyd.h
        sed -e 's:@BINDIR@:@bindir@:g' \
                -e 's:@CONFIG@:@sysconfdir@/onak.conf:g' \
                -e 's:@LIBDIR@:@libdir@:g' \
+               -e 's:@RUNDIR@:@runstatedir@:g' \
                -e 's:@SBINDIR@:@sbindir@:g' \
                -e 's:@STATEDIR@:@localstatedir@:g' \
                < $< > $@
index 55b3dafad0e8fc5c8d15a1313396e2d1f5cdbc73..2eee054c89e7fe6f4822303b387bc8d89d118922 100644 (file)
@@ -85,6 +85,11 @@ then
        backend="$enable_backend"
 fi
 
+dnl Fallback for autoconf before 2.70
+if test "x$runstatedir" = x; then
+       AC_SUBST([runstatedir], ["$localstatedir/run"])
+fi
+
 AC_SUBST(DBTYPE, $enable_backend)
 AC_SUBST(DB4LIBS, $db4libs)
 AC_SUBST(KEYD, $enable_keyd)
index 97a4df8934fdd59f50325ad84ce9cb27edcbba20..b62d283525ca0cfedf67e1acc7ee92daf8e14b85 100644 (file)
@@ -1,5 +1,5 @@
 [Socket]
-ListenStream=/var/run/keyd.sock
+ListenStream=/run/keyd.sock
 SocketUser=onak
 SocketMode=0660
 
index f5e30f303c64c0676ede27b6a888cb3cec3db1e1..ad82309025191867d7107b861d674ddb4ef6abb0 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/make -f
 
-DEB_CONFIGURE_EXTRA_FLAGS += --enable-backend=dynamic
+DEB_CONFIGURE_EXTRA_FLAGS += --enable-backend=dynamic --runstatedir=/run
 
 CFLAGS += -std=gnu99
 
index 9f586fcc1bb106f32ba06580cf35320abd03c591..74a377268439916b26dace1267eadb2746c681d6 100644 (file)
@@ -34,7 +34,7 @@ maintainer_email PGP Key Server Administrator <pgp-keyserver-admin@the.earth.li>
 mail_intro_file /community/pgp-keyserver/share/mail_intro
 help_dir /community/pgp-keyserver/share
 mail_dir @STATEDIR@/spool/onak
-sock_dir @STATEDIR@/run
+sock_dir @RUNDIR@
 
 ### If you change this, make sure to put a corresponding help file in
 ### the help_dir named above