X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=filesystem.spec;h=e07d7e3be8f79db20e31875d98f27a1f09e0a5ca;hb=c09a789cd404d37f9987104201aef0ade47d8be3;hp=8342142043ecb8a4936196eb2888450cb9bb7d32;hpb=5447896143fc153d96b2e3b110b33baf537938f9;p=packages%2Ffilesystem.git diff --git a/filesystem.spec b/filesystem.spec index 8342142..e07d7e3 100644 --- a/filesystem.spec +++ b/filesystem.spec @@ -1,141 +1,194 @@ -Summary: Basic filesystem layout -Summary(de): Grundlegende Dateisystemstruktur -Summary(fr): Arborescence de base du système de fichiers -Summary(pl): Podstawa uk³ad katalogów systemu Linux -Summary(tr): Temel dosya sistemi yapýsý +# +# Conditional build: +%bcond_without debuginfo # build without debuginfo package + +# disable rpm generated debug package, we handle it differently here +%define _enable_debug_packages 0 + +# avoid rpm 4.4.9 adding rm -rf buildroot +%define __spec_clean_body %{nil} +Summary: Common directories +Summary(pl.UTF-8): Wspólne katalogi Name: filesystem -Version: 1.4 -Release: 5 -Copyright: Public Domain +Version: 3.0 +Release: 25 +License: GPL Group: Base -Group(pl): Podstawy -Buildroot: /tmp/%{name}-%{version}-root -Prereq: setup -Buildarch: noarch +BuildRequires: automake +BuildRequires: mktemp +Requires: FHS >= 2.3-15 +Provides: browser-plugins(%{_target_base_arch}) +%ifarch %{x8664} +Provides: browser-plugins(i386) +%endif +%ifarch ppc64 +Provides: browser-plugins(ppc) +%endif +%ifarch s390x +Provides: browser-plugins(s390) +%endif +%ifarch sparc64 +Provides: browser-plugins(sparc) +%endif +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +# directory for "privilege separation" chroot +%define _privsepdir /usr/share/empty +# directory for *.idl files (for CORBA implementations) +%define _idldir /usr/share/idl %description -This package contains the basic directory layout for a Linux system, -including the proper permissions for the directories. This layout conforms -to the Linux Filesystem Standard (FSSTND) 1.3. - -%description -l de -Dieses Paket enthält die grundlegende Verzeichnisstruktur eines Linux-Systems, -einschließlich der entsprechenden Zugriffsrechte. Diese Struktur entspricht -dem Linux-Dateisystem-Standard (FSSTND) 1.3. - -%description -l fr -Ce package contient l'arborescence type pour système linux -y compris les permissions adéquates pour les répertoires. Cette -arborescence est conforme au standard \"Linux Filesystem Standard\" -(FSSTND) 1.3. - -%description -l pl -Pakiet ten zawiera informacje o podstawowej strukturze katalogów systemu i -praw dostêpu do nich. - -%description -l tr -Bu paket GNU makro iþleme dilini içerir. Mantýksal olarak ayrýþtýrýlabilen -metin dosyalarý yazýmý için yararlýdýr. +This package contains common directories for packages that extend some +programs functionality, but don't require them themselves. + +%description -l pl.UTF-8 +Ten pakiet zawiera wspólne katalogi dla pakietów rozszerzających +funkcjonalność programów, ale nie wymagających ich. + +%package debuginfo +Summary: Common directories for debug information +Summary(pl.UTF-8): Wspólne katalogi dla plików z informacjami dla debuggera +Group: Development/Debug + +%description debuginfo +This package provides common directories for debug information. + +%description debuginfo -l pl.UTF-8 +Ten pakiet udostępnia wspólne katalogi dla plików z informacjami dla +debuggera. %prep +%setup -qcT %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT/{bin,boot,etc,home/users,lib/modules} -install -d $RPM_BUILD_ROOT/{mnt/{floppy,cdrom},proc,root,sbin,tmp} -install -d $RPM_BUILD_ROOT/usr/{bin,dict,doc,etc,games,include,info,sbin,share} +install -d \ + $RPM_BUILD_ROOT/{initrd,selinux,sys} \ + $RPM_BUILD_ROOT/etc/{pki,X11/xinit/xinitrc.d,certs,default,logrotate.d,security,sysconfig/wmstyle,tmpwatch,xdg/autostart} \ + $RPM_BUILD_ROOT/home/{users,services} \ + $RPM_BUILD_ROOT/lib/{firmware,security} \ + $RPM_BUILD_ROOT/usr/include/security \ + $RPM_BUILD_ROOT/usr/lib/{cgi-bin,browser-plugins,pkgconfig,initrd,ConsoleKit/run-session.d} \ + $RPM_BUILD_ROOT/usr/share/{gnome/{help,wm-properties},man/man{n,l},man/pl/mann,pkgconfig,sounds,themes/Default,wallpapers,xsessions} \ + $RPM_BUILD_ROOT/usr/src/examples \ + $RPM_BUILD_ROOT/var/lock/subsys \ + $RPM_BUILD_ROOT{%{_aclocaldir},%{_desktopdir}/docklets,%{_iconsdir},%{_pixmapsdir}} \ + $RPM_BUILD_ROOT%{_fontsdir}/{{100,75}dpi,OTF,Speedo,Type1/{afm,pfm},TTF,cyrillic,local,misc} \ + $RPM_BUILD_ROOT{%{_idldir},%{_privsepdir}} + +%if "%{_lib}" == "lib64" +install -d \ + $RPM_BUILD_ROOT/lib64/security \ + $RPM_BUILD_ROOT/usr/lib64/pkgconfig \ + $RPM_BUILD_ROOT/usr/lib64/browser-plugins \ + $RPM_BUILD_ROOT/usr/lib64/initrd +%endif + +%if %{with debuginfo} +install -d \ + $RPM_BUILD_ROOT/usr/lib/debug/%{_lib} \ + $RPM_BUILD_ROOT/usr/lib/debug%{_libdir} \ + $RPM_BUILD_ROOT/usr/lib/debug/{bin,sbin} \ + $RPM_BUILD_ROOT/usr/lib/debug/usr/{bin,sbin} \ + $RPM_BUILD_ROOT/usr/lib/debug/lib/security \ + $RPM_BUILD_ROOT/usr/src/debug + +%if "%{_lib}" == "lib64" +install -d \ + $RPM_BUILD_ROOT/usr/lib/debug/lib64/security +%endif + +find $RPM_BUILD_ROOT/usr/lib/debug -type d | while read line; do + echo ${line#$RPM_BUILD_ROOT} +done > $RPM_BUILD_ROOT/usr/src/debug/%{name}-debuginfo.files +%endif + +# create this for %clean +tar -cf checkfiles.tar -C $RPM_BUILD_ROOT . -install -d $RPM_BUILD_ROOT/usr/{games,lib/games,man} +%clean +mkdir -p $RPM_BUILD_ROOT +tar -xf checkfiles.tar -C $RPM_BUILD_ROOT +cd $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT/usr/local/{bin,etc,doc,games,info,lib,man,sbin,src} +check_filesystem_dirs() { + RPMFILE=%{_rpmdir}/%{name}-%{version}-%{release}.%{_target_cpu}.rpm + RPMFILE2=%{?with_debuginfo:%{_rpmdir}/%{name}-debuginfo-%{version}-%{release}.%{_target_cpu}.rpm} + TMPFILE=$(mktemp) + # note: we must exclude from check all existing dirs belonging to FHS + find | sed -e 's|^\.||g' -e 's|^$||g' | LC_ALL=C sort | grep -v $TMPFILE | grep -E -v '^/(etc|etc/X11|home|lib|lib64|usr|usr/include|usr/lib|usr/lib64|usr/share|usr/share/man|usr/share/man/pl|usr/src|var|var/lock)$' > $TMPFILE -install -d $RPM_BUILD_ROOT/var/{lib,local,lock/subsys,log,run,preserve,spool/mail} -install -d $RPM_BUILD_ROOT/var/lib/games + # find finds also '.', so use option -B for diff + rpm -qpl $RPMFILE $RPMFILE2 | grep -v '^/$' | LC_ALL=C sort | diff -uB - $TMPFILE || : -ln -sf ../tmp $RPM_BUILD_ROOT/var/tmp + rm -f $TMPFILE +} -%clean -rm -rf $RPM_BUILD_ROOT +check_filesystem_dirs %files -%defattr(-,root,root,755) -/bin -%attr(-,root,root,700) /boot -/etc -/home -/lib -/mnt -%attr(-,root,root,555) /proc -%attr(-,root,root,700) /root -/sbin -%attr(-,root,root,1777) /tmp -/usr -%dir /var -/var/lib -/var/local -/var/lock -%attr(-,root,root,711) /var/log -/var/run -/var/preserve -/var/spool -/var/tmp - -%changelog -* Sun Feb 21 1999 Tomasz K³oczko - [1.4-5] -- removed /usr/tmp (not neccessary), -- added /usr/src, -- removed many directories which must belongs to other packages - (webserwer, ftpdaemon, smtpdaemon, gopher serwer, petidomo), -- simplification in %files, -- changed GUID on man directorirs to root. - -* Wed Dec 30 1998 Wojtek ¦lusarczyk - [1.4-3d] -- changed permissions of /boot to 711 - (System.map must be readable by new ps), -- added /var/spool/{news,lpd,uucp}, -- added /var/qmail, -- all symlinks are now as %ghost, -- added /var/lock/subsys, -- added /usr/X11R6/man/* & /usr/man/man/*, -- fixed permission of /var/spool/mail, -- added /etc/mail && /home/ftp, -- added /usr/lib/gopher-data && /usr/lib/games. - -* Mon Aug 10 1998 Wojtek ¦lusarczyk - [1.4-1d] -- changed relase to 1d (PLD-devel), -- added /opt for commercial software, -- /var/tmp as symlink to /tmp, -- /var/adm as symlink to /var/log. - -* Mon Aug 10 1998 Tomasz K³oczko - [1.4-1] -- Buildroot changed to /tmp/%{name}-%%{version}-root, -- directory skeleton is builded directly in %install instead unpacking - from cpio archive, -- translation modified for pl, -- removed /usr/etc, -- added /home/users - default base directory for users home - directories, -- changed permission on /var/lib/rpm to 700, -- changed perrmission on /root and /boot to 700, -- changed permission on /var/log to 711, -- changed permission on /var/spool/mail to 751, -- removed /usr/lib/X11, -- removed /var/nis. - -* Mon Apr 27 1998 Prospector System -- translations modified for de, fr, tr - -* Tue Sep 09 1997 Erik Troan -- made a noarch package - -* Wed Jul 09 1997 Erik Troan -- added / - -* Wed Apr 16 1997 Erik Troan -- Changed /proc to 555 -- Removed /var/spool/mqueue (which is owned by sendmail) +%defattr(644,root,root,755) +%dir /etc/X11/xinit +%dir /etc/X11/xinit/xinitrc.d +%attr(751,root,root) %dir /etc/certs +%dir /etc/default +%attr(751,root,root) %dir /etc/security +%dir /etc/logrotate.d +%dir /etc/sysconfig +%dir /etc/sysconfig/wmstyle +%dir /etc/tmpwatch +%dir /etc/pki +%dir /etc/xdg +%dir /etc/xdg/autostart +%dir /home/users +%attr(751,root,adm) %dir /home/services +%dir /initrd +%dir /lib/firmware +%dir /lib/security +%dir /selinux +%dir /sys +%dir /usr/include/security +%dir /usr/lib/ConsoleKit +%dir /usr/lib/ConsoleKit/run-session.d +%dir /usr/lib/browser-plugins +%dir /usr/lib/cgi-bin +%dir /usr/lib/initrd +%dir /usr/lib/pkgconfig +%dir /usr/share/gnome +%dir /usr/share/gnome/help +%dir /usr/share/gnome/wm-properties +%dir /usr/share/man/man[nl] +%lang(pl) %dir /usr/share/man/pl/mann +%dir /usr/share/pkgconfig +%dir /usr/share/sounds +%dir /usr/share/themes +%dir /usr/share/themes/Default +%dir /usr/share/wallpapers +%dir /usr/share/xsessions +%dir /usr/src/examples +%attr(700,root,root) %dir /var/lock/subsys +%dir %{_aclocaldir} +%dir %{_desktopdir} +%dir %{_desktopdir}/docklets +%dir %{_iconsdir} +%dir %{_pixmapsdir} +%{_fontsdir} +%dir %{_idldir} +%dir %{_privsepdir} +%if "%{_lib}" == "lib64" +%dir /lib64/security +%dir /usr/lib64/browser-plugins +%dir /usr/lib64/initrd +%dir /usr/lib64/pkgconfig +%endif + +%if %{with debuginfo} +%files debuginfo +%defattr(644,root,root,755) +%dir /usr/lib/debug +/usr/lib/debug/* + +%dir /usr/src/debug +/usr/src/debug/filesystem-debuginfo.files +%endif