diff options
author | Rob Austein <sra@hactrn.net> | 2013-01-31 22:10:02 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2013-01-31 22:10:02 +0000 |
commit | 9f9f731c1318c27a1026408edee93c72d3c5a52a (patch) | |
tree | cd826cb089fe15f9007d0a4e89752bd6be20cfbd | |
parent | 4d0fed473ded20a855bc68e552b9b912ce9c09c2 (diff) |
Merge from trunk.
svn path=/branches/tk377/; revision=4997
-rwxr-xr-x | configure | 29 | ||||
-rw-r--r-- | configure.ac | 13 | ||||
-rw-r--r-- | rpkid/portal-gui/Makefile.in | 6 | ||||
-rw-r--r-- | rpkid/portal-gui/apache.conf.in | 4 |
4 files changed, 49 insertions, 3 deletions
@@ -621,6 +621,8 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +WSGI_PROCESS_GROUP +WSGI_DAEMON_PROCESS DJANGO_ADMIN DJANGO_DIR SECRET_KEY @@ -714,6 +716,7 @@ enable_openssl_asm enable_ca_tools enable_rpki_rtr enable_target_installation +enable_daemon_mode enable_python enable_django ' @@ -1346,6 +1349,8 @@ Optional Features: --disable-rpki-rtr Don't build the rpki-rtr code --disable-target-installation Don't perform final target installation + --enable-daemon-mode=user:group + Run the web portal as a separate process --disable-python (Obsolete, do not use) --disable-django (Obsolete, do not use) @@ -2423,6 +2428,13 @@ else enable_target_installation=yes fi +# Check whether --enable-daemon_mode was given. +if test "${enable_daemon_mode+set}" = set; then : + enableval=$enable_daemon_mode; +else + enable_daemon_mode=no +fi + @@ -4342,6 +4354,7 @@ case $enable_rcynic_jail in use_rcynic_jail=yes RCYNIC_CONF_FILE='${RCYNIC_DIR}/etc/rcynic.conf' RCYNIC_TA_DIR='${RCYNIC_DIR}/etc/trust-anchors' + RCYNIC_BIN_RCYNIC='${RCYNIC_DIR}/bin/rcynic' RCYNIC_CONF_RSYNC='/bin/rsync' RCYNIC_CONF_DATA='/data' RCYNIC_CONF_TA_DIR='/etc/trust-anchors' @@ -4355,6 +4368,7 @@ case $enable_rcynic_jail in use_rcynic_jail=no RCYNIC_CONF_FILE='${DESTDIR}${sysconfdir}/rcynic.conf' RCYNIC_TA_DIR='${DESTDIR}${sysconfdir}/rpki/trust-anchors' + RCYNIC_BIN_RCYNIC='${bindir}/rcynic' RCYNIC_CONF_RSYNC="${RSYNC}" RCYNIC_CONF_DATA='${RCYNIC_DIR}/data' RCYNIC_CONF_TA_DIR="${RCYNIC_TA_DIR}" @@ -4847,6 +4861,21 @@ fi done + if test "$enable_daemon_mode" != no + then + save_IFS="$IFS" + IFS=':' read user group <<_EOF +$enable_daemon_mode +_EOF + IFS="$save_IFS" + WSGI_DAEMON_PROCESS="WSGIDaemonMode rpkigui user=$user ${group:+group=}${group} display-name=%{GROUP}" + + WSGI_PROCESS_GROUP="WSGIProcessGroup rpkigui" + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: running mod_wsgi in daemon mode with user \"$user\" and group \"${group:-default}\"" >&5 +$as_echo "running mod_wsgi in daemon mode with user \"$user\" and group \"${group:-default}\"" >&6; } + fi + ac_config_files="$ac_config_files rpkid/Makefile rpkid/tests/Makefile rpkid/portal-gui/Makefile" fi diff --git a/configure.ac b/configure.ac index 4ae1d4e7..050fb07a 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,7 @@ AC_ARG_ENABLE([openssl_asm], [AS_HELP_STRING([--disable-openssl-asm], [Don't l AC_ARG_ENABLE([ca_tools], [AS_HELP_STRING([--disable-ca-tools], [Don't build any of the CA tools])], [], [enable_ca_tools=yes]) AC_ARG_ENABLE([rpki_rtr], [AS_HELP_STRING([--disable-rpki-rtr], [Don't build the rpki-rtr code])], [], [enable_rpki_rtr=yes]) AC_ARG_ENABLE([target_installation], [AS_HELP_STRING([--disable-target-installation], [Don't perform final target installation])],[], [enable_target_installation=yes]) +AC_ARG_ENABLE([daemon_mode], [AS_HELP_STRING([--enable-daemon-mode=user[:group]], [Run the web portal as a separate process])],[],[enable_daemon_mode=no]) AC_ARG_VAR([RCYNIC_DIR], [Where to put output files from rcynic and rtr-origin; also controls jail location for --enable-rcynic-jail]) @@ -629,6 +630,18 @@ then # There is no standard name for this tool, so check for it. AC_PATH_PROGS(DJANGO_ADMIN, [django-admin django-admin.py]) + if test "$enable_daemon_mode" != no + then + save_IFS="$IFS" + IFS=':' read user group <<_EOF +$enable_daemon_mode +_EOF + IFS="$save_IFS" + AC_SUBST(WSGI_DAEMON_PROCESS, "WSGIDaemonMode rpkigui user=$user ${group:+group=}${group} display-name=%{GROUP}") + AC_SUBST(WSGI_PROCESS_GROUP, "WSGIProcessGroup rpkigui") + AC_MSG_RESULT([running mod_wsgi in daemon mode with user "$user" and group "${group:-default}"]) + fi + AC_CONFIG_FILES([rpkid/Makefile rpkid/tests/Makefile rpkid/portal-gui/Makefile]) fi diff --git a/rpkid/portal-gui/Makefile.in b/rpkid/portal-gui/Makefile.in index 0a6e90da..7eb2e572 100644 --- a/rpkid/portal-gui/Makefile.in +++ b/rpkid/portal-gui/Makefile.in @@ -17,6 +17,8 @@ libexecdir=@libexecdir@ sysconfdir=@sysconfdir@ INSTALL = @INSTALL@ +WSGI_DAEMON_PROCESS=@WSGI_DAEMON_PROCESS@ +WSGI_PROCESS_GROUP=@WSGI_PROCESS_GROUP@ INSTDIR=${DESTDIR}$(datarootdir)/rpki SYSCONFDIR=${DESTDIR}${sysconfdir}/rpki @@ -34,7 +36,9 @@ distclean: clean rm -f Makefile edit = sed \ - -e 's|@INSTDIR[@]|$(INSTDIR)|g' + -e 's|@INSTDIR[@]|$(INSTDIR)|g' \ + -e 's|@WSGI_DAEMON_PROCESS[@]|$(WSGI_DAEMON_PROCESS)|' \ + -e 's|@WSGI_PROCESS_GROUP[@]|$(WSGI_PROCESS_GROUP)|' apache.conf: $(srcdir)/apache.conf.in Makefile $(edit) $@.in > $@ diff --git a/rpkid/portal-gui/apache.conf.in b/rpkid/portal-gui/apache.conf.in index 133d014a..cc53f7e4 100644 --- a/rpkid/portal-gui/apache.conf.in +++ b/rpkid/portal-gui/apache.conf.in @@ -7,8 +7,8 @@ # Configure the WSGI application to run as a separate process from the # Apache daemon itself. # -#WSGIDaemonProcess rpki processes=2 -#WSGIProcessGroup rpki +@WSGI_DAEMON_PROCESS@ +@WSGI_PROCESS_GROUP@ <Directory @INSTDIR@/wsgi> Order deny,allow |