[opensuse] best place for local configs
Hi, all! Happy New Year :-) I'm running Leap 42.3 davidtg@wench:~> egrep 'VERSION|NAME' /etc/S?SE* /etc/os-* /etc/SUSE-brand:VERSION = 42.1 /etc/SuSE-release:VERSION = 42.3 /etc/SuSE-release:CODENAME = Malachite /etc/os-release:NAME="openSUSE Leap" /etc/os-release:VERSION="42.3" /etc/os-release:VERSION_ID="42.3" /etc/os-release:PRETTY_NAME="openSUSE Leap 42.3" /etc/os-release:CPE_NAME="cpe:/o:opensuse:leap:42.3" (although the OS appears to be confused about itself a bit :-) and have some questions as I move in. One biggie is where best to put localized configs -- hosts file, profile, language setting, etcetc -- so that they will not only survive an upgrade but be easy to keep and transfer into a fresh install again one day. This is on a personal laptop that will likely be one of at most a handful; I'm not running an enterprise, and while I like structure and organization the ROI of creating an enterprise-level framework just isn't there. What do you recommend? TIA & HAND :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Content-ID: <alpine.LSU.2.21.1801021309530.9264@minas-tirith.valinor> El 2018-01-02 a las 06:52 -0500, David T-G escribió:
Hi, all! Happy New Year :-)
I'm running Leap 42.3
davidtg@wench:~> egrep 'VERSION|NAME' /etc/S?SE* /etc/os-* /etc/SUSE-brand:VERSION = 42.1 /etc/SuSE-release:VERSION = 42.3 /etc/SuSE-release:CODENAME = Malachite /etc/os-release:NAME="openSUSE Leap" /etc/os-release:VERSION="42.3" /etc/os-release:VERSION_ID="42.3" /etc/os-release:PRETTY_NAME="openSUSE Leap 42.3" /etc/os-release:CPE_NAME="cpe:/o:opensuse:leap:42.3"
(although the OS appears to be confused about itself a bit :-)
Same thing here. In my case, package is "branding-openSUSE-42.1-8.4.noarch".
and have some questions as I move in. One biggie is where best to put localized configs -- hosts file, profile, language setting, etcetc -- so that they will not only survive an upgrade but be easy to keep and transfer into a fresh install again one day.
In /etc/ Some files have something.local file, so use it if it exist or you see in the main file that it is imported (and then create it if it does not exist). Language settings. There is a global or default config that you do in yast, and there is another one per user, in file {HOME}/.i18n Sample: er@minas-tirith:~> cat .i18n LC_TIME="en_DK.UTF-8" LC_MONETARY="es_ES@euro" LC_TELEPHONE="es_ES@euro" LC_MEASUREMENT="es_ES@euro" cer@minas-tirith:~> Gnome and XFCE use it, but not KDE, IIRC. Also terminal programs use it. But some openSUSE releases have/had bugs related to this file. Some display managers do not handle the situation correctly.
This is on a personal laptop that will likely be one of at most a handful; I'm not running an enterprise, and while I like structure and organization the ROI of creating an enterprise-level framework just isn't there. What do you recommend?
I don't have a list of such files, I have to do it as I go :-( - -- Cheers Carlos E. R. (from openSUSE 42.2 x86_64 "Malachite" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iF4EAREIAAYFAlpLdxgACgkQja8UbcUWM1zfgAD/ZfAIaZEtLhjXbvHBivPZLkbd U89z9d8+iMMmgeGQgggA/2bJtuBtJRrv72QdAF+BMjmPSzuCfzN5p9abmycUs5LY =m1rm -----END PGP SIGNATURE-----
Carlos & David, et al -- ...and then Carlos E. R. said... % % El 2018-01-02 a las 06:52 -0500, David T-G escribió: % % >I'm running Leap 42.3 % > % > davidtg@wench:~> egrep 'VERSION|NAME' /etc/S?SE* /etc/os-* % > /etc/SUSE-brand:VERSION = 42.1 % > /etc/SuSE-release:VERSION = 42.3 ... % > % >(although the OS appears to be confused about itself a bit :-) % % Same thing here. % In my case, package is "branding-openSUSE-42.1-8.4.noarch". Weird. I wonder why... I happened to load my Leap from the Linux Mag DVD, FWIW. % % >and have % >some questions as I move in. One biggie is where best to put localized % >configs -- hosts file, profile, language setting, etcetc -- so that they % >will not only survive an upgrade but be easy to keep and transfer into a % >fresh install again one day. % % In /etc/ % Some files have something.local file, so use it if it exist or you % see in the main file that it is imported (and then create it if it % does not exist). I eventually decided to move /usr/local out to my data partition and just sync /etc (and anything else that I find later) there regularly. To wit: davidtg@wench:~> ls -goh /usr/local /mnt/data/OS/ lrwxrwxrwx 1 18 Jan 8 22:44 /usr/local -> /mnt/data/OS/local /mnt/data/OS/: total 16K drwxr-xr-x 2 88 Jan 8 22:55 00-rsync-logs -rwxr-xr-x 1 171 Jan 8 22:54 00-rsync.sh drwxr-xr-x 127 8.0K Jan 8 09:45 etc drwxr-xr-x 11 264 Dec 15 08:26 local -rw-r--r-- 1 570 Jan 8 09:47 OS-notes.txt I'll create profile.local or profile.d/*.sh and so on, but I don't think I'm going to get around lots of programs each wanting to write to their own places; that's too much hassle. I think that I'm safe in moving the entire /usr/local tree because software should, if anything, only play with the files rather than the entire directory structure; we'll see how that goes in the long term. And, hey, at least it's done and I can move on to the next question :-) I also keep, as you can see, notes of what packages I've installed or other particular tweaking so that I can replicate it on the next system. Maybe one day I'll come up with (or learn of) a better approach. % % Language settings. There is a global or default config that you do % in yast, and there is another one per user, in file {HOME}/.i18n [snip] Hey, thanks! I'll go and play. I love multi-byte char support and all, but I can't stand screwing up the sort order with case insensitivity and dot files & dirs in the middle :-) I also just set something like C.UTF-8 on a global basis, so the .i18n bugs shouldn't be a problem here. Thanks again for the input & HAND :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2018-01-09 at 06:56 -0500, David T-G wrote:
Carlos & David, et al --
...and then Carlos E. R. said... % % El 2018-01-02 a las 06:52 -0500, David T-G escribió: % % >I'm running Leap 42.3 % > % > davidtg@wench:~> egrep 'VERSION|NAME' /etc/S?SE* /etc/os-* % > /etc/SUSE-brand:VERSION = 42.1 % > /etc/SuSE-release:VERSION = 42.3 ... % > % >(although the OS appears to be confused about itself a bit :-) % % Same thing here. % In my case, package is "branding-openSUSE-42.1-8.4.noarch".
Weird. I wonder why...
I happened to load my Leap from the Linux Mag DVD, FWIW.
It is a bug, we should report it on bugzilla. Done. Bug 1075188 - /etc/SUSE-brand contains wrong info.
I eventually decided to move /usr/local out to my data partition and just sync /etc (and anything else that I find later) there regularly. To wit:
My /usr/local is a different partition. We should be able to concoct some method to detect changed /etc files and archive them. - -- Cheers, Carlos E. R. (from openSUSE 42.2 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlpUzesACgkQtTMYHG2NR9WGcACglvj+ZYUWg9DUsKYEVpc1SGBe 5m8An2L9nc+6ItWrAraH9XvZlCpy/NT6 =VVrG -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-ID: <alpine.LSU.2.21.1801242321440.28710@Telcontar.valinor> On Tuesday, 2018-01-09 at 15:12 +0100, Carlos E. R. wrote:
On Tuesday, 2018-01-09 at 06:56 -0500, David T-G wrote:
Carlos & David, et al --
...and then Carlos E. R. said... % % El 2018-01-02 a las 06:52 -0500, David T-G escribió: % % > I'm running Leap 42.3 % > % > davidtg@wench:~> egrep 'VERSION|NAME' /etc/S?SE* /etc/os-* % > /etc/SUSE-brand:VERSION = 42.1 % > /etc/SuSE-release:VERSION = 42.3 ... % > % > (although the OS appears to be confused about itself a bit :-) % % Same thing here. % In my case, package is "branding-openSUSE-42.1-8.4.noarch".
Weird. I wonder why...
I happened to load my Leap from the Linux Mag DVD, FWIW.
It is a bug, we should report it on bugzilla.
Done.
Bug 1075188 - /etc/SUSE-brand contains wrong info.
I finally got an answer: the file is for internal (SUSE?) usage only. It means that the branding for the entire Leap 42.X series is based on 42.1, and thus it does not change. - -- Cheers, Carlos E. R. (from openSUSE 42.2 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlppBxoACgkQtTMYHG2NR9Ue4ACeIHzBK2fRHmBCxtAimsqLKy7y 6uwAn1AZ7/T5sY7Q+tp3CkyO46ptyz4a =BgpG -----END PGP SIGNATURE-----
On 01/02/2018 05:52 AM, David T-G wrote:
(although the OS appears to be confused about itself a bit :-) and have some questions as I move in. One biggie is where best to put localized configs -- hosts file, profile, language setting, etcetc -- so that they will not only survive an upgrade but be easy to keep and transfer into a fresh install again one day.
Best place for local config setting? Hmm.... /usr/local ? It provides a logical mirror of sudirectories for that explicit purpose, e.g.: $ tree -d -L 2 /usr/local /usr/local ├── bin ├── etc ├── games ├── include ├── lib ├── lib64 ├── man │ ├── man1 │ ├── man2 │ ├── man3 │ ├── man4 │ ├── man5 │ ├── man6 │ ├── man7 │ ├── man8 │ ├── man9 │ └── mann ├── sbin ├── share │ ├── applications │ └── fonts ├── src └── tmp └── david Also, in the case of bin, include, lib, ... many times /usr/local/... is already part of the default search path. That would be my recommendation. You can always provide links from your configs in /usr/local to wherever they are ultimately needed in your filesystem. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-01-03 02:40, David C. Rankin wrote:
On 01/02/2018 05:52 AM, David T-G wrote:
(although the OS appears to be confused about itself a bit :-) and have some questions as I move in. One biggie is where best to put localized configs -- hosts file, profile, language setting, etcetc -- so that they will not only survive an upgrade but be easy to keep and transfer into a fresh install again one day.
Best place for local config setting? Hmm....
/usr/local ?
It would be /usr/local/etc/* for local configs, but I doubt this would work. At best, a file there would supersede the distribution file. This would have to be tested file by file, IMO. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
Carlos E. R. composed on 2018-01-03 03:57 (UTC+0100):
David C. Rankin wrote:
Best place for local config setting? Hmm....
/usr/local ?
It would be /usr/local/etc/* for local configs, but I doubt this would work. At best, a file there would supersede the distribution file. This would have to be tested file by file, IMO.
Never tried here. /usr/local/s are on separate filesystems, one per machine, mounted same place regardless what is booted. /etc/ is one of the most irritating openSUSE habits, changing file timestamps on files I changed even when none of the file's content is or has any reason to be changed. Lately in TW everything in /etc/sysconfig/ getting new. :-( If I can't count on system files I modify being preserved there, where else? Does everything there have to have a .local added or be made immutable? Immutable on hostname halts zypper with exception message every update to netcfg, which in TW, is inexplicably often. :-( -- "Wisdom is supreme; therefore get wisdom. Whatever else you get, get wisdom." Proverbs 4:7 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2018-01-02 at 22:35 -0500, Felix Miata wrote:
Carlos E. R. composed on 2018-01-03 03:57 (UTC+0100):
David C. Rankin wrote:
Best place for local config setting? Hmm....
/usr/local ?
It would be /usr/local/etc/* for local configs, but I doubt this would work. At best, a file there would supersede the distribution file. This would have to be tested file by file, IMO.
Never tried here. /usr/local/s are on separate filesystems, one per machine, mounted same place regardless what is booted.
/etc/ is one of the most irritating openSUSE habits, changing file timestamps on files I changed even when none of the file's content is or has any reason to be changed. Lately in TW everything in /etc/sysconfig/ getting new. :-( If I can't count on system files I modify being preserved there, where else? Does everything there have to have a .local added or be made immutable? Immutable on hostname halts zypper with exception message every update to netcfg, which in TW, is inexplicably often. :-(
I forgot about "/etc/sysconfig/*" The problem with it is that settings there are ignored on newer development designs. The variables stay, nothing removes them, but they no longer work. People try them, fail, then ask. Most recent case? Thread about displaymanager. Now has to be done via updatealternatives. - -- Cheers, Carlos E. R. (from openSUSE 42.2 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlpMwykACgkQtTMYHG2NR9XdDQCfeGm7we5EXutxKYHJkUrk7PoC vHwAnR0iOLX6p2zpB6V0PjWBgkZUBHsb =2ESC -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 03/01/18 03:35, Felix Miata wrote:
/etc/ is one of the most irritating openSUSE habits, changing file timestamps on files I changed even when none of the file's content is or has any reason to be changed. Lately in TW everything in /etc/sysconfig/ getting new. :-( If I can't count on system files I modify being preserved there, where else? Does everything there have to have a .local added or be made immutable? Immutable on hostname halts zypper with exception message every update to netcfg, which in TW, is inexplicably often. :-(
This is specified in the FHS. The distro is entitled to assume that files in /etc (for the most part) belong to it :-( It ignores the fact that these files often need to be edited by the user for correct system operation :-( Which is why systemd deliberately split this up - due to the failings of /etc! Systemd has the distro location where all the distro-wide defaults are specified, and then a separate user location which is applied OVER THE TOP of the distro default. Cheers, Wol -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 02/01/18 09:57 PM, Carlos E. R. wrote:
Best place for local config setting? Hmm....
/usr/local ? It would be /usr/local/etc/* for local configs, but I doubt this would work. At best, a file there would supersede the distribution file. This would have to be tested file by file, IMO.
I don't think it would work either. Take, for example the SYSTEMD.UNIT man page where it says: SYNOPSIS SYNOPSIS ... /etc/systemd/system/* /run/systemd/system/* /usr/lib/systemd/system/* ... There are other examples. Depending on context, it may be that the files in /etc/* are symlinked to the 'real' ones. It may also be that there is a priority to override. It would be nice if /usr/local/etc overrode /etc, but don't get your hopes up. It would be fantastic is there was an ETCPATH setting! Dream on! But what we have is the 'live' files in /etc/* get synmlinked. Now suppose. for example, you symlinked something that was accepted to be in /etc. lets take a ridiculous example: /etc/passwd -> /usr/local/etc/passwed Now under what conditions will that file get overwritten rather than the version in /usr/lcoal preserved though a change? Well try it with creation of new user. Ha ha ha. Now generalise that to other key files, like, perhaps, OS-type ha ha ha. Maybe things in /etc/should be symlinked. Maybe the Apache config should be local to the apache code and symlinked. Certainly having all of the config accessible in /etc/ is a goo idea, but should it all be actually located there when it belongs in another package? Having you local, language/nationality specific perhaps. in /usr/local/etc might be a good idea, but don't bank on them surviving an update. After all, if /etc/XYZ.conf is a symlink so it can be read, then it can be written and overwritten as well. unless the .rpm specifically says 'don't follow symlinks when updating then you'll have a problem. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-01-03 05:05, Anton Aylward wrote:
On 02/01/18 09:57 PM, Carlos E. R. wrote:
Best place for local config setting? Hmm....
/usr/local ? It would be /usr/local/etc/* for local configs, but I doubt this would work. At best, a file there would supersede the distribution file. This would have to be tested file by file, IMO.
I don't think it would work either.
Take, for example the SYSTEMD.UNIT man page where it says:
SYNOPSIS SYNOPSIS ... /etc/systemd/system/* /run/systemd/system/* /usr/lib/systemd/system/* ...
Indeed. I remember one instance when a program used /usr/local/etc/*. The devs argued that when the program was built locally and installed to /usr/local/*, the configuration files would also go to /usr/local/etc/*, or something like that. It was the only time I saw this, and no, I don't remember what program it was. Something related to Fidonet, IIRC. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
On 02/01/18 11:52, David T-G wrote:
This is on a personal laptop that will likely be one of at most a handful; I'm not running an enterprise, and while I like structure and organization the ROI of creating an enterprise-level framework just isn't there. What do you recommend?
Systemd unit files should have a local directory that over-rides the distro defaults. Correct procedure is that the distro updates the central files but does not touch the local files. Otherwise thing about what gentoo does. I rely on the built-in etc-update which is very basic, but the fancy gentoo tools use git or subversion or whatever to store local changes to /etc, so you can let the distro update everything, then just merge your local changes back in. Rather important for things like postfix config :-) Cheers, Wol -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (6)
-
Anton Aylward
-
Carlos E. R.
-
David C. Rankin
-
David T-G
-
Felix Miata
-
Wols Lists