Closed bureado closed 4 years ago
Is a wrapper the right implementation for something like this?
It doesn’t sound like the entirely correct solution to me: /etc/os-release
is not just used by systemd, so other packages would need the same wrapper.
In addition, due to its position in the boot process (and initrd!), it might be tricky to correctly implement a wrapper for the systemd executable itself.
We don’t currently have any package which contains hard-coded references to any specific distri release. Instead, when calling distri pack
, we pass -branch
, so a quick solution is to change pack.go
to write /etc/os-release
.
A longer-term solution which would also work better with in-place updates (which we haven’t committed to supporting, but haven’t ruled out either) might be to make /etc/os-release
a symlink to an exchange dir containing a file shipped by the distri1 package, or the base package. We don’t currently have an exchange directory for etc, but it should be easy to create one (then available at /ro/etc
). I haven’t thought about whether there are any negative consequences in making package’s etc directories available in an exchange dir, but I’m willing to experiment with it :)
I tried writing one, but I'm running into building issues for systemd which I haven't been able to debug.
The error message looks like ~/distri/build/distri/pkg not existing to me? Is this related to #32? :)
Yes, the second part is definitely me not understanding how the build environment needed to be setup. This asciinema shows how I set it up, and a successful nano
build (I'll contribute it shortly)
ACK on wrapper not being the right approach for this, but leaving the issue open until you have a better idea on whether exchange /etc
or something else will work best. Definitely interested in the outcome particularly for updates...
Currently
/etc/os-release
is broken. I'm wondering if asystemd
wrapper is needed to output an/etc/os-release
if it doesn't exist.I think something simple will suffice:
This makes
hostnamectl
output:Is a wrapper the right implementation for something like this? I tried writing one, but I'm running into building issues for systemd which I haven't been able to debug.