Merge lp:~xnox/livecd-rootfs/force-resolved-stub-resolver into lp:livecd-rootfs

Proposed by Dimitri John Ledkov
Status: Rejected
Rejected by: Dimitri John Ledkov
Proposed branch: lp:~xnox/livecd-rootfs/force-resolved-stub-resolver
Merge into: lp:livecd-rootfs
Diff against target: 27 lines (+5/-1)
2 files modified
debian/changelog (+4/-0)
live-build/ubuntu-server/hooks/99-fix-resolvconf.chroot (+1/-1)
To merge this branch: bzr merge lp:~xnox/livecd-rootfs/force-resolved-stub-resolver
Reviewer Review Type Date Requested Status
Steve Langasek Needs Fixing
Review via email: mp+329358@code.launchpad.net

Description of the change

  Fix images built with empty resolv.conf. LP: #1712283
  After removing resolvconf from important, images started to build with
  /etc/resolv.conf that is a regular empty file. However, it should
  instead point at systemd-resolved stub-resolv.conf file. Thus force
  various build hooks/scripts/functions to make it so.

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Wrong path

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Actually no, systemd postinst should handle this similar to how resolv.conf does it.

Specifically, move /etc/resolv.conf out of the way to /run, and replace it with the actually desired symlink.

Revision history for this message
Steve Langasek (vorlon) wrote :

Most of the resolv.conf handling in livecd-rootfs doesn't require any knowledge of the policy of where /etc/resolv.conf should point. We should not change this. The target of /etc/resolv.conf should be set up by the systemd maintainer scripts, and livecd-rootfs should only need to manage the target on a temporary basis so that there's working dns resolution within the chroot as part of the build.

So most of these references should not be changed. And live-build/ubuntu-server/hooks/99-fix-resolvconf.chroot probably needs to be dropped completely - it should be superfluous under both resolvconf and systemd.

review: Needs Fixing
Revision history for this message
Steve Langasek (vorlon) wrote :

(And if it's *not* superfluous, we should fix *that* instead of having a hard-coded hack in livecd-rootfs.)

1496. By Dimitri John Ledkov

Update resolv.conf symlink target in include.chroot and server fixup
hook. LP: #1712283

Revision history for this message
Steve Langasek (vorlon) wrote :

These bits should be dropped rather than the target changed.

review: Needs Fixing

Unmerged revisions

1496. By Dimitri John Ledkov

Update resolv.conf symlink target in include.chroot and server fixup
hook. LP: #1712283

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2017-08-18 08:12:22 +0000
3+++ debian/changelog 2017-08-22 16:54:57 +0000
4@@ -3,6 +3,10 @@
5 [ Steve Langasek ]
6 * Set a default locale of C.UTF-8 in the cloud images.
7
8+ [ Dimitri John Ledkov ]
9+ * Update resolv.conf symlink target in include.chroot and server fixup
10+ hook. LP: #1712283
11+
12 -- Dimitri John Ledkov <xnox@ubuntu.com> Fri, 18 Aug 2017 09:11:42 +0100
13
14 livecd-rootfs (2.449) artful; urgency=medium
15
16=== modified symlink 'live-build/ubuntu-core/includes.chroot/etc/resolv.conf'
17=== target changed u'../run/resolvconf/resolv.conf' => u'../run/systemd/resolve/stub-resolv.conf'
18=== modified symlink 'live-build/ubuntu-desktop-next/includes.chroot/etc/resolv.conf'
19=== target changed u'../run/resolvconf/resolv.conf' => u'../run/systemd/resolve/stub-resolv.conf'
20=== modified file 'live-build/ubuntu-server/hooks/99-fix-resolvconf.chroot'
21--- live-build/ubuntu-server/hooks/99-fix-resolvconf.chroot 2017-03-21 00:57:45 +0000
22+++ live-build/ubuntu-server/hooks/99-fix-resolvconf.chroot 2017-08-22 16:54:57 +0000
23@@ -1,3 +1,3 @@
24 #!/bin/sh
25
26-ln -snf ../run/resolvconf/resolv.conf /etc/resolv.conf
27+ln -snf ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

Subscribers

People subscribed via source and target branches