unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Felix Lechner via "Development of GNU Guix and the GNU System distribution." <guix-devel@gnu.org>
To: Guix Devel <guix-devel@gnu.org>
Subject: Re: Defaulting to MAC-based names for network interfaces
Date: Wed, 17 May 2023 18:14:43 -0700	[thread overview]
Message-ID: <CAFHYt54waVh_RChxk4PXJAQw0T7+gKxZAaLjOADinMF7XFdEjw@mail.gmail.com> (raw)
In-Reply-To: <ZGJF6h6yRKo7_CNq@3900XT>

Hi Efraim,

On Mon, May 15, 2023 at 7:47 AM Efraim Flashner <efraim@flashner.co.il> wrote:
>
> > the standard command to test udev setups: [2]
> >
> >   $ udevadm --debug test /sys/class/net/*
> >
> > did not find the script installed via the 'udev-service-type'.
>
> I was curious about this, since I've been using a udev rule for quite a
> while to setup zram swap. I definitely have my zram swap enabled and
> working, but 'udevadm --debug test /dev/zram0' didn't find any rule for
> zram.

Your zram probably works because your udev rule does not need a
working udevadm. I believe that network interfaces actually use
udevadm to determine their name. Either way, my latest amendments to
Bug#63508 (v2) will fix your udevadm. [1]

In a concession to Liliana's opposition, I retitled the bug to
sidestep the question of the MAC-based names as a default setting. My
position has not changed but that should probably be a separate
discussion.

Personally, I hope to win everyone's hearts with this: My fix allows
folks to experiment with MAC-based names so everyone can see their
great utility. Anyone interested, please put this in your system
services:

            (udev-rules-service 'net-name-mac
                                (udev-rule
                                 "79-net-name-mac.rules"
                                 "
SUBSYSTEM==\"net\", ACTION==\"add\", NAME=\"$env{ID_NET_NAME_MAC}\"
")))

Sorry I cannot offer substitutes. The change rebuilds more than it should.

As a side note, I looked into upgrading to eudev 3.2.12, which was
tagged yesterday, but that will bring more pain because upstream
hardcoded the path to the hwdb. [2] I have a partial fix, although
some consuming packages like upower aren't working yet.

Kind regards
Felix

[1] https://issues.guix.gnu.org/63508#12
[2] https://github.com/eudev-project/eudev/blob/2703baf55615b7554fb67c4f1c241f057f8c0a79/src/udev/udevadm-hwdb.c#L588


      reply	other threads:[~2023-05-18  1:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-14 21:52 Defaulting to MAC-based names for network interfaces Felix Lechner via Development of GNU Guix and the GNU System distribution.
2023-05-15 14:47 ` Efraim Flashner
2023-05-18  1:14   ` Felix Lechner via Development of GNU Guix and the GNU System distribution. [this message]

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFHYt54waVh_RChxk4PXJAQw0T7+gKxZAaLjOADinMF7XFdEjw@mail.gmail.com \
    --to=guix-devel@gnu.org \
    --cc=felix.lechner@lease-up.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).