public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Baurzhan Ismagulov <ibr@radix50.net>
To: isar-users@googlegroups.com
Subject: Re: image-postproc-extension.bbclass modifying /etc/os-release
Date: Mon, 8 Feb 2021 18:20:26 +0100	[thread overview]
Message-ID: <20210208172025.GT20742@yssyq.m.ilbers.de> (raw)
In-Reply-To: <67e1fac9-5af5-29aa-de57-9a0de0cdd165@siemens.com>

Hello Silvano,

On Fri, Jan 15, 2021 at 03:26:14PM +0100, Silvano Cirujano Cuesta wrote:
> I've noticed that '/etc/os-release' is being changed on the image in meta/classes/image-postproc-extension.bbclass [1].� What BTW ends up changing '/usr/lib/os-release', since it's only a symlink. But both '/etc/os-release' and '/usr/lib/os-release' are owned by 'base-files'...
> 
> An upgrade of 'base-files' would be replacing (silently, since is not marked as a configuration file) '/usr/lib/os-release' with the version of the upstream 'base-files' package and possibly breaking any tools in the system relying on certain values in that file.
> 
> Is there a reason that I'm missing for doing so instead of the Debian-way (file diversion with dpkg-divert)? Or any hack that I've overseen that avoids the mentioned breakage?

Thanks for raising this topic. I'd like to address some of the issues.

* I see identification as a downstream issue. However, it would be nice to
  provide something by default. Thus we touch os-release.

* Regarding an Isar-specific identification file: This is advised against in
  http://0pointer.de/blog/projects/os-release.html.

* Breaking /etc/os-release -> ../usr/lib/os-release is a bug. We should modify
  /usr/lib/os-release, in whatever way. We should not break the symlink. I
  agree we should fix this.

* Isar was conceived as a rootfs builder that should be able to work without
  creating a derivative (remember SLIND). If a downstream feels like it, they
  may create a derivative.

* For a given rootfs, the identification information is intrinsically static.
  Thus, the best would be to provide it in a static way, e.g. by patching (the
  current approach) or providing base-files (I see this as a downstream issue).

* os-release contains static information and doesn't have user-modifiable
  contents. Thus, I agree with Debian that this is not a config file.

* Upgrading base-files would overwrite os-release. From Isar point of view, I'm
  fine with that; after all, it isn't the original image, it's image + upgrade
  -- the identification should be changed as well.

* If a downstream wants to preserve the identification through package
  upgrades, they should provide their own base-files. Maybe we could make it
  easier for them in stock Isar.

* Since the information is static, dynamic approaches (config files, postinst,
  alternatives, diversions) are not necessary. They are more complex than they
  seem at the first glance (package upgrade order, package removal order,
  downgrades, failed upgrades, idempotency, etc.).

To summarize, I suggest fixing /etc/os-release -> ../usr/lib/os-release
symlink breakage.

If there is an itch for the upgrade problem, I'd be open for the discussion
on providing base-files with Isar.

With kind regards,
Baurzhan.

      parent reply	other threads:[~2021-02-08 17:20 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-15 14:26 Silvano Cirujano Cuesta
2021-01-18 11:35 ` Silvano Cirujano Cuesta
2021-01-18 12:35   ` Claudius Heine
2021-01-18 14:52     ` Silvano Cirujano Cuesta
2021-01-19  8:25     ` Henning Schild
2021-01-19  8:33       ` Henning Schild
2021-01-19  8:50         ` Silvano Cirujano Cuesta
2021-01-19  9:22           ` Henning Schild
2021-01-19 10:37             ` Silvano Cirujano Cuesta
2021-01-22  8:52               ` Claudius Heine
2021-01-22  9:47                 ` Silvano Cirujano Cuesta
2021-01-22 10:33                   ` Claudius Heine
2021-01-22 11:36                     ` Silvano Cirujano Cuesta
2021-02-05 11:55                       ` vijaikumar....@gmail.com
2021-02-05 14:57                         ` Silvano Cirujano Cuesta
2021-02-07  9:02                           ` vijai kumar
2021-02-08  8:50                             ` Silvano Cirujano Cuesta
2021-02-09  6:02                               ` vijai kumar
2021-02-10  9:22                                 ` Baurzhan Ismagulov
2021-02-11  5:54                                   ` vijaikumar....@gmail.com
2021-02-11  8:49                                     ` Baurzhan Ismagulov
2021-02-11 10:34                                       ` vijaikumar....@gmail.com
2021-01-19  8:43       ` Silvano Cirujano Cuesta
2021-01-19  9:08         ` Henning Schild
2021-01-19  9:14           ` Henning Schild
2021-01-19  9:30           ` Silvano Cirujano Cuesta
2021-01-19  9:11   ` Claudius Heine
2021-01-19  8:43 ` Henning Schild
2021-01-19  9:03   ` Silvano Cirujano Cuesta
2021-01-19  9:38 ` Henning Schild
2021-02-08 17:20 ` Baurzhan Ismagulov [this message]

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=20210208172025.GT20742@yssyq.m.ilbers.de \
    --to=ibr@radix50.net \
    --cc=isar-users@googlegroups.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