| Summary: | resolvconf incompatible with busybox flock | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Robert Berger <pokylinux> |
| Component: | core | Assignee: | Randy MacLeod <randy.macleod> |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | kai.kang, meta.mr.watcher, meta.watcher, randy.macleod, richard.purdie, tgamblin |
| Version: | 3.1.4 | ||
| Target Milestone: | Future | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Robert Berger
2020-11-14 10:19:50 UTC
I suppose it is the right fix. (In reply to comment #0) > It looks like this was introduced to /bin/resolvconf: > > git log --source -S 'flock' -- resolvconf > commit ad69ba122e69f96d10349bea82400e96ad6f0942 HEAD (tag: > ubuntu/1.79ubuntu13) > Author: Alfonso Sanchez-Beato (email Canonical) > <alfonso.sanchez-beato@canonical.com> > Date: Wed Apr 17 16:53:53 2019 +0200 > > bin/resolvconf: use flock so resolvconf can be called in parallel safely > > LP: #1825194 > > (resolvconf 1.79ubuntu13) > > ---- Hi Robert, Which branch are you working on? I didn't see this patch in master and dunfell. Regards, Kai Question of whether busybox can support the -w and we need to change config or whether we should depend on util-linux. Someone needs to invetigate. 1) resolvconf wants:
# Make sure that we do not end up with a broken resolv.conf if resolvconf
# is invoked in parallel.
LOCK_WAIT_S=10
flock -w $LOCK_WAIT_S 9
2) standard flock(1)[1] supports -w:
-w, --wait, --timeout seconds
Fail if the lock cannot be acquired within seconds.
Decimal fractional values are allowed. See the -E option
for the exit status used. The zero number of seconds is
interpreted as --nonblock.
3) busybox does not seem to support anything like that out of the box:
opt = getopt32long(argv, "^+" "sxnu" "\0" "-1", flock_longopts);
[1] https://man7.org/linux/man-pages/man1/flock.1.html
[2] https://git.busybox.net/busybox/tree/util-linux/flock.c#n16
So I would say that we
*) either need to implement -w in busybox or
*) use util-linux-flock instead -
*) or change the resolconf script in some way which does not need it.
With the latest and greatest master branch I just made a resolvconf_1.87.bbappend file and added:
RDEPENDS_${PN} = "util-linux-flock"
But now I also get:
ERROR: resolvconf-1.87-r0 do_package_qa: QA Issue: /lib/resolvconf/list-records contained in package resolvconf requires /bin/bash, but no providers found in RDEPENDS_resolvconf? [file-rdeps]
which means we also need bash:
RDEPENDS_${PN} = "util-linux-flock bash"
and the party goes on: in runtime: echo "nameserver 1.1.1.1" | resolvconf -a dummy.if readlink: invalid option -- 'm' BusyBox v1.33.0 () multi-call binary. Usage: readlink [-fnv] FILE /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf after adding this, which made it work:
RDEPENDS_${PN} = "util-linux-flock bash coreutils"
the image size of something like a core-image-minimal grew from:
IMAGESIZE = 51116 --> IMAGESIZE = 56312
4399 KiB coreutils
289 KiB libgmp10
35 KiB coreutils-stdbuf
22 KiB util-linux-flock
21 KiB libacl1
... not sure this is what we want ;)
RP?
Robert, best way to find out if RP likes the change is to send a patch to the list... Still no -w option for busybox flock Bulk move to 4.3 M3. Moved to M4. Still no -w option for busybox flock Move to 5.99 since no one is actively working on this. Apply patch then it becomes an enhancement. |