From f03de4bfe85cfd06abc6e63392e138958700bdf4 Mon Sep 17 00:00:00 2001 From: psykose Date: Thu, 28 Apr 2022 00:12:28 +0000 Subject: [PATCH] ptrc-build: upgrade to 2 and don't publish the password this time --- ptrc-build/APKBUILD | 9 ++++++--- ptrc-build/build | 10 +++++++++- ptrc-build/ptrc-build.conf | 1 + 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 ptrc-build/ptrc-build.conf diff --git a/ptrc-build/APKBUILD b/ptrc-build/APKBUILD index d225f3c..f391ad9 100644 --- a/ptrc-build/APKBUILD +++ b/ptrc-build/APKBUILD @@ -1,19 +1,22 @@ # Maintainer: Patrycja Rosa pkgname=ptrc-build -pkgver=1 +pkgver=2 pkgrel=0 pkgdesc="build invoker for ptrcports" url="https://git.ddd.rip/ptrcnull/ptrcports" arch="noarch" license="BSD-2-Clause" +pkggroups="buildozer" depends="lua-aports mosquitto-clients" -source="build" +source="build ptrc-build.conf" options="!check" # lol package() { install -Dm755 build -t "$pkgdir"/usr/bin + install -Dm640 -g buildozer ptrc-build.conf -t "$pkgdir"/etc } sha512sums=" -d7fe36a964cd11123117dc6ee1fa1d644ae563de6709d865890893ea15c4a5d51d8bd01c71a051f1759f9396697aa38ad844bfd8e8ca8abd81bec17cd3c4006a build +8e736a1f6665dd993af92c55c55dcf6d90bb3188127238763fa7236e83d4e8e58ee2fcdc9c4f8e4bb7aa3525c52746760cd52608ad94cc2d6c4f5bf6f86359f7 build +4f2108baab8c1882a6d3754bf24dd1e889074d6a5876ebaf43a46ac8cba696c9329579eb3774a15bd73b8eb9870a16b79940b1f4ff281eb257376ef0bf044d70 ptrc-build.conf " diff --git a/ptrc-build/build b/ptrc-build/build index 01d73fa..662f391 100644 --- a/ptrc-build/build +++ b/ptrc-build/build @@ -4,10 +4,18 @@ # to fail silently since apk is not in path export PATH="/usr/bin:/usr/sbin:/bin:/sbin" +. /etc/ptrc-build.conf + arch=$(apk --print-arch) pub() { - mosquitto_pub -L mqtts://build:build@mqtt.torastian.com/build/$arch -m "$1" + mosquitto_pub -h mqtt.torastian.com \ + -u build \ + -p 8883 \ + -P "$MQTT_BUILD_PASSWORD" \ + -t build/$arch \ + --tls-version tlsv1.3 \ + -m "$1" } echo "pulling git" diff --git a/ptrc-build/ptrc-build.conf b/ptrc-build/ptrc-build.conf new file mode 100644 index 0000000..2d165cb --- /dev/null +++ b/ptrc-build/ptrc-build.conf @@ -0,0 +1 @@ +MQTT_BUILD_PASSWORD=""