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

Package: eudev; Reported by: Guenther Brunthaler <gb_about_gnu@gmx.net>; dated Thu, 13 Jun 2019 22:03:02 UTC; Maintainer for eudev is (unknown).


Message received at 334@bugs.devuan.org:


Received: (at 334) by bugs.devuan.org; 13 Jun 2019 22:40:06 +0000
Subject: This might actually be a compatibility issue in the eudev code
To: 334@bugs.devuan.org
From: Guenther Brunthaler <gb_about_gnu@gmx.net>
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=3D=3D"ttyUSB*", ATTRS{bNumConfigurations}=3D=3D"*",
PROGRAM=3D"usb_modeswitch --symlink-name %p %s{idVendor} %s{idProduct}
%E{PRODUCT}", SYMLINK+=3D"%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?


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 available.


Information forwarded to devuan-bugs@lists.dyne.org, owner@bugs.devuan.org:
bug#334; Package eudev. Full text available.


Message received at submit@bugs.devuan.org:


Received: (at submit) by bugs.devuan.org; 13 Jun 2019 21:50:06 +0000
From: Guenther Brunthaler <gb_about_gnu@gmx.net>
Subject: eudev service might be using an incomplete PATH
To: submit@bugs.devuan.org
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
=2D-- /etc/udev/udev.conf.upstream        2019-06-13 23:14:29.000000000 +0=
200
+++ /etc/udev/udev.conf 2019-06-13 23:15:17.000000000 +0200
@@ -4,3 +4,5 @@
  # initramfs should be rebuilt.

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

I therefore suggest changing the line

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

into

PATH=3D/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


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 available.


Report forwarded to devuan-bugs@lists.dyne.org, owner@bugs.devuan.org:
bug#334; Package eudev. Full text available.


Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Tue, 20 Aug 2019 00:39:01 UTC