]> git.99rst.org Git - openwrt-packages.git/commitdiff
cifs-utils: update to 7.7 + more tests + add python3-light dep
authorAlexandru Ardelean <redacted>
Tue, 28 Jul 2026 11:22:08 +0000 (14:22 +0300)
committerAlexandru Ardelean <redacted>
Fri, 31 Jul 2026 11:15:38 +0000 (14:15 +0300)
Update to the latest upstream stable release.

Replace the version-only test.sh with checks that exercise the installed
binaries. smbinfo ships as a /usr/bin/python3 script, so add +python3-light
or it cannot exec; it also has no version flag, so add test-version.sh to
override the generic per-executable version probe (skipping smbinfo).

Signed-off-by: Alexandru Ardelean <redacted>
net/cifs-utils/Makefile
net/cifs-utils/test-version.sh [new file with mode: 0755]
net/cifs-utils/test.sh

index 93ece9d5f49e2d5716d0f57fbf7fa049782241b1..9f32217391e2553de92a80077ff9d2716c599bd8 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cifs-utils
-PKG_VERSION:=7.5
-PKG_RELEASE:=2
+PKG_VERSION:=7.7
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://download.samba.org/pub/linux-cifs/cifs-utils/
-PKG_HASH:=7face85e3d2d5eb5e7adbd181adee6759097f135b10d6fb30be8e070af7e7054
+PKG_HASH:=2f8aae9aa5ddd73fbaf4d61e2e5e19ef54124cbf2810b626820050e7bd2f6606
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 PKG_LICENSE:=GPL-3.0-or-later
@@ -39,7 +39,7 @@ endef
 define Package/smbinfo
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+kmod-fs-cifs +libtalloc
+  DEPENDS:=+kmod-fs-cifs +libtalloc +python3-light
   TITLE:=SMB info
   URL:=https://wiki.samba.org/index.php/LinuxCIFS_utils
 endef
diff --git a/net/cifs-utils/test-version.sh b/net/cifs-utils/test-version.sh
new file mode 100755 (executable)
index 0000000..76e0f00
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+case "$PKG_NAME" in
+cifsmount)
+       # mount.cifs -V prints "mount.cifs version: X.Y".
+       mount.cifs -V 2>&1 | grep -F "$PKG_VERSION"
+       ;;
+*)
+       # smbinfo is a python sub-command tool with no version flag, so the
+       # generic probe cannot read a version from it; nothing to assert.
+       exit 0
+       ;;
+esac
index 681eddec91ddc57c617b8d044935fc51f79c0b9a..380fdc3a6a204afbd3b90329d750419e89f7a1df 100644 (file)
@@ -1,10 +1,26 @@
 #!/bin/sh
+# There is no SMB server or kmod-fs-cifs in the CI sandbox, so exercise the
+# argument/usage paths that run before any mount syscall or SMB I/O.
 
 case "$1" in
 cifsmount)
-       mount.cifs --version 2>&1 | grep -F "$2"
+       # mount.cifs ships with its mount.smb3 alias and prints usage (rather
+       # than crashing) when invoked with no target and mountpoint.
+       [ -x /usr/sbin/mount.cifs ] || { echo "FAIL: mount.cifs not installed"; exit 1; }
+       [ -L /usr/sbin/mount.smb3 ] || { echo "FAIL: mount.smb3 alias missing"; exit 1; }
+       [ "$(readlink /usr/sbin/mount.smb3)" = "mount.cifs" ] || { echo "FAIL: mount.smb3 points elsewhere"; exit 1; }
+       out="$(mount.cifs 2>&1)"
+       echo "$out" | grep -qi usage || { echo "FAIL: no usage from mount.cifs: $out"; exit 1; }
+       echo "cifsmount: usage/alias OK"
        ;;
 smbinfo)
-       smbinfo --version 2>&1 | grep -F "$2"
+       # smbinfo lists its subcommands when run without arguments.
+       [ -x /usr/bin/smbinfo ] || { echo "FAIL: smbinfo not installed"; exit 1; }
+       out="$(smbinfo 2>&1)"
+       echo "$out" | grep -qiE 'usage|command' || { echo "FAIL: no usage from smbinfo: $out"; exit 1; }
+       echo "smbinfo: usage OK"
+       ;;
+*)
+       exit 0
        ;;
 esac
git clone https://git.99rst.org/PROJECT