From: bugzilla at busybox.net <bugzilla@busybox.net>
To: buildroot@busybox.net
Subject: [Buildroot] [Bug 13271] systemd-resolved: /etc/resolv.conf link broken on per-package build
Date: Thu, 25 Mar 2021 20:38:04 +0000 [thread overview]
Message-ID: <bug-13271-163-8RGkXSjChv@https.bugs.busybox.net/> (raw)
In-Reply-To: <bug-13271-163@https.bugs.busybox.net/>
https://bugs.busybox.net/show_bug.cgi?id=13271
Leo <leojrfs@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |leojrfs at gmail.com
--- Comment #1 from Leo <leojrfs@gmail.com> ---
Created attachment 8836
--> https://bugs.busybox.net/attachment.cgi?id=8836&action=edit
skeleton-init-systemd per-package workaround
I can confirm this.
This kind of issues might happen when using `per-package`.
The reason for this is that `target-finalize` rsyncs all the target
subdirectories under the package directory (example:
`$O/per-package/foo/target`) in alphabetic order:
```
$(call per-package-rsync,$(sort $(PACKAGES)),target,$(TARGET_DIR))
```
So, files in the final target, might get consecutively overwritten in that
process by the content of each package `per-package` `target` directory.
In this case, `udev` is one of the packages that overrides the `resolv.conf`,
it comes after `systemd` in the rsync order previously mentioned.
`udev` depends on `toolchain` which in turn depends on `skeleton-init-systemd`,
where `resolv.conf` is a link to `../tmp/resolv.conf`, thus,
`$O/per-package/udev/target/etc/resolv.conf` gets its value by rsyncing
`$O/per-package/toolchain/target/etc/resolv.conf` just before building.
Ideally, rsync would execute in dependency order instead of alphabetic order. I
tried to tinker around that, but had not much success. Im not sure how to solve
this problem.
In the meanwhile, I attach a patch for `skeleton-init-systemd.mk`, which solves
this specific issue. Im not sure it is the best way to solve this problem, for
the reasons I just mentioned.
Any thoughts?
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2021-03-25 20:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-13 13:53 [Buildroot] [Bug 13271] New: systemd-resolved: /etc/resolv.conf link broken on per-package build bugzilla at busybox.net
2021-03-25 20:38 ` bugzilla at busybox.net [this message]
2021-03-25 20:49 ` [Buildroot] [Bug 13271] " bugzilla at busybox.net
2021-03-27 21:11 ` bugzilla at busybox.net
2021-04-13 19:16 ` bugzilla at busybox.net
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-13271-163-8RGkXSjChv@https.bugs.busybox.net/ \
--to=bugzilla@busybox.net \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox