3 %define disable_docs_package 1
4 %define debug_package %{nil}
10 Summary: The basic directory layout for a Linux system
11 Url: https://fedorahosted.org/filesystem
12 Group: Base/Configuration
13 BuildRequires: pkgconfig(libtzplatform-config)
16 Source3: languages.man
17 Source1001: %{name}.manifest
20 The filesystem package is one of the basic packages that is installed
21 on a Linux system. Filesystem contains the basic directory layout
22 for a Linux operating system, including the correct permissions for
26 rm -f $RPM_BUILD_DIR/filelist
32 function create_dir () {
41 local BDIR=`dirname $NAME`
42 test -d "$RPM_BUILD_ROOT/$NAME" && { echo "dir $NAME does already exist" ; echo "input out of sequence ?" ; exit 1 ; }
43 test -n "$BDIR" -a ! -d $RPM_BUILD_ROOT$BDIR && create_dir 0755 root root $BDIR
44 mkdir -m $MODE $RPM_BUILD_ROOT/$NAME
45 echo "$XTRA%%dir %%attr($MODE,$OWNR,$GRUP) $NAME" >> $RPM_BUILD_DIR/filelist
52 etc/X11/{applnk,fontpath.d} \
53 usr/share/{xsessions,X11} \
55 etc/{xdg/autostart,ld.so.conf.d,opt,pm/{config.d,power.d,sleep.d},xinetd.d,skel,sysconfig,pki} \
56 home media mnt proc root run/lock srv sys tmp \
57 usr/{bin,etc,games,include,%{_lib}/{pkgconfig,games,sse2,tls,X11,pm-utils/{module.d,power.d,sleep.d}},lib/{games,locale,modules,sse2},libexec,local/{bin,etc,games,lib,%{_lib},sbin,src,share/{applications,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x},info},libexec,include,},sbin,share/{help/C,aclocal,applications,augeas/lenses,backgrounds,desktop-directories,dict,doc,empty,games,ghostscript/conf.d,gnome,icons,idl,info,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p},mime-info,misc,omf,pixmaps,sounds,themes},src,src/kernels,src/debug} \
58 var/{adm,empty,gopher,lib/{empty,games,misc,rpm-state},local,lock/subsys,log,nis,preserve,run,spool/{mail,lpd,uucp},tmp,db,cache,opt,games,yp} \
59 %{buildroot}%{TZ_SYS_DB} \
60 %{buildroot}%{TZ_SYS_RO_APP}
62 ln -snf ../var/tmp usr/tmp
63 ln -snf spool/mail var/mail
67 ln -snf usr/%{_lib} %{_lib}
69 # Create the locale directories:
71 echo "%lang(${LANG}) %ghost %config(missingok) /usr/share/locale/${LANG}" >>$RPM_BUILD_DIR/filelist
72 create_dir 0755 root root /usr/share/locale/$LANG/LC_MESSAGES
73 create_dir 0755 root root /usr/share/help/$LANG
75 # Create the locale directories for man:
77 create_dir 0755 root root /usr/share/man/$LANG
78 for sec in 1 2 3 4 5 6 7 8 9 n; do
79 create_dir 0755 root root /usr/share/man/$LANG/man$sec
80 ##"%lang(${LANG}) %ghost %config(missingok)"
87 --# If we are running in pretrans in a fresh root, there is no /usr and symlinks.
88 --# We cannot be sure, to be the very first rpm in the transaction list,
89 --# so, let's create the toplevel symlinks here and the directories they point to.
90 --# When our rpm is unpacked by cpio, it will set all permissions and modes later.
93 if posix.stat("/usr") == nil then
97 for i,dir in ipairs({"/lib", "/%{_lib}", "/sbin", "/bin"}) do
98 if posix.stat("/usr"..dir) == nil then
99 posix.mkdir("/usr"..dir)
100 if posix.stat(dir, "mode") == nil then
101 posix.symlink("usr"..dir, dir)
109 posix.symlink("../run", "/var/run")
110 posix.symlink("../run/lock", "/var/lock")
113 %manifest %{name}.manifest
114 %defattr(0755,root,root,-)
115 %dir %attr(555,root,root)
117 %attr(555,root,root) /boot
126 %{_sysconfdir}/xinetd.d
128 %{_sysconfdir}/sysconfig
132 #%ifarch x86_64 ppc ppc64 sparc sparc64 s390 s390x
137 %dir %attr(755,root,root) %{TZ_SYS_DB}
138 %attr(555,root,root) /proc
139 %attr(550,root,root) /root
144 %attr(1777,root,root) /tmp
146 %attr(755,root,root) %{TZ_SYS_RO_APP}
147 %attr(555,root,root) /usr/bin
151 %attr(555,root,root) /usr/lib
152 #%ifarch x86_64 ppc ppc64 sparc sparc64 s390 s390x
153 %attr(555,root,root) /usr/%{_lib}
157 %attr(555,root,root) /usr/sbin
160 /usr/share/applications
163 /usr/share/backgrounds
164 /usr/share/desktop-directories
167 %attr(555,root,root) %dir /usr/share/empty
169 /usr/share/ghostscript
174 %dir /usr/share/locale
189 %{_localstatedir}/adm
190 %{_localstatedir}/cache
192 %{_localstatedir}/empty
193 %{_localstatedir}/games
194 %{_localstatedir}/gopher
195 %{_localstatedir}/lib
196 %{_localstatedir}/local
197 %ghost %dir %attr(755,root,root) %{_localstatedir}/lock
198 %ghost %{_localstatedir}/lock/subsys
199 %{_localstatedir}/log
200 %{_localstatedir}/mail
201 %{_localstatedir}/nis
202 %{_localstatedir}/opt
203 %{_localstatedir}/preserve
204 %ghost %attr(755,root,root) %{_localstatedir}/run
205 %dir %{_localstatedir}/spool
206 %attr(755,root,root) %{_localstatedir}/spool/lpd
207 %attr(775,root,mail) %{_localstatedir}/spool/mail
208 %attr(755,uucp,uucp) %{_localstatedir}/spool/uucp
209 %attr(1777,root,root) %{_localstatedir}/tmp