r1846 - trunk/varnish-cache/redhat

ingvar at projects.linpro.no ingvar at projects.linpro.no
Tue Aug 14 23:57:59 CEST 2007


Author: ingvar
Date: 2007-08-14 23:57:58 +0200 (Tue, 14 Aug 2007)
New Revision: 1846

Modified:
   trunk/varnish-cache/redhat/varnish.spec
   trunk/varnish-cache/redhat/varnish.sysconfig
Log:
* Tue Aug 14 2007 Ingvar Hagelund <ingvar at linpro.no> - 1.1.svn
- Update for 1.1 branch
- Added the devel package for the header files and static library files
- Added a varnish user, and fixed the init script accordingly



Modified: trunk/varnish-cache/redhat/varnish.spec
===================================================================
--- trunk/varnish-cache/redhat/varnish.spec	2007-08-13 19:39:12 UTC (rev 1845)
+++ trunk/varnish-cache/redhat/varnish.spec	2007-08-14 21:57:58 UTC (rev 1846)
@@ -1,7 +1,7 @@
 Summary: Varnish is a high-performance HTTP accelerator
 Name: varnish
-Version: 1.0.svn
-Release: 20070529%{?dist}
+Version: 1.1.svn
+Release: 200708142344%{?dist}
 License: BSD-like
 Group: System Environment/Daemons
 URL: http://www.varnish-cache.org/
@@ -10,6 +10,7 @@
 BuildRequires: ncurses-devel 
 Requires: kernel >= 2.6.0 varnish-libs = %{version}-%{release}
 Requires: logrotate
+Requires(pre): shadow-utils
 Requires(post): /sbin/chkconfig
 Requires(preun): /sbin/chkconfig
 Requires(preun): /sbin/service
@@ -34,17 +35,16 @@
 Libraries for %{name}.
 Varnish is a high-performance HTTP accelerator.
 
-## Removed the -devel package for now
-#%package devel
-#Summary: Development libraries for %{name}
-#Group: System Environment/Libraries
-#BuildRequires: ncurses-devel
-#Requires: kernel >= 2.6.0  varnish-libs = %{version}-%{release}
-#
-#%description devel
-#Development libraries for %{name}.
-#Varnish is a high-performance HTTP accelerator
+%package libs-devel
+Summary: Development files for %{name}-libs
+Group: System Environment/Libraries
+BuildRequires: ncurses-devel
+Requires: kernel >= 2.6.0 varnish-libs = %{version}-%{release}
 
+%description libs-devel
+Development files for %{name}-libs
+Varnish is a high-performance HTTP accelerator
+
 %prep
 %setup -q
 
@@ -55,8 +55,7 @@
 %build
 
 # Remove "--disable static" if you want to build static libraries 
-# (ie for the devel package)
-%configure --disable-static
+%configure --disable-static --localstatedir=/var/lib
 
 # We have to remove rpath - not allowed in Fedora
 # (This problem only visible on 64 bit arches)
@@ -82,8 +81,8 @@
 # None of these for fedora
 find %{buildroot}/%{_libdir}/ -name '*.la' -exec rm -f {} ';'
 
-# Remove this line to build the devel package
-find %{buildroot}/%{_libdir}/ -name '*.so' -type l -exec rm -f {} ';'
+# Remove this line to build a devel package with symlinks
+#find %{buildroot}/%{_libdir}/ -name '*.so' -type l -exec rm -f {} ';'
 
 mkdir -p %{buildroot}/var/lib/varnish
 mkdir -p %{buildroot}/var/log/varnish
@@ -118,13 +117,30 @@
 %{_libdir}/*.so.*
 %doc LICENSE
 
-## Removed the -devel package for now
-#%files devel
-#%defattr(-,root,root,-)
-#%{_libdir}/libvarnish.so
-#%{_libdir}/libvarnishapi.so
-#%{_libdir}/libvcl.so
+%files libs-devel
+%defattr(-,root,root,-)
+%{_libdir}/libvarnish.so
+%{_libdir}/libvarnishapi.so
+%{_libdir}/libvcl.so
+%{_includedir}/varnish/shmlog.h
+%{_includedir}/varnish/shmlog_tags.h
+%{_includedir}/varnish/stat_field.h
+%{_includedir}/varnish/stats.h
+%{_includedir}/varnish/varnishapi.h
+%{_libdir}/pkgconfig/varnishapi.pc
+#%{_libdir}/libvarnish.a
+#%{_libdir}/libvarnishapi.a
+#%{_libdir}/libvarnishcompat.a
+#%{_libdir}/libvcl.a
+%doc LICENSE
 
+%pre
+getent group varnish >/dev/null || groupadd -r varnish
+getent passwd varnish >/dev/null || \
+useradd -r -g varnish -d /var/lib/varnish -s /sbin/nologin \
+    -c "Varnish http accelerator user" varnish
+exit 0
+
 %post
 /sbin/chkconfig --add varnish
 /sbin/chkconfig --add varnishlog
@@ -148,6 +164,11 @@
 %postun libs -p /sbin/ldconfig
 
 %changelog
+* Tue Aug 14 2007 Ingvar Hagelund <ingvar at linpro.no> - 1.1.svn
+- Update for 1.1 branch
+- Added the devel package for the header files and static library files
+- Added a varnish user, and fixed the init script accordingly
+
 * Mon May 28 2007 Ingvar Hagelund <ingvar at linpro.no> - 1.0.4-3
 - Fixed initrc-script bug only visible on el4 (fixes #107)
 

Modified: trunk/varnish-cache/redhat/varnish.sysconfig
===================================================================
--- trunk/varnish-cache/redhat/varnish.sysconfig	2007-08-13 19:39:12 UTC (rev 1845)
+++ trunk/varnish-cache/redhat/varnish.sysconfig	2007-08-14 21:57:58 UTC (rev 1846)
@@ -17,6 +17,7 @@
 #DAEMON_OPTS="-a :6081 \
 #             -T localhost:6082 \
 #             -b localhost:8080 \
+#             -u varnish -g varnish \
 #             -s file,/var/lib/varnish/varnish_storage.bin,1G"
 
 
@@ -29,6 +30,7 @@
 DAEMON_OPTS="-a :6081 \
              -T localhost:6082 \
              -f /etc/varnish/default.vcl \
+             -u varnish -g varnish \
              -s file,/var/lib/varnish/varnish_storage.bin,1G"
 
 
@@ -78,6 +80,7 @@
 #              -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \
 #              -t ${VARNISH_TTL} \
 #              -w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \
+#              -u varnish -g varnish \
 #              -s ${VARNISH_STORAGE}"
 #
 




More information about the varnish-commit mailing list