My problem: I want my buildroot (18.05) to always build and include "important-package" and any dependencies it requires.
- set up the buildroot
- select "important-package"
- save config
scripts/diffconfig.sh > config_seed
config_seed to version control and do
cp config_seed .config for future builds
My problem with this solution is this: say that the last time I built an image, "important-package" depended on "big-lib". That will have been captured in
config_seed too. But the package maintainer has now removed that dependency, and so this week I'm building and installing "big-lib" and all its dependencies for no reason.
I have quite a few such packages like this, and it's becoming tedious to redo the
make menuconfig step every time something changes (which is what the diffconfig method is supposed to help with). I'd rather just have a file like
config_seed that contains only the direct packages I'm interested in, ie. "important-package", and not its dependencies.
Is there a way to do this? I suppose I can create a pseudo-package that only has a
DEPENDS line and drop it in the private repository I already use, but is there a simpler way?
Usually I just edit
config_seed directly and enable only "direct packages" in there.
cp config_seed .config
It should bring in all current dependencies of those "direct packages"
I was not aware it would resolve them! That makes things much simpler.
No automatic way.
You need to manually edit the saved config_seed. Just leave the router selection plus those packages that you actually have selected, and delete all automatically pulled dependencies.
I have done that for years, and use a nice small recipe for my community builds.
Example of my R7800 master recipe (slightly old version, from April 2020, but it was copyable in a previous post here):
# Use "make defconfig" to expand this to a full .config
# Per-package build logs in <buildroot>/logs
# Debugging options (build gdbserver, include package debug)
# Include package list in build
# exfat is patented
# Longer waiting for failsafe button push
# Busybox tweaks
# Add-on programs
# USB device mount & file systems support
# IPv6 support
# IPv6 NAT support (ip6tables NAT extensions, ipt-nat6 and nf-nat6 kmods)
# WLAN/WPS support
# CONFIG_PACKAGE_wpad-basic is not set
# SSL certificates
# Luci (SSL from OpenSSL)
# Luci statistics
# QoS selection - currently SQM
# Build material and openwrt-2020 themes, default is still bootstrap
# kernel support for tunnels, VPNs
# PPTP support
# iptables add-on ipsec
# Support for IETF BCP38
# Adblock package with Luci support, initially disabled
# BanIP package with Luci support, initially disabled
# nlbwmon app
# chaoskey TRNG USB dongle
Note that you can use "/" in menuconfig to search for packages, and the package help will show you dependencies.
Typically you only need the "top-level" LuCI app for a feature, and it pulls in the actual package.