Skip to content
Snippets Groups Projects
Commit 312efba6 authored by Natanael Copa's avatar Natanael Copa
Browse files

main/aports-build: fix build error reporting

use mosquitto_pub config for setting user/password for mqtt broker

(cherry picked from commit ce37163b)
(cherry picked from commit fa0f6c38)
(cherry picked from commit 5395cf24)
(cherry picked from commit 99067f5d)
parent 260a6e93
No related branches found
No related tags found
No related merge requests found
# Maintainer: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=aports-build pkgname=aports-build
pkgver=1.5.3 pkgver=1.5.4
pkgrel=0 pkgrel=0
pkgdesc="MQTT based build-on-git-push scripts for Alpine Linux" pkgdesc="MQTT based build-on-git-push scripts for Alpine Linux"
url="https://alpinelinux.org" url="https://alpinelinux.org"
...@@ -46,7 +46,9 @@ package() { ...@@ -46,7 +46,9 @@ package() {
EOF EOF
} }
sha512sums="81c039c6999fddde2489fccdc48b29760c80ea1ff5265cc2d7f73d6575e0173a0f51b89a4d49e5100e2d841b6260adc48e4ab00e8608d52b3b69b17a590467ad aports-build sha512sums="
81c039c6999fddde2489fccdc48b29760c80ea1ff5265cc2d7f73d6575e0173a0f51b89a4d49e5100e2d841b6260adc48e4ab00e8608d52b3b69b17a590467ad aports-build
821035bda47152c341ec94bf960fa67e3377051826712ceb74f39103e6e422777b6e082231bfb87865653d2b93b7d3154cfc24abf65a52e3e66da69412dd7e41 aports-build.initd 821035bda47152c341ec94bf960fa67e3377051826712ceb74f39103e6e422777b6e082231bfb87865653d2b93b7d3154cfc24abf65a52e3e66da69412dd7e41 aports-build.initd
62ed5cb6d1fef03fa707512c8c99c572a91e64706ebcc2e7097108811818615618bab908292d0ba0ad2afe93a27333d9c91deb347d6c99703eb8983d1ee5f480 mqtt-exec.aports-build.confd 62ed5cb6d1fef03fa707512c8c99c572a91e64706ebcc2e7097108811818615618bab908292d0ba0ad2afe93a27333d9c91deb347d6c99703eb8983d1ee5f480 mqtt-exec.aports-build.confd
cf0d8e65e517857ee781e451a1d3e6404cd72aeb5c7dba25017229ff79c4c43425712d2fcbbaad89af45a358e86f33467ac1df47e8fba0f30f81d84794e1206c report-build-errors.lua" 939ba54ab4159bc8fcd0cb08f16f67dac05d29c77005da6fca0463048ab991765665b35f2feb978bfd8409bd13fdbdf3d47a7652df842e76504d076ac040c337 report-build-errors.lua
"
...@@ -6,6 +6,26 @@ local f = io.open("/proc/sys/kernel/hostname") ...@@ -6,6 +6,26 @@ local f = io.open("/proc/sys/kernel/hostname")
hostname = f:read() hostname = f:read()
f:close() f:close()
local function read_mosquitto_conf()
local cfg = {}
local f = io.open((os.getenv("XDG_CONFIG_HOME") or "").."/mosquitto_pub") or io.open((os.getenv("HOME") or "").."/.config/mosquitto_pub")
if f == nil then
return cfg
end
for line in f:lines() do
key,value = line:match("^%-%-([^ ]+)%s+(.*)")
if key and value then
cfg[key] = value
end
end
f:close()
return cfg
end
local mcfg = read_mosquitto_conf()
publish.hostname = mcfg.hostname or "localhost"
publish.username = mcfg.username
publish.password = mcfg.pw
local m = {} local m = {}
function shell_escape(args) function shell_escape(args)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment