[clc-devel] Discussion? sysconfdir settings in CLC ports
![](https://secure.gravatar.com/avatar/7463ad4b9b6ae88a8af6ca7a6e814766.jpg?s=120&d=mm&r=g)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Greetings, all. I'd like to start some discussion about explicitly setting sysconfdir (or confdir or whatever the package uses) back to /etc instead of letting the default prefix decide it. I'd love to hear what everyone thinks of this because it's causing me and jdolan at least a few issues. Here's the problem: XDG-compliant apps (freedesktop.org XDG stuff) look for XDG_DATA_DIRS and XDG_CONFIG_DIRS (and possibly XDG_DATA_HOME and XDG_CONFIG_HOME) in the environment and try to use those if they exist. If they do not, /etc/xdg and /usr/share are the defaults. While this doesn't sound like a problem from that small description, graveman and gnome-menus both behave badly under certain circumstances due to these. gnome-menus first: gnome-menus expects to use XDG_CONFIG_DIRS for its menu population. If the environment variables are NOT set, the default /etc/xdg is assumed and you won't see any custom menus or most of the default editable entries in gnome. If the environment variables ARE set, the menus appear correctly. But then graveman doesn't work. graveman uses XDG_DATA_DIRS for its themes/icons/whatever. That would be fine except that there seems to be a bug (posted but not yet acknowledged) in how graveman searches for these files. The port installs files in /usr/share/graveman. If the env vars are not set, these are found. If they ARE set, XDG_DATA_DIRS will be /usr/share but graveman for some reason adds the config file name to that as a directory and goes from there. So you see something like this: stat64("/usr/share/graveman/graveman.conf/themes/default/Menu-Other-48.png", 0xbfffe8a0) = -1 ENOENT (No such file or directory) It's appending "graveman.conf" to an otherwise correct XDG_DATA_DIRS+graveman location. Symlinking graveman.conf to . in /usr/share/graveman will work around this but that's ugly as hell, IMO. Openbox also uses these but it doesn't seem to care whether its XDG configs are in /usr/etc/xdg or /etc/xdg. HOWEVER, if they are in one and the env var is set to the other, menus fail to work as might be expected. So here's what I'm getting at: Why do we use /usr/etc? Is it simply because that's the default when --prefix=/usr is used? If so, does anyone object to setting --sysconfdir=/etc for those apps which honor it? This isn't really a lot of apps, it seems mostly gnome stuff. However, pango and gtk2 at least are included: jaeger::charon::/usr/etc => ls bonobo-activation gnome-lite gnopernicus-1.0 pear.conf esd.conf gnome-vfs-2.0 gtk-2.0 sound gconf gnome-vfs-mime-magic pango xdg pear, esound, pango, gtk appear to be affected but this is still a very small list. I can understand not wanting to put things in /etc that aren't vital to the running of the system but on the other hand, things are starting to fail in weird ways the more apps I install (graveman today was what really brought this to my attention, though). While it seems we can force some things to use /usr/etc/xdg instead of /etc/xdg, others just flat-out don't support a non-default location correctly, from what I'm seeing. Thoughts? - -- Matt Housh (jaeger@freenode/#crux) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCe4jnGFVQ7mavvGgRAo6nAJ9Mo9I5asQnepwu4i+OiZPpuLCXSwCfQqsp DNUfai8k/abGfnIL3hSopxk= =cS43 -----END PGP SIGNATURE-----
![](https://secure.gravatar.com/avatar/7463ad4b9b6ae88a8af6ca7a6e814766.jpg?s=120&d=mm&r=g)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Matt Housh wrote:
Thoughts?
I forgot to include in my previous mail that debian (unstable) and gentoo (2005.0) don't use /usr/etc at all, for what that's worth. My guess is that most of the mainstream dists don't and that's why these bugs are being missed so easily... - -- Matt Housh (jaeger@freenode/#crux) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCe4mKGFVQ7mavvGgRAlQ+AJ9JeNUpm0hYK6L8AJXXljEvrVg9awCfQgOK vAkyVguewTgp5bPSiO/UdSk= =xpg5 -----END PGP SIGNATURE-----
![](https://secure.gravatar.com/avatar/ac7af318fa6403c7144d44875ae02f86.jpg?s=120&d=mm&r=g)
On May 6, 2005 9:10, Matt Housh wrote:
So here's what I'm getting at: Why do we use /usr/etc? Is it simply because that's the default when --prefix=/usr is used? If so, does anyone object to setting --sysconfdir=/etc for those apps which honor it? This isn't really a lot of apps, it seems mostly gnome stuff. However, pango and gtk2 at least are included:
jaeger::charon::/usr/etc => ls bonobo-activation gnome-lite gnopernicus-1.0 pear.conf esd.conf gnome-vfs-2.0 gtk-2.0 sound gconf gnome-vfs-mime-magic pango xdg
pear, esound, pango, gtk appear to be affected but this is still a very small list.
I can understand not wanting to put things in /etc that aren't vital to the running of the system but on the other hand, things are starting to fail in weird ways the more apps I install (graveman today was what really brought this to my attention, though). While it seems we can force some things to use /usr/etc/xdg instead of /etc/xdg, others just flat-out don't support a non-default location correctly, from what I'm seeing.
Thoughts?
![](https://secure.gravatar.com/avatar/ac7af318fa6403c7144d44875ae02f86.jpg?s=120&d=mm&r=g)
Sorry about the duplicate! I pressed ctrl+enter, instead of ctrl+k, and sent it by mistake. On May 6, 2005 9:10, Matt Housh wrote:
So here's what I'm getting at: Why do we use /usr/etc? Is it simply because that's the default when --prefix=/usr is used? If so, does anyone object to setting --sysconfdir=/etc for those apps which honor it? This isn't really a lot of apps, it seems mostly gnome stuff. However, pango and gtk2 at least are included:
IMHO, this is SysV-esque clutter. CRUX's BSD-like filesystem layout seems cleaner to me, and it would be a shame to muddle it. Also, /etc is usually protected because that is /etc/pkgadd.conf's default. /usr/etc is usually overwritten with each release, which insures that the upgrade works out of the box. Isn't the latter preferable to the support nightmare of persistent configuration files which might be incompatible in some way with the upgraded API? Will rejmerge after every upgrade become a necessity which springs from this? Why not adopt portage and etc-update while we're at it...
I can understand not wanting to put things in /etc that aren't vital to the running of the system but on the other hand, things are starting to fail in weird ways the more apps I install (graveman today was what really brought this to my attention, though). While it seems we can force some things to use /usr/etc/xdg instead of /etc/xdg, others just flat-out don't support a non-default location correctly, from what I'm seeing.
Thoughts?
Attached is the gnome-menus Makefile from FreeBSD. Are those two sed lines enough to make gnome-menus do /usr/etc? Quite often I head over to freshports.org, in order to derive solutions/inspiration for a port I'm working on. Interestingly, graveman looks like a relatively normal port. I have a feeling the secret is in the "gnomehack" and "gnomeprefix". (http://www.freebsd.org/gnome/docs/gnome_porting.html) Maybe it's not worth the bother though... If I liked SysV clutter, I'd use a Debian variant, or at least ROCKLinux. ;-) My favourite thing about CRUX, is that it's so BSD-like. Cheers, Nick
![](https://secure.gravatar.com/avatar/7463ad4b9b6ae88a8af6ca7a6e814766.jpg?s=120&d=mm&r=g)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Nick Steeves wrote:
IMHO, this is SysV-esque clutter. CRUX's BSD-like filesystem layout seems cleaner to me, and it would be a shame to muddle it. Also, /etc is usually protected because that is /etc/pkgadd.conf's default. /usr/etc is usually overwritten with each release, which insures that the upgrade works out of the box. Isn't the latter preferable to the support nightmare of persistent configuration files which might be incompatible in some way with the upgraded API? Will rejmerge after every upgrade become a necessity which springs from this? Why not adopt portage and etc-update while we're at it...
My concern isn't about aesthetics at all, really. It's simply about software that doesn't work like you'd expect.
Attached is the gnome-menus Makefile from FreeBSD. Are those two sed lines enough to make gnome-menus do /usr/etc? Quite often I head over to freshports.org, in order to derive solutions/inspiration for a port I'm working on. Interestingly, graveman looks like a relatively normal port. I have a feeling the secret is in the "gnomehack" and "gnomeprefix". (http://www.freebsd.org/gnome/docs/gnome_porting.html) Maybe it's not worth the bother though...
As far as I can tell, those sed lines have absolutely zero to do with XDG. I'll take a look at a few other freebsd/whatever ports but this one isn't any particular indication. As for graveman, it IS a rather normal port. The problem is just a bug in its runtime behavior. Hopefully they'll fix it soon, though. Anyway, I'm not completely against the /usr/etc bit if we can get everything to play nicely but I suppose that will take time to figure out. - -- Matt Housh (jaeger@freenode/#crux) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCe/mgGFVQ7mavvGgRApd+AKCyKRHHgOF33yQ3XI5H4ua0kz90cgCfQDyf IAUlFRB3+NMd5fp7bXtlHHE= =Udil -----END PGP SIGNATURE-----
![](https://secure.gravatar.com/avatar/73a8f5105a881a41b5fe876b1ca926fc.jpg?s=120&d=mm&r=g)
On Fri, May 06, 2005 at 10:10:31 -0500, Matt Housh wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Greetings, all.
I'd like to start some discussion about explicitly setting sysconfdir (or confdir or whatever the package uses) back to /etc instead of letting the default prefix decide it.
[...]
So here's what I'm getting at: Why do we use /usr/etc? Is it simply because that's the default when --prefix=/usr is used? I think we should use it because it's stated in the directory layout rules of CRUX: http://www.fukt.bth.se/~per/crux/doc/handbook.html#Package-Guidelines-Direct...
/usr/etc/<prog>/ Configuration files /etc/ Configuration files for system software (daemons, etc) That said, we certainly have packages not following this rule, at least not explicitely.
I can understand not wanting to put things in /etc that aren't vital to the running of the system but on the other hand, things are starting to fail in weird ways the more apps I install (graveman today was what really brought this to my attention, though). While it seems we can force some things to use /usr/etc/xdg instead of /etc/xdg, others just flat-out don't support a non-default location correctly, from what I'm seeing. I quite like to have a small /etc; I currently have 84 entries in /etc, and 11 in /usr/etc (I have no desktop environment installed). I'm not sure if this is significant, though... I could certainly live with both, but I'd rather have a smaller /etc already now and therefore think moving everything to /etc would be a step in the wrong direction.
That said, I'd prefer the following solution: put it into /usr/etc first; if problems occur (and I guess this is the hard part: finding out that those problems are related to sysconfdir), execute the "bad-sysconfdir" procedure: 1. switch sysconfigdir to /etc 2. submit a bug to the CLC (soon CRUX?) bugtracker to keep track of it 3. submit a bug to the developer This way, we have at least a working package, as soon as the problem is detected. We should probably also note the symptoms of this problem somewhere on the webpage, to help both new maintainers and users find the cause faster. In addition, we should also go through the existing ports (and those in the new contrib) checking whether there are ports installing to /etc when they should go to /usr/etc. Kind regards, Johannes -- Johannes Winkelmann mailto:jw@tks6.net Bern, Switzerland http://jw.tks6.net
![](https://secure.gravatar.com/avatar/5fbfdcc9fece431e1ca05e46e42255d6.jpg?s=120&d=mm&r=g)
On Fri, May 06, 2005 at 10:10:31AM -0500, Matt Housh wrote:
jaeger::charon::/usr/etc => ls bonobo-activation gnome-lite gnopernicus-1.0 pear.conf esd.conf gnome-vfs-2.0 gtk-2.0 sound gconf gnome-vfs-mime-magic pango xdg
pear, esound, pango, gtk appear to be affected but this is still a very small list.
There are some others here, note that xfce4 is a xdg application: analog dillo enscript foomatic-filters gtk1 irssi lftp mutt nail pekwm sane windowmaker xfce4 Apart from that I agree with Johannes and the guide lines, /etc should be reserved for system services while user applications should put their stuff into /usr/etc. Greetings Juergen -- Juergen Daubert | mailto:jue@jue.li Korb, Germany | http://jue.li/crux
![](https://secure.gravatar.com/avatar/a21a2b39bf7bcec3953d52a83d99ecd0.jpg?s=120&d=mm&r=g)
On 05/07/05 15:05 Juergen Daubert wrote:
There are some others here, note that xfce4 is a xdg application: analog dillo enscript foomatic-filters gtk1 irssi lftp mutt nail pekwm sane windowmaker xfce4
Apart from that I agree with Johannes and the guide lines, /etc should be reserved for system services while user applications should put their stuff into /usr/etc.
Hi, I slightly prefer the "everything into /etc" approach. At the moment there are ~60 ports in contrib + opt that install stuff in /usr/etc, (mostly gnome related) and I believe they would not add too much clutter. So if moving to /etc really saves us some headache I'm for it, expecially since only people with gnome installed would experience a little bigger /etc Just my 2c, I usually try to keep my installations as small as possible, so for me there is no big difference. Regards, Simone -- Simone Rota WEB : http://www.varlock.com Bergamo, Italy MAIL: sip@varlock.com
![](https://secure.gravatar.com/avatar/f355c0bbce9ca262c393caba55503522.jpg?s=120&d=mm&r=g)
Matt Housh wrote:
Greetings, all.
I'd like to start some discussion about explicitly setting sysconfdir (or confdir or whatever the package uses) back to /etc instead of letting the default prefix decide it. I'd love to hear what everyone thinks of this because it's causing me and jdolan at least a few issues.
I think "everything in /etc" is better, as long as offenders with lots of configs go into /etc/<package>/* like what samba, apache, etc do. I really don't like having configs in two places. I know there is this / /usr debate, but really, that's unix's past that was divided for a reason. I don't think the same argument holds today. Too many thing contradict the rule. So having one place with configs is easier to control. but I could be wrong, and I usually am, so don't listen to me! Whatever prt-get decides is fine by me! Laters
![](https://secure.gravatar.com/avatar/5fbfdcc9fece431e1ca05e46e42255d6.jpg?s=120&d=mm&r=g)
On Tue, May 10, 2005 at 06:41:38PM -0400, Victor wrote:
Matt Housh wrote:
Greetings, all.
I'd like to start some discussion about explicitly setting sysconfdir (or confdir or whatever the package uses) back to /etc instead of letting the default prefix decide it. I'd love to hear what everyone thinks of this because it's causing me and jdolan at least a few issues.
I think "everything in /etc" is better, as long as offenders with lots of configs go into /etc/<package>/* like what samba, apache, etc do.
Sorry, but I guess, that you everything-into-/etc guys read over one important point of Nick's mail: <quote> Also, /etc is usually protected because that is /etc/pkgadd.conf's default. /usr/etc is usually overwritten with each release, which insures that the upgrade works out of the box. Isn't the latter preferable to the support nightmare of persistent configuration files which might be incompatible in some way with the upgraded API? </quote> That's at least important for progs like gtk, sane, mutt, nail etc., the settings are important for the applications, but the user shouldn't ever touch them and they _must_ be overwritten with new releases. kind regards Juergen -- Juergen Daubert | mailto:jue@jue.li Korb, Germany | http://jue.li/crux
![](https://secure.gravatar.com/avatar/f355c0bbce9ca262c393caba55503522.jpg?s=120&d=mm&r=g)
Juergen Daubert wrote:
On Tue, May 10, 2005 at 06:41:38PM -0400, Victor wrote:
Matt Housh wrote:
Greetings, all.
I'd like to start some discussion about explicitly setting sysconfdir (or confdir or whatever the package uses) back to /etc instead of letting the default prefix decide it. I'd love to hear what everyone thinks of this because it's causing me and jdolan at least a few issues.
I think "everything in /etc" is better, as long as offenders with lots of configs go into /etc/<package>/* like what samba, apache, etc do.
Sorry, but I guess, that you everything-into-/etc guys read over one important point of Nick's mail:
<quote> Also, /etc is usually protected because that is /etc/pkgadd.conf's default. /usr/etc is usually overwritten with each release, which insures that the upgrade works out of the box. Isn't the latter preferable to the support nightmare of persistent configuration files which might be incompatible in some way with the upgraded API? </quote>
That's at least important for progs like gtk, sane, mutt, nail etc., the settings are important for the applications, but the user shouldn't ever touch them and they _must_ be overwritten with new releases.
can't this be solved by adding logic into pkgadd.conf that has a NOT clause in it and just add NOT <gtk.config> that will allow those NOT things to be overwritten? Or just remove /etc from the list and specify everything that should NOT be automatically updated. There is no way to cleanly handle this and /usr/etc doesn't solve the problem, it just moves it to another location. Victor
participants (6)
-
Johannes Winkelmann
-
Juergen Daubert
-
Matt Housh
-
Nick Steeves
-
Simone Rota
-
Victor