diff options
Diffstat (limited to 'portal-gui')
-rw-r--r-- | portal-gui/Makefile.in | 13 | ||||
-rw-r--r-- | portal-gui/README | 18 | ||||
-rw-r--r-- | portal-gui/README.apache | 4 | ||||
-rw-r--r-- | portal-gui/apache/zrpki.conf.in (renamed from portal-gui/apache/zmyrpki.conf.in) | 0 | ||||
-rwxr-xr-x | portal-gui/build.sh | 2 | ||||
-rw-r--r-- | portal-gui/configure.ac | 2 | ||||
-rw-r--r-- | portal-gui/rpkigui/myrpki/glue.py | 14 | ||||
-rw-r--r-- | portal-gui/rpkigui/settings.py.in | 2 | ||||
-rwxr-xr-x | portal-gui/scripts/adduser.py | 4 | ||||
-rwxr-xr-x | portal-gui/scripts/list_resources.py | 6 | ||||
-rwxr-xr-x | portal-gui/scripts/load_csv.py | 4 |
11 files changed, 39 insertions, 30 deletions
diff --git a/portal-gui/Makefile.in b/portal-gui/Makefile.in index eecb0a3d..9bb38160 100644 --- a/portal-gui/Makefile.in +++ b/portal-gui/Makefile.in @@ -23,10 +23,19 @@ CONFDIR=@CONFDIR@ # automatically built sources BUILD=$(srcdir)/configure Makefile config.status rpkigui/settings.py \ rpkigui/urls.py scripts/helper apache/django.wsgi \ - apache/zmyrpki.conf + apache/zrpki.conf all: $(BUILD) +clean: + @true + +distclean: clean + rm -f scripts/helper scripts/runserver + rm -f rpkigui/settings.py rpkigui/urls.py + rm -f apache/django.wsgi apache/zrpki.conf + rm -f config.log config.status Makefile + $(srcdir)/configure: configure.ac cd '$(srcdir)' && autoconf @@ -48,7 +57,7 @@ scripts/helper: $(srcdir)/scripts/helper.in apache/django.wsgi: $(srcdir)/apache/django.wsgi.in ./config.status -apache/zmyrpki.conf: $(srcdir)/apache/zmyrpki.conf.in +apache/zrpki.conf: $(srcdir)/apache/zrpki.conf.in ./config.status INSTALL_FILES=\ diff --git a/portal-gui/README b/portal-gui/README index 33fd03e9..21a85143 100644 --- a/portal-gui/README +++ b/portal-gui/README @@ -25,15 +25,15 @@ This is a list of the assumptions the current rpkigui code makes: /datadir /dad - /myrpki.conf + /rpki.conf /entitydb/ ... /mom - /myrpki.conf + /rpki.conf /entitydb/ ... /baby - /myrpki.conf + /rpki.conf /entitydb/ ... @@ -99,11 +99,11 @@ testing purposes, this script can be run by hand. However, for deployment you will need to set up a cron job to run this script periodically. NOTE that "list_resources" *must* be run in the directory where the -myrpki.conf for the resource handle that is self-hosting the rpkid. +rpki.conf for the resource handle that is self-hosting the rpkid. Alternatively, you can set the $MYRPKI_CONF environment variable to full -pathname of the myrpki.conf for the self-hosted resource handle (However, in +pathname of the rpki.conf for the self-hosted resource handle (However, in order for this to work, you need to specify the full path name for -"bpki_servers_directory" variable in your myrpki.conf.) +"bpki_servers_directory" variable in your rpki.conf.) The first time you invoke it, you may wish to use the -v option, which puts list_resources into verbose mode, meaning it will display progress @@ -115,7 +115,7 @@ it is silent unless an error occurs: You may way to create a script which is invoked by cron: #!/bin/sh - cd <directory containing myrpki.conf for the self-hosted rpkid> + cd <directory containing rpki.conf for the self-hosted rpkid> /usr/local/share/portal-gui/scripts/list_resources This script probably only needs to be run infrequently. It's sole purpose @@ -132,7 +132,7 @@ run. If you already have delegated resources to children, or created ROAs in the .csv files for the myrpki.py command line tool, you will want to load the portal-gui with this information. There is a helper script for doing this -step. Simply chdir to the directory containing your myrpki.conf and .csv +step. Simply chdir to the directory containing your rpki.conf and .csv files and run: /usr/local/share/portal-gui/scripts/load_csv @@ -211,7 +211,7 @@ Here are the steps for reseting to the initial state: >>> answer "yes" to really reset it <<< - cd <directory containing myrpki.conf for the self-hosted rpkid> + cd <directory containing rpki.conf for the self-hosted rpkid> $datarootdir/portal-gui/scripts/list_resources -v $datarootdir/portal-gui/scripts/load_csv diff --git a/portal-gui/README.apache b/portal-gui/README.apache index 9869cd40..151d47d7 100644 --- a/portal-gui/README.apache +++ b/portal-gui/README.apache @@ -13,7 +13,7 @@ Setup portal-gui for the self-hosted resource handle that runs rpkid. - After running "make" in $top/portal-gui, there will be a file named - $top/portal-gui/apache/zmyrpki.conf. This is a configuration file for + $top/portal-gui/apache/zrpki.conf. This is a configuration file for apache which does most of the work configuring the portal-gui to run under mod_wsgi. @@ -23,4 +23,4 @@ Setup will operate correctly even if this path is wrong. Fedora: - cp $top/portal-gui/apache/zmyrpki.conf /etc/httpd/conf.d/ + cp $top/portal-gui/apache/zrpki.conf /etc/httpd/conf.d/ diff --git a/portal-gui/apache/zmyrpki.conf.in b/portal-gui/apache/zrpki.conf.in index e73c1863..e73c1863 100644 --- a/portal-gui/apache/zmyrpki.conf.in +++ b/portal-gui/apache/zrpki.conf.in diff --git a/portal-gui/build.sh b/portal-gui/build.sh index 4e86f2ec..9821981b 100755 --- a/portal-gui/build.sh +++ b/portal-gui/build.sh @@ -28,7 +28,7 @@ # This is the directory under which the subdirectories for each hosted RPKI # resource handle live. Note that is is *not* the directory containing your -# myrpki.conf. +# rpki.conf. CONFDIR=/usr/local/etc/rpki # This is the directory containing the myrpki.py command line script. You diff --git a/portal-gui/configure.ac b/portal-gui/configure.ac index 667e8d54..82a3a261 100644 --- a/portal-gui/configure.ac +++ b/portal-gui/configure.ac @@ -65,6 +65,6 @@ AC_SUBST(SECRET_KEY, `$PYTHON -c 'import random; print "".join([random.choice("a AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([rpkigui/settings.py rpkigui/urls.py scripts/helper]) -AC_CONFIG_FILES([apache/django.wsgi apache/zmyrpki.conf]) +AC_CONFIG_FILES([apache/django.wsgi apache/zrpki.conf]) AC_OUTPUT diff --git a/portal-gui/rpkigui/myrpki/glue.py b/portal-gui/rpkigui/myrpki/glue.py index bca536df..86ea115d 100644 --- a/portal-gui/rpkigui/myrpki/glue.py +++ b/portal-gui/rpkigui/myrpki/glue.py @@ -33,24 +33,24 @@ import rpki.config from rpkigui.myrpki import models #def form_to_conf(data): -# """Write out a myrpki.conf based on the given form data.""" +# """Write out a rpki.conf based on the given form data.""" # handle = data['handle'] # confdir = settings.MYRPKI_DATA_DIR + '/' + handle # if os.path.exists(confdir): # raise RuntimeError, '%s: directory already exists!' % (confdir, ) # os.makedirs(confdir) -# template = open(settings.MYRPKI_DATA_DIR + '/examples/myrpki.conf', 'r').read() +# template = open(settings.MYRPKI_DATA_DIR + '/examples/rpki.conf', 'r').read() # # stuff the appropriate output directory into the dict # data['MYRPKI_DATA_DIR'] = confdir -# with open(confdir + '/myrpki.conf', 'w') as conf: +# with open(confdir + '/rpki.conf', 'w') as conf: # print >>conf, template % data # invoke_rpki(handle, ['initialize']) def invoke_rpki(handle, args): """Invoke the myrpki cli for the specified configuration.""" - config = settings.MYRPKI_DATA_DIR + '/' + handle + '/myrpki.conf' + config = settings.MYRPKI_DATA_DIR + '/' + handle + '/rpki.conf' myrpki_dir = settings.MYRPKI_DATA_DIR + '/' + handle - # default myrpki.conf uses relative paths, so chdir() to the repo first + # default rpki.conf uses relative paths, so chdir() to the repo first cmd = 'cd %s && %s %s %s' % (myrpki_dir, sys.executable, settings.MYRPKI_PATH, ' '.join(['--config=' + config] + args)) print >>sys.stderr, 'invoking', cmd @@ -112,10 +112,10 @@ def configure_daemons(handle): def configure_resources(handle): '''Write out the csv files and invoke the myrpki.py command line tool.''' - # chdir to the repo dir since the default myrpki.conf uses relative + # chdir to the repo dir since the default rpki.conf uses relative # pathnames.. os.chdir(settings.MYRPKI_DATA_DIR + '/' + handle.handle) - cfg = rpki.config.parser('myrpki.conf', 'myrpki') + cfg = rpki.config.parser('rpki.conf', 'myrpki') output_asns(cfg.get('asn_csv'), handle) output_prefixes(cfg.get('prefix_csv'), handle) output_roas(cfg.get('roa_csv'), handle) diff --git a/portal-gui/rpkigui/settings.py.in b/portal-gui/rpkigui/settings.py.in index 17cb51be..c737485b 100644 --- a/portal-gui/rpkigui/settings.py.in +++ b/portal-gui/rpkigui/settings.py.in @@ -108,7 +108,7 @@ AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.RemoteUserBackend', ) -# Top of directory tree where myrpki.conf, etc are stored for each +# Top of directory tree where rpki.conf, etc are stored for each # resource holder. MYRPKI_DATA_DIR = '@CONFDIR@' diff --git a/portal-gui/scripts/adduser.py b/portal-gui/scripts/adduser.py index b42e4687..27e73ed7 100755 --- a/portal-gui/scripts/adduser.py +++ b/portal-gui/scripts/adduser.py @@ -96,8 +96,8 @@ if __name__ == '__main__': os.mkdir(myrpki_dir) os.chown(myrpki_dir, web_uid, -1) - # create stuf myrpki.conf enough to fool portal-gui - myrpki_conf = myrpki_dir + '/myrpki.conf' + # create stuf rpki.conf enough to fool portal-gui + myrpki_conf = myrpki_dir + '/rpki.conf' if not os.path.exists(myrpki_conf): print 'creating ', myrpki_conf with open(myrpki_conf, 'w') as f: diff --git a/portal-gui/scripts/list_resources.py b/portal-gui/scripts/list_resources.py index 180a9202..f7abf3d2 100755 --- a/portal-gui/scripts/list_resources.py +++ b/portal-gui/scripts/list_resources.py @@ -20,7 +20,7 @@ # portal-gui's sqlite database. It asks rpkid for the list of received # resources, and the handles of any children. # -# This script should be run in the directory containing the myrpki.conf +# This script should be run in the directory containing the rpki.conf # for the handle that is self-hosting rpkid. # # Exit values: @@ -50,9 +50,9 @@ verbose = False version = '$Id$' def query_rpkid(): - """Fetch our received resources from the local rpkid using the myrpki.conf + """Fetch our received resources from the local rpkid using the rpki.conf in the current directory.""" - cfg_file = os.getenv("MYRPKI_CONF", "myrpki.conf") + cfg_file = os.getenv("RPKI_CONF", "rpki.conf") cfg = rpki.config.parser(cfg_file, "myrpki") bpki_servers = CA(cfg_file, cfg.get("bpki_servers_directory")) rpkid_base = "http://%s:%s/" % (cfg.get("rpkid_server_host"), cfg.get("rpkid_server_port")) diff --git a/portal-gui/scripts/load_csv.py b/portal-gui/scripts/load_csv.py index 61ec15b6..476539b9 100755 --- a/portal-gui/scripts/load_csv.py +++ b/portal-gui/scripts/load_csv.py @@ -20,7 +20,7 @@ # Primarly useful for the initial load, as the GUI does not sync changes # made directly to the csv files back into the database. # -# This script should be run from the directory containing the myrpki.conf +# This script should be run from the directory containing the rpki.conf # for the handle you are loading data # @@ -36,7 +36,7 @@ from rpki.myrpki import csv_reader from rpkigui.myrpki import models from rpkigui.myrpki.views import add_roa_requests -cfg_file = os.getenv("MYRPKI_CONF", "myrpki.conf") +cfg_file = os.getenv("RPKI_CONF", "rpki.conf") cfg = rpki.config.parser(cfg_file, "myrpki") handle = cfg.get('handle') asn_csv = cfg.get('asn_csv') |