Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions bmx7/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=bmx7
PKG_VERSION:=2024.06.11
PKG_RELEASE:=2
PKG_RELEASE:=3

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz

Expand Down Expand Up @@ -30,7 +30,6 @@ MAKE_ARGS += EXTRA_CFLAGS="$(TARGET_CFLAGS) \
-DBMX7_LIB_IWINFO" \
EXTRA_LDFLAGS="$(TARGET_LDFLAGS) \
-L$(STAGING_DIR)/usr/lib -liwinfo" \
GIT_REV="$(PKG_REV)" \
CC="$(TARGET_CC)" \
INSTALL_DIR="$(PKG_INSTALL_DIR)" \
build_all
Expand Down Expand Up @@ -98,17 +97,17 @@ define Package/bmx7-table
endef

define Package/bmx7/install
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(MAKE_PATH)/bmx7 $(1)/usr/sbin/bmx7
endef

define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) $(MAKE_ARGS)
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) $(MAKE_ARGS)
endef

define Package/bmx7-uci-config/conffiles
/etc/config/bmx7
/etc/bmx7
/etc/bmx7/
endef

define Package/bmx7-uci-config/install
Expand Down
24 changes: 24 additions & 0 deletions bmx7/test-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

# shellcheck shell=busybox

case "$PKG_NAME" in
bmx7)
# The version of bmx7 is derived from the source date, which the
# binary does not report. `bmx7 -v` is not an alternative: the
# key path option is applied before the version option, so a
# missing node key gets generated first - "Creating RSA2048
# private key. This can take a while", as bmx7 puts it.
Comment on lines +7 to +11

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.

@axn — question rather than a bug report: bmx7 -v prints the node identity (key hash, key type, link keys, descSqn), so it needs myKey and therefore generates the RSA2048 node key on first run before printing anything. That is fine for what the option does, but it means there is no cheap way to ask a bmx7 binary which version it is, which is why this PR skips the version check in CI rather than running the binary.

Would a lightweight option that prints just BMX_BRANCH-BRANCH_VERSION and exits be of interest upstream?

exit 0
;;

bmx7-*)
# Plugins are libraries and do not provide version information
exit 0
;;

*)
echo "Untested package: $PKG_NAME" >&2
exit 1
;;
esac