]> git.pld-linux.org Git - packages/FHS.git/blame - FHS.spec
- when installing new system with chroot (e.g. from rescuecd), pre/post
[packages/FHS.git] / FHS.spec
CommitLineData
2fccd05c
ER
1# NOTE
2# - don't use %{_*dir} macros for paths defined by FHS
05fbeea7
ER
3# - do not add any dependencies to this pkg, FHS should be the first package being installed
4# - do not use any other user/group than "root", as then we have to depend on "setup" package.
7807a3bf 5Summary: Basic FHS 2.3 filesystem layout
d280bbd7
ER
6Summary(de.UTF-8): Grundlegende Dateisystemstruktur
7Summary(fr.UTF-8): Arborescence de base du système de fichiers
8Summary(pl.UTF-8): Podstawowy układ katalogów systemu Linux zgodny z FHS 2.3
9Summary(tr.UTF-8): Temel dosya sistemi yapısı
b3b300be 10Name: FHS
7807a3bf 11Version: 2.3
ef2d028b 12Release: 26
15c9b486 13License: GPL
14Group: Base
8eaadcf0 15URL: http://www.pathname.com/fhs/
2fccd05c 16BuildRequires: mktemp
73559f52 17BuildRequires: rpmbuild(macros) >= 1.213
05fbeea7 18Conflicts: setup < 2.7
8ad4c704 19BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
15c9b486 20
5a4e441c
ER
21# nothing to put there
22%define _enable_debug_packages 0
23
24# avoid rpm 4.4.9 adding rm -rf buildroot, we need the dirs to check consistency
25%define __spec_clean_body %{nil}
26
1a35d806 27%define _locmandir /usr/local/man
2fccd05c 28
6c95f275 29# doesn't contain any files, but we're not noarch package
99177468 30%define no_install_post_strip 1
6c95f275
ER
31%define no_install_post_chrpath 1
32%define no_install_post_compress_modules 1
0fa811e0 33
05fbeea7
ER
34# we have to use numeric uids/groups. see comment above
35
36%define gid_uucp 14
37%define gid_mail 12
38
15c9b486 39%description
aac153be 40This package contains the basic directory layout for a Linux system,
41including the proper permissions for the directories. This layout
7807a3bf 42conforms to the Filesystem Hierarchy Standard (FHS) 2.3.
15c9b486 43
fdedb1f3
JR
44%description -l de.UTF-8
45Dieses Paket enthält die grundlegende Verzeichnisstruktur eines
46Linux-Systems, einschließlich der entsprechenden Zugriffsrechte. Diese
7807a3bf 47Struktur entspricht dem Filesystem Hierarchy Standard (FHS) 2.3.
15c9b486 48
fdedb1f3
JR
49%description -l fr.UTF-8
50Ce package contient l'arborescence type pour système Linux y compris
51les permissions adéquates pour les répertoires. Cette arborescence est
69503c43 52conforme au standard "Filesystem Hierarchy Standard" (FHS) 2.3.
15c9b486 53
fdedb1f3
JR
54%description -l pl.UTF-8
55Pakiet ten zawiera informacje o podstawowej strukturze katalogów
56systemu i praw dostępu do nich. Struktura katalogów jest zgodna z FHS
7807a3bf 572.3.
aac153be 58
fdedb1f3
JR
59%description -l tr.UTF-8
60Bu paket GNU makro işleme dilini içerir. Mantıksal olarak
61ayrıştırılabilen metin dosyaları yazımı için yararlıdır.
15c9b486 62
63%prep
64
65%install
66rm -rf $RPM_BUILD_ROOT
67
d8cf4cdf
JB
68install -d \
69 $RPM_BUILD_ROOT/{bin,boot,dev,etc,home,opt,srv} \
70 $RPM_BUILD_ROOT/etc/{X11,opt} \
71 $RPM_BUILD_ROOT/lib/modules \
ef2d028b 72 $RPM_BUILD_ROOT/{mnt,media/{cdrom,floppy},proc,root/tmp,sbin,tmp} \
d8cf4cdf 73 $RPM_BUILD_ROOT/usr/{bin,games,include,lib,sbin,share,src} \
017dd5c9 74 $RPM_BUILD_ROOT/usr/share/{dict,doc,games,info,misc,tmac,xml} \
d8cf4cdf
JB
75 $RPM_BUILD_ROOT/usr/lib/games \
76 $RPM_BUILD_ROOT/usr/local/{bin,etc,games,include,lib,sbin,share/{doc,info},src} \
48784dc4 77 $RPM_BUILD_ROOT/var/{cache,crash,db,games,lib/misc,local,lock,log,mail,opt,run,spool,tmp,yp}
d8cf4cdf
JB
78
79%if "%{_lib}" == "lib64"
80install -d $RPM_BUILD_ROOT{/lib64,/usr/lib64/games,/usr/local/lib64}
76796e14
JB
81%endif
82
45af740b 83for manp in man{1,2,3,4,5,6,7,8} ; do
d8cf4cdf 84 install -d $RPM_BUILD_ROOT/usr/share/man/${manp}
0fa811e0 85 install -d $RPM_BUILD_ROOT%{_locmandir}/${manp}
4890dc1c
JB
86 for mloc in bg ca cs da de el eo es fi fr gl hr hu id it ja ko lt nl \
87 pl pt pt_BR ro ru sk sl sr sv tr uk zh_CN zh_TW ; do
d8cf4cdf 88 install -d $RPM_BUILD_ROOT/usr/share/man/${mloc}/${manp}
0fa811e0 89 done
0fa811e0 90done
0fa811e0 91
d8cf4cdf 92# "/usr/local/share/man and /usr/local/man must be synonomous" per FHS 2.3
9d1c44e3
JB
93ln -sf ../man $RPM_BUILD_ROOT/usr/local/share/man
94
15c9b486 95%clean
fa9aa6bf 96cd $RPM_BUILD_ROOT
0a75495b 97
2fccd05c 98check_filesystem_dirs() {
2fccd05c
ER
99 RPMFILE=%{name}-%{version}-%{release}.%{_target_cpu}.rpm
100 TMPFILE=$(mktemp)
48e57f98 101 find | sed -e 's|^\.||g' -e 's|^$||g' | LC_ALL=C sort > $TMPFILE
2fccd05c
ER
102
103 # find finds also '.', so use option -B for diff
104 if rpm -qpl %{_rpmdir}/$RPMFILE | grep -v '^/$' | LC_ALL=C sort | diff -uB $TMPFILE - ; then
105 rm -rf $RPM_BUILD_ROOT
106 else
107 echo -e "\nNot so good, some directories are not included in package\n"
108 exit 1
109 fi
110 rm -f $TMPFILE
111}
112check_filesystem_dirs
15c9b486 113
05fbeea7
ER
114# XXX: it is 2009, what uucp?! but we use /var/lock/subsys, so change it just to root?
115%post -p <lua>
116posix.chown("/var/mail", 0, %{gid_mail})
117posix.chown("/var/lock", 0, %{gid_uucp})
118
15c9b486 119%files
bfef5768 120%defattr(644,root,root,755)
52e00ac5 121%dir /
d8cf4cdf
JB
122%dir /bin
123%dir /boot
124%dir /dev
2d4f80d5 125%dir /etc
d8cf4cdf
JB
126%dir /etc/X11
127%dir /etc/opt
b9fc8087 128%dir /home
d8cf4cdf
JB
129%dir /lib
130%dir /lib/modules
6c511447
ER
131%dir %attr(775,root,root) /media
132%dir %attr(775,root,root) %verify(not group) /media/floppy
133%dir %attr(775,root,root) %verify(not group) /media/cdrom
d8cf4cdf
JB
134%dir /mnt
135%dir /opt
6c511447
ER
136%dir %attr(555,root,root) %verify(not group) /proc
137%dir %attr(700,root,root) /root
ef2d028b 138%dir %attr(700,root,root) /root/tmp
15c9b486 139%dir /sbin
6c511447
ER
140%dir %attr(755,root,root) /srv
141%dir %attr(1777,root,root) /tmp
d8cf4cdf
JB
142%dir /usr
143%dir /usr/bin
144%dir /usr/games
145%dir /usr/include
146%dir /usr/lib
147%dir /usr/lib/games
148%dir /usr/sbin
149%dir /usr/share
150%dir /usr/share/dict
151%dir /usr/share/doc
152%dir /usr/share/games
153%dir /usr/share/info
d8cf4cdf
JB
154%dir /usr/share/man
155%dir /usr/share/man/man[1-8]
156%lang(bg) /usr/share/man/bg
fb84e090 157%lang(ca) /usr/share/man/ca
d8cf4cdf
JB
158%lang(cs) /usr/share/man/cs
159%lang(da) /usr/share/man/da
160%lang(de) /usr/share/man/de
161%lang(el) /usr/share/man/el
80d1ef5a 162%lang(eo) /usr/share/man/eo
d8cf4cdf
JB
163%lang(es) /usr/share/man/es
164%lang(fi) /usr/share/man/fi
165%lang(fr) /usr/share/man/fr
166%lang(gl) /usr/share/man/gl
167%lang(hr) /usr/share/man/hr
168%lang(hu) /usr/share/man/hu
169%lang(id) /usr/share/man/id
170%lang(it) /usr/share/man/it
171%lang(ja) /usr/share/man/ja
172%lang(ko) /usr/share/man/ko
4890dc1c 173%lang(lt) /usr/share/man/lt
d8cf4cdf
JB
174%lang(nl) /usr/share/man/nl
175%lang(pl) /usr/share/man/pl
176%lang(pt) /usr/share/man/pt
177%lang(pt_BR) /usr/share/man/pt_BR
178%lang(ro) /usr/share/man/ro
179%lang(ru) /usr/share/man/ru
180%lang(sl) /usr/share/man/sl
181%lang(sk) /usr/share/man/sk
182%lang(sr) /usr/share/man/sr
183%lang(sv) /usr/share/man/sv
184%lang(tr) /usr/share/man/tr
185%lang(uk) /usr/share/man/uk
186%lang(zh_CN) /usr/share/man/zh_CN
187%lang(zh_TW) /usr/share/man/zh_TW
188%dir /usr/share/misc
189%dir /usr/share/tmac
017dd5c9 190%dir /usr/share/xml
d8cf4cdf
JB
191%dir /usr/src
192%dir /usr/local
193%dir /usr/local/bin
194%dir /usr/local/etc
195%dir /usr/local/games
196%dir /usr/local/include
197%dir /usr/local/lib
198%dir /usr/local/sbin
199%dir /usr/local/share
200%dir /usr/local/share/doc
201%dir /usr/local/share/info
202/usr/local/share/man
0fa811e0 203%{_locmandir}
d8cf4cdf 204%dir /usr/local/src
15c9b486 205%dir /var
d8cf4cdf 206%dir /var/cache
0a75495b 207%dir /var/crash
15c9b486 208%dir /var/db
15c9b486 209%dir /var/games
dff2ec9d 210%dir /var/lib
0a75495b 211%dir /var/lib/misc
e7f27a78 212%dir /var/local
6c511447
ER
213%dir %attr(1771,root,root) /var/lock
214%dir %attr(751,root,root) /var/log
215%dir %attr(2775,root,root) /var/mail
15c9b486 216%dir /var/opt
0a75495b 217%dir /var/run
2d4f80d5 218%dir /var/spool
48784dc4 219%dir /var/yp
6c511447 220%dir %attr(1777,root,root) /var/tmp
d8cf4cdf
JB
221%if "%{_lib}" == "lib64"
222%dir /lib64
223%dir /usr/lib64
224%dir /usr/lib64/games
225%dir /usr/local/lib64
76796e14 226%endif
This page took 0.112397 seconds and 4 git commands to generate.