PLD vs FHS 2.2

Jakub Bogusz qboosh w pld.org.pl
Wto, 16 Kwi 2002, 21:32:22 CEST


Przejrzałem w końcu cały ten dokument i znalazłem kilka niezgodności
lub rzeczy do wyjaśnienia:

3.4.3 Specific Options
The following programs, or symbolic links to programs, must be in /bin
if the corresponding subsystem is installed:
ping    ICMP network test utility (optional)  
[dalej jeszcze jest uzasadnienie:]
3.14 /sbin : System binaries
[...]
[16] Deciding what things go into "sbin" directories is simple: if a normal
(not a system administrator) user will ever run it directly, then it must
be placed in one of the "bin" directories. Ordinary users should not have
to place any of the sbin directories in their path.
For example, files such as chfn which users only occasionally use must still
be placed in /usr/bin. ping, although it is absolutely necessary for root
(network recovery and diagnosis) is often used by users and must live in
/bin for that reason.

Tree 3.7.3.2
The following files, or symbolic links to files, must be in /etc
if the corresponding subsystem is installed:
[...]
csh.login   Systemwide initialization file for C shell logins (optional)
[mamy tylko csh.cshrc, być może .login nie jest do niczego potrzebny]
ftpusers    FTP daemon user access control list (optional)
[to u nas bywa w /etc/ftp; aha, /etc/ftpusers może być symlinkiem]
gateways    File which lists gateways for routed (optional)
[w pakiecie routed nie widzę takiego pliku]
hosts.allow Host access file for TCP wrappers (optional)
hosts.deny  Host access file for TCP wrappers (optional)
[te dwa mamy w /etc/tcpd]
hosts.equiv List of trusted hosts for rlogin, rsh, rcp (optional)
[nie ma w żadnym pakiecie, ale programy chyba szukają tam gdzie powinny]
hosts.lpd   List of trusted hosts for lpd (optional)
[LPRng tego chyba nie używa, nie wiem jak inne lpd]
networks    Static information about network names (optional)
[coś tego używa?]

Co do /usr:
FHS nic nie mówi o hierachiach /usr/%{arch}-cośtam (aktualnie mamy
/usr/i386-mingw32, /usr/i[356]86-linux-uclibc, /usr/avr,
/usr/i386-pc-msdosdjgpp i /usr/mipsel-pld-linux), ale też nie
podaje odpowiedniego miejsca dla nich... na razie chyba może zostać,
ale może to podpadać pod:
4.1 [/usr] Purpose
[...]
Large software packages must not use a direct subdirectory under
the /usr hierarchy.

5.2 Requirements
The following directories, or symbolic links to directories, are required in /var.
"/var" "Variable data"
local  Variable data for /usr/local
[to chyba nowość w FHS 2.2, bo nie ma tego w szczegółowym wykazie]

5.6 /var/crash : System crash dumps (optional)
[istnienie tego katalogu nie jest błędem, ale pod Linuksem on nie ma racji
 bytu, przynajmniej na razie - może w 2.6, bo IIRC w KT coś było na
 temat takiej propozycji]

5.8 /var/lib : Variable state information
5.8.1 Purpose
An application (or a group of inter-related applications) must use
a subdirectory of /var/lib for its data.
There is one required subdirectory, /var/lib/misc, which is intended for
state files that don't need a subdirectory; [...]

A tymczasem bezpośrednio w /var/lib siedzą np. takie:
-rw-r-----    1 root     root         2051 kwi 16 01:02 logrotate.status
[i to oficjalnie należy do pakietu logrotate; ścieżka jest zaszyta
w binarce]
-rw-r--r--    1 root     root            0 lip 29  2001 2UTF.aliases
[to nie należy do pakietu, ale ścieżka jest zaszyta w binarkach z 2UTF]
hc-cron ma jeszcze /var/lib/cron.lastrun (nie należący do pakietu)
To może nie być wszystko - sprawdzałem na działających systemach z tylko
częścią pakietów zainstalowanych ;)

5.8.5 /var/lib/hwclock : State directory for hwclock (optional)
5.8.5.1 Purpose
This directory contains the file /var/lib/hwclock/adjtime.
BEGIN RATIONALE
In FHS 2.1, this file was /etc/adjtime, but as hwclock updates it, that
was obviously incorrect.
END RATIONALE
[o, tu mamy (jedyną wyraźnie widoczną?) nowość FHS 2.2;
 teraz plik należy do rc-scripts, ale nie widzę, żeby rc-scripts go
 dotykało? IMO zmienić położenie i przenieść do util-linux]

[Oczywiście jeszcze to co niedawno pisałem...:]
Applications must generally not add directories to the top level of /var.
Such directories should only be added if they have some system-wide
implication, and in consultation with the FHS mailing list.
[...czyli nieszczęsny qmail; skoro i tak nie ma binarek, to można speca
 zrobić po ludzku]

6.1.6 /sbin : Essential system binaries
Linux systems place these additional files into /sbin.
* Second extended filesystem commands (optional):
  * { badblocks, dumpe2fs, e2fsck, mke2fs, mklost+found, tune2fs }
[mklost+found mamy w /usr/sbin]

6.1.9 /var/spool/cron : cron and at jobs
This directory contains the variable data for the cron and at programs.
[dla at mamy oddzielny katalog /var/spool/at]


Czy dopuszczamy odstępstwa zwiększające nieco porządek (/etc/{ftp,tcpd}
i /var/spool/at)? I co z pingiem? IIRC ktoś podawał link do dyskusji
w Debianie na temat położenia pinga...


-- 
Jakub Bogusz    http://prioris.mini.pw.edu.pl/~qboosh/



Więcej informacji o liście dyskusyjnej pld-devel-pl