aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-02-15 17:11:55 +0000
committerRob Austein <sra@hactrn.net>2016-02-15 17:11:55 +0000
commit33f37a6caa6ed69a9463b2684cab8b8510e4b3ae (patch)
tree6dded6b2fbbec68be3a68b653cc2fcb51f460c4b
parentdef95e42fda9a9e45bdf4f40a6ecb93b644dbf0b (diff)
First round of silly bugfixes.
svn path=/branches/tk705/; revision=6258
-rwxr-xr-xconfigure60
-rw-r--r--configure.ac1
-rw-r--r--rp/config/Makefile.in2
l---------rp/config/rpki1
-rwxr-xr-xrp/config/rpki-confgen13
5 files changed, 63 insertions, 14 deletions
diff --git a/configure b/configure
index 405d4a2d..bdb1e1fa 100755
--- a/configure
+++ b/configure
@@ -631,13 +631,14 @@ OPENSSL_TARGET
WSGI_PYTHON_EGG_CACHE_USER
WSGI_PYTHON_EGG_CACHE_DIR
SETUP_PY_INSTALL_LAYOUT
+CFG_INSTALL_TARGETS
CA_INSTALL_TARGETS
RTR_ORIGIN_INSTALL_TARGETS
RCYNIC_INSTALL_TARGETS
RCYNIC_HTML_DIR
RCYNIC_STATIC_RSYNC
-RCYNIC_GROUP
-RCYNIC_USER
+RPKI_GROUP
+RPKI_USER
RCYNIC_CRON_USER
RCYNIC_CONF_TA_DIR
RCYNIC_CONF_DATA
@@ -646,6 +647,7 @@ RCYNIC_BIN_RCYNIC
RCYNIC_TA_DIR
RCYNIC_CONF_FILE
RCYNIC_JAIL_DIRS
+SUDO
RSYNC
TRANG
RRDTOOL
@@ -4246,6 +4248,46 @@ $as_echo "no" >&6; }
fi
+# Extract the first word of "sudo", so it can be a program name with args.
+set dummy sudo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_SUDO+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $SUDO in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SUDO="$SUDO" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_SUDO="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+SUDO=$ac_cv_path_SUDO
+if test -n "$SUDO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUDO" >&5
+$as_echo "$SUDO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
# See whether we need to check for dependencies that we only need at
# runtime. We do this by default when compiling from source to avoid
@@ -4583,7 +4625,7 @@ case $enable_rcynic_jail in
RCYNIC_CONF_RSYNC="${RSYNC}"
RCYNIC_CONF_DATA="${rcynic_base_dir}/data"
RCYNIC_CONF_TA_DIR='${sysconfdir}/rpki/trust-anchors'
- RCYNIC_CRON_USER='${RCYNIC_USER}'
+ RCYNIC_CRON_USER='${RPKI_USER}'
RCYNIC_JAIL_DIRS=''
;;
*)
@@ -4606,9 +4648,9 @@ $as_echo "$use_rcynic_jail" >&6; }
# Perhaps there should be a way to set these, but for now just
# wire them in here so at least they're consistent in all Makefiles.
-RCYNIC_USER=rcynic
+RPKI_USER=rpki
-RCYNIC_GROUP=rcynic
+RPKI_GROUP=rpki
if test $use_rcynic_jail = yes && test "X$LD_STATIC_FLAG" != "X"
@@ -4693,10 +4735,13 @@ $as_echo "$RCYNIC_HTML_DIR" >&6; }
# Sort out which things to install, depending on rcynic jail status and whether
# we're doing final target installation.
+#
+# As things have evolved, this a bit repetitive. Simplify someday, maybe.
RCYNIC_INSTALL_TARGETS='install-always'
RTR_ORIGIN_INSTALL_TARGETS='install-always'
CA_INSTALL_TARGETS='install-always'
+CFG_INSTALL_TARGETS='install-always'
if test $use_rcynic_jail = yes
then
@@ -4708,12 +4753,14 @@ then
RCYNIC_INSTALL_TARGETS="$RCYNIC_INSTALL_TARGETS install-postconf"
RTR_ORIGIN_INSTALL_TARGETS="$RTR_ORIGIN_INSTALL_TARGETS install-postconf"
CA_INSTALL_TARGETS="$CA_INSTALL_TARGETS install-postconf"
+ CFG_INSTALL_TARGETS="$CFG_INSTALL_TARGETS install-postconf"
fi
+
# Now a bunch of checks to figure out what we can do with Python. If
# we don't have Python at all, none of the rest of this matters. If
# we do have Python, we need to check for required packages and
@@ -5071,7 +5118,7 @@ fi
if test $build_rp_tools = yes
then
- ac_config_files="$ac_config_files rp/Makefile rp/rcynic/Makefile rp/rcynic/static-rsync/Makefile rp/utils/Makefile rp/rpki-rtr/Makefile"
+ ac_config_files="$ac_config_files rp/Makefile rp/config/Makefile rp/rcynic/Makefile rp/rcynic/static-rsync/Makefile rp/utils/Makefile rp/rpki-rtr/Makefile"
fi
@@ -5825,6 +5872,7 @@ do
"openssl/Makefile") CONFIG_FILES="$CONFIG_FILES openssl/Makefile" ;;
"openssl/tests/Makefile") CONFIG_FILES="$CONFIG_FILES openssl/tests/Makefile" ;;
"rp/Makefile") CONFIG_FILES="$CONFIG_FILES rp/Makefile" ;;
+ "rp/config/Makefile") CONFIG_FILES="$CONFIG_FILES rp/config/Makefile" ;;
"rp/rcynic/Makefile") CONFIG_FILES="$CONFIG_FILES rp/rcynic/Makefile" ;;
"rp/rcynic/static-rsync/Makefile") CONFIG_FILES="$CONFIG_FILES rp/rcynic/static-rsync/Makefile" ;;
"rp/utils/Makefile") CONFIG_FILES="$CONFIG_FILES rp/utils/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 23f92564..943783db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -821,6 +821,7 @@ fi
if test $build_rp_tools = yes
then
AC_CONFIG_FILES([rp/Makefile
+ rp/config/Makefile
rp/rcynic/Makefile
rp/rcynic/static-rsync/Makefile
rp/utils/Makefile
diff --git a/rp/config/Makefile.in b/rp/config/Makefile.in
index 40d0a882..d7367a5f 100644
--- a/rp/config/Makefile.in
+++ b/rp/config/Makefile.in
@@ -26,7 +26,7 @@ CFG_INSTALL_TARGETS = @CFG_INSTALL_TARGETS@
all:: rpki.rp.xml rpki.rp.sample.conf
clean::
- cd tests; $(MAKE) $@
+ @true
install:: ${CFG_INSTALL_TARGETS}
diff --git a/rp/config/rpki b/rp/config/rpki
new file mode 120000
index 00000000..d39d05b6
--- /dev/null
+++ b/rp/config/rpki
@@ -0,0 +1 @@
+../../rpki \ No newline at end of file
diff --git a/rp/config/rpki-confgen b/rp/config/rpki-confgen
index e6780446..7fac9eab 100755
--- a/rp/config/rpki-confgen
+++ b/rp/config/rpki-confgen
@@ -140,7 +140,7 @@ def wiki_header(f, ident, toc):
f.write("[[PageOutline]]\n")
def conf_header(f, ident):
- f.write(textproc.dedent('''\
+ f.write(textwrap.dedent('''\
# Automatically generated. Edit as needed, but be careful of overwriting.
#
# Generated from {ident}
@@ -200,7 +200,7 @@ class main(object):
self.option_map = None
root = ElementTree(file = arg).getroot()
self.ident = root.get("ident")
- self.sections.extend(Section.from_xml(x) for x in root)
+ self.sections.extend(Section.from_xml(x) for x in root.iterchildren("section"))
self.option_map = {}
self.section_map = {}
for section in self.sections:
@@ -268,11 +268,10 @@ class main(object):
section.to_wiki(f)
def do_write_conf(self, arg):
- with open(arg, "w") as f:
- conf_header(f, self.ident)
- width = max(s.width for s in self.sections)
- for section in self.sections:
- section.to_conf(f, width)
+ conf_header(arg, self.ident)
+ width = max(s.width for s in self.sections)
+ for section in self.sections:
+ section.to_conf(arg, width)
def do_toc(self, arg):
self.toc = arg