aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure23
-rw-r--r--configure.ac21
-rw-r--r--rcynic/Makefile.in2
-rw-r--r--rcynic/installation-scripts/linux/install.sh.in (renamed from rcynic/installation-scripts/linux/install.sh)10
4 files changed, 25 insertions, 31 deletions
diff --git a/configure b/configure
index f32dc2bc..b3b2af34 100755
--- a/configure
+++ b/configure
@@ -3803,11 +3803,6 @@ $as_echo "$ac_cv_path_GREP" >&6; }
-if test "x$GREP" = x
-then
- as_fn_error $? "Tests requires grep, sorry" "$LINENO" 5
-fi
-
if test "x$XSLTPROC" != "x" && test "x$AWK" != "x"
then
ac_config_files="$ac_config_files rcynic/show.sh"
@@ -4136,15 +4131,16 @@ test $build_django = yes && TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS portal-gui"
ac_config_files="$ac_config_files Makefile rcynic/Makefile rcynic/static-rsync/Makefile utils/Makefile utils/find_roa/Makefile utils/hashdir/Makefile utils/print_manifest/Makefile utils/print_roa/Makefile utils/uri/Makefile"
+case $host_os in
+linux*)
+ ac_config_files="$ac_config_files rcynic/installation-scripts/linux/install.sh"
+
+ ;;
+esac
+
# OpenSSL has its own build system that bears no relationship to
-# anything but itself. On at least one platform, OpenSSL's opinion on
-# the right thing to do is so completely at odds with everything else
-# that the resulting libraries require special compilation options for
-# any program that wants to use them. Feh.
-#
-# The -rpath insanity will need to change once we install this stuff.
-#
-# Don't bother with any of this unless we're building OpenSSL.
+# anything but itself, and our use of it is a bit weird, so this is a
+# BFMI (Brute Force and Massive Ignorance) job.
if test $build_openssl = yes
then
@@ -5013,6 +5009,7 @@ do
"utils/print_manifest/Makefile") CONFIG_FILES="$CONFIG_FILES utils/print_manifest/Makefile" ;;
"utils/print_roa/Makefile") CONFIG_FILES="$CONFIG_FILES utils/print_roa/Makefile" ;;
"utils/uri/Makefile") CONFIG_FILES="$CONFIG_FILES utils/uri/Makefile" ;;
+ "rcynic/installation-scripts/linux/install.sh") CONFIG_FILES="$CONFIG_FILES rcynic/installation-scripts/linux/install.sh" ;;
"openssl/Makefile") CONFIG_FILES="$CONFIG_FILES openssl/Makefile" ;;
"openssl/tests/Makefile") CONFIG_FILES="$CONFIG_FILES openssl/tests/Makefile" ;;
"pywrap/Makefile") CONFIG_FILES="$CONFIG_FILES pywrap/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 01837c16..d27a3814 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,11 +62,6 @@ AC_PATH_PROG([XSLTPROC], [xsltproc])
AC_PATH_PROG([AWK], [awk])
AC_PROG_GREP
-if test "x$GREP" = x
-then
- AC_MSG_ERROR([Tests requires grep, sorry])
-fi
-
if test "x$XSLTPROC" != "x" && test "x$AWK" != "x"
then
AC_CONFIG_FILES([rcynic/show.sh],
@@ -246,15 +241,15 @@ AC_CONFIG_FILES([Makefile
utils/print_roa/Makefile
utils/uri/Makefile])
+case $host_os in
+linux*)
+ AC_CONFIG_FILES([rcynic/installation-scripts/linux/install.sh])
+ ;;
+esac
+
# OpenSSL has its own build system that bears no relationship to
-# anything but itself. On at least one platform, OpenSSL's opinion on
-# the right thing to do is so completely at odds with everything else
-# that the resulting libraries require special compilation options for
-# any program that wants to use them. Feh.
-#
-# The -rpath insanity will need to change once we install this stuff.
-#
-# Don't bother with any of this unless we're building OpenSSL.
+# anything but itself, and our use of it is a bit weird, so this is a
+# BFMI (Brute Force and Massive Ignorance) job.
if test $build_openssl = yes
then
diff --git a/rcynic/Makefile.in b/rcynic/Makefile.in
index 42607dde..31662e3c 100644
--- a/rcynic/Makefile.in
+++ b/rcynic/Makefile.in
@@ -41,4 +41,4 @@ doc::
distclean: clean
cd static-rsync; ${MAKE} $@
- rm -f show.sh Makefile
+ rm -f show.sh installation-scripts/linux/install.sh Makefile
diff --git a/rcynic/installation-scripts/linux/install.sh b/rcynic/installation-scripts/linux/install.sh.in
index 38ce9a9d..da1838c5 100644
--- a/rcynic/installation-scripts/linux/install.sh
+++ b/rcynic/installation-scripts/linux/install.sh.in
@@ -10,9 +10,11 @@
: ${jailgroup="rcynic"}
: ${setupcron="YES"}
+AWK='@AWK@'
+
echo "Setting up \"${jaildir}\" as a chroot jail for rcynic."
-if /bin/awk -F: -v jailgroup="${jailgroup}" 'BEGIN {status = 1} $1 == jailgroup {status = 0} END {exit status}' /etc/group
+if ${AWK} -F: -v jailgroup="${jailgroup}" 'BEGIN {status = 1} $1 == jailgroup {status = 0} END {exit status}' /etc/group
then
echo "You already have a group \"${jailgroup}\", so I will use it."
elif /usr/sbin/groupadd ${jailgroup}
@@ -24,7 +26,7 @@ else
exit 1
fi
-if /bin/awk -F: -v jailuser="${jailuser}" 'BEGIN {status = 1} $1 == jailuser {status = 0} END {exit status}' /etc/passwd
+if ${AWK} -F: -v jailuser="${jailuser}" 'BEGIN {status = 1} $1 == jailuser {status = 0} END {exit status}' /etc/passwd
then
echo "You already have a user \"${jailuser}\", so I will use it."
elif /usr/sbin/useradd -g ${jailgroup} -M -N -d "${jaildir}" -s /sbin/nologin -c "RPKI validation system" ${jailuser}
@@ -123,7 +125,7 @@ shared_libraries="${jaildir}/bin/rcynic ${jaildir}/bin/rsync"
while true
do
closure="$(/usr/bin/ldd ${shared_libraries} |
- /bin/awk -v "rcynic=${jaildir}/bin/rcynic" -v "rsync=${jaildir}/bin/rsync" \
+ ${AWK} -v "rcynic=${jaildir}/bin/rcynic" -v "rsync=${jaildir}/bin/rsync" \
'{sub(/:$/, "")} $0 == rcynic || $0 == rsync {next} {for (i = 1; i <= NF; i++) if ($i ~ /^\//) print $i}' |
/bin/sort -u)"
if test "x$shared_libraries" = "x$closure"
@@ -160,7 +162,7 @@ echo "Setting up root's crontab to run jailed rcynic"
case "$setupcron" in
YES|yes)
/usr/bin/crontab -l -u root 2>/dev/null |
- /bin/awk -v "jailuser=$jailuser" -v "jailgroup=$jailgroup" -v "jaildir=$jaildir" '
+ ${AWK} -v "jailuser=$jailuser" -v "jailgroup=$jailgroup" -v "jaildir=$jaildir" '
BEGIN {
cmd = "exec /usr/sbin/chroot --userspec=" jailuser ":" jailgroup " " jaildir;
cmd = cmd " /bin/rcynic -c /etc/rcynic.conf";