[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#930528: marked as done (unblock: grml-debootstrap/0.89)



Your message dated Fri, 14 Jun 2019 16:18:00 +0000
with message-id <7f9ca59d-d786-ce4f-11f1-413639304b9c@thykier.net>
and subject line Re: Bug#930528: unblock: grml-debootstrap/0.89
has caused the Debian Bug report #930528,
regarding unblock: grml-debootstrap/0.89
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
930528: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930528
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package grml-debootstrap v0.89, which fixes two major
issues:

1) The generated /etc/network/interfaces file might contain wrong
   interface names, e.g. for virtio drivers that have properties like
   ID_NET_NAME_PATH=enp0s18 and ID_NET_NAME_SLOT=ens18. If we check
   only for ID_NET_NAME_PATH, then we end up with a network
   configuration for enp0s18, while the actual network interface name
   will be ens18 on next boot.
   This fixes #929810

2) When installing with debootstrap/mmdebstrap variants
   essential/minbase, the directory /etc/network doesn't exist yet (due
   to absense of ifupdown/netbase packages) and setting up
   /etc/network/interfaces fails.
   This fixes #930468

I just uploaded grml-debootstrap/0.89 towards unstable,
related debdiff is at the end of the mail.

Thanks for consideration!

unblock grml-debootstrap/0.89

regards
-mika-

diff -Nru grml-debootstrap-0.88/debian/changelog grml-debootstrap-0.89/debian/changelog
--- grml-debootstrap-0.88/debian/changelog	2019-03-02 11:27:00.000000000 +0100
+++ grml-debootstrap-0.89/debian/changelog	2019-06-14 14:47:02.000000000 +0200
@@ -1,3 +1,12 @@
+grml-debootstrap (0.89) unstable; urgency=medium
+
+  * [2860f13] Fix detection of predictable network interface names
+    (Closes: #929810)
+  * [7a11723] Ensure /etc/network exists before setting up
+    /etc/network/interfaces (Closes: #930468)
+
+ -- Michael Prokop <mika@grml.org>  Fri, 14 Jun 2019 14:47:02 +0200
+
 grml-debootstrap (0.88) unstable; urgency=medium

   [ Michael Prokop ]
diff -Nru grml-debootstrap-0.88/grml-debootstrap grml-debootstrap-0.89/grml-debootstrap
--- grml-debootstrap-0.88/grml-debootstrap	2019-03-02 11:27:00.000000000 +0100
+++ grml-debootstrap-0.89/grml-debootstrap	2019-06-14 14:47:02.000000000 +0200
@@ -1730,37 +1730,58 @@

   # add dhcp setting for Predictable Network Interface Names
   if [ -x /bin/udevadm ]; then
-    for interface in $(udevadm info -e | sed -n -e 's/E: ID_NET_NAME_PATH=\([^$*]\)/\1/p'); do
-      DEFAULT_INTERFACES="${DEFAULT_INTERFACES}
+    tmpfile=$(mktemp)
+    for interface in /sys/class/net/*; do
+      udevadm info --query=all --path="${interface}" > "${tmpfile}"
+      # skip virtual devices, like bridges, vboxnet,...
+      if grep -q 'P: /devices/virtual/net/' "${tmpfile}" ; then
+        continue
+      fi
+
+      # iterate over possible naming policies by precedence (see udev/net/link-config.c),
+      # use and stop on first match to have same behavior as udev's link_config_apply()
+      for property in ID_NET_NAME_FROM_DATABASE ID_NET_NAME_ONBOARD ID_NET_NAME_SLOT ID_NET_NAME_PATH ID_NET_NAME_MAC ; do
+        if grep -q "${property}" "${tmpfile}" ; then
+          interface=$(grep "${property}" "${tmpfile}" | sed -n -e "s/E: ${property}=\([^\$*]\)/\1/p")
+          DEFAULT_INTERFACES="${DEFAULT_INTERFACES}
 allow-hotplug ${interface}
 iface ${interface} inet dhcp
 "
+          break
+        fi
+      done
     done
+    rm -f "${tmpfile}"
   fi

   if [ -n "$NOINTERFACES" ] ; then
     einfo "Not installing /etc/network/interfaces as requested via --nointerfaces option" ; eend 0
   elif [ -n "$USE_DEFAULT_INTERFACES" ] ; then
     einfo "Installing default /etc/network/interfaces as requested via --defaultinterfaces options."
+    mkdir -p "${MNTPOINT}/etc/network"
     echo "$DEFAULT_INTERFACES" > "${MNTPOINT}/etc/network/interfaces"
     eend $?
   elif [ -n "$VIRTUAL" ] ; then
     einfo "Setting up Virtual Machine, installing default /etc/network/interfaces"
+    mkdir -p "${MNTPOINT}/etc/network"
     echo "$DEFAULT_INTERFACES" > "${MNTPOINT}/etc/network/interfaces"
     eend $?
   elif [ -r /etc/network/interfaces ] ; then
     einfo "Copying /etc/network/interfaces from host to target system"
+    mkdir -p "${MNTPOINT}/etc/network"
     cp $VERBOSE /etc/network/interfaces "${MNTPOINT}/etc/network/interfaces"
     eend $?
   else
     ewarn "Couldn't read /etc/network/interfaces, installing default /etc/network/interfaces"
+    mkdir -p "${MNTPOINT}/etc/network"
     echo "$DEFAULT_INTERFACES" > "${MNTPOINT}/etc/network/interfaces"
     eend $?
   fi

   # install config file providing some example entries
   if [ -r /etc/network/interfaces.examples ] && [ ! -r "$MNTPOINT/etc/network/interfaces.examples" ] ; then
-     cp /etc/network/interfaces.examples "$MNTPOINT/etc/network/interfaces.examples"
+    mkdir -p "${MNTPOINT}/etc/network"
+    cp /etc/network/interfaces.examples "$MNTPOINT/etc/network/interfaces.examples"
   fi

   if [ -n "${SSHCOPYID}" ] ; then

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
Michael Prokop:
> Package: release.debian.org
> Severity: normal
> User: release.debian.org@packages.debian.org
> Usertags: unblock
> 
> Please unblock package grml-debootstrap v0.89, which fixes two major
> issues:
> 
> 1) The generated /etc/network/interfaces file might contain wrong
>    interface names, e.g. for virtio drivers that have properties like
>    ID_NET_NAME_PATH=enp0s18 and ID_NET_NAME_SLOT=ens18. If we check
>    only for ID_NET_NAME_PATH, then we end up with a network
>    configuration for enp0s18, while the actual network interface name
>    will be ens18 on next boot.
>    This fixes #929810
> 
> 2) When installing with debootstrap/mmdebstrap variants
>    essential/minbase, the directory /etc/network doesn't exist yet (due
>    to absense of ifupdown/netbase packages) and setting up
>    /etc/network/interfaces fails.
>    This fixes #930468
> 
> I just uploaded grml-debootstrap/0.89 towards unstable,
> related debdiff is at the end of the mail.
> 
> Thanks for consideration!
> 
> unblock grml-debootstrap/0.89
> 
> regards
> -mika-
> 
> [...]

Unblocked, thanks.
~Niels

--- End Message ---

Reply to: