# - do not use any other user/group than "root", as then we have to depend on "setup" package.
# see the gid_xxx macros and post scriptlet
# FIXME: verify shows changed groups of dirs changed this way
-
-# 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: 4.0
-Release: 44
+Version: 4.1
+Release: 4
License: GPL
Group: Base
BuildRequires: automake
BuildRequires: mktemp
BuildRequires: rpm >= 4.4.9-56
-Requires: FHS >= 2.3-15
+Requires: FHS >= 3.0
Provides: browser-plugins(%{_target_base_arch})
%ifarch %{x8664}
Provides: browser-plugins(i386)
%endif
Provides: filesystem-debuginfo = %{version}-%{release}
Obsoletes: filesystem-debuginfo < 3.0-36
+Conflicts: X11-libs < 1:7.7
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
# Adapter: This file does not like to be adapterized!
+# disable rpm generated debug package, we handle it differently here
+%define _enable_debug_packages 0
+
%if "%{_lib}" == "lib64"
%define with_lib64 1
%endif
+# avoid rpm 4.4.9 adding rm -rf buildroot
+%define __spec_clean_body %{nil}
+
# directory for "privilege separation" chroot
%define _privsepdir /usr/share/empty
# directory for *.idl files (for CORBA implementations)
rm -rf $RPM_BUILD_ROOT
install -d \
- $RPM_BUILD_ROOT/{initrd,selinux,run,sys} \
- $RPM_BUILD_ROOT/etc/{NetworkManager/dispatcher.d,X11/xinit/{xinput,xinitrc}.d,certs,cron.d,default,logrotate.d,fonts/conf.d,modprobe.d,modules-load.d,pki/{CA,tls},security,skel,sysconfig,sysctl.d,tmpwatch,xdg/{autostart,menus}} \
+ $RPM_BUILD_ROOT/{initrd,selinux} \
+ $RPM_BUILD_ROOT/etc/{NetworkManager/dispatcher.d,X11/xinit/{xinput,xinitrc}.d,certs,cron.d,default,logrotate.d,fonts/conf.d,modprobe.d,modules-load.d,pki/{CA,tls},security,skel,sysconfig,sysctl.d,tmpwatch,xdg/{autostart,colors,menus}} \
$RPM_BUILD_ROOT/home/{users,services} \
$RPM_BUILD_ROOT/lib/{firmware,security,udev/{hwdb.d,rules.d}} \
$RPM_BUILD_ROOT/usr/include/{security,X11} \
$RPM_BUILD_ROOT/usr/lib/{ConsoleKit/run-session.d,browser-plugins,cgi-bin,cmake,mozilla/extensions,pkcs11,pkgconfig,initrd} \
- $RPM_BUILD_ROOT/usr/share/{appdata,augeas/lenses/tests,backgrounds,cmake/Modules,color/icc,fontconfig/conf.avail,gnome/help,mate/help,man/man{n,l},man/pl/mann,ppd,pkgconfig,soundfonts,sounds,themes/Default,thumbnailers,vala/vapi,wallpapers,wayland-sessions,xsessions} \
+ $RPM_BUILD_ROOT/usr/share/{appdata,augeas/lenses/tests,backgrounds,cmake/Modules,defaults,factory/etc/pam.d,fontconfig/conf.avail,gnome/help,mate/help,man/man{n,l},man/pl/mann,metainfo,pkgconfig,soundfonts,sounds,themes/Default,thumbnailers,vala/vapi,wallpapers,wayland-sessions,xdg-desktop-portal/portals,xsessions} \
$RPM_BUILD_ROOT/usr/src/examples \
- $RPM_BUILD_ROOT/var/lib/color/icc \
$RPM_BUILD_ROOT/var/lock/subsys \
$RPM_BUILD_ROOT/var/log/archive \
$RPM_BUILD_ROOT{%{_aclocaldir},%{_desktopdir}/{docklets,screensavers},%{_iconsdir},%{_pixmapsdir}} \
$RPM_BUILD_ROOT/usr/lib/debug/lib/security \
$RPM_BUILD_ROOT/usr/src/debug
-# create this for %clean
-tar -cf checkfiles.tar -C $RPM_BUILD_ROOT .
-
%clean
-mkdir -p $RPM_BUILD_ROOT
-tar -xf checkfiles.tar -C $RPM_BUILD_ROOT
cd $RPM_BUILD_ROOT
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 | \
+ find | sed -e 's|^\.||g' -e '/^$/d' | LC_ALL=C sort | grep -v $TMPFILE | \
grep -E -v '^/(boot|etc|etc/X11|home|lib|lib64|libx32|usr|usr/include|usr/lib|usr/lib64|usr/libx32|usr/share|usr/share/man|usr/share/man/pl|usr/src|var|var/lib|var/lock|var/log)$' > $TMPFILE
- # find finds also '.', so use option -B for diff
- rpm -qpl $RPMFILE $RPMFILE2 | grep -v '^/$' | LC_ALL=C sort | diff -uB - $TMPFILE || :
-
+ if rpm -qpl $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"
+ exit 1
+ fi
rm -f $TMPFILE
}
%dir /etc/tmpwatch
%dir /etc/xdg
%dir /etc/xdg/autostart
+%dir /etc/xdg/colors
%dir /etc/xdg/menus
%dir /etc/NetworkManager
%dir /etc/NetworkManager/dispatcher.d
%dir /lib/udev
%dir /lib/udev/hwdb.d
%dir /lib/udev/rules.d
-# tmpfs mounted by rc-scripts
-%attr(1777,root,root) %dir /run
%dir /selinux
-%dir /sys
%dir /usr/include/X11
%dir /usr/include/security
%dir /usr/lib/ConsoleKit
%dir /usr/share/backgrounds
%dir /usr/share/cmake
%dir /usr/share/cmake/Modules
-%dir /usr/share/color
-%dir /usr/share/color/icc
+%dir /usr/share/defaults
+%dir /usr/share/factory
+%dir /usr/share/factory/etc
+%dir /usr/share/factory/etc/pam.d
%dir /usr/share/fontconfig
%dir /usr/share/fontconfig/conf.avail
%dir /usr/share/gnome
%dir /usr/share/gnome/help
%dir /usr/share/mate
%dir /usr/share/mate/help
+%dir /usr/share/metainfo
%dir /usr/share/help
%dir /usr/share/help/C
%dir /usr/share/man/man[nl]
%lang(pl) %dir /usr/share/man/pl/mann
%dir /usr/share/pkgconfig
-%dir /usr/share/ppd
%dir /usr/share/soundfonts
%dir /usr/share/sounds
%dir /usr/share/themes
%dir /usr/share/vala/vapi
%dir /usr/share/wallpapers
%dir /usr/share/wayland-sessions
+%dir /usr/share/xdg-desktop-portal
+%dir /usr/share/xdg-desktop-portal/portals
%dir /usr/share/xsessions
%dir /usr/src/examples
-%dir /var/lib/color
-%dir /var/lib/color/icc
%attr(700,root,root) %dir /var/lock/subsys
%attr(751,root,root) %dir /var/log/archive
%dir %{_aclocaldir}
%dir /usr/lib64/pkcs11
%dir /usr/lib64/pkgconfig
%endif
-%if %{with libx32}
-%dir /libx32/security
-%dir /usr/libx32/browser-plugins
-%dir /usr/libx32/cmake
-%dir /usr/libx32/initrd
-%dir /usr/libx32/mozilla
-%dir /usr/libx32/mozilla/extensions
-%dir /usr/libx32/pkcs11
-%dir /usr/libx32/pkgconfig
-%endif
# debuginfo
%dir /usr/lib/debug