Devuan bug report logs - #334
eudev service might be using an incomplete PATH

Package: eudev; Maintainer for eudev is Devuan Dev Team <devuan-dev@lists.dyne.org>; Source for eudev is src:eudev.

Reported by: Guenther Brunthaler <gb_about_gnu@gmx.net>

Date: Thu, 13 Jun 2019 22:03:02 UTC

Severity: normal

Done: Svante Signell <svante.signell@gmail.com>

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to devuan-bugs@lists.dyne.org, owner@bugs.devuan.org:
bug#334; Package eudev. (full text, mbox, link).


Acknowledgement sent to Guenther Brunthaler <gb_about_gnu@gmx.net>:
New bug report received and forwarded. Copy sent to owner@bugs.devuan.org. (full text, mbox, link).


Message #5 received at submit@bugs.devuan.org (full text, mbox, reply):

From: Guenther Brunthaler <gb_about_gnu@gmx.net>
To: submit@bugs.devuan.org
Subject: eudev service might be using an incomplete PATH
Date: Thu, 13 Jun 2019 23:44:54 +0200
Package: eudev
Version: 3.2.2-13

Bug #333 is caused by an udev rule invoking the wrong executable,
because it obviously wanted to execute a script in /lib/udev but did not
specify the full path, and thus invoked a binary of the same name in
/usr/sbin which was not intended.

Assuming the udev-rule from the usb-modeswitch-data is correct and
standard, it follows that the eudev service is currently using an
inadequate PATH.

The following modification made the problem with bug #333 go away:

$ diff -u /etc/udev/udev.conf.upstream /etc/udev/udev.conf
--- /etc/udev/udev.conf.upstream        2019-06-13 23:14:29.000000000 +0200
+++ /etc/udev/udev.conf 2019-06-13 23:15:17.000000000 +0200
@@ -4,3 +4,5 @@
 # initramfs should be rebuilt.

 #udev_log="info"
+
+PATH=/lib/udev:$PATH

I therefore suggest changing the line

$ grep PATH /etc/init.d/eudev
PATH="/sbin:/bin"

into

PATH=/lib/udev:/sbin:/bin

I am using Devuan GNU/Linux 2.0 (ascii)
on branch ascii
with kernel
Linux xeeepc 4.9.0-9-686 #1 SMP Debian 4.9.168-1+deb9u2 (2019-05-13)
i686 GNU/Linux


Information forwarded to devuan-bugs@lists.dyne.org, owner@bugs.devuan.org:
bug#334; Package eudev. (full text, mbox, link).


Acknowledgement sent to Guenther Brunthaler <gb_about_gnu@gmx.net>:
Extra info received and forwarded to list. Copy sent to owner@bugs.devuan.org. (full text, mbox, link).


Message #10 received at 334@bugs.devuan.org (full text, mbox, reply):

From: Guenther Brunthaler <gb_about_gnu@gmx.net>
To: 334@bugs.devuan.org
Subject: This might actually be a compatibility issue in the eudev code
Date: Fri, 14 Jun 2019 00:39:44 +0200
I have just compared the functionality of

/lib/systemd/systemd-udevd --daemon

on Raspbian with that of

/sbin/udevd --daemon

on Devuan.

The result is that both installations of the rule file from bug #333 are
identical:

$ cksum /lib/udev/rules.d/40-usb_modeswitch.rules
194757299 40499 /lib/udev/rules.d/40-usb_modeswitch.rules

and neither does Raspbian add /lib/udev to the front of PATH, which I
verified by temporarily modifying /lib/udev/usb_modeswitch so that it
logs its PATH setting, which showed:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

You see, no /lib/udev.

Yet systemd-udevd correctly invokes /lib/udev/usb_modeswitch rather than
/usr/sbin/usb_modeswitch when the udev rule just says

$ grep symlink-name /lib/udev/rules.d/40-usb_modeswitch.rules
KERNEL=="ttyUSB*", ATTRS{bNumConfigurations}=="*",
PROGRAM="usb_modeswitch --symlink-name %p %s{idVendor} %s{idProduct}
%E{PRODUCT}", SYMLINK+="%c"

It follows, that systemd-udevd seems to use an augmented PATH for
exec'ing its PROGRAM, but does not "export" that augmented PATH to the
invoked program.

Therefore, to remain compatible with systemd-udevd, eudev should do the
same.

One might even suspect this was a subtle change deliberately introduced
by some people who wanted to make eudev look bad, but it does not really
matter and just needs to be fixed.

I suppose this is an upstream bug and not Devuan-specific, and should be
escalated to upstream.

Im I supposed to do that, or will you Devuan guys do it?


Reply sent to svante.signell@gmail.com:
You have taken responsibility. (Mon, 27 Jan 2020 11:33:19 GMT) (full text, mbox, link).


Notification sent to Guenther Brunthaler <gb_about_gnu@gmx.net>:
bug acknowledged by developer. (Mon, 27 Jan 2020 11:33:21 GMT) (full text, mbox, link).


Message #15 received at 334-close@bugs.devuan.org (full text, mbox, reply):

From: Svante Signell <svante.signell@gmail.com>
To: 334-close@bugs.devuan.org
Subject: [Devuan-bugs] bug#334: eudev service might be using an incomplete PATH
Date: Mon, 27 Jan 2020 12:32:24 +0100
Fixed by eudev-3.2.9-1, closing.




Send a report that this bug log contains spam.


Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Thu Apr 18 05:19:54 2024;