diff options
48 files changed, 4361 insertions, 2570 deletions
diff --git a/Makefile.in b/Makefile.in index 3599b2d6..6b06d12d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -19,10 +19,5 @@ export: tar czf subvert-rpki.hactrn.net-$$(date +%Y.%m.%d).tar.gz subvert-rpki.hactrn.net rm -rf subvert-rpki.hactrn.net -installation-manifest: Makefile - cp /dev/null ${abs_top_builddir}/installation-manifest - @for i in ${SUBDIRS}; do echo "Making $@ in $$i"; (cd $$i && ${MAKE} installation-manifest); done - sort -u -o ${abs_top_builddir}/installation-manifest ${abs_top_builddir}/installation-manifest - -clean:: - rm -f installation-manifest +distclean clean:: + rm -rf build autom4te.cache diff --git a/buildtools/build-freebsd-ca-port.py b/buildtools/build-freebsd-ca-port.py new file mode 100644 index 00000000..ad4865e0 --- /dev/null +++ b/buildtools/build-freebsd-ca-port.py @@ -0,0 +1,257 @@ +""" +Construct a FreeBSD port template given the URL of a source tarball. + +$Id$ + +Copyright (C) 2012-2013 Internet Systems Consortium ("ISC") + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +""" + +import sys +import os +import subprocess +import urlparse +import errno +import glob + +try: + url = sys.argv[1] +except IndexError: + sys.exit("Usage: %s URL-of-source-tarball" % sys.argv[0]) + +def stripext(fn, *exts): + fn1, fn2 = os.path.splitext(fn) + return fn1 if fn2 in exts else fn + +def mkdir_maybe(d): + try: + print "Creating", d + os.makedirs(d) + except OSError, e: + if e.errno != errno.EEXIST: + raise + +name = os.path.basename(urlparse.urlparse(url).path) +name = stripext(name, ".gz", ".bz2", ".xz") +name = stripext(name, ".tar", ".tgz", ".tbz", ".txz") + +# Up until this point this is fairly generic, but we reach the point +# of diminishing returns when we have to parse the port name and +# version number out of the filename. This will need to be changed +# when we start doing this with something other than snapshot +# tarballs. + +try: + base, branch, vers = name.split("-") +except: + base, branch, vers = None + +if base not in ("rpkitools", "rpki"): + base = None + +if branch != "trunk" and (branch[:2] != "tk" or not branch[2:].isdigit()): + branch = None + +if not vers.isdigit() and (base != "rpki" or vers[0] != "r" or not vers[1:].isdigit()): + vers = None +else: + vers = vers[1:] + +if None in (base, branch, vers): + sys.exit("Unexpected tarball URL name format") + +base += "-ca" + +mkdir_maybe(base) + +with open(os.path.join(base, "Makefile"), "w") as f: + print "Writing", f.name + + f.write('''\ +PORTNAME= %(portname)s +PORTVERSION= 0.%(snapshot)s +CATEGORIES= net +MASTER_SITES= %(master_sites)s +DISTFILES= %(distfiles)s +WRKSRC= ${WRKDIR}/%(tarname)s +MAINTAINER= sra@hactrn.net +COMMENT= rpki.net RPKI CA tools + +GNU_CONFIGURE= yes +USE_PYTHON= 2.7+ +USE_GNOME= libxml2 libxslt +USE_MYSQL= server +USE_APACHE_RUN= 22+ + +USE_RC_SUBR= rpki-ca + +# For OpenSSL, not needed otherwise +USE_PERL5_BUILD=yes + +# For building OpenSSL, not needed otherwise +BUILD_DEPENDS+= makedepend>0:${PORTSDIR}/devel/makedepend + +# Needed at build to keep ./configure from complaining. +BUILD_DEPENDS+= rsync>0:${PORTSDIR}/net/rsync + +RPKID_DEPENDS= ${PYTHON_PKGNAMEPREFIX}lxml>0:${PORTSDIR}/devel/py-lxml \\ + ${PYTHON_PKGNAMEPREFIX}MySQLdb>0:${PORTSDIR}/databases/py-MySQLdb \\ + ${PYTHON_PKGNAMEPREFIX}django>=1.3:${PORTSDIR}/www/py-django \\ + ${PYTHON_PKGNAMEPREFIX}vobject>0:${PORTSDIR}/deskutils/py-vobject \\ + ${PYTHON_PKGNAMEPREFIX}yaml>0:${PORTSDIR}/devel/py-yaml \\ + ${PYTHON_PKGNAMEPREFIX}south>=0.7.6:${PORTSDIR}/databases/py-south + +BUILD_DEPENDS+= ${RPKID_DEPENDS} +RUN_DEPENDS+= ${RPKID_DEPENDS} + +RUN_DEPENDS+= ${APACHE_PKGNAMEPREFIX}mod_wsgi>3:${PORTSDIR}/www/mod_wsgi3 + +# Try to use system OpenSSL if we can. +CONFIGURE_ENV= CFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib" + +CONFIGURE_ARGS= --disable-target-installation --disable-rp-tools + +.include <bsd.port.mk> +''' % { "portname" : base, + "snapshot" : vers, + "tarname" : name, + "master_sites" : os.path.dirname(url) + "/", + "distfiles" : os.path.basename(url) }) + +with open(os.path.join(base, "pkg-descr"), "w") as f: + print "Writing", f.name + + f.write('''\ +This is a port of the rpki.net RPKI toolkit CA tools. + +WWW: http://rpki.net/ +''') + +mkdir_maybe(os.path.join(base, "files")) + +with open(os.path.join(base, "files", "rpki-ca.in"), "w") as f: + print "Writing", f.name + + f.write('''\ +#!/bin/sh + +# PROVIDE: rpki-ca +# REQUIRE: LOGIN mysql +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf[.local] to enable whatever +# RPKI CA services you have configured in rpki.conf +# +# rpkica_enable="YES" + +. /etc/rc.subr + +name="rpkica" +rcvar=rpkica_enable + +start_cmd="rpkica_start" +stop_cmd="rpkica_stop" + +load_rc_config $name + +: ${rpkica_enable="NO"} + +: ${rpkica_pid_dir="/var/run/rpki"} + +rpkica_start() +{ + /usr/bin/install -m 755 -d $rpkica_pid_dir + /usr/local/sbin/rpki-start-servers + return 0 +} + +rpkica_stop() +{ + for i in rpkid pubd irdbd rootd + do + if /bin/test -f $rpkica_pid_dir/$i.pid + then + /bin/kill `/bin/cat $rpkica_pid_dir/$i.pid` + fi + done + return 0 +} + +run_rc_command "$1" +''') + + +#with open(os.path.join(base, "pkg-plist"), "w") as f: +# print "Writing empty", f.name + +print "Generating checksum" + +subprocess.check_call(("make", "makesum", "DISTDIR=" + os.getcwd()), cwd = base) + +# We will need a pkg-install and perhaps a pkg-deinstall, but I don't +# know what they look like (yet). + +print "Building" + +# "USE_GNOME=" gets rid of annoying whining due to empty or +# non-existent pkg-plist. The (direct) Gnome dependency doesn't +# matter while constructing the port skeleton, so it's simplest just +# to disable it for this one command. + +subprocess.check_call(("make", "DISTDIR=" + os.getcwd(), "USE_GNOME="), cwd = base) + +print "Installing to temporary tree" + +tempdir = os.path.join(base, "work", "temp-install", "") + +subprocess.check_call(("make", "install", "DESTDIR=" + os.path.abspath(tempdir)), + cwd = os.path.join(base, "work", name)) + +print "Generating pkg-plist" + +with open(os.path.join(base, "pkg-plist"), "w") as f: + + dont_remove = ("usr", "etc", "bin", "var", "lib", "sbin", "share", "lib/python2.7", "lib/python2.7/site-packages") + + usr_local = None + + for dirpath, dirnames, filenames in os.walk(tempdir, topdown = False): + dn = dirpath[len(tempdir):] + + if dn.startswith("usr/local"): + if not usr_local and usr_local is not None: + f.write("@cwd\n") + usr_local = True + dn = dn[len("usr/local/"):] + else: + if usr_local: + f.write("@cwd /\n") + usr_local = False + + if not dirnames and not filenames: + f.write("@exec mkdir -p %%D/%s\n" % dn) + + for fn in filenames: + if fn == "rpki.conf.sample": + f.write("@unexec if cmp -s %%D/%s/rpki.conf.sample %%D/%s/rpki.conf; then rm -f %%D/%s/rpki.conf; fi\n" % (dn, dn, dn)) + f.write(os.path.join(dn, fn) + "\n") + if fn == "rpki.conf.sample": + f.write("@exec if [ ! -f %%D/%s/rpki.conf ] ; then cp -p %%D/%s/rpki.conf.sample %%D/%s/rpki.conf; fi\n" % (dn, dn, dn)) + + if dn and dn not in dont_remove: + f.write("@dirrm %s\n" % dn) + +print "Cleaning up" + +subprocess.check_call(("make", "clean"), cwd = base) diff --git a/buildtools/build-freebsd-port.py b/buildtools/build-freebsd-port.py deleted file mode 100644 index 033bcc9b..00000000 --- a/buildtools/build-freebsd-port.py +++ /dev/null @@ -1,185 +0,0 @@ -""" -Construct a FreeBSD port template given the URL of a source tarball. - -$Id$ - -Copyright (C) 2012 Internet Systems Consortium ("ISC") - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -""" - -import sys -import os -import subprocess -import urlparse -import errno -import glob - -try: - url = sys.argv[1] -except IndexError: - sys.exit("Usage: %s URL-of-source-tarball" % sys.argv[0]) - -def stripext(fn, *exts): - fn1, fn2 = os.path.splitext(fn) - return fn1 if fn2 in exts else fn - -def mkdir_maybe(*args): - try: - print "Creating", args[0] - os.makedirs(*args) - except OSError, e: - if e.errno != errno.EEXIST: - raise - -name = os.path.basename(urlparse.urlparse(url).path) -name = stripext(name, ".gz", ".bz2", ".xz") -name = stripext(name, ".tar", ".tgz", ".tbz", ".txz") - -# Up until this point this is fairly generic, but we reach the point -# of diminishing returns when we have to parse the port name and -# version number out of the filename. This will need to be changed -# when we start doing this with something other than snapshot -# tarballs. - -try: - base, trunk, vers = name.split("-") -except: - base, trunk, vers = None - -if trunk != "trunk" or not vers.isdigit(): - sys.exit("Unexpected tarball URL name format") - -mkdir_maybe(base) - -fn = os.path.join(base, "Makefile") - -print "Writing", fn - -with open(fn, "w") as f: - f.write('''\ -PORTNAME= %(portname)s -PORTVERSION= 0.%(snapshot)s -CATEGORIES= net -MASTER_SITES= %(master_sites)s -DISTFILES= %(distfiles)s -WRKSRC= ${WRKDIR}/%(tarname)s - -MAINTAINER= sra@hactrn.net -COMMENT= rpki.net RPKI tools package - -GNU_CONFIGURE= yes -USE_PYTHON= 2.7+ -USE_MYSQL= server -USE_APACHE_RUN= 22+ -USE_GNOME= libxml2 libxslt - -# For OpenSSL, not needed otherwise -USE_PERL5_BUILD=yes - -# Split between dependency targets is somewhat arbitrary here, much of what is -# listed as BUILD_DEPENDS might be better as RUN_DEPENDS. - -BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}lxml>0:${PORTSDIR}/devel/py-lxml \\ - ${PYTHON_PKGNAMEPREFIX}MySQLdb>0:${PORTSDIR}/databases/py-MySQLdb \\ - ${PYTHON_PKGNAMEPREFIX}django>=1.3:${PORTSDIR}/www/py-django \\ - ${PYTHON_PKGNAMEPREFIX}vobject>0:${PORTSDIR}/deskutils/py-vobject \\ - ${PYTHON_PKGNAMEPREFIX}yaml>0:${PORTSDIR}/devel/py-yaml \\ - ${PYTHON_PKGNAMEPREFIX}south>=0.7.6:${PORTSDIR}/databases/py-south \\ - makedepend>0:${PORTSDIR}/devel/makedepend - -RUN_DEPENDS+= rrdtool>0:${PORTSDIR}/databases/rrdtool \\ - ${APACHE_PKGNAMEPREFIX}mod_wsgi>3:${PORTSDIR}/www/mod_wsgi3 - -.include <bsd.port.mk> -''' % { "portname" : base, - "snapshot" : vers, - "tarname" : name, - "master_sites" : os.path.dirname(url) + "/", - "distfiles" : os.path.basename(url) }) - -fn = os.path.join(base, "pkg-descr") - -print "Writing", fn - -with open(fn, "w") as f: - f.write('''\ -This is a port of the rpki.net RPKI toolkit. - -WWW: http://rpki.net/ -''') - -print "Generating checksum" - -subprocess.check_call(("make", "makesum", "DISTDIR=" + os.getcwd()), cwd = base) - -fn = os.path.join(base, "pkg-plist") -print "Creating empty", fn -open(fn, "w").close() - -print "Running make configure" - -# The "USE_GNOME=" setting is to silence a mess of grep errors we'd get otherwise. -# Not sure what this is about, seems to trigger on empty pkg-plist, so just disable -# this while generating pkg-plist so we can leave proper USE_GNOME setting in Makefile. - -subprocess.check_call(("make", "configure", "DISTDIR=" + os.getcwd(), - "USE_GNOME=", "NO_DEPENDS=yes"), - cwd = base) - -print "Running make installation-manifest" - -subprocess.check_call(("make", "installation-manifest"), - cwd = os.path.join(base, "work", name)) - -files = [] -dirs = [] - -dirmap = { - "%%BINDIR%%" : "bin", - "%%DATAROOTDIR%%" : "share", - "%%PYTHON_SITELIBDIR%%" : "%%PYTHON_SITELIBDIR%%", - "%%RCDIR%%" : "etc/rc.d", - "%%RCYNICJAILDIR%%" : "/var/rcynic", - "%%SBINDIR%%" : "sbin", - "%%SYSCONFDIR%%" : "etc" } - -fn = os.path.join(base, "work", name, "installation-manifest") - -print "Parsing", fn - -with open(fn, "r") as f: - for line in f: - kind, fn = line.rstrip("/").split() - dir, sep, tail = fn.partition("/") - if dir in dirmap: - fn = dirmap[dir] + sep + tail - else: - print "Warning: No mapping for %r in %r, blundering onwards" % (dir, fn) - if kind == "F": - files.append(fn) - elif kind == "D": - dirs.append(fn) - else: - sys.exit("Don't know what to do with %r" % line) - -files.sort() -dirs.sort(reverse = True) - -fn = os.path.join(base, "pkg-plist") -print "Writing", fn -with open(fn, "w") as f: - for fn in files: - f.write("%s\n" % fn) - for fn in dirs: - f.write("@dirrm %s\n" % fn) diff --git a/buildtools/build-freebsd-rp-port.py b/buildtools/build-freebsd-rp-port.py new file mode 100644 index 00000000..2b37c5a5 --- /dev/null +++ b/buildtools/build-freebsd-rp-port.py @@ -0,0 +1,351 @@ +""" +Construct a FreeBSD port template given the URL of a source tarball. + +$Id$ + +Copyright (C) 2012-2013 Internet Systems Consortium ("ISC") + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +""" + +import sys +import os +import subprocess +import urlparse +import errno +import glob + +try: + url = sys.argv[1] +except IndexError: + sys.exit("Usage: %s URL-of-source-tarball" % sys.argv[0]) + +def stripext(fn, *exts): + fn1, fn2 = os.path.splitext(fn) + return fn1 if fn2 in exts else fn + +def mkdir_maybe(d): + try: + print "Creating", d + os.makedirs(d) + except OSError, e: + if e.errno != errno.EEXIST: + raise + +name = os.path.basename(urlparse.urlparse(url).path) +name = stripext(name, ".gz", ".bz2", ".xz") +name = stripext(name, ".tar", ".tgz", ".tbz", ".txz") + +# Up until this point this is fairly generic, but we reach the point +# of diminishing returns when we have to parse the port name and +# version number out of the filename. This will need to be changed +# when we start doing this with something other than snapshot +# tarballs. + +try: + base, branch, vers = name.split("-") +except: + base, branch, vers = None + +if base not in ("rpkitools", "rpki"): + base = None + +if branch != "trunk" and (branch[:2] != "tk" or not branch[2:].isdigit()): + branch = None + +if not vers.isdigit() and (base != "rpki" or vers[0] != "r" or not vers[1:].isdigit()): + vers = None +else: + vers = vers[1:] + +if None in (base, branch, vers): + sys.exit("Unexpected tarball URL name format") + +base += "-rp" + +mkdir_maybe(base) + +with open(os.path.join(base, "Makefile"), "w") as f: + print "Writing", f.name + + f.write('''\ +PORTNAME= %(portname)s +PORTVERSION= 0.%(snapshot)s +CATEGORIES= net +MASTER_SITES= %(master_sites)s +DISTFILES= %(distfiles)s +WRKSRC= ${WRKDIR}/%(tarname)s +MAINTAINER= sra@hactrn.net +COMMENT= rpki.net RPKI relying party tools + +GNU_CONFIGURE= yes +USE_PYTHON= 2.7+ +USE_GNOME= libxml2 libxslt + +# For OpenSSL, not needed otherwise +USE_PERL5_BUILD=yes + +# For building OpenSSL, not needed otherwise +BUILD_DEPENDS+= makedepend>0:${PORTSDIR}/devel/makedepend + +# Needed at build to keep ./configure from complaining; +# needed at runtime for rcynic to do anything useful. +BUILD_DEPENDS+= rsync>0:${PORTSDIR}/net/rsync +RUN_DEPENDS+= rsync>0:${PORTSDIR}/net/rsync + +# For rcynic-html +RUN_DEPENDS+= rrdtool>0:${PORTSDIR}/databases/rrdtool + +# Just want relying party tools, try to use system OpenSSL if we can. + +CONFIGURE_ARGS= --disable-ca-tools +CONFIGURE_ENV= CFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib" + +# rcynic's Makefile constructs an rcynic.conf for us if it doesn't +# find one already installed. This turns out to be exactly what +# FreeBSD's rules want us to install as rcynic.conf.sample, so we +# shuffle things around a bit just before and just after installation +# to make this all come out right. +# +# If I ever teach rcynic to construct a .conf.sample file per the +# FreeBSD way of doing things, this will need to change to match. + +pre-install: + PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + @if [ -f ${PREFIX}/etc/rcynic.conf ]; then \ + ${MV} -f ${PREFIX}/etc/rcynic.conf ${PREFIX}/etc/rcynic.conf.real ; \ + fi + +post-install: + PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + @if [ -f ${PREFIX}/etc/rcynic.conf.real ]; then \ + ${MV} -f ${PREFIX}/etc/rcynic.conf ${PREFIX}/etc/rcynic.conf.sample ; \ + ${MV} -f ${PREFIX}/etc/rcynic.conf.real ${PREFIX}/etc/rcynic.conf ; \ + else \ + ${CP} -p ${PREFIX}/etc/rcynic.conf ${PREFIX}/etc/rcynic.conf.sample ; \ + fi + +.include <bsd.port.mk> +''' % { "portname" : base, + "snapshot" : vers, + "tarname" : name, + "master_sites" : os.path.dirname(url) + "/", + "distfiles" : os.path.basename(url) }) + +with open(os.path.join(base, "pkg-descr"), "w") as f: + print "Writing", f.name + + f.write('''\ +This is a port of the rpki.net RPKI toolkit relying party tools. + +WWW: http://rpki.net/ +''') + +with open(os.path.join(base, "pkg-plist"), "w") as f: + + print "Writing empty", f.name + +print "Generating checksum" + +subprocess.check_call(("make", "makesum", "DISTDIR=" + os.getcwd()), cwd = base) + +print "Extracting list of trust anchors" + +trust_anchors = [os.path.basename(fn) + for fn in subprocess.check_output(("tar", "tf", os.path.basename(url))).splitlines() + if "/rcynic/sample-trust-anchors/" in fn and fn.endswith(".tal")] + +with open(os.path.join(base, "pkg-plist"), "w") as f: + + print "Writing", f.name + + f.write('''\ +bin/find_roa +bin/hashdir +bin/print_roa +bin/print_rpki_manifest +bin/rcynic +bin/rcynic-cron +bin/rcynic-html +bin/rcynic-svn +bin/rcynic-text +bin/rtr-origin +bin/scan_roas +bin/validation_status +@unexec if cmp -s %D/etc/rcynic.conf.sample %D/etc/rcynic.conf; then rm -f %D/etc/rcynic.conf; fi +etc/rcynic.conf.sample +@exec if [ ! -f %D/etc/rcynic.conf ] ; then cp -p %D/%F %D/etc/rcynic.conf; fi +''') + + for trust_anchor in sorted(trust_anchors): + f.write("etc/rpki/trust-anchors/%s\n" % trust_anchor) + + f.write('''\ +@dirrm etc/rpki/trust-anchors +@dirrmtry etc/rpki +@dirrm www/apache22/data/rcynic +@cwd / +@exec install -d -o root -g wheel %D/var/rcynic +@exec install -d -o rcynic -g rcynic %D/var/rcynic/data +@dirrm var/rcynic/data +@exec install -d -o rcynic -g rcynic %D/var/rcynic/rpki-rtr +@dirrm var/rcynic/rpki-rtr/sockets +@dirrm var/rcynic/rpki-rtr +@dirrm var/rcynic +''') + +# 90% of this is $top/rcynic/installation-scripts/freebsd/install.sh. +# Somehow or another this duplication needs to go away, but priority +# for today is a working package. + +with open(os.path.join(base, "pkg-install"), "w") as f: + + print "Writing", f.name + + f.write('''\ +#!/bin/sh - + +case $2 in + +PRE-INSTALL) + if /usr/sbin/pw groupshow "rcynic" 2>/dev/null; then + echo "You already have a group \\"rcynic\\", so I will use it." + elif /usr/sbin/pw groupadd rcynic; then + echo "Added group \\"rcynic\\"." + else + echo "Adding group \\"rcynic\\" failed..." + echo "Please create it, then try again." + exit 1 + fi + if /usr/sbin/pw usershow "rcynic" 2>/dev/null; then + echo "You already have a user \\"rcynic\\", so I will use it." + elif /usr/sbin/pw useradd rcynic -g rcynic -h - -d /nonexistant -s /usr/sbin/nologin -c "RPKI validation system"; then + echo "Added user \\"rcynic\\"." + else + echo "Adding user \\"rcynic\\" failed..." + echo "Please create it, then try again." + exit 1 + fi + ;; + +POST-INSTALL) + htmldir=/usr/local/www/apache22/data/rcynic + if ! test -d $htmldir ; then + echo "Creating $htmldir" + install -o rcynic -g rcynic -d $htmldir + fi + sockdir=/var/rcynic/rpki-rtr/sockets + if ! test -d $sockdir ; then + echo "Creating $sockdir" + install -o nobody -g rcynic -d $sockdir + fi + echo "Setting up rcynic's crontab to run rcynic-cron script" + /usr/bin/crontab -l -u rcynic 2>/dev/null | + /usr/bin/awk -v t=`hexdump -n 2 -e '"%u\\n"' /dev/random` ' + BEGIN { + cmd = "exec /usr/local/bin/rcynic-cron"; + } + $0 !~ cmd { + print; + } + END { + printf "%u * * * *\\t%s\\n", t % 60, cmd; + }' | + /usr/bin/crontab -u rcynic - + echo "Setting up rpki-rtr listener under inetd" + if /usr/bin/egrep -q '^rpki-rtr' /etc/services ; then + echo "You already have a /etc/services entry for rpki-rtr, so I will use it." + elif echo >>/etc/services "rpki-rtr 43779/tcp #RFC 6810" ; then + echo "Added rpki-rtr to /etc/services." + else + echo "Adding rpki-rtr to /etc/services failed, please fix this, then try again." + exit 1 + fi + if /usr/bin/egrep -q "rpki-rtr[ ]+stream[ ]+tcp[ ]" /etc/inetd.conf; then + echo "You already have an inetd.conf entry for rpki-rtr on TCPv4, so I will use it." + elif echo >>/etc/inetd.conf "rpki-rtr stream tcp nowait nobody /usr/local/bin/rtr-origin rtr-origin --server /var/rcynic/rpki-rtr"; then + echo "Added rpki-rtr for TCPv4 to /etc/inetd.conf." + else + echo "Adding rpki-rtr for TCPv4 to /etc/inetd.conf failed, please fix this, then try again." + exit 1 + fi + if /usr/bin/egrep -q "rpki-rtr[ ]+stream[ ]+tcp6[ ]" /etc/inetd.conf; then + echo "You already have an inetd.conf entry for rpki-rtr on TCPv6, so I will use it." + elif echo >>/etc/inetd.conf "rpki-rtr stream tcp6 nowait nobody /usr/local/bin/rtr-origin rtr-origin --server /var/rcynic/rpki-rtr"; then + echo "Added rpki-rtr for TCPv6 to /etc/inetd.conf." + else + echo "Adding rpki-rtr for TCPv6 to /etc/inetd.conf failed, please fix this, then try again." + exit 1 + fi + ;; + +*) + echo "No clue what this script is meant to do when invoked with arguments \\"$*\\". Punting." + exit 1 + ;; + +esac +''') + +with open(os.path.join(base, "pkg-deinstall"), "w") as f: + + print "Writing", f.name + + f.write('''\ +#!/bin/sh - + +case $2 in + +DEINSTALL) + echo "Whacking rcynic's crontab" + /usr/bin/crontab -l -u rcynic 2>/dev/null | + /usr/bin/awk ' + $0 !~ "exec /usr/local/bin/rcynic-cron" { + line[++n] = $0; + } + END { + if (n) + for (i = 1; i <= n; i++) + print line[i] | "/usr/bin/crontab -u rcynic -"; + else + system("/usr/bin/crontab -u rcynic -r"); + }' + ;; + +POST-DEINSTALL) + ;; + +*) + echo "No clue what this script is meant to do when invoked with arguments \\"$*\\". Punting." + exit 1 + ;; + +esac +''') + +with open(os.path.join(base, "pkg-message"), "w") as f: + + print "Writing", f.name + + f.write('''\ +You may want to customize /usr/local/etc/rcynic.conf. If you did not +install your own trust anchors, a default set of SAMPLE trust anchors +may have been installed for you, but you, the relying party, are the +only one who can decide whether you trust those anchors. rcynic will +not do anything useful without good trust anchors. + +rcynic-cron has been configured to run hourly, at a randomly selected +minute, to spread load on the global RPKI repository servers. Please +do NOT adjust this to run on the hour. In particular please do NOT +adjust this to run at midnight UTC. +''') diff --git a/buildtools/debian-package-skeleton.py b/buildtools/debian-package-skeleton.py new file mode 100644 index 00000000..e169fd2c --- /dev/null +++ b/buildtools/debian-package-skeleton.py @@ -0,0 +1,841 @@ +# Generated by wrap-tree.py. Needs hacking for things like +# maintaining the debian/changelog file, but at least this gets all +# the debian/ubuntu stuff to date into the repository. + +import os + +os.makedirs('debian') + +with open('debian/changelog', "wb") as f: + f.write('''\ +rpki (0.5059) UNRELEASED; urgency=low + * Not using MANIFEST.in. + -- sra <sra@rpki.net> Sun, 24 Feb 2013 03:24:07 -0000 + +rpki (0.5060) UNRELEASED; urgency=low + * First build, then install, doh. + -- sra <sra@rpki.net> Sun, 24 Feb 2013 03:33:30 -0000 + +rpki (0.5059) UNRELEASED; urgency=low + * Not using MANIFEST.in. + -- sra <sra@rpki.net> Sun, 24 Feb 2013 03:24:07 -0000 + +rpki (0.5058) UNRELEASED; urgency=low + * inetd/xinetd listener for rpki-rtr on source code installation, + also needed for Ubuntu package. + -- sra <sra@rpki.net> Sun, 24 Feb 2013 03:22:00 -0000 + +rpki (0.5057) UNRELEASED; urgency=low + * Add dependency on xinetd. + -- sra <sra@rpki.net> Sat, 23 Feb 2013 13:25:46 -0000 + +rpki (0.5056) UNRELEASED; urgency=low + * More post-installation: add rpki-rtr listener to /etc/services and + /etc/inetd.conf, create a few missing directories. + -- sra <sra@rpki.net> Sat, 23 Feb 2013 12:22:10 -0000 + +rpki (0.5054) UNRELEASED; urgency=low + * Hack to use pip to install recent versions of Django and South. + Probably should be replaced by our own APT repository at some + point, but this seems to work. + -- sra <sra@rpki.net> Fri, 22 Feb 2013 03:48:54 -0000 + +rpki (0.5051) UNRELEASED; urgency=low + * Pull from trunk. + -- sra <sra@rpki.net> Thu, 21 Feb 2013 01:17:22 -0000 + +rpki (0.5047) UNRELEASED; urgency=low + * Pull from trunk. + -- sra <sra@rpki.net> Wed, 20 Feb 2013 08:31:58 -0000 + +rpki (0.5045) UNRELEASED; urgency=low + * Pull from trunk. + -- sra <sra@rpki.net> Wed, 20 Feb 2013 01:31:40 -0000 + +rpki (0.5042) UNRELEASED; urgency=low + * Get rid of silly "r" prefix on version number for FreeBSD + packages, among other reasons so that we can have the same version + numbers on FreeBSD and Ubuntu, doh. + -- sra <sra@rpki.net> Tue, 19 Feb 2013 02:20:28 -0000 + +rpki (0.5041) UNRELEASED; urgency=low + * Install generated debian/changelog, now that we generate ones that + debuild accepts. + -- sra <sra@rpki.net> Mon, 18 Feb 2013 07:17:57 -0000 + +rpki (0.5040) UNRELEASED; urgency=low + * debuild et al are picky about format of email addresses. + + For some reason debuild now cares about "make test" failing (which + it always has on package builds, because of MySQL setup + requirements, but debuild used to ignore that), so tweak rules to + skip the test suite. + -- sra <sra@rpki.net> Mon, 18 Feb 2013 06:58:51 -0000 + +rpki (0.5039) UNRELEASED; urgency=low + * Script to automate debian/changelogs. + -- sra <sra@rpki.net> Mon, 18 Feb 2013 05:46:00 -0000 + +rpki (0.5038) UNRELEASED; urgency=low + * Add rc.d script. + -- sra <sra@rpki.net> Sun, 17 Feb 2013 10:05:49 -0000 + +rpki (0.5037) UNRELEASED; urgency=low + * Debug pkg-plist generation. + -- sra <sra@rpki.net> Mon, 11 Feb 2013 05:27:59 -0000 + +rpki (0.5036) UNRELEASED; urgency=low + * pkg-plist generation hacks. + -- sra <sra@rpki.net> Mon, 11 Feb 2013 03:04:05 -0000 + +rpki (0.5035) UNRELEASED; urgency=low + * Pull from trunk. + -- sra <sra@rpki.net> Mon, 11 Feb 2013 02:25:18 -0000 + +rpki (0.5034) UNRELEASED; urgency=low + * Add --disable-rp-tools, for package building. + -- sra <sra@rpki.net> Mon, 11 Feb 2013 02:18:42 -0000 + +rpki (0.5030) UNRELEASED; urgency=low + * Pull from trunk. + -- sra <sra@rpki.net> Tue, 05 Feb 2013 21:04:06 -0000 + +rpki (0.5028) UNRELEASED; urgency=low + * Run daemons as root for now, come back to permission issues when + everything else works as expected. + -- sra <sra@rpki.net> Tue, 05 Feb 2013 04:41:02 -0000 + +rpki (0.5027) UNRELEASED; urgency=low + * Clean up debian/ directory, enable upstart. + -- sra <sra@rpki.net> Tue, 05 Feb 2013 00:12:49 -0000 + +rpki (0.5026) UNRELEASED; urgency=low + * Install sample rpki.conf, since we don't (yet?) have a good way to + generate one automatically during installation. Installation + dialog is probably not the right way to go, some kind of setup + wizard script for the user to run after installation is probably a + better bet. + -- sra <sra@rpki.net> Mon, 04 Feb 2013 23:09:34 -0000 + +rpki (0.5025) UNRELEASED; urgency=low + * Tweak directory ownerships on Debian install, and add a few more + bits to rpki-ca.upstart while we're at it. + -- sra <sra@rpki.net> Mon, 04 Feb 2013 05:36:12 -0000 + +rpki (0.5024) UNRELEASED; urgency=low + * Allow naming tree(s) on command line. + -- sra <sra@rpki.net> Mon, 04 Feb 2013 05:31:03 -0000 + +rpki (0.5023) UNRELEASED; urgency=low + * Wrapped debian skeleton. + -- sra <sra@rpki.net> Sun, 03 Feb 2013 22:27:01 -0000 + +rpki (0.5022) UNRELEASED; urgency=low + * Helper for generating package skeletons. + -- sra <sra@rpki.net> Sun, 03 Feb 2013 22:15:47 -0000 + +rpki (0.5021) UNRELEASED; urgency=low + * Checkpoint. + -- sra <sra@rpki.net> Sun, 03 Feb 2013 17:02:21 -0000 + +rpki (0.5020) UNRELEASED; urgency=low + * Change default location of rcynic-html output on FreeBSD to track + the current FreeBSD Apache default, silly though that location may + be. Thanks, Jay! + -- sra <sra@rpki.net> Sun, 03 Feb 2013 16:41:33 -0000 + +rpki (0.5019) UNRELEASED; urgency=low + * Don't try to run rcynic-html if parent output directory doesn't + exist. + -- sra <sra@rpki.net> Sun, 03 Feb 2013 16:36:45 -0000 + +rpki (0.5018) UNRELEASED; urgency=low + * Doh, don't put in generated rcynic.conf. + -- sra <sra@rpki.net> Sun, 03 Feb 2013 16:25:18 -0000 + +rpki (0.5017) UNRELEASED; urgency=low + * Cleanup + -- sra <sra@rpki.net> Sun, 03 Feb 2013 05:38:42 -0000 + +rpki (0.5016) UNRELEASED; urgency=low + * Seems /var/run is a temporary filesystem on some platforms. + -- sra <sra@rpki.net> Sun, 03 Feb 2013 02:07:39 -0000 + +rpki (0.5015) UNRELEASED; urgency=low + * Typo in pkg-deinstall. + -- sra <sra@rpki.net> Sat, 02 Feb 2013 19:46:33 -0000 + +rpki (0.5014) UNRELEASED; urgency=low + * Exit without whining when another process holds the lock. + -- sra <sra@rpki.net> Sat, 02 Feb 2013 19:08:34 -0000 + +rpki (0.5013) UNRELEASED; urgency=low + * Wire installed location of scan_roas into installed rtr-origin, so + that we can stop fighting with FreeBSD's odd habit of installing + packaged software in /usr/local/bin while excluding /usr/local/bin + from the default $PATH in system cron jobs and shell scripts. + -- sra <sra@rpki.net> Sat, 02 Feb 2013 19:02:11 -0000 + +rpki (0.5012) UNRELEASED; urgency=low + * Need rsync as both build and runtime dependency. + -- sra <sra@rpki.net> Sat, 02 Feb 2013 08:34:30 -0000 + +rpki (0.5011) UNRELEASED; urgency=low + * OK, now I know why nobody ever uses "install -C". + -- sra <sra@rpki.net> Sat, 02 Feb 2013 08:19:35 -0000 + +rpki (0.5010) UNRELEASED; urgency=low + * rcynic requires rsync, doh. + -- sra <sra@rpki.net> Sat, 02 Feb 2013 07:56:31 -0000 + +rpki (0.5009) UNRELEASED; urgency=low + * Fun with DESTDIR. + -- sra <sra@rpki.net> Sat, 02 Feb 2013 07:22:08 -0000 + +rpki (0.5008) UNRELEASED; urgency=low + * Beat FreeBSD packaging stuff with a club. Might be working now. + -- sra <sra@rpki.net> Sat, 02 Feb 2013 06:58:53 -0000 + +rpki (0.5007) UNRELEASED; urgency=low + * Whoops, ac_* variables are lowercase this week. + -- sra <sra@rpki.net> Sat, 02 Feb 2013 06:58:27 -0000 + +rpki (0.5006) UNRELEASED; urgency=low + * Doh, write TAL configuration to correct file. + -- sra <sra@rpki.net> Sat, 02 Feb 2013 05:37:46 -0000 + +rpki (0.5005) UNRELEASED; urgency=low + * etc/rc.d/rcynic is only for jails, so it's not in the port + anymore. + -- sra <sra@rpki.net> Sat, 02 Feb 2013 05:29:03 -0000 + +rpki (0.5004) UNRELEASED; urgency=low + * Whack FreeBSD port skeleton to track recent changes. + -- sra <sra@rpki.net> Sat, 02 Feb 2013 05:00:27 -0000 + +rpki (0.5003) UNRELEASED; urgency=low + * First round of fixes to installation targets. + -- sra <sra@rpki.net> Sat, 02 Feb 2013 04:15:51 -0000 + +rpki (0.5002) UNRELEASED; urgency=low + * Finally ready to start testing new rcynic install code. + -- sra <sra@rpki.net> Fri, 01 Feb 2013 21:50:18 -0000 + +rpki (0.5001) UNRELEASED; urgency=low + * Checkpoint + -- sra <sra@rpki.net> Fri, 01 Feb 2013 18:38:48 -0000 + +rpki (0.5000) UNRELEASED; urgency=low + * Cleanup. + -- sra <sra@rpki.net> Fri, 01 Feb 2013 13:22:19 -0000 + +rpki (0.4999) UNRELEASED; urgency=low + * chown() lock file to rcynic user when creating it as root. + -- sra <sra@rpki.net> Fri, 01 Feb 2013 05:08:08 -0000 + +rpki (0.4998) UNRELEASED; urgency=low + * Add rcynic-cron. + -- sra <sra@rpki.net> Fri, 01 Feb 2013 03:17:34 -0000 + +rpki (0.4997) UNRELEASED; urgency=low + * Merge from trunk. + -- sra <sra@rpki.net> Thu, 31 Jan 2013 22:10:02 -0000 + +rpki (0.4995) UNRELEASED; urgency=low + * Checkpoint + -- sra <sra@rpki.net> Thu, 31 Jan 2013 21:56:29 -0000 + +rpki (0.4989) UNRELEASED; urgency=low + * Pull from trunk. + -- sra <sra@rpki.net> Thu, 31 Jan 2013 05:04:39 -0000 + +rpki (0.4988) UNRELEASED; urgency=low + * Checkpoint + -- sra <sra@rpki.net> Thu, 31 Jan 2013 05:03:04 -0000 + +rpki (0.4980) UNRELEASED; urgency=low + * Pull from trunk. + -- sra <sra@rpki.net> Fri, 25 Jan 2013 07:41:00 -0000 + +rpki (0.4978) UNRELEASED; urgency=low + * Pull from trunk. + -- sra <sra@rpki.net> Fri, 25 Jan 2013 05:09:38 -0000 + +rpki (0.4976) UNRELEASED; urgency=low + + * Test update to changelog. + + -- Rob Austein <sra@hactrn.net> Tue, 22 Jan 2013 02:50:01 -0500 + +rpki (0.4968) UNRELEASED; urgency=low + + * Initial Release. + + -- Rob Austein <sra@hactrn.net> Tue, 15 Jan 2013 13:29:54 -0500 +''') + +with open('debian/compat', "wb") as f: + f.write('''\ +8 +''') + +with open('debian/control', "wb") as f: + f.write('''\ +# Dependencies on python-pip are a temporary hack, so that we can +# install recent versions of django and south during Singapore +# hackathon without messing about with setting up our own apt +# repository. In the longer run, the dependencies on python-pip +# should go away, and we should dependencies on python-django and +# python-south with the right version numbers. +# +# Also see the pip install stuff in rpki-ca.postinst, which is part of +# the same kludge. + +Source: rpki +Priority: extra +Maintainer: Rob Austein <sra@hactrn.net> +Build-Depends: debhelper (>= 8.0.0), autotools-dev, xsltproc, python (>= 2.7), python-all-dev, python-setuptools, python-lxml, libxml2-utils, mysql-client, mysql-server, python-mysqldb, python-vobject, python-yaml +Standards-Version: 3.9.3 +Homepage: http://trac.rpki.net/ +Vcs-Svn: http://subvert-rpki.hactrn.net/ +Vcs-Browser: http://trac.rpki.net/browser + +Package: rpki-rp +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, python (>= 2.7), rrdtool, rsync, xinetd +Description: rpki.net relying party tools + "Relying party" validation tools from the rpki.net toolkit. + See the online documentation at http://rpki.net/. + +Package: rpki-ca +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, xsltproc, python (>= 2.7), python-pip, python-lxml, libxml2-utils, mysql-client, mysql-server, python-mysqldb, python-vobject, python-yaml +Description: rpki.net certification authority tools + "Certification authority" tools for issuing RPKI certificates and + related objects using the rpki.net toolkit. + See the online documentation at http://rpki.net/. +''') + +with open('debian/copyright', "wb") as f: + f.write('''\ +Format: http://dep.debian.net/deps/dep5 +Upstream-Name: rpki +Source: http://rpki.net/ + + +Files: * +Copyright: 2006-2008 American Registry for Internet Numbers + 2009-2013 Internet Systems Consortium + 2010-2013 SPARTA, Inc. +License: ISC + + +Files: openssl/openssl-*.tar.gz +Copyright: 1998-2012 The OpenSSL Project + 1995-1998 Eric A. Young, Tim J. Hudson +License: OpenSSL and SSLeay + + +License: ISC + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + . + THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + + +License: OpenSSL + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + . + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + . + 3. All advertising materials mentioning features or use of this + software must display the following acknowledgment: + "This product includes software developed by the OpenSSL Project + for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" + . + 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + licensing@OpenSSL.org. + . + 5. Products derived from this software may not be called "OpenSSL" + nor may "OpenSSL" appear in their names without prior written + permission of the OpenSSL Project. + . + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes software developed by the OpenSSL Project + for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" + . + THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + . + This product includes cryptographic software written by Eric Young + (eay@cryptsoft.com). This product includes software written by Tim + Hudson (tjh@cryptsoft.com). + + +License: SSLeay + This library is free for commercial and non-commercial use as long as + the following conditions are aheared to. The following conditions + apply to all code found in this distribution, be it the RC4, RSA, + lhash, DES, etc., code; not just the SSL code. The SSL documentation + included with this distribution is covered by the same copyright terms + except that the holder is Tim Hudson (tjh@cryptsoft.com). + . + Copyright remains Eric Young's, and as such any Copyright notices in + the code are not to be removed. + If this package is used in a product, Eric Young should be given attribution + as the author of the parts of the library used. + This can be in the form of a textual message at program startup or + in documentation (online or textual) provided with the package. + . + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: + "This product includes cryptographic software written by + Eric Young (eay@cryptsoft.com)" + The word 'cryptographic' can be left out if the rouines from the library + being used are not cryptographic related :-). + 4. If you include any Windows specific code (or a derivative thereof) from + the apps directory (application code) you must include an acknowledgement: + "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + . + THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + . + The licence and distribution terms for any publically available version or + derivative of this code cannot be changed. i.e. this code cannot simply be + copied and put under another distribution licence + [including the GNU Public Licence.] +''') + +with open('debian/rpki-ca.install', "wb") as f: + f.write('''\ +etc/rpki.conf.sample +etc/rpki/apache.conf +etc/rpki/settings.py +usr/lib +usr/sbin +usr/share +''') + +with open('debian/rpki-ca.lintian-overrides', "wb") as f: + f.write('''\ +# The RPKI code requires a copy of the OpenSSL library with both the +# CMS code and RFC 3779 code enabled. All recent versions of OpenSSL +# include this code, but it's not enabled on all platforms. On Ubuntu +# 12.04 LTS, the RFC 3779 code is disabled. So we take the least bad +# of our several bad options, and carefully link against a private +# copy of the OpenSSL crypto library built with the options we need, +# with all the voodoo necessary to avoid conflicts with, eg, the +# OpenSSL shared libraries that are already linked into Python. +# +# It would be totally awesome if the OpenSSL package maintainers were +# to enable the RFC 3779 code for us, but I'm not holding my breath. +# +# In the meantime, we need to tell lintian to allow this nasty hack. + +rpki-ca: embedded-library +''') + +with open('debian/rpki-ca.postinst', "wb") as f: + f.write('''\ +#!/bin/sh +# postinst script for rpki-ca +# +# see: dh_installdeb(1) + +set -e + +setup_rpkid_user() { + if ! getent passwd rpkid >/dev/null + then + useradd -g rpkid -M -N -d /nonexistent -s /sbin/nologin -c "RPKI certification authority engine(s)" rpkid + fi +} + +setup_rpkid_group() { + if ! getent group rpkid >/dev/null + then + groupadd rpkid + fi +} + +# This is kind of sick, but the versions of Django and and South that +# ship with Ubuntu 12.04 LTS are too old, so we need to install from +# PyPi if we can. If the user has already done that, great, otherwise +# we try to do it here. Clearly this is not what we want in the long +# run, but neither rae the OpenSSL library hacks. +# +# Basic approach here is copied from what we do in configure.ac. + +maybe_install_django() { + if python -c 'import sys, django; sys.exit(0 if django.VERSION < (1, 3, 7) else 1)' 2>/dev/null + then + echo 1>&2 "Unusable version of Django installed, please uninstall it then try again" + exit 1 + fi + + if ! python -c 'import django' 2>/dev/null && + ! pip install django==1.3.7 + then + echo 1>&2 "Unable to install usable version of Django, sorry" + exit 1 + fi +} + +maybe_install_south() { + if python -c 'import sys, south; sys.exit(0 if map(int,south.__version__.split(".")) < [0, 7, 6] else 1)' 2>/dev/null + then + echo 1>&2 "Unusable version of South installed, please uninstall it then try again" + exit 1 + fi + + if ! python -c 'import south' 2>/dev/null && + ! pip install South==0.7.6 + then + echo 1>&2 "Unable to install usable version of Django, sorry" + exit 1 + fi +} + +# summary of how this script can be called: +# * <postinst> `configure' <most-recently-configured-version> +# * <old-postinst> `abort-upgrade' <new version> +# * <conflictor's-postinst> `abort-remove' `in-favour' <package> +# <new-version> +# * <postinst> `abort-remove' +# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' +# <failed-install-package> <version> `removing' +# <conflicting-package> <version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + setup_rpkid_group + setup_rpkid_user + maybe_install_django + maybe_install_south + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \\`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 +''') + +with open('debian/rpki-ca.upstart', "wb") as f: + f.write('''\ +# RPKI CA Service + +description "RPKI CA Servers" +author "Rob Austein <sra@hactrn.net>" + +# This is almost certainly wrong. Suggestions on how to improve this +# welcome, but please first read the Python code to understand what it +# is doing. + +# Our only real dependencies are on mysqld and our config file. + +start on started mysql +stop on stopping mysql + +pre-start script + if test -f /etc/rpki.conf && + test -f /usr/share/rpki/ca.cer && + test -f /usr/share/rpki/irbe.cer && + test -f /usr/share/rpki/irdbd.cer && + test -f /usr/share/rpki/rpkid.cer && + test -f /usr/share/rpki/rpkid.key + then + install -m 755 -o rpkid -g rpkid -d /var/run/rpki + + # This should be running as user rpkid, but I haven't got all + # the pesky details worked out yet. Most testing to date has + # either been all under a single non-root user or everything + # as root, so, eg, running "rpkic initialize" as root will not + # leave things in a sane state for rpkid running as user + # rpkid. + # + # In the interest of debugging the rest of this before trying + # to break new ground, run daemons as root for the moment, + # with the intention of coming back to fix this later. + # + #sudo -u rpkid /usr/sbin/rpki-start-servers + /usr/sbin/rpki-start-servers + + else + stop + exit 0 + fi +end script + +post-stop script + for i in rpkid pubd irdbd rootd + do + if test -f /var/run/rpki/$i.pid + then + kill `cat /var/run/rpki/$i.pid` + fi + done +end script +''') + +with open('debian/rpki-rp.install', "wb") as f: + f.write('''\ +etc/rcynic.conf +etc/rpki/trust-anchors +etc/xinetd.d/rpki-rtr +usr/bin +var/rcynic +''') + +with open('debian/rpki-rp.lintian-overrides', "wb") as f: + f.write('''\ +# The RPKI code requires a copy of the OpenSSL library with both the +# CMS code and RFC 3779 code enabled. All recent versions of OpenSSL +# include this code, but it's not enabled on all platforms. On Ubuntu +# 12.04 LTS, the RFC 3779 code is disabled. So we take the least bad +# of our several bad options, and carefully link against a private +# copy of the OpenSSL crypto library built with the options we need, +# with all the voodoo necessary to avoid conflicts with, eg, the +# OpenSSL shared libraries that are already linked into Python. +# +# It would be totally awesome if the OpenSSL package maintainers were +# to enable the RFC 3779 code for us, but I'm not holding my breath. +# +# In the meantime, we need to tell lintian to allow this nasty hack. + +rpki-rp: embedded-library + +# /var/rcynic is where we have been keeping this for years. We could change +# but all the documentation says /var/rcynic. Maybe some day we will +# figure out a politically correct place to put this, for now stick +# with what the documentation leads the user to expect. + +rpki-rp: non-standard-dir-in-var +''') + +with open('debian/rpki-rp.postinst', "wb") as f: + f.write('''\ +#!/bin/sh +# postinst script for rpki-rp +# +# see: dh_installdeb(1) + +set -e + +setup_rcynic_ownership() { + install -o rcynic -g rcynic -d /var/rcynic/data /var/rcynic/rpki-rtr /var/rcynic/rpki-rtr + if test -d /var/www + then + install -o rcynic -g rcynic -d /var/www/rcynic + fi +} + +setup_rcynic_user() { + if ! getent passwd rcynic >/dev/null + then + useradd -g rcynic -M -N -d /var/rcynic -s /sbin/nologin -c "RPKI validation system" rcynic + fi +} + +setup_rcynic_group() { + if ! getent group rcynic >/dev/null + then + groupadd rcynic + fi +} + +# We want to pick a *random* minute for rcynic to run, to spread load +# on repositories, which is why we don't just use a package crontab. + +setup_rcynic_cron() { + crontab -l -u rcynic 2>/dev/null | + awk -v t=`hexdump -n 2 -e '"%u\\n"' /dev/urandom` ' + BEGIN { cmd = "exec /usr/bin/rcynic-cron" } + $0 !~ cmd { print } + END { printf "%u * * * *\\t%s\\n", t % 60, cmd } + ' | + crontab -u rcynic - +} + +setup_rpki_rtr_listener() { + killall -HUP xinetd +} + +# summary of how this script can be called: +# * <postinst> `configure' <most-recently-configured-version> +# * <old-postinst> `abort-upgrade' <new version> +# * <conflictor's-postinst> `abort-remove' `in-favour' <package> +# <new-version> +# * <postinst> `abort-remove' +# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' +# <failed-install-package> <version> `removing' +# <conflicting-package> <version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + setup_rcynic_group + setup_rcynic_user + setup_rcynic_ownership + setup_rcynic_cron + setup_rpki_rtr_listener + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \\`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 +''') + +with open('debian/rpki-rp.prerm', "wb") as f: + f.write('''\ +#!/bin/sh +# prerm script for rpki-rp +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * <prerm> `remove' +# * <old-prerm> `upgrade' <new-version> +# * <new-prerm> `failed-upgrade' <old-version> +# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version> +# * <deconfigured's-prerm> `deconfigure' `in-favour' +# <package-being-installed> <version> `removing' +# <conflicting-package> <version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove) + + crontab -l -u rcynic 2>/dev/null | awk ' + $0 !~ "exec /usr/bin/rcynic-cron" { + line[++n] = $0; + } + END { + if (n) + for (i = 1; i <= n; i++) + print line[i] | "crontab -u rcynic -"; + else + system("crontab -u rcynic -r"); + }' + ;; + + upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \\`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 +''') + +with open('debian/rules', "wb") as f: + f.write('''\ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + +%: + dh $@ --with python2 + +override_dh_auto_configure: + dh_auto_configure -- --disable-target-installation + +override_dh_auto_test: + @true +''') + +os.makedirs('debian/source') + +with open('debian/source/format', "wb") as f: + f.write('''\ +3.0 (native) +''') diff --git a/buildtools/hack-debian-changelog.py b/buildtools/hack-debian-changelog.py new file mode 100644 index 00000000..01d66fd3 --- /dev/null +++ b/buildtools/hack-debian-changelog.py @@ -0,0 +1,110 @@ +# $Id$ +# +# Nasty hack to generate debian/changelog entries from subversion. +# This is useful to the extent that it allows us to generate new +# packages automatically with version numbers corresponding to +# subversion revisions; the human-readable part of the changelog may +# or may not be all that useful +# +# +# Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC") +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. + + +import debian.changelog +import email.utils +import subprocess +import textwrap +import time +import calendar +import errno +import os + +try: + from lxml.etree import XML +except ImportError: + from xml.etree.ElementTree import XML + +fn = "debian/changelog" + +ignore_trivial_changes = False + +trivial_changes = ("Pull from trunk.", "Merge from trunk.", "Checkpoint.", "Cleanup.") + +# Fill this in (somehow) with real email addresses if and when we +# care. Right now we only care to the extent that failing to comply +# with the required syntax breaks package builds. + +author_map = {} + +author_default_format = "%s <%s@rpki.net>" + +# Main + +changelog = debian.changelog.Changelog() + +try: + with open(fn) as f: + changelog.parse_changelog(f) + latest = int(str(changelog.version).split(".")[1]) + print "Parsed", fn, "latest change", latest +except IOError, e: + if e.errno == errno.ENOENT: + print fn, "not found, starting new changelog" + latest = 0 + else: + raise + +print "Pulling change list from subversion" + +svn = XML(subprocess.check_output(("svn", "log", "--xml", "--revision", "%s:COMMITTED" % (latest + 1)))) + +first_wrapper = textwrap.TextWrapper(initial_indent = " * ", subsequent_indent = " ") +rest_wrapper = textwrap.TextWrapper(initial_indent = " ", subsequent_indent = " ") + +changed = 0 + +print "Generating new change entries" + +for elt in svn.findall("logentry"): + msg = elt.findtext("msg") + author = elt.findtext("author") + + if ignore_trivial_changes and (msg in trivial_changes or msg + "." in trivial_changes): + continue + + author = author_map.get(author, author_default_format % (author, author)) + + changelog.new_block( + package = changelog.package, + version = "0." + elt.get("revision"), + distributions = changelog.distributions, + urgency = changelog.urgency, + author = author, + date = email.utils.formatdate(calendar.timegm(time.strptime(elt.findtext("date"), + "%Y-%m-%dT%H:%M:%S.%fZ")))) + changelog.add_change("\n\n".join((rest_wrapper if i else first_wrapper).fill(s) + for i, s in enumerate(msg.split("\n\n")))) + + changed += 1 + +if changed: + print changed, "new entries" + with open(fn + ".new", "w") as f: + print "Writing", f.name + changelog.write_to_open_file(f) + print "Renaming %s.new to %s" % (fn, fn) + os.rename(fn + ".new", fn) +else: + print "No changes" diff --git a/buildtools/make-rcynic-script.py b/buildtools/make-rcynic-script.py index 1bdd7960..472faa98 100644 --- a/buildtools/make-rcynic-script.py +++ b/buildtools/make-rcynic-script.py @@ -1,7 +1,7 @@ """ $Id$ -Copyright (C) 2011-2012 Internet Systems Consortium ("ISC") +Copyright (C) 2011-2013 Internet Systems Consortium ("ISC") Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -23,10 +23,16 @@ sys.stdout.write('''\ #!%(AC_PYTHON_INTERPRETER)s # Automatically constructed script header -ac_rrdtool_binary = "%(AC_RRDTOOL_BINARY)s" +''' % os.environ) + +for k, v in os.environ.iteritems(): + if k.startswith("AC_") and k != "AC_PYTHON_INTERPRETER": + sys.stdout.write("%s = '''%s'''\n" % (k.lower(), v)) + +sys.stdout.write('''\ # Original script starts here -''' % os.environ) +''') sys.stdout.write(sys.stdin.read()) diff --git a/buildtools/wrap-tree.py b/buildtools/wrap-tree.py new file mode 100644 index 00000000..2123b79b --- /dev/null +++ b/buildtools/wrap-tree.py @@ -0,0 +1,61 @@ +""" +Package a directory tree inside a Python script. This is mostly +useful when generating templates for small trees of files one wants to +generate automatically with some customizations (eg, the skeleton for +some the packaging files needed by some platform or another). + +$Id$ + +Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC") + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +""" + +import os +import sys + +result = {} + +for root in sys.argv[1:] or ["."]: + if root != ".": + result[root] = None + for dirpath, dirs, files in os.walk(root): + for dn in dirs: + dn = os.path.relpath(os.path.join(dirpath, dn)) + result[dn] = None + for fn in files: + fn = os.path.relpath(os.path.join(dirpath, fn)) + with open(fn, "r") as f: + result[fn] = f.read() + +sys.stdout.write("# Automatically generated. Hack if you like, but beware of overwriting.\n\nimport os\n") + +for k in sorted(result): + v = result[k] + if v is None: + sys.stdout.write("\nos.makedirs(%r)\n" % k) + else: + sys.stdout.write("\nwith open(%r, \"wb\") as f:\n" % k) + lines = v.splitlines() + if v.endswith("\n"): + lines.append("") + sys.stdout.write(" f.write('''\\\n") + while lines: + words = lines.pop(0).replace("\\", "\\\\").split("'''") + sys.stdout.write(words[0]) + for word in words[1:]: + sys.stdout.write("''' + \"'''\" + '''") + sys.stdout.write(word) + if not lines: + sys.stdout.write("''')") + sys.stdout.write("\n") @@ -1,9 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for rpkitools 1.0. +# Generated by GNU Autoconf 2.61 for rpkitools 1.0. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -15,7 +15,7 @@ DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -37,45 +37,17 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi # Support unset when possible. @@ -91,6 +63,8 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) +as_nl=' +' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. @@ -113,7 +87,7 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -126,10 +100,17 @@ PS2='> ' PS4='+ ' # NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -151,7 +132,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -177,7 +158,7 @@ else as_have_required=no fi - if test $as_have_required = yes && (eval ": + if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } @@ -259,7 +240,7 @@ IFS=$as_save_IFS if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -280,7 +261,7 @@ _ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -360,10 +341,10 @@ fi if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi @@ -432,10 +413,9 @@ fi test \$exitcode = 0") || { echo No shell found that supports shell functions. - echo Please tell bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message } @@ -471,7 +451,7 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems @@ -499,6 +479,7 @@ case `echo -n x` in *) ECHO_N='-n';; esac + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -511,22 +492,19 @@ if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else as_ln_s='cp -p' fi @@ -551,10 +529,10 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -635,97 +613,108 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='LTLIBOBJS -LIBOBJS -WSGI_PROCESS_GROUP -WSGI_DAEMON_PROCESS -DJANGO_ADMIN -DJANGO_DIR -SECRET_KEY -VIRTUAL_ENV -OPENSSL_SO_GLOB -OPENSSL_CONFIG_COMMAND -TOP_LEVEL_SUBDIRS +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +RCYNIC_DIR +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +CPP +GREP +EGREP +LD_STATIC_FLAG +POW_LDFLAGS PYTHON -TRANG -RRDTOOL -SORT -AWK XSLTPROC -POW_LDFLAGS -LD_STATIC_FLAG -EGREP -GREP -CPP -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -with_system_openssl -enable_openssl_asm -enable_ca_tools -enable_rpki_rtr -enable_wsgi_daemon_mode -enable_python -enable_django -' +AWK +SORT +RRDTOOL +TRANG +RSYNC +SU +SUDO +CHROOT +CHROOTUID +RCYNIC_JAIL_DIRS +RCYNIC_CONF_FILE +RCYNIC_TA_DIR +RCYNIC_BIN_RCYNIC +RCYNIC_CONF_RSYNC +RCYNIC_CONF_DATA +RCYNIC_CONF_TA_DIR +RCYNIC_CRON_USER +RCYNIC_STATIC_RSYNC +RCYNIC_HTML_DIR +RCYNIC_INSTALL_TARGETS +RTR_ORIGIN_INSTALL_TARGETS +SETUP_PY_INSTALL_LAYOUT +TOP_LEVEL_SUBDIRS +OPENSSL_CONFIG_COMMAND +OPENSSL_SO_GLOB +VIRTUAL_ENV +SECRET_KEY +DJANGO_DIR +DJANGO_ADMIN +WSGI_DAEMON_PROCESS +WSGI_PROCESS_GROUP +LIBOBJS +LTLIBOBJS' +ac_subst_files='RCYNIC_MAKE_RULES +RTR_ORIGIN_MAKE_RULES' ac_precious_vars='build_alias host_alias target_alias +RCYNIC_DIR CC CFLAGS LDFLAGS @@ -737,8 +726,6 @@ CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -837,21 +824,13 @@ do datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -864,21 +843,13 @@ do dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -1069,38 +1040,22 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -1120,7 +1075,7 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option + -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -1129,16 +1084,16 @@ Try \`$0 --help' for more information." >&2 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1147,38 +1102,22 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 + { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. +# Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done @@ -1193,7 +1132,7 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -1209,10 +1148,10 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: working directory cannot be determined" >&2 + { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 + { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } @@ -1220,12 +1159,12 @@ test "X$ac_ls_di" = "X$ac_pwd_ls_di" || if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1252,12 +1191,12 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. @@ -1306,9 +1245,9 @@ Configuration: Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1318,25 +1257,25 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/rpkitools] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/rpkitools] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -1354,16 +1293,19 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-rcynic-jail Run rcynic in chroot jail --disable-openssl-asm Don't let OpenSSL build assembler code --disable-ca-tools Don't build any of the CA tools - --disable-rpki-rtr Don't build the rpki-rtr code + --disable-rp-tools Don't build any of the relying party tools + --disable-target-installation + Don't perform final target installation --enable-wsgi-daemon-mode=user:group Run the web portal as a separate process --disable-python (Obsolete, do not use) --disable-django (Obsolete, do not use) + --disable-rpki-rtr (Obsolete, do not use) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1371,6 +1313,8 @@ Optional Packages: --with-system-openssl Link against system copy of OpenSSL Some influential environment variables: + RCYNIC_DIR Where to put output files from rcynic and rtr-origin; also + controls jail location for --enable-rcynic-jail CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a @@ -1390,17 +1334,15 @@ fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue + test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1436,7 +1378,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1446,10 +1388,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF rpkitools configure 1.0 -generated by GNU Autoconf 2.63 +generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1460,7 +1402,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by rpkitools $as_me 1.0, which was -generated by GNU Autoconf 2.63. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -1496,7 +1438,7 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -1531,7 +1473,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; @@ -1583,12 +1525,11 @@ _ASBOX case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -1618,9 +1559,9 @@ _ASBOX do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + echo "$ac_var='\''$ac_val'\''" done | sort echo @@ -1635,9 +1576,9 @@ _ASBOX do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1653,8 +1594,8 @@ _ASBOX echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -1696,24 +1637,21 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE +# Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + set x "$prefix/share/config.site" "$prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" +shift +for ac_site_file do - test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1723,16 +1661,16 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1746,38 +1684,29 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1787,12 +1716,10 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -1850,8 +1777,8 @@ for ac_dir in buildtools "$srcdir"/buildtools; do fi done if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in buildtools \"$srcdir\"/buildtools" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in buildtools \"$srcdir\"/buildtools" >&2;} + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in buildtools \"$srcdir\"/buildtools" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in buildtools \"$srcdir\"/buildtools" >&2;} { (exit 1); exit 1; }; } fi @@ -1866,34 +1793,34 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } -{ $as_echo "$as_me:$LINENO: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } +{ echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -$as_echo "$as_me: error: invalid value of canonical build" >&2;} +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build @@ -1910,27 +1837,27 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:$LINENO: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -$as_echo "$as_me: error: invalid value of canonical host" >&2;} +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host @@ -1968,6 +1895,13 @@ else with_system_openssl=auto fi +# Check whether --enable-rcynic_jail was given. +if test "${enable_rcynic_jail+set}" = set; then + enableval=$enable_rcynic_jail; +else + enable_rcynic_jail=no +fi + # Check whether --enable-openssl_asm was given. if test "${enable_openssl_asm+set}" = set; then enableval=$enable_openssl_asm; @@ -1982,11 +1916,18 @@ else enable_ca_tools=yes fi -# Check whether --enable-rpki_rtr was given. -if test "${enable_rpki_rtr+set}" = set; then - enableval=$enable_rpki_rtr; +# Check whether --enable-rp_tools was given. +if test "${enable_rp_tools+set}" = set; then + enableval=$enable_rp_tools; else - enable_rpki_rtr=yes + enable_rp_tools=yes +fi + +# Check whether --enable-target_installation was given. +if test "${enable_target_installation+set}" = set; then + enableval=$enable_target_installation; +else + enable_target_installation=yes fi # Check whether --enable-wsgi_daemon_mode was given. @@ -1997,19 +1938,28 @@ else fi + + # Obsolete options. If you know of a better way to handle this, tell me. # Check whether --enable-python was given. if test "${enable_python+set}" = set; then - enableval=$enable_python; { { $as_echo "$as_me:$LINENO: error: --disable-python is obsolete. Please see the --disable-ca-tools option" >&5 -$as_echo "$as_me: error: --disable-python is obsolete. Please see the --disable-ca-tools option" >&2;} + enableval=$enable_python; { { echo "$as_me:$LINENO: error: --disable-python is obsolete. Please see the --disable-ca-tools option" >&5 +echo "$as_me: error: --disable-python is obsolete. Please see the --disable-ca-tools option" >&2;} { (exit 1); exit 1; }; } fi # Check whether --enable-django was given. if test "${enable_django+set}" = set; then - enableval=$enable_django; { { $as_echo "$as_me:$LINENO: error: --disable-django is obsolete. Please see the --disable-ca-tools option" >&5 -$as_echo "$as_me: error: --disable-django is obsolete. Please see the --disable-ca-tools option" >&2;} + enableval=$enable_django; { { echo "$as_me:$LINENO: error: --disable-django is obsolete. Please see the --disable-ca-tools option" >&5 +echo "$as_me: error: --disable-django is obsolete. Please see the --disable-ca-tools option" >&2;} + { (exit 1); exit 1; }; } +fi + +# Check whether --enable-rpki_rtr was given. +if test "${enable_rpki_rtr+set}" = set; then + enableval=$enable_rpki_rtr; { { echo "$as_me:$LINENO: error: --disable-rpki-rtr is obsolete. Please see the --disable-rp-tools option" >&5 +echo "$as_me: error: --disable-rpki-rtr is obsolete. Please see the --disable-rp-tools option" >&2;} { (exit 1); exit 1; }; } fi @@ -2022,10 +1972,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2038,7 +1988,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2049,11 +1999,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2062,10 +2012,10 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2078,7 +2028,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2089,11 +2039,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -2101,8 +2051,12 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2115,10 +2069,10 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2131,7 +2085,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2142,11 +2096,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2155,10 +2109,10 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2176,7 +2130,7 @@ do continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2199,11 +2153,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2214,10 +2168,10 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2230,7 +2184,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2241,11 +2195,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2258,10 +2212,10 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2274,7 +2228,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2285,11 +2239,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2301,8 +2255,12 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2312,50 +2270,44 @@ fi fi -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF @@ -2374,22 +2326,27 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done @@ -2400,11 +2357,10 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' @@ -2415,7 +2371,7 @@ for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most @@ -2442,27 +2398,25 @@ else ac_file='' fi -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C compiler cannot create executables +echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then @@ -2471,53 +2425,49 @@ if test "$cross_compiling" != yes; then *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C compiled programs. +echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi fi fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -2526,33 +2476,31 @@ $as_echo "$ac_try_echo") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2575,43 +2523,40 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile +echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2637,21 +2582,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no @@ -2661,19 +2605,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes @@ -2700,21 +2640,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" @@ -2739,21 +2678,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag @@ -2779,21 +2717,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2808,8 +2745,8 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2825,10 +2762,10 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC @@ -2899,21 +2836,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2929,15 +2865,15 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac @@ -2960,12 +2896,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -2994,29 +2929,17 @@ case $as_dir/ in # program-specific install script used by HP pwplus--don't use. : else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 fi fi done done ;; esac - done IFS=$as_save_IFS -rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then @@ -3029,8 +2952,8 @@ fi INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -3047,15 +2970,15 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -3087,21 +3010,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -3125,14 +3047,13 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err @@ -3140,7 +3061,7 @@ $as_echo "$ac_try_echo") >&5 # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -3165,8 +3086,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 -$as_echo "$CPP" >&6; } +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3194,21 +3115,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -3232,14 +3152,13 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err @@ -3247,7 +3166,7 @@ $as_echo "$ac_try_echo") >&5 # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -3263,13 +3182,11 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi ac_ext=c @@ -3279,37 +3196,42 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -z "$GREP"; then ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" + echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` @@ -3324,60 +3246,74 @@ case `"$ac_path_GREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - $ac_path_GREP_found && break 3 - done + + $ac_path_GREP_found && break 3 done done + +done IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } - fi +fi + else ac_cv_path_GREP=$GREP fi + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else - if test -z "$EGREP"; then + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" + echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` @@ -3392,31 +3328,40 @@ case `"$ac_path_EGREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - $ac_path_EGREP_found && break 3 - done + + $ac_path_EGREP_found && break 3 done done + +done IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } - fi +fi + else ac_cv_path_EGREP=$EGREP fi + fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3443,21 +3388,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no @@ -3482,7 +3426,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | else ac_cv_header_stdc=no fi -rm -f conftest* +rm -f -r conftest* fi @@ -3503,7 +3447,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | else ac_cv_header_stdc=no fi -rm -f conftest* +rm -f -r conftest* fi @@ -3549,40 +3493,37 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -3604,11 +3545,11 @@ fi for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3626,21 +3567,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" @@ -3648,15 +3588,12 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -3664,14 +3601,68 @@ fi done +{ echo "$as_me:$LINENO: checking for long" >&5 +echo $ECHO_N "checking for long... $ECHO_C" >&6; } +if test "${ac_cv_type_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef long ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_long=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 +echo "${ECHO_T}$ac_cv_type_long" >&6; } + # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } +{ echo "$as_me:$LINENO: checking size of long" >&5 +echo $ECHO_N "checking size of long... $ECHO_C" >&6; } if test "${ac_cv_sizeof_long+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -3682,10 +3673,11 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -3698,14 +3690,13 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -3719,10 +3710,11 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -3735,21 +3727,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -3763,7 +3754,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -3773,10 +3764,11 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -3789,14 +3781,13 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -3810,10 +3801,11 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -3826,21 +3818,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -3854,7 +3845,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -3874,10 +3865,11 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -3890,21 +3882,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -3915,13 +3906,11 @@ done case $ac_lo in ?*) ac_cv_sizeof_long=$ac_lo;; '') if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long) +echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else ac_cv_sizeof_long=0 fi ;; @@ -3934,8 +3923,9 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (long)); } -static unsigned long int ulongval () { return (long int) (sizeof (long)); } + typedef long ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include <stdio.h> #include <stdlib.h> int @@ -3945,22 +3935,20 @@ main () FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (long))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (long)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (long)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -3973,48 +3961,43 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_long=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long) +echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else ac_cv_sizeof_long=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long" >&6; } @@ -4042,13 +4025,17 @@ _ACEOF case $host_os in -freebsd*) LD_STATIC_FLAG='-static';; -*) LD_STATIC_FLAG='';; + freebsd*) + LD_STATIC_FLAG='-static' + ;; + *) + LD_STATIC_FLAG='' + ;; esac -{ $as_echo "$as_me:$LINENO: checking whether compiler and linker support -Wl,-Bsymbolic" >&5 -$as_echo_n "checking whether compiler and linker support -Wl,-Bsymbolic... " >&6; } +{ echo "$as_me:$LINENO: checking whether compiler and linker support -Wl,-Bsymbolic" >&5 +echo $ECHO_N "checking whether compiler and linker support -Wl,-Bsymbolic... $ECHO_C" >&6; } old_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -Wl,-Bsymbolic" cat >conftest.$ac_ext <<_ACEOF @@ -4065,34 +4052,30 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then linker_supports_Bsymbolic=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 linker_supports_Bsymbolic=no fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $linker_supports_Bsymbolic" >&5 -$as_echo "$linker_supports_Bsymbolic" >&6; } +{ echo "$as_me:$LINENO: result: $linker_supports_Bsymbolic" >&5 +echo "${ECHO_T}$linker_supports_Bsymbolic" >&6; } LDFLAGS="$old_LDFLAGS" unset old_LDFLAGS if test $linker_supports_Bsymbolic = yes @@ -4103,8 +4086,8 @@ else fi -{ $as_echo "$as_me:$LINENO: checking whether compiler and linker support -Wl,-z,noexecstack" >&5 -$as_echo_n "checking whether compiler and linker support -Wl,-z,noexecstack... " >&6; } +{ echo "$as_me:$LINENO: checking whether compiler and linker support -Wl,-z,noexecstack" >&5 +echo $ECHO_N "checking whether compiler and linker support -Wl,-z,noexecstack... $ECHO_C" >&6; } old_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -Wl,-z,noexecstack" cat >conftest.$ac_ext <<_ACEOF @@ -4121,46 +4104,161 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then linker_supports_znoexecstack=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 linker_supports_znoexecstack=no fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $linker_supports_znoexecstack" >&5 -$as_echo "$linker_supports_znoexecstack" >&6; } +{ echo "$as_me:$LINENO: result: $linker_supports_znoexecstack" >&5 +echo "${ECHO_T}$linker_supports_znoexecstack" >&6; } if test $linker_supports_znoexecstack = no then LDFLAGS="$old_LDFLAGS" fi unset old_LDFLAGS +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +# Extract the first word of "python", so it can be a program name with args. +set dummy python; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PYTHON+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { echo "$as_me:$LINENO: result: $PYTHON" >&5 +echo "${ECHO_T}$PYTHON" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + # Extract the first word of "xsltproc", so it can be a program name with args. set dummy xsltproc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_XSLTPROC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $XSLTPROC in [\\/]* | ?:[\\/]*) @@ -4175,7 +4273,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4187,20 +4285,20 @@ esac fi XSLTPROC=$ac_cv_path_XSLTPROC if test -n "$XSLTPROC"; then - { $as_echo "$as_me:$LINENO: result: $XSLTPROC" >&5 -$as_echo "$XSLTPROC" >&6; } + { echo "$as_me:$LINENO: result: $XSLTPROC" >&5 +echo "${ECHO_T}$XSLTPROC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "awk", so it can be a program name with args. set dummy awk; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_AWK+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $AWK in [\\/]* | ?:[\\/]*) @@ -4215,7 +4313,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4227,20 +4325,20 @@ esac fi AWK=$ac_cv_path_AWK if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 -$as_echo "$AWK" >&6; } + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "sort", so it can be a program name with args. set dummy sort; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_SORT+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $SORT in [\\/]* | ?:[\\/]*) @@ -4255,7 +4353,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4267,20 +4365,20 @@ esac fi SORT=$ac_cv_path_SORT if test -n "$SORT"; then - { $as_echo "$as_me:$LINENO: result: $SORT" >&5 -$as_echo "$SORT" >&6; } + { echo "$as_me:$LINENO: result: $SORT" >&5 +echo "${ECHO_T}$SORT" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "rrdtool", so it can be a program name with args. set dummy rrdtool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_RRDTOOL+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $RRDTOOL in [\\/]* | ?:[\\/]*) @@ -4295,7 +4393,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_RRDTOOL="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4307,89 +4405,185 @@ esac fi RRDTOOL=$ac_cv_path_RRDTOOL if test -n "$RRDTOOL"; then - { $as_echo "$as_me:$LINENO: result: $RRDTOOL" >&5 -$as_echo "$RRDTOOL" >&6; } + { echo "$as_me:$LINENO: result: $RRDTOOL" >&5 +echo "${ECHO_T}$RRDTOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - $as_echo_n "(cached) " >&6 +# Extract the first word of "trang", so it can be a program name with args. +set dummy trang; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_TRANG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST + case $TRANG in + [\\/]* | ?:[\\/]*) + ac_cv_path_TRANG="$TRANG" # Let the user override the test with a path. + ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_TRANG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_TRANG" && ac_cv_path_TRANG="\${abs_top_srcdir}/buildtools/trang-not-found" + ;; esac +fi +TRANG=$ac_cv_path_TRANG +if test -n "$TRANG"; then + { echo "$as_me:$LINENO: result: $TRANG" >&5 +echo "${ECHO_T}$TRANG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi - $ac_path_GREP_found && break 3 - done - done + +# Extract the first word of "rsync", so it can be a program name with args. +set dummy rsync; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_RSYNC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $RSYNC in + [\\/]* | ?:[\\/]*) + ac_cv_path_RSYNC="$RSYNC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_RSYNC="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + + ;; +esac +fi +RSYNC=$ac_cv_path_RSYNC +if test -n "$RSYNC"; then + { echo "$as_me:$LINENO: result: $RSYNC" >&5 +echo "${ECHO_T}$RSYNC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# Extract the first word of "su", so it can be a program name with args. +set dummy su; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_SU+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $SU in + [\\/]* | ?:[\\/]*) + ac_cv_path_SU="$SU" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_SU="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +SU=$ac_cv_path_SU +if test -n "$SU"; then + { echo "$as_me:$LINENO: result: $SU" >&5 +echo "${ECHO_T}$SU" >&6; } else - ac_cv_path_GREP=$GREP + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + +# Extract the first word of "sudo", so it can be a program name with args. +set dummy sudo; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_SUDO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_SUDO="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $SUDO" >&5 +echo "${ECHO_T}$SUDO" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" -# Extract the first word of "trang", so it can be a program name with args. -set dummy trang; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_TRANG+set}" = set; then - $as_echo_n "(cached) " >&6 +# Extract the first word of "chroot", so it can be a program name with args. +set dummy chroot; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_CHROOT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $TRANG in + case $CHROOT in [\\/]* | ?:[\\/]*) - ac_cv_path_TRANG="$TRANG" # Let the user override the test with a path. + ac_cv_path_CHROOT="$CHROOT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4399,25 +4593,64 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_TRANG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_path_CHROOT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS - test -z "$ac_cv_path_TRANG" && ac_cv_path_TRANG="\${abs_top_srcdir}/buildtools/trang-not-found" ;; esac fi -TRANG=$ac_cv_path_TRANG -if test -n "$TRANG"; then - { $as_echo "$as_me:$LINENO: result: $TRANG" >&5 -$as_echo "$TRANG" >&6; } +CHROOT=$ac_cv_path_CHROOT +if test -n "$CHROOT"; then + { echo "$as_me:$LINENO: result: $CHROOT" >&5 +echo "${ECHO_T}$CHROOT" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# Extract the first word of "chrootuid", so it can be a program name with args. +set dummy chrootuid; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_CHROOTUID+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $CHROOTUID in + [\\/]* | ?:[\\/]*) + ac_cv_path_CHROOTUID="$CHROOTUID" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_CHROOTUID="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +CHROOTUID=$ac_cv_path_CHROOTUID +if test -n "$CHROOTUID"; then + { echo "$as_me:$LINENO: result: $CHROOTUID" >&5 +echo "${ECHO_T}$CHROOTUID" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -4458,10 +4691,10 @@ case $with_system_openssl in have_usable_openssl=no ;; *) - { $as_echo "$as_me:$LINENO: checking for v3_addr_validate_path in -lcrypto" >&5 -$as_echo_n "checking for v3_addr_validate_path in -lcrypto... " >&6; } + { echo "$as_me:$LINENO: checking for v3_addr_validate_path in -lcrypto" >&5 +echo $ECHO_N "checking for v3_addr_validate_path in -lcrypto... $ECHO_C" >&6; } if test "${ac_cv_lib_crypto_v3_addr_validate_path+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" @@ -4493,47 +4726,43 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_crypto_v3_addr_validate_path=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_crypto_v3_addr_validate_path=no fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_v3_addr_validate_path" >&5 -$as_echo "$ac_cv_lib_crypto_v3_addr_validate_path" >&6; } -if test "x$ac_cv_lib_crypto_v3_addr_validate_path" = x""yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_v3_addr_validate_path" >&5 +echo "${ECHO_T}$ac_cv_lib_crypto_v3_addr_validate_path" >&6; } +if test $ac_cv_lib_crypto_v3_addr_validate_path = yes; then system_openssl_has_rfc3779=yes else system_openssl_has_rfc3779=no fi - { $as_echo "$as_me:$LINENO: checking for CMS_verify in -lcrypto" >&5 -$as_echo_n "checking for CMS_verify in -lcrypto... " >&6; } + { echo "$as_me:$LINENO: checking for CMS_verify in -lcrypto" >&5 +echo $ECHO_N "checking for CMS_verify in -lcrypto... $ECHO_C" >&6; } if test "${ac_cv_lib_crypto_CMS_verify+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" @@ -4565,37 +4794,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_crypto_CMS_verify=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_crypto_CMS_verify=no fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CMS_verify" >&5 -$as_echo "$ac_cv_lib_crypto_CMS_verify" >&6; } -if test "x$ac_cv_lib_crypto_CMS_verify" = x""yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CMS_verify" >&5 +echo "${ECHO_T}$ac_cv_lib_crypto_CMS_verify" >&6; } +if test $ac_cv_lib_crypto_CMS_verify = yes; then system_openssl_has_cms=yes else system_openssl_has_cms=no @@ -4615,8 +4840,8 @@ case $with_system_openssl in build_openssl=no if test $have_usable_openssl = no then - { { $as_echo "$as_me:$LINENO: error: Can't find OpenSSL crypto library with CMS and RFC 3779 support, try --with-system-openssl=/path/to/openssl" >&5 -$as_echo "$as_me: error: Can't find OpenSSL crypto library with CMS and RFC 3779 support, try --with-system-openssl=/path/to/openssl" >&2;} + { { echo "$as_me:$LINENO: error: Can't find OpenSSL crypto library with CMS and RFC 3779 support, try --with-system-openssl=/path/to/openssl" >&5 +echo "$as_me: error: Can't find OpenSSL crypto library with CMS and RFC 3779 support, try --with-system-openssl=/path/to/openssl" >&2;} { (exit 1); exit 1; }; } fi ;; @@ -4635,8 +4860,8 @@ $as_echo "$as_me: error: Can't find OpenSSL crypto library with CMS and RFC 3779 build_openssl=no if test $have_usable_openssl = no then - { { $as_echo "$as_me:$LINENO: error: Can't find OpenSSL crypto library with CMS and RFC 3779 support in $with_system_openssl" >&5 -$as_echo "$as_me: error: Can't find OpenSSL crypto library with CMS and RFC 3779 support in $with_system_openssl" >&2;} + { { echo "$as_me:$LINENO: error: Can't find OpenSSL crypto library with CMS and RFC 3779 support in $with_system_openssl" >&5 +echo "$as_me: error: Can't find OpenSSL crypto library with CMS and RFC 3779 support in $with_system_openssl" >&2;} { (exit 1); exit 1; }; } fi esac @@ -4662,58 +4887,180 @@ case $enable_openssl_asm in esac ;; *) - { { $as_echo "$as_me:$LINENO: error: Unrecognized value for --enable-openssl-asm: $enable_openssl_asm" >&5 -$as_echo "$as_me: error: Unrecognized value for --enable-openssl-asm: $enable_openssl_asm" >&2;} + { { echo "$as_me:$LINENO: error: Unrecognized value for --enable-openssl-asm: $enable_openssl_asm" >&5 +echo "$as_me: error: Unrecognized value for --enable-openssl-asm: $enable_openssl_asm" >&2;} { (exit 1); exit 1; }; } ;; esac -# 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 -# versions. +# RCYNIC_DIR is a "precious" argument variable to this script (see +# autoconf doc), which means that autoconf is careful with whatever +# value (if any) was passed in, and that it's already been declared +# for variable substitution. We still have to set a default value for +# it, though, and we might as well handle DESTDIR while we're at it. -# Extract the first word of "python", so it can be a program name with args. -set dummy python; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PYTHON+set}" = set; then - $as_echo_n "(cached) " >&6 +if test "X$RCYNIC_DIR" = "X" +then + rcynic_base_dir='/var/rcynic' else - case $PYTHON in - [\\/]* | ?:[\\/]*) - ac_cv_path_PYTHON="$PYTHON" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS + rcynic_base_dir="${RCYNIC_DIR}" +fi - ;; +RCYNIC_DIR='${DESTDIR}'"${rcynic_base_dir}" + +# Figure out whether to run rcynic in a chroot jail, which determines +# a bunch of other settings. + +{ echo "$as_me:$LINENO: checking whether to build chroot jail for rcynic" >&5 +echo $ECHO_N "checking whether to build chroot jail for rcynic... $ECHO_C" >&6; } + +case $enable_rcynic_jail in + yes) + 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' + RCYNIC_CRON_USER='root' + RCYNIC_JAIL_DIRS='${RCYNIC_DIR}/bin ${RCYNIC_DIR}/dev ${RCYNIC_DIR}/etc' + if test "X$host_os" = "Xlinux" + then + RCYNIC_JAIL_DIRS="RCYNIC_JAIL_DIRS "'${RCYNIC_DIR}/lib ${RCYNIC_DIR}/lib64 ${RCYNIC_DIR}/usr/lib' + fi + ;; + no) + use_rcynic_jail=no + RCYNIC_CONF_FILE='${DESTDIR}${sysconfdir}/rcynic.conf' + RCYNIC_TA_DIR='${DESTDIR}${sysconfdir}/rpki/trust-anchors' + RCYNIC_BIN_RCYNIC='${DESTDIR}${bindir}/rcynic' + 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_JAIL_DIRS='' + ;; + *) + { { echo "$as_me:$LINENO: error: Unrecognized value for --enable-rcynic-jail: $enable_rcynic_jail" >&5 +echo "$as_me: error: Unrecognized value for --enable-rcynic-jail: $enable_rcynic_jail" >&2;} + { (exit 1); exit 1; }; } + ;; esac -fi -PYTHON=$ac_cv_path_PYTHON -if test -n "$PYTHON"; then - { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5 -$as_echo "$PYTHON" >&6; } + + + + + + + + + + +{ echo "$as_me:$LINENO: result: $use_rcynic_jail" >&5 +echo "${ECHO_T}$use_rcynic_jail" >&6; } + +if test $use_rcynic_jail = yes && test "X$LD_STATIC_FLAG" != "X" +then + RCYNIC_STATIC_RSYNC='static-rsync/rsync' else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + RCYNIC_STATIC_RSYNC='' +fi + + + +# Check whether to do "final target installation". This means actions +# that can only be done when installing a package, as opposed to when +# building a package. On FreeBSD this is sort of irrelevant, because +# of the way package installs work when building from source, but on +# Debian and Ubuntu, for example, there's a strict separation between +# things that are done during package build and things that are done +# by the binary package's {pre,post}inst scripts. + +{ echo "$as_me:$LINENO: checking whether to do final target installation on \"make install\"" >&5 +echo $ECHO_N "checking whether to do final target installation on \"make install\"... $ECHO_C" >&6; } + +case $enable_target_installation in + yes|no) + ;; + *) + { { echo "$as_me:$LINENO: error: Unrecognized value for --enable-target-installation: $enable_target_installation" >&5 +echo "$as_me: error: Unrecognized value for --enable-target-installation: $enable_target_installation" >&2;} + { (exit 1); exit 1; }; } + ;; +esac + +{ echo "$as_me:$LINENO: result: $enable_target_installation" >&5 +echo "${ECHO_T}$enable_target_installation" >&6; } + +# rcynic jail setup is complicated enough that it's simplest to have +# different rule sets for different platforms. Icky, but.... +# rpki-rtr isn't as complicated, but has similar issues, same hack. + +case $host_os in + darwin*) + RCYNIC_MAKE_RULES='rcynic/rules.darwin.mk' + RTR_ORIGIN_MAKE_RULES='rtr-origin/rules.darwin.mk' + ;; + freebsd*) + RCYNIC_MAKE_RULES='rcynic/rules.freebsd.mk' + RTR_ORIGIN_MAKE_RULES='rtr-origin/rules.freebsd.mk' + ;; + linux*) + RCYNIC_MAKE_RULES='rcynic/rules.linux.mk' + RTR_ORIGIN_MAKE_RULES='rtr-origin/rules.linux.mk' + ;; + *) + RCYNIC_MAKE_RULES='rcynic/rules.unknown.mk' + RTR_ORIGIN_MAKE_RULES='rtr-origin/rules.unknown.mk' + ;; +esac + + + + +# Where to put HTML files is similarly platform dependent, we have to know. +# rcynic-cron will skip generating HTML files if it has no place to put them. + +case $host_os in + freebsd*) + RCYNIC_HTML_DIR='/usr/local/www/apache22/data/rcynic' + ;; + linux*) + RCYNIC_HTML_DIR='/var/www/rcynic' + ;; + *) + RCYNIC_HTML_DIR='' + ;; +esac + + + +# Sort out which things to install, depending on rcynic jail status and whether +# we're doing final target installation. + +RCYNIC_INSTALL_TARGETS='install-always' +RTR_ORIGIN_INSTALL_TARGETS='install-always' + +if test $use_rcynic_jail = yes +then + RCYNIC_INSTALL_TARGETS="$RCYNIC_INSTALL_TARGETS install-jailed" +fi + +if test $enable_target_installation = yes +then + RCYNIC_INSTALL_TARGETS="$RCYNIC_INSTALL_TARGETS install-postconf" + RTR_ORIGIN_INSTALL_TARGETS="$RTR_ORIGIN_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 +# versions. + have_python=no have_acceptable_python=no have_python_h=no @@ -4730,33 +5077,32 @@ if test "x$PYTHON" != "x" then have_python=yes - { $as_echo "$as_me:$LINENO: checking for Python version 2.6 or higher" >&5 -$as_echo_n "checking for Python version 2.6 or higher... " >&6; } + { echo "$as_me:$LINENO: checking for Python version 2.6 or higher" >&5 +echo $ECHO_N "checking for Python version 2.6 or higher... $ECHO_C" >&6; } have_acceptable_python=`$PYTHON -c 'import sys; print "yes" if sys.version_info[0] == 2 and sys.version_info[1] >= 6 else "no"'` - { $as_echo "$as_me:$LINENO: result: $have_acceptable_python" >&5 -$as_echo "$have_acceptable_python" >&6; } + { echo "$as_me:$LINENO: result: $have_acceptable_python" >&5 +echo "${ECHO_T}$have_acceptable_python" >&6; } - { $as_echo "$as_me:$LINENO: checking distutils to find out where Python.h should be" >&5 -$as_echo_n "checking distutils to find out where Python.h should be... " >&6; } + { echo "$as_me:$LINENO: checking distutils to find out where Python.h should be" >&5 +echo $ECHO_N "checking distutils to find out where Python.h should be... $ECHO_C" >&6; } python_h=`$PYTHON -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_inc() + "/Python.h"'` - { $as_echo "$as_me:$LINENO: result: $python_h" >&5 -$as_echo "$python_h" >&6; } + { echo "$as_me:$LINENO: result: $python_h" >&5 +echo "${ECHO_T}$python_h" >&6; } - as_ac_Header=`$as_echo "ac_cv_header_$python_h" | $as_tr_sh` + as_ac_Header=`echo "ac_cv_header_$python_h" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $python_h" >&5 -$as_echo_n "checking for $python_h... " >&6; } + { echo "$as_me:$LINENO: checking for $python_h" >&5 +echo $ECHO_N "checking for $python_h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $python_h usability" >&5 -$as_echo_n "checking $python_h usability... " >&6; } +{ echo "$as_me:$LINENO: checking $python_h usability" >&5 +echo $ECHO_N "checking $python_h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4772,33 +5118,32 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking $python_h presence" >&5 -$as_echo_n "checking $python_h presence... " >&6; } +{ echo "$as_me:$LINENO: checking $python_h presence" >&5 +echo $ECHO_N "checking $python_h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4812,71 +5157,67 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $python_h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $python_h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $python_h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $python_h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $python_h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $python_h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $python_h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $python_h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $python_h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $python_h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $python_h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $python_h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $python_h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $python_h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $python_h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $python_h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $python_h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $python_h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $python_h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $python_h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: $python_h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $python_h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $python_h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $python_h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $python_h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $python_h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $python_h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $python_h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $python_h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $python_h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $python_h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $python_h: in the future, the compiler will take precedence" >&2;} ;; esac -{ $as_echo "$as_me:$LINENO: checking for $python_h" >&5 -$as_echo_n "checking for $python_h... " >&6; } +{ echo "$as_me:$LINENO: checking for $python_h" >&5 +echo $ECHO_N "checking for $python_h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +if test `eval echo '${'$as_ac_Header'}'` = yes; then have_python_h=yes else have_python_h=no @@ -4884,193 +5225,226 @@ fi - { $as_echo "$as_me:$LINENO: checking for lxml.etree" >&5 -$as_echo_n "checking for lxml.etree... " >&6; } + { echo "$as_me:$LINENO: checking for lxml.etree" >&5 +echo $ECHO_N "checking for lxml.etree... $ECHO_C" >&6; } if $PYTHON -c 'import lxml.etree' 2>/dev/null then have_lxml=yes fi - { $as_echo "$as_me:$LINENO: result: $have_lxml" >&5 -$as_echo "$have_lxml" >&6; } + { echo "$as_me:$LINENO: result: $have_lxml" >&5 +echo "${ECHO_T}$have_lxml" >&6; } - { $as_echo "$as_me:$LINENO: checking for MySQLdb" >&5 -$as_echo_n "checking for MySQLdb... " >&6; } + { echo "$as_me:$LINENO: checking for MySQLdb" >&5 +echo $ECHO_N "checking for MySQLdb... $ECHO_C" >&6; } if $PYTHON -c 'import MySQLdb' 2>/dev/null then have_mysqldb=yes fi - { $as_echo "$as_me:$LINENO: result: $have_mysqldb" >&5 -$as_echo "$have_mysqldb" >&6; } + { echo "$as_me:$LINENO: result: $have_mysqldb" >&5 +echo "${ECHO_T}$have_mysqldb" >&6; } - { $as_echo "$as_me:$LINENO: checking for Django" >&5 -$as_echo_n "checking for Django... " >&6; } + { echo "$as_me:$LINENO: checking for Django" >&5 +echo $ECHO_N "checking for Django... $ECHO_C" >&6; } if $PYTHON -c 'import django' 2>/dev/null then have_django="yes" fi - { $as_echo "$as_me:$LINENO: result: $have_django" >&5 -$as_echo "$have_django" >&6; } + { echo "$as_me:$LINENO: result: $have_django" >&5 +echo "${ECHO_T}$have_django" >&6; } if test $have_django = yes then - { $as_echo "$as_me:$LINENO: checking for Django 1.3 or higher" >&5 -$as_echo_n "checking for Django 1.3 or higher... " >&6; } + { echo "$as_me:$LINENO: checking for Django 1.3 or higher" >&5 +echo $ECHO_N "checking for Django 1.3 or higher... $ECHO_C" >&6; } have_acceptable_django=`$PYTHON -c "import django; print 'no' if django.VERSION < (1, 3) else 'yes'"` - { $as_echo "$as_me:$LINENO: result: $have_acceptable_django" >&5 -$as_echo "$have_acceptable_django" >&6; } + { echo "$as_me:$LINENO: result: $have_acceptable_django" >&5 +echo "${ECHO_T}$have_acceptable_django" >&6; } fi - { $as_echo "$as_me:$LINENO: checking for PyYAML" >&5 -$as_echo_n "checking for PyYAML... " >&6; } + { echo "$as_me:$LINENO: checking for PyYAML" >&5 +echo $ECHO_N "checking for PyYAML... $ECHO_C" >&6; } if $PYTHON -c 'import yaml' 2>/dev/null then have_pyyaml=yes fi - { $as_echo "$as_me:$LINENO: result: $have_pyyaml" >&5 -$as_echo "$have_pyyaml" >&6; } + { echo "$as_me:$LINENO: result: $have_pyyaml" >&5 +echo "${ECHO_T}$have_pyyaml" >&6; } - { $as_echo "$as_me:$LINENO: checking for vobject" >&5 -$as_echo_n "checking for vobject... " >&6; } + { echo "$as_me:$LINENO: checking for vobject" >&5 +echo $ECHO_N "checking for vobject... $ECHO_C" >&6; } if $PYTHON -c 'import vobject' 2>/dev/null then have_vobject=yes fi - { $as_echo "$as_me:$LINENO: result: $have_vobject" >&5 -$as_echo "$have_vobject" >&6; } + { echo "$as_me:$LINENO: result: $have_vobject" >&5 +echo "${ECHO_T}$have_vobject" >&6; } - { $as_echo "$as_me:$LINENO: checking for Django South" >&5 -$as_echo_n "checking for Django South... " >&6; } + { echo "$as_me:$LINENO: checking for Django South" >&5 +echo $ECHO_N "checking for Django South... $ECHO_C" >&6; } if $PYTHON -c 'import south' 2>/dev/null then have_django_south=yes fi - { $as_echo "$as_me:$LINENO: result: $have_django_south" >&5 -$as_echo "$have_django_south" >&6; } + { echo "$as_me:$LINENO: result: $have_django_south" >&5 +echo "${ECHO_T}$have_django_south" >&6; } if test $have_django_south = yes then - { $as_echo "$as_me:$LINENO: checking for Django South 0.7.6 or later" >&5 -$as_echo_n "checking for Django South 0.7.6 or later... " >&6; } + { echo "$as_me:$LINENO: checking for Django South 0.7.6 or later" >&5 +echo $ECHO_N "checking for Django South 0.7.6 or later... $ECHO_C" >&6; } have_acceptable_django_south=`$PYTHON -c "import south; print 'no' if map(int,south.__version__.split('.')) < [0, 7, 6] else 'yes'"` - { $as_echo "$as_me:$LINENO: result: $have_acceptable_django_south" >&5 -$as_echo "$have_acceptable_django_south" >&6; } + { echo "$as_me:$LINENO: result: $have_acceptable_django_south" >&5 +echo "${ECHO_T}$have_acceptable_django_south" >&6; } fi fi ok=yes -if test $enable_ca_tools = yes || test $enable_rpki_rtr = yes +if test $have_python = no then - if test $have_python = no - then - ok=no - { $as_echo "$as_me:$LINENO: WARNING: I can't find a Python binary, perhaps you need to set PATH?" >&5 -$as_echo "$as_me: WARNING: I can't find a Python binary, perhaps you need to set PATH?" >&2;} - fi - if test $have_acceptable_python = no - then - ok=no - { $as_echo "$as_me:$LINENO: WARNING: The RPKI code requires Python version 2.x, for x = 6 or higher." >&5 -$as_echo "$as_me: WARNING: The RPKI code requires Python version 2.x, for x = 6 or higher." >&2;} - fi - if test $ok = no - then - { $as_echo "$as_me:$LINENO: WARNING: If you do not wish to install the rpki-rtr code, please specify --disable-rpki-rtr as an argument to this configure script." >&5 -$as_echo "$as_me: WARNING: If you do not wish to install the rpki-rtr code, please specify --disable-rpki-rtr as an argument to this configure script." >&2;} - fi + ok=no + { echo "$as_me:$LINENO: WARNING: I can't find a Python binary, perhaps you need to set PATH?" >&5 +echo "$as_me: WARNING: I can't find a Python binary, perhaps you need to set PATH?" >&2;} +fi + +if test $have_acceptable_python = no +then + ok=no + { echo "$as_me:$LINENO: WARNING: The RPKI code requires Python version 2.x, for x = 6 or higher." >&5 +echo "$as_me: WARNING: The RPKI code requires Python version 2.x, for x = 6 or higher." >&2;} fi +case $enable_rp_tools in + yes) build_rp_tools=yes + ;; + no) build_rp_tools=no + ;; + *) { { echo "$as_me:$LINENO: error: Unrecognized value for --enable-rp-tools: $enable_rp_tools" >&5 +echo "$as_me: error: Unrecognized value for --enable-rp-tools: $enable_rp_tools" >&2;} + { (exit 1); exit 1; }; } + ;; +esac + case $enable_ca_tools in yes) build_ca_tools=yes if test $have_python_h = no then ok=no - { $as_echo "$as_me:$LINENO: WARNING: I can't find Python.h. Python sources are required to build the CA tools." >&5 -$as_echo "$as_me: WARNING: I can't find Python.h. Python sources are required to build the CA tools." >&2;} + { echo "$as_me:$LINENO: WARNING: I can't find Python.h. Python sources are required to build the CA tools." >&5 +echo "$as_me: WARNING: I can't find Python.h. Python sources are required to build the CA tools." >&2;} fi if test $have_acceptable_django = no then ok=no - { $as_echo "$as_me:$LINENO: WARNING: The RPKI CA tools require Django 1.3 or higher." >&5 -$as_echo "$as_me: WARNING: The RPKI CA tools require Django 1.3 or higher." >&2;} + { echo "$as_me:$LINENO: WARNING: The RPKI CA tools require Django 1.3 or higher." >&5 +echo "$as_me: WARNING: The RPKI CA tools require Django 1.3 or higher." >&2;} fi if test $have_vobject = no then ok=no - { $as_echo "$as_me:$LINENO: WARNING: The RPKI CA GUI requires the Python vobject module" >&5 -$as_echo "$as_me: WARNING: The RPKI CA GUI requires the Python vobject module" >&2;} + { echo "$as_me:$LINENO: WARNING: The RPKI CA GUI requires the Python vobject module" >&5 +echo "$as_me: WARNING: The RPKI CA GUI requires the Python vobject module" >&2;} fi if test $have_acceptable_django_south = no then ok=no - { $as_echo "$as_me:$LINENO: WARNING: The RPKI CA tools require Django South 0.7.6 or higher." >&5 -$as_echo "$as_me: WARNING: The RPKI CA tools require Django South 0.7.6 or higher." >&2;} + { echo "$as_me:$LINENO: WARNING: The RPKI CA tools require Django South 0.7.6 or higher." >&5 +echo "$as_me: WARNING: The RPKI CA tools require Django South 0.7.6 or higher." >&2;} fi # # This should be the last test in this group, so that failures get the --disable-ca-tools warning. # if test $ok = no then - { $as_echo "$as_me:$LINENO: WARNING: If you do not wish to install the RPKI CA tools, please specify --disable-ca-tools as an argument to this configure script." >&5 -$as_echo "$as_me: WARNING: If you do not wish to install the RPKI CA tools, please specify --disable-ca-tools as an argument to this configure script." >&2;} + { echo "$as_me:$LINENO: WARNING: If you do not wish to install the RPKI CA tools, please specify --disable-ca-tools as an argument to this configure script." >&5 +echo "$as_me: WARNING: If you do not wish to install the RPKI CA tools, please specify --disable-ca-tools as an argument to this configure script." >&2;} fi ;; no) build_ca_tools=no ;; - *) { { $as_echo "$as_me:$LINENO: error: Unrecognized value for --enable-ca-tools: $enable_ca_tools" >&5 -$as_echo "$as_me: error: Unrecognized value for --enable-ca-tools: $enable_ca_tools" >&2;} - { (exit 1); exit 1; }; };; -esac - -case $enable_rpki_rtr in - yes) build_rpki_rtr=yes - ;; - no) build_rpki_rtr=no - ;; - *) { { $as_echo "$as_me:$LINENO: error: Unrecognized value for --enable-rpki-rtr: $enable_rpki_rtr" >&5 -$as_echo "$as_me: error: Unrecognized value for --enable-rpki-rtr: $enable_rpki_rtr" >&2;} + *) { { echo "$as_me:$LINENO: error: Unrecognized value for --enable-ca-tools: $enable_ca_tools" >&5 +echo "$as_me: error: Unrecognized value for --enable-ca-tools: $enable_ca_tools" >&2;} { (exit 1); exit 1; }; };; esac - if test $build_ca_tools = yes && test $have_pyyaml = no then - { $as_echo "$as_me:$LINENO: WARNING: PyYAML missing, so \"make test\" will not work properly." >&5 -$as_echo "$as_me: WARNING: PyYAML missing, so \"make test\" will not work properly." >&2;} + { echo "$as_me:$LINENO: WARNING: PyYAML missing, so \"make test\" will not work properly." >&5 +echo "$as_me: WARNING: PyYAML missing, so \"make test\" will not work properly." >&2;} fi if test "x$XSLTPROC" = "x" then - { $as_echo "$as_me:$LINENO: WARNING: xsltproc missing, so \"make test\" will not work properly." >&5 -$as_echo "$as_me: WARNING: xsltproc missing, so \"make test\" will not work properly." >&2;} + { echo "$as_me:$LINENO: WARNING: xsltproc missing, so \"make test\" will not work properly." >&5 +echo "$as_me: WARNING: xsltproc missing, so \"make test\" will not work properly." >&2;} fi if test "x$RRDTOOL" = "x" then - { $as_echo "$as_me:$LINENO: WARNING: rrdtool missing, so rcynic-html won't be able to draw graphs." >&5 -$as_echo "$as_me: WARNING: rrdtool missing, so rcynic-html won't be able to draw graphs." >&2;} + { echo "$as_me:$LINENO: WARNING: rrdtool missing, so rcynic-html won't be able to draw graphs." >&5 +echo "$as_me: WARNING: rrdtool missing, so rcynic-html won't be able to draw graphs." >&2;} +fi + +if test $use_rcynic_jail = no && test "X$RSYNC" = "X" +then + ok=no + { echo "$as_me:$LINENO: WARNING: The RPKI relying party tools require rsync." >&5 +echo "$as_me: WARNING: The RPKI relying party tools require rsync." >&2;} fi if test $ok = no then - { { $as_echo "$as_me:$LINENO: error: Please correct the problems above then re-run this configuration script." >&5 -$as_echo "$as_me: error: Please correct the problems above then re-run this configuration script." >&2;} + { { echo "$as_me:$LINENO: error: Please correct the problems above then re-run this configuration script." >&5 +echo "$as_me: error: Please correct the problems above then re-run this configuration script." >&2;} { (exit 1); exit 1; }; } fi +# Figure out whether we are on a Debian-derived system where we need +# to tell setup.py about Debian installation layout. + +if test $build_ca_tools = yes +then + { echo "$as_me:$LINENO: checking whether we need to tell distutils to use Debian installation layout" >&5 +echo $ECHO_N "checking whether we need to tell distutils to use Debian installation layout... $ECHO_C" >&6; } + use_debian_layout=no + if test -x /usr/bin/lsb_release + then + case `/usr/bin/lsb_release -is` in + Debian|Ubuntu) + use_debian_layout=yes + ;; + esac + fi + { echo "$as_me:$LINENO: result: $use_debian_layout" >&5 +echo "${ECHO_T}$use_debian_layout" >&6; } + if test $use_debian_layout = yes + then + SETUP_PY_INSTALL_LAYOUT='--install-layout=deb' + else + SETUP_PY_INSTALL_LAYOUT='' + + fi + +fi + # Figure out which parts of this package we have to build. - TOP_LEVEL_SUBDIRS="" -test $build_openssl = yes && TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS openssl" - TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS h rcynic utils" -test $build_ca_tools = yes && TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS rpkid" -test $build_rpki_rtr = yes && TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS rtr-origin" + TOP_LEVEL_SUBDIRS="h" +test $build_openssl = yes && TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS openssl" +test $build_rp_tools = yes && TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS rcynic utils rtr-origin" +test $build_ca_tools = yes && TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS rpkid" -ac_config_files="$ac_config_files Makefile h/Makefile rcynic/Makefile rcynic/static-rsync/Makefile utils/Makefile utils/find_roa/Makefile utils/hashdir/Makefile utils/print_rpki_manifest/Makefile utils/print_roa/Makefile utils/scan_roas/Makefile utils/uri/Makefile" +ac_config_files="$ac_config_files Makefile h/Makefile" +if test "X$RCYNIC_STATIC_RSYNC" != "X" +then + ac_config_files="$ac_config_files rcynic/static-rsync/Makefile" + +fi + # OpenSSL has its own build system that bears no relationship to # anything but itself, and our use of it is a bit weird, so this is a # BFMI (Brute Force and Massive Ignorance) job. @@ -5080,8 +5454,8 @@ then ac_config_files="$ac_config_files openssl/Makefile openssl/tests/Makefile" - { $as_echo "$as_me:$LINENO: checking what configuration target to use when building OpenSSL" >&5 -$as_echo_n "checking what configuration target to use when building OpenSSL... " >&6; } + { echo "$as_me:$LINENO: checking what configuration target to use when building OpenSSL" >&5 +echo $ECHO_N "checking what configuration target to use when building OpenSSL... $ECHO_C" >&6; } case $host in i*86-apple-darwin*) if test "$ac_cv_sizeof_long" = 8 @@ -5099,11 +5473,11 @@ $as_echo_n "checking what configuration target to use when building OpenSSL... " ;; esac - { $as_echo "$as_me:$LINENO: result: $OPENSSL_CONFIG_COMMAND" >&5 -$as_echo "$OPENSSL_CONFIG_COMMAND" >&6; } + { echo "$as_me:$LINENO: result: $OPENSSL_CONFIG_COMMAND" >&5 +echo "${ECHO_T}$OPENSSL_CONFIG_COMMAND" >&6; } - { $as_echo "$as_me:$LINENO: checking what glob to use when renaming OpenSSL shared libraries" >&5 -$as_echo_n "checking what glob to use when renaming OpenSSL shared libraries... " >&6; } + { echo "$as_me:$LINENO: checking what glob to use when renaming OpenSSL shared libraries" >&5 +echo $ECHO_N "checking what glob to use when renaming OpenSSL shared libraries... $ECHO_C" >&6; } case $host in *-apple-darwin*) OPENSSL_SO_GLOB='*.dylib' @@ -5113,8 +5487,8 @@ $as_echo_n "checking what glob to use when renaming OpenSSL shared libraries... ;; esac - { $as_echo "$as_me:$LINENO: result: $OPENSSL_SO_GLOB" >&5 -$as_echo "$OPENSSL_SO_GLOB" >&6; } + { echo "$as_me:$LINENO: result: $OPENSSL_SO_GLOB" >&5 +echo "${ECHO_T}$OPENSSL_SO_GLOB" >&6; } # NB: We put our OpenSSL directory at the *front* of the # search list to preempt conflicts with system copies. @@ -5125,18 +5499,24 @@ else LIBS="$LIBS -lcrypto" fi +if test $build_rp_tools = yes +then + ac_config_files="$ac_config_files rcynic/Makefile utils/Makefile utils/find_roa/Makefile utils/hashdir/Makefile utils/print_rpki_manifest/Makefile utils/print_roa/Makefile utils/scan_roas/Makefile utils/uri/Makefile rtr-origin/Makefile" + +fi + if test $build_ca_tools = yes then - { $as_echo "$as_me:$LINENO: checking if running under virtualenv" >&5 -$as_echo_n "checking if running under virtualenv... " >&6; } - if test x$VIRTUAL_ENV != x; then + { echo "$as_me:$LINENO: checking if running under virtualenv" >&5 +echo $ECHO_N "checking if running under virtualenv... $ECHO_C" >&6; } + if test "x$VIRTUAL_ENV" != "x"; then VIRTUAL_ENV=$VIRTUAL_ENV - { $as_echo "$as_me:$LINENO: result: $VIRTUAL_ENV" >&5 -$as_echo "$VIRTUAL_ENV" >&6; } + { echo "$as_me:$LINENO: result: $VIRTUAL_ENV" >&5 +echo "${ECHO_T}$VIRTUAL_ENV" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Source: http://blog.leosoto.com/2008/04/django-secretkey-generation.html @@ -5151,10 +5531,10 @@ $as_echo "no" >&6; } do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_DJANGO_ADMIN+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DJANGO_ADMIN in [\\/]* | ?:[\\/]*) @@ -5169,7 +5549,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DJANGO_ADMIN="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5181,11 +5561,11 @@ esac fi DJANGO_ADMIN=$ac_cv_path_DJANGO_ADMIN if test -n "$DJANGO_ADMIN"; then - { $as_echo "$as_me:$LINENO: result: $DJANGO_ADMIN" >&5 -$as_echo "$DJANGO_ADMIN" >&6; } + { echo "$as_me:$LINENO: result: $DJANGO_ADMIN" >&5 +echo "${ECHO_T}$DJANGO_ADMIN" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -5195,27 +5575,23 @@ done if test "$enable_wsgi_daemon_mode" != no then + save_IFS="$IFS" IFS=':' read user group <<_EOF $enable_wsgi_daemon_mode _EOF + IFS="$save_IFS" WSGI_DAEMON_PROCESS="WSGIDaemonProcess rpkigui user=$user ${group:+group=}${group} display-name=%{GROUP}" WSGI_PROCESS_GROUP="WSGIProcessGroup rpkigui" - { $as_echo "$as_me:$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; } + { echo "$as_me:$LINENO: result: running mod_wsgi in daemon mode with user \"$user\" and group \"${group:-default}\"" >&5 +echo "${ECHO_T}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 -if test $build_rpki_rtr = yes -then - ac_config_files="$ac_config_files rtr-origin/Makefile" - -fi - # Now that we're finally done with all the conditional changes to # CFLAGS, add a search directive for our own header directory. If we # ever get to the point of having our own library directory, we'd add @@ -5250,12 +5626,11 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -5288,12 +5663,12 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -5310,12 +5685,6 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' -:mline -/\\$/{ - N - s,\\\n,, - b mline -} t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g @@ -5345,7 +5714,7 @@ ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -5358,12 +5727,11 @@ LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} -ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -5376,7 +5744,7 @@ ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## @@ -5386,7 +5754,7 @@ DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -5408,45 +5776,17 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi # Support unset when possible. @@ -5462,6 +5802,8 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) +as_nl=' +' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. @@ -5484,7 +5826,7 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -5497,10 +5839,17 @@ PS2='> ' PS4='+ ' # NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -5522,7 +5871,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -5573,7 +5922,7 @@ $as_unset CDPATH s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems @@ -5601,6 +5950,7 @@ case `echo -n x` in *) ECHO_N='-n';; esac + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -5613,22 +5963,19 @@ if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else as_ln_s='cp -p' fi @@ -5653,10 +6000,10 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -5679,7 +6026,7 @@ exec 6>&1 # values after options handling. ac_log=" This file was extended by rpkitools $as_me 1.0, which was -generated by GNU Autoconf 2.63. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -5692,33 +6039,26 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q` _ACEOF -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. -Usage: $0 [OPTION]... [FILE]... +Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - -q, --quiet, --silent - do not print progress messages + -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE Configuration files: $config_files @@ -5726,24 +6066,24 @@ $config_files Report bugs to <bug-autoconf@gnu.org>." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ rpkitools config.status 1.0 -configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' -test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do @@ -5765,24 +6105,21 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; + echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { $as_echo "$as_me: error: unrecognized option: $1 + -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -5801,32 +6138,30 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL export CONFIG_SHELL - exec "\$@" + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + echo "$ac_log" } >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets @@ -5834,8 +6169,10 @@ do case $ac_config_target in "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "h/Makefile") CONFIG_FILES="$CONFIG_FILES h/Makefile" ;; - "rcynic/Makefile") CONFIG_FILES="$CONFIG_FILES rcynic/Makefile" ;; "rcynic/static-rsync/Makefile") CONFIG_FILES="$CONFIG_FILES rcynic/static-rsync/Makefile" ;; + "openssl/Makefile") CONFIG_FILES="$CONFIG_FILES openssl/Makefile" ;; + "openssl/tests/Makefile") CONFIG_FILES="$CONFIG_FILES openssl/tests/Makefile" ;; + "rcynic/Makefile") CONFIG_FILES="$CONFIG_FILES rcynic/Makefile" ;; "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;; "utils/find_roa/Makefile") CONFIG_FILES="$CONFIG_FILES utils/find_roa/Makefile" ;; "utils/hashdir/Makefile") CONFIG_FILES="$CONFIG_FILES utils/hashdir/Makefile" ;; @@ -5843,15 +6180,13 @@ do "utils/print_roa/Makefile") CONFIG_FILES="$CONFIG_FILES utils/print_roa/Makefile" ;; "utils/scan_roas/Makefile") CONFIG_FILES="$CONFIG_FILES utils/scan_roas/Makefile" ;; "utils/uri/Makefile") CONFIG_FILES="$CONFIG_FILES utils/uri/Makefile" ;; - "openssl/Makefile") CONFIG_FILES="$CONFIG_FILES openssl/Makefile" ;; - "openssl/tests/Makefile") CONFIG_FILES="$CONFIG_FILES openssl/tests/Makefile" ;; + "rtr-origin/Makefile") CONFIG_FILES="$CONFIG_FILES rtr-origin/Makefile" ;; "rpkid/Makefile") CONFIG_FILES="$CONFIG_FILES rpkid/Makefile" ;; "rpkid/tests/Makefile") CONFIG_FILES="$CONFIG_FILES rpkid/tests/Makefile" ;; "rpkid/portal-gui/Makefile") CONFIG_FILES="$CONFIG_FILES rpkid/portal-gui/Makefile" ;; - "rtr-origin/Makefile") CONFIG_FILES="$CONFIG_FILES rtr-origin/Makefile" ;; - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done @@ -5890,144 +6225,215 @@ $debug || (umask 077 && mkdir "$tmp") } || { - $as_echo "$as_me: cannot create a temporary directory in ." >&2 + echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. +# +# Set up the sed scripts for CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then +_ACEOF + +# Create sed commands to just substitute file output variables. -ac_cr='
' -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi +# Remaining file output variables are in a fragment that also has non-file +# output varibles. -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim +build_os!$build_os$ac_delim +host!$host$ac_delim +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +RCYNIC_DIR!$RCYNIC_DIR$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +LD_STATIC_FLAG!$LD_STATIC_FLAG$ac_delim +POW_LDFLAGS!$POW_LDFLAGS$ac_delim +PYTHON!$PYTHON$ac_delim +XSLTPROC!$XSLTPROC$ac_delim +AWK!$AWK$ac_delim +SORT!$SORT$ac_delim +RRDTOOL!$RRDTOOL$ac_delim +TRANG!$TRANG$ac_delim +RSYNC!$RSYNC$ac_delim +SU!$SU$ac_delim +SUDO!$SUDO$ac_delim +CHROOT!$CHROOT$ac_delim +CHROOTUID!$CHROOTUID$ac_delim +RCYNIC_JAIL_DIRS!$RCYNIC_JAIL_DIRS$ac_delim +RCYNIC_CONF_FILE!$RCYNIC_CONF_FILE$ac_delim +RCYNIC_TA_DIR!$RCYNIC_TA_DIR$ac_delim +RCYNIC_BIN_RCYNIC!$RCYNIC_BIN_RCYNIC$ac_delim +RCYNIC_CONF_RSYNC!$RCYNIC_CONF_RSYNC$ac_delim +RCYNIC_CONF_DATA!$RCYNIC_CONF_DATA$ac_delim +RCYNIC_CONF_TA_DIR!$RCYNIC_CONF_TA_DIR$ac_delim +RCYNIC_CRON_USER!$RCYNIC_CRON_USER$ac_delim +RCYNIC_STATIC_RSYNC!$RCYNIC_STATIC_RSYNC$ac_delim +RCYNIC_HTML_DIR!$RCYNIC_HTML_DIR$ac_delim +RCYNIC_INSTALL_TARGETS!$RCYNIC_INSTALL_TARGETS$ac_delim +RTR_ORIGIN_INSTALL_TARGETS!$RTR_ORIGIN_INSTALL_TARGETS$ac_delim +SETUP_PY_INSTALL_LAYOUT!$SETUP_PY_INSTALL_LAYOUT$ac_delim +TOP_LEVEL_SUBDIRS!$TOP_LEVEL_SUBDIRS$ac_delim +OPENSSL_CONFIG_COMMAND!$OPENSSL_CONFIG_COMMAND$ac_delim +OPENSSL_SO_GLOB!$OPENSSL_SO_GLOB$ac_delim +VIRTUAL_ENV!$VIRTUAL_ENV$ac_delim +SECRET_KEY!$SECRET_KEY$ac_delim +DJANGO_DIR!$DJANGO_DIR$ac_delim +_ACEOF - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 91; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done -rm -f conf$$subs.sh -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\).*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\).*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' <conf$$subs.awk | sed ' -/^[^""]/{ - N - s/\n// -} -' >>$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +/^[ ]*@RCYNIC_MAKE_RULES@[ ]*$/{ +r $RCYNIC_MAKE_RULES +d } -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line +/^[ ]*@RTR_ORIGIN_MAKE_RULES@[ ]*$/{ +r $RTR_ORIGIN_MAKE_RULES +d } +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS <conf$$subs.sed +rm -f conf$$subs.sed +cat >>$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF -_ACAWK + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +DJANGO_ADMIN!$DJANGO_ADMIN$ac_delim +WSGI_DAEMON_PROCESS!$WSGI_DAEMON_PROCESS$ac_delim +WSGI_PROCESS_GROUP!$WSGI_PROCESS_GROUP$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 5; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS <conf$$subs.sed +rm -f conf$$subs.sed +cat >>$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof _ACEOF + # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty @@ -6043,21 +6449,19 @@ s/^[^=]*=[ ]*$// }' fi -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" -eval set X " :F $CONFIG_FILES " -shift -for ac_tag +for ac_tag in :F $CONFIG_FILES do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; @@ -6086,38 +6490,26 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" + ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; + *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac @@ -6127,7 +6519,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -6153,7 +6545,7 @@ $as_echo X"$ac_file" | as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -6162,7 +6554,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -6183,17 +6575,17 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -6233,13 +6625,12 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix esac _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { +case `sed -n '/datarootdir/ { p q } @@ -6248,14 +6639,13 @@ ac_sed_dataroot=' /@infodir@/p /@localedir@/p /@mandir@/p -' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g @@ -6269,16 +6659,15 @@ _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t +s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t @@ -6288,28 +6677,21 @@ s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac ;; @@ -6324,11 +6706,6 @@ _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save -test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -6350,8 +6727,4 @@ if test "$no_create" != yes; then # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi diff --git a/configure.ac b/configure.ac index 85cb19f7..cc3f4abb 100644 --- a/configure.ac +++ b/configure.ac @@ -25,16 +25,21 @@ fi # Put the user option stuff up front. -AC_ARG_WITH([system_openssl], [AS_HELP_STRING([--with-system-openssl], [Link against system copy of OpenSSL])], [], [with_system_openssl=auto]) -AC_ARG_ENABLE([openssl_asm], [AS_HELP_STRING([--disable-openssl-asm], [Don't let OpenSSL build assembler code])], [], [enable_openssl_asm=auto]) -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([wsgi_daemon_mode], [AS_HELP_STRING([--enable-wsgi-daemon-mode=user[:group]],[Run the web portal as a separate process])],[],[enable_wsgi_daemon_mode=no]) +AC_ARG_WITH([system_openssl], [AS_HELP_STRING([--with-system-openssl], [Link against system copy of OpenSSL])], [], [with_system_openssl=auto]) +AC_ARG_ENABLE([rcynic_jail], [AS_HELP_STRING([--enable-rcynic-jail], [Run rcynic in chroot jail])], [], [enable_rcynic_jail=no]) +AC_ARG_ENABLE([openssl_asm], [AS_HELP_STRING([--disable-openssl-asm], [Don't let OpenSSL build assembler code])], [], [enable_openssl_asm=auto]) +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([rp_tools], [AS_HELP_STRING([--disable-rp-tools], [Don't build any of the relying party tools])], [], [enable_rp_tools=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([wsgi_daemon_mode], [AS_HELP_STRING([--enable-wsgi-daemon-mode=user[:group]], [Run the web portal as a separate process])], [], [enable_wsgi_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]) # Obsolete options. If you know of a better way to handle this, tell me. -AC_ARG_ENABLE([python], [AS_HELP_STRING([--disable-python], [(Obsolete, do not use)])], [AC_MSG_ERROR([--disable-python is obsolete. Please see the --disable-ca-tools option])], []) -AC_ARG_ENABLE([django], [AS_HELP_STRING([--disable-django], [(Obsolete, do not use)])], [AC_MSG_ERROR([--disable-django is obsolete. Please see the --disable-ca-tools option])], []) +AC_ARG_ENABLE([python], [AS_HELP_STRING([--disable-python], [(Obsolete, do not use)])], [AC_MSG_ERROR([--disable-python is obsolete. Please see the --disable-ca-tools option])], []) +AC_ARG_ENABLE([django], [AS_HELP_STRING([--disable-django], [(Obsolete, do not use)])], [AC_MSG_ERROR([--disable-django is obsolete. Please see the --disable-ca-tools option])], []) +AC_ARG_ENABLE([rpki_rtr], [AS_HELP_STRING([--disable-rpki-rtr], [(Obsolete, do not use)])], [AC_MSG_ERROR([--disable-rpki-rtr is obsolete. Please see the --disable-rp-tools option])], []) AC_PROG_CC AC_PROG_INSTALL @@ -75,8 +80,12 @@ dnl LDFLAGS="$old_LDFLAGS" dnl unset old_LDFLAGS case $host_os in -freebsd*) LD_STATIC_FLAG='-static';; -*) LD_STATIC_FLAG='';; + freebsd*) + LD_STATIC_FLAG='-static' + ;; + *) + LD_STATIC_FLAG='' + ;; esac AC_SUBST(LD_STATIC_FLAG) @@ -110,12 +119,18 @@ then fi unset old_LDFLAGS +AC_PROG_GREP +AC_PATH_PROG([PYTHON], [python]) AC_PATH_PROG([XSLTPROC], [xsltproc]) AC_PATH_PROG([AWK], [awk]) AC_PATH_PROG([SORT], [sort]) AC_PATH_PROG([RRDTOOL], [rrdtool]) -AC_PROG_GREP AC_PATH_PROG([TRANG], [trang], [\${abs_top_srcdir}/buildtools/trang-not-found]) +AC_PATH_PROG([RSYNC], [rsync]) +AC_PATH_PROG([SU], [su]) +AC_PATH_PROG([SUDO], [sudo]) +AC_PATH_PROG([CHROOT], [chroot]) +AC_PATH_PROG([CHROOTUID], [chrootuid]) # Figure out whether we need to build our own OpenSSL library or can # use the system libraries. We're looking for two recent features: @@ -221,13 +236,166 @@ case $enable_openssl_asm in ;; esac +# RCYNIC_DIR is a "precious" argument variable to this script (see +# autoconf doc), which means that autoconf is careful with whatever +# value (if any) was passed in, and that it's already been declared +# for variable substitution. We still have to set a default value for +# it, though, and we might as well handle DESTDIR while we're at it. + +if test "X$RCYNIC_DIR" = "X" +then + rcynic_base_dir='/var/rcynic' +else + rcynic_base_dir="${RCYNIC_DIR}" +fi + +RCYNIC_DIR='${DESTDIR}'"${rcynic_base_dir}" + +# Figure out whether to run rcynic in a chroot jail, which determines +# a bunch of other settings. + +AC_MSG_CHECKING([whether to build chroot jail for rcynic]) + +case $enable_rcynic_jail in + yes) + 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' + RCYNIC_CRON_USER='root' + RCYNIC_JAIL_DIRS='${RCYNIC_DIR}/bin ${RCYNIC_DIR}/dev ${RCYNIC_DIR}/etc' + if test "X$host_os" = "Xlinux" + then + RCYNIC_JAIL_DIRS="RCYNIC_JAIL_DIRS "'${RCYNIC_DIR}/lib ${RCYNIC_DIR}/lib64 ${RCYNIC_DIR}/usr/lib' + fi + ;; + no) + use_rcynic_jail=no + RCYNIC_CONF_FILE='${DESTDIR}${sysconfdir}/rcynic.conf' + RCYNIC_TA_DIR='${DESTDIR}${sysconfdir}/rpki/trust-anchors' + RCYNIC_BIN_RCYNIC='${DESTDIR}${bindir}/rcynic' + 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_JAIL_DIRS='' + ;; + *) + AC_MSG_ERROR([Unrecognized value for --enable-rcynic-jail: $enable_rcynic_jail]) + ;; +esac + +AC_SUBST(RCYNIC_JAIL_DIRS) +AC_SUBST(RCYNIC_CONF_FILE) +AC_SUBST(RCYNIC_TA_DIR) +AC_SUBST(RCYNIC_BIN_RCYNIC) +AC_SUBST(RCYNIC_CONF_RSYNC) +AC_SUBST(RCYNIC_CONF_DATA) +AC_SUBST(RCYNIC_CONF_TA_DIR) +AC_SUBST(RCYNIC_CRON_USER) + +AC_MSG_RESULT([$use_rcynic_jail]) + +if test $use_rcynic_jail = yes && test "X$LD_STATIC_FLAG" != "X" +then + RCYNIC_STATIC_RSYNC='static-rsync/rsync' +else + RCYNIC_STATIC_RSYNC='' +fi + +AC_SUBST(RCYNIC_STATIC_RSYNC) + +# Check whether to do "final target installation". This means actions +# that can only be done when installing a package, as opposed to when +# building a package. On FreeBSD this is sort of irrelevant, because +# of the way package installs work when building from source, but on +# Debian and Ubuntu, for example, there's a strict separation between +# things that are done during package build and things that are done +# by the binary package's {pre,post}inst scripts. + +AC_MSG_CHECKING([whether to do final target installation on "make install"]) + +case $enable_target_installation in + yes|no) + ;; + *) + AC_MSG_ERROR([Unrecognized value for --enable-target-installation: $enable_target_installation]) + ;; +esac + +AC_MSG_RESULT([$enable_target_installation]) + +# rcynic jail setup is complicated enough that it's simplest to have +# different rule sets for different platforms. Icky, but.... +# rpki-rtr isn't as complicated, but has similar issues, same hack. + +case $host_os in + darwin*) + RCYNIC_MAKE_RULES='rcynic/rules.darwin.mk' + RTR_ORIGIN_MAKE_RULES='rtr-origin/rules.darwin.mk' + ;; + freebsd*) + RCYNIC_MAKE_RULES='rcynic/rules.freebsd.mk' + RTR_ORIGIN_MAKE_RULES='rtr-origin/rules.freebsd.mk' + ;; + linux*) + RCYNIC_MAKE_RULES='rcynic/rules.linux.mk' + RTR_ORIGIN_MAKE_RULES='rtr-origin/rules.linux.mk' + ;; + *) + RCYNIC_MAKE_RULES='rcynic/rules.unknown.mk' + RTR_ORIGIN_MAKE_RULES='rtr-origin/rules.unknown.mk' + ;; +esac + +AC_SUBST_FILE(RCYNIC_MAKE_RULES) +AC_SUBST_FILE(RTR_ORIGIN_MAKE_RULES) + +# Where to put HTML files is similarly platform dependent, we have to know. +# rcynic-cron will skip generating HTML files if it has no place to put them. + +case $host_os in + freebsd*) + RCYNIC_HTML_DIR='/usr/local/www/apache22/data/rcynic' + ;; + linux*) + RCYNIC_HTML_DIR='/var/www/rcynic' + ;; + *) + RCYNIC_HTML_DIR='' + ;; +esac + +AC_SUBST(RCYNIC_HTML_DIR) + +# Sort out which things to install, depending on rcynic jail status and whether +# we're doing final target installation. + +RCYNIC_INSTALL_TARGETS='install-always' +RTR_ORIGIN_INSTALL_TARGETS='install-always' + +if test $use_rcynic_jail = yes +then + RCYNIC_INSTALL_TARGETS="$RCYNIC_INSTALL_TARGETS install-jailed" +fi + +if test $enable_target_installation = yes +then + RCYNIC_INSTALL_TARGETS="$RCYNIC_INSTALL_TARGETS install-postconf" + RTR_ORIGIN_INSTALL_TARGETS="$RTR_ORIGIN_INSTALL_TARGETS install-postconf" +fi + +AC_SUBST(RCYNIC_INSTALL_TARGETS) +AC_SUBST(RTR_ORIGIN_INSTALL_TARGETS) + # 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 # versions. -AC_PATH_PROG([PYTHON], [python]) - have_python=no have_acceptable_python=no have_python_h=no @@ -313,24 +481,27 @@ fi ok=yes -if test $enable_ca_tools = yes || test $enable_rpki_rtr = yes +if test $have_python = no then - if test $have_python = no - then - ok=no - AC_MSG_WARN([I can't find a Python binary, perhaps you need to set PATH?]) - fi - if test $have_acceptable_python = no - then - ok=no - AC_MSG_WARN([The RPKI code requires Python version 2.x, for x = 6 or higher.]) - fi - if test $ok = no - then - AC_MSG_WARN([If you do not wish to install the rpki-rtr code, please specify --disable-rpki-rtr as an argument to this configure script.]) - fi + ok=no + AC_MSG_WARN([I can't find a Python binary, perhaps you need to set PATH?]) fi +if test $have_acceptable_python = no +then + ok=no + AC_MSG_WARN([The RPKI code requires Python version 2.x, for x = 6 or higher.]) +fi + +case $enable_rp_tools in + yes) build_rp_tools=yes + ;; + no) build_rp_tools=no + ;; + *) AC_MSG_ERROR([Unrecognized value for --enable-rp-tools: $enable_rp_tools]) + ;; +esac + case $enable_ca_tools in yes) build_ca_tools=yes if test $have_python_h = no @@ -366,15 +537,6 @@ case $enable_ca_tools in *) AC_MSG_ERROR([Unrecognized value for --enable-ca-tools: $enable_ca_tools]);; esac -case $enable_rpki_rtr in - yes) build_rpki_rtr=yes - ;; - no) build_rpki_rtr=no - ;; - *) AC_MSG_ERROR([Unrecognized value for --enable-rpki-rtr: $enable_rpki_rtr]);; -esac - - if test $build_ca_tools = yes && test $have_pyyaml = no then AC_MSG_WARN([PyYAML missing, so "make test" will not work properly.]) @@ -390,32 +552,59 @@ then AC_MSG_WARN([rrdtool missing, so rcynic-html won't be able to draw graphs.]) fi +if test $use_rcynic_jail = no && test "X$RSYNC" = "X" +then + ok=no + AC_MSG_WARN([The RPKI relying party tools require rsync.]) +fi + if test $ok = no then AC_MSG_ERROR([Please correct the problems above then re-run this configuration script.]) fi +# Figure out whether we are on a Debian-derived system where we need +# to tell setup.py about Debian installation layout. + +if test $build_ca_tools = yes +then + AC_MSG_CHECKING([whether we need to tell distutils to use Debian installation layout]) + use_debian_layout=no + if test -x /usr/bin/lsb_release + then + case `/usr/bin/lsb_release -is` in + Debian|Ubuntu) + use_debian_layout=yes + ;; + esac + fi + AC_MSG_RESULT([$use_debian_layout]) + if test $use_debian_layout = yes + then + SETUP_PY_INSTALL_LAYOUT='--install-layout=deb' + else + SETUP_PY_INSTALL_LAYOUT='' + + fi + AC_SUBST(SETUP_PY_INSTALL_LAYOUT) +fi + # Figure out which parts of this package we have to build. - TOP_LEVEL_SUBDIRS="" -test $build_openssl = yes && TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS openssl" - TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS h rcynic utils" -test $build_ca_tools = yes && TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS rpkid" -test $build_rpki_rtr = yes && TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS rtr-origin" + TOP_LEVEL_SUBDIRS="h" +test $build_openssl = yes && TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS openssl" +test $build_rp_tools = yes && TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS rcynic utils rtr-origin" +test $build_ca_tools = yes && TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS rpkid" AC_SUBST(TOP_LEVEL_SUBDIRS) AC_CONFIG_FILES([Makefile - h/Makefile - rcynic/Makefile - rcynic/static-rsync/Makefile - utils/Makefile - utils/find_roa/Makefile - utils/hashdir/Makefile - utils/print_rpki_manifest/Makefile - utils/print_roa/Makefile - utils/scan_roas/Makefile - utils/uri/Makefile]) + h/Makefile]) + +if test "X$RCYNIC_STATIC_RSYNC" != "X" +then + AC_CONFIG_FILES([rcynic/static-rsync/Makefile]) +fi # OpenSSL has its own build system that bears no relationship to # anything but itself, and our use of it is a bit weird, so this is a @@ -466,10 +655,23 @@ else LIBS="$LIBS -lcrypto" fi +if test $build_rp_tools = yes +then + AC_CONFIG_FILES([rcynic/Makefile + utils/Makefile + utils/find_roa/Makefile + utils/hashdir/Makefile + utils/print_rpki_manifest/Makefile + utils/print_roa/Makefile + utils/scan_roas/Makefile + utils/uri/Makefile + rtr-origin/Makefile]) +fi + if test $build_ca_tools = yes then AC_MSG_CHECKING([if running under virtualenv]) - if test x$VIRTUAL_ENV != x; then + if test "x$VIRTUAL_ENV" != "x"; then AC_SUBST(VIRTUAL_ENV, [$VIRTUAL_ENV]) AC_MSG_RESULT([$VIRTUAL_ENV]) else @@ -486,9 +688,11 @@ then if test "$enable_wsgi_daemon_mode" != no then + save_IFS="$IFS" IFS=':' read user group <<_EOF $enable_wsgi_daemon_mode _EOF + IFS="$save_IFS" AC_SUBST(WSGI_DAEMON_PROCESS, "WSGIDaemonProcess 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}"]) @@ -497,11 +701,6 @@ _EOF AC_CONFIG_FILES([rpkid/Makefile rpkid/tests/Makefile rpkid/portal-gui/Makefile]) fi -if test $build_rpki_rtr = yes -then - AC_CONFIG_FILES([rtr-origin/Makefile]) -fi - # Now that we're finally done with all the conditional changes to # CFLAGS, add a search directive for our own header directory. If we # ever get to the point of having our own library directory, we'd add diff --git a/h/Makefile.in b/h/Makefile.in index 6202d6d7..d976661b 100644 --- a/h/Makefile.in +++ b/h/Makefile.in @@ -17,7 +17,7 @@ rpki/sk_roa.h: rpki/roa.h clean: rm -f *.h.tmp -test install deinstall uninstall installation-manifest: +test install deinstall uninstall: @true distclean: clean diff --git a/openssl/Makefile.in b/openssl/Makefile.in index 72bba460..f7bb6b5b 100644 --- a/openssl/Makefile.in +++ b/openssl/Makefile.in @@ -74,6 +74,3 @@ sandblast: test: all cd tests; ${MAKE} $@ - -installation-manifest: - @true diff --git a/openssl/tests/Makefile.in b/openssl/tests/Makefile.in index 34635edd..7dbfcf9f 100644 --- a/openssl/tests/Makefile.in +++ b/openssl/tests/Makefile.in @@ -18,7 +18,7 @@ OPENSSL = ${abs_top_builddir}/openssl/openssl/apps/openssl all: ${BIN} clean: - rm -f ${BIN} ${OBJ} + rm -rf ${BIN} ${OBJ} ${BIN}.dSYM ${BIN}: ${SRC} ${CC} ${CFLAGS} -o $@ ${SRC} ${LDFLAGS} ${LIBS} diff --git a/rcynic/Makefile.in b/rcynic/Makefile.in index 777fe18f..71f46df2 100644 --- a/rcynic/Makefile.in +++ b/rcynic/Makefile.in @@ -14,22 +14,62 @@ CFLAGS = @CFLAGS@ -Wall -Wshadow -Wmissing-prototypes -Wmissing-declarations -We LDFLAGS = @LDFLAGS@ @LD_STATIC_FLAG@ LIBS = @LIBS@ -AWK = @AWK@ -SORT= @SORT@ -PYTHON = @PYTHON@ -RRDTOOL = @RRDTOOL@ - -abs_top_srcdir = @abs_top_srcdir@ -abs_top_builddir = @abs_top_builddir@ - -host_os = @host_os@ - -SCRIPTS = rcynic-text rcynic-html rcynic-svn validation_status - -all: ${BIN} ${SCRIPTS} +AWK = @AWK@ +SORT = @SORT@ +PYTHON = @PYTHON@ +RRDTOOL = @RRDTOOL@ +INSTALL = @INSTALL@ +SU = @SU@ +SUDO = @SUDO@ +CHROOT = @CHROOT@ +CHROOTUID = @CHROOTUID@ + +abs_top_srcdir = @abs_top_srcdir@ +abs_top_builddir = @abs_top_builddir@ + +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@ + +RCYNIC_INSTALL_TARGETS = @RCYNIC_INSTALL_TARGETS@ +RCYNIC_DIR = @RCYNIC_DIR@ +RCYNIC_JAIL_DIRS = @RCYNIC_JAIL_DIRS@ +RCYNIC_CONF_FILE = @RCYNIC_CONF_FILE@ +RCYNIC_TA_DIR = @RCYNIC_TA_DIR@ +RCYNIC_BIN_RCYNIC = @RCYNIC_BIN_RCYNIC@ +RCYNIC_DATA_DIR = ${RCYNIC_DIR}/data +RCYNIC_RPKI_RTR_DIR = ${RCYNIC_DIR}/rpki-rtr +RCYNIC_DIRS = ${RCYNIC_TA_DIR} ${RCYNIC_JAIL_DIRS} ${RCYNIC_DATA_DIR} ${RCYNIC_RPKI_RTR_DIR} ${RCYNIC_RPKI_RTR_DIR}/sockets +RCYNIC_CONF_RSYNC = @RCYNIC_CONF_RSYNC@ +RCYNIC_CONF_DATA = @RCYNIC_CONF_DATA@ +RCYNIC_CONF_TA_DIR = @RCYNIC_CONF_TA_DIR@ +RCYNIC_USER = rcynic +RCYNIC_GROUP = rcynic +NOBODY_USER = nobody +RCYNIC_GECOS = RPKI Validation System +RCYNIC_STATIC_RSYNC = @RCYNIC_STATIC_RSYNC@ +RCYNIC_HTML_DIR = @RCYNIC_HTML_DIR@ +RCYNIC_CRON_USER = @RCYNIC_CRON_USER@ + +SCRIPTS = rcynic-text rcynic-html rcynic-svn validation_status rcynic-cron + +all: ${BIN} ${SCRIPTS} ${RCYNIC_STATIC_RSYNC} clean: - cd static-rsync; ${MAKE} $@ + if test -r static-rsync/Makefile; then cd static-rsync; ${MAKE} $@; fi rm -f ${BIN} ${OBJS} ${SCRIPTS} ${OBJ}: ${SRC} ${GEN} @@ -41,36 +81,27 @@ ${GEN}: ${SRC} ${PYTHON} ${abs_top_srcdir}/buildtools/defstack.py ${SRC} >$@.tmp mv $@.tmp $@ -test: ${BIN} - if test -r rcynic.conf; \ - then \ - ./${BIN} -j 0 && \ - test -r rcynic.xml && \ - echo && \ - ./rcynic-text rcynic.xml; \ - else \ - echo No rcynic.conf, skipping test; \ - fi - -install: ${BIN} installation-scripts/install.sh - cd installation-scripts; host_os="${host_os}"; DESTDIR="${DESTDIR}"; AWK="${AWK}"; SORT="${SORT}"; . ./install.sh - -uninstall deinstall: - cd installation-scripts; host_os="${host_os}"; DESTDIR="${DESTDIR}"; . ./deinstall.sh - -installation-manifest: - cd installation-scripts; host_os="${host_os}"; abs_top_builddir="${abs_top_builddir}"; . ./manifest.sh - -distclean: clean - cd static-rsync; ${MAKE} $@ - rm -f Makefile - COMPILE_PYTHON = \ AC_PYTHON_INTERPRETER='${PYTHON}' \ AC_RRDTOOL_BINARY='${RRDTOOL}' \ ${PYTHON} ${abs_top_srcdir}/buildtools/make-rcynic-script.py <$? >$@; \ chmod 755 $@ +COMPILE_PYTHON_CRON = \ + AC_PYTHON_INTERPRETER='${PYTHON}' \ + AC_RCYNIC_USER='${RCYNIC_USER}' \ + AC_RCYNIC_GROUP='${RCYNIC_GROUP}' \ + AC_RCYNIC_DIR='${RCYNIC_DIR}' \ + AC_bindir='${bindir}' \ + AC_sysconfdir='${sysconfdir}' \ + AC_RCYNIC_HTML_DIR='${RCYNIC_HTML_DIR}' \ + AC_SU='${SU}' \ + AC_SUDO='${SUDO}' \ + AC_CHROOT='${CHROOT}' \ + AC_CHROOTUID='${CHROOTUID}' \ + ${PYTHON} ${abs_top_srcdir}/buildtools/make-rcynic-script.py <$? >$@; \ + chmod 755 $@ + rcynic-text: rcynic-text.py ${COMPILE_PYTHON} @@ -83,7 +114,133 @@ rcynic-svn: rcynic-svn.py validation_status: validation_status.py ${COMPILE_PYTHON} +rcynic-cron: rcynic-cron.py + ${COMPILE_PYTHON_CRON} + tags: TAGS TAGS: ${SRC} ${GEN} etags ${SRC} ${GEN} + +test: ${BIN} + if test -r rcynic.conf; \ + then \ + ./${BIN} -j 0 && \ + test -r rcynic.xml && \ + echo && \ + ./rcynic-text rcynic.xml; \ + else \ + echo No rcynic.conf, skipping test; \ + fi + +uninstall deinstall: + @echo Sorry, automated deinstallation of rcynic is not implemented yet + +distclean: clean + if test -r static-rsync/Makefile; then cd static-rsync; ${MAKE} $@; fi + rm -f Makefile + +static-rsync/rsync: + @echo "Building static rsync for use in chroot jail" + cd static-rsync; ${MAKE} all + +install: all ${RCYNIC_INSTALL_TARGETS} + +install-always: \ + install-directories install-scripts install-rcynic install-rcynic-conf + +install-postconf: \ + install-user-and-group install-directory-ownership install-crontab + +install-jailed: \ + install-static-rsync install-shared-libraries install-rc-scripts + +install-directories: ${RCYNIC_DIRS} + +${RCYNIC_DIRS} ${DESTDIR}${bindir} ${DESTDIR}${sysconfdir}: + ${INSTALL} -v -d $@ + +install-directory-ownership: ${RCYNIC_DATA_DIR} ${RCYNIC_RPKI_RTR_DIR} + chown ${RCYNIC_USER}:${RCYNIC_GROUP} ${RCYNIC_DATA_DIR} ${RCYNIC_RPKI_RTR_DIR} + chown ${NOBODY_USER}:${RCYNIC_GROUP} ${RCYNIC_RPKI_RTR_DIR}/sockets + +install-rcynic-conf: ${RCYNIC_CONF_FILE} + +${RCYNIC_CONF_FILE}: + ${INSTALL} -v -d ${RCYNIC_TA_DIR} + @echo Found no ${RCYNIC_CONF_FILE}, creating sample config. You might want to edit this. + @echo > $@.tmp '# Basic rcynic configuration file with default trust anchors.' + @echo >>$@.tmp '# See documentation for details.' + @echo >>$@.tmp '' + @echo >>$@.tmp '[rcynic]' + @echo >>$@.tmp 'rsync-program = ${RCYNIC_CONF_RSYNC}' + @echo >>$@.tmp 'authenticated = ${RCYNIC_CONF_DATA}/authenticated' + @echo >>$@.tmp 'unauthenticated = ${RCYNIC_CONF_DATA}/unauthenticated' + @echo >>$@.tmp 'xml-summary = ${RCYNIC_CONF_DATA}/rcynic.xml' + @echo >>$@.tmp 'jitter = 600' + @echo >>$@.tmp 'use-syslog = true' + @echo >>$@.tmp 'log-level = log_usage_err' + @cd sample-trust-anchors; \ + j=1; \ + for i in *.tal; \ + do \ + ${INSTALL} -p -m 444 "$$i" "${RCYNIC_TA_DIR}/$$i"; \ + echo >>$@.tmp "trust-anchor-locator.$$j = ${RCYNIC_CONF_TA_DIR}/$$i"; \ + j=$$((j+1)); \ + done + @chmod 444 $@.tmp + @mv -f $@.tmp $@ + +install-rcynic: ${RCYNIC_BIN_RCYNIC} + +${RCYNIC_BIN_RCYNIC}: ${BIN} + ${INSTALL} -p -m 555 ${BIN} $@ + +install-static-rsync: ${RCYNIC_DIR}/bin/rsync + +${RCYNIC_DIR}/bin/rsync: static-rsync/rsync + ${INSTALL} -p -m 555 static-rsync/rsync $@ + +install-scripts: \ + ${DESTDIR}${bindir} \ + ${DESTDIR}${bindir}/rcynic-text \ + ${DESTDIR}${bindir}/rcynic-html \ + ${DESTDIR}${bindir}/rcynic-svn \ + ${DESTDIR}${bindir}/rcynic-cron \ + ${DESTDIR}${bindir}/validation_status + +${DESTDIR}${bindir}/rcynic-text: rcynic-text + ${INSTALL} -p -m 555 rcynic-text $@ + +${DESTDIR}${bindir}/rcynic-html: rcynic-html + ${INSTALL} -p -m 555 rcynic-html $@ + +${DESTDIR}${bindir}/rcynic-svn: rcynic-svn + ${INSTALL} -p -m 555 rcynic-svn $@ + +${DESTDIR}${bindir}/rcynic-cron: rcynic-cron + ${INSTALL} -p -m 555 rcynic-cron $@ + +${DESTDIR}${bindir}/validation_status: validation_status + ${INSTALL} -p -m 555 validation_status $@ + +.FORCE: + +install-crontab: .FORCE + @echo "Setting up ${RCYNIC_CRON_USER}'s crontab to run rcynic-cron script + @crontab -l -u ${RCYNIC_CRON_USER} 2>/dev/null | \ + ${AWK} -v t=`hexdump -n 2 -e '"%u\n"' /dev/random` '\ + BEGIN { \ + cmd = "exec ${bindir}/rcynic-cron"; \ + } \ + $$0 !~ cmd { \ + print; \ + } \ + END { \ + printf "%u * * * *\t%s\n", t % 60, cmd; \ + }' | \ + /usr/bin/crontab -u ${RCYNIC_CRON_USER} - + +# Platform-specific rules below here. + +@RCYNIC_MAKE_RULES@ diff --git a/rcynic/installation-scripts/darwin/RCynic/RCynic b/rcynic/installation-scripts/darwin/RCynic/RCynic deleted file mode 100755 index 0237f926..00000000 --- a/rcynic/installation-scripts/darwin/RCynic/RCynic +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh - -# -# $Id$ -# -. /etc/rc.common - -name="rcynic" -start_cmd="rcynic_start" -stop_cmd="rcynic_stop" - -: ${rcynic_jaildir="/var/rcynic"} -: ${rcynic_user="rcynic"} -: ${rcynic_group="rcynic"} - -StartService() -{ - /bin/test -d "${rcynic_jaildir}" || /bin/mkdir "${rcynic_jaildir}" - /sbin/umount "${rcynic_jaildir}/dev" 2>/dev/null - - /usr/sbin/mtree -deU -p "${rcynic_jaildir}" <<EOF - - /set type=dir uname=root gname=wheel mode=0555 - . - bin - .. - dev - .. - etc - trust-anchors - .. - .. - usr - lib - system - .. - .. - .. - var - run - .. - .. - data uname=${rcynic_user} gname=${rcynic_group} mode=0755 - .. - .. -EOF - - /bin/chmod -R a-w "${rcynic_jaildir}/bin" "${rcynic_jaildir}/etc" - /usr/sbin/chown -R root:wheel "${rcynic_jaildir}/bin" "${rcynic_jaildir}/etc" - - if /bin/test -f "${rcynic_jaildir}/etc/rsa_key"; then - /bin/chmod 400 "${rcynic_jaildir}/etc/rsa_key" - /usr/sbin/chown "${rcynic_user}" "${rcynic_jaildir}/etc/rsa_key" - fi - - if ! /sbin/mount_devfs devfs "${rcynic_jaildir}/dev"; then - echo "Mounting devfs on ${rcynic_jaildir}/dev failed..." - exit 1 - fi - - for i in /etc/localtime /etc/resolv.conf; do - j="${rcynic_jaildir}${i}" - if /bin/test -r "$i" && ! /usr/bin/cmp -s "$i" "$j"; then - /usr/bin/install -m 444 -o root -g wheel -p "$i" "$j" - fi - done - - /bin/ln -f /var/run/mDNSResponder "${rcynic_jaildir}/var/run/mDNSResponder" -} - -StopService() -{ - /sbin/umount "${rcynic_jaildir}/dev" 2>/dev/null -} - -RestartService() -{ - StartService -} - -RunService "$1" diff --git a/rcynic/installation-scripts/darwin/install.sh b/rcynic/installation-scripts/darwin/install.sh deleted file mode 100644 index 1af4a6f0..00000000 --- a/rcynic/installation-scripts/darwin/install.sh +++ /dev/null @@ -1,193 +0,0 @@ -#!/bin/sh - -# $Id$ -# -# Create a chroot jail for rcynic. -# -# This is approximately what a pkg-install script might do if this were -# a FreeBSD port. Perhaps some day it will be. - -: ${jaildir="${DESTDIR}/var/rcynic"} -: ${jailuser="rcynic"} -: ${jailgroup="rcynic"} -: ${jailname="RPKI Validation System"} -: ${setupcron="NO"} - -echo "Setting up \"${jaildir}\" as a chroot jail for rcynic." - -if /usr/bin/dscl . -read "/Groups/${jailgroup}" >/dev/null 2>&1 -then - echo "You already have a group \"${jailgroup}\", so I will use it." -elif gid="$(/usr/bin/dscl . -list /Groups PrimaryGroupID | /usr/bin/awk 'BEGIN {gid = 501} $2 >= gid {gid = 1 + $2} END {print gid}')" && - /usr/bin/dscl . -create "/Groups/${jailgroup}" && - /usr/bin/dscl . -create "/Groups/${jailgroup}" RealName "${jailname}" && - /usr/bin/dscl . -create "/Groups/${jailgroup}" PrimaryGroupID "$gid" && - /usr/bin/dscl . -create "/Groups/${jailgroup}" GeneratedUID "$(/usr/bin/uuidgen)" && - /usr/bin/dscl . -create "/Groups/${jailgroup}" Password "*" -then - echo "Added group \"${jailgroup}\"." -else - echo "Adding group \"${jailgroup}\" failed..." - echo "Please create it, then try again." - exit 1 -fi - -if /usr/bin/dscl . -read "/Users/${jailuser}" >/dev/null 2>&1 -then - echo "You already have a user \"${jailuser}\", so I will use it." -elif uid="$(/usr/bin/dscl . -list /Users UniqueID | /usr/bin/awk 'BEGIN {uid = 501} $2 >= uid {uid = 1 + $2} END {print uid}')" && - /usr/bin/dscl . -create "/Users/${jailuser}" && - /usr/bin/dscl . -create "/Users/${jailuser}" UserShell "/usr/bin/false" && - /usr/bin/dscl . -create "/Users/${jailuser}" RealName "${jailname}" && - /usr/bin/dscl . -create "/Users/${jailuser}" UniqueID "$uid" && - /usr/bin/dscl . -create "/Users/${jailuser}" PrimaryGroupID "$gid" && - /usr/bin/dscl . -create "/Users/${jailuser}" NFSHomeDirectory "/var/empty" && - /usr/bin/dscl . -create "/Users/${jailuser}" GeneratedUID "$(/usr/bin/uuidgen)" && - /usr/bin/dscl . -create "/Users/${jailuser}" Password "*" -then - echo "Added user \"${jailuser}\"." -else - echo "Adding user \"${jailuser}\" failed..." - echo "Please create it, then try again." - exit 1 -fi - -if ! /bin/test -d "${jaildir}"; then - /bin/mkdir "${jaildir}" -fi - -if /usr/bin/install -o root -g wheel -d ${DESTDIR}/Library/StartupItems/RCynic && - /usr/bin/install -o root -g wheel -m 555 RCynic/RCynic RCynic/StartupParameters.plist ${DESTDIR}/Library/StartupItems/RCynic; then - echo "Installed ${DESTDIR}/Library/StartupItems/RCynic" -else - echo "Installing ${DESTDIR}/Library/StartupItems/RCynic failed" - exit 1 -fi - -echo "Running ${DESTDIR}/Library/StartupItems/RCynic/RCynic to set up directories" - -if ! rcynic_jaildir="$jaildir" rcynic_user="$jailuser" rcynic_group="$jailgroup" /Library/StartupItems/RCynic/RCynic start; then - echo "Directory setup failed" - exit 1 -fi - -if /bin/test -r "$jaildir/etc/rcynic.conf"; then - echo "You already have config file \"${jaildir}/etc/rcynic.conf\", so I will use it." -elif /usr/bin/install -m 444 -o root -g wheel -p ../sample-rcynic.conf "${jaildir}/etc/rcynic.conf"; then - echo "Installed minimal ${jaildir}/etc/rcynic.conf, adding SAMPLE trust anchors" - for i in ../../sample-trust-anchors/*.tal; do - j="$jaildir/etc/trust-anchors/${i##*/}" - /bin/test -r "$i" || continue - /bin/test -r "$j" && continue - echo "Installing $i as $j" - /usr/bin/install -m 444 -o root -g wheel -p "$i" "$j" - done - j=1 - for i in $jaildir/etc/trust-anchors/*.tal; do - echo >>"${jaildir}/etc/rcynic.conf" "trust-anchor-locator.$j = /etc/trust-anchors/${i##*/}" - j=$((j+1)) - done -else - echo "Installing minimal ${jaildir}/etc/rcynic.conf failed" - exit 1 -fi - -echo "Installing rcynic as ${jaildir}/bin/rcynic" - -/usr/bin/install -m 555 -o root -g wheel -p ../../rcynic "${jaildir}/bin/rcynic" - -if /bin/test -x "$jaildir/bin/rsync"; then - echo "You already have an executable \"$jaildir/bin/rsync\", so I will use it" -elif /usr/bin/install -m 555 -o root -g wheel -p /usr/bin/rsync "${jaildir}/bin/rsync"; then - echo "Installed ${jaildir}/bin/rsync" -else - echo "Installing ${jaildir}/bin/rsync failed" - exit 1 -fi - -echo "Copying required shared libraries" - -shared_libraries="${jaildir}/bin/rcynic ${jaildir}/bin/rsync" -while true -do - closure="$(/usr/bin/otool -L ${shared_libraries} | /usr/bin/awk '/:$/ {next} {print $1}' | /usr/bin/sort -u)" - if test "x$shared_libraries" = "x$closure" - then - break - else - shared_libraries="$closure" - fi -done - -for shared in /usr/lib/dyld $shared_libraries -do - if /bin/test -r "${jaildir}/${shared}" - then - echo "You already have a \"${jaildir}/${shared}\", so I will use it" - elif /usr/bin/install -m 555 -o root -g wheel -p "${shared}" "${jaildir}/${shared}" - then - echo "Copied ${shared} into ${jaildir}" - else - echo "Unable to copy ${shared} into ${jaildir}" - exit 1 - fi -done - -if /usr/bin/install -m 555 -o root -g wheel -p ../../rcynic-html "${jaildir}/bin/rcynic-html"; then - echo "Installed rcynic.py as \"${jaildir}/bin/rcynic-html\"" -else - echo "Installing rcynic-html failed" - exit 1 -fi - -echo "Setting up root's crontab to run jailed rcynic" - -case "$setupcron" in -YES|yes) - /usr/bin/crontab -l -u root 2>/dev/null | - /usr/bin/awk -v "jailuser=$jailuser" -v "jailgroup=$jailgroup" -v "jaildir=$jaildir" ' - BEGIN { - cmd = "exec /usr/sbin/chroot -u " jailuser " -g " jailgroup " " jaildir; - cmd = cmd " /bin/rcynic -c /etc/rcynic.conf"; - } - $0 !~ cmd { - print; - } - END { - "/usr/bin/hexdump -n 2 -e \"\\\"%u\\\\\\n\\\"\" /dev/random" | getline; - printf "%u * * * *\t%s\n", $1 % 60, cmd; - }' | - /usr/bin/crontab -u root - - /bin/cat <<EOF - - crontab is set up to run rcynic hourly, at a randomly selected - minute (to spread load on the rsync servers). Please do NOT - adjust this to run on the hour. In particular please do NOT - adjust this to run at midnight UTC. -EOF - ;; - -*) - /bin/cat <<EOF - - You'll need to add a crontab entry running the following command as root: - - /usr/sbin/chroot -u $jailuser -g $jailgroup $jaildir /bin/rcynic -c /etc/rcynic.conf - - Please try to pick a random time for this, don't just run it on the hour, - or at local midnight, or, worst of all, at midnight UTC. - -EOF - ;; - -esac - -/bin/cat <<EOF - - Jail set up. You may need to customize $jaildir/etc/rcynic.conf. - If you did not install your own trust anchors, a default set - of SAMPLE trust anchors may have been installed for you, but - you, the relying party, are the only one who can decide - whether you trust those anchors. rcynic will not do anything - useful without good trust anchors. - -EOF diff --git a/rcynic/installation-scripts/deinstall.sh b/rcynic/installation-scripts/deinstall.sh deleted file mode 100644 index 113794a4..00000000 --- a/rcynic/installation-scripts/deinstall.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# $Id$ - -echo Sorry, automated deinstallation of rcynic is not implemented yet -exit 1 diff --git a/rcynic/installation-scripts/freebsd/install.sh b/rcynic/installation-scripts/freebsd/install.sh deleted file mode 100644 index 105de21b..00000000 --- a/rcynic/installation-scripts/freebsd/install.sh +++ /dev/null @@ -1,151 +0,0 @@ -#!/bin/sh - -# $Id$ -# -# Create a chroot jail for rcynic. -# -# This is approximately what a pkg-install script might do if this were -# a FreeBSD port. Perhaps some day it will be. - -: ${jaildir="${DESTDIR}/var/rcynic"} -: ${jailuser="rcynic"} -: ${jailgroup="rcynic"} -: ${setupcron="NO"} - -echo "Setting up \"${jaildir}\" as a chroot jail for rcynic." - -if /usr/sbin/pw groupshow "${jailgroup}" 2>/dev/null; then - echo "You already have a group \"${jailgroup}\", so I will use it." -elif /usr/sbin/pw groupadd ${jailgroup}; then - echo "Added group \"${jailgroup}\"." -else - echo "Adding group \"${jailgroup}\" failed..." - echo "Please create it, then try again." - exit 1 -fi - -if /usr/sbin/pw usershow "${jailuser}" 2>/dev/null; then - echo "You already have a user \"${jailuser}\", so I will use it." -elif /usr/sbin/pw useradd ${jailuser} -g ${jailgroup} -h - -d /nonexistant -s /usr/sbin/nologin -c "RPKI validation system"; then - echo "Added user \"${jailuser}\"." -else - echo "Adding user \"${jailuser}\" failed..." - echo "Please create it, then try again." - exit 1 -fi - -if ! /bin/test -d "${jaildir}"; then - /bin/mkdir "${jaildir}" -fi - -if /usr/bin/install -m 555 -o root -g wheel -p rc.d.rcynic ${DESTDIR}/usr/local/etc/rc.d/rcynic; then - echo "Installed rc.d.rcynic as ${DESTDIR}/usr/local/etc/rc.d/rcynic" -else - echo "Installing ${DESTDIR}/usr/local/etc/rc.d/rcynic failed" - exit 1 -fi - -echo "Running /usr/local/etc/rc.d/rcynic to set up directories" - -if ! rcynic_jaildir="$jaildir" rcynic_user="$jailuser" rcynic_group="$jailgroup" /bin/sh /usr/local/etc/rc.d/rcynic start; then - echo "Directory setup failed" - exit 1 -fi - -if /bin/test -r "$jaildir/etc/rcynic.conf"; then - echo "You already have config file \"${jaildir}/etc/rcynic.conf\", so I will use it." -elif /usr/bin/install -m 444 -o root -g wheel -p ../sample-rcynic.conf "${jaildir}/etc/rcynic.conf"; then - echo "Installed minimal ${jaildir}/etc/rcynic.conf, adding SAMPLE trust anchors" - for i in ../../sample-trust-anchors/*.tal; do - j="$jaildir/etc/trust-anchors/${i##*/}" - /bin/test -r "$i" || continue - /bin/test -r "$j" && continue - echo "Installing $i as $j" - /usr/bin/install -m 444 -o root -g wheel -p "$i" "$j" - done - j=1 - for i in $jaildir/etc/trust-anchors/*.tal; do - echo >>"${jaildir}/etc/rcynic.conf" "trust-anchor-locator.$j = /etc/trust-anchors/${i##*/}" - j=$((j+1)) - done -else - echo "Installing minimal ${jaildir}/etc/rcynic.conf failed" - exit 1 -fi - -echo "Installing rcynic as ${jaildir}/bin/rcynic" - -/usr/bin/install -m 555 -o root -g wheel -p ../../rcynic "${jaildir}/bin/rcynic" - -if /bin/test ! -x "$jaildir/bin/rsync" -a ! -x ../../static-rsync/rsync; then - echo "Building static rsync for jail, this may take a little while" - (cd ../../static-rsync && exec make) -fi - -if /bin/test -x "$jaildir/bin/rsync"; then - echo "You already have an executable \"$jaildir/bin/rsync\", so I will use it" -elif /usr/bin/install -m 555 -o root -g wheel -p ../../static-rsync/rsync "${jaildir}/bin/rsync"; then - echo "Installed static rsync as \"${jaildir}/bin/rsync\"" -else - echo "Installing static rsync failed" - exit 1 -fi - -if /usr/bin/install -m 555 -o root -g wheel -p ../../rcynic-html "${jaildir}/bin/rcynic-html"; then - echo "Installed rcynic.py as \"${jaildir}/bin/rcynic-html\"" -else - echo "Installing rcynic-html failed" - exit 1 -fi - -echo "Setting up root's crontab to run jailed rcynic" - -case "$setupcron" in -YES|yes) - /usr/bin/crontab -l -u root 2>/dev/null | - /usr/bin/awk -v "jailuser=$jailuser" -v "jailgroup=$jailgroup" -v "jaildir=$jaildir" ' - BEGIN { - cmd = "exec /usr/sbin/chroot -u " jailuser " -g " jailgroup " " jaildir; - cmd = cmd " /bin/rcynic -c /etc/rcynic.conf"; - } - $0 !~ cmd { - print; - } - END { - "/usr/bin/hexdump -n 2 -e \"\\\"%u\\\\\\n\\\"\" /dev/random" | getline; - printf "%u * * * *\t%s\n", $1 % 60, cmd; - }' | - /usr/bin/crontab -u root - - /bin/cat <<EOF - - crontab is set up to run rcynic hourly, at a randomly selected - minute (to spread load on the rsync servers). Please do NOT - adjust this to run on the hour. In particular please do NOT - adjust this to run at midnight UTC. -EOF - ;; - -*) - /bin/cat <<EOF - - You'll need to add a crontab entry running the following command as root: - - /usr/sbin/chroot -u $jailuser -g $jailgroup $jaildir /bin/rcynic -c /etc/rcynic.conf - - Please try to pick a random time for this, don't just run it on the hour, - or at local midnight, or, worst of all, at midnight UTC. - -EOF - ;; - -esac - -/bin/cat <<EOF - - Jail set up. You may need to customize $jaildir/etc/rcynic.conf. - If you did not install your own trust anchors, a default set - of SAMPLE trust anchors may have been installed for you, but - you, the relying party, are the only one who can decide - whether you trust those anchors. rcynic will not do anything - useful without good trust anchors. - -EOF diff --git a/rcynic/installation-scripts/freebsd/rc.d.rcynic b/rcynic/installation-scripts/freebsd/rc.d.rcynic deleted file mode 100755 index 73e6efda..00000000 --- a/rcynic/installation-scripts/freebsd/rc.d.rcynic +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/sh - -# -# $Id$ -# -# PROVIDE: rcynic -# REQUIRE: DAEMON -# KEYWORD: nojail - -. /etc/rc.subr - -name="rcynic" -start_cmd="rcynic_start" -stop_cmd="rcynic_stop" - -: ${rcynic_jaildir="/var/rcynic"} -: ${rcynic_user="rcynic"} -: ${rcynic_group="rcynic"} - -rcynic_start() -{ - /bin/test -d "${rcynic_jaildir}" || /bin/mkdir "${rcynic_jaildir}" - /sbin/umount "${rcynic_jaildir}/dev" 2>/dev/null - - /usr/sbin/mtree -deU -p "${rcynic_jaildir}" <<EOF - - /set type=dir uname=root gname=wheel mode=0555 - . - bin - .. - dev - .. - etc - trust-anchors - .. - .. - var - run - .. - .. - data uname=${rcynic_user} gname=${rcynic_group} mode=0755 - .. - .. -EOF - - /bin/chmod -R a-w "${rcynic_jaildir}/bin" "${rcynic_jaildir}/etc" - /usr/sbin/chown -R root:wheel "${rcynic_jaildir}/bin" "${rcynic_jaildir}/etc" - - if /bin/test -f "${rcynic_jaildir}/etc/rsa_key"; then - /bin/chmod 400 "${rcynic_jaildir}/etc/rsa_key" - /usr/sbin/chown "${rcynic_user}" "${rcynic_jaildir}/etc/rsa_key" - fi - - if ! /sbin/mount -t devfs dev "${rcynic_jaildir}/dev"; then - echo "Mounting devfs on ${rcynic_jaildir}/dev failed..." - exit 1 - fi - - /sbin/devfs -m "${rcynic_jaildir}/dev" rule apply hide - /sbin/devfs -m "${rcynic_jaildir}/dev" rule apply path null unhide - /sbin/devfs -m "${rcynic_jaildir}/dev" rule apply path random unhide - - for i in /etc/localtime /etc/resolv.conf; do - j="${rcynic_jaildir}${i}" - if /bin/test -r "$i" && ! /usr/bin/cmp -s "$i" "$j"; then - /usr/bin/install -m 444 -o root -g wheel -p "$i" "$j" - fi - done -} - -rcynic_stop() -{ - /sbin/umount "${rcynic_jaildir}/dev" 2>/dev/null -} - -load_rc_config $name -run_rc_command "$1" diff --git a/rcynic/installation-scripts/install.sh b/rcynic/installation-scripts/install.sh deleted file mode 100644 index 8c708a28..00000000 --- a/rcynic/installation-scripts/install.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -# $Id$ - -set -e - -case "${host_os}" in - -freebsd*) cd freebsd; . ./install.sh;; -darwin*) cd darwin; . ./install.sh;; -linux*) cd linux; . ./install.sh;; - -*) echo 1>&2 "Don't know how to install rcynic jail on platform ${host_os}" - exit 1;; -esac diff --git a/rcynic/installation-scripts/linux/install.sh b/rcynic/installation-scripts/linux/install.sh deleted file mode 100644 index 3c9a6412..00000000 --- a/rcynic/installation-scripts/linux/install.sh +++ /dev/null @@ -1,255 +0,0 @@ -#!/bin/sh - -# $Id$ -# -# Create a chroot jail for rcynic. -# -# This is approximately what a package installation script might do. - -: ${jaildir="${DESTDIR}/var/rcynic"} -: ${jailuser="rcynic"} -: ${jailgroup="rcynic"} -: ${setupcron="NO"} - -echo "Setting up \"${jaildir}\" as a chroot jail for rcynic." - -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} -then - echo "Added group \"${jailgroup}\"." -else - echo "Adding group \"${jailgroup}\" failed..." - echo "Please create it, then try again." - exit 1 -fi - -# The adduser program on CentOS 5.x uses the -n flag instead of -N to -# avoid creating the associated group. -nogroup='-N' -if test -f /etc/redhat-release; then - read vendor release version < /etc/redhat-release - if test $vendor = CentOS; then - nogroup='-n' - fi -fi - -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 $nogroup -d "${jaildir}" -s /sbin/nologin -c "RPKI validation system" ${jailuser} -then - echo "Added user \"${jailuser}\"." -else - echo "Adding user \"${jailuser}\" failed..." - echo "Please create it, then try again." - exit 1 -fi - -# test for x86_64 target -if test -d /lib64; then - libdir=/lib64 -else - libdir=/lib -fi - -echo "Building directories" - -if ! /bin/mkdir -p -v -m 555 \ - "${jaildir}/bin" \ - "${jaildir}/dev" \ - "${jaildir}/etc/trust-anchors" \ - "${jaildir}/${libdir}" \ - "${jaildir}/usr/lib" \ - "${jaildir}/data" -then - echo "Unable to build directories under \"${jaildir}\", please fix this then try again." - exit 1 -fi - -echo "Installing device inodes" - -if ! (cd /dev; /bin/ls null zero random urandom | /bin/cpio -puv "${jaildir}/dev") -then - echo "Unable to install device inodes in ${jaildir}/dev/, please fix this then try again" - exit 1 -fi - -echo "Copying files from /etc" - -for i in /etc/localtime /etc/resolv.conf /etc/passwd /etc/group -do - j="${jaildir}${i}" - if test -r "$i" && - ! /usr/bin/cmp -s "$i" "$j" && - ! /bin/cp -p "$i" "$j" - then - echo "Unable to copy $i to ${jaildir}, please fix this then try again" - exit 1 - fi -done - -echo "Whacking file permissions" - -if ! /bin/chmod -R a-w "${jaildir}/bin" "${jaildir}/etc" || - ! /bin/chmod -R 755 "${jaildir}/data" || - ! /bin/chown -R root:root "${jaildir}/bin" "${jaildir}/etc" || - ! /bin/chown -R "${jailuser}:${jailgroup}" "${jaildir}/data" -then - echo "Unable to set file permissions and ownerships correctly, please fix this and try again" - exit 1 -fi - -if test -f "${jaildir}/etc/rsa_key" -then - /bin/chmod 400 "${jaildir}/etc/rsa_key" - /bin/chown "${jailuser}" "${jaildir}/etc/rsa_key" -fi - -if test -r "$jaildir/etc/rcynic.conf"; then - echo "You already have config file \"${jaildir}/etc/rcynic.conf\", so I will use it." -elif /usr/bin/install -m 444 -o root -g root -p ../sample-rcynic.conf "${jaildir}/etc/rcynic.conf"; then - echo "Installed minimal ${jaildir}/etc/rcynic.conf, adding SAMPLE trust anchors" - for i in ../../sample-trust-anchors/*.tal; do - j="$jaildir/etc/trust-anchors/${i##*/}" - test -r "$i" || continue - test -r "$j" && continue - echo "Installing $i as $j" - /usr/bin/install -m 444 -o root -g root -p "$i" "$j" - done - j=1 - for i in $jaildir/etc/trust-anchors/*.tal; do - echo >>"${jaildir}/etc/rcynic.conf" "trust-anchor-locator.$j = /etc/trust-anchors/${i##*/}" - j=$((j+1)) - done -else - echo "Installing minimal ${jaildir}/etc/rcynic.conf failed" - exit 1 -fi - -echo "Installing rcynic as ${jaildir}/bin/rcynic" - -/usr/bin/install -m 555 -o root -g root -p ../../rcynic "${jaildir}/bin/rcynic" - -if test -x "$jaildir/bin/rsync"; then - echo "You already have an executable \"$jaildir/bin/rsync\", so I will use it" -elif /usr/bin/install -m 555 -o root -g root -p /usr/bin/rsync "${jaildir}/bin/rsync"; then - echo "Installed ${jaildir}/bin/rsync" -else - echo "Installing ${jaildir}/bin/rsync failed" - exit 1 -fi - -echo "Copying required shared libraries" - -shared_libraries="${jaildir}/bin/rcynic ${jaildir}/bin/rsync $(/usr/bin/find ${libdir} -name 'libnss*.so*' -print)" -while true -do - closure="$(/usr/bin/ldd ${shared_libraries} | - ${AWK} -v "rcynic=${jaildir}/bin/rcynic" -v "rsync=${jaildir}/bin/rsync" ' - { - sub(/:$/, ""); - } - $0 == rcynic || $0 == rsync || $1 ~ /\/ld-linux\.so/ { - next; - } - { - for (i = 1; i <= NF; i++) - if ($i ~ /^\//) - print $i; - } - ' | - ${SORT} -u)" - if test "x$shared_libraries" = "x$closure" - then - break - else - shared_libraries="$closure" - fi -done - -# Under CentOS 5.5, rsync requires libresolv, but ldd doesn't show -# it. -if test -f ${libdir}/libresolv.so.2; then - shared_libraries="${shared_libraries} ${libdir}/libresolv.so.2" -fi - -for shared in ${libdir}/*ld*.so* $shared_libraries -do - if test -r "${jaildir}/${shared}" - then - echo "You already have a \"${jaildir}${shared}\", so I will use it" - elif /usr/bin/install -m 555 -o root -g root -d "${jaildir}${shared%/*}" && - /usr/bin/install -m 555 -o root -g root -p "${shared}" "${jaildir}${shared}" - then - echo "Copied ${shared} into ${jaildir}" - else - echo "Unable to copy ${shared} into ${jaildir}" - exit 1 - fi -done - -if /usr/bin/install -m 555 -o root -g root -p ../../rcynic-html "${jaildir}/bin/rcynic-html"; then - echo "Installed rcynic.py as \"${jaildir}/bin/rcynic-html\"" -else - echo "Installing rcynic-html failed" - exit 1 -fi - -echo "Setting up root's crontab to run jailed rcynic" - -case "$setupcron" in -YES|yes) - /usr/bin/crontab -l -u root 2>/dev/null | - ${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"; - } - $0 !~ cmd { - print; - } - END { - "/usr/bin/hexdump -n 2 -e \"\\\"%u\\\\\\n\\\"\" /dev/random" | getline; - printf "%u * * * *\t%s\n", $1 % 60, cmd; - }' | - /usr/bin/crontab -u root - - /bin/cat <<EOF - - crontab is set up to run rcynic hourly, at a randomly selected - minute (to spread load on the rsync servers). Please do NOT - adjust this to run on the hour. In particular please do NOT - adjust this to run at midnight UTC. -EOF - ;; - -*) - /bin/cat <<EOF - - You'll need to add a crontab entry running one of the the following command as root: - - /usr/sbin/chroot --userspec $jailuser:$jailgroup $jaildir /bin/rcynic -c /etc/rcynic.conf - - /usr/bin/chrootuid $jaildir rcynic /bin/rcynic -c /etc/rcynic.conf - - We recommend the latter, as chrootuid has proven more reliable for us than the chroot - program that is included on some GNU/Linux platforms. - - Please try to pick a random time for this, don't just run it on the hour, - or at local midnight, or, worst of all, at midnight UTC. - -EOF - ;; - -esac - -/bin/cat <<EOF - - Jail set up. You may need to customize $jaildir/etc/rcynic.conf. - If you did not install your own trust anchors, a default set - of SAMPLE trust anchors may have been installed for you, but - you, the relying party, are the only one who can decide - whether you trust those anchors. rcynic will not do anything - useful without good trust anchors. - -EOF diff --git a/rcynic/installation-scripts/manifest.sh b/rcynic/installation-scripts/manifest.sh deleted file mode 100644 index 26872b1a..00000000 --- a/rcynic/installation-scripts/manifest.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -# $Id$ - -echo >>${abs_top_builddir}/installation-manifest D %%RCYNICJAILDIR%% -echo >>${abs_top_builddir}/installation-manifest D %%RCYNICJAILDIR%%/bin -echo >>${abs_top_builddir}/installation-manifest D %%RCYNICJAILDIR%%/dev -echo >>${abs_top_builddir}/installation-manifest D %%RCYNICJAILDIR%%/etc -echo >>${abs_top_builddir}/installation-manifest D %%RCYNICJAILDIR%%/etc/trust-anchors -echo >>${abs_top_builddir}/installation-manifest D %%RCYNICJAILDIR%%/var -echo >>${abs_top_builddir}/installation-manifest D %%RCYNICJAILDIR%%/data - -echo >>${abs_top_builddir}/installation-manifest F %%RCYNICJAILDIR%%/bin/rcynic -echo >>${abs_top_builddir}/installation-manifest F %%RCYNICJAILDIR%%/bin/rsync -echo >>${abs_top_builddir}/installation-manifest F %%RCYNICJAILDIR%%/bin/rcynic-html - -# Not sure what to do about %%RCYNICJAILDIR%%/${libdir}/* on Linux, as we -# don't know what goes there until we compute the transitive closure -# of ldd dependencies. Ick. Ignore for now. - -case "${host_os}" in -freebsd*) echo >>${abs_top_builddir}/installation-manifest F %%RCDIR%%/rcynic;; -darwin*) echo >>${abs_top_builddir}/installation-manifest F /Library/StartupItems/RCynic;; -esac diff --git a/rcynic/rc-scripts/darwin/RCynic b/rcynic/rc-scripts/darwin/RCynic new file mode 100755 index 00000000..d486a3c3 --- /dev/null +++ b/rcynic/rc-scripts/darwin/RCynic @@ -0,0 +1,42 @@ +#!/bin/sh - +# +# $Id$ +# +. /etc/rc.common + +name="rcynic" +start_cmd="rcynic_start" +stop_cmd="rcynic_stop" + +: ${rcynic_dir="/var/rcynic"} + +StartService() +{ + /sbin/umount "${rcynic_dir}/dev" 2>/dev/null + + if ! /sbin/mount_devfs devfs "${rcynic_dir}/dev"; then + echo "Mounting devfs on ${rcynic_dir}/dev failed..." + exit 1 + fi + + for i in /etc/localtime /etc/resolv.conf; do + j="${rcynic_dir}${i}" + if /bin/test -r "$i" && ! /usr/bin/cmp -s "$i" "$j"; then + /usr/bin/install -m 444 -o root -g wheel -p "$i" "$j" + fi + done + + /bin/ln -f /var/run/mDNSResponder "${rcynic_dir}/var/run/mDNSResponder" +} + +StopService() +{ + /sbin/umount "${rcynic_dir}/dev" 2>/dev/null +} + +RestartService() +{ + StartService +} + +RunService "$1" diff --git a/rcynic/installation-scripts/darwin/RCynic/StartupParameters.plist b/rcynic/rc-scripts/darwin/StartupParameters.plist index ca46b676..ca46b676 100644 --- a/rcynic/installation-scripts/darwin/RCynic/StartupParameters.plist +++ b/rcynic/rc-scripts/darwin/StartupParameters.plist diff --git a/rcynic/rc-scripts/freebsd/rc.d.rcynic b/rcynic/rc-scripts/freebsd/rc.d.rcynic new file mode 100755 index 00000000..9b7aa545 --- /dev/null +++ b/rcynic/rc-scripts/freebsd/rc.d.rcynic @@ -0,0 +1,44 @@ +#!/bin/sh - +# +# $Id$ +# +# PROVIDE: rcynic +# REQUIRE: DAEMON +# KEYWORD: nojail + +. /etc/rc.subr + +name="rcynic" +start_cmd="rcynic_start" +stop_cmd="rcynic_stop" + +: ${rcynic_dir="/var/rcynic"} + +rcynic_start() +{ + /sbin/umount "${rcynic_dir}/dev" 2>/dev/null + + if ! /sbin/mount -t devfs dev "${rcynic_dir}/dev"; then + echo "Mounting devfs on ${rcynic_dir}/dev failed..." + exit 1 + fi + + /sbin/devfs -m "${rcynic_dir}/dev" rule apply hide + /sbin/devfs -m "${rcynic_dir}/dev" rule apply path null unhide + /sbin/devfs -m "${rcynic_dir}/dev" rule apply path random unhide + + for i in /etc/localtime /etc/resolv.conf; do + j="${rcynic_dir}${i}" + if /bin/test -r "$i" && ! /usr/bin/cmp -s "$i" "$j"; then + /usr/bin/install -m 444 -o root -g wheel -p "$i" "$j" + fi + done +} + +rcynic_stop() +{ + /sbin/umount "${rcynic_dir}/dev" 2>/dev/null +} + +load_rc_config $name +run_rc_command "$1" diff --git a/rcynic/rcynic-cron.py b/rcynic/rcynic-cron.py new file mode 100644 index 00000000..d985d7e3 --- /dev/null +++ b/rcynic/rcynic-cron.py @@ -0,0 +1,85 @@ +""" +Cron job for rcynic and rtr-origin in stock configuration. + +$Id$ + +Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC") + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +""" + +# Locking code here works like FreeBSD's lockf(1) utility given -k and +# -t 0 options, which is both the sanest and simplest combination for +# our purposes. In theory this is portable to any Unix-like system. +# +# At some point we might want to implement the chroot() and setuid() +# functionality here rather than using this mess of platform-specific +# external programs. I don't have time to write and debug that today, +# but it might well be simpler and more portable. + +import subprocess +import sys +import fcntl +import os +import pwd +import errno + +we_are_root = os.getuid() == 0 + +beastie = sys.platform.startswith("freebsd") or sys.platform.startswith("darwin") + +def bin(name, chroot = False): + return os.path.join("/bin" if chroot and we_are_root else ac_bindir, name) + +def etc(name, chroot = False): + return os.path.join("/etc" if chroot and we_are_root else ac_sysconfdir, name) + +def rcy(name): + return os.path.join(ac_rcynic_dir, name) + +def run(*cmd, **kwargs): + chroot = kwargs.pop("chroot", False) and we_are_root + if we_are_root: + if chroot and beastie: + cmd = (ac_chroot, "-u", ac_rcynic_user, "-g", ac_rcynic_group, ac_rcynic_dir) + cmd + elif chroot and not beastie: + cmd = (ac_chrootuid, ac_rcynic_dir, ac_rcynic_user) + cmd + elif not chroot and beastie: + cmd = (ac_su, "-m", ac_rcynic_user, "-c", " ".join(cmd)) + elif not chroot and not beastie: + cmd = (ac_sudo, "-u", ac_rcynic_user) + cmd + else: + raise RuntimeError("How the frell did I get here?") + try: + subprocess.check_call(cmd, **kwargs) + except subprocess.CalledProcessError, e: + sys.exit(str(e)) + +try: + lock = os.open(os.path.join(ac_rcynic_dir, "data/lock"), os.O_RDONLY | os.O_CREAT | os.O_NONBLOCK, 0666) + fcntl.flock(lock, fcntl.LOCK_EX | fcntl.LOCK_NB) + if we_are_root: + pw = pwd.getpwnam(ac_rcynic_user) + os.fchown(lock, pw.pw_uid, pw.pw_gid) +except (IOError, OSError), e: + if e.errno == errno.EAGAIN: + sys.exit(0) # Another instance of this script is already running, exit silently + else: + sys.exit("Error %r opening lock %r" % (e.strerror, os.path.join(ac_rcynic_dir, "data/lock"))) + +run(bin("rcynic", chroot = True), "-c", etc("rcynic.conf", chroot = True), chroot = True) + +if ac_rcynic_html_dir and os.path.exists(os.path.dirname(ac_rcynic_html_dir)): + run(bin("rcynic-html"), rcy("data/rcynic.xml"), ac_rcynic_html_dir) + +run(bin("rtr-origin"), "--cronjob", rcy("data/authenticated"), cwd = rcy("rpki-rtr")) diff --git a/rcynic/rcynic-html.py b/rcynic/rcynic-html.py index d86c84f3..46e2e634 100644 --- a/rcynic/rcynic-html.py +++ b/rcynic/rcynic-html.py @@ -323,6 +323,9 @@ class Host(Problem_Mixin): except OSError, e: usage("Problem running %s, perhaps you need to set --rrdtool-binary? (%s)" % ( opt["rrdtool-binary"], e)) + except subprocess.CalledProcessError, e: + sys.exit("Failure running %s: %s" % ( + opt["rrdtool-binary"], e)) def rrd_update(self): filename = os.path.join(opt["output_directory"], self.hostname) + ".rrd" diff --git a/rcynic/rules.darwin.mk b/rcynic/rules.darwin.mk new file mode 100644 index 00000000..998b5f54 --- /dev/null +++ b/rcynic/rules.darwin.mk @@ -0,0 +1,73 @@ +# $Id$ + +install-user-and-group: .FORCE + @if /usr/bin/dscl . -read "/Groups/${RCYNIC_GROUP}" >/dev/null 2>&1; \ + then \ + echo "You already have a group \"${RCYNIC_GROUP}\", so I will use it."; \ + elif gid="$$(/usr/bin/dscl . -list /Groups PrimaryGroupID | /usr/bin/awk 'BEGIN {gid = 501} $$2 >= gid {gid = 1 + $$2} END {print gid}')" && \ + /usr/bin/dscl . -create "/Groups/${RCYNIC_GROUP}" && \ + /usr/bin/dscl . -create "/Groups/${RCYNIC_GROUP}" RealName "${RCYNIC_GECOS}" && \ + /usr/bin/dscl . -create "/Groups/${RCYNIC_GROUP}" PrimaryGroupID "$$gid" && \ + /usr/bin/dscl . -create "/Groups/${RCYNIC_GROUP}" GeneratedUID "$$(/usr/bin/uuidgen)" && \ + /usr/bin/dscl . -create "/Groups/${RCYNIC_GROUP}" Password "*"; \ + then \ + echo "Added group \"${RCYNIC_GROUP}\"."; \ + else \ + echo "Adding group \"${RCYNIC_GROUP}\" failed..."; \ + echo "Please create it, then try again."; \ + exit 1; \ + fi; \ + if /usr/bin/dscl . -read "/Users/${RCYNIC_USER}" >/dev/null 2>&1; \ + then \ + echo "You already have a user \"${RCYNIC_USER}\", so I will use it."; \ + elif uid="$$(/usr/bin/dscl . -list /Users UniqueID | /usr/bin/awk 'BEGIN {uid = 501} $$2 >= uid {uid = 1 + $$2} END {print uid}')" && \ + /usr/bin/dscl . -create "/Users/${RCYNIC_USER}" && \ + /usr/bin/dscl . -create "/Users/${RCYNIC_USER}" UserShell "/usr/bin/false" && \ + /usr/bin/dscl . -create "/Users/${RCYNIC_USER}" RealName "${RCYNIC_GECOS}" && \ + /usr/bin/dscl . -create "/Users/${RCYNIC_USER}" UniqueID "$$uid" && \ + /usr/bin/dscl . -create "/Users/${RCYNIC_USER}" PrimaryGroupID "$$gid" && \ + /usr/bin/dscl . -create "/Users/${RCYNIC_USER}" NFSHomeDirectory "/var/empty" && \ + /usr/bin/dscl . -create "/Users/${RCYNIC_USER}" GeneratedUID "$$(/usr/bin/uuidgen)" && \ + /usr/bin/dscl . -create "/Users/${RCYNIC_USER}" Password "*"; \ + then \ + echo "Added user \"${RCYNIC_USER}\"."; \ + else \ + echo "Adding user \"${RCYNIC_USER}\" failed..."; \ + echo "Please create it, then try again."; \ + exit 1; \ + fi + + +install-shared-libraries: .FORCE + @echo "Copying required shared libraries" + @shared_libraries="${RCYNIC_DIR}/bin/rcynic ${RCYNIC_DIR}/bin/rsync"; \ + while true; \ + do \ + closure="$$(/usr/bin/otool -L $${shared_libraries} | /usr/bin/awk '/:$$/ {next} {print $$1}' | /usr/bin/sort -u)"; \ + if test "x$$shared_libraries" = "x$$closure"; + then \ + break; \ + else \ + shared_libraries="$$closure"; \ + fi; \ + done; \ + for shared in /usr/lib/dyld $$shared_libraries; \ + do \ + if /bin/test -r "${RCYNIC_DIR}/$${shared}"; \ + then \ + echo "You already have a \"${RCYNIC_DIR}/$${shared}\", so I will use it"; \ + elif /usr/bin/install -m 555 -o root -g wheel -p "$${shared}" "${RCYNIC_DIR}/$${shared}"; \ + then \ + echo "Copied $${shared} into ${RCYNIC_DIR}"; \ + else \ + echo "Unable to copy $${shared} into ${RCYNIC_DIR}"; \ + exit 1; \ + fi; \ + done + +install-rc-scripts: + ${INSTALL} -o root -g wheel -d ${DESTDIR}/Library/StartupItems/RCynic + ${INSTALL} -o root -g wheel -m 555 \ + rc-scripts/darwin/RCynic \ + rc-scripts/darwin/StartupParameters.plist \ + ${DESTDIR}/Library/Startup/RCynic diff --git a/rcynic/rules.freebsd.mk b/rcynic/rules.freebsd.mk new file mode 100644 index 00000000..f5391ce8 --- /dev/null +++ b/rcynic/rules.freebsd.mk @@ -0,0 +1,34 @@ +# $Id$ + +install-user-and-group: .FORCE + @if /usr/sbin/pw groupshow "${RCYNIC_GROUP}" 2>/dev/null; \ + then \ + echo "You already have a group \"${RCYNIC_GROUP}\", so I will use it."; \ + elif /usr/sbin/pw groupadd ${RCYNIC_GROUP}; \ + then \ + echo "Added group \"${RCYNIC_GROUP}\"."; \ + else \ + echo "Adding group \"${RCYNIC_GROUP}\" failed..."; \ + echo "Please create it, then try again."; \ + exit 1; \ + fi + @if /usr/sbin/pw usershow "${RCYNIC_USER}" 2>/dev/null; \ + then \ + echo "You already have a user \"${RCYNIC_USER}\", so I will use it."; \ + elif /usr/sbin/pw useradd ${RCYNIC_USER} -g ${RCYNIC_GROUP} -h - -d /nonexistant -s /usr/sbin/nologin -c "${RCYNIC_GECOS}"; \ + then \ + echo "Added user \"${RCYNIC_USER}\"."; \ + else \ + echo "Adding user \"${RCYNIC_USER}\" failed..."; \ + echo "Please create it, then try again."; \ + exit 1; \ + fi + + +# We use static compilation on FreeBSD, so no need for shared libraries + +install-shared-libraries: + @true + +install-rc-scripts: + ${INSTALL} -m 555 -o root -g wheel -p rc-scripts/freebsd/rc.d.rcynic ${DESTDIR}/usr/local/etc/rc.d/rcynic diff --git a/rcynic/rules.linux.mk b/rcynic/rules.linux.mk new file mode 100644 index 00000000..abb9db64 --- /dev/null +++ b/rcynic/rules.linux.mk @@ -0,0 +1,68 @@ +# $Id$ + +install-user-and-group: .FORCE + @if ${AWK} -F: 'BEGIN {status = 1} $$1 == ${RCYNIC_GROUP} {status = 0} END {exit status}' /etc/group; \ + then \ + echo "You already have a group \"${RCYNIC_GROUP}\", so I will use it."; \ + elif /usr/sbin/groupadd ${RCYNIC_GROUP}; \ + then \ + echo "Added group \"${RCYNIC_GROUP}\"."; \ + else \ + echo "Adding group \"${RCYNIC_GROUP}\" failed..."; \ + echo "Please create it, then try again."; \ + exit 1; \ + fi + @nogroup='-N'; \ + if test -f /etc/redhat-release; then; read vendor release version < /etc/redhat-release; if test $$vendor = CentOS; then; nogroup='-n'; fi; fi; \ + if ${AWK} -F: 'BEGIN {status = 1} $$1 == ${RCYNIC_USER} {status = 0} END {exit status}' /etc/passwd; \ + then \ + echo "You already have a user \"${RCYNIC_USER}\", so I will use it." \ + elif /usr/sbin/useradd -g ${RCYNIC_GROUP} -M $$nogroup -d "${RCYNIC_DIR}" -s /sbin/nologin -c "${RCYNIC_GECOS}" ${RCYNIC_USER}; \ + then \ + echo "Added user \"${RCYNIC_USER}\"."; \ + else \ + echo "Adding user \"${RCYNIC_USER}\" failed..."; \ + echo "Please create it, then try again."; \ + exit 1; \ + fi + + +install-shared-libraries: .FORCE + @echo "Copying required shared libraries" + @if test -d /lib64; then libdir=/lib64; else libdir=/lib; fi; \ + shared_libraries="${RCYNIC_DIR}/bin/rcynic ${RCYNIC_DIR}/bin/rsync $$(/usr/bin/find $${libdir} -name 'libnss*.so*' -print)"; \ + while true; \ + do \ + closure="$$(/usr/bin/ldd $${shared_libraries} | \ + ${AWK} ' \ + { sub(/:$/, "") } \ + $$0 == "${RCYNIC_DIR}/bin/rcynic" { next } \ + $$0 == "${RCYNIC_DIR}/bin/rsync" { next } \ + $$1 ~ /\/ld-linux\.so/ { next } \ + { for (i = 1; i <= NF; i++) if ($$i ~ /^\//) print $$i } \ + ' | \ + ${SORT} -u)"; \ + if test "X$$shared_libraries" = "X$$closure"; \ + then \ + break; \ + else \ + shared_libraries="$$closure"; \ + fi; \ + done; \ + if test -f $${libdir}/libresolv.so.2; \ + then \ + shared_libraries="$${shared_libraries} $${libdir}/libresolv.so.2"; + fi; \ + for shared in $${libdir}/*ld*.so* $$shared_libraries; \ + do \ + if test ! -r "${RCYNIC_DIR}/$${shared}"; \ + then \ + ${INSTALL} -m 555 -d `dirname "${RCYNIC_DIR}$${shared}"` && \ + ${INSTALL} -m 555 -p "$${shared}" "${RCYNIC_DIR}$${shared}"; \ + fi; \ + done + +# No devfs, so no rc script + +install-rc-scripts: + @true diff --git a/rcynic/rules.unknown.mk b/rcynic/rules.unknown.mk new file mode 100644 index 00000000..6ce3ea18 --- /dev/null +++ b/rcynic/rules.unknown.mk @@ -0,0 +1,4 @@ +# $Id$ + +install-user-and-group install-shared-libraries install-rc-scripts: .FORCE + @echo "Don't know how to make $@ on this platform"; exit 1 diff --git a/rcynic/installation-scripts/sample-rcynic.conf b/rcynic/sample-rcynic.conf index 23a39373..23a39373 100644 --- a/rcynic/installation-scripts/sample-rcynic.conf +++ b/rcynic/sample-rcynic.conf diff --git a/rcynic/static-rsync/Makefile.in b/rcynic/static-rsync/Makefile.in index 9c8556e0..8a433c7b 100644 --- a/rcynic/static-rsync/Makefile.in +++ b/rcynic/static-rsync/Makefile.in @@ -13,6 +13,9 @@ BIN_LOG = > ../build.log 2>&1 BIN = rsync +abs_top_srcdir = @abs_top_srcdir@ +abs_top_builddir = @abs_top_builddir@ + all: ${BIN} ${BIN}: ${DIRNAME}/${BIN} diff --git a/rpkid/Makefile.in b/rpkid/Makefile.in index 6a92433e..f3b481bb 100644 --- a/rpkid/Makefile.in +++ b/rpkid/Makefile.in @@ -33,23 +33,27 @@ abs_top_srcdir = @abs_top_srcdir@ abs_top_builddir= @abs_top_builddir@ srcdir = @srcdir@ +SETUP_PY_INSTALL_LAYOUT = @SETUP_PY_INSTALL_LAYOUT@ + # PID files seem to go into /var/run/ on every platform we support. # We could make this an autoconf substitution if anything ever cares, # but let's keep it simple for now. -PID_DIR = /var/run/rpkid +PID_DIR = ${DESTDIR}/var/run/rpkid SETUP_PY = \ AC_CFLAGS='${CFLAGS}' \ AC_LDFLAGS='${LDFLAGS}' \ AC_LIBS='${LIBS}' \ - AC_SBINDIR='${DESTDIR}${sbindir}' \ + AC_SBINDIR='${sbindir}' \ AC_SCRIPTS='${SCRIPTS}' \ AC_ABS_BUILDDIR='${abs_builddir}' \ - AC_LIBEXECDIR='${DESTDIR}${libexecdir}' \ + AC_LIBEXECDIR='${libexecdir}' \ AC_AUX_SCRIPTS='${AUX_SCRIPTS}' \ ${PYTHON} setup.py +SETUP_PY_ROOT = `${PYTHON} -c 'import sys; print "--root " + sys.argv[1] if sys.argv[1] else ""' '${DESTDIR}'` + POW_SO = rpki/POW/_POW.so SCRIPTS = rpki-sql-backup rpki-sql-setup rpki-start-servers irbe_cli irdbd \ @@ -107,12 +111,17 @@ clean:: cd tests; $(MAKE) $@ rm -f ${SCRIPTS} ${AUX_SCRIPTS} ${SETTINGS} ${BUILD_SCRIPTS} -install:: - ${SETUP_PY} install --record installed +install:: all + ${SETUP_PY} install ${SETUP_PY_ROOT} ${SETUP_PY_INSTALL_LAYOUT} --record installed @echo @echo "== Default configuration file location is ${sysconfdir}/rpki.conf ==" @echo - if test -d ${PID_DIR}; then :; else ${INSTALL} -d ${PID_DIR}; fi +# +# We used to do this, but Debian/Ubuntu lintian complained that +# /var/run may be a temporary filesystem, thus directories like this +# should be created at boot. Fair point. +# +# if test -d ${PID_DIR}; then :; else ${INSTALL} -d ${PID_DIR}; fi uninstall deinstall:: xargs rm -fv <installed @@ -120,19 +129,6 @@ uninstall deinstall:: distclean:: rm -f installed -installation-manifest:: - echo >>${abs_top_builddir}/installation-manifest D %%PYTHON_SITELIBDIR%%/rpki/POW - echo >>${abs_top_builddir}/installation-manifest F %%PYTHON_SITELIBDIR%%/${POW_SO} - for i in ${SCRIPTS}; do echo >>${abs_top_builddir}/installation-manifest F %%SBINDIR%%/`echo $$i | sed 's=.*/==g'`; done - for i in ${AUX_SCRIPTS}; do echo >>${abs_top_builddir}/installation-manifest F %%LIBEXECDIR%%/`echo $$i | sed 's=.*/==g'`; done - find rpki -name .svn -prune -o -name TODO -prune -o -type f -print | awk '\ - {print "F %%PYTHON_SITELIBDIR%%/" $$0} \ - /\.py$$/ {print "F %%PYTHON_SITELIBDIR%%/" $$0 "c"} \ - ' >>${abs_top_builddir}/installation-manifest - find rpki -name .svn -prune -o -type d -print | awk '\ - {print "D %%PYTHON_SITELIBDIR%%/" $$0} \ - ' >>${abs_top_builddir}/installation-manifest - dont-run-trang: touch *.rng @@ -201,32 +197,35 @@ distclean:: clean docclean cd tests; ${MAKE} $@ rm -f TAGS Makefile -all install clean test distclean deinstall uninstall installation-manifest:: +all install clean test distclean deinstall uninstall:: @for i in ${SUBDIRS}; do echo "Making $@ in $$i"; (cd $$i && ${MAKE} $@); done +install:: + ${INSTALL} examples/rpki.conf ${DESTDIR}${sysconfdir}/rpki.conf.sample + # Scripts COMPILE_PYTHON = \ rm -f $@; \ AC_PYTHON_INTERPRETER='${PYTHON}' \ - AC_RPKI_CONFIG_DIR='${DESTDIR}${sysconfdir}' \ + AC_RPKI_CONFIG_DIR='${sysconfdir}' \ ${PYTHON} ${abs_top_srcdir}/buildtools/make-python-executable.py <$? >$@; \ chmod 555 $@ COMPILE_DJANGO = \ rm -f $@; \ AC_PYTHON_INTERPRETER='${PYTHON}' \ - AC_PYTHONPATH='${DESTDIR}${sysconfdir}/rpki' \ + AC_PYTHONPATH='${sysconfdir}/rpki' \ ${PYTHON} ${abs_top_srcdir}/buildtools/make-django-script.py <$? >$@; \ chmod 555 $@ COMPILE_SETTINGS = \ rm -f $@; \ AC_SECRET_KEY='${SECRET_KEY}' \ - AC_LOCALSTATEDIR='${DESTDIR}${localstatedir}' \ - AC_DATAROOTDIR='${DESTDIR}${datarootdir}' \ + AC_LOCALSTATEDIR='${localstatedir}' \ + AC_DATAROOTDIR='${datarootdir}' \ AC_DJANGO_DIR='${DJANGO_DIR}' \ - AC_SYSCONFDIR='${DESTDIR}${sysconfdir}' \ + AC_SYSCONFDIR='${sysconfdir}' \ ${PYTHON} ${abs_top_srcdir}/buildtools/subst-vars.py <$? >$@ rpki-sql-backup: rpki-sql-backup.py diff --git a/rpkid/portal-gui/Makefile.in b/rpkid/portal-gui/Makefile.in index 4a529b0f..7eb2e572 100644 --- a/rpkid/portal-gui/Makefile.in +++ b/rpkid/portal-gui/Makefile.in @@ -63,20 +63,5 @@ deinstall uninstall: rm -rf $(INSTDIR)/media $(INSTDIR)/wsgi rm -rf $(SYSCONFDIR)/apache.conf $(SYSCONFDIR)/settings.py $(SYSCONFDIR)/settings.pyc -installation-manifest: - echo >>${abs_top_builddir}/installation-manifest D %%SYSCONFDIR%%/rpki - echo >>${abs_top_builddir}/installation-manifest D %%DATAROOTDIR%%/rpki - echo >>${abs_top_builddir}/installation-manifest D %%DATAROOTDIR%%/rpki/wsgi - echo >>${abs_top_builddir}/installation-manifest D %%DATAROOTDIR%%/rpki/media - echo >>${abs_top_builddir}/installation-manifest D %%DATAROOTDIR%%/rpki/media/css - echo >>${abs_top_builddir}/installation-manifest D %%DATAROOTDIR%%/rpki/media/img - echo >>${abs_top_builddir}/installation-manifest D %%DATAROOTDIR%%/rpki/media/js - echo >>${abs_top_builddir}/installation-manifest F %%SYSCONFDIR%%/rpki/apache.conf - echo >>${abs_top_builddir}/installation-manifest F %%SYSCONFDIR%%/rpki/settings.py - echo >>${abs_top_builddir}/installation-manifest F %%DATAROOTDIR%%/rpki/wsgi/rpki.wsgi - find $(srcdir)/../rpki/gui/app/static/css $(srcdir)/../rpki/gui/app/static/js $(srcdir)/../rpki/gui/app/static/img \ - -name .svn -prune -o -type f -print | \ - sed 's=$(srcdir)/../rpki/gui/app/static=F %%DATAROOTDIR%%/rpki/media=' >>${abs_top_builddir}/installation-manifest - test: @true diff --git a/rtr-origin/Makefile.in b/rtr-origin/Makefile.in index 80ff2b50..9eb2ac55 100644 --- a/rtr-origin/Makefile.in +++ b/rtr-origin/Makefile.in @@ -4,8 +4,9 @@ BASE = rtr-origin SRC = ${BASE}.py BIN = ${BASE} -INSTALL = @INSTALL@ -m 555 +INSTALL = @INSTALL@ PYTHON = @PYTHON@ +AWK = @AWK@ prefix = @prefix@ exec_prefix = @exec_prefix@ @@ -22,29 +23,38 @@ libdir = @libdir@ abs_top_srcdir = @abs_top_srcdir@ abs_top_builddir = @abs_top_builddir@ +RTR_ORIGIN_INSTALL_TARGETS = @RCYNIC_INSTALL_TARGETS@ + +RPKI_RTR_PORT = 43779 + all: ${BIN} clean: rm -f ${BIN} -install: all - if test -d ${DESTDIR}${bindir} ; then :; else ${INSTALL} -d ${DESTDIR}${bindir}; fi - ${INSTALL} ${BIN} ${DESTDIR}${bindir}/${BIN} +install: all ${RTR_ORIGIN_INSTALL_TARGETS} + +install-binary: + if test -d ${DESTDIR}${bindir} ; then :; else ${INSTALL} -m 555 -d ${DESTDIR}${bindir}; fi + ${INSTALL} -m 555 ${BIN} ${DESTDIR}${bindir}/${BIN} deinstall uninstall: rm -f ${DESTDIR}${bindir}/${BIN} -installation-manifest: - echo >>${abs_top_builddir}/installation-manifest F %%BINDIR%%/${BIN} - distclean: clean rm -rf current sockets *.ax *.ix.* rm -f Makefile ${BIN} : ${SRC} - echo >$@ '#!${PYTHON}' - cat >>$@ ${SRC} - chmod a+x ${BIN} + AC_PYTHON_INTERPRETER='${PYTHON}' AC_SCAN_ROAS='${bindir}/scan_roas' \ + ${PYTHON} ${abs_top_srcdir}/buildtools/make-rcynic-script.py <${SRC} >$@ + chmod a+x $@ test: @true + +.FORCE: + +# Platform-specific rules below here. + +@RTR_ORIGIN_MAKE_RULES@ diff --git a/rtr-origin/rtr-origin.py b/rtr-origin/rtr-origin.py index 95bef50e..70a0bb1d 100755 --- a/rtr-origin/rtr-origin.py +++ b/rtr-origin/rtr-origin.py @@ -9,7 +9,7 @@ # # $Id$ # -# Copyright (C) 2009-2012 Internet Systems Consortium ("ISC") +# Copyright (C) 2009-2013 Internet Systems Consortium ("ISC") # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -1805,9 +1805,15 @@ def bgpdump_server_main(argv): except KeyboardInterrupt: sys.exit(0) - -scan_roas = os.path.normpath(os.path.join(sys.path[0], "..", "utils", - "scan_roas", "scan_roas")) +# Figure out where the scan_roas utility program is today +try: + # Set from autoconf + scan_roas = ac_scan_roas +except NameError: + # Source directory + scan_roas = os.path.normpath(os.path.join(sys.path[0], "..", "utils", + "scan_roas", "scan_roas")) +# If that didn't work, use $PATH and hope for the best if not os.path.exists(scan_roas): scan_roas = "scan_roas" diff --git a/rtr-origin/rules.darwin.mk b/rtr-origin/rules.darwin.mk new file mode 100644 index 00000000..1230db92 --- /dev/null +++ b/rtr-origin/rules.darwin.mk @@ -0,0 +1,9 @@ +# $Id$ + +install-always: install-binary + +install-postconf: install-listener + +install-listener: + @echo "No rule for $@ on this platform (yet), you'll have to do that yourself if it matters." + diff --git a/rtr-origin/rules.freebsd.mk b/rtr-origin/rules.freebsd.mk new file mode 100644 index 00000000..4cb21f3b --- /dev/null +++ b/rtr-origin/rules.freebsd.mk @@ -0,0 +1,37 @@ +# $Id$ + +install-always: install-binary + +install-postconf: install-listener + +install-listener: .FORCE + @if /usr/bin/egrep -q '^rpki-rtr' /etc/services ; \ + then \ + echo "You already have a /etc/services entry for rpki-rtr, so I will use it."; \ + elif echo >>/etc/services "rpki-rtr ${RPKI_RTR_PORT}/tcp #RFC 6810" ; \ + then \ + echo "Added rpki-rtr to /etc/services."; \ + else \ + echo "Adding rpki-rtr to /etc/services failed, please fix this, then try again."; \ + exit 1; \ + fi + @if /usr/bin/egrep -q "rpki-rtr[ ]+stream[ ]+tcp[ ]" /etc/inetd.conf; \ + then \ + echo "You already have an inetd.conf entry for rpki-rtr on TCPv4, so I will use it."; \ + elif echo >>/etc/inetd.conf "rpki-rtr stream tcp nowait nobody /usr/local/bin/rtr-origin rtr-origin --server /var/rcynic/rpki-rtr"; \ + then \ + echo "Added rpki-rtr for TCPv4 to /etc/inetd.conf."; \ + else \ + echo "Adding rpki-rtr for TCPv4 to /etc/inetd.conf failed, please fix this, then try again."; \ + exit 1; \ + fi + @if /usr/bin/egrep -q "rpki-rtr[ ]+stream[ ]+tcp6[ ]" /etc/inetd.conf; \ + then \ + echo "You already have an inetd.conf entry for rpki-rtr on TCPv6, so I will use it."; \ + elif echo >>/etc/inetd.conf "rpki-rtr stream tcp6 nowait nobody /usr/local/bin/rtr-origin rtr-origin --server /var/rcynic/rpki-rtr"; \ + then \ + echo "Added rpki-rtr for TCPv6 to /etc/inetd.conf."; \ + else \ + echo "Adding rpki-rtr for TCPv6 to /etc/inetd.conf failed, please fix this, then try again."; \ + exit 1; \ + fi diff --git a/rtr-origin/rules.linux.mk b/rtr-origin/rules.linux.mk new file mode 100644 index 00000000..2faa0e41 --- /dev/null +++ b/rtr-origin/rules.linux.mk @@ -0,0 +1,29 @@ +# $Id$ + +install-always: install-binary install-listener + +install-postconf: + @true + +# Only need to make listener if not already present + +install-listener: ${DESTDIR}/etc/xinetd.d/rpki-rtr + +${DESTDIR}/etc/xinetd.d/rpki-rtr: + @${AWK} 'BEGIN { \ + print "service rpki-rtr"; \ + print "{"; \ + print " type = UNLISTED"; \ + print " flags = IPv4"; \ + print " socket_type = stream"; \ + print " protocol = tcp"; \ + print " port = ${RPKI_RTR_PORT}"; \ + print " wait = no"; \ + print " user = nobody"; \ + print " server = /usr/bin/rtr-origin"; \ + print " server_args = --server /var/rcynic/rpki-rtr"; \ + print "}"; \ + }' >xinetd.rpki-rtr + ${INSTALL} -d ${DESTDIR}/etc/xinetd.d + ${INSTALL} -m 644 xinetd.rpki-rtr $@ + rm xinetd.rpki-rtr diff --git a/rtr-origin/rules.unknown.mk b/rtr-origin/rules.unknown.mk new file mode 100644 index 00000000..fb16e93a --- /dev/null +++ b/rtr-origin/rules.unknown.mk @@ -0,0 +1,8 @@ +# $Id$ + +install-always: install-binary + +install-postconf: install-listener + +install-listener: + @echo "Don't know how to make $@ on this platform"; exit 1 diff --git a/utils/Makefile.in b/utils/Makefile.in index 7f59f132..11c8d17b 100644 --- a/utils/Makefile.in +++ b/utils/Makefile.in @@ -2,7 +2,7 @@ SUBDIRS = uri print_rpki_manifest print_roa hashdir find_roa scan_roas -all clean test distclean install deinstall uninstall installation-manifest:: +all clean test distclean install deinstall uninstall:: @for i in ${SUBDIRS}; do echo "Making $@ in $$i"; (cd $$i && ${MAKE} $@); done distclean:: diff --git a/utils/find_roa/Makefile.in b/utils/find_roa/Makefile.in index 438071d9..36c68e01 100644 --- a/utils/find_roa/Makefile.in +++ b/utils/find_roa/Makefile.in @@ -36,11 +36,13 @@ ${BIN}: ${SRC} ${CC} ${CFLAGS} -o $@ ${SRC} ${LDFLAGS} ${LIBS} -TEST_ARGS = ${abs_top_builddir}/rcynic/rcynic-data/authenticated 10.3.0.44 10.2.0.6 10.0.0.0/24 +ROA_DIR = ${abs_top_builddir}/rcynic/rcynic-data/authenticated + +TEST_ARGS = ${ROA_DIR} 10.3.0.44 10.2.0.6 10.0.0.0/24 test: ${BIN} -# ./${BIN} ${TEST_ARGS} - sh ./test_roa.sh ${TEST_ARGS} +# if test -d ${ROA_DIR}; then ./${BIN} ${TEST_ARGS} ; else :; fi + if test -d ${ROA_DIR}; then sh ./test_roa.sh ${TEST_ARGS} ; else :; fi install: all if test -d ${DESTDIR}${bindir} ; then :; else ${INSTALL} -d ${DESTDIR}${bindir}; fi @@ -49,9 +51,6 @@ install: all deinstall uninstall: rm -f ${DESTDIR}${bindir}/${BIN} -installation-manifest: - echo >>${abs_top_builddir}/installation-manifest F %%BINDIR%%/${BIN} - distclean: clean rm -rf hashed-pem-dir rm -f Makefile diff --git a/utils/hashdir/Makefile.in b/utils/hashdir/Makefile.in index 66b2cc25..c0cf448a 100644 --- a/utils/hashdir/Makefile.in +++ b/utils/hashdir/Makefile.in @@ -48,9 +48,6 @@ install: all if test -d ${DESTDIR}${bindir} ; then :; else ${INSTALL} -d ${DESTDIR}${bindir}; fi ${INSTALL} ${BIN} ${DESTDIR}${bindir} -installation-manifest: - echo >>${abs_top_builddir}/installation-manifest F %%BINDIR%%/${BIN} - deinstall uninstall: rm -f ${DESTDIR}${bindir}/${BIN} diff --git a/utils/print_roa/Makefile.in b/utils/print_roa/Makefile.in index 9bb83bc2..5999b351 100644 --- a/utils/print_roa/Makefile.in +++ b/utils/print_roa/Makefile.in @@ -48,8 +48,5 @@ install: all deinstall uninstall: rm -f ${DESTDIR}${bindir}/${BIN} -installation-manifest: - echo >>${abs_top_builddir}/installation-manifest F %%BINDIR%%/${BIN} - distclean: clean rm -f Makefile diff --git a/utils/print_rpki_manifest/Makefile.in b/utils/print_rpki_manifest/Makefile.in index 513afa34..22f1b16b 100644 --- a/utils/print_rpki_manifest/Makefile.in +++ b/utils/print_rpki_manifest/Makefile.in @@ -48,8 +48,5 @@ install: all deinstall uninstall: rm -f ${DESTDIR}${bindir}/${BIN} -installation-manifest: - echo >>${abs_top_builddir}/installation-manifest F %%BINDIR%%/${BIN} - distclean: clean rm -f Makefile diff --git a/utils/scan_roas/Makefile.in b/utils/scan_roas/Makefile.in index f61ebd3c..3d86532d 100644 --- a/utils/scan_roas/Makefile.in +++ b/utils/scan_roas/Makefile.in @@ -48,8 +48,5 @@ install: all deinstall uninstall: rm -f ${DESTDIR}${bindir}/${BIN} -installation-manifest: - echo >>${abs_top_builddir}/installation-manifest F %%BINDIR%%/${BIN} - distclean: clean rm -f Makefile diff --git a/utils/uri/Makefile.in b/utils/uri/Makefile.in index 79ffe3d0..fc545060 100644 --- a/utils/uri/Makefile.in +++ b/utils/uri/Makefile.in @@ -24,7 +24,7 @@ ${BIN}: ${SRC} test: @true -install deinstall uninstall installation-manifest: +install deinstall uninstall: @true distclean: clean |