bmx7: clean up Makefile and add test-version.sh - #1194
Open
BKPepe wants to merge 5 commits into
Open
Conversation
BKPepe
commented
Aug 6, 2026
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. |
Member
Author
There was a problem hiding this comment.
@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?
- 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>
Member
Author
|
[allow cherry-pick] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.test-version.shfor 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. Runningbmx7 -vin CI is not suitable either, since it first generates the node RSA-2048 key, which can take very long on emulated architectures.Maintainer: @axn