diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-08-19 11:57:09 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-08-19 11:57:09 +0000 |
commit | 657ed8fec2f136a917184121fdaf5484366698bb (patch) | |
tree | 9c7afebb28600ed9b1f30331a7eaac8b316d3b01 /main | |
parent | bca3bf9c11ea2ebd0e45364f3048303cf56e44d9 (diff) | |
download | aports-657ed8fec2f136a917184121fdaf5484366698bb.tar.bz2 aports-657ed8fec2f136a917184121fdaf5484366698bb.tar.xz |
main/aports-build: re-use the general mqtt-exec initscript
Instead of rolling our own specialized init.d script we simply reuse
the general purpose mqtt-exec init.d script.
This gives use support for will messages and support for subscribing to
more than a single topic.
Diffstat (limited to 'main')
-rw-r--r-- | main/aports-build/APKBUILD | 34 | ||||
-rw-r--r-- | main/aports-build/aports-build | 2 | ||||
-rw-r--r-- | main/aports-build/aports-build.initd | 15 | ||||
-rw-r--r-- | main/aports-build/mqtt-exec.aports-build.confd (renamed from main/aports-build/aports-build.confd) | 8 |
4 files changed, 35 insertions, 24 deletions
diff --git a/main/aports-build/APKBUILD b/main/aports-build/APKBUILD index 9bf07e27c9..08e33d29f4 100644 --- a/main/aports-build/APKBUILD +++ b/main/aports-build/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=aports-build -pkgver=0.7 +pkgver=0.8 pkgrel=0 pkgdesc="MQTT based build-on-git-push scripts for Alpine Linux" url="http://alpinelinux.org" @@ -12,7 +12,10 @@ makedepends="$depends_dev mosquitto-dev" install="$pkgname.pre-install" subpackages="" -source="aports-build aports-build.initd aports-build.confd" +source="aports-build + aports-build.initd + mqtt-exec.aports-build.confd + " _builddir= prepare() { @@ -33,18 +36,23 @@ package() { cd "$_builddir" install -Dm755 "$srcdir"/aports-build \ "$pkgdir"/usr/bin/aports-build || return 1 + install -d "$pkgdir"/etc/init.d || return 1 + + ln -s mqtt-exec "$pkgdir"/etc/init.d/mqtt-exec.aports-build || return 1 + install -Dm644 "$srcdir"/mqtt-exec.aports-build.confd \ + "$pkgdir"/etc/conf.d/mqtt-exec.aports-build || return 1 + + # keep this for a migration period install -Dm755 "$srcdir"/aports-build.initd \ "$pkgdir"/etc/init.d/aports-build || return 1 - install -Dm644 "$srcdir"/aports-build.confd \ - "$pkgdir"/etc/conf.d/aports-build || return 1 } -md5sums="982706003f6e1994ff7621efed2b4b42 aports-build -784238e965ca025c0c6ed13c8af01613 aports-build.initd -711d8f441b97c54a9561c08925d16d75 aports-build.confd" -sha256sums="2c1e3bfd2ab6687c1ed90dcfe1814f660b6cc52dfaeaf7783d93a247dfcd31cd aports-build -88215b5969e5ffeda549c6e31de4563569ddee2ac3220c381d40f382d43f8323 aports-build.initd -e14940240ffac141b98903214af858c93a36b5a9f133b97a81871f9d56efff6b aports-build.confd" -sha512sums="527a6e52bcf506f03059055865a7ab785f7fc65114e252639165d209228c9a389c8f9a425958ad3dea3ab25a962629e91239b2c8568de1a45681430ea453e216 aports-build -2ef2fa6de4118209ab93a56216f106ac32078df762f4d67e900976c28bea96d44806f4679ef966472a3eb05fdaf1648aab17c0eaa897e8a06b1272766f29d22b aports-build.initd -60c62f25834fce29df73b0e64b733c8b9bbd362c130d04ba33f8dbf042b6b7fbb6193beb84ba9c811b3aef1997675bbb3eeedbbf935e4ae005370c4b4a013d26 aports-build.confd" +md5sums="700592623bf5be9dd6b49a175be51dcd aports-build +4ca3699a6df13cc937b267a28207b572 aports-build.initd +10c96b7b22707e87a5732137d31daf74 mqtt-exec.aports-build.confd" +sha256sums="ddbd154cd987cbb0d4c9b96676360a3c08abf6d976dd594f8eeec9a51b53bc2f aports-build +a4a8756bc10d27219f5d569b2ea12450c864be439dac1fccb2b79dd374dd525a aports-build.initd +a558a14951c05740483a52c58c5c5cff38a36ea89854c5502531cabffef6a49e mqtt-exec.aports-build.confd" +sha512sums="ed7180d6565d65ae120da53869f56f92e609cc788ab5d3b4e8c90acbd7c078e9c8987357a8c54b424b75bba6f8f0ee59a3be9c4a7bd0a040b054f406f3d00a4b aports-build +e5bb9b219a5e03cc594bd1ffe064d9c531f2dc2f50b4cdf66014c49e9dc42b04133968dda0da0b3d572663523ba47a1d77a945f220a85e699930590bf163739c aports-build.initd +fdd80a1cd22342f20f2027a13f028f8046a065955b15b25660ad1c0be47fdc602b28d0ac9a104b843c119eea082b5d5c8dd39a3e07a93d832ae85f006bedb87f mqtt-exec.aports-build.confd" diff --git a/main/aports-build/aports-build b/main/aports-build/aports-build index f7d5b22fc9..1bfd8e737b 100644 --- a/main/aports-build/aports-build +++ b/main/aports-build/aports-build @@ -12,7 +12,7 @@ fi echo $$ > $lockfile || exit 1 logurl= -conf=/etc/conf.d/aports-build +conf=/etc/conf.d/mqtt-exec.aports-build . $conf || exit 1 if [ -z "$git_branch" ]; then diff --git a/main/aports-build/aports-build.initd b/main/aports-build/aports-build.initd index cf7852edb6..709b8b999f 100644 --- a/main/aports-build/aports-build.initd +++ b/main/aports-build/aports-build.initd @@ -1,5 +1,7 @@ #!/sbin/runscript +# this script is deprecated but kept for a migration period + : ${mqtt_broker:="msg.alpinelinux.org"} : ${git_branch:=master} : ${mqtt_topic:="git/aports/$git_branch"} @@ -13,16 +15,9 @@ depend() { need net } -start_pre() { - local h=$(getent passwd buildozer | cut -d: -f6) - checkpath --owner buildozer --directory ${pidfile%/*} - local i - for i in aports alpine-iso; do - if ! [ -d "$h"/$i ]; then - eerror "$h/$i is missing. Please git clone it" - return 1 - fi - done +start() { + eerror "Please migrate to mqtt-exec.aports-build" + return 1 } stop_post() { diff --git a/main/aports-build/aports-build.confd b/main/aports-build/mqtt-exec.aports-build.confd index 1a7320978c..9034f7d839 100644 --- a/main/aports-build/aports-build.confd +++ b/main/aports-build/mqtt-exec.aports-build.confd @@ -1,3 +1,11 @@ +# mqtt-exec params +exec_command=/usr/bin/aports-build +mqtt_broker="msg.alpinelinux.org" +mqtt_topics="git/aports/$git_branch git/aports/$git_branch/release" +will_topic="build/$(hostname)" +will_retained=yes + + # what git branch to build git_branch=master |