From 77ba3605596fdedadf3fb038bbb81a7b6ea9bdd5 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 11 Jun 2015 00:53:37 +0200 Subject: [PATCH] pkg: neutral and unified name for our pkgng repo config Discussed with: Shawn Webb --- .gitignore | 2 +- pkg/Makefile | 5 +++-- pkg/{OPNsense.conf.sample => origin.conf.sample} | 0 scripts/switch_repo.php | 5 +++-- 4 files changed, 7 insertions(+), 5 deletions(-) rename pkg/{OPNsense.conf.sample => origin.conf.sample} (100%) diff --git a/.gitignore b/.gitignore index b6d367352..c501e0de2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ /src/etc/pkg.conf -/src/etc/pkg/OPNsense.conf +/src/etc/pkg/repos/origin.conf* /src/etc/ssh/** /src/etc/php.ini /src/lib/** diff --git a/pkg/Makefile b/pkg/Makefile index 9a29b8342..28e5964ff 100644 --- a/pkg/Makefile +++ b/pkg/Makefile @@ -5,12 +5,13 @@ install: @cp ${.CURDIR}/+POST_INSTALL ${DESTDIR} @cp ${.CURDIR}/+MANIFEST ${DESTDIR} @mkdir -p ${DESTDIR}/usr/local/etc/pkg/repos - @cp ${.CURDIR}/OPNsense.conf.sample ${DESTDIR}/usr/local/etc/pkg/repos - @echo "@sample /usr/local/etc/pkg/repos/OPNsense.conf.sample" + @cp ${.CURDIR}/origin.conf.sample ${DESTDIR}/usr/local/etc/pkg/repos + @echo "@sample /usr/local/etc/pkg/repos/origin.conf.sample" @cp ${.CURDIR}/pkg.conf ${DESTDIR}/usr/local/etc @echo /usr/local/etc/pkg.conf @cp ${.CURDIR}/config.xml.sample ${DESTDIR}/usr/local/etc @echo "@sample /usr/local/etc/config.xml.sample" + # XXX needs generic approach to allow custom fingerprints @mkdir -p ${DESTDIR}/usr/local/etc/pkg/fingerprints/OPNsense/trusted @cp ${.CURDIR}/trusted/pkg.opnsense.org.20150402 \ ${DESTDIR}/usr/local/etc/pkg/fingerprints/OPNsense/trusted diff --git a/pkg/OPNsense.conf.sample b/pkg/origin.conf.sample similarity index 100% rename from pkg/OPNsense.conf.sample rename to pkg/origin.conf.sample diff --git a/scripts/switch_repo.php b/scripts/switch_repo.php index 0e25b67f4..86f8d29ba 100755 --- a/scripts/switch_repo.php +++ b/scripts/switch_repo.php @@ -27,6 +27,7 @@ POSSIBILITY OF SUCH DAMAGE. */ +/* test scipt only, not in production */ $pkg_mirror = 'http://pkg.opnsense.org'; $pkg_flavour = 'latest'; @@ -37,7 +38,7 @@ if (count($argv) > 2) { $pkg_mirror = $argv[2]; } -$pkg_sample = file_get_contents('/usr/local/etc/pkg/repos/OPNsense.conf.sample'); +$pkg_sample = file_get_contents('/usr/local/etc/pkg/repos/origin.conf.sample'); $pkg_sample = explode(PHP_EOL, $pkg_sample); $pkg_config = ''; @@ -54,4 +55,4 @@ foreach ($pkg_sample as $pkg_line) { $pkg_config .= $pkg_line . PHP_EOL; } -file_put_contents('/usr/local/etc/pkg/repos/OPNsense.conf', $pkg_config); +file_put_contents('/usr/local/etc/pkg/repos/origin.conf', $pkg_config);