commit d88043a2ab897b5e1d13161bd4985e1ff3b3a476
Author: Elan Ruusamäe <[email protected]>
Date:   Thu Sep 26 19:26:31 2013 +0300

    add docker group, to chgrp socket file with it

 lxc-docker.spec | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/lxc-docker.spec b/lxc-docker.spec
index d24ff87..0179403 100644
--- a/lxc-docker.spec
+++ b/lxc-docker.spec
@@ -28,13 +28,17 @@ Patch0:             bash-comp-2.patch
 URL:           http://github.com/dotcloud/docker
 BuildRequires: golang >= 1.1
 BuildRequires: rpmbuild(macros) >= 1.228
+Requires(post,preun):  /sbin/chkconfig
+Requires(postun):      /usr/sbin/groupdel
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
 Requires:      iptables
 Requires:      lxc
 Requires:      rc-scripts >= 0.4.0.10
 Requires:      tar
 Requires:      uname(release) >= 3.8
 Requires:      xz
-Requires(post,preun):  /sbin/chkconfig
+Provides:      group(docker)
 # only runs on x64 hosts for now:
 # https://github.com/dotcloud/docker/issues/136
 # https://github.com/dotcloud/docker/issues/611
@@ -113,6 +117,9 @@ install -d $RPM_BUILD_ROOT%{bash_compdir}
 cp -p contrib/docker.bash $RPM_BUILD_ROOT%{bash_compdir}/lxc-docker
 ln -s lxc-docker $RPM_BUILD_ROOT%{bash_compdir}/docker
 
+%pre
+%groupadd -g 296 docker
+
 %post
 /sbin/chkconfig --add %{name}
 %service -n %{name} restart
@@ -123,6 +130,11 @@ if [ "$1" = "0" ]; then
        /sbin/chkconfig --del %{name}
 fi
 
+%postun
+if [ "$1" = "0" ]; then
+       %groupremove docker
+fi
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lxc-docker.git/commitdiff/d88043a2ab897b5e1d13161bd4985e1ff3b3a476

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to