From: Jonathan McDowell Date: Tue, 25 Aug 2015 14:22:24 +0000 (+0100) Subject: Support --runstatedir with autoconf 2.70+ X-Git-Tag: onak-0.4.6~2 X-Git-Url: https://the.earth.li/gitweb/?a=commitdiff_plain;h=a2f77461ff2dacd11b8d56abe8a8fa836bc53272;p=onak.git Support --runstatedir with autoconf 2.70+ 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. --- diff --git a/Makefile.in b/Makefile.in index 75f1df5..08a06bf 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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' \ < $< > $@ diff --git a/configure.ac b/configure.ac index 55b3daf..2eee054 100644 --- a/configure.ac +++ b/configure.ac @@ -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) diff --git a/debian/onak.socket b/debian/onak.socket index 97a4df8..b62d283 100644 --- a/debian/onak.socket +++ b/debian/onak.socket @@ -1,5 +1,5 @@ [Socket] -ListenStream=/var/run/keyd.sock +ListenStream=/run/keyd.sock SocketUser=onak SocketMode=0660 diff --git a/debian/rules b/debian/rules index f5e30f3..ad82309 100755 --- a/debian/rules +++ b/debian/rules @@ -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 diff --git a/onak.conf.in b/onak.conf.in index 9f586fc..74a3772 100644 --- a/onak.conf.in +++ b/onak.conf.in @@ -34,7 +34,7 @@ maintainer_email PGP Key Server Administrator 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