Skip to content

bmx7: clean up Makefile and add test-version.sh - #1194

Open
BKPepe wants to merge 5 commits into
openwrt:openwrt-25.12from
BKPepe:bmx7-cleanup
Open

bmx7: clean up Makefile and add test-version.sh#1194
BKPepe wants to merge 5 commits into
openwrt:openwrt-25.12from
BKPepe:bmx7-cleanup

Conversation

@BKPepe

@BKPepe BKPepe commented Aug 6, 2026

Copy link
Copy Markdown
Member
  • Remove GIT_REV="$(PKG_REV)" from MAKE_ARGS: PKG_REV is not defined anywhere and the bmx7 build system does not consume a GIT_REV make variable at all.
  • Do not create empty /etc/config and /etc/init.d directories in the bmx7 package; the files installed there belong to bmx7-uci-config.
  • Add test-version.sh for the CI runtime tests: the package version is derived from PKG_SOURCE_DATE, which the binary does not report, so the generic version check could never pass. Running bmx7 -v in CI is not suitable either, since it first generates the node RSA-2048 key, which can take very long on emulated architectures.

Maintainer: @axn

Copilot AI lite review requested due to automatic review settings August 6, 2026 07:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread bmx7/test-version.sh
Comment on lines +7 to +11
# 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.

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?

BKPepe and others added 5 commits August 11, 2026 13:06
- Remove GIT_REV="$(PKG_REV)" from MAKE_ARGS. PKG_REV is not defined
  anywhere, so an empty value was passed, and the bmx7 build system
  does not consume a GIT_REV make variable at all (the GIT_REV macro
  is a C define with a built-in fallback).
- Do not create empty /etc/config and /etc/init.d directories in the
  bmx7 package. Both files installed there belong to the
  bmx7-uci-config package, which creates the directories itself.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The package version is derived from PKG_SOURCE_DATE (e.g.
2024.06.11), which the bmx7 binary does not report, so the generic
version check of the CI runtime tests always fails for the bmx7
package.

Skip the version check: `bmx7 -v` is not suitable for CI, because it
first generates the node RSA-2048 key, which can take a very long
time on emulated architectures. The plugin packages ship libraries
only and provide no version information either.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The comment said running `bmx7 -v` generates the node RSA key
without saying why, and claimed it takes a very long time on
emulated architectures, which was never measured.

The mechanism is in the option ordering: struct opt_type carries an
order field which "enforces an order during the init process", and
apply_init_args() applies every option with a lower order before the
one being processed. ARG_KEY_PATH has order 4 and ARG_VERSION has
order 9, so opt_key_path() runs first, and while initializing it
creates a DEF_NODE_RSA_TX_TYPE (RSA2048) key whenever the key file
is missing. bmx7 itself warns "Creating %s private key. This can
take a while..." at that point.

Record that instead of the unmeasured claim.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
/etc/bmx7 is a directory, so its conffiles entry has to carry a
trailing slash to match the documented convention.

The path is not part of the package payload - the install recipe
only creates /usr/lib, /etc/config and /etc/init.d - so it is
handled through /lib/upgrade/keep.d, where sysupgrade walks it
recursively and both spellings behave the same. This is a
formatting fix, not a behaviour change.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
PKG_BUILD_PARALLEL:=1 had no effect: the custom Build/Compile calls
$(MAKE) without $(PKG_JOBS) and without the '+' jobserver prefix,
both of which Build/Compile/Default passes. Add them, so the flag
actually takes effect.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@openwrt openwrt Bot added the not following guidelines Pull request does not follow formatting guidelines label Aug 11, 2026
@BKPepe
BKPepe changed the base branch from master to openwrt-25.12 August 11, 2026 11:13
@openwrt openwrt Bot added the release/25.12 Pull request targets the stable release branch release/25.12 label Aug 11, 2026
@BKPepe

BKPepe commented Aug 11, 2026

Copy link
Copy Markdown
Member Author

[allow cherry-pick]

@openwrt openwrt Bot removed the not following guidelines Pull request does not follow formatting guidelines label Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/25.12 Pull request targets the stable release branch release/25.12

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants