How to exclude a package listed negative in PACKAGES= section, but still presented in manifest file?

Hi guys, I'm trying to decrease the size of the final image using image builder.

make manifest PROFILE="lb-link_bl-w1200" PACKAGES="nfs-utils -kmod-crypto-sha1"

gives me this list of modules:


base-files - 1462-r18380-c46202fb34
busybox - 1.34.1-1
ca-bundle - 20211016-1
dnsmasq - 2.86-11
dropbear - 2020.81-2
firewall - 2021-08-14-40e5f6a2-1
fstools - 2021-11-16-77c02889-1
fwtool - 2019-11-12-8f7fe925-1
getrandom - 2021-08-03-205defb5-2
hostapd-common - 2021-05-22-b102f19b-60
ip6tables - 1.8.7-1
iptables - 1.8.7-1
iw - 5.16-1
iwinfo - 2021-07-11-a0a0e02d-1
jshn - 2021-11-20-cce5e351-1
jsonfilter - 2018-02-04-c7e938d6-1
kernel - 5.10.87-1-313bdc61b6c11a31f4279503b8446932
kmod-cfg80211 - 5.10.87+5.15.8-1-1
kmod-crypto-aead - 5.10.87-1
kmod-crypto-cbc - 5.10.87-1
kmod-crypto-ccm - 5.10.87-1
kmod-crypto-cmac - 5.10.87-1
kmod-crypto-ctr - 5.10.87-1
kmod-crypto-gcm - 5.10.87-1
kmod-crypto-gf128 - 5.10.87-1
kmod-crypto-ghash - 5.10.87-1
kmod-crypto-hash - 5.10.87-1
kmod-crypto-hmac - 5.10.87-1
kmod-crypto-manager - 5.10.87-1
kmod-crypto-null - 5.10.87-1
kmod-crypto-rng - 5.10.87-1
kmod-crypto-seqiv - 5.10.87-1
kmod-crypto-sha1 - 5.10.87-1
kmod-crypto-sha256 - 5.10.87-1
kmod-dax - 5.10.87-1
kmod-dm - 5.10.87-1
kmod-gpio-button-hotplug - 5.10.87-3
kmod-ip6tables - 5.10.87-1
kmod-ipt-conntrack - 5.10.87-1
kmod-ipt-core - 5.10.87-1
kmod-ipt-nat - 5.10.87-1
kmod-ipt-offload - 5.10.87-1
kmod-keys-encrypted - 5.10.87-1
kmod-keys-trusted - 5.10.87-1
kmod-leds-gpio - 5.10.87-1
kmod-lib-crc-ccitt - 5.10.87-1
kmod-mac80211 - 5.10.87+5.15.8-1-1
kmod-mt76-core - 5.10.87+2021-12-03-678071ef-4
kmod-mt76x02-common - 5.10.87+2021-12-03-678071ef-4
kmod-mt76x2 - 5.10.87+2021-12-03-678071ef-4
kmod-mt76x2-common - 5.10.87+2021-12-03-678071ef-4
kmod-nf-conntrack - 5.10.87-1
kmod-nf-conntrack6 - 5.10.87-1
kmod-nf-flow - 5.10.87-1
kmod-nf-ipt - 5.10.87-1
kmod-nf-ipt6 - 5.10.87-1
kmod-nf-nat - 5.10.87-1
kmod-nf-reject - 5.10.87-1
kmod-nf-reject6 - 5.10.87-1
kmod-nls-base - 5.10.87-1
kmod-ppp - 5.10.87-1
kmod-pppoe - 5.10.87-1
kmod-pppox - 5.10.87-1
kmod-random-core - 5.10.87-1
kmod-rt2800-lib - 5.10.87+5.15.8-1-1
kmod-rt2800-mmio - 5.10.87+5.15.8-1-1
kmod-rt2800-soc - 5.10.87+5.15.8-1-1
kmod-rt2x00-lib - 5.10.87+5.15.8-1-1
kmod-rt2x00-mmio - 5.10.87+5.15.8-1-1
kmod-slhc - 5.10.87-1
kmod-tpm - 5.10.87-1
kmod-usb-core - 5.10.87-1
kmod-usb-ehci - 5.10.87-1
kmod-usb-ohci - 5.10.87-1
kmod-usb2 - 5.10.87-1
libblkid1 - 2.37-1
libblobmsg-json20211120 - 2021-11-20-cce5e351-1
libc - 1.2.2-3
libdevmapper - 2.03.14-1
libgcc1 - 11.2.0-3
libip4tc2 - 1.8.7-1
libip6tc2 - 1.8.7-1
libiwinfo-data - 2021-07-11-a0a0e02d-1
libiwinfo20210430 - 2021-07-11-a0a0e02d-1
libjson-c5 - 0.15-2
libjson-script20211120 - 2021-11-20-cce5e351-1
libkeyutils1 - 1.6.3-1
libnl-tiny1 - 2021-11-21-8e0555fb-1
libpthread - 1.2.2-3
librt - 1.2.2-3
libtirpc - 1.3.2-1
libubox20211120 - 2021-11-20-cce5e351-1
libubus20210809 - 2021-08-09-a72457b6-2
libuci20130104 - 2021-10-22-f84f49f0-6
libuclient20201210 - 2021-05-14-6a6011df-1
libustream-wolfssl20201210 - 2020-12-10-68d09243-2
libuuid1 - 2.37-1
libwolfssl4.8.1.d8795272 - 4.8.1-stable-6
libwrap - 7.6-4
libxtables12 - 1.8.7-1
logd - 2021-08-03-205defb5-2
mtd - 26
netifd - 2021-12-02-5ca5e0b4-1
nfs-utils - 2.5.4-4
odhcp6c - 2021-12-05-39b584bc-18
odhcpd-ipv6only - 2021-08-11-01b4e604-1
openwrt-keyring - 2021-02-20-49283916-2
opkg - 2021-06-13-1bf042dd-3
ppp - 2.4.9.git-2021-01-04-3
ppp-mod-pppoe - 2.4.9.git-2021-01-04-3
procd - 2021-12-20-129d050b-1
procd-seccomp - 2021-12-20-129d050b-1
procd-ujail - 2021-12-20-129d050b-1
swconfig - 12
ubox - 2021-08-03-205defb5-2
ubus - 2021-08-09-a72457b6-2
ubusd - 2021-08-09-a72457b6-2
uci - 2021-10-22-f84f49f0-6
uclient-fetch - 2021-05-14-6a6011df-1
urandom-seed - 3
urngd - 2020-01-21-c7f7b6b6-1
usign - 2020-05-23-f1f65026-1
wireless-regdb - 2021.08.28-1
wpad-basic-wolfssl - 2021-05-22-b102f19b-60

As you can see kmod-crypto-sha1 is still in the list
How to remove it from the image?

Thank you, Dmitry

You probably have to remove the packages depending on it as well (and before kmod-crypto-sha1 itself).

2 Likes

This is a dead loop. I need nfs-utils, and, according to make menuconfig

   Symbol: PACKAGE_nfs-utils [=y]                                                                                                                                                                                                      
   Type  : tristate                                                                                                                                                                                                                    
   Defined at tmp/.config-package.in:137724                                                                                                                                                                                            
     Prompt: nfs-utils.......................... updated mount utility (includes nfs4)                                                                                                                                                 
     Location:                                                                                                                                                                                                                         
       -> Utilities                                                                                                                                                                                                                    
   (1)   -> Filesystem                                                                                                                                                                                                                 
   Selects: PACKAGE_libwrap [=y] && PACKAGE_libkeyutils [=n] && PACKAGE_libuuid [=y] && PACKAGE_libdevmapper [=n] && PACKAGE_libpthread [=y] && PACKAGE_libc [=y] && PACKAGE_libblkid [=y] && PACKAGE_libtirpc [=y] && PACKAGE_librt

it has dependency on a package libdevmapper and further down finally depends on kmod-crypto-sha1 with the same type of dependency [=n] So to remove kmod-crypto-sha1 I have to remove nfs-utils, which I need
If I build the image from source code using make menuconfig and if I select nfs-utils to be included into final image, there is no problems to remove libdevmapper and kmod-crypto-sha1 if I don't need them. How to do the same thing using image builder?

PACKAGES="nfs-utils -libdevmapper"

https://openwrt.org/docs/guide-user/additional-software/imagebuilder#selecting_packages

make manifest result is the same like before. Both libdevmapper and kmod-crypto-sha1 are in there. You can try it and see the result. It is definitely strange.

1 Like

No more ideas so far? Can't believe I'm the first one facing this problem

i can. installing nfs stuff + no devmapper + via imagebuilder is pretty bespoke (specialized/uncommon possibly even abnormal)...

most people wanting something like this would use a buildroot...


you pretty much already answered all aspects of your question in the OP

comes down to depends definitions and initial selections...
(which while not always perfect, usually exist for a reason)

you seem smart enough to work things out (or at least ask a much more targeted question)

This is a default option in a buildroot. I start to think, I could live with a buildroot if I find a way how to build an image compatible with the packages from the official repository. This link does not work all the times. Some times I have an image compatible some times not. Never know why. On the other hand side, image builder all the times produces images compatible with the official repository.

1 Like

well... if you really want to...

  1. use tar to unpack a downloaded (check ./dl/ ) nfs-utils ipk package...
  2. repack the ipk(tar.gz) after editing the DEPENDS and put into ./packages/

you may also report this on the packages repo... (after christmas)

1 Like

Thank you. This is a solution. There is a joke related to such a way:

Good guys stole the plans of the fighter from bad guys. Assembled, checked, it's a steam locomotive. Disassembled, assembled again - a steam locomotive! What to do? They stole a bad guy's specialist. The specialist takes the drawing, looks, looks agin and says: "You see in the lower right corner, in fine print: after assembly, process with a file"

It seems to me, I was born with a file in a hand.

Merry Christmas! :grinning:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.