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

collectd-dnsmasq: compiling/installing fails on latest openwrt master #810

Closed
PolynomialDivision opened this issue Jun 18, 2020 · 9 comments
Assignees
Labels

Comments

@PolynomialDivision
Copy link

PolynomialDivision commented Jun 18, 2020

I wanted to use the firmware-packages repro with current OpenWrt master.
This include does not work:

https://github.com/freifunk-berlin/firmware-packages/blob/master/addons/collectd-addons/files/collectd-dnsmasq/postinst.sh#L3

cp -fpR /home/nick/openwrt/build_dir/target-mips_24kc_musl/root-ath79 /home/nick/openwrt/build_dir/target-mips_24kc_musl/root.orig-ath79
/home/nick/openwrt/build_dir/target-mips_24kc_musl/root-ath79/tmp/collectd-dnsmasq-addon_postinst.sh: line 3: /lib/functions.sh: No such file or directory
postinst script ./usr/lib/opkg/info/collectd-dnsmasq-addon.postinst has failed with exit code 1

Could we maybe enable the issues in the firmware-packages repro? I think that would be better. :)

Edit:
This happens for every package in the make package/install part, that includes /lib/functions.sh.

@PolynomialDivision PolynomialDivision changed the title collectd-dnsmasq: compiling fails on latest openwrt master collectd-dnsmasq: compiling/installing fails on latest openwrt master Jun 18, 2020
@SvenRoederer
Copy link
Contributor

Could we maybe enable the issues in the firmware-packages repro? I think that would be better. :)

Can you open an separate issue for this? I also like the idea, but remember some others argumented against.

@SvenRoederer
Copy link
Contributor

I assume you see this problem with the imagebuilder, right?

@PolynomialDivision
Copy link
Author

PolynomialDivision commented Jun 18, 2020

I assume you see this problem with the imagebuilder, right?

Yep. Sry, I should add information how to reproduce.

Adding into Openwrt master with commit ef9cee49807a360c99abfc2bbf0ab873619d6f11

src-git freifunk https://github.com/freifunk/openwrt-packages.git
src-git freifunkberlin https://github.com/freifunk-berlin/firmware-packages.git

into feeds.conf and select the packages, e.g. collectd-dnsmasq-addon.

To see the error just do make package/install -j1 V=s

Has the berlin freifunk image builder a special openwrt install part?

I don't understand the issue, since
Installing base-files (222-r13587-ef9cee4980) to root...
should include the functions.sh part.

@SvenRoederer
Copy link
Contributor

Since some time the imagebuilder runs th postinst automatically (see relating issues: freifunk/openwrt-packages#10, openwrt/luci#1635 (comment)) and in this script we seem to have an absolute path which will run on the build-host file-system.

@PolynomialDivision
Copy link
Author

Since some time the imagebuilder runs th postinst automatically (see relating issues: freifunk/openwrt-packages#10, openwrt/luci#1635 (comment)) and in this script we seem to have an absolute path which will run on the build-host file-system.

So actually we need to find a way to disable them on build process? Or just removing like u did with policy routing?

@PolynomialDivision
Copy link
Author

PolynomialDivision commented Jun 18, 2020

We could place some condition in the script like

[ "$ACTION" = ifup ] || exit 0
. /lib/functions.sh

https://github.com/openwrt/packages/blob/master/net/chrony/files/chrony.hotplug#L19-L22

Or something like checking if the functions.sh is existing.

@SvenRoederer
Copy link
Contributor

it depends on how they are written.
When they call a uci-default script it can be dropped, when running an other specialized script it should probably only executed when running on real hardware.
For reference see freifunk-berlin/firmware-packages#199 which deals a very similar issue and has a comment to the relating OpenWrt-commit.

@PolynomialDivision
Copy link
Author

PolynomialDivision commented Jun 18, 2020

Can we maybe just add some

if [ ! -f "/lib/functions.sh" ]; then
  exit 0
fi

as workaround, so the packages compile? Just tested the compiling and it worked! :)
For me it is important that I can use the packages to test them and I'm afraid by removing post install hookes, I could break the packages. :S

I will make a PR and then u can decide if u want to merge. ;)

@SvenRoederer
Copy link
Contributor

As it's broken package (freifunk-berlin/firmware-packages#205 (comment)) I'm fine with keeping this issue open, as reminder or hint ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants