Skip to content

bmx7: add new package - #30167

Open
BKPepe wants to merge 1 commit into
openwrt:masterfrom
BKPepe:add-bmx7
Open

bmx7: add new package#30167
BKPepe wants to merge 1 commit into
openwrt:masterfrom
BKPepe:add-bmx7

Conversation

@BKPepe

@BKPepe BKPepe commented Aug 6, 2026

Copy link
Copy Markdown
Member

Adds bmx7 from the openwrt/routing feed — the routing packages are being moved into openwrt/packages one by one, as discussed in openwrt/routing#184.

Includes the Makefile cleanup and CI test-version.sh pending in openwrt/routing#1194.

The content matches the current routing feed master. Once this is merged, the package will be removed from the routing feed (a coordinated removal PR is prepared there).

Maintainer: @axn

Copilot AI lite review requested due to automatic review settings August 6, 2026 08:10

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 on lines +1 to +4
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Sun, 30 Aug 2020 14:09:17 -0700
Subject: [PATCH] fix compilation with uClibc-ng

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.

@neheb Can you please reach @axn to have this upstreamed or even in better way... Can you please submit pull request https://github.com/bmx-routing/bmx7/pulls ? :)

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed 1 new commit (6da310e). The commit message matches the diff, the Makefile follows the indentation conventions for each define block type, and test-version.sh matches the shape used by other packages in the feed — no complaints there.

Four inline findings. Only the conffiles one on net/bmx7/Makefile line 110 has a user-visible effect I'd want addressed before merge (trusted-node keys under /etc/bmx7 are not preserved on upgrade without the trailing slash). The PKG_BUILD_PARALLEL finding is a build-time inefficiency rather than a defect, the init-script wait loop is a question about behaviour inherited from the routing feed, and the indentation one is marked optional.

I could not verify the PR's claim that the content matches the current routing feed master, or whether bmx7 publishes release tarballs that would let PKG_SOURCE_PROTO:=git be dropped — this session only has access to openwrt/packages, so I did not flag either.


Generated by Claude Code

Comment thread net/bmx7/Makefile
Comment on lines +104 to +106
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) $(MAKE_ARGS)
endef

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

PKG_BUILD_PARALLEL:=1 on line 18 has no effect as written. This custom Build/Compile invokes $(MAKE) without $(PKG_JOBS) and without the + jobserver prefix, unlike Build/Compile/Default in package-defaults.mk:145, which passes both. PKG_JOBS in package.mk:24 is the variable that turns PKG_BUILD_PARALLEL into $(MAKE_J), so bmx7 is currently built serially and the flag is dead weight.

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

Generated by Claude Code

Comment thread net/bmx7/Makefile Outdated

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

/etc/bmx7 is a directory, not a file — the shipped sample config points trustedNodesDir at /etc/bmx7/trustedNodes. Directory entries in conffiles have to carry a trailing slash; without it the path is registered as a single config file, and the trusted-node keys stored under it are not preserved across upgrade/reinstall. The formality check can't catch this one because it can't tell from the string alone that the path is a directory.

Suggested change
/etc/bmx7
/etc/bmx7/

Generated by Claude Code

Comment on lines +9 to +10
cd /root/ || return
while pgrep -f mac80211.sh ; do sleep 1; done

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

start_service() runs synchronously in the rc process, so this unbounded while loop stalls boot for as long as any mac80211.sh is running. There is no timeout and no iteration cap, so a wifi script that hangs blocks S91bmx7 — and everything ordered after it — indefinitely. pgrep's matched lines are also printed to the console on every pass, since the loop uses its output as the condition without redirecting it.

Is this wait still needed at all? If it is, a bounded retry count plus pgrep -f mac80211.sh >/dev/null would keep the failure mode contained.

Line 9 has a related sharp edge: cd /root/ || return aborts start_service silently when /root is absent, so the daemon never starts and nothing is logged. Since the cd only exists to place core dumps (matching limits core=20000 below), failing to change directory probably shouldn't prevent the service from running.


Generated by Claude Code

Comment on lines +22 to +28
reload_service() {
"$BIN" -c configReload
}

service_triggers() {
procd_add_reload_trigger "bmx7"
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: these two function bodies are indented with four spaces while start_service() above uses tabs. Optional, but since the file is new to this repo it may as well be consistent.

Suggested change
reload_service() {
"$BIN" -c configReload
}
service_triggers() {
procd_add_reload_trigger "bmx7"
}
reload_service() {
"$BIN" -c configReload
}
service_triggers() {
procd_add_reload_trigger "bmx7"
}

Generated by Claude Code

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed 3 new commits (2cf6a71, c5f15e0, 685afd8).

c5f15e0 is correct: +$(MAKE) $(PKG_JOBS) ... now matches the shape of Build/Compile/Default in package-defaults.mk:145-150, so PKG_BUILD_PARALLEL:=1 takes effect. Worth keeping an eye on the build job, since this is the first time bmx7's src Makefile is actually driven with -j in this feed. 685afd8 is a comment-only change and its message matches the diff.

Commit checks

  • 2cf6a71 "bmx7: fix conffiles entry for the trusted nodes directory" — the diff (adding a trailing slash) is right and should stay, but the message describes an effect it does not have. /etc/bmx7 is not shipped by the install recipe, so both spellings end up in /lib/upgrade/keep.d and are backed up recursively either way; the message also says the sample config points trustedNodesDir at /etc/bmx7/trustedNodes, which is commented out. Details inline on net/bmx7/Makefile line 110. This is a correction of my own previous comment, which is what the commit was written from — apologies for sending you after a non-issue.

Nothing here blocks a merge. My earlier findings on the init script (unbounded pgrep wait loop, cd /root/ || return) and the four-space indentation in reload_service/service_triggers are unchanged and still open; the patch-upstreaming question on 020-siocgstamp.patch is for @neheb / @axn.


Generated by Claude Code

Comment thread net/bmx7/Makefile

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Correcting my own earlier comment, which this commit was written to address: the trailing slash is the right spelling per the project's conffiles rule, so keep the line — but the mechanism I described, and which 2cf6a71's message now records, does not hold. Two things I got wrong:

  1. The slash makes no difference to upgrade preservation here. /etc/bmx7 is not installed by Package/bmx7-uci-config/install — the recipe only creates /usr/lib, /etc/config and /etc/init.d. Because the path is absent from IDIR, the KEEP_ block in package-pack.mk:491-501 routes it to /lib/upgrade/keep.d/bmx7-uci-config instead of the package's Conffiles field, and list_static_conffiles in sysupgrade:165-171 then runs find over that path recursively. find /etc/bmx7 and find /etc/bmx7/ yield the same file list, so anything under the directory was already being backed up before this commit. That block is outside the CONFIG_USE_APK conditional, so it applies to both apk and ipk; the opkg-side resolver at ipkg-build:53 is a no-op for both spellings since the path does not exist in the package payload.

  2. The sample config does not point trustedNodesDir anywhere. files/etc/config/bmx7:7 has that option commented out, so the /etc/bmx7/trustedNodes path only comes into play if a user enables it. Both the commit body and my original comment state it as shipped configuration.

Nothing to change in the diff — but the commit body asserts a bug that was not there and a config default that does not exist, and it will outlive this PR in git log. Worth rewording it to what the change actually is (a conffiles formatting fix so the directory entry matches the documented convention), or dropping the commit into the parent one.


Generated by Claude Code

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

Choose a reason for hiding this comment

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

nit: series hygiene — this is the third commit in the PR that only fixes something introduced by 6da310e ("add new package"), alongside 2cf6a71 (conffiles) and c5f15e0 (parallel build). Here the entire change is rewording a comment that the first commit added hours earlier.

Since bmx7 does not exist in this repo yet, there is no intermediate state worth preserving in history — the fixups only record that the first draft was wrong. Squashing all four into a single bmx7: add new package commit would leave a cleaner import, and would also drop the Reported-by: openwrt-ai[bot] trailers, which point at review comments rather than a reporter.

Not blocking, and up to you if you prefer keeping the audit trail while the PR is open.


Generated by Claude Code

BMX7 is a mesh routing daemon supporting securely-entrusted IPv6
(and IPv4in6) routing.

Moved from the openwrt/routing feed, as discussed in
openwrt/routing#184, with four changes to
the feed's copy:

- GIT_REV="$(PKG_REV)" is dropped from MAKE_ARGS: PKG_REV is not
  defined anywhere and the bmx7 build system does not consume a
  GIT_REV make variable at all.
- The bmx7 package no longer creates empty /etc/config and
  /etc/init.d directories; the files installed there belong to
  bmx7-uci-config, which creates them itself.
- Build/Compile passes $(PKG_JOBS) and the jobserver prefix, so
  PKG_BUILD_PARALLEL:=1 takes effect.
- The /etc/bmx7 conffiles entry gains its trailing slash, so the
  directory entry matches the documented convention.

test-version.sh skips the version check: the package version comes
from PKG_SOURCE_DATE, which the binary does not report, and `bmx7
-v` is not an alternative, because the key path option is applied
before the version option and a missing node key is generated first.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed 1 new commit (19e764f); no new issues found.

The four-commit series is now a single bmx7: add new package commit, and git diff 685afd8..19e764f over net/bmx7 is empty — the tree is byte-identical to what I reviewed last round, so this is a history rewrite only. The Reported-by: openwrt-ai[bot] trailers are gone too.

Commit message checks out against the diff. Of the four deviations from the feed copy it lists, three are directly verifiable in-tree and all match: no GIT_REV= in MAKE_ARGS (and PKG_REV is defined nowhere in this repo outside tools/zip, nor in include/ upstream), Package/bmx7/install creates only /usr/sbin while Package/bmx7-uci-config/install creates /etc/config and /etc/init.d itself, Build/Compile carries +$(MAKE) $(PKG_JOBS), and the conffiles entry is /etc/bmx7/. The conffiles wording is now "matches the documented convention" rather than the upgrade-preservation claim I had wrongly asserted — that reads correctly. The fourth (bmx7's build system not consuming GIT_REV) is a statement about upstream source I can't check from here.

Two findings from the first round are still open and unchanged, since the code did not move:

Neither blocks a merge, and the patch-upstreaming question on 020-siocgstamp.patch is still for @neheb / @axn.

CI: FormalityCheck passed; the ten Feeds Package Test Build jobs were still queued at review time, so nothing to report from logs.


Generated by Claude Code

BKPepe added a commit to BKPepe/openwrt-routing that referenced this pull request Aug 11, 2026
The package has been moved to the openwrt/packages feed, as
discussed in openwrt#184.

See openwrt/packages#30167.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants