From 40d126052bce73953e5cfe33dee97b6ef2926718 Mon Sep 17 00:00:00 2001 From: Ingvar Hagelund Date: Thu, 6 Sep 2007 20:10:56 +0000 Subject: [PATCH] Update to 1.1.1 --- .cvsignore | 2 +- sources | 2 +- varnish.spec | 92 ++++++++++++++++++++++++++++++++++++++-------------- 3 files changed, 70 insertions(+), 26 deletions(-) diff --git a/.cvsignore b/.cvsignore index 2688014..09ad09d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -varnish-1.0.4.tar.gz +varnish-1.1.1.tar.gz diff --git a/sources b/sources index 3a40371..965e98e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2a917e485700d44b28c0d0b626ea90d8 varnish-1.0.4.tar.gz +fb4159a46a32b8c5bceca88f22e999a5 varnish-1.1.1.tar.gz diff --git a/varnish.spec b/varnish.spec index fa3e21d..2c0e03c 100644 --- a/varnish.spec +++ b/varnish.spec @@ -1,7 +1,7 @@ Summary: Varnish is a high-performance HTTP accelerator Name: varnish -Version: 1.0.4 -Release: 2%{?dist} +Version: 1.1.1 +Release: 1%{?dist} License: BSD-like Group: System Environment/Daemons URL: http://www.varnish-cache.org/ @@ -10,6 +10,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 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 @@ -28,40 +29,51 @@ Summary: Libraries for %{name} Group: System Environment/Libraries BuildRequires: ncurses-devel #Requires: ncurses +#Obsoletes: libvarnish1 %description libs 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 +# The svn sources needs to generate a suitable configure script +# Release tarballs would not need this +#./autogen.sh + %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) -sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool -sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g; + s|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool %{__make} %{?_smp_mflags} sed -e ' s/8080/80/g ' etc/default.vcl > redhat/default.vcl + +%if "%dist" == "el4" + sed -i 's,daemon --pidfile \${\?PIDFILE}\?,daemon,g; + s,status -p \$PIDFILE,status,g; + s,killproc -p \$PIDFILE,killproc,g' \ + redhat/varnish.initrc redhat/varnishlog.initrc +%endif + %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} INSTALL="install -p" @@ -69,8 +81,8 @@ make install DESTDIR=%{buildroot} INSTALL="install -p" # 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 @@ -105,12 +117,30 @@ rm -rf %{buildroot} %{_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}/libvarnishcompat.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 @@ -135,9 +165,23 @@ fi %postun libs -p /sbin/ldconfig %changelog +* Mon Aug 20 2007 Ingvar Hagelund - 1.1.1-1 +- Bumped the version number to 1.1.1. +* Tue Aug 14 2007 Ingvar Hagelund - 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 + +* Thu Jul 05 2007 Dag-Erling Smørgrav - 1.1-1 +- Bump Version and Release for 1.1 + +* Mon May 28 2007 Ingvar Hagelund - 1.0.4-3 +- Fixed initrc-script bug only visible on el4 (fixes #107) + * Sun May 20 2007 Ingvar Hagelund - 1.0.4-2 - Repack from unchanged 1.0.4 tarball - Final review request and CVS request for Fedora Extras +- Repack with extra obsoletes for upgrading from older sf.net package * Fri May 18 2007 Dag-Erling Smørgrav - 1.0.4-1 - Bump Version and Release for 1.0.4