From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E6B57158013 for ; Mon, 11 Dec 2023 11:55:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EAB8F2BC02D; Mon, 11 Dec 2023 11:55:16 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A22DD2BC020 for ; Mon, 11 Dec 2023 11:55:16 +0000 (UTC) Message-ID: <53b2d3e6b25681999ac68d9302818d17bdf8e4ea.camel@gentoo.org> Subject: Re: [gentoo-dev] [PATCH v2] kernel-install.eclass: fix test phase on systemd systems From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Date: Mon, 11 Dec 2023 12:55:11 +0100 In-Reply-To: <295e7517-98c4-4397-96a3-96388e81d078@gentoo.org> References: <52e0360e-965f-42e2-bb69-17de424f7d05@gentoo.org> <13496e5a0edc7613db8fb374c2943c9464eaa5bb.camel@gentoo.org> <295e7517-98c4-4397-96a3-96388e81d078@gentoo.org> Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-UZvemBRm91kE3VEzVBKz" User-Agent: Evolution 3.50.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 X-Archives-Salt: 696727d9-a0ca-48db-8362-1d7463dbad08 X-Archives-Hash: 2e757bc567c9dd4fb66918832765bef9 --=-UZvemBRm91kE3VEzVBKz Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2023-12-11 at 12:22 +0100, Andrew Ammerlaan wrote: > > > + # Initrd images with systemd require some os-release file > > > + cat <<-EOT >> "${imageroot}/etc/os-release" || die > > > + NAME=3DGentoo > > > + ID=3Dgentoo > > > + PRETTY_NAME=3D"Gentoo Linux" > > > + ANSI_COLOR=3D"1;32" > > > + HOME_URL=3D"https://www.gentoo.org/" > > > + SUPPORT_URL=3D"https://www.gentoo.org/support/" > > > + BUG_REPORT_URL=3D"https://bugs.gentoo.org/" > > > + VERSION_ID=3D"dist-kernel testing" > > > + EOT > > >=20 > >=20 > > Can't we just copy it from host? > >=20 > I guess we can, we would be assuming that the host has a valid one but= =20 > this shouldn't be a problem since at least for systemd systems you can= =20 > apparently not boot at all if it is not valid. v2: >=20 > =C2=A0From 0a22dcc93c8ba16cdb450f2443ad256e56111d6e Mon Sep 17 00:00:00 2= 001 > From: Andrew Ammerlaan > Date: Mon, 11 Dec 2023 08:36:58 +0100 > Subject: [PATCH] kernel-install.eclass: fix test phase on systemd systems >=20 > On systemd systems the dracut systemd modules are included automatically. > Systemd insists our dummy root has some valid /etc/os-release file,=20 > otherwise > it refuses the switch root operation. However, with this fix it still=20 > does not > boot up correctly on systemd systems, it gets stuck in an infinite boot= =20 > loop. > Presumably the reason has something to do with our dummy root not having= =20 > a real > systemd init to switch root to. We add the systemd dracut modules to the= =20 > omit > list to prevent the problem and ensure the test phase behaves the same on > systemd and non-systemd systems. >=20 > Signed-off-by: Andrew Ammerlaan > --- > =C2=A0=C2=A0eclass/kernel-install.eclass | 3 +++ > =C2=A0=C2=A01 file changed, 3 insertions(+) >=20 > diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass > index b4d84f3986c0d..e244f6d51a9cd 100644 > --- a/eclass/kernel-install.eclass > +++ b/eclass/kernel-install.eclass > @@ -231,6 +231,8 @@ kernel-install_create_qemu_image() { > =C2=A0=C2=A0 # some layout needed to pass dracut's usable_root() validati= on > =C2=A0=C2=A0 mkdir -p "${imageroot}"/{bin,dev,etc,lib,proc,root,sbin,sys}= || die > =C2=A0=C2=A0 touch "${imageroot}/lib/ld-fake.so" || die > + # Initrd images with systemd require some os-release file > + cp /etc/os-release "${imageroot}/etc/os-release" || die This should probably be BROOT. >=20 > =C2=A0=C2=A0 kernel-install_create_init "${imageroot}/sbin/init" >=20 > @@ -263,6 +265,7 @@ kernel-install_test() { > =C2=A0=C2=A0 plymouth # hangs, or sometimes steals output > =C2=A0=C2=A0 rngd # hangs or segfaults sometimes > =C2=A0=C2=A0 i18n # copies all the fonts from /usr/share/consolefonts > + dracut-systemd systemd systemd-initrd # gets stuck in boot loop > =C2=A0=C2=A0 ) >=20 > =C2=A0=C2=A0 # NB: if you pass a path that does not exist or is not a reg= ular >=20 >=20 --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-UZvemBRm91kE3VEzVBKz Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAmV2+J8SHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQOh5oIALBBRrSe+w9F5nqiU6WMuilquW5K4y8+ lnWOYufrHxO+l4rrLEZQuDJMdOC4eL1T/U0w8gD6RY+iFeqUC5ClIyzMJYCjt4Cx J5ZVFfx7rEYUqgcBNh6z6Gn2laEuQpagwQ7YF/Q4TF9VXTtSiT3z4Rad1G/uT353 JN15eOm5s3CoWketgQ6SJa12VvtDCKQnmpbNtb8oTZoqm24q4dO59Mt0gRg4+V+x b9WFD6a5KoubKemVfeshVcoKa0eM0PG1QOgEYZXVpEn1JlYWUYyU/lq9RJXfi6U6 9mIFOS9KMP1s2nrVeMHdp0yIwgvIaGqgANkYVwULrPEGILSGa+JiVpY= =gk5q -----END PGP SIGNATURE----- --=-UZvemBRm91kE3VEzVBKz--