Skip to content
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

move dependency cache to /var/cache/openrc #649

Closed
wants to merge 1 commit into from

Conversation

timkenhan
Copy link
Contributor

No description provided.

@ncopa
Copy link
Contributor

ncopa commented Sep 1, 2023

What is the motivation behind this?

This means that the dependency cache is unavailable before localmount is started if /var is mounted on separate partition.

@timkenhan
Copy link
Contributor Author

timkenhan commented Sep 1, 2023 via email

@ncopa
Copy link
Contributor

ncopa commented Sep 1, 2023

The motivation is to comply better with the FHS guideline.

FHS assumes that those directories are available. The initsytems job is to make them available, an initsystem will always be special.

Furthermore, some systems would have /lib under read-only filesystem (e.g. embedded
systems, immutable systems).

If I understand the sources correctly, openrc will try copy the cache from $RC_LIBEXECDIR/cacheif it exists to /run/openrc/, and recreate it if its missing. If your /lib is read-only, you'd only need to disable the savecache (which is supposed to run during shutdown).

At the same time, system with external /var seems to diminish in number (/var/log & /var/tmp are still popular).

What do you base this on?

I would also take this opportunity to ask: is the caching even necessary (or desirable)?

I'd say yes. You can always disable it by disabling savecache during shutdown if you don't want it.

@williamh
Copy link
Contributor

williamh commented Sep 1, 2023

We do not attempt to save the cache if /lib or /lib/cache are read only, so the concern about read-only file systems is addressed.
Also, as stated, if we move everything to /var/cache, this would not work if /var is a separate file system from /.

@williamh williamh closed this Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants