Control: tag -1 patch pending

Cyril Brulebois <k...@debian.org> (2024-12-28):
> Spotted by Steve while testing tentative Trixie Alpha 1 images: mdadm is
> broken, with a systemd-related problem.
> 
> This part of the .config script doesn't seem to work:
> 
>     # if system has root on md
>     if findmnt / 2>/dev/null | grep -qs \/dev\/md && \
>     # and system is not a container
>     ! grep -qs ':cpuset:/$' /proc/1/cgroup && \
>     # and system is not a chroot
>     [ "$(stat -c %d/%i /)" != "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ] 
> && \
>     # and systemd is not running
>     [ -z "$(pidof systemd)" ]
>     then
>             db_input high mdadm/init-system-not-systemd || true
>             db_go
>     fi
> 
> The chroot test seems inverted (compared to the intent/comment):
>  - On my laptop I'm getting this: 64770/2 == 64770/2
>  - In my sid devel schroot I'm getting: 64774/1196038 != 64770/2

I've reproduced the “mdadm shows a note that really doesn't make sense
in that context” problem, and confirmed the proposed attached patch
avoids this problem.

> I'm awaiting some feedback from the images team to see if my plan would
> work for them, but my initial reaction would be to confirm the trivial
> bugfix (if it's easy enough to test, within the installer's environment)
> then upload + fast-track mdadm into testing, before respinning images.

What I've seen doesn't exactly quite match the early report, so I'm
still waiting on some more information before a possible upload. What
I've seen locally was a successful installation of mdadm and tasksel
running as usual, but that was just with a dummy RAID0 and a single
device, so maybe there are other problems lurking in the shadows that
I haven't spotted yet.


Cheers,
-- 
Cyril Brulebois (k...@debian.org)            <https://debamax.com/>
D-I release manager -- Release team member -- Freelance Consultant
From 10113f6f7b5e66a5e35af6d90df849c104500de4 Mon Sep 17 00:00:00 2001
From: Cyril Brulebois <k...@debian.org>
Date: Sat, 28 Dec 2024 20:47:46 +0100
Subject: [PATCH] Fix chroot detection (Closes: #1091617).

This avoids displaying the systemd note when mdadm is getting installed
within d-i.
---
 debian/changelog    | 8 ++++++++
 debian/mdadm.config | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 965eeb9..358608f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+mdadm (4.3+20241202-1.1) sid; urgency=high
+
+  * Non-maintainer upload.
+  * Fix chroot detection to avoid displaying the systemd note when mdadm
+    is getting installed within d-i (Closes: #1091617).
+
+ -- Cyril Brulebois <k...@debian.org>  Sat, 28 Dec 2024 20:46:53 +0100
+
 mdadm (4.3+20241202-1) sid; urgency=medium
 
   * Uploading to sid.
diff --git a/debian/mdadm.config b/debian/mdadm.config
index 848e6b6..2bd3489 100644
--- a/debian/mdadm.config
+++ b/debian/mdadm.config
@@ -37,7 +37,7 @@ if findmnt / 2>/dev/null | grep -qs \/dev\/md && \
 # and system is not a container
 ! grep -qs ':cpuset:/$' /proc/1/cgroup && \
 # and system is not a chroot
-[ "$(stat -c %d/%i /)" != "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ] && \
+[ "$(stat -c %d/%i /)" = "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ] && \
 # and systemd is not running
 [ -z "$(pidof systemd)" ]
 then
-- 
2.39.5

Attachment: signature.asc
Description: PGP signature

Reply via email to