From fe0bf509f528dbdc50c7182f81057c6a4e15e4bd Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Sat, 5 Apr 2014 22:42:12 +0000 Subject: Source tree reorg, phase 1. Almost everything moved, no file contents changed. svn path=/branches/tk685/; revision=5757 --- ca/Makefile.in | 339 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 339 insertions(+) create mode 100644 ca/Makefile.in (limited to 'ca/Makefile.in') diff --git a/ca/Makefile.in b/ca/Makefile.in new file mode 100644 index 00000000..d36a3163 --- /dev/null +++ b/ca/Makefile.in @@ -0,0 +1,339 @@ +# $Id$ + +PYTHON = @PYTHON@ +TRANG = @TRANG@ + +CFLAGS = @CFLAGS@ +LDFLAGS = @LDFLAGS@ @POW_LDFLAGS@ +LIBS = @LIBS@ + +INSTALL = @INSTALL@ -m 555 + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +datarootdir = @datarootdir@ +datadir = @datadir@ +localstatedir = @localstatedir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +sysconfdir = @sysconfdir@ + +abs_builddir = @abs_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +abs_top_builddir= @abs_top_builddir@ +srcdir = @srcdir@ + +WSGI_DAEMON_PROCESS = @WSGI_DAEMON_PROCESS@ +WSGI_PROCESS_GROUP = @WSGI_PROCESS_GROUP@ +RCYNIC_HTML_DIR = @RCYNIC_HTML_DIR@ +APACHE_VERSION = @APACHE_VERSION@ +WSGI_PYTHON_EGG_CACHE_DIR = @WSGI_PYTHON_EGG_CACHE_DIR@ +WSGI_PYTHON_EGG_CACHE_USER = @WSGI_PYTHON_EGG_CACHE_USER@ + +RPKID_INSTALL_TARGETS = @RPKID_INSTALL_TARGETS@ + +SETUP_PY_INSTALL_LAYOUT = @SETUP_PY_INSTALL_LAYOUT@ + +SETUP_PY_ROOT = `${PYTHON} -c 'import sys; print "--root " + sys.argv[1] if sys.argv[1] else ""' '${DESTDIR}'` + +POW_SO = rpki/POW/_POW.so + +all:: rpki/autoconf.py setup_autoconf.py rpki/relaxng.py myrpki.rng rpki/sql_schemas.py ${POW_SO} build/stamp + +.FORCE: + +${POW_SO}: .FORCE setup_autoconf.py + ${PYTHON} setup.py build_ext --inplace + +build/stamp: .FORCE setup_autoconf.py + ${PYTHON} setup.py build + touch $@ + +clean:: + rm -rf ${POW_SO} build dist + +RNGS = left-right-schema.rng up-down-schema.rng publication-schema.rng myrpki.rng router-certificate-schema.rng + +rpki/relaxng.py: ${abs_top_srcdir}/buildtools/make-relaxng.py ${RNGS} + ${PYTHON} ${abs_top_srcdir}/buildtools/make-relaxng.py ${RNGS} >$@.tmp + mv $@.tmp $@ + +left-right-schema.rng: left-right-schema.rnc + ${TRANG} left-right-schema.rnc left-right-schema.rng + +up-down-schema.rng: up-down-schema.rnc + ${TRANG} up-down-schema.rnc up-down-schema.rng + +publication-schema.rng: publication-schema.rnc + ${TRANG} publication-schema.rnc publication-schema.rng + +myrpki.rng: myrpki.rnc + ${TRANG} myrpki.rnc myrpki.rng + +router-certificate-schema.rng: router-certificate-schema.rnc + ${TRANG} router-certificate-schema.rnc router-certificate-schema.rng + +rpki/sql_schemas.py: ${abs_top_srcdir}/buildtools/make-sql-schemas.py rpkid.sql pubd.sql + ${PYTHON} ${abs_top_srcdir}/buildtools/make-sql-schemas.py >$@.tmp + mv $@.tmp $@ + +clean:: + find . -type f -name '*.py[co]' -delete + cd tests; $(MAKE) $@ + +install:: ${RPKID_INSTALL_TARGETS} + +install-always:: all + ${PYTHON} setup.py install ${SETUP_PY_ROOT} ${SETUP_PY_INSTALL_LAYOUT} --record installed + @echo + @echo "== Default configuration file location is ${sysconfdir}/rpki.conf ==" + @echo + ${INSTALL} examples/rpki.conf ${DESTDIR}${sysconfdir}/rpki.conf.sample + ${INSTALL} -d ${DESTDIR}${datarootdir}/rpki/publication + +uninstall deinstall:: + -${libexecdir}/rpkigui-apache-conf-gen --remove --verbose + xargs rm -fv $@ + +doc/rpkid.dot: rpkid.sql + sh ${abs_top_srcdir}/buildtools/graphviz-sql.sh $? >$@ + +.SUFFIXES: .dot .png .pdf .eps + +.dot.pdf: + dot -Tps2 $? | ps2pdf - $@ + +.dot.eps: + dot -o $@ -Teps $? + +.dot.png: + dot -o $@ -Tpng $? + +dot: doc/pubd.dot doc/rpkid.dot + +eps: doc/pubd.eps doc/rpkid.eps doc/rpkid-bpki.eps doc/pubd-bpki.eps + +png: doc/pubd.png doc/rpkid.png doc/rpkid-bpki.png doc/pubd-bpki.png + +pdf: doc/pubd.pdf doc/rpkid.pdf doc/rpkid-bpki.pdf doc/pubd-bpki.pdf + +docclean: + rm -rf doc/html doc/latex doc/xml + rm -f doc/*.eps doc/*.pdf doc/*.png + rm -f doc/pubd.dot doc/rpkid.dot + +html: dot eps png + TZ='' IMAGE_PATH=${abs_builddir}/doc doxygen + +docs: dot eps png html pdf + +## + +distclean:: clean docclean + cd tests; ${MAKE} $@ + rm -f TAGS Makefile + +all:: examples/rpki.conf + +examples/rpki.conf: rpki/autoconf.py rpki-confgen rpki-confgen.xml + ${PYTHON} rpki-confgen \ + --read-xml rpki-confgen.xml \ + --autoconf \ + --set myrpki::handle=`hostname -f | sed 's/[.]/_/g'` \ + --set myrpki::rpkid_server_host=`hostname -f` \ + --set myrpki::pubd_server_host=`hostname -f` \ + --pwgen myrpki::shared_sql_password \ + --pwgen web_portal::secret-key \ + --write-conf $@ + +clean:: + rm -f examples/rpki.conf + +rpki/autoconf.py: Makefile + @echo 'Generating $@'; \ + (echo '# Automatically generated. DO NOT EDIT.'; \ + echo ; \ + echo 'bindir = "${bindir}"'; \ + echo 'datarootdir = "${datarootdir}"'; \ + echo 'localstatedir = "${localstatedir}"'; \ + echo 'sbindir = "${sbindir}"'; \ + echo 'sharedstatedir = "${sharedstatedir}"'; \ + echo 'sysconfdir = "${sysconfdir}"'; \ + echo 'libexecdir = "${libexecdir}"'; \ + echo ; \ + echo 'WSGI_DAEMON_PROCESS = "${WSGI_DAEMON_PROCESS}"'; \ + echo 'WSGI_PROCESS_GROUP = "${WSGI_PROCESS_GROUP}"'; \ + echo 'RCYNIC_HTML_DIR = "${RCYNIC_HTML_DIR}"'; \ + echo 'APACHE_VERSION = "${APACHE_VERSION}"'; \ + echo 'WSGI_PYTHON_EGG_CACHE_DIR = "${WSGI_PYTHON_EGG_CACHE_DIR}"'; \ + echo 'WSGI_PYTHON_EGG_CACHE_USER = "${WSGI_PYTHON_EGG_CACHE_USER}"'; \ + ) > $@ + +clean:: + rm -f rpki/autoconf.py + +setup_autoconf.py: rpki/autoconf.py + @echo 'Generating $@'; \ + (cat rpki/autoconf.py; \ + echo ; \ + echo 'CFLAGS = """${CFLAGS}"""'; \ + echo 'LDFLAGS = """${LDFLAGS}"""'; \ + echo 'LIBS = """${LIBS}"""'; \ + ) > $@ + +clean:: + rm -f setup_autoconf.py setup_autoconf.pyc + +install-postconf: \ + install-user install-egg-cache install-conf install-apache install-mysql install-django install-bpki install-cron + +# This should create user "rpkid" and group "rpkid", but as we have +# not yet tested our ability to run in such a configuration, this +# would be a little premature. Can steal Makefile code for this from +# rcynic when we're ready to do something with it. + +install-user: + @true + +# This is only necessary on some platforms (currently FreeBSD, +# due to shortcomings in the way that Python eggs are installed +# as system libraries). + +install-egg-cache: + @if test 'X${WSGI_PYTHON_EGG_CACHE_DIR}' != X && test ! -d '${WSGI_PYTHON_EGG_CACHE_DIR}'; then \ + mkdir -v '${WSGI_PYTHON_EGG_CACHE_DIR}'; \ + if test 'X${WSGI_PYTHON_EGG_CACHE_USER}' != X; then \ + chown '${WSGI_PYTHON_EGG_CACHE_USER}' '${WSGI_PYTHON_EGG_CACHE_DIR}'; \ + fi; \ + fi + +# We used to play the FreeBSD game of copying rpki.conf.sample to +# rpki.conf on install and removing rpki.conf if it's identical to +# rpki.conf.sample in uninstall, but that turns out to work poorly +# with generated passwords. So now we copy rpki.conf.sample if and +# only if rpki.conf does not exist, and we leave removal of rpki.conf +# for the user to deal with. This in turn leaves us with a different +# problem of how to upgrade rpki.conf, but at least in the FreeBSD +# universe we're supposed to leave that problem for the user. + +install-conf: + if test -f ${DESTDIR}${sysconfdir}/rpki.conf; \ + then \ + true; \ + else \ + cp -p ${DESTDIR}${sysconfdir}/rpki.conf.sample ${DESTDIR}${sysconfdir}/rpki.conf; \ + fi + +uninstall deinstall:: +# if cmp -s ${DESTDIR}${sysconfdir}/rpki.conf ${DESTDIR}${sysconfdir}/rpki.conf.sample; then rm -f ${DESTDIR}${sysconfdir}/rpki.conf; else true; fi + rm -f ${DESTDIR}${sysconfdir}/rpki.conf.sample + +install-apache: + ${libexecdir}/rpkigui-apache-conf-gen --install --verbose + +install-mysql: + ${sbindir}/rpki-sql-setup + +install-django: + ${sbindir}/rpki-manage syncdb --noinput + ${sbindir}/rpki-manage migrate app + +install-bpki: + ${sbindir}/rpkic initialize_server_bpki + +# This needs to set up crontab entries for rpkigui-check-expired, +# rpkigui-import-routes, and rpkic update_bpki. They probably don't +# want run under the same user IDs either, so what with having to use +# /usr/bin/crontab on some platforms, this should be entirely too +# entertaining. Might be ok to run them all as user rpkid eventually. +# +# We really should be running exactly the same cron setup/teardown +# code here as we do in platform-specific post-installation scripts, +# but for now we just use crontab(1) here on all platforms. + +install-cron: install-cron-using-crontab + +uninstall deinstall:: uninstall-cron-using-crontab + +# Code for setting up and tearing down cron jobs using the crontab(1) +# program. We don't use this on all platforms, but we do use it on +# more than one, so it's broken out here as common code. +# +# CRONTAB_USER really should be rpkid, but we don't have the rest of +# the package set up for that yet, so run it as root for now. + +CRONTAB_USER = root + +install-cron-using-crontab: + @crontab -l -u ${CRONTAB_USER} 2>/dev/null | \ + awk -v t=`hexdump -n 2 -e '"%u\n"' /dev/urandom` ' \ + BEGIN { \ + cmd["${libexecdir}/rpkigui-import-routes"] = sprintf("%2u */2 * * *", t % 60); \ + cmd["${libexecdir}/rpkigui-check-expired"] = "@daily "; \ + cmd["${sbindir}/rpkic update_bpki" ] = "30 3 * * * "; \ + } \ + { \ + print; \ + for (i in cmd) \ + if ($$0 ~ i) \ + found[i] = $$0; \ + } \ + END { \ + for (i in cmd) \ + if (!found[i]) \ + print cmd[i] "\texec " i; \ + }' | \ + crontab -u ${CRONTAB_USER} - + +uninstall-cron-using-crontab: + @crontab -l -u ${CRONTAB_USER} 2>/dev/null | \ + awk ' \ + BEGIN { \ + empty = 1; \ + } \ + $$0 !~ "${libexecdir}/rpkigui-import-routes" && \ + $$0 !~ "${libexecdir}/rpkigui-check-expired" && \ + $$0 !~ "${sbindir}/rpkic update_bpki" { \ + empty = 0; \ + print | "/usr/bin/crontab -u ${CRONTAB_USER} -"; \ + } \ + END { \ + if (empty) \ + system("/usr/bin/crontab -u ${CRONTAB_USER} -r"); \ + }' -- cgit v1.2.3