From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 19 Feb 2026 05:53:43 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-qt1-f189.google.com (mail-qt1-f189.google.com [209.85.160.189]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 61J4rffJ028976 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 19 Feb 2026 05:53:42 +0100 Received: by mail-qt1-f189.google.com with SMTP id d75a77b69052e-506b839cafasf6205741cf.3 for ; Wed, 18 Feb 2026 20:53:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1771476816; x=1772081616; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=x7VwlugjnBTMliIuspEOqkp+cr7h6un68+GQjXRK+W8=; b=FWW0h7PRFsrf2iCU+40oQ/zuhBQugL8z8gCnT5eF8fibFx7A1hBn04Gp+JQBDcVdZC an5UFkDSS5rlgQ5HvhX/ekx9acUcsp9XfyEcxLHkeR/eyXYy/+uIUSUzpx116w1ObPei rRYhXNT2HrYzFsAgijW+uxBKzOXOPv0W6mu3NvxkRNpQoZFVSv52Fai3MCZRXjBTTT9u acevyDC+BxHgQcNEz9A3DimdfC6rt0k4CO4VREhtkB2hxcOadg4wW4YuRvqFHqlly3g/ Wux1T0bwdbDKSbQtU3S0tBPZDt3XvE57OouW1R4ZUbW33GHcEnuKIqsu+4YI439pGIwa g4nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771476816; x=1772081616; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-beenthere:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x7VwlugjnBTMliIuspEOqkp+cr7h6un68+GQjXRK+W8=; b=FCt5+D7D0nq5JcAXmjIbIE4qi/lqwMlxO+NtrJhXIePP0z/PL+WIjH1zJ+MOAhlPf5 mtRL6ZNn+q7nmB3jkBKsAAGJf6bYrxV+FbT8tznX5K0U4JJ84AW/Tz1xkVEQXpuUBoen Qsk1AbpFpUu2GRWTLnsEVZWnZfI+qrNXeGbYhFy+lJyJdKtUJwiF0Y08pGd34wtcTwpQ LgNMDJ94lMWoENAebQhw0RMu+NimGjh6FNNa31/LsbOdWy6DIDG3JIH20Ay+j0siJ7Uw sXmROUXFxA9FQawkzSVN6VXXPPhcvYG6apo7uqXksZ940q+joDWvWqDZmP7nyGf1dbl2 fAdQ== X-Forwarded-Encrypted: i=1; AJvYcCUXJJ8HKwBB4V7AKuw2U1SswAkPX0mhUx6tTPGKvpKNk4ywkSA52ev1CuIPQM/i5+g73lwb@ilbers.de X-Gm-Message-State: AOJu0YxBE3jSOV+OLU39gXOOoxr22Jq/pOgvA3cXE/OohxEdYyeeI6k1 jjxmOk6/4nrMMsW1MEMSEGusIr6c+53ofm/BQGHvv07vNl+b4VDKxu0j X-Received: by 2002:a05:622a:11d4:b0:506:a22b:fe58 with SMTP id d75a77b69052e-506e92094a9mr47494431cf.53.1771476815552; Wed, 18 Feb 2026 20:53:35 -0800 (PST) X-BeenThere: isar-users@googlegroups.com; h="AV1CL+H5sdzdFeHrDIb0XnXq11ude8zqW2BoFwnCQd8yidGNgQ==" Received: by 2002:ac8:5748:0:b0:506:a8ed:8f69 with SMTP id d75a77b69052e-506a8ed90cals107487081cf.1.-pod-prod-03-us; Wed, 18 Feb 2026 20:53:34 -0800 (PST) X-Received: by 2002:a05:620a:1a20:b0:8ca:2baa:76e with SMTP id af79cd13be357-8cb4084a834mr2214761785a.19.1771476814488; Wed, 18 Feb 2026 20:53:34 -0800 (PST) Date: Wed, 18 Feb 2026 20:53:32 -0800 (PST) From: "'Badrikesh Prusty' via isar-users" To: isar-users Message-Id: In-Reply-To: References: <20260113144832.3231870-1-badrikesh.prusty@siemens.com> <20260113144832.3231870-2-badrikesh.prusty@siemens.com> <04627060deedab9bb4b88a4b066027ae78f89cc8.camel@siemens.com> Subject: Re: [PATCH v2 2/2] image: make populate-systemd-preset opt-in MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_198488_224091895.1771476812578" X-Original-Sender: badrikesh.prusty@siemens.com X-Original-From: Badrikesh Prusty Reply-To: Badrikesh Prusty Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: oI/bQ7HTnL1Y ------=_Part_198488_224091895.1771476812578 Content-Type: multipart/alternative; boundary="----=_Part_198489_1815694373.1771476812578" ------=_Part_198489_1815694373.1771476812578 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Yes, on Debian Bookworm we are also seeing a similar issue: if these services are masked during the rootfs_install task,=20 populate-systemd-preset fails. On Debian Trixie, it continues without error. I created a v3 patch to=20 ignore preset failures only, rather than making populate-systemd-preset optional, since this=20 appears to be the correct default behavior for now. Link to the updated patch: [PATCH v3 0/1] image-postproc: ignore systemd preset failures=20 Many thanks, Badrikesh On Wednesday, February 18, 2026 at 11:35:17=E2=80=AFPM UTC+5:30 Gokhan Ceti= n wrote: > Hi, > > I've not investigated the root cause yet but I might have a concrete=20 > example for the mentioned issue: > I have a recipe which has following masks at postinst to disable sleep=20 > states on the target: > > systemctl mask \ > ctrl-alt-del.target \ > hibernate.target \ > hybrid-sleep.target \ > sleep.target \ > suspend-then-hibernate.target \ > suspend.target > > At Debian Bookworm, build ends up with "Failed to preset unit, unit=20 > /etc/systemd/system/sleep.target is masked.", until =20 > "populate-systemd-preset" is opt-out. > But I don't have any issue at Debian Trixie. Not sure if this might be a= =20 > clue. > > Best, > Gokhan > > On Wednesday, January 14, 2026 at 12:46:44=E2=80=AFPM UTC+3 Heinisch, Ale= xander=20 > wrote: > >> On Tue, 2026-01-13 at 09:48 -0500, Badrikesh Prusty wrote:=20 >> > Disable running populate-systemd-preset at build time by default.=20 >> > Although systemd runs enable-only presets at first boot, running this= =20 >> > step during image creation changes the enabled state of units before= =20 >> > systemd=E2=80=99s first-boot logic runs, =20 >> Why is this a problem? The reasons why to have services prepopulated=20 >> are listed here [1].=20 >> >> > ignores disable rules, and can cause=20 >> ...as is the case with current systemd=20 >> >> > some services to fail during runtime.=20 >> >> What's the difference compared to enabling on first-boot?=20 >> >=20 >> > Downstream users can opt in when preset population is required.=20 >> >> Imo, having the pre population enabled seems to me a propper default.=20 >> If downstream has issues with the prepopulation, for some reason (maybe= =20 >> you can clarify based on concrete cases) then you always can opt-out=20 >> via: ROOTFS_FEATURES:remove =3D "populate-systemd-preset"=20 >> >> Initially your V1 was about not only enabling but also disabling=20 >> services in the postprocessing. What caused the change to neither=20 >> populate enabled nor disabled units? As above, maybe a concrete example= =20 >> helps to understand your requirements.=20 >> >> BR Alexander=20 >> >> 1:=20 >> >> https://github.com/ilbers/isar/blob/master/RECIPE-API-CHANGELOG.md#popul= ate-systemd-units-based-on-presets-during-image-postprocessing=20 >> >> >=20 >> > Opt-in:=20 >> > ROOTFS_FEATURES:append =3D " populate-systemd-preset"=20 >> >=20 >> > Signed-off-by: Badrikesh Prusty =20 >> > ---=20 >> > RECIPE-API-CHANGELOG.md | 14 ++++++++++++++=20 >> > meta/classes-recipe/image.bbclass | 1 -=20 >> > 2 files changed, 14 insertions(+), 1 deletion(-)=20 >> >=20 >> > diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md=20 >> > index 0bad8a44..46c8c905 100644=20 >> > --- a/RECIPE-API-CHANGELOG.md=20 >> > +++ b/RECIPE-API-CHANGELOG.md=20 >> > @@ -962,3 +962,17 @@ INSTALLER_UNATTENDED_ABORT_ENABLE =3D "1"=20 >> > # Optional: set countdown timeout in seconds (default 5)=20 >> > INSTALLER_UNATTENDED_ABORT_TIMEOUT =3D "5"=20 >> > ```=20 >> > +=20 >> > +### Make populate-systemd-preset opt-in=20 >> > +=20 >> > +Running populate-systemd-preset at build time is disabled by=20 >> > default.=20 >> > +Although systemd runs enable-only presets by default at first boot,= =20 >> > +running this step at build time changes the enabled state of units=20 >> > +before systemd=E2=80=99s first-boot logic runs, ignores disable rules= , and=20 >> > +can cause some services to fail during runtime.=20 >> > +=20 >> > +Downstream users can explicitly enable this feature when preset=20 >> > +population is required during image creation.=20 >> > +=20 >> > +Opt-in:=20 >> > + ROOTFS_FEATURES:append =3D " populate-systemd-preset"=20 >> > diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-=20 >> > recipe/image.bbclass=20 >> > index e605bc80..47ed068d 100644=20 >> > --- a/meta/classes-recipe/image.bbclass=20 >> > +++ b/meta/classes-recipe/image.bbclass=20 >> > @@ -101,7 +101,6 @@ ROOTFS_FEATURES +=3D "\=20 >> > export-dpkg-status \=20 >> > clean-log-files \=20 >> > clean-debconf-cache \=20 >> > - populate-systemd-preset \=20 >> > generate-sbom \=20 >> > "=20 >> > ROOTFS_PACKAGES +=3D "${IMAGE_PREINSTALL}=20 >> > ${@isar_multiarch_packages('IMAGE_INSTALL', d)}"=20 >> >> --=20 >> Alexander Heinisch=20 >> Siemens AG=20 >> www.siemens.com=20 >> > --=20 You received this message because you are subscribed to the Google Groups "= isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/= c44316df-b7c1-4fe7-ab8f-c46f6d140777n%40googlegroups.com. ------=_Part_198489_1815694373.1771476812578 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi,

Yes, on Debian Bookworm we are also seeing a simil= ar issue:
if these services are masked during the rootfs_install = task, populate-systemd-preset fails.

On Debian T= rixie, it continues without error. I created a v3 patch to ignore preset fa= ilures
only, rather than making populate-systemd-preset optional,= since this appears to be the
correct default behavior for now. L= ink to the updated patch:

Many thanks,
Badrikes= h
On= Wednesday, February 18, 2026 at 11:35:17=E2=80=AFPM UTC+5:30 Gokhan Cetin = wrote:
Hi,
I've not investigated the root cause yet but I might have a concre= te example for the mentioned issue:
I have a recipe which has following = masks at postinst to disable sleep states on the target:

systemctl m= ask \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ctrl-alt-del.target \
=C2=A0 =C2=A0= =C2=A0 =C2=A0 hibernate.target \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 hybrid-sle= ep.target \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 sleep.target \
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 suspend-then-hibernate.target \
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 suspend.target

At Debian Bookworm, build ends up with "Fail= ed to preset unit, unit /etc/systemd/system/sleep.target is masked.", = until=C2=A0 "populate-systemd-preset" is opt-out.
But I don't have any= issue at Debian Trixie. Not sure if this might be a clue.

Best,
= Gokhan

On Wednesday, January 14, 2026 at 12:46:44=E2=80=AFPM UTC+3 Heinisch, = Alexander wrote:
On Tu= e, 2026-01-13 at 09:48 -0500, Badrikesh Prusty wrote:
> Disable running populate-systemd-preset at build time by default.
> Although systemd runs enable-only presets at first boot, running t= his
> step during image creation changes the enabled state of units befo= re
> systemd=E2=80=99s first-boot logic runs,=C2=A0
Why is this a problem? The reasons why to have services prepopulated
are listed here [1].

> ignores disable rules, and can cause
...as is the case with current systemd

> some services to fail during runtime.

What's the difference compared to enabling on first-boot?
>=20
> Downstream users can opt in when preset population is required.

Imo, having the pre population enabled seems to me a propper default.
If downstream has issues with the prepopulation, for some reason (maybe
you can clarify based on concrete cases) then you always can opt-out
via: ROOTFS_FEATURES:remove =3D "populate-systemd-preset"

Initially your V1 was about not only enabling but also disabling
services in the postprocessing. What caused the change to neither
populate enabled nor disabled units? As above, maybe a concrete example
helps to understand your requirements.

BR Alexander

1:
https://github.com/ilbers/isar/blob/master/RECIPE= -API-CHANGELOG.md#populate-systemd-units-based-on-presets-during-image-post= processing

>=20
> Opt-in:
> =C2=A0 ROOTFS_FEATURES:append =3D " populate-systemd-preset&q= uot;
>=20
> Signed-off-by: Badrikesh Prusty <badrikes..= .@siemens.com>
> ---
> =C2=A0RECIPE-API-CHANGELOG.md=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 | 14 ++++++++++++++
> =C2=A0meta/classes-recipe/image.bbclass |=C2=A0 1 -
> =C2=A02 files changed, 14 insertions(+), 1 deletion(-)
>=20
> diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
> index 0bad8a44..46c8c905 100644
> --- a/RECIPE-API-CHANGELOG.md
> +++ b/RECIPE-API-CHANGELOG.md
> @@ -962,3 +962,17 @@ INSTALLER_UNATTENDED_ABORT_ENABLE =3D "1= "
> =C2=A0# Optional: set countdown timeout in seconds (default 5)
> =C2=A0INSTALLER_UNATTENDED_ABORT_TIMEOUT =3D "5"
> =C2=A0```
> +
> +### Make populate-systemd-preset opt-in
> +
> +Running populate-systemd-preset at build time is disabled by
> default.
> +Although systemd runs enable-only presets by default at first boo= t,
> +running this step at build time changes the enabled state of unit= s
> +before systemd=E2=80=99s first-boot logic runs, ignores disable r= ules, and
> +can cause some services to fail during runtime.
> +
> +Downstream users can explicitly enable this feature when preset
> +population is required during image creation.
> +
> +Opt-in:
> +=C2=A0 ROOTFS_FEATURES:append =3D " populate-systemd-preset&= quot;
> diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-
> recipe/image.bbclass
> index e605bc80..47ed068d 100644
> --- a/meta/classes-recipe/image.bbclass
> +++ b/meta/classes-recipe/image.bbclass
> @@ -101,7 +101,6 @@ ROOTFS_FEATURES +=3D "\
> =C2=A0=C2=A0=C2=A0=C2=A0 export-dpkg-status \
> =C2=A0=C2=A0=C2=A0=C2=A0 clean-log-files \
> =C2=A0=C2=A0=C2=A0=C2=A0 clean-debconf-cache \
> -=C2=A0=C2=A0=C2=A0 populate-systemd-preset \
> =C2=A0=C2=A0=C2=A0=C2=A0 generate-sbom \
> =C2=A0=C2=A0=C2=A0=C2=A0 "
> =C2=A0ROOTFS_PACKAGES +=3D "${IMAGE_PREINSTALL}
> ${@isar_multiarch_packages('IMAGE_INSTALL', d)}"

--=20
Alexander Heinisch
Siemens AG
www.siemens.com

--
You received this message because you are subscribed to the Google Groups &= quot;isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-use= rs+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-use= rs/c44316df-b7c1-4fe7-ab8f-c46f6d140777n%40googlegroups.com.
------=_Part_198489_1815694373.1771476812578-- ------=_Part_198488_224091895.1771476812578--