Closed michaelhaaf closed 2 months ago
/usr/local
is a symlink to /var/usrlocal
.
Writing to /var
in build-time is currently not supported. This is an issue which needs to be solved in upstream.
As a workaround, you may try to use tmpfiles.d
, as Universal Blue uses it for exact same purpose of copying files that you can't in build-time. You may take a look at their SeLinux fixes for some of their packages, which I can't link right now, as an inspiration.
Ohhh okay that does make sense. Thanks @fiftydinar.
For other's reference here's the upstream documentation about /var/ symlinks and the some bluebuild documentation that discusses it too
I feel a note about /var/
and the common symlinks like /usr/local/
would be useful in the files module documentation next to the note about /etc/
. I don't mind writing it.
I feel a note about
/var/
and the common symlinks like/usr/local/
would be useful in the files module documentation next to the note about/etc/
. I don't mind writing it.
I agree, it would be nice to further document this.
Maybe making a workaround for copying files to /var
could be even integrated into the files
module through mentioned tmpfiles.d
systemd service.
But we would need to assure that implementation is good (at least better than optfix
which is used in rpm-ostree & which can be clunky at times)
Should this be moved to the website repo? I feel like that's where general documentation would be done. What do you think @xynydev ?
I think this is about documentation specifically for the files module, the docs of which are still currently in this repo IIRC, but in principle docs issues should go on the website. If I'm right about the docs being in this repo, you could just remove them, as IIRC we're using the bash files module in all images.
Yeah if you can update the website to point to the modules repo instead for files, I'll remove the docs from this repo. In which case I'll also move this ticket to modules since the docs would need to be updated there.
The website already points to modules repo, cli just can override it.
This is completed with the merged PR below:
Current Behavior
Using the files module, when writing to /usr/local/, the following build-error arises:
See:
Originally I reproduced this locally on a
bluebuild-alpine
distrobox (environment information follows below).Expected Behavior
The successful build shows that the file module is capable of writing to
/usr/share/
and/usr/etc/
. My expectation is that/usr/local/
would work the same.Example use case: manually adding system fonts that are not NerdFonts or GoogleFonts using a script. To my understanding, /usr/local/ is the recommended location, see Fonts#Manual_installation in ArchWiki
My expectation could be wrong, for e.g. it is known that
/etc
should not be written to and this is explained in the BlueBuild documentation and, I think, in the upstream ublueos & fedora documentation as well (at least, that's my memory... couldn't find an example actually).Additional context/Screenshots
N/A
Possible Solution
Either a fix (not sure where to start) or a documentation update.
Environment
Shell
This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Rust
Recipe: