:: [devuan-dev] bug#598: eudev: regex …
Top Page
Delete this message
Reply to this message
Author: David Paul
To: Devuan Bug Tracking System
Subject: [devuan-dev] bug#598: eudev: regex in preinst script prevents installation
Package: eudev
Version: 3.2.9-9
Severity: grave
Tags: patch
Justification: renders package unusable

Dear Maintainer,

### Summary:
Please apply the attached patch to the eudev source package. A
similar change should also be made to Debian's systemd source package.

### Details:
Last week a user on the Devuan support IRC reported an inability to
upgrade eudev while attempting to perform an upgrade from ASCII to
Beowulf. After much back and forth, I was able to determine the cause
to be a regular expression in the preinst script for the eudev package.
(For the full
conversion see the IRC log beginning at
and ending at
The regex in question is responsible for verifying the presence of six
kernel system call symbols required for eudev to function.
Unfortunately, because of prefixes on the names of the symbols in
the /proc/kallsyms file, the current version of the regex fails to
identify the presence of all the needed symbols. As can be seen in the
timeline that follows, this same issue was discovered November of
2018 and the problematic regular expression was modified accordingly.
Unfortunately, when the eudev maintainer scripts were modified in
January of 2020 to more closely match those of the udev binary package
from the Debian systemd source package, the regex in the check was
inadvertently reverted to the pre-2018 problematic version. The
attached patch modifies the regex back to its fixed version.

For the sake of completeness, it should be noted that the issue
mentioned in Debian bug #552778 (see 2009-11-10 in the timeline that
follows) is left unaddressed by this patch. Given that it involves a
processor architecture no longer supported by Debian (never supported
by Devuan) and applies to an issue with a 12 year old kernel, I think
it can be safely ignored. I will nevertheless be preforming experiments
with a Power Mac G5 to determine if this issue was every resolved
merely through the use of newer kernels. If an additional patch is
required as a result of these tests I will file a separate bug report.

### Timeline (reverse chronological order):
The eudev.{init,preinst,postinst,prerm} scripts are modified to more
closely match the udev.{init,preinst,postinst,prerm} scripts in the
Debian package systemd 243-8 (see
https://salsa.debian.org/systemd-team/systemd/-/tree/debian/243-8). In
the process the regex in question in the eudev.preinst is inadvertently
reverted to the earlier problematic version.

The regex in the kernel symbol check in eudev.preinst is changed to
contain "(_+.*_)" in place of "\.?" for detecting prefixed symbol
names. This change is the result of a conversation on IRC spanning from

The eudev.preinst symlink to udev.preinst is replaced with a standard
file and udev.preinst is deleted.

eudev.preinst is added as a symlink to udev.preinst

The first commit with a debian/ directory is added to the current eudev
packaging repository. Included is a udev.preinst file. Prior early
debian packaging work is referenced in the included debian/changelog
file, but as far as I can tell that early work is not publicly
preserved, though I'd be happy to be proved wrong about that.

The explicit checks in udev.preinst and udev.postinst for linux kernel
versions >= 2.6.32, which was released in 2009, are dropped. Support
for forcing udev upgrades via /etc/udev/kernel-upgrade to kernels known
to not be compatible is also dropped. check_kernel_features() remains
in udev.preinst but is simplified.

A check is added to udev.preinst for the syscall symbol accept4,
resolving Debian bug #648325.

Checks are added to udev.preinst for the syscall symbols
open_by_handle_at, timerfd_create, and epoll_create.

Following the merging of udev into systemd upstream, debian/ files from
udev 175-7 are incorporated into the systemd source package.

The explicit kernel version incompatibilities are removed in
debian/control from the udev package stanza.

The regex in the udev preinst script is changed to also match kernel
symbols with a leading dot to address Debian bug #552778 involving a
powerpc64 system.

The check_kernel_features() function is first added to the udev.preinst
script. The function checks for the inotify_init and signalfd system
call symbols.
diff --git a/debian/eudev.preinst b/debian/eudev.preinst
index 743c8267c..339e4a150 100644
--- a/debian/eudev.preinst
+++ b/debian/eudev.preinst
@@ -18,7 +18,7 @@ check_kernel_features() {

       local needed_symbols='inotify_init signalfd accept4 open_by_handle_at timerfd_create epoll_create'
       for symbol in $needed_symbols; do
-      if ! egrep -q "^[a-fA-F0-9]+ T \.?sys_${symbol}$" /proc/kallsyms; then
+      if ! egrep -q "^[a-fA-F0-9]+ T (_+.*_)sys_${symbol}$" /proc/kallsyms; then
       cat <<END
 Since release 198, udev requires support for the following features in
 the running kernel: