From: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
To: Henning Schild <henning.schild@siemens.com>
Cc: isar-users@googlegroups.com
Subject: Re: image-postproc-extension.bbclass modifying /etc/os-release
Date: Tue, 19 Jan 2021 10:03:49 +0100 [thread overview]
Message-ID: <6affd7f5-bf5f-731f-f247-738a04552d86@siemens.com> (raw)
In-Reply-To: <20210119094353.3fdc4861@md1za8fc.ad001.siemens.net>
On 19/01/2021 09:43, Henning Schild wrote:
> Hi,
>
> i wonder if there is any command we can run for QA. One that makes sure
> that all files in the rootfs are owned by a package and are not
> modified. That should take /etc /var /tmp and other such locations into
> account, but should clearly detect the problematic change in /usr/lib
> that slipped in via that unexpected symlink.
It's not that easy. Files generated during package post-processing are not owned by any package.
>
> Does anyone know such a command?
Yes, "dpkg -S" is what you're looking for. For example, "dpkg -S /etc/os-release" returns "base-files: /etc/os-release". Or the other way around, "dpkg -L base-files" gives you all the files managed by "base-files". With "dpkg -S" you can use globbing, but it reports also directories. In the end it's easier something like "find <rootfs> -type f -exec dpkg -S {} \;" if you want to scan the whole tree.
Silvano
>
> Henning
>
> Am Fri, 15 Jan 2021 15:26:14 +0100
> schrieb "[ext] Silvano Cirujano Cuesta"
> <silvano.cirujano-cuesta@siemens.com>:
>
>> Hi,
>>
>> 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?
>>
>> Hasta la vista,
>>
>> Silvano
>>
>> [1]
>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Filbers%2Fisar%2Fblob%2Fa0d6de4ac7dfb926b38cfcd44f2bc8852f2e43e3%2Fmeta%2Fclasses%2Fimage-postproc-extension.bbclass%23L20&data=04%7C01%7Csilvano.cirujano-cuesta%40siemens.com%7C2e50ef427a76472a2c3308d8bc565c87%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C637466426394815917%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=DP6mMX8xBVzZ6v0PupvNXCJb8Amrf%2Fwh91dT9XSL6I8%3D&reserved=0
>>
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2021-01-19 9:03 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 [this message]
2021-01-19 9:38 ` Henning Schild
2021-02-08 17:20 ` Baurzhan Ismagulov
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=6affd7f5-bf5f-731f-f247-738a04552d86@siemens.com \
--to=silvano.cirujano-cuesta@siemens.com \
--cc=henning.schild@siemens.com \
--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