Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 5359 - Summary of FHS violations
Summary: Summary of FHS violations
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All All
: High major (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-21 17:22 UTC by SpanKY
Modified: 2002-09-01 09:40 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2002-07-21 17:22:47 UTC
Gentoo & FHS
http://www.gentoo.org/ & http://www.pathname.com/fhs/

rather than opening multiple bug reports i thought i would just file this all 
under one ... ill add more comments as my box emerges more packages and i can 
check out where it installs stuff
Comment 1 SpanKY gentoo-dev 2002-07-21 17:23:09 UTC
PKG:	stage1 / portage system
LINK:	http://www.pathname.com/fhs/2.2/fhs-3.4.html
INFO:	does not include the [ binary
Comment 2 SpanKY gentoo-dev 2002-07-21 17:23:21 UTC
PKG:	stage1
LINK:	http://www.pathname.com/fhs/2.2/fhs-3.4.html
INFO:	/usr/bin/hostname should be /bin/hostname
Comment 3 SpanKY gentoo-dev 2002-07-21 17:23:47 UTC
PKG:	sys-apps/cpio
LINK:	http://www.pathname.com/fhs/2.2/fhs-3.4.html
INFO:	/usr/bin/cpio should be /bin/cpio
Comment 4 SpanKY gentoo-dev 2002-07-21 17:23:58 UTC
PKG:	sys-apps/grub
LINK:	http://www.pathname.com/fhs/2.2/fhs-3.5.html
INFO:	grub's configuration files should be in /etc (just menu.lst ?)
Comment 5 SpanKY gentoo-dev 2002-07-21 17:24:10 UTC
PKG:	app-misc/lhinv
LINK:	http://www.pathname.com/fhs/2.2/fhs-4.9.html
INFO:	nothing should be put in /usr/local/ by Gentoo
Comment 6 SpanKY gentoo-dev 2002-07-21 17:24:19 UTC
PKG:	app-misc/lcdproc
LINK:	http://www.pathname.com/fhs/2.2/fhs-4.9.html
INFO:	nothing should be put in /usr/local/ by Gentoo
Comment 7 SpanKY gentoo-dev 2002-07-21 17:24:28 UTC
PKG:	net-misc/icecast
LINK:	http://www.pathname.com/fhs/2.2/fhs-4.9.html
INFO:	nothing should be put in /usr/local/ by Gentoo
Comment 8 SpanKY gentoo-dev 2002-07-21 17:24:40 UTC
PKG:	baselayout (?)
LINK:	http://www.pathname.com/fhs/2.2/fhs-3.7.html
INFO:	there is not /etc/opt for config files for packages in /opt
Comment 9 SpanKY gentoo-dev 2002-07-21 17:24:56 UTC
PKG:	net-misc/shout
LINK:	http://www.pathname.com/fhs/2.2/fhs-3.7.html
INFO:	all config files should be in /etc ... shoutcast puts 
into /usr/icecast/etc/ and no symlink exists in /etc for it
Comment 10 SpanKY gentoo-dev 2002-07-21 17:25:06 UTC
PKG:	dev-db/freetds
LINK:	http://www.pathname.com/fhs/2.2/fhs-3.7.html
INFO:	freetds puts its config file in /usr/etc instead of /etc
Comment 11 SpanKY gentoo-dev 2002-07-21 17:25:21 UTC
PKG:	app-games/grustibus
LINK:	http://www.pathname.com/fhs/2.2/fhs-3.7.html
INFO:	all config files should be in /etc ... this package puts a config file 
into /usr/etc/gnome/config/gRustibus.d/catver
Comment 12 SpanKY gentoo-dev 2002-07-21 17:25:31 UTC
PKG:	app-text/pinfo
LINK:	http://www.pathname.com/fhs/2.2/fhs-3.7.html
INFO:	all config files should be in /etc ... this pkg makes /usr/etc/pinforc
Comment 13 SpanKY gentoo-dev 2002-07-21 17:25:40 UTC
PKG:	app-misc/devtodo
LINK:	http://www.pathname.com/fhs/2.2/fhs-3.7.html
INFO:	all config files should be in /etc ... this pkg makes /usr/etc/todorc
Comment 14 SpanKY gentoo-dev 2002-07-21 17:25:51 UTC
PKG:	app-misc/uptimed
LINK:	http://www.pathname.com/fhs/2.2/fhs-3.7.html
INFO:	all config files should be in /etc ... this pkg 
makes /usr/etc/uptimed.conf-dist

Comment 15 SpanKY gentoo-dev 2002-07-21 17:26:08 UTC
PKG:	sys-apps/daemontools
LINK:	http://www.pathname.com/fhs/2.2/fhs-3.2.html
INFO:	gentoo should not put anything in / ... daemontools makes /service
Comment 16 SpanKY gentoo-dev 2002-07-21 17:26:40 UTC
PKG:	app-doc/qt-docs
LINK:	http://www.pathname.com/fhs/2.2/fhs-3.2.html
INFO:	gentoo should not put anything in / ... qt-docs makes /
{examples,tutorial,man,doc,share}
Comment 17 SpanKY gentoo-dev 2002-07-21 17:26:48 UTC
PKG:	app-emulation/vmware-workstation
LINK:	http://www.pathname.com/fhs/2.2/fhs-3.2.html
INFO:	gentoo should not put anything in / ... vmware-workstation makes /share
Comment 18 SpanKY gentoo-dev 2002-07-21 17:26:56 UTC
PKG:	app-misc/lcd4linux
LINK:	http://www.pathname.com/fhs/2.2/fhs-3.2.html
INFO:	gentoo should not put anything in / ... lcd4linux makes /share
Comment 19 Grant Goodyear (RETIRED) gentoo-dev 2002-07-21 17:54:58 UTC
Thanks!  Most of these look like genuine bugs.  CCing Azarah for baselayout stuff.
I'm confused by the first entry, a "[" binary?  We do violate the FHS when it
comes to DJB / daemontools stuff -- it's just too painful for users if
we don't use /service.  
Comment 20 SpanKY gentoo-dev 2002-07-21 17:56:59 UTC
[from http://www.pathname.com/fhs/2.2/fhs-3.4.html]

The requirement for the [ and test commands to be included as binaries (even if 
implemented internally by the shell) is shared with the POSIX.2 standard.
Comment 21 Martin Schlemmer (RETIRED) gentoo-dev 2002-07-21 18:09:16 UTC
Comment #1:  /usr/bin/test (part of sh-utils) are there as required.  '[' is
provided by bash/sh (where sh is a link to /bin/bash) as required.

Comment #2:  It should be /bin/hostname now, but things have changed recently,
so it could be that for our current stage1, it is still /usr/bin/hostname.

Comment 22 Martin Schlemmer (RETIRED) gentoo-dev 2002-07-21 18:10:58 UTC
Whoops, didnt read http://www.pathname.com/fhs/2.2/fhs-3.4.html properly.

Should /usr/bin/test also be installed as /usr/bin/[ ?
Comment 23 Martin Schlemmer (RETIRED) gentoo-dev 2002-07-21 18:11:59 UTC
Comment #8: Will be addressed in next baselayout.
Comment 24 Martin Schlemmer (RETIRED) gentoo-dev 2002-07-21 18:20:42 UTC
Comment #22 should read: Should /usr/bin/test also be installed as /usr/bin/[
as well?
Comment 25 SpanKY gentoo-dev 2002-07-21 18:31:13 UTC
i have no idea wtf a [ binary is ;)
i'm just going by the fact Gentoo has no [ binary ...

as for just symlinking [ to test ... i dont *think* that will work because if 
you issue the cmd '[ 1 == 0 ]' then you'll be bassing "1 == 0 ]" to test which 
will be incorrect ... although i have no idea ;)
Comment 26 Martin Schlemmer (RETIRED) gentoo-dev 2002-07-21 18:40:34 UTC
nosferatu bin # ln -s test [
nosferatu bin # [ -f /etc/hosts ] && echo yes
yes
nosferatu bin # [ -f /etc/hostss ] && echo yes
nosferatu bin # 


It actually do work :P  Do you have access to Redhat/Mandrake/Debian to have
a look ?
Comment 27 Martin Schlemmer (RETIRED) gentoo-dev 2002-07-21 18:41:39 UTC
./[: /etc/hostss: binary operator expected
nosferatu bin # ./[ -f /etc/hostss && echo yes
nosferatu bin # ./[ -f /etc/hosts && echo yes
yes
nosferatu bin # 


Bleah, maybe not.  Guess it was bash who override things.
Comment 28 SpanKY gentoo-dev 2002-07-21 19:47:13 UTC
(from a shell server i have access to)
bash-2.05a$ uname -a
FreeBSD Mars.unixrules.net 4.6-STABLE FreeBSD 4.6-STABLE #5: Sat Jul 13 
06:54:17 PDT 2002     riko@Mars.unixrules.net:/usr/src/sys/compile/mars  i386
bash-2.05a$ ls -ali \[ test
 101534 -r-xr-xr-x   2 root     wheel         53k Jul  7 23:43 [*
 101534 -r-xr-xr-x   2 root     wheel         53k Jul  7 23:43 test*
bash-2.05a$ ./\[ -f /etc/hosts ] && echo yes
yes

how about this little hack of a binary ? :)
#include <unistd.h>
int main(int argc, char **argv) {
        argv[0][0] = '[';
        argv[0][1] = '\0';
        execv("/usr/bin/test\0", argv);
        execv("/bin/test\0", argv);
        return 0;
}
rux0r bin # cd /usr/bin/
rux0r bin # gcc \[.cpp -o \[
rux0r bin # ./\[ -f /etc/hosts ] && echo YES
YES
Comment 29 Seemant Kulleen (RETIRED) gentoo-dev 2002-07-22 00:00:03 UTC
good job, spanky :)
Comment 30 Dan Armak (RETIRED) gentoo-dev 2002-07-22 06:02:21 UTC
#4: grub's menu.lst has to be on the boot partition I think. And since our /boot isn't mounted by default, a symlink from /etc wuoldn't really work, it'd be broken most of the time. Ideas?  #16: I have a bug about on it on my list, working to fix. 
Comment 31 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-07-22 10:46:56 UTC
app-text/pinfo-0.6.5_p2-r1 contains a proper fix.
Comment 32 Spider (RETIRED) gentoo-dev 2002-07-22 15:43:25 UTC
Mandrake 8.2 system:
[spider@m&#65533;ndrake spider]$ ls /usr/bin/[ -al
lrwxrwxrwx    1 root     root            4 Jul 21 21:19 /usr/bin/[ -> test*
Comment 33 Seemant Kulleen (RETIRED) gentoo-dev 2002-08-30 11:03:29 UTC
Dan, is it possible to bring qt-docs into FHS compliance?

William, can you check the vmware-workstation compliance, please?
Comment 34 Seemant Kulleen (RETIRED) gentoo-dev 2002-08-30 11:06:36 UTC
lcd4linux seems to behave fine, though
Comment 35 Sandy McArthur 2002-08-30 12:43:27 UTC
At first I was baffeled by vmware-workstation putting anything in /share but
looking at the ebuild I see that if any of: $KDE2DIR, $KDE3DIR, $KDEDIR isn't
set it could do that.

could someone point me to info on what the proper use of $KDE*DIR is I'll fix it.
Comment 36 Dan Armak (RETIRED) gentoo-dev 2002-08-30 15:55:17 UTC
KDE2DIR and KDE3DIR are deprecated, and were never very officially supported. 
 
/usr is now in KDEDIRS. Meaning, that you can (and should) just install files 
(menu items etc) in the right place under the /usr main hierarchy and kde will 
pick them up. 
Comment 37 Dan Armak (RETIRED) gentoo-dev 2002-08-30 16:06:40 UTC
qt-docs: it's a bug where it puts things into /. Several people have reported 
that, both with qt and qt-docs, and it drove me mad for a while because I 
couldn't reproduce it. I never did, but people stopped reporting it. Did you 
hit this bug, seemant? If so you could be of great help in debugging it :-) 
 
Just look at its src_install, I can't see how things can end in /... 
Comment 38 Dan Armak (RETIRED) gentoo-dev 2002-08-31 13:55:00 UTC
OK, I've fixed the vmware issue. Committed. 
Comment 39 Seemant Kulleen (RETIRED) gentoo-dev 2002-09-01 09:40:01 UTC
closing this bug then, coz I think all the issues are sorted.

note to danarmak: the qt/qt-docs issue never bit me at all.

possibly they tried to install qt-docs without qt installed?

thanks much to SpanKY :)