Devuan bug report logs - #598
eudev: regex in preinst script prevents installation

version graph

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

Reported by: David Paul <davidpaul@librem.one>

Date: Fri, 6 Aug 2021 02:52:01 UTC

Severity: grave

Tags: patch

Found in version 3.2.9-9

Fixed in version 3.2.9-10

Done: dak@devuan.org

Full log


🔗 View this message in rfc822 format

X-Loop: owner@bugs.devuan.org
Subject: bug#598: eudev: regex in preinst script prevents installation
Reply-To: David Paul <davidpaul@librem.one>, 598@bugs.devuan.org
Resent-From: David Paul <davidpaul@librem.one>
Resent-To: devuan-bugs@lists.dyne.org
Resent-CC: Devuan Dev Team <devuan-dev@lists.dyne.org>
X-Loop: owner@bugs.devuan.org
Resent-Date: Fri, 06 Aug 2021 02:52:01 +0000
Resent-Message-ID: <handler.598.B.16282182037675@bugs.devuan.org>
Resent-Sender: owner@bugs.devuan.org
X-Devuan-PR-Message: report 598
X-Devuan-PR-Package: eudev
X-Devuan-PR-Keywords: patch
Received: via spool by submit@bugs.devuan.org id=B.16282182037675
          (code B); Fri, 06 Aug 2021 02:52:01 +0000
Received: (at submit) by bugs.devuan.org; 6 Aug 2021 02:50:03 +0000
Delivered-To: devuanbugs@dyne.org
Received: from tupac3.dyne.org [195.169.149.119]
	by doc.devuan.org with IMAP (fetchmail-6.4.0.beta4)
	for <debbugs@localhost> (single-drop); Fri, 06 Aug 2021 02:50:03 +0000 (UTC)
Received: from mx1.librem.one (mx1.librem.one [138.201.176.89])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by vm6.ganeti.dyne.org (Postfix) with ESMTPS id D726AF60C34
	for <submit@bugs.devuan.org>; Fri,  6 Aug 2021 04:42:42 +0200 (CEST)
Received: from smtp.librem.one (unknown [192.241.214.14])
	by mx1.librem.one (Postfix) with ESMTPS id 8082C80465
	for <submit@bugs.devuan.org>; Thu,  5 Aug 2021 19:42:40 -0700 (PDT)
Date: Thu, 5 Aug 2021 21:42:36 -0500
From: David Paul <davidpaul@librem.one>
To: Devuan Bug Tracking System <submit@bugs.devuan.org>
Message-ID: <20210805214236.06b03e02@Zombmetheus.egg>
Content-Type: multipart/mixed; boundary="MP_/t/FAkk+pVJ++KDqdT+E4OhA"
X-Spam-Status: No, score=2.0 required=5.0 tests=MIME_HEADER_CTYPE_ONLY,
	SPF_PASS autolearn=disabled version=3.4.2
X-Spam-Level: *
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tupac3.dyne.org
[Message part 1 (text/plain, inline)]
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
http://reisenweber.net/irclogs/freenode/_devuan/_devuan.2021-07-27.log.html#t2021-07-27T18:25:49
and ending at
http://reisenweber.net/irclogs/freenode/_devuan/_devuan.2021-07-28.log.html#t2021-07-28T05:01:23)
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):
https://git.devuan.org/devuan/eudev/commit/243adc9487e06a928558628f5e0bf3f647c1a3c4
2020-01-08
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.

https://git.devuan.org/devuan/eudev/commit/893574a43ab9cc9779dbbc7deab591b72b92ab59
https://git.devuan.org/devuan/eudev/commit/c5e67ec148a250ab432c565ccd08a386154fc5ee
2018-11-02
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
http://reisenweber.net/irclogs/freenode/_devuan-dev/_devuan-dev.2018-11-02.log.html#t2018-11-02T16:47:03
to
http://reisenweber.net/irclogs/freenode/_devuan-dev/_devuan-dev.2018-11-02.log.html#t2018-11-02T18:49:16

https://git.devuan.org/devuan/eudev/commit/3529a42fc1c80a147ee0b6abd46e8175e5fe6bc7
2017-06-01
The eudev.preinst symlink to udev.preinst is replaced with a standard
file and udev.preinst is deleted.

https://git.devuan.org/devuan/eudev/commit/53a6f64a81a04a14a3fd44b294a3668ca483b9f4
2017-04-29
eudev.preinst is added as a symlink to udev.preinst

https://git.devuan.org/devuan/eudev/commit/8c34e95b65648801ec93959a3a8fc706d23d4abe
2017-04-22
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.

https://salsa.debian.org/systemd-team/systemd/-/commit/681aaee461212681c7efa4aed932cd93a03ec8e7
2016-02-05
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.

https://salsa.debian.org/systemd-team/systemd/-/commit/d4751047810b64f5a23c55cd04d2c7cf568dd9f5
2014-04-26
A check is added to udev.preinst for the syscall symbol accept4,
resolving Debian bug #648325.

https://salsa.debian.org/systemd-team/systemd/-/commit/aa9ec4cdf2f0e2c97cc61f295b348e17735a9fc7
2014-04-26
Checks are added to udev.preinst for the syscall symbols
open_by_handle_at, timerfd_create, and epoll_create.

https://salsa.debian.org/systemd-team/systemd/-/commit/b56f8637a1e03ac6a45af7820287159df9b506b9
2013-07-17
Following the merging of udev into systemd upstream, debian/ files from
udev 175-7 are incorporated into the systemd source package.

https://salsa.debian.org/systemd-team/systemd/-/commit/7ffbf10c801a5fa0adf60d57d634e0b7d28efb62
2013-07-17
The explicit kernel version incompatibilities are removed in
debian/control from the udev package stanza.

https://snapshot.debian.org/package/udev/147%7Egit20091109-1/
2009-11-10
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.

https://snapshot.debian.org/package/udev/146-5/
2009-10-08
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.
[eudev-preinst-fix.patch (text/x-patch, attachment)]

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 Mar 28 19:35:53 2024;