From: Elan Ruusamäe Date: Wed, 31 Oct 2012 06:41:13 +0000 (+0200) Subject: - can't use any non-root groups in this package and not depend on setup package,... X-Git-Tag: auto/th/filesystem-4.0-19~1 X-Git-Url: https://git.pld-linux.org/?a=commitdiff_plain;h=aefd25979c44a66fc4eecfc32a27d2d119f31d76;p=packages%2Ffilesystem.git - can't use any non-root groups in this package and not depend on setup package, do similar workardound as FHS package --- diff --git a/filesystem.spec b/filesystem.spec index 88b1eec..c2f06c0 100644 --- a/filesystem.spec +++ b/filesystem.spec @@ -1,3 +1,6 @@ +# NOTE +# - 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 # disable rpm generated debug package, we handle it differently here %define _enable_debug_packages 0 @@ -8,7 +11,7 @@ Summary: Common directories Summary(pl.UTF-8): Wspólne katalogi Name: filesystem Version: 4.0 -Release: 18 +Release: 19 License: GPL Group: Base BuildRequires: automake @@ -39,6 +42,9 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) # directory for *.idl files (for CORBA implementations) %define _idldir /usr/share/idl +# we have to use numeric uids/groups. see comment beginning of the spec +%define gid_logs 124 + %description This package contains common directories for packages that extend some programs functionality, but don't require them themselves. @@ -151,6 +157,9 @@ if posix.stat("/usr/include/X11", "type") == "link" then end %endif +%post -p +posix.chown("/var/log/archive", 0, %{gid_logs}) + %files -f %{name}.lang %defattr(644,root,root,755) %dir /boot/efi @@ -223,7 +232,7 @@ end %dir /var/lib/color %dir /var/lib/color/icc %attr(700,root,root) %dir /var/lock/subsys -%attr(751,root,logs) %dir /var/log/archive +%attr(751,root,root) %dir /var/log/archive %dir %{_aclocaldir} %dir %{_desktopdir} %dir %{_desktopdir}/docklets