Skip to content
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

ubus-lime-utils file conflict when compiling with OpenWrt 22.03 #927

Closed
ilario opened this issue Jul 14, 2022 · 5 comments · Fixed by #950
Closed

ubus-lime-utils file conflict when compiling with OpenWrt 22.03 #927

ilario opened this issue Jul 14, 2022 · 5 comments · Fixed by #950
Assignees
Milestone

Comments

@ilario
Copy link
Member

ilario commented Jul 14, 2022

There's a file conflict when compiling on top of OpenWrt 22.03.0-rc4 between:
https://github.com/libremesh/lime-packages/blob/400ac95448a1f1d5a83496488e40c302cde766f0/packages/ubus-lime-utils/files/etc/udhcpc.user
and:
https://github.com/openwrt/openwrt/blob/130118f7aa3191a2afd244d49e3057d4c5688676/package/network/config/netifd/files/etc/udhcpc.user

This is what the error looks like:

Collected errors:
 * check_data_file_clashes: Package ubus-lime-utils wants to install file /home/ilario/software/openwrt/build_dir/target-mips_24kc_musl/root-ath79/etc/udhcpc.user
	But that file is already provided by package  * netifd
 * opkg_install_cmd: Cannot install package lime-app.
 * check_data_file_clashes: Package ubus-lime-utils wants to install file /home/ilario/software/openwrt/build_dir/target-mips_24kc_musl/root-ath79/etc/udhcpc.user
	But that file is already provided by package  * netifd
 * opkg_install_cmd: Cannot install package ubus-lime-utils.
make[2]: *** [package/Makefile:70: package/install] Error 255
@spiccinini
Copy link
Contributor

Ok! So we should install the file as part of the install step instead?

@ilario
Copy link
Member Author

ilario commented Jul 15, 2022

I think that the solution that has been used more frequebtly in this repository is the creation of a file in /etc/uci-defaults that will add the needed content at the first boot. Like this: https://github.com/libremesh/lime-packages/blob/master/packages/lime-system/files/etc/uci-defaults/92_add-lime-repos

ilario added a commit to ilario/lime-packages that referenced this issue Jul 27, 2022
ilario added a commit to ilario/lime-packages that referenced this issue Oct 26, 2022
hiurequeiroz pushed a commit to hiurequeiroz/lime-packages that referenced this issue Nov 25, 2022
@G10h4ck
Copy link
Member

G10h4ck commented Nov 28, 2022

If possible it is always better to do this kind of stuff at compile/install time, it is better on the logical side and we get the benefit of squashfs compression which won't happen doing it at runtime (uci-default) which should be considered a last resort when it is not possible to do things at cooking time.

About this particular issue I wonder if the udhcpc doesn't have something like /etc/udhcpc.user.d/ where additional scripts may be placed, especially now that the file is already provided/used by the package itself

@ilario
Copy link
Member Author

ilario commented Nov 29, 2022

You are right! The /etc/udhcpc.user.d/ directory exists. I am going to use that instead and open another PR.

@ilario
Copy link
Member Author

ilario commented Nov 29, 2022

On a side note (I am not yet going to open an issue on this as I am not sure it is a bug):
this file calls the watchping, but the watchping is NOT a dependency of ubus-lime-utils, so this results in an error.
Is this right or there should be a dependency there? @G10h4ck @spiccinini @germanferrero

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment