Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#67454 - [mkinitcpio] add /etc/os-release to initramfs, when systemd hook used in mkinitcpio

Attached to Project: Arch Linux
Opened by Stefan de Konink (skinkie) - Friday, 31 July 2020, 21:41 GMT
Last edited by freswa (frederik) - Friday, 31 July 2020, 22:49 GMT
Task Type Feature Request
Category Packages: Core
Status Assigned
Assigned To Giancarlo Razzolini (grazzolini)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Description:
systemd requires the /etc/os-release file to be present, at this moment this file is not added, this raises an error when the systemd hook is used.
https://www.freedesktop.org/software/systemd/man/os-release.html

Additional info:
* package version(s)
systemd 245 (245.6-8-arch)
mkinitcpio 28

Steps to resolve:
Append the line add_file /etc/os-release in the build function of /usr/lib/initcpio/install/systemd
This task depends upon

Comment by Dave Reisner (falconindy) - Sunday, 02 August 2020, 18:14 GMT
> this raises an error when the systemd hook is used.
What error?
Comment by Stefan de Konink (skinkie) - Sunday, 02 August 2020, 18:23 GMT
Failed to read os-release file, ignoring: No such file or directory

[ 62.046004] systemd-tmpfiles[265]: Entry "/etc/os-release" does not match any include prefix, skipping.
Comment by loqs (loqs) - Sunday, 02 August 2020, 18:30 GMT
That is a debug messsage [1]?
Edit:
Triggered by
L /etc/os-release - - - - ../usr/lib/os-release
from /usr/lib/tmpfiles.d/etc.conf

[1] https://github.com/systemd/systemd/blob/v246/src/tmpfiles/tmpfiles.c#L2412
Comment by Stefan de Konink (skinkie) - Sunday, 02 August 2020, 18:33 GMT
Exactly, Lennart commented on a debug trace create to debug another feature, of which the missing os-release also popped up.
https://github.com/systemd/systemd/issues/16580#issuecomment-666193698
Comment by Dave Reisner (falconindy) - Sunday, 02 August 2020, 19:35 GMT
Right, but it's a debug message, not an error. There's no harm done by not including os-release. About all it buys us is a different message in the logs.
Comment by Stefan de Konink (skinkie) - Sunday, 02 August 2020, 19:39 GMT
There is no harm adding it, especially if the lead developer of systemd directly spots it as issue when reviewing a ticket.
Comment by Dave Reisner (falconindy) - Sunday, 02 August 2020, 21:05 GMT
If anything, this should be added to the hostdata hook, not the systemd hook.

Loading...