Commit 225b0672 authored by Jeremy C. Reed's avatar Jeremy C. Reed
Browse files

Make the b10-cmdctl use account database and certificate files

from $sysconfdir/bind10.
Add to README a note about this.

The files are still installed to the share/bind10 directory
since they are reference / test files.

I did this so admins won't put custom files in place and then
next bind10 install won't overwrite them.

TODO: document this in userguide.
TODO: add an install target to put in etc also if doesn't already exist.

git-svn-id: svn:// e5f2f494-b856-4b98-b285-d166d9295462
parent 0be6dcc6
......@@ -16,10 +16,21 @@ Requires autoconf 2.59 or newer.
Use automake-1.11 or better for working Python 3.1 tests.
Install with:
make install
Testing samples of a RSA key, certificate, and user account
are installed under the $PREFIX/share/bind10/ directory.
Copy them to your $sysconfdir/bind10/ directory for testing.
Or create your own.
TODO: show how
Doing code coverage tests:
......@@ -3,8 +3,16 @@ pkglibexecdir = $(libexecdir)/@PACKAGE@
pkglibexec_SCRIPTS = b10-cmdctl
b10_cmdctldir = $(DESTDIR)$(pkgdatadir)
# TODO: this is dangerous -- will overwrite!
b10_cmdctl_DATA = cmdctl-accounts.csv cmdctl-keyfile.pem cmdctl-certfile.pem cmdctl.spec
# NOTE: this will overwrite on install
# So these generic copies are placed in share/bind10 instead of to etc
# Admin or packageer will need to put into place manually.
b10_cmdctl_DATA = cmdctl-accounts.csv cmdctl-keyfile.pem cmdctl-certfile.pem
b10_cmdctl_DATA += cmdctl.spec
EXTRA_DIST = cmdctl-accounts.csv cmdctl-keyfile.pem cmdctl-certfile.pem
EXTRA_DIST += cmdctl.spec
CLEANFILES= b10-cmdctl
......@@ -13,8 +21,3 @@ CLEANFILES= b10-cmdctl
$(SED) "s|@@PYTHONPATH@@|@pyexecdir@|" >$@
chmod a+x $@
chmod go-rwx $(DESTDIR)$(pkgdatadir)/cmdctl-accounts.csv
chmod go-rwx $(DESTDIR)$(pkgdatadir)/cmdctl-certfile.pem
chmod go-rwx $(DESTDIR)$(pkgdatadir)/cmdctl-keyfile.pem
......@@ -55,14 +55,16 @@ URL_PATTERN = re.compile('/([\w]+)(?:/([\w]+))?/?')
# installed on the system
if "B10_FROM_SOURCE" in os.environ:
SPECFILE_PATH = os.environ["B10_FROM_SOURCE"] + "/src/bin/cmdctl"
SYSCONF_PATH = os.environ["B10_FROM_SOURCE"] + "/src/bin/cmdctl"
PREFIX = "@prefix@"
DATAROOTDIR = "@datarootdir@"
SPECFILE_PATH = "@datadir@/@PACKAGE@".replace("${datarootdir}", DATAROOTDIR).replace("${prefix}", PREFIX)
SYSCONF_PATH = "@sysconfdir@/@PACKAGE@".replace("${prefix}", PREFIX)
USER_INFO_FILE = SPECFILE_PATH + "/cmdctl-accounts.csv"
PRIVATE_KEY_FILE = SPECFILE_PATH + "/cmdctl-keyfile.pem"
CERTIFICATE_FILE = SPECFILE_PATH + "/cmdctl-certfile.pem"
USER_INFO_FILE = SYSCONF_PATH + "/cmdctl-accounts.csv"
PRIVATE_KEY_FILE = SYSCONF_PATH + "/cmdctl-keyfile.pem"
CERTIFICATE_FILE = SYSCONF_PATH + "/cmdctl-certfile.pem"
class SecureHTTPRequestHandler(http.server.BaseHTTPRequestHandler):
'''https connection request handler.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment