From 6940d0c894ceca4ced1177177bff146ac2488244 Mon Sep 17 00:00:00 2001 From: Murat Date: Tue, 17 Sep 2019 22:07:42 -0700 Subject: [PATCH] Introducing Sensei LibreSSL repository. (#1481) * Introducing Sensei LibreSSL repository. At install time, package post-install script checks the OPNsense flavor and configures the proper repository according to that. * Updating the pull request as per @fitcher's comments. * Updating pull request as per @fitchner's comments: * Remove redundant repo.conf.LibreSSL * Configure repo path at package install time * * Rename shadow repo file as per OPNsense standard * Add $ABI variable and handle it gracefully * * Remve tragiling / from repo url --- vendor/sunnyvalley/+POST_DEINSTALL | 3 +++ vendor/sunnyvalley/+POST_INSTALL | 16 ++++++++++++++++ ...nnyValley.conf => SunnyValley.conf.shadow.in} | 4 ++-- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 vendor/sunnyvalley/+POST_DEINSTALL create mode 100644 vendor/sunnyvalley/+POST_INSTALL rename vendor/sunnyvalley/src/etc/pkg/repos/{SunnyValley.conf => SunnyValley.conf.shadow.in} (59%) diff --git a/vendor/sunnyvalley/+POST_DEINSTALL b/vendor/sunnyvalley/+POST_DEINSTALL new file mode 100644 index 000000000..4729ff761 --- /dev/null +++ b/vendor/sunnyvalley/+POST_DEINSTALL @@ -0,0 +1,3 @@ + +rm -f /usr/local/etc/pkg/repos/SunnyValley.conf + diff --git a/vendor/sunnyvalley/+POST_INSTALL b/vendor/sunnyvalley/+POST_INSTALL new file mode 100644 index 000000000..de4c43fef --- /dev/null +++ b/vendor/sunnyvalley/+POST_INSTALL @@ -0,0 +1,16 @@ + +OPNSENSE_FLAVOR=$(/usr/local/sbin/opnsense-version -f) + +if [ "${OPNSENSE_FLAVOR}" == "OpenSSL" ]; then + echo "Configuring repository for OpenSSL flavor" +elif [ "${OPNSENSE_FLAVOR}" == "LibreSSL" ]; then + echo "Configuring repository for LibreSSL flavor" +else + echo "Unsupported OPNsense flavor, aborting" + exit 1 +fi + +cat /usr/local/etc/pkg/repos/SunnyValley.conf.shadow.in | sed "s/%%FLAVOR%%/${OPNSENSE_FLAVOR}/g" > /usr/local/etc/pkg/repos/SunnyValley.conf + + + diff --git a/vendor/sunnyvalley/src/etc/pkg/repos/SunnyValley.conf b/vendor/sunnyvalley/src/etc/pkg/repos/SunnyValley.conf.shadow.in similarity index 59% rename from vendor/sunnyvalley/src/etc/pkg/repos/SunnyValley.conf rename to vendor/sunnyvalley/src/etc/pkg/repos/SunnyValley.conf.shadow.in index a0ca0af1f..448247ca8 100644 --- a/vendor/sunnyvalley/src/etc/pkg/repos/SunnyValley.conf +++ b/vendor/sunnyvalley/src/etc/pkg/repos/SunnyValley.conf.shadow.in @@ -1,7 +1,7 @@ SunnyValley: { fingerprints: "/usr/local/etc/pkg/fingerprints/SunnyValley", - url: "https://updates.sunnyvalley.io/opnsense/repo/", + url: "https://updates.sunnyvalley.io/opnsense/${ABI}/%%FLAVOR%%/repo", signature_type: "fingerprints", - priority: 101, + priority: 7, enabled: yes }