alfred: clean up Makefile - #1192
Merged
Merged
Conversation
BKPepe
force-pushed
the
alfred-makefile-cleanup
branch
from
August 6, 2026 08:02
316a7e7 to
b2b255a
Compare
Contributor
|
@BKPepe I think we had that before. @simonwunderlich is the maintainer. And i can't merge anything here. |
- Install binaries with INSTALL_BIN instead of `cp -fpR`, which is the standard way to install executables with defined permissions. - Replace the `[ "x$(CONFIG_...)" == "xy" ] && ... ; true` shell constructs with make-level $(if ...) conditionals. The `==` operator is a bashism and the shell round-trip is not needed to decide at install time whether an optional file is packaged. - Drop the explicit dependency on libc, which every package depends on implicitly. - List the optionally installed /etc/alfred/bat-hosts.lua in conffiles, so local modifications survive upgrades. - Indent MAKE_FLAGS consistently with tabs. Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
BKPepe
force-pushed
the
alfred-makefile-cleanup
branch
from
August 6, 2026 11:57
b2b255a to
7bf37fb
Compare
get_interface_address() calls io.open() and dereferences the result without checking it. /sys/class/net does not contain interfaces only: with the bonding module loaded it also holds the plain file bonding_masters, which the `ls -1` in get_interfaces_names() returns and which has no address below it. io.open() then returns nil and the script dies with "attempt to index a nil value", so no bat-hosts data is published at all on such a node. Return nil when the file cannot be opened and skip those entries in the caller, which would otherwise index the interface table with nil. get_hostname() gets the same guard. Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
Cleanup towards moving the package to openwrt/packages (#184):
cp -fpR.[ "x$(CONFIG_...)" == "xy" ] && ... ; trueshell constructs (the==operator is a bashism) with make-level$(if ...)conditionals.No functional change in the resulting package.
Maintainer: @simonwunderlich