Package: libguestfs Version: 1:1.40.2-2 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu eoan ubuntu-patch
Dear Maintainer, When /etc/dhcp/dhclient-enter-hooks.d/resolved hook is present in the supermin appliance the network fails to be configured because this hook tries to restart a systemd serive and systemd is not used inside the appliance. For more information : https://launchpad.net/bugs/1824236 In Ubuntu, the attached patch was applied to achieve the following: remove the hook so the network can be configured successfully. * d/p/appliance-Remove-etc-dhcp-dhclient-enter-hooks.d-res.patch : remove /etc/dhcp/dhclient-enter-hooks.d/resolved (LP: #1824236) Thanks for considering the patch. -- System Information: Debian Release: buster/sid APT prefers eoan APT policy: (500, 'eoan') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.0.0-13-generic (SMP w/2 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8) Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
diff -Nru libguestfs-1.40.2/debian/patches/appliance-Remove-etc-dhcp-dhclient-enter-hooks.d-res.patch libguestfs-1.40.2/debian/patches/appliance-Remove-etc-dhcp-dhclient-enter-hooks.d-res.patch --- libguestfs-1.40.2/debian/patches/appliance-Remove-etc-dhcp-dhclient-enter-hooks.d-res.patch 1970-01-01 01:00:00.000000000 +0100 +++ libguestfs-1.40.2/debian/patches/appliance-Remove-etc-dhcp-dhclient-enter-hooks.d-res.patch 2019-05-30 12:29:10.000000000 +0100 @@ -0,0 +1,32 @@ +From: "Richard W.M. Jones" <rjo...@redhat.com> +Origin: Upstream, https://github.com/libguestfs/libguestfs/commit/2bb6be333e6347d3f18856627d8ad8e50b8e5427 +Bug-Ubuntu: https://launchpad.net/bugs/1824236 +Date: Thu, 18 Apr 2019 10:53:39 +0100 +Subject: [PATCH] appliance: Remove /etc/dhcp/dhclient-enter-hooks.d/resolved. + +Workaround for Ubuntu which uses this script to try to start a systemd +service. That won't work because systemd is not used inside the +appliance. See: + +https://bugs.launchpad.net/ubuntu/+source/supermin/+bug/1824236 + +Thanks: Ioanna Alifieraki +--- + appliance/init | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +Index: libguestfs-1.40.2/appliance/init +=================================================================== +--- libguestfs-1.40.2.orig/appliance/init ++++ libguestfs-1.40.2/appliance/init +@@ -122,7 +122,9 @@ ip link set dev lo up + + if test "$guestfs_network" = 1; then + iface=$(ls -I all -I default -I lo /proc/sys/net/ipv4/conf) +- touch /etc/fstab # Workaround for Ubuntu. ++ # Two workarounds for Ubuntu: ++ touch /etc/fstab ++ rm -f /etc/dhcp/dhclient-enter-hooks.d/resolved + if dhclient --version >/dev/null 2>&1; then + dhclient $iface + else diff -Nru libguestfs-1.40.2/debian/patches/series libguestfs-1.40.2/debian/patches/series --- libguestfs-1.40.2/debian/patches/series 2019-04-22 04:45:56.000000000 +0100 +++ libguestfs-1.40.2/debian/patches/series 2019-05-30 12:12:51.000000000 +0100 @@ -13,3 +13,4 @@ 0013-Fix-up-perl-path-in-installed-scripts.patch 0014-Fix-.depend-generation-for-out-of-tree-build.patch 0015-Change-cryptsetop-cryptsetup-bin-in-appliance.patch +0016-appliance-Remove-etc-dhcp-dhclient-enter-hooks.d-res.patch