mirror of https://github.com/openwrt/packages.git
ngircd: update to 28
Update to the latest upstream stable release. Also expand test.sh beyond the single loose configtest grep: assert the daemon binary, init script and default config are installed, that --configtest exits cleanly on the shipped config, and that it rejects an explicitly-passed missing config file (so the positive check is real). The daemon is never started, which would hang under QEMU emulation. Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>pull/30131/head
parent
418ba9a99f
commit
a256fb99b8
|
|
@ -8,12 +8,12 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ngircd
|
||||
PKG_VERSION:=27
|
||||
PKG_VERSION:=28
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://ngircd.barton.de/pub/ngircd
|
||||
PKG_HASH:=6897880319dd5e2e73c1c9019613509f88eb5b8daa5821a36fbca3d785c247b8
|
||||
PKG_HASH:=b48ba320a931d445ae335c47f88a9406a20f5c71c623bee5f7755d0522d435ee
|
||||
|
||||
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
|
|
|||
|
|
@ -2,9 +2,24 @@
|
|||
|
||||
case "$1" in
|
||||
ngircd|ngircd-nossl)
|
||||
# Verify the installed default config passes ngircd's built-in syntax check
|
||||
[ -f /etc/ngircd.conf ]
|
||||
ngircd --configtest 2>&1 | grep -qi "ok\|using config\|ngircd"
|
||||
BIN=/usr/sbin/ngircd
|
||||
# The daemon, its init script and the default config must be installed.
|
||||
[ -x "$BIN" ] || { echo "FAIL: $BIN not installed"; exit 1; }
|
||||
[ -x /etc/init.d/ngircd ] || { echo "FAIL: init script missing"; exit 1; }
|
||||
[ -f /etc/ngircd.conf ] || { echo "FAIL: /etc/ngircd.conf missing"; exit 1; }
|
||||
|
||||
# The shipped default config must pass ngircd's own validator (exit 0).
|
||||
"$BIN" --configtest >/tmp/ngircd-ct.log 2>&1 || {
|
||||
echo "FAIL: configtest rejected the default config"; cat /tmp/ngircd-ct.log; exit 1; }
|
||||
grep -qi ngircd /tmp/ngircd-ct.log || { echo "FAIL: unexpected configtest output"; exit 1; }
|
||||
|
||||
# configtest must actually read the file it is given: pointing it at a
|
||||
# missing config has to fail, proving the positive check above is real.
|
||||
if "$BIN" --configtest --config /tmp/ngircd-absent.conf >/dev/null 2>&1; then
|
||||
echo "FAIL: configtest accepted a missing config file"; exit 1
|
||||
fi
|
||||
|
||||
echo "ngircd: config validation OK"
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue