-
Notifications
You must be signed in to change notification settings - Fork 3.9k
batctl: add new package #30163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
batctl: add new package #30163
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,238 @@ | ||
| # SPDX-License-Identifier: GPL-2.0-only | ||
|
|
||
| include $(TOPDIR)/rules.mk | ||
|
|
||
| PKG_NAME:=batctl | ||
| PKG_VERSION:=2026.2 | ||
| PKG_RELEASE:=1 | ||
|
|
||
| PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | ||
| PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION) | ||
| PKG_HASH:=c1d580afb066d3165c239b67430b94c69932619c06a90b1295e828cb5081b122 | ||
|
|
||
| PKG_MAINTAINER:=Simon Wunderlich <sw@simonwunderlich.de> | ||
| PKG_LICENSE:=GPL-2.0-only ISC MIT | ||
| PKG_LICENSE_FILES:=LICENSES/preferred/GPL-2.0 LICENSES/preferred/MIT LICENSES/deprecated/ISC | ||
|
|
||
| PKG_BUILD_PARALLEL:=1 | ||
| PKG_BUILD_FLAGS:=gc-sections lto | ||
|
|
||
| include $(INCLUDE_DIR)/package.mk | ||
|
|
||
| define Package/batctl/Default | ||
| SECTION:=net | ||
| CATEGORY:=Network | ||
| SUBMENU:=Wireless | ||
| URL:=https://www.open-mesh.org/ | ||
| DEPENDS:=+libnl-tiny +libc +librt | ||
| PROVIDES:=batctl | ||
| endef | ||
|
|
||
| define Package/batctl/description | ||
| batctl is a more intuitive management utility for B.A.T.M.A.N.-Advanced. | ||
| It is an easier method for configuring batman-adv and provides some | ||
| additional tools for debugging as well. This package builds | ||
| version $(PKG_VERSION) of the user space utility. | ||
| endef | ||
|
|
||
| define Package/batctl-tiny | ||
| $(call Package/batctl/Default) | ||
| TITLE:=B.A.T.M.A.N. Advanced user space configuration tool (Minimal) | ||
| VARIANT:=tiny | ||
| ALTERNATIVES:=100:/usr/sbin/batctl:/usr/libexec/batctl-tiny | ||
| endef | ||
|
|
||
| define Package/batctl-tiny/description | ||
| $(Package/batctl/description) | ||
| Only configuration relevant subcommands are enabled. | ||
| endef | ||
|
|
||
| define Package/batctl-default | ||
| $(call Package/batctl/Default) | ||
| TITLE:=B.A.T.M.A.N. Advanced user space configuration tool (Default) | ||
| VARIANT:=default | ||
| ALTERNATIVES:=200:/usr/sbin/batctl:/usr/libexec/batctl-default | ||
| endef | ||
|
|
||
| define Package/batctl-default/description | ||
| $(Package/batctl/description) | ||
| Standard subcommands for configuration and online debugging are enabled. | ||
| endef | ||
|
|
||
| define Package/batctl-full | ||
| $(call Package/batctl/Default) | ||
| TITLE:=B.A.T.M.A.N. Advanced user space configuration tool (Full) | ||
| VARIANT:=full | ||
| ALTERNATIVES:=300:/usr/sbin/batctl:/usr/libexec/batctl-full | ||
| endef | ||
|
|
||
| define Package/batctl-full/description | ||
| $(Package/batctl/description) | ||
| Subcommands for configuration, online and offline debugging are enabled. | ||
| endef | ||
|
|
||
| MAKE_VARS += \ | ||
| LIBNL_NAME="libnl-tiny" \ | ||
| LIBNL_GENL_NAME="libnl-tiny" | ||
|
|
||
| MAKE_FLAGS += \ | ||
| REVISION="$(PKG_VERSION)-openwrt-$(PKG_RELEASE)" | ||
|
|
||
| config-n := \ | ||
| aggregation \ | ||
| ap_isolation \ | ||
| backbonetable \ | ||
| bisect_iv \ | ||
| bonding \ | ||
| bla_backbone_json \ | ||
| bla_claim_json \ | ||
| bridge_loop_avoidance \ | ||
| claimtable \ | ||
| dat_cache \ | ||
| dat_cache_json \ | ||
| distributed_arp_table \ | ||
| elp_interval \ | ||
| event \ | ||
| fragmentation \ | ||
| gateways \ | ||
| gateways_json \ | ||
| gw_mode \ | ||
| hardif_json \ | ||
| hardifs_json \ | ||
| hop_penalty \ | ||
| interface \ | ||
| isolation_mark \ | ||
| loglevel \ | ||
| mcast_flags \ | ||
| mcast_flags_json \ | ||
| mesh_json \ | ||
| multicast_fanout \ | ||
| multicast_forceflood \ | ||
| multicast_mode \ | ||
| neighbors \ | ||
| neighbors_json \ | ||
| orig_interval \ | ||
| originators \ | ||
| originators_json \ | ||
| ping \ | ||
| routing_algo \ | ||
| statistics \ | ||
| tcpdump \ | ||
| throughput_override \ | ||
| throughputmeter \ | ||
| traceroute \ | ||
| transglobal \ | ||
| translate \ | ||
| translocal \ | ||
| transtable_global_json \ | ||
| transtable_local_json \ | ||
| vlan_json \ | ||
|
|
||
| config-settings := \ | ||
| aggregation \ | ||
| ap_isolation \ | ||
| bonding \ | ||
| bridge_loop_avoidance \ | ||
| distributed_arp_table \ | ||
| elp_interval \ | ||
| fragmentation \ | ||
| gw_mode \ | ||
| hop_penalty \ | ||
| interface \ | ||
| isolation_mark \ | ||
| loglevel \ | ||
| multicast_fanout \ | ||
| multicast_forceflood \ | ||
| multicast_mode \ | ||
| orig_interval \ | ||
| routing_algo \ | ||
| throughput_override \ | ||
|
|
||
| config-tables := \ | ||
| backbonetable \ | ||
| claimtable \ | ||
| dat_cache \ | ||
| gateways \ | ||
| mcast_flags \ | ||
| neighbors \ | ||
| originators \ | ||
| statistics \ | ||
| transglobal \ | ||
| translocal \ | ||
|
|
||
| config-json := \ | ||
| bla_backbone_json \ | ||
| bla_claim_json \ | ||
| dat_cache_json \ | ||
| gateways_json \ | ||
| hardif_json \ | ||
| hardifs_json \ | ||
| mcast_flags_json \ | ||
| mesh_json \ | ||
| neighbors_json \ | ||
| originators_json \ | ||
| transtable_global_json \ | ||
| transtable_local_json \ | ||
| vlan_json \ | ||
|
|
||
| config-tools := \ | ||
| event \ | ||
| ping \ | ||
| tcpdump \ | ||
| throughputmeter \ | ||
| traceroute \ | ||
| translate \ | ||
|
|
||
| config-extratools := \ | ||
| bisect_iv \ | ||
|
|
||
| ifeq ($(BUILD_VARIANT),tiny) | ||
|
|
||
| config-y := \ | ||
| $(config-settings) \ | ||
|
|
||
| endif | ||
|
|
||
| ifeq ($(BUILD_VARIANT),default) | ||
|
|
||
| config-y := \ | ||
| $(config-settings) \ | ||
| $(config-tables) \ | ||
| $(config-json) \ | ||
| $(config-tools) \ | ||
|
|
||
| endif | ||
|
|
||
| ifeq ($(BUILD_VARIANT),full) | ||
|
|
||
| config-y := \ | ||
| $(config-settings) \ | ||
| $(config-tables) \ | ||
| $(config-json) \ | ||
| $(config-tools) \ | ||
| $(config-extratools) \ | ||
|
|
||
| endif | ||
|
|
||
| MAKE_FLAGS += \ | ||
| $(patsubst %,CONFIG_%=n,$(config-n)) \ | ||
| $(patsubst %,CONFIG_%=y,$(config-y)) | ||
|
Comment on lines
+217
to
+219
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: the PR body still says "The content matches the current routing feed master", but this hunk (49784c1) and the (The refactor itself checks out: I expanded the old Generated by Claude Code |
||
|
|
||
| define Package/batctl-tiny/install | ||
| $(INSTALL_DIR) $(1)/usr/libexec | ||
| $(INSTALL_BIN) $(PKG_BUILD_DIR)/batctl $(1)/usr/libexec/batctl-tiny | ||
| endef | ||
|
|
||
| define Package/batctl-default/install | ||
| $(INSTALL_DIR) $(1)/usr/libexec | ||
| $(INSTALL_BIN) $(PKG_BUILD_DIR)/batctl $(1)/usr/libexec/batctl-default | ||
| endef | ||
|
|
||
| define Package/batctl-full/install | ||
| $(INSTALL_DIR) $(1)/usr/libexec | ||
| $(INSTALL_BIN) $(PKG_BUILD_DIR)/batctl $(1)/usr/libexec/batctl-full | ||
| endef | ||
|
|
||
| $(eval $(call BuildPackage,batctl-default)) | ||
| $(eval $(call BuildPackage,batctl-tiny)) | ||
| $(eval $(call BuildPackage,batctl-full)) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only content change since my last review (
f79a31a), and it went in as an amend to the initial "move from the routing feed" commit rather than as a fifth commit on top of it.On the placement itself: in-tree,
Wirelesscollects radio/PHY-level tooling —net/wavemon/Makefile:32, plus aircrack-ng, hcxtools, hcxdumptool, pixiewps, reaver, dawn, wifischedule. Routing daemons go underRouting and Redirection—net/frr/Makefile:75,net/yggdrasil/Makefile:33, smcroute, bfdd, mwan3. batctl configures and debugs batman-adv, a layer-2 mesh routing protocol that runs over any interface including wired ones, soRouting and Redirectionreads like the closer fit to me.Is
Wirelessdeliberate — e.g. to keep batctl next to where kmod-batman-adv is expected to land when the rest of the routing feed moves across? If so it's worth a line in the commit message, since nothing in the diff explains the choice.Generated by Claude Code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going to mention that as well, I run batman-adv over both wireless and wired links. I wouldn't necessarily go to look for it under the wireless submenu.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simonwunderlich What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fwiw, if you want to move batctl and alfred into a submenu, Routing and Redirection seems more appropriate to me. It has survived for a long time in the general Network menu, so it would be reasonable to leave it there too, imo. batman-adv has always been a bit weird from a user perspective because the basic support comes from a kernel module which lives in a different menu altogether, "Kernel modules" / "Network support".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DamisDorgon
batctl and alfred are without doubt mesh orientated, but I don't see how they fit into Routing and Redirection.
There are mesh packages scattered all over, a submenu indicating "Mesh" to bring them all together makes a lot of sense, at least in my opinion.
Although a new SECTION would be more useful as it would be searchable by the apk package manager...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^^ potentially searchable by apk package manager....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BKPepe I'm indifferent to this. Yes, batman-adv/alfred/batctl can be used over wired links - and some people do that, e.g. Freifunk communities also use Ethernet and L2-VPNs with batman-adv on top. Practically, though, batman-adv is pretty much always used on top of wireless routers for wireless applications (I've seen some niche counter examples though). Technically, it's mostly independent of the wireless stack, practically it's typically used together. I'm used to having it in the network menu (where it was for years), but wireless would be okay too. Routing/Redirection is something I read as layer 3, while batman-adv is layer 2 only, so I'd lean more to wireless if you want to move it at all.