public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'Heinisch, Alexander' via isar-users" <isar-users@googlegroups.com>
To: "Prusty, Badrikesh" <badrikesh.prusty@siemens.com>,
	"isar-users@googlegroups.com" <isar-users@googlegroups.com>,
	"MOESSBAUER, Felix" <felix.moessbauer@siemens.com>
Subject: Re: [PATCH] image-postproc: apply all systemd preset rules and ignore failures
Date: Mon, 15 Dec 2025 11:50:30 +0000	[thread overview]
Message-ID: <a1ccb0ec87f9c4e99576744fa833650e2db2ce78.camel@siemens.com> (raw)
In-Reply-To: <c65994f597840863ecfaf791e4c262c409566b16.camel@siemens.com>

On Mon, 2025-12-15 at 07:31 +0000, Moessbauer, Felix (FT RPD CED OES-
DE) wrote:
> On Fri, 2025-12-12 at 00:32 -0500, 'Badrikesh Prusty' via isar-users
> wrote:
> > Update image postprocessing to run 'systemctl preset-all' without
> > restricting to '--preset-mode=enable-only', so that both enable and
> > disable rules from systemd preset files are applied.
> >
> > Add '|| true' to ignore failures from already masked units set by
> > package post-install scripts during rootfs_install tasks.
>
> Hi,
>
> is this change in sync regarding what Debian does during
> installation?
> Enabling additional services should be fine in general, but disabling
> bears some risk in case packages that otherwise only enable services
> via symlink in /etc get disabled again.
>

Before I introduced this postprocessing step some services got enabled
on first boot which was not reflected in the images rootfs after build.
So the idea was to align the build artifacts to what was actually
running on the system. (and by that supporting ro /usr + /etc systems)

Systemd back then (and afaik as of now) on first boot only populates
the presets with flag --enable-only.
One can change this behavior with compile time flag -Dfirst-boot-full-
preset which seems not to be the case.

Imo, disabling services during the postprocessing changes the image in
an unexpected way (as this does not happen by default on the running
system). At least such feature should be opt-in. Also a note about this
change should be put in the RECIPE-API-CHANGELOG.md

BR Alexander

> Do you know if this topic has already been discussed in upstream
> Debian?
>
> +CC Alexander
>
> Felix
>
> >
> > Signed-off-by: Badrikesh Prusty <badrikesh.prusty@siemens.com>
> > ---
> >  meta/classes-recipe/rootfs.bbclass | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/classes-recipe/rootfs.bbclass b/meta/classes-
> > recipe/rootfs.bbclass
> > index 8485b32f..7e79bb8e 100644
> > --- a/meta/classes-recipe/rootfs.bbclass
> > +++ b/meta/classes-recipe/rootfs.bbclass
> > @@ -574,7 +574,7 @@ image_postprocess_populate_systemd_preset() {
> >          --show systemd || echo "" )
> >
> >      if (test "$SYSTEMD_INSTALLED" = "installed"); then
> > -        sudo chroot '${ROOTFSDIR}' systemctl preset-all --preset-
> > mode="enable-only"
> > +        sudo chroot '${ROOTFSDIR}' systemctl preset-all || true
> >      fi
> >  }
> >
> > --
> > 2.47.3
> >
> > --
> > 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 email to isar-users+unsubscribe@googlegroups.com.
> > To view this discussion visit
> > https://groups.google.com/d/msgid/isar-users/20251212053214.80936-1-badrikesh.prusty%40siemens.com
> > .

--
Alexander Heinisch
Siemens AG
http://www.siemens.com/

-- 
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 email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/a1ccb0ec87f9c4e99576744fa833650e2db2ce78.camel%40siemens.com.

  reply	other threads:[~2025-12-15 11:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-12  5:32 'Badrikesh Prusty' via isar-users
2025-12-15  7:31 ` 'MOESSBAUER, Felix' via isar-users
2025-12-15 11:50   ` 'Heinisch, Alexander' via isar-users [this message]
2025-12-15 13:58     ` 'Prusty, Badrikesh' via isar-users
2025-12-16  2:32       ` 'Prusty, Badrikesh' via isar-users
2025-12-16  9:17         ` 'Heinisch, Alexander' via isar-users

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a1ccb0ec87f9c4e99576744fa833650e2db2ce78.camel@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=alexander.heinisch@siemens.com \
    --cc=badrikesh.prusty@siemens.com \
    --cc=felix.moessbauer@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox