]> git.pld-linux.org Git - packages/FHS.git/blobdiff - FHS.spec
- match /sys mode bits with reality, rel 5
[packages/FHS.git] / FHS.spec
index 8eaecb06787d3368e80c18143705c67f260682c9..b5291951b2dcaef98df1ac781c69a98098929a7a 100644 (file)
--- a/FHS.spec
+++ b/FHS.spec
@@ -1,5 +1,3 @@
-# TODO
-# - provide -doc-text, -doc-pdf, -doc-html as offline reference for the spec
 # NOTE
 # - don't use %{_*dir} macros for paths defined by FHS
 # - do not add any dependencies to this pkg, FHS should be the first package being installed
@@ -7,14 +5,14 @@
 #   But: root %attr+chown in %post means integrity verification (rpm -V) error.
 #   Maybe use non-root %attr+numeric chown in %post (without setup dependency)? The only disadvantage
 #   seems to be a warning message on install.
-Summary:       Basic FHS %{version} filesystem layout
+Summary:       Basic FHS 3.0 filesystem layout
 Summary(de.UTF-8):     Grundlegende Dateisystemstruktur
 Summary(fr.UTF-8):     Arborescence de base du système de fichiers
-Summary(pl.UTF-8):     Podstawowy układ katalogów systemu Linux zgodny z FHS %{version}
+Summary(pl.UTF-8):     Podstawowy układ katalogów systemu Linux zgodny z FHS 3.0
 Summary(tr.UTF-8):     Temel dosya sistemi yapısı
 Name:          FHS
 Version:       3.0
-Release:       1
+Release:       5
 License:       GPL
 Group:         Base
 URL:           http://refspecs.linuxfoundation.org/fhs.shtml
@@ -50,7 +48,6 @@ BuildRoot:    %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define        no_install_post_compress_modules        1
 
 # we have to use numeric uids/groups. see comment above
-
 %define                gid_uucp        14
 %define                gid_mail        12
 
@@ -76,7 +73,7 @@ systemu i praw dostępu do nich. Struktura katalogów jest zgodna z FHS
 
 %prep
 %setup -qcT
-cp -a %{SOURCE0} .
+cp -p %{SOURCE0} .
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -86,11 +83,11 @@ install -d \
        $RPM_BUILD_ROOT/etc/{X11,opt} \
        $RPM_BUILD_ROOT/lib/modules \
        $RPM_BUILD_ROOT/{mnt,media,proc,root/tmp,sbin,tmp} \
-       $RPM_BUILD_ROOT/usr/{bin,games,include,lib,sbin,share,src} \
+       $RPM_BUILD_ROOT/usr/{bin,games,include,lib,libexec,sbin,share,src} \
        $RPM_BUILD_ROOT/usr/share/{color/icc,dict,doc,games,info,misc,ppd,tmac,xml} \
        $RPM_BUILD_ROOT/usr/lib/games \
-       $RPM_BUILD_ROOT/usr/local/{bin,etc,games,include,lib,sbin,share/{color/icc,doc,info,man},src} \
-       $RPM_BUILD_ROOT/var/{cache,crash,db,games,lib/{color,misc},local,lock,log,mail,opt,run,spool,tmp,yp}
+       $RPM_BUILD_ROOT/usr/local/{bin,etc,games,include,lib,libexec,sbin,share/{color/icc,doc,info,man},src} \
+       $RPM_BUILD_ROOT/var/{cache,crash,db,games,lib/{color/icc,misc},local,lock,log,mail,opt,run,spool,tmp,yp}
 
 %if %{with lib64}
 install -d $RPM_BUILD_ROOT{/lib64,/usr/lib64/games,/usr/local/lib64}
@@ -117,10 +114,9 @@ cd $RPM_BUILD_ROOT
 check_filesystem_dirs() {
        RPMFILE=%{name}-%{version}-%{release}.%{_target_cpu}.rpm
        TMPFILE=$(mktemp)
-       find | sed -e 's|^\.||g' -e 's|^$||g' | LC_ALL=C sort > $TMPFILE
+       find | sed -e 's|^\.||g' -e '/^$/d' | LC_ALL=C sort > $TMPFILE
 
-       # find finds also '.', so use option -B for diff
-       if rpm -qpl %{_rpmdir}/$RPMFILE | grep -v '^/$' | LC_ALL=C sort | diff -uB $TMPFILE - ; then
+       if rpm -qpl %{_rpmdir}/$RPMFILE | grep -v '^/$' | LC_ALL=C sort | diff -u $TMPFILE - ; then
                rm -rf $RPM_BUILD_ROOT
        else
                echo -e "\nNot so good, some directories are not included in package\n"
@@ -131,10 +127,13 @@ check_filesystem_dirs() {
 check_filesystem_dirs
 
 %pretrans -p <lua>
-if posix.stat("/usr/local/share/man", "type") == "link" then os.remove("/usr/local/share/man") end
+st = posix.stat("/usr/local/share/man")
+if st and st.type == "link" then
+    os.remove("/usr/local/share/man")
+end
 
-# XXX: it is 2009, what uucp?! but we use /var/lock/subsys, so change it just to root?
 %post -p <lua>
+--# XXX: it is 2009, what uucp?! but we use /var/lock/subsys, so change it just to root?
 posix.chown("/var/mail", 0, %{gid_mail})
 posix.chown("/var/lock", 0, %{gid_uucp})
 
@@ -159,13 +158,14 @@ posix.chown("/var/lock", 0, %{gid_uucp})
 %dir /run
 %dir /sbin
 %dir %attr(755,root,root) /srv
-%dir /sys
+%dir %attr(555,root,root) /sys
 %dir %attr(1777,root,root) /tmp
 %dir /usr
 %dir /usr/bin
 %dir /usr/games
 %dir /usr/include
 %dir /usr/lib
+%dir /usr/libexec
 %dir /usr/lib/games
 %dir /usr/sbin
 %dir /usr/share
@@ -188,6 +188,7 @@ posix.chown("/var/lock", 0, %{gid_uucp})
 %dir /usr/local/games
 %dir /usr/local/include
 %dir /usr/local/lib
+%dir /usr/local/libexec
 %dir /usr/local/sbin
 %dir /usr/local/share
 %dir /usr/local/share/color
This page took 0.143001 seconds and 4 git commands to generate.