Bug 1208319 - etc cleanup aka don't ship files in /etc as rpm
Summary: etc cleanup aka don't ship files in /etc as rpm
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Ludwig Nussel
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on: 1208326 1208704 1216724 1216726
Blocks: 1165830
  Show dependency treegraph
 
Reported: 2023-02-15 15:01 UTC by Ludwig Nussel
Modified: 2023-10-31 13:20 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ludwig Nussel 2023-02-15 15:01:34 UTC
For future Linux systems the operating system vendor is only supposed to ship files in /usr. All other locations are considered out of scope. That also enables the use case of shipping the whole /usr tree as an image rather than individual packages. As a consequence packages must not ship any content for /etc in their file list. See https://en.opensuse.org/openSUSE:Packaging_UsrEtc for details

- static files or scripts that are not actually meant to be edited should be moved to /usr
- prefer compiled in defaults (eg via ./configure) over installing static files that override built in defaults
- files that can be overridden or modified by the admin can be placed in /usr/etc. Applications are expected to prefer the version in /etc over the one in /usr/etc then. https://github.com/openSUSE/libeconf may be of help to implement that in applications.
- applications that absolutely need a file in /etc may use the https://manpages.opensuse.org/Tumbleweed/systemd/tmpfiles.d.5.en.html mechanism to copy a template from /usr/share/factory/
Comment 1 Ludwig Nussel 2023-02-15 15:08:43 UTC
see also https://lnussel.github.io/2020/12/16/fslayout/
Comment 2 Ludwig Nussel 2023-10-31 07:58:57 UTC
One more item for the list. It's desirable to allow replacing or extending packaged versions of config files. That is useful e.g. to create appliances that ship different settings in /usr.
That can be achieved by eg supporting drop-in directories to extend and overwrite settings or by shipping the default config in a separate package.
Comment 3 Ludwig Nussel 2023-10-31 10:46:15 UTC
Document form Thorsten explaining the concept: https://github.com/thkukuk/atomic-updates_and_etc/blob/master/README.md
Comment 4 Thorsten Kukuk 2023-10-31 13:20:25 UTC
We have even a Jira for ALP for this:
https://jira.suse.com/browse/PED-240