Issues with building a image when one package overwrites config

Hello!,

just using a recent fetch with the APK changes for OpenWrt.
most of the compilation works except two packages:

(258/304) Installing rp-pppoe-server (4.0-r1)
ERROR: rp-pppoe-server-4.0-r1: trying to overwrite etc/ppp/options owned by ppp-2.5.1-r1.

( 93/304) Installing crowdsec-firewall-bouncer (0.0.31-r2)
ERROR: crowdsec-firewall-bouncer-0.0.31-r2: trying to overwrite etc/config/crowdsec owned by crowdsec-1.6.2-r1.

these packages seem to overwrite the current configuration of the previous package, previously this worked fine without errors but now it seems it doesn't.

also i don't think either crowdsec-firewall-bouncer as rp-pppoe-server use ppp as dependency or for crowdsec-firewall-bouncer crowdsec.

but since the introduction of APK I wonder if APK is restrictive on these specific packages, maybe im just mistaken but i can't remember this error from before this change.

is there a quick way to make this work?

@aparcar @Ansuel @ynezz Have you seen this one before?

1 Like

The issue also occurs when i try to install crowdsec-firewall-bouncer on luci when crowdsec was already installed.

so it happens both on the openwrt builder but also inside the live/running image through the apk manager.

It feels wrong that configurations seem signed?

I have the same errors for several packages.

usbutils, hexedit and a 3rd I cannot recall atm (will check and replace if I get on the PC).

My observation is this happens as soon you are enable customizing busybox. This does not matter it seems.
While the links for procs-ng and coreutils are generated properly it fails for other packages.

This happens even if you do a build just enabling busybox customization and not including usbutils in this run. If you install e. g. usbutils after with "apk add usbutils" the exact same error happens.

EDIT:

(225/525) Installing hexedit (1.6-r1)
ERROR: hexedit-1.6-r1: trying to overwrite usr/bin/hexedit owned by busybox-1.36.1-r2.

(422/525) Installing lsof (4.99.3-r1)
ERROR: lsof-4.99.3-r1: trying to overwrite usr/bin/lsof owned by busybox-1.36.1-r2.

(519/525) Installing usbutils (017-r1)
ERROR: usbutils-017-r1: trying to overwrite usr/bin/lsusb owned by busybox-1.36.1-r2.

There were some fixes pushed yesterday. I'll do a build and report back if things changed.

EDIT2: Made a new build. Nothing changed. The error is still there.

What I can say is on a build just selecting architecture, customize busybox and selecting usbutils, hexdump along with some coreutils does go through. So it seems it is a specific setting/selection causing this error.

I don't know where to look into.

As a workaround packages can be installed after fw image installation:

1.) Download package to /tmp

cd /tmp
apk update
apk fetch usbutils

2.) Install with --force-overwrite

apk add --force-overwrite --allow-untrusted usbutils-017-r1.apk

Is it possible to set this force-overwrite within the package' Makefile within the install section or anywhere other?

1 Like

So, I had a bit time to tinker around and I think I've found the issue in play here. As soon I enable ccache the error is there for usbuitls, hexedit and lsof. While all coreutils and procps-ng are installed properly.

I have no clue why this is happening. Maybe another one has an explanation for this? Because this means ccache is quite useless then.

Maybe @xize could confirm it? Otherwise the diffconfig regarding busybox would be interesting.

1 Like

Thanks for pointing this out, i gonna check it :+1:, i also use ccache.

-edit-

nope unless I did something wrong here, I used:
sudo apt remove ccache

and then make -r -j6 V=s ccache won't use any host binaries inside the builder? or do i need to dirclean?

my result:

ERROR: crowdsec-firewall-bouncer-0.0.31-r2: trying to overwrite etc/config/crowdsec owned by crowdsec-1.6.2-r1.
ERROR: rp-pppoe-server-4.0-r1: trying to overwrite etc/ppp/options owned by ppp-2.5.1-r1.

and my diffconfig:

CONFIG_TARGET_mediatek=y
CONFIG_TARGET_mediatek_filogic=y
CONFIG_TARGET_mediatek_filogic_DEVICE_glinet_gl-mt6000=y
CONFIG_AIRCRACK_NG_OPENSSL=y
CONFIG_BIND_ENABLE_DOH=y
CONFIG_DEBUG=y
# CONFIG_KERNEL_BTRFS_FS_POSIX_ACL is not set
# CONFIG_KERNEL_CIFS_ACL is not set
# CONFIG_KERNEL_EXT4_FS_POSIX_ACL is not set
# CONFIG_KERNEL_EXT4_FS_SECURITY is not set
# CONFIG_KERNEL_F2FS_FS_POSIX_ACL is not set
# CONFIG_KERNEL_F2FS_FS_SECURITY is not set
# CONFIG_KERNEL_FS_POSIX_ACL is not set
# CONFIG_KERNEL_HFSPLUS_FS_POSIX_ACL is not set
# CONFIG_KERNEL_HFS_FS_POSIX_ACL is not set
# CONFIG_KERNEL_JFFS2_FS_POSIX_ACL is not set
# CONFIG_KERNEL_JFFS2_FS_SECURITY is not set
# CONFIG_KERNEL_JFS_POSIX_ACL is not set
# CONFIG_KERNEL_NET_L3_MASTER_DEV is not set
# CONFIG_KERNEL_NFS_ACL_SUPPORT is not set
# CONFIG_KERNEL_REISER_FS_POSIX_ACL is not set
# CONFIG_KERNEL_TMPFS_POSIX_ACL is not set
# CONFIG_KERNEL_UBIFS_FS_SECURITY is not set
# CONFIG_KERNEL_WERROR is not set
# CONFIG_KERNEL_XFS_POSIX_ACL is not set
CONFIG_LIBCURL_COOKIES=y
CONFIG_LIBCURL_FILE=y
CONFIG_LIBCURL_FTP=y
CONFIG_LIBCURL_HTTP=y
CONFIG_LIBCURL_MBEDTLS=y
CONFIG_LIBCURL_NGHTTP2=y
CONFIG_LIBCURL_NO_SMB="!"
CONFIG_LIBCURL_PROXY=y
CONFIG_LIBCURL_UNIX_SOCKETS=y
CONFIG_OPENSSL_ENGINE=y
CONFIG_OPENSSL_WITH_ASM=y
CONFIG_OPENSSL_WITH_CHACHA_POLY1305=y
CONFIG_OPENSSL_WITH_CMS=y
CONFIG_OPENSSL_WITH_DEPRECATED=y
CONFIG_OPENSSL_WITH_ERROR_MESSAGES=y
CONFIG_OPENSSL_WITH_IDEA=y
CONFIG_OPENSSL_WITH_MDC2=y
CONFIG_OPENSSL_WITH_PSK=y
CONFIG_OPENSSL_WITH_SEED=y
CONFIG_OPENSSL_WITH_SRP=y
CONFIG_OPENSSL_WITH_TLS13=y
CONFIG_OPENSSL_WITH_WHIRLPOOL=y
CONFIG_PACKAGE_aircrack-ng=y
CONFIG_PACKAGE_avahi-dbus-daemon=y
CONFIG_PACKAGE_avahi-utils=y
CONFIG_PACKAGE_banip=y
CONFIG_PACKAGE_bind-dig=y
CONFIG_PACKAGE_bind-libs=y
CONFIG_PACKAGE_block-mount=y
CONFIG_PACKAGE_bmon=y
CONFIG_PACKAGE_ca-certificates=y
CONFIG_PACKAGE_cgi-io=y
CONFIG_PACKAGE_confuse=y
CONFIG_PACKAGE_crowdsec=y
CONFIG_PACKAGE_crowdsec-firewall-bouncer=y
CONFIG_PACKAGE_curl=y
CONFIG_PACKAGE_dbus=y
CONFIG_PACKAGE_ddns-scripts=y
CONFIG_PACKAGE_ddns-scripts-noip=y
CONFIG_PACKAGE_ddns-scripts-services=y
# CONFIG_PACKAGE_dnsmasq is not set
CONFIG_PACKAGE_dnsmasq-full=y
CONFIG_PACKAGE_dnsmasq_full_auth=y
CONFIG_PACKAGE_dnsmasq_full_conntrack=y
CONFIG_PACKAGE_dnsmasq_full_dhcp=y
CONFIG_PACKAGE_dnsmasq_full_dhcpv6=y
CONFIG_PACKAGE_dnsmasq_full_dnssec=y
CONFIG_PACKAGE_dnsmasq_full_nftset=y
CONFIG_PACKAGE_dnsmasq_full_noid=y
CONFIG_PACKAGE_dnsmasq_full_tftp=y
CONFIG_PACKAGE_drill=y
CONFIG_PACKAGE_ebtables-nft=y
CONFIG_PACKAGE_fdisk=y
CONFIG_PACKAGE_gre=y
CONFIG_PACKAGE_ip-bridge=y
CONFIG_PACKAGE_ip-full=y
CONFIG_PACKAGE_iperf3-ssl=y
CONFIG_PACKAGE_iptables-mod-ipopt=y
CONFIG_PACKAGE_iptables-nft=y
CONFIG_PACKAGE_irqbalance=y
CONFIG_PACKAGE_jq=y
CONFIG_PACKAGE_kmod-crypto-kpp=y
CONFIG_PACKAGE_kmod-crypto-lib-chacha20=y
CONFIG_PACKAGE_kmod-crypto-lib-chacha20poly1305=y
CONFIG_PACKAGE_kmod-crypto-lib-curve25519=y
CONFIG_PACKAGE_kmod-crypto-lib-poly1305=y
CONFIG_PACKAGE_kmod-ebtables=y
CONFIG_PACKAGE_kmod-gre=y
CONFIG_PACKAGE_kmod-gre6=y
CONFIG_PACKAGE_kmod-ifb=y
CONFIG_PACKAGE_kmod-ip6-tunnel=y
CONFIG_PACKAGE_kmod-ipt-core=y
CONFIG_PACKAGE_kmod-ipt-ipopt=y
CONFIG_PACKAGE_kmod-iptunnel=y
CONFIG_PACKAGE_kmod-iptunnel6=y
CONFIG_PACKAGE_kmod-nf-conntrack-netlink=y
CONFIG_PACKAGE_kmod-nf-ipt=y
CONFIG_PACKAGE_kmod-nf-tproxy=y
CONFIG_PACKAGE_kmod-nft-bridge=y
CONFIG_PACKAGE_kmod-nft-compat=y
CONFIG_PACKAGE_kmod-nft-tproxy=y
CONFIG_PACKAGE_kmod-sched-cake=y
CONFIG_PACKAGE_kmod-sched-core=y
CONFIG_PACKAGE_kmod-udptunnel4=y
CONFIG_PACKAGE_kmod-udptunnel6=y
CONFIG_PACKAGE_kmod-vxlan=y
CONFIG_PACKAGE_kmod-wireguard=y
CONFIG_PACKAGE_libatomic=y
CONFIG_PACKAGE_libavahi-client=y
CONFIG_PACKAGE_libavahi-dbus-support=y
CONFIG_PACKAGE_libbpf=y
CONFIG_PACKAGE_libcares=y
CONFIG_PACKAGE_libcurl=y
CONFIG_PACKAGE_libdaemon=y
CONFIG_PACKAGE_libdbus=y
CONFIG_PACKAGE_libelf=y
CONFIG_PACKAGE_libev=y
CONFIG_PACKAGE_libexpat=y
CONFIG_PACKAGE_libfdisk=y
CONFIG_PACKAGE_libgdbm=y
CONFIG_PACKAGE_libgmp=y
CONFIG_PACKAGE_libiptext=y
CONFIG_PACKAGE_libiptext-nft=y
CONFIG_PACKAGE_libiptext6=y
CONFIG_PACKAGE_libldns=y
CONFIG_PACKAGE_liblua=y
CONFIG_PACKAGE_liblucihttp=y
CONFIG_PACKAGE_liblucihttp-lua=y
CONFIG_PACKAGE_liblucihttp-ucode=y
CONFIG_PACKAGE_libncurses=y
CONFIG_PACKAGE_libnetfilter-conntrack=y
CONFIG_PACKAGE_libnettle=y
CONFIG_PACKAGE_libnfnetlink=y
CONFIG_PACKAGE_libnghttp2=y
CONFIG_PACKAGE_libnl-core=y
CONFIG_PACKAGE_libnl-genl=y
CONFIG_PACKAGE_libnl-route=y
CONFIG_PACKAGE_libopenssl=y
CONFIG_PACKAGE_libopenssl-conf=y
CONFIG_PACKAGE_libpcap=y
CONFIG_PACKAGE_libpcre2=y
CONFIG_PACKAGE_libreadline=y
CONFIG_PACKAGE_librespeed-cli=y
CONFIG_PACKAGE_libsmartcols=y
CONFIG_PACKAGE_libstdcpp=y
CONFIG_PACKAGE_libubus-lua=y
CONFIG_PACKAGE_liburcu=y
# CONFIG_PACKAGE_libustream-mbedtls is not set
CONFIG_PACKAGE_libustream-openssl=y
CONFIG_PACKAGE_libuv=y
CONFIG_PACKAGE_libxtables=y
CONFIG_PACKAGE_lua=y
CONFIG_PACKAGE_luci-app-argon-config=y
CONFIG_PACKAGE_luci-app-banip=y
CONFIG_PACKAGE_luci-app-crowdsec-firewall-bouncer=y
CONFIG_PACKAGE_luci-app-ddns=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-app-irqbalance=y
CONFIG_PACKAGE_luci-app-nextdns=y
CONFIG_PACKAGE_luci-app-nlbwmon=y
CONFIG_PACKAGE_luci-app-package-manager=y
CONFIG_PACKAGE_luci-app-pbr=y
CONFIG_PACKAGE_luci-app-rp-pppoe-server=y
CONFIG_PACKAGE_luci-app-sqm=y
CONFIG_PACKAGE_luci-base=y
CONFIG_PACKAGE_luci-compat=y
CONFIG_PACKAGE_luci-lib-base=y
CONFIG_PACKAGE_luci-lib-chartjs=y
CONFIG_PACKAGE_luci-lib-ip=y
CONFIG_PACKAGE_luci-lib-jsonc=y
CONFIG_PACKAGE_luci-lib-nixio=y
CONFIG_PACKAGE_luci-lib-uqr=y
CONFIG_PACKAGE_luci-light=y
CONFIG_PACKAGE_luci-lua-runtime=y
CONFIG_PACKAGE_luci-mod-admin-full=y
CONFIG_PACKAGE_luci-mod-dashboard=y
CONFIG_PACKAGE_luci-mod-network=y
CONFIG_PACKAGE_luci-mod-status=y
CONFIG_PACKAGE_luci-mod-system=y
CONFIG_PACKAGE_luci-proto-gre=y
CONFIG_PACKAGE_luci-proto-ipv6=y
CONFIG_PACKAGE_luci-proto-ppp=y
CONFIG_PACKAGE_luci-proto-unet=y
CONFIG_PACKAGE_luci-proto-vxlan=y
CONFIG_PACKAGE_luci-proto-wireguard=y
CONFIG_PACKAGE_luci-ssl-openssl=y
CONFIG_PACKAGE_luci-theme-argon=y
CONFIG_PACKAGE_luci-theme-bootstrap=y
CONFIG_PACKAGE_nextdns=y
CONFIG_PACKAGE_nlbwmon=y
CONFIG_PACKAGE_openssl-util=y
CONFIG_PACKAGE_pbr=y
CONFIG_PACKAGE_px5g-mbedtls=y
CONFIG_PACKAGE_resolveip=y
CONFIG_PACKAGE_rp-pppoe-common=y
CONFIG_PACKAGE_rp-pppoe-server=y
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_rpcd-mod-file=y
CONFIG_PACKAGE_rpcd-mod-iwinfo=y
CONFIG_PACKAGE_rpcd-mod-luci=y
CONFIG_PACKAGE_rpcd-mod-rpcsys=y
CONFIG_PACKAGE_rpcd-mod-rrdns=y
CONFIG_PACKAGE_rpcd-mod-ucode=y
CONFIG_PACKAGE_speedtest-go=y
CONFIG_PACKAGE_sqm-scripts=y
CONFIG_PACKAGE_tc-tiny=y
CONFIG_PACKAGE_tcpdump=y
CONFIG_PACKAGE_terminfo=y
CONFIG_PACKAGE_ucode-mod-html=y
CONFIG_PACKAGE_ucode-mod-lua=y
CONFIG_PACKAGE_ucode-mod-math=y
CONFIG_PACKAGE_uhttpd=y
CONFIG_PACKAGE_uhttpd-mod-ubus=y
CONFIG_PACKAGE_unet-cli=y
CONFIG_PACKAGE_unet-dht=y
CONFIG_PACKAGE_unetd=y
CONFIG_PACKAGE_vxlan=y
CONFIG_PACKAGE_wireguard-tools=y
CONFIG_PACKAGE_xtables-nft=y
CONFIG_TARGET_ROOTFS_PARTSIZE=104
# CONFIG_USE_FS_ACL_ATTR is not set

Before I posted first time here I made a clean build from scratch and ccache was enabled within .config.
After I found out ccache could be the issue I made a clean build from scratch again removing ccache from .config directly and it works for my three packages on my side in play here.

The option is:

# CONFIG_CCACHE is not set

So it could be well required to do a clean build resp. issue a dirclean.

Do you use "Use host's toolchain" explicit within .config? I use OpenWrt tools/toolchain only. I have no advise for this configuration bc. I never used it. Isn't this option not the default? oO

strange, i did dirclean also rm -rf tmp/ still happens.

i now tried selecting the Package the OpenWrt-based Toolchain but no avail for me.

maybe i should try it on a absolute clean git clone :+1:

To use OpenWrt based toolchain you have to compile and package it first. Then you have to extract it to a new directory and point .config to your toolchain.
E. g.:

./scripts/ext-toolchain.sh --toolchain ../../tchain14/tchain/ --config qualcommax/ipq807x
CONFIG_EXTERNAL_TOOLCHAIN=y
# CONFIG_NATIVE_TOOLCHAIN is not set
CONFIG_TARGET_NAME="aarch64-openwrt-linux-musl"
CONFIG_TOOLCHAIN_PREFIX="aarch64-openwrt-linux-musl-"
CONFIG_TOOLCHAIN_ROOT="/home/pwned/nolf/openwrt/tchain14/toolchain"
# CONFIG_EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC is not set
CONFIG_EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL=y
CONFIG_EXTERNAL_GCC_VERSION="14.2.0"
CONFIG_TOOLCHAIN_LIBC="musl"
CONFIG_TOOLCHAIN_BIN_PATH="./usr/bin ./bin"
CONFIG_TOOLCHAIN_INC_PATH="./usr/include ./include/fortify ./include"
CONFIG_TOOLCHAIN_LIB_PATH="./usr/lib ./lib"
CONFIG_USE_EXTERNAL_LIBC=y

If you do a clean build without your usual .config (if you have one in place) and start from scratch it does work. I did the same and it went through. But I wanted to use my pre-config file as usual to not mess around with "make menuconfig" every time. Disabling ccache solved the issue here. Maybe it would have been enough to just delete ccache directory and let it build up again. But I will test this wihin the comming days.

1 Like