packages: varnish/varnish.spec - create varnish user/group

glen glen at pld-linux.org
Mon Jul 20 14:44:29 CEST 2009


Author: glen                         Date: Mon Jul 20 12:44:29 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- create varnish user/group

---- Files affected:
packages/varnish:
   varnish.spec (1.34 -> 1.35) 

---- Diffs:

================================================================
Index: packages/varnish/varnish.spec
diff -u packages/varnish/varnish.spec:1.34 packages/varnish/varnish.spec:1.35
--- packages/varnish/varnish.spec:1.34	Mon Jul 20 14:15:34 2009
+++ packages/varnish/varnish.spec	Mon Jul 20 14:44:24 2009
@@ -7,7 +7,7 @@
 Summary(pl.UTF-8):	Varnish - wydajny akcelerator HTTP
 Name:		varnish
 Version:	2.0.4
-Release:	0.1
+Release:	0.3
 License:	BSD
 Group:		Networking/Daemons/HTTP
 Source0:	http://dl.sourceforge.net/varnish/%{name}-%{version}.tar.gz
@@ -24,12 +24,17 @@
 BuildRequires:	libtool >= 2:1.5
 BuildRequires:	ncurses-devel
 Requires(post):	/sbin/ldconfig
+Requires(postun):	/sbin/ldconfig
+Requires(postun):	/usr/sbin/groupdel
+Requires(postun):	/usr/sbin/userdel
+Requires(pre):	/bin/id
+Requires(pre):	/usr/bin/getgid
+Requires(pre):	/usr/sbin/groupadd
+Requires(pre):	/usr/sbin/useradd
 Requires:	gcc
 Requires:	glibc-devel
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		_sysconfdir	/etc/%{name}
-
 %description
 The goal of the Varnish project is to develop a state-of-the-art,
 high-performance HTTP accelerator.
@@ -98,7 +103,7 @@
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/varnish
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/varnish
-install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/default.vcl
+install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/default.vcl
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -108,7 +113,17 @@
 /sbin/chkconfig --add varnish
 %service %{name} restart
 
-%postun	-p /sbin/ldconfig
+%pre
+%groupadd -g 241 %{name}
+%useradd -u 241 -d /var/lib/%{name} -g %{name} -c "Varnishd User" %{name}
+
+%postun
+/sbin/ldconfig
+if [ "$1" = "0" ]; then
+	%userremove %{name}
+	%groupremove %{name}
+fi
+
 
 %preun
 if [ "$1" = "0" ]; then
@@ -119,19 +134,20 @@
 %files
 %defattr(644,root,root,755)
 %doc LICENSE README ChangeLog
-%dir %{_sysconfdir}
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/default.vcl
+%dir %{_sysconfdir}/%{name}
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/default.vcl
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/varnish
 %attr(754,root,root) /etc/rc.d/init.d/varnish
 %attr(755,root,root) %{_sbindir}/varnishd
-%attr(755,root,root) %{_bindir}/*
-%attr(755,root,root) %{_libdir}/*.so.*.*.*
+%attr(755,root,root) %{_bindir}/varnish*
+%attr(755,root,root) %{_libdir}/libvarnish*.so.*.*.*
+%attr(755,root,root) %{_libdir}/libvcl.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libvarnish*.so.1
 %attr(755,root,root) %ghost %{_libdir}/libvcl.so.1
-/var/lib/varnish
-/var/run/varnish
 %{_mandir}/man1/*
 %{_mandir}/man7/*
+/var/lib/varnish
+/var/run/varnish
 
 %files devel
 %defattr(644,root,root,755)
@@ -150,6 +166,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.35  2009/07/20 12:44:24  glen
+- create varnish user/group
+
 Revision 1.34  2009/07/20 12:15:34  glen
 - disable ppc too: error: thread-local storage not supported for this target
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/varnish/varnish.spec?r1=1.34&r2=1.35&f=u



More information about the pld-cvs-commit mailing list