Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3792328
D1552.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D1552.diff
View Options
diff --git a/roles/devserver/pkg/files/keys/trusted/packages.nasqueron.org.2018033001 b/roles/devserver/pkg/files/keys/trusted/packages.nasqueron.org.2018033001
new file mode 100644
--- /dev/null
+++ b/roles/devserver/pkg/files/keys/trusted/packages.nasqueron.org.2018033001
@@ -0,0 +1,2 @@
+function: sha256
+fingerprint: cc3d0c1927316d1e30389c7f5e763ffc431e5ffe66e653d2f42929fac41374a8
diff --git a/roles/devserver/pkg/files/nasqueron.conf b/roles/devserver/pkg/files/nasqueron.conf
new file mode 100644
--- /dev/null
+++ b/roles/devserver/pkg/files/nasqueron.conf
@@ -0,0 +1,22 @@
+# -------------------------------------------------------------
+# FreeBSD repository
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Source file: roles/devserver/pkg/files/nasqueron.conf
+# -------------------------------------------------------------
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
+
+Nasqueron: {
+ url: "pkg+https://packages.nasqueron.org/freebsd"
+ mirror_type: "srv",
+ signature_type: "fingerprints",
+ fingerprints: "/usr/local/share/keys/pkg",
+ enabled: yes,
+}
diff --git a/roles/devserver/pkg/init.sls b/roles/devserver/pkg/init.sls
new file mode 100644
--- /dev/null
+++ b/roles/devserver/pkg/init.sls
@@ -0,0 +1,35 @@
+# -------------------------------------------------------------
+# Salt — Provision software
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2018-03-30
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% if grains['os'] == 'FreeBSD' %}
+
+# -------------------------------------------------------------
+# Declare repository
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/usr/local/etc/pkg/repos:
+ file.directory:
+ - makedirs: True
+
+/usr/local/etc/pkg/repos/nasqueron.conf:
+ file.managed:
+ - source: salt://roles/devserver/pkg/files/nasqueron.conf
+
+# -------------------------------------------------------------
+# Fingerprints
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/usr/local/share/keys:
+ file.directory:
+ - makedirs: True
+
+/usr/local/share/keys/pkg:
+ file.recurse:
+ - source: salt://roles/devserver/pkg/files/keys
+
+{% endif %}
diff --git a/utils/generate-freebsd-repo-fingerprint.sh b/utils/generate-freebsd-repo-fingerprint.sh
new file mode 100755
--- /dev/null
+++ b/utils/generate-freebsd-repo-fingerprint.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# -------------------------------------------------------------
+# rOPS — regenerate FreeBSD Nasqueron repository fingerprint
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2018-03-30
+# Description: Read the FreeBSD Nasqueron repository public key
+# and regenerate the fingerprint.
+# -------------------------------------------------------------
+
+KEY=/usr/local/etc/freebsd-pkg-repo/key/repo.pub
+KEYS_DIR=roles/devserver/pkg/files/keys/trusted
+FINGERPRINT=$KEYS_DIR/packages.nasqueron.org.$(date '+%Y%m%d01')
+
+usage() {
+ echo "You should run this script on the package builder server."
+ echo "If you need to first regenerate the repository keys,"
+ echo "invoke Salt with state.apply roles/freebsd-repo"
+ exit 1
+}
+
+[ -f $KEY ] || usage
+command -v sha256 >/dev/null 2>&1 || usage
+
+mkdir -p $KEYS_DIR
+echo "function: sha256" > "$FINGERPRINT"
+echo "fingerprint: $(sha256 -q $KEY)" >> "$FINGERPRINT"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 28, 16:32 (21 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2269376
Default Alt Text
D1552.diff (3 KB)
Attached To
Mode
D1552: Use Nasqueron FreeBSD packages repository
Attached
Detach File
Event Timeline
Log In to Comment