Skip to content
Merged
3 changes: 2 additions & 1 deletion lang/python/python-pyserial/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE.txt
PKG_MAINTAINER:=Micke Prag <micke.prag@telldus.se>

HOST_BUILD_DEPENDS:=python3/host python-build/host python-installer/host python-wheel/host
HOST_BUILD_DEPENDS:=python-setuptools/host
PKG_BUILD_DEPENDS:=python-setuptools/host

include ../pypi.mk
include $(INCLUDE_DIR)/package.mk
Expand Down
15 changes: 15 additions & 0 deletions lang/python/python-pyserial/test-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

# shellckeck shell=busybox

This comment was marked as resolved.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it.


case "$PKG_NAME" in
python3-pyserial|\
python3-pyserial-src)
exit 0
;;

*)
echo "Untested package: $PKG_NAME" >&2
exit 1
;;
esac
15 changes: 15 additions & 0 deletions lang/python/python-tabulate/test-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

# shellckeck shell=busybox

case "$PKG_NAME" in
python3-tabulate|\
python3-tabulate-src)
exit 0
;;

*)
echo "Untested package: $PKG_NAME" >&2
exit 1
;;
esac
22 changes: 21 additions & 1 deletion lang/python/python3/test-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,47 @@ python3-light)
python3 --version | grep -Fx "Python $PKG_VERSION"
;;

libpython3-3.14|\
python3-asyncio|\
python3-asyncio-src|\
python3-base-src|\
python3-codecs|\
python3-codecs-src|\
python3-ctypes|\
python3-ctypes-src|\
python3-dbm|\
python3-dbm-src|\
python3-decimal|\
python3-decimal-src|\
python3-dev|\
python3-dev-src|\
python3-light-src|\
python3-logging|\
python3-logging-src|\
python3-lzma|\
python3-lzma-src|\
python3-multiprocessing|\
python3-multiprocessing-src|\
python3-ncurses|\
python3-ncurses-src|\
python3-openssl|\
python3-openssl-src|\
python3-pydoc|\
python3-pydoc-src|\
python3-readline|\
python3-readline-src|\
python3-sqlite3|\
python3-sqlite3-src|\
python3-unittest|\
python3-unittest-src|\
python3-urllib|\
python3-urllib-src|\
python3-uuid|\
python3-uuid-src|\
python3-venv|\
python3-xml)
python3-venv-src|\
python3-xml|\
python3-xml-src)
exit 0
;;

Expand Down
43 changes: 43 additions & 0 deletions libs/avahi/test-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/sh

# shellckeck shell=busybox

_version_check() {
local bin="$1" pkg="$2" ver="$3"
# apk versions use _ where upstream uses - (e.g. 0.9_rc4 vs 0.9-rc4)
local upstream_ver
upstream_ver=$(echo "$ver" | tr '_' '-')
"$bin" -V 2>&1 | grep -F "$upstream_ver" || {
echo "FAIL: $bin -V did not print expected version '$upstream_ver'"
exit 1
}
}

case "$PKG_NAME" in
avahi-autoipd)
_version_check avahi-autoipd avahi-autoipd "$PKG_VERSION"
;;

avahi-dbus-daemon|\
avahi-nodbus-daemon)
_version_check avahi-daemon avahi-daemon "$PKG_VERSION"
;;

avahi-dnsconfd)
_version_check avahi-dnsconfd avahi-dnsconfd "$PKG_VERSION"
;;

avahi-daemon-service-http|\
avahi-daemon-service-ssh|\
avahi-utils|\
libavahi-client|\
libavahi-dbus-support|\
libavahi-nodbus-support)
exit 0
;;

*)
echo "Untested package: $PKG_NAME" >&2
exit 1
;;
esac
79 changes: 31 additions & 48 deletions libs/avahi/test.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
#!/bin/sh

_version_check() {
local bin="$1" pkg="$2" ver="$3"
# apk versions use _ where upstream uses - (e.g. 0.9_rc4 vs 0.9-rc4)
local upstream_ver
upstream_ver=$(echo "$ver" | tr '_' '-')
"$bin" -V 2>&1 | grep -F "$upstream_ver" || {
echo "FAIL: $bin -V did not print expected version '$upstream_ver'"
exit 1
}
}

_lib_check() {
local f="$1"
[ -e "$f" ] || { echo "FAIL: $f not found"; exit 1; }
Expand All @@ -20,10 +9,6 @@ _lib_check() {
# Works for both dbus and nodbus variants; dbus variant skips the start
# test when avahi-utils (which needs dbus) is not installed.
_daemon_start_test() {
local ver="$1"

_version_check avahi-daemon avahi-daemon "$ver"

# Config file from package
[ -f /etc/avahi/avahi-daemon.conf ] || {
echo "FAIL: /etc/avahi/avahi-daemon.conf not installed"
Expand All @@ -41,36 +26,36 @@ _daemon_start_test() {
# Try to start avahi-daemon with a minimal config and no privilege drop
mkdir -p /var/run/avahi-daemon /tmp/avahi-test

cat > /tmp/avahi-test/avahi-daemon.conf << 'EOF'
[server]
host-name=avahi-test
use-ipv4=yes
use-ipv6=no
check-response-ttl=no
use-iff-running=no
enable-dbus=no

[wide-area]
enable-wide-area=no

[publish]
publish-addresses=yes
publish-hinfo=no
publish-workstation=no
publish-domain=yes
disable-publishing=no

[reflector]
enable-reflector=no

[rlimits]
rlimit-core=0
rlimit-data=4194304
rlimit-fsize=0
rlimit-nofile=30
rlimit-stack=4194304
rlimit-nproc=3
EOF
cat > /tmp/avahi-test/avahi-daemon.conf <<-'EOF'
[server]
host-name=avahi-test
use-ipv4=yes
use-ipv6=no
check-response-ttl=no
use-iff-running=no
enable-dbus=no

[wide-area]
enable-wide-area=no

[publish]
publish-addresses=yes
publish-hinfo=no
publish-workstation=no
publish-domain=yes
disable-publishing=no

[reflector]
enable-reflector=no

[rlimits]
rlimit-core=0
rlimit-data=4194304
rlimit-fsize=0
rlimit-nofile=30
rlimit-stack=4194304
rlimit-nproc=3
EOF

avahi-daemon --no-drop-root --no-chroot \
--file=/tmp/avahi-test/avahi-daemon.conf \
Expand Down Expand Up @@ -150,11 +135,10 @@ libavahi-client)
;;

avahi-dbus-daemon|avahi-nodbus-daemon)
_daemon_start_test "$2"
_daemon_start_test
;;

avahi-autoipd)
_version_check avahi-autoipd avahi-autoipd "$2"
[ -x /usr/sbin/avahi-autoipd ] || { echo "FAIL: avahi-autoipd not executable"; exit 1; }
[ -x /etc/avahi/avahi-autoipd.action ] || {
echo "FAIL: avahi-autoipd.action script not installed"
Expand All @@ -175,7 +159,6 @@ avahi-daemon-service-ssh)
;;

avahi-dnsconfd)
_version_check avahi-dnsconfd avahi-dnsconfd "$2"
[ -x /usr/sbin/avahi-dnsconfd ] || { echo "FAIL: avahi-dnsconfd not executable"; exit 1; }
[ -x /etc/avahi/avahi-dnsconfd.action ] || {
echo "FAIL: avahi-dnsconfd.action not installed"
Expand Down
13 changes: 11 additions & 2 deletions libs/libcap-ng/test-version.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#!/bin/sh

# shellckeck shell=busybox

case "$1" in
captest|filecap|netcap|pscap) exit 0 ;;
*) echo "Untested package: $1" >&2; exit 1 ;;
libcap-ng|\
libcap-ng-bin)
exit 0
;;
*)
echo "Untested package: $1" >&2
exit 1
;;
esac
7 changes: 4 additions & 3 deletions libs/libftdi1/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#
# Copyright (C) 2014-2017 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
Expand All @@ -9,7 +8,8 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=libftdi1
PKG_VERSION:=1.5
PKG_RELEASE:=2
PKG_FTDI_EEPROM_VERSION:=0.17
PKG_RELEASE:=3

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://www.intra2net.com/en/developer/libftdi/download/
Expand All @@ -35,7 +35,7 @@ endef

define Package/libftdi1/description
libFTDI - FTDI USB driver with bitbang mode
libFTDI is an open source library to talk to FTDI chips: FT232BM, FT245BM, FT2232C, FT2232H, FT4232H, FT2232D and FT245R, including the popular bitbang mode.
libFTDI is an open source library to talk to FTDI chips: FT232BM, FT245BM, FT2232C, FT2232H, FT4232H, FT2232D and FT245R, including the popular bitbang mode.
The library is linked with your program in userspace, no kernel driver required.
endef

Expand All @@ -45,6 +45,7 @@ define Package/ftdi_eeprom
DEPENDS:=+confuse +libftdi1
TITLE:=Tool for reading/erasing/flashing FTDI USB chip eeproms
URL:=https://www.intra2net.com/en/developer/libftdi/
VERSION:=$(PKG_FTDI_EEPROM_VERSION)-r$(PKG_RELEASE)
endef

define Package/ftdi_eeprom/description
Expand Down
18 changes: 18 additions & 0 deletions libs/libftdi1/test-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

# shellckeck shell=busybox

case "$PKG_NAME" in
ftdi_eeprom)
ftdi_eeprom --version 2>&1 | grep -F "$PKG_VERSION"
;;

libftdi1)
exit 0
;;

*)
echo "Untested package: $PKG_NAME" >&2
exit 1
;;
esac
15 changes: 15 additions & 0 deletions libs/libucontext/test-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

# shellckeck shell=busybox

case "$PKG_NAME" in
libucontext|\
libucontext-tests)
exit 0
;;

*)
echo "Untested package: $PKG_NAME" >&2
exit 1
;;
esac
17 changes: 17 additions & 0 deletions net/krb5/test-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

# shellckeck shell=busybox

case "$PKG_NAME" in
krb5-libs|\
krb5-server|\
krb5-server-extras|\
krb5-client)
exit 0
;;

*)
echo "Untested package: $PKG_NAME" >&2
exit 1
;;
esac
29 changes: 29 additions & 0 deletions net/unbound/test-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/sh

# shellckeck shell=busybox

case "$PKG_NAME" in
libunbound)
exit 0
;;

unbound-anchor|\
unbound-checkconf|\
unbound-control|\
unbound-host)
$PKG_NAME -h 2>&1 | grep -F "$PKG_VERSION"
;;

unbound-control-setup)
exit 0
;;

unbound-daemon)
unbound -V 2>&1 | grep -F "$PKG_VERSION"
;;

*)
echo "Untested package: $PKG_NAME" >&2
exit 1
;;
esac
1 change: 0 additions & 1 deletion net/unbound/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

case "$1" in
unbound-daemon)
unbound -V 2>&1 | grep -F "$2"
[ -f /etc/unbound/unbound.conf ] || { echo "FAIL: /etc/unbound/unbound.conf not installed"; exit 1; }
;;

Expand Down
Loading
Loading