]> git.pld-linux.org Git - packages/docker.git/commitdiff
add docker group, to chgrp socket file with it
authorElan Ruusamäe <glen@delfi.ee>
Thu, 26 Sep 2013 16:26:31 +0000 (19:26 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Thu, 26 Sep 2013 16:26:31 +0000 (19:26 +0300)
lxc-docker.spec

index d24ff87ce445ff00092f7fece6aa1e878f104c66..01794030659f11108404a2989024f3ee18ca1b4c 100644 (file)
@@ -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
 
This page took 0.041061 seconds and 4 git commands to generate.