[packages/filesystem] - can't use any non-root groups in this package and not depend on setup package, do similar workardo
glen
glen at pld-linux.org
Wed Oct 31 07:42:21 CET 2012
commit aefd25979c44a66fc4eecfc32a27d2d119f31d76
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Wed Oct 31 08:41:13 2012 +0200
- can't use any non-root groups in this package and not depend on setup package, do similar workardound as FHS package
filesystem.spec | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
---
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 <lua>
+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
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/filesystem.git/commitdiff/bca6232882d14ac3d685f02dfdaacfa6295ec948
More information about the pld-cvs-commit
mailing list