Editing
Thinkpiece: alternative config option over /etc/.../50-config.conf
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
<pre> root@7c32f54356fc:/# tree /etc/apt/apt.conf.d/ /etc/apt/apt.conf.d/ |-- 01autoremove |-- 70debconf |-- 99-yes-install.conf |-- docker-autoremove-suggests |-- docker-clean |-- docker-gzip-indexes `-- docker-no-languages </pre> == What is going on in <code>.conf.d</code> directories == * packages have configuration * configuration lives in directories * directories are maps of filenames to file contents; filenames can have a priority number (99-something.conf overwrites 50-something.conf). * file contents are arrays of lines * lines are key:value pairs * multiple lines can contain the same config value; the later ones overwrite the earlier ones. Basically the entire configuration, spanning the whole file system, can be reduced to a single json object. A package could force users to configure it in a single json object (and some do), but writing json by hand has ergonomic issues, and multiple packages might want to write config, and they may conflict. Who wins is undecidable from the packages' point of view, but the config should at least be consistent for a given filesystem state. == Issues == 99-filename.conf looks strange, and invites potentially unnecessary user decisions on how to name their configuration options, rather than one opinionated standard. The basic problem is how to have individual array elements assert their position. I suppose it would work fine to just say "it's alphabetical" and let files name themselves 000000-MEFIRST.conf if they really care or <some gnarly unicode character>-MELAST.conf if they care. But most config can just be something like /etc/apt/apt.conf.d/config.conf. A lot of redundancy but at least it's only communicating 2 concepts: "I am config" and "the config is for apt". I think I'll do that. == See also == * https://unix.stackexchange.com/a/570782/124123 * [[How to make apt install without prompt via config]]
Summary:
Please note that all contributions to razwiki are considered to be released under the Creative Commons Zero (Public Domain) (see
Razwiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Dark mode
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
People Razzi Follows
Tools
What links here
Related changes
Special pages
Page information