From 6299d468c0b069832e86c850b39e7a58faa5f1bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Thu, 17 May 2018 20:18:19 +0000 Subject: [PATCH] Packaging fixes --- MANIFEST.in | 13 ++++++++++++- {doc => certidude}/builder/ap.sh | 0 {doc => certidude}/builder/common.sh | 0 {doc => certidude}/builder/ipcam.sh | 0 {doc => certidude}/builder/mfp.sh | 0 .../overlay/etc/hotplug.d/iface/50-certidude | 0 {doc => certidude/builder}/overlay/etc/profile | 0 .../builder}/overlay/etc/uci-defaults/40-hostname | 0 .../builder}/overlay/etc/uci-defaults/60-cron | 0 .../etc/uci-defaults/90-certidude-sysupgrade | 3 +++ .../builder}/overlay/usr/bin/certidude-enroll | 0 .../builder}/overlay/usr/bin/certidude-enroll-renew | 0 certidude/cli.py | 9 +++++++-- .../etc/uci-defaults/90-certidude-sysupgrade | 6 ------ 14 files changed, 22 insertions(+), 9 deletions(-) rename {doc => certidude}/builder/ap.sh (100%) rename {doc => certidude}/builder/common.sh (100%) rename {doc => certidude}/builder/ipcam.sh (100%) rename {doc => certidude}/builder/mfp.sh (100%) rename {doc => certidude/builder}/overlay/etc/hotplug.d/iface/50-certidude (100%) rename {doc => certidude/builder}/overlay/etc/profile (100%) rename {doc => certidude/builder}/overlay/etc/uci-defaults/40-hostname (100%) rename {doc => certidude/builder}/overlay/etc/uci-defaults/60-cron (100%) create mode 100644 certidude/builder/overlay/etc/uci-defaults/90-certidude-sysupgrade rename {doc => certidude/builder}/overlay/usr/bin/certidude-enroll (100%) rename {doc => certidude/builder}/overlay/usr/bin/certidude-enroll-renew (100%) delete mode 100644 doc/overlay/etc/uci-defaults/90-certidude-sysupgrade diff --git a/MANIFEST.in b/MANIFEST.in index 16f08c1..1a20e57 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -12,7 +12,18 @@ include certidude/templates/server/*.conf include certidude/static/js/*.js include certidude/static/css/*.css include certidude/static/fonts/*.woff2 -include certidude/static/img/*.svg +include certidude/static/img/*.png +include certidude/static/views/*.html +include certidude/static/snippets/*.sh +include certidude/static/snippets/*.yml +include certidude/static/snippets/*.mobileconfig +include certidude/static/snippets/*.conf +include certidude/static/snippets/*.ps1 include certidude/static/*.html include certidude/static/robots.txt include certidude/sql/*/*.sql +include certidude/builder/overlay/usr/bin/certidude-* +include certidude/builder/overlay/etc/uci-defaults/* +include certidude/builder/overlay/etc/hotplug.d/iface/50-certidude +include certidude/builder/overlay/etc/profile +include certidude/builder/*.sh diff --git a/doc/builder/ap.sh b/certidude/builder/ap.sh similarity index 100% rename from doc/builder/ap.sh rename to certidude/builder/ap.sh diff --git a/doc/builder/common.sh b/certidude/builder/common.sh similarity index 100% rename from doc/builder/common.sh rename to certidude/builder/common.sh diff --git a/doc/builder/ipcam.sh b/certidude/builder/ipcam.sh similarity index 100% rename from doc/builder/ipcam.sh rename to certidude/builder/ipcam.sh diff --git a/doc/builder/mfp.sh b/certidude/builder/mfp.sh similarity index 100% rename from doc/builder/mfp.sh rename to certidude/builder/mfp.sh diff --git a/doc/overlay/etc/hotplug.d/iface/50-certidude b/certidude/builder/overlay/etc/hotplug.d/iface/50-certidude similarity index 100% rename from doc/overlay/etc/hotplug.d/iface/50-certidude rename to certidude/builder/overlay/etc/hotplug.d/iface/50-certidude diff --git a/doc/overlay/etc/profile b/certidude/builder/overlay/etc/profile similarity index 100% rename from doc/overlay/etc/profile rename to certidude/builder/overlay/etc/profile diff --git a/doc/overlay/etc/uci-defaults/40-hostname b/certidude/builder/overlay/etc/uci-defaults/40-hostname similarity index 100% rename from doc/overlay/etc/uci-defaults/40-hostname rename to certidude/builder/overlay/etc/uci-defaults/40-hostname diff --git a/doc/overlay/etc/uci-defaults/60-cron b/certidude/builder/overlay/etc/uci-defaults/60-cron similarity index 100% rename from doc/overlay/etc/uci-defaults/60-cron rename to certidude/builder/overlay/etc/uci-defaults/60-cron diff --git a/certidude/builder/overlay/etc/uci-defaults/90-certidude-sysupgrade b/certidude/builder/overlay/etc/uci-defaults/90-certidude-sysupgrade new file mode 100644 index 0000000..18df998 --- /dev/null +++ b/certidude/builder/overlay/etc/uci-defaults/90-certidude-sysupgrade @@ -0,0 +1,3 @@ +#!/bin/sh +echo /etc/certidude/authority/ >> /etc/sysupgrade.conf + diff --git a/doc/overlay/usr/bin/certidude-enroll b/certidude/builder/overlay/usr/bin/certidude-enroll similarity index 100% rename from doc/overlay/usr/bin/certidude-enroll rename to certidude/builder/overlay/usr/bin/certidude-enroll diff --git a/doc/overlay/usr/bin/certidude-enroll-renew b/certidude/builder/overlay/usr/bin/certidude-enroll-renew similarity index 100% rename from doc/overlay/usr/bin/certidude-enroll-renew rename to certidude/builder/overlay/usr/bin/certidude-enroll-renew diff --git a/certidude/cli.py b/certidude/cli.py index faecc4b..f8df4ab 100755 --- a/certidude/cli.py +++ b/certidude/cli.py @@ -1123,10 +1123,15 @@ def certidude_setup_authority(username, kerberos_keytab, nginx_config, tls_confi if os.path.exists(kerberos_keytab): click.echo("Service principal keytab found in '%s'" % kerberos_keytab) else: - click.echo("To use 'kerberos' authentication backend join the domain and create service principal with:") + click.echo("To use 'kerberos' authentication backend join the domain , create service principal and provision authority again:") click.echo() + click.echo(" kinit administrator@EXAMPLE.LAN") + click.echo(" net ads join -k") click.echo(" KRB5_KTNAME=FILE:%s net ads keytab add HTTP -P" % kerberos_keytab) + click.echo(" kdestroy") click.echo(" chown %s %s" % (username, kerberos_keytab)) + click.echo(" mv /etc/certidude/server.conf /etc/certidude/server.backup") + click.echo(" certidude setup authority") click.echo() @@ -1152,7 +1157,7 @@ def certidude_setup_authority(username, kerberos_keytab, nginx_config, tls_confi letsencrypt_privkey = "/etc/letsencrypt/live/%s/privkey.pem" % common_name letsencrypt = os.path.exists(letsencrypt_fullchain) - doc_path = os.path.join(os.path.realpath(os.path.dirname(os.path.dirname(__file__))), "doc") + builder_path = os.path.join(os.path.realpath(os.path.dirname(__file__)), "builder") script_dir = os.path.join(os.path.realpath(os.path.dirname(__file__)), "templates", "script") static_path = os.path.join(os.path.realpath(os.path.dirname(__file__)), "static") diff --git a/doc/overlay/etc/uci-defaults/90-certidude-sysupgrade b/doc/overlay/etc/uci-defaults/90-certidude-sysupgrade deleted file mode 100644 index 4aea985..0000000 --- a/doc/overlay/etc/uci-defaults/90-certidude-sysupgrade +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -echo $AUTHORITY_PATH >> /etc/sysupgrade.conf -echo $CERTIFICATE_PATH >> /etc/sysupgrade.conf -echo $KEY_PATH >> /etc/sysupgrade.conf -echo $REQUEST_PATH >> /etc/sysupgrade.conf -