-
Notifications
You must be signed in to change notification settings - Fork 123
Document installation of packages that write things to a symlinked directory (/opt as an example) #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
What are you doing/what image are you using where /opt isn't writable on the build? |
|
Pulling in an aurora image. /opt is a symlink to /var/opt so its a file not a directory. As such trying to install packages to it fails. |
I'm on Bluefin and it's writable. |
At least when I try to install certain packages, say brother printers as an example, the github build fails if I do not do the process I described above.
|
|
I can see why this is useful. /var/opt doesn't exist at build time and this puts it into the share factory. I'm not sure, auto papering this over for people makes the most amount of sense though. |
|
There is already /usr/share/factory, which systemd-tmpfiles already use as fallback for any copy related operations. Per example: With this tmpfile entry, With this, we can recreate |
|
Just saying that I definitely would appreciate this being documented in |
I am interested in learning more about this. When installing ie bitwarden, I had to copy the files from /usr/share/factory to /var/opt manually. From my understanding your example would do this automatically. Would you be able to provide a way to have this configured out of the box? I am unsure how to proceed with the creation of the systemd-tmpfile. |
that entry is missing a target path, which you're saying should be /var/opt/ but that would be putting the static package files on the writable persistent layer of /var/. updating the package on the image would break the package's install on the system. |
if you turn the symlink /opt/ into a real directory, you must delete it to symlink it again, else /opt/ won't point to /var/opt/ instead there will be a link /opt/opt/ pointing to /var/opt/ |
|
on fedora atomic, nothing on the base image is in /opt/. they simply did what they assumed was best practice and symlinked it to /var/opt/. /opt/ should only be used for static installation files of third party applications and /var/opt/ is used for dynamic runtimes. nothing should be written to /opt/ on atomic/ublue regardless of it being real or a symlink. therefore I propose the solution to this problem is simply to delete the symlink /opt/ and make it a real directory. |
|
I was having issues with this. Specifically, I was trying to install Brave and 1Password. The instructions in the PR didn't work for me. The image built succesfully, but the programs were not available in the GNOME UI. Maybe (I didn't check) the resulting files were in the image, but it would requires extra setup to make it work afterwards (maybe symlinking files to The @stevensko proposal worked for me:
i.e. just: rm /opt
mkdir /optwithout moving the resulting @ EDIT |
No description provided.