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

Package: eudev; Severity: grave; Reported by: David Paul <[email protected]>; Keywords: patch; Done: [email protected]; Maintainer for eudev is Devuan Dev Team <[email protected]>.

Message received at [email protected]:


Received: (at 598) by bugs.devuan.org; 16 Nov 2021 23:10:01 +0000
Return-Path: <[email protected]>
Delivered-To: [email protected]
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); Tue, 16 Nov 2021 23:10:01 +0000 (UTC)
Received: from cacofonix.stinpriza.org (cacofonix.stinpriza.org [148.251.45.81])
	(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 3CB5BF60DC6
	for <[email protected]>; Wed, 17 Nov 2021 00:00:23 +0100 (CET)
Authentication-Results: vm6.ganeti.dyne.org;
	dkim=pass (2048-bit key; unprotected) header.d=stinpriza.org [email protected] header.b="m94qkSpa";
	dkim-atps=neutral
Received: from [192.168.0.102] (unknown [45.153.183.197])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by cacofonix.stinpriza.org (Postfix) with ESMTPSA id AD97B2B83495
	for <[email protected]>; Wed, 17 Nov 2021 01:00:20 +0200 (EET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=stinpriza.org; s=mail;
	t=1637103620; bh=vA5+m2DL9YZJfiM/nF4MVnBAY+DBrCuFQ36GAWG6BLU=;
	h=Date:To:From:Subject:From;
	b=m94qkSpaq+a503jyN2oWSyjpgz1oQprhn/TSZ5jlGBD06SBZc/MGM35n4DrJMWGzZ
	 2nGoP9Hf8ZB8lVwcD0+zjyEBdTK7pe0l5ckjqdzJVawPbQPj4Ex7xRv6DDZJLjWYo5
	 T545BTuDgqpGHzoJilTi4qwRPHBqKWPXDLhC3R9vDKftfUGGljRLcbIYZDTqh7aMZo
	 SipKtyI9GeCmws/YC0Yrd1U7THipCeMRZXOwz2zkUpHT6gzDceeWmwcfSIjhhnfRJ5
	 famVhDpsazWsTYUOQeoTw/s5gQHMqwk0beGY0n9Ygb/nxa4DGNuz6eIRLXnDLWLU1s
	 SbN+8aeVRb3Tg==
Message-ID: <[email protected]>
Date: Wed, 17 Nov 2021 01:00:19 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.3.0
To: [email protected]
Content-Language: en-US
From: Dimitris <[email protected]>
Subject: 598 followup
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.5.11 (cacofonix.stinpriza.org [0.0.0.0]); Wed, 17 Nov 2021 01:00:20 +0200 (EET)
X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
	DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,RCVD_IN_SBL_CSS,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

hey,

i know this is closed/fixed, but can the fixed version also be copied to 
beowulf/main?
fixed version 3.2.9-10~beowulf1 is only available at 
beowulf-proposed-updates/main now.

some more info available here : 
https://dev1galaxy.org/viewtopic.php?pid=32862

thanks,
d

Acknowledgement sent to Dimitris <[email protected]>:
Extra info received and forwarded to list. Copy sent to Devuan Dev Team <[email protected]>. Full text available.
Information forwarded to [email protected], Devuan Dev Team <[email protected]>:
bug#598; Package eudev. Full text available.

Message received at [email protected]:


Received: (at 598-done) by bugs.devuan.org; 5 Sep 2021 22:50:04 +0000
Return-Path: <[email protected]>
Delivered-To: [email protected]
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); Sun, 05 Sep 2021 22:50:04 +0000 (UTC)
Received: from mail.devuan.dev (mail.devuan.dev [54.36.142.182])
	by vm6.ganeti.dyne.org (Postfix) with ESMTP id 88D1AF60B71
	for <[email protected]>; Mon,  6 Sep 2021 00:45:14 +0200 (CEST)
Received: from dak.ganeti1.devuan.org (dak.devuan.org [192.168.97.90])
	by mail.devuan.dev (Postfix) with SMTP id CE5133AB505
	for <[email protected]>; Sun,  5 Sep 2021 21:29:25 +0000 (UTC)
Received: (nullmailer pid 22289 invoked by uid 107);
	Sun, 05 Sep 2021 21:29:25 -0000
From: [email protected]
To: [email protected]
Subject: #598: fixed in src:eudev version 3.2.9-10
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Date: Sun, 05 Sep 2021 21:29:25 +0000
Message-Id: <[email protected]>
X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_FAIL
	autolearn=disabled version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tupac3.dyne.org


Version: 3.2.9-10

Source package eudev (3.2.9-10) added to Devuan suite unstable.

This closes bug report 598.

Thanks

DAK managing the Devuan archive

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 04 Sep 2021 13:05:24 +0200
Source: eudev
Architecture: source
Version: 3.2.9-10
Distribution: unstable
Urgency: high
Maintainer: Devuan Dev Team <[email protected]>
Changed-By: Svante Signell <[email protected]>
Closes: 407 598 600
Changes:
 eudev (3.2.9-10) unstable; urgency=high
 .
   * debian/eudev.maintscript: Remove. Fixes build with debhelper 13.5.
   * debian/changelog: Fix indentation and long lines.
   * debian/eudev.preinst: Fix detection of needed kernel features for
     recent kernels. (Closes: #407, #598)
   * debian/control: Remove dependency on debconf.
   * debian/eudev.postrm: Remove db_purge since we no longer use debconf.
     (Closes: #600)
Checksums-Sha1:
 5ce112896d9724eaa7b38fa98987e9c7a088b4c4 2349 eudev_3.2.9-10.dsc
 7828272d2f41b7934340975d0e1c4d788780060b 62388 eudev_3.2.9-10.debian.tar.xz
 33c9448e580a35ff8d503846fc70814b36194f98 5158 eudev_3.2.9-10_source.buildinfo
Checksums-Sha256:
 6edeac63382214a78eb0ee2267021ef32617155c20aea71cbdeff22e65e20e6d 2349 eudev_3.2.9-10.dsc
 3a9198b282ae092f28a4f0766c35d8369f5ac7a2e41b48842bd2cd5a655d8838 62388 eudev_3.2.9-10.debian.tar.xz
 0f218435c089746fa805aed6eda76705c944b2081e7e51a6d7e8bd35ae104e3b 5158 eudev_3.2.9-10_source.buildinfo
Files:
 3fd2203af8cb37e2d5a2f3deffbddace 2349 admin optional eudev_3.2.9-10.dsc
 1aebdadfe119630c4aa38925e6487428 62388 admin optional eudev_3.2.9-10.debian.tar.xz
 e2621664cfd62622da0206b953c1ac27 5158 admin optional eudev_3.2.9-10_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEcuPLdzMV36LkZHQ9lFMhJFQZIvsFAmE1NJsACgkQlFMhJFQZ
Ivs69Af/TUwf4pYpmE7aF1LYzrctBqPEXhCenKB7urP9SEGjK4cMnxg+bS6C0Zty
jDzuuPOhjEjqtbNw00j4xQ8nTeaME6kCctV8yonygjM/OuzqlrknZQNW5le6H36g
k9lhi78QSkp39BIQI+OUUwuQSMPbpMG82i0JIiSKCue2JaN0pXHZeiCAubQrx0TY
jIxHrqDZOqBXGJFJkF+/ch912ssaHQ/IsrUZ1q/WKeikO9/c+q4Qo9VK13TWGBEl
DG6t4RHv2bfaodWWr2dNPEOp7g74isXU7VWXcMkobvMAgnr4Da+/XRhwjHGfndZd
XtSz//BYKdpCJMSHGAXVgbm4dQRT7w==
=jlhk
-----END PGP SIGNATURE-----

Notification sent to David Paul <[email protected]>:
bug acknowledged by developer. Full text available.
Reply sent to [email protected]:
You have taken responsibility. Full text available.

Message received at [email protected]:


Received: (at 598) by bugs.devuan.org; 6 Aug 2021 17:10:03 +0000
Return-Path: <[email protected]>
Delivered-To: [email protected]
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 17:10: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 99897F60B77
	for <[email protected]>; Fri,  6 Aug 2021 19:03:22 +0200 (CEST)
Received: from smtp.librem.one (unknown [192.241.214.14])
	by mx1.librem.one (Postfix) with ESMTPS id B29CE81674
	for <[email protected]>; Fri,  6 Aug 2021 10:03:20 -0700 (PDT)
Date: Fri, 6 Aug 2021 12:03:16 -0500
From: "David (Plasma) Paul" <[email protected]>
To: [email protected]
Subject: Corrected patch for Devuan bug #598
Message-ID: <[email protected]>
Content-Type: multipart/mixed; boundary="MP_/Ny9cnT0_HxvJAxXtu/K6ztP"
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

--MP_/Ny9cnT0_HxvJAxXtu/K6ztP
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

CORRECTION:

I just realized that the patch I submitted yesterday with the original
bug report is missing a single question mark. While the patch, as sent,
does indeed fix the issue for systems affected by it, it actually
_causes_ the issue on systems that were working fine. Oops!

The corrected patched is attached.

--MP_/Ny9cnT0_HxvJAxXtu/K6ztP
Content-Type: text/x-patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=eudev-preinst-corrected-fix.patch

diff --git a/debian/eudev.preinst b/debian/eudev.preinst
index 743c8267c..b9ebdb03c 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:

--MP_/Ny9cnT0_HxvJAxXtu/K6ztP--

Acknowledgement sent to "David (Plasma) Paul" <[email protected]>:
Extra info received and forwarded to list. Copy sent to Devuan Dev Team <[email protected]>. Full text available.
Information forwarded to [email protected], Devuan Dev Team <[email protected]>:
bug#598; Package eudev. Full text available.

Message received at [email protected]:


Received: (at submit) by bugs.devuan.org; 6 Aug 2021 02:50:03 +0000
Return-Path: <[email protected]>
Delivered-To: [email protected]
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 <[email protected]>; 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 <[email protected]>; Thu,  5 Aug 2021 19:42:40 -0700 (PDT)
Date: Thu, 5 Aug 2021 21:42:36 -0500
From: David Paul <[email protected]>
To: Devuan Bug Tracking System <[email protected]>
Subject: eudev: regex in preinst script prevents installation
Message-ID: <[email protected]>
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

--MP_/t/FAkk+pVJ++KDqdT+E4OhA
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: 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.

--MP_/t/FAkk+pVJ++KDqdT+E4OhA
Content-Type: text/x-patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=eudev-preinst-fix.patch

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:

--MP_/t/FAkk+pVJ++KDqdT+E4OhA--

Acknowledgement sent to David Paul <[email protected]>:
New bug report received and forwarded. Copy sent to Devuan Dev Team <[email protected]>. Full text available.
Report forwarded to [email protected], Devuan Dev Team <[email protected]>:
bug#598; 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 <[email protected]>.
Last modified: Thu, 28 Nov 2024 06:39:01 UTC