From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id mNiMBz93ZWQ8SAEASxT56A (envelope-from ) for ; Thu, 18 May 2023 02:54:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id IPRhBz93ZWRnZAAAauVa8A (envelope-from ) for ; Thu, 18 May 2023 02:54:23 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 342A43F30C for ; Thu, 18 May 2023 02:54:22 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pzRu9-0000AP-J1; Wed, 17 May 2023 20:54:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzRu8-00009G-84 for guix-patches@gnu.org; Wed, 17 May 2023 20:54:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pzRu8-00026m-0M for guix-patches@gnu.org; Wed, 17 May 2023 20:54:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pzRu7-0006i7-S8 for guix-patches@gnu.org; Wed, 17 May 2023 20:54:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63508] [PATCH v2 4/4] gnu: eudev: Have udevadm look in /etc/udev/rules.d. (Closes: #63508) Resent-From: Felix Lechner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 18 May 2023 00:54:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63508 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63508@debbugs.gnu.org Cc: Liliana Marie Prikler , Felix Lechner Received: via spool by 63508-submit@debbugs.gnu.org id=B63508.168437119125713 (code B ref 63508); Thu, 18 May 2023 00:54:03 +0000 Received: (at 63508) by debbugs.gnu.org; 18 May 2023 00:53:11 +0000 Received: from localhost ([127.0.0.1]:51504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzRtG-0006gd-P6 for submit@debbugs.gnu.org; Wed, 17 May 2023 20:53:11 -0400 Received: from sail-ipv4.us-core.com ([208.82.101.137]:57944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzRtA-0006fX-WF for 63508@debbugs.gnu.org; Wed, 17 May 2023 20:53:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=2017; bh=Fnqk/wYXfLS/fcx Qyc8JKVGWZckJcEy+rbWZL3R4B1U=; h=references:in-reply-to:date:subject: cc:to:from; d=lease-up.com; b=Qjr56EczfLaaGvWiP1+RcZJLnUznZDz9ALJicmrZ ehz0IGJ72lhVyOJQQ87S6A2ukLooTzKyrxjj1kv//kfxPuIPgA2xSN1AZcgS1Vf1pFYfKH 0V9LRFmYdozZvHNk9WkE+CNh5vEr6wErsjvuGgy6b0mb+vEd52xWS895qyaDg= Received: by sail-ipv4.us-core.com (OpenSMTPD) with ESMTPSA id e0539734 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Thu, 18 May 2023 00:53:03 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 0ac46202; Thu, 18 May 2023 00:53:03 +0000 (UTC) Date: Wed, 17 May 2023 17:52:41 -0700 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: <29b8c15130a15487142ecf2089cba2a76ee8cb6d.1684370595.git.felix.lechner@lease-up.com> References: <29b8c15130a15487142ecf2089cba2a76ee8cb6d.1684370595.git.felix.lechner@lease-up.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Felix Lechner X-ACL-Warn: , Felix Lechner via Guix-patches From: Felix Lechner via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1684371262; a=rsa-sha256; cv=none; b=Fr34Ngv8kto6rvpxH6x6fsQWIX+Fsw63PyRrIknJfHPth75fMGnqgV3d/ovjLjHPSK1wk2 fbk08wmfhllJ/D7lB2wfPsZ1llg6lsG7CA6EmwmX9j6n/+reREOqZYELgMg1OCAQ2Mj9ZC AAYY2oCIv49q5bjfsVYJo03MGnbtWJ/rDPqQS+cUsunOO1xKXUPsBlgaA4XcT4Y1Yxn3Kv mrTNmU71kC5pQZuxXwbt9wHLNjLJEdeu0PHGfdD12GOUqGMLNI3FQRMN9OcJ3zXDY1Qx/X m3DJ7Ec1+9Z5db5/kZ/ynQBsAFNWhwpLLm4T3AnqUmJN44SS3W02Yv0kdiWQQw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lease-up.com header.s=2017 header.b=Qjr56Ecz; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1684371262; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=hVxmCuI6wBYlUXdbDBPfa0AMYPS8mMXuTGP0BQoaBNc=; b=Iio76Vq1nex1B/r7Rq95aBm03Q80IyIz3gUURspoQ8dOMrynC0xY2xQK/jbyw7j/zXnCzk 7ETr8uZbEOJ6TjDACrB2pYLstN9MBh7VmqSJ8VJ7PkenpCo9V8XdUUj8xpbi7C17Yt63FJ YneZ9o7exd/a63nfcY8Si20gLBier12QiNYlmTr80xe8+2EqB+RsZMX1SN7k8frbh4jKZr WqDc6xUWYhupUkqF5VU3Bb/bLftFxG0Xejxhp4g8KnDDzwubxaDhbpf5Y4Nfnb9RkOH2YX DRHZ4rUc45djl0T4V/x63K322ccb5Hzs7yZBZAMeD8sc1dqIqtVTr/R1PuJVvw== X-Migadu-Spam-Score: -2.19 X-Spam-Score: -2.19 X-Migadu-Queue-Id: 342A43F30C X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lease-up.com header.s=2017 header.b=Qjr56Ecz; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-TUID: PH2nJM5WtTJF Note for Liliana (and not part of the commit message): Hi, I hope you are not offended by this patch. The one-line substitution here makes the custom rule work, as well. The enviroment variable you proposed is probably superior but the patch is relatively complex and the resulting flexibility may not be needed. Also, I retitled the bug to sidestep the controversy around the default for now. I was surprised by your opposition and think that should be a separate discussion. Thanks! This substitution ensures that udevadm sees the rules that are actually in effect for the declared operating system. It allows administrators to use the udev-rules-service for network interfaces. Some of Guix's customizations for udev rules appear to work as it is [1] but that is not true for network interfaces (which invoke udevadm for naming purposes). [2] The author uses this snippet to select MAC-based names for all network interfaces: (udev-rules-service 'net-name-mac (udev-rule "79-net-name-mac.rules" " SUBSYSTEM==\"net\", ACTION==\"add\", NAME=\"$env{ID_NET_NAME_MAC}\" "))) Without this commit, udevadm will consult the rules that were present at build time and were installed in the store). [1] https://lists.gnu.org/archive/html/guix-devel/2023-05/msg00195.html [2] https://lists.gnu.org/archive/html/guix-devel/2023-05/msg00192.html * gnu/packages/linux.scm (eudev): Have udevadm look in /etc/udev/rules.d. (Closes: #63508) --- gnu/packages/linux.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 7b989a466c..750016d572 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -4156,6 +4156,11 @@ (define-public eudev (list #:phases #~(modify-phases %standard-phases + (add-before 'bootstrap 'hardcode-runtime-rules-dir + (lambda _ + (use-modules (ice-9 regex)) + (substitute* "src/udev/Makefile.am" + (((regexp-quote "$(udevrulesdir)")) "/etc/udev/rules.d")))) (add-before 'bootstrap 'patch-file-names (lambda* (#:key inputs native-inputs #:allow-other-keys) (substitute* "man/make.sh" -- 2.40.1