aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Karl Kornel <akkornel@stanford.edu>2016-01-22 23:36:04 -0800
committerRuss Allbery <eagle@eyrie.org>2016-01-23 15:21:55 -0800
commit67d9e9a278171ea7cd0e9e2c5b754a50887d4752 (patch)
tree23881f9f64f9a638330b5c6feec3291ee98c8d51
parent61a42ce222ed07da0c22a5394e5f3b59cc4bf690 (diff)
Customize the path to Perl in the server scripts
The server scripts now have a unique string where the Perl path should be, and the Makefile uses sed to insert the correct path at build time (using the path determined by configure). The server scripts now have .in extensions, and setting the executable flag is handled by the Makefile. We also have to change autogen, because it looks for the scripts in the server directory when it generates the man pages.
-rw-r--r--Makefile.am8
-rwxr-xr-xautogen13
-rw-r--r--[-rwxr-xr-x]server/keytab-backend.in (renamed from server/keytab-backend)2
-rw-r--r--[-rwxr-xr-x]server/wallet-admin.in (renamed from server/wallet-admin)2
-rw-r--r--[-rwxr-xr-x]server/wallet-backend.in (renamed from server/wallet-backend)2
-rw-r--r--[-rwxr-xr-x]server/wallet-report.in (renamed from server/wallet-report)2
6 files changed, 20 insertions, 9 deletions
diff --git a/Makefile.am b/Makefile.am
index 87ba959..3e76885 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -210,13 +210,19 @@ warnings:
# Remove some additional files.
CLEANFILES = perl/t/lib/Test/RRA.pm perl/t/lib/Test/RRA/Automake.pm \
- perl/t/lib/Test/RRA/Config.pm
+ perl/t/lib/Test/RRA/Config.pm $(dist_sbin_SCRIPTS)
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 build-aux/compile \
build-aux/depcomp build-aux/install-sh build-aux/missing \
client/wallet.1 config.h.in config.h.in~ configure \
contrib/wallet-report.8 server/keytab-backend.8 \
server/wallet-admin.8 server/wallet-backend.8 server/wallet-report.8
+# For each of the perl scripts in server/, we need to fill in the path to the
+# Perl binary that was located during configuration.
+$(dist_sbin_SCRIPTS):
+ sed 's|WALLET_PERL_PATH|$(PERL)|' < $(srcdir)/$@.in > $(srcdir)/$@
+ chmod a+x $(srcdir)/$@
+
# Take appropriate actions in the Perl directory as well. We don't want to
# always build the Perl directory in all-local, since otherwise Automake does
# this for every target, which overrides some hacks we have to do for Debian
diff --git a/autogen b/autogen
index 3b8bc1b..c725fd9 100755
--- a/autogen
+++ b/autogen
@@ -13,10 +13,15 @@ for doc in client/wallet client/wallet-rekey ; do
pod2man --release="$version" --center=wallet \
--name=`basename "$doc" | tr a-z A-Z` "$doc".pod > "$doc".1
done
-for doc in contrib/wallet-rekey-periodic contrib/wallet-summary \
- contrib/wallet-unknown-hosts server/keytab-backend \
- server/wallet-admin server/wallet-backend \
- server/wallet-report ; do
+for doc in contrib/wallet-rekey-periodic contrib/wallet-summary \
+ contrib/wallet-unknown-hosts ; do
pod2man --release="$version" --center=wallet --section=8 \
--name=`basename "$doc" | tr a-z A-Z` "$doc" > "$doc".8
done
+for doc in server/keytab-backend server/wallet-admin \
+ server/wallet-admin server/wallet-backend \
+ server/wallet-report ; do
+ pod2man --release="$version" --center=wallet --section=8 \
+ --name=`basename "$doc" | tr a-z A-Z` "$doc.in" > "$doc".8
+done
+
diff --git a/server/keytab-backend b/server/keytab-backend.in
index 6e47331..13cb33e 100755..100644
--- a/server/keytab-backend
+++ b/server/keytab-backend.in
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!WALLET_PERL_PATH
#
# Extract keytabs from the KDC without changing the key.
#
diff --git a/server/wallet-admin b/server/wallet-admin.in
index e74b2f1..84141e6 100755..100644
--- a/server/wallet-admin
+++ b/server/wallet-admin.in
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!WALLET_PERL_PATH
#
# Wallet server administrative commands.
diff --git a/server/wallet-backend b/server/wallet-backend.in
index aa83a96..d7dde42 100755..100644
--- a/server/wallet-backend
+++ b/server/wallet-backend.in
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!WALLET_PERL_PATH
#
# Wallet server for storing and retrieving secure data.
diff --git a/server/wallet-report b/server/wallet-report.in
index 6508227..2b59803 100755..100644
--- a/server/wallet-report
+++ b/server/wallet-report.in
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!WALLET_PERL_PATH
#
# Wallet server reporting interface.