root/trunk/varnish-cache/redhat/varnish.spec @ 4346

Revision 4346, 15.7 KB (checked in by ingvar, 10 months ago)

Some changelog items from Fedora

  • Property svn:keywords set to Id
Line 
1Summary: High-performance HTTP accelerator
2Name: varnish
3Version: 2.0.5
4Release: 1%{?dist}
5License: BSD
6Group: System Environment/Daemons
7URL: http://www.varnish-cache.org/
8Source0: http://downloads.sourceforge.net/varnish/varnish-%{version}.tar.gz
9#Patch0: varnish.varnishtest_debugflag.patch
10#Patch1: varnish.s390x_pagesize.patch
11#Patch2: varnish.sparc_pagesize.patch
12BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
13# The svn sources needs autoconf, automake and libtool to generate a suitable
14# configure script. Release tarballs would not need this
15#BuildRequires: automake autoconf libtool
16BuildRequires: ncurses-devel libxslt groff
17Requires: varnish-libs = %{version}-%{release}
18Requires: logrotate
19Requires: ncurses
20Requires(pre): shadow-utils
21Requires(post): /sbin/chkconfig
22Requires(preun): /sbin/chkconfig
23Requires(preun): /sbin/service
24Requires(preun): initscripts
25
26# Varnish actually needs gcc installed to work. It uses the C compiler
27# at runtime to compile the VCL configuration files. This is by design.
28Requires: gcc
29
30%description
31This is the Varnish high-performance HTTP accelerator. Documentation
32wiki and additional information about Varnish is available on the following
33web site: http://www.varnish-cache.org/
34
35%package libs
36Summary: Libraries for %{name}
37Group: System Environment/Libraries
38BuildRequires: ncurses-devel
39#Obsoletes: libvarnish1
40
41%description libs
42Libraries for %{name}.
43Varnish is a high-performance HTTP accelerator.
44
45%package libs-devel
46Summary: Development files for %{name}-libs
47Group: System Environment/Libraries
48BuildRequires: ncurses-devel
49Requires: varnish-libs = %{version}-%{release}
50
51%description libs-devel
52Development files for %{name}-libs
53Varnish is a high-performance HTTP accelerator
54
55#%package libs-static
56#Summary: Files for static linking of %{name} library functions
57#Group: System Environment/Libraries
58#BuildRequires: ncurses-devel
59#Requires: varnish-libs-devel = %{version}-%{release}
60#
61#%description libs-static
62#Files for static linking of varnish library functions
63#Varnish is a high-performance HTTP accelerator
64
65%prep
66%setup -q
67#%setup -q -n varnish-cache
68
69# The svn sources needs to generate a suitable configure script
70# Release tarballs would not need this
71#./autogen.sh
72
73#%patch0 -p0
74#%patch1 -p0
75#%patch2 -p0
76
77# Hack to get 32- and 64-bits tests run concurrently on the same build machine
78case `uname -m` in
79        ppc64 | s390x | x86_64 | sparc64 )
80                sed -i '
81                        s,9001,9011,g;
82                        s,9080,9090,g;
83                        s,9081,9091,g;
84                        s,9082,9092,g;
85                        s,9180,9190,g;
86                ' bin/varnishtest/*.c bin/varnishtest/tests/*vtc
87                ;;
88        *)
89                ;;
90esac
91
92mkdir examples
93cp bin/varnishd/default.vcl etc/zope-plone.vcl examples
94
95%build
96
97# Remove "--disable static" if you want to build static libraries
98# jemalloc is not compatible with Red Hat's ppc* RHEL5 kernel koji server :-(
99%ifarch ppc64 ppc
100%configure --disable-static --localstatedir=/var/lib --disable-jemalloc
101%else
102%configure --disable-static --localstatedir=/var/lib
103%endif
104
105# We have to remove rpath - not allowed in Fedora
106# (This problem only visible on 64 bit arches)
107sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g;
108        s|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
109
110%{__make} %{?_smp_mflags}
111
112head -6 etc/default.vcl > redhat/default.vcl
113
114cat << EOF >> redhat/default.vcl
115backend default {
116  .host = "127.0.0.1";
117  .port = "80";
118}
119EOF
120
121tail -n +11 etc/default.vcl >> redhat/default.vcl
122
123%if 0%{?fedora}%{?rhel} == 0 || 0%{?rhel} <= 4 && 0%{?fedora} <= 8
124        # Old style daemon function
125        sed -i 's,--pidfile \$pidfile,,g;
126                s,status -p \$pidfile,status,g;
127                s,killproc -p \$pidfile,killproc,g' \
128        redhat/varnish.initrc redhat/varnishlog.initrc redhat/varnishncsa.initrc
129%endif
130
131%check
132# rhel5 on ppc64 is just too strange
133%ifarch ppc64
134        %if 0%{?rhel} > 4
135                cp bin/varnishd/.libs/varnishd bin/varnishd/lt-varnishd
136        %endif
137%endif
138
139LD_LIBRARY_PATH="lib/libvarnish/.libs:lib/libvarnishcompat/.libs:lib/libvarnishapi/.libs:lib/libvcl/.libs" bin/varnishd/varnishd -b 127.0.0.1:80 -C -n /tmp/foo
140%{__make} check LD_LIBRARY_PATH="../../lib/libvarnish/.libs:../../lib/libvarnishcompat/.libs:../../lib/libvarnishapi/.libs:../../lib/libvcl/.libs"
141
142# Remove uneccessary doc src files
143mkdir doc.src
144mv doc/*.xml doc/*.xsl doc/Makefile* doc.src
145
146%install
147rm -rf %{buildroot}
148make install DESTDIR=%{buildroot} INSTALL="install -p"
149
150# None of these for fedora
151find %{buildroot}/%{_libdir}/ -name '*.la' -exec rm -f {} ';'
152
153# Remove this line to build a devel package with symlinks
154#find %{buildroot}/%{_libdir}/ -name '*.so' -type l -exec rm -f {} ';'
155
156mkdir -p %{buildroot}/var/lib/varnish
157mkdir -p %{buildroot}/var/log/varnish
158mkdir -p %{buildroot}/var/run/varnish
159%{__install} -D -m 0644 redhat/default.vcl %{buildroot}%{_sysconfdir}/varnish/default.vcl
160%{__install} -D -m 0644 redhat/varnish.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/varnish
161%{__install} -D -m 0644 redhat/varnish.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/varnish
162%{__install} -D -m 0755 redhat/varnish.initrc %{buildroot}%{_initrddir}/varnish
163%{__install} -D -m 0755 redhat/varnishlog.initrc %{buildroot}%{_initrddir}/varnishlog
164%{__install} -D -m 0755 redhat/varnishncsa.initrc %{buildroot}%{_initrddir}/varnishncsa
165
166%clean
167rm -rf %{buildroot}
168
169%files
170%defattr(-,root,root,-)
171%{_sbindir}/*
172%{_bindir}/*
173%{_var}/lib/varnish
174%{_var}/log/varnish
175%{_mandir}/man1/*.1*
176%{_mandir}/man7/*.7*
177%doc INSTALL LICENSE README redhat/README.redhat ChangeLog
178%doc examples
179%doc doc
180%dir %{_sysconfdir}/varnish/
181%config(noreplace) %{_sysconfdir}/varnish/default.vcl
182%config(noreplace) %{_sysconfdir}/sysconfig/varnish
183%config(noreplace) %{_sysconfdir}/logrotate.d/varnish
184%{_initrddir}/varnish
185%{_initrddir}/varnishlog
186%{_initrddir}/varnishncsa
187
188%files libs
189%defattr(-,root,root,-)
190%{_libdir}/*.so.*
191%doc LICENSE
192
193%files libs-devel
194%defattr(-,root,root,-)
195%{_libdir}/libvarnish.so
196%{_libdir}/libvarnishapi.so
197%{_libdir}/libvarnishcompat.so
198%{_libdir}/libvcl.so
199%dir %{_includedir}/varnish
200%{_includedir}/varnish/shmlog.h
201%{_includedir}/varnish/shmlog_tags.h
202%{_includedir}/varnish/stat_field.h
203%{_includedir}/varnish/stats.h
204%{_includedir}/varnish/varnishapi.h
205%{_libdir}/pkgconfig/varnishapi.pc
206%doc LICENSE
207
208#%files libs-static
209#%{_libdir}/libvarnish.a
210#%{_libdir}/libvarnishapi.a
211#%{_libdir}/libvarnishcompat.a
212#%{_libdir}/libvcl.a
213#%doc LICENSE
214
215%pre
216getent group varnish >/dev/null || groupadd -r varnish
217getent passwd varnish >/dev/null || \
218        useradd -r -g varnish -d /var/lib/varnish -s /sbin/nologin \
219                -c "Varnish http accelerator user" varnish
220exit 0
221
222%post
223/sbin/chkconfig --add varnish
224/sbin/chkconfig --add varnishlog
225/sbin/chkconfig --add varnishncsa
226
227%preun
228if [ $1 -lt 1 ]; then
229  /sbin/service varnish stop > /dev/null 2>&1
230  /sbin/service varnishlog stop > /dev/null 2>&1
231  /sbin/service varnishncsa stop > /dev/null 2>%1
232  /sbin/chkconfig --del varnish
233  /sbin/chkconfig --del varnishlog
234  /sbin/chkconfig --del varnishncsa
235fi
236
237%post libs -p /sbin/ldconfig
238
239%postun libs -p /sbin/ldconfig
240
241%changelog
242* Mon Nov 09 2009 Ingvar Hagelund <ingvar@linpro.no> - 2.0.5-1
243- New upstream release
244
245* Thu Aug 13 2009 Ingvar Hagelund <ingvar@linpro.no> - 2.0.4-4
246- Added a sparc specific patch to libjemalloc.
247
248* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-3
249- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
250
251* Thu May 04 2009 Ingvar Hagelund <ingvar@linpro.no> - 2.0.4-2
252- Added a s390 specific patch to libjemalloc.
253
254* Fri Mar 27 2009 Ingvar Hagelund <ingvar@linpro.no> - 2.0.4-1
255  New upstream release 2.0.4
256
257* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-2
258- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
259
260* Wed Feb 11 2009 Ingvar Hagelund <ingvar@linpro.no> - 2.0.3-1
261  New upstream release 2.0.3. A bugfix and feature enhancement release
262
263* Fri Dec 12 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0.2-2
264  Added a fix for a timeout bug, backported from trunk
265
266* Mon Nov 10 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0.2-1
267  New upstream release 2.0.2. A bugfix release
268
269* Sun Nov 02 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0.1-2
270- Removed the requirement for kernel => 2.6.0. All supported
271  platforms meets this, and it generates strange errors in EPEL
272
273* Fri Oct 17 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0.1-1
274- 2.0.1 released, a bugfix release. New upstream sources
275- Package now also available in EPEL
276
277* Thu Oct 16 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-2
278- Readded the debugflag patch. It's so practical
279- Added a strange workaround for make check on ppc64
280
281* Wed Oct 15 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-1
282- 2.0 released. New upstream sources
283- Disabled jemalloc on ppc and ppc64. Added a note in README.redhat
284- Synced to upstream again. No more patches needed
285
286* Wed Oct 08 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.11.rc1
287- 2.0-rc1 released. New upstream sources
288- Added a patch for pagesize to match redhat's rhel5 ppc64 koji build boxes
289- Added a patch for test a00008, from r3269
290- Removed condrestart in postscript at upgrade. We don't want that
291
292* Fri Sep 26 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.10.beta2
293- 2.0-beta2 released. New upstream sources
294- Whitespace changes to make rpmlint more happy
295
296* Fri Sep 12 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.9.20080912svn3184
297- Added varnisnsca init script (Colin Hill)
298- Corrected varnishlog init script (Colin Hill)
299
300* Tue Sep 09 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.8.beta1
301- Added a patch from r3171 that fixes an endian bug on ppc and ppc64
302- Added a hack that changes the varnishtest ports for 64bits builds,
303  so they can run in parallell with 32bits build on same build host
304
305* Tue Sep 02 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.7.beta1
306- Added a patch from r3156 and r3157, hiding a legit errno in make check
307
308* Tue Sep 02 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.6.beta1
309- Added a commented option for max coresize in the sysconfig script
310- Added a comment in README.redhat about upgrading from 1.x to 2.0
311
312* Fri Aug 29 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.5.beta1
313- Bumped version numbers and source url for first beta release \o/
314- Added a missing directory to the libs-devel package (Michael Schwendt)
315- Added the LICENSE file to the libs-devel package
316- Moved make check to its proper place
317- Removed superfluous definition of lockfile in initscripts
318
319* Wed Aug 27 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.4.20080827svn3136
320- Fixed up init script for varnishlog too
321
322* Mon Aug 25 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.3.20080825svn3125
323- Fixing up init script according to newer Fedora standards
324- The build now runs the test suite after compiling
325- Requires initscripts
326- Change default.vcl from nothing but comments to point to localhost:80,
327
328* Mon Aug 18 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.2.tp2
329- Changed source, version and release to match 2.0-tp2
330
331* Thu Aug 14 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.1.20080814svn
332- default.vcl has moved
333- Added groff to build requirements
334
335* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.1.2-6
336- Autorebuild for GCC 4.3
337
338* Sat Dec 29 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.1.2-5
339- Added missing configuration examples
340- Corrected the license to "BSD"
341
342* Fri Dec 28 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.1.2-4
343- Build for fedora update
344
345* Fri Dec 28 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.1.2-2
346- Added missing changelog items
347
348* Thu Dec 20 2007 Stig Sandbeck Mathisen <ssm@linpro.no> - 1.1.2-1
349- Bumped the version number to 1.1.2.
350- Addeed build dependency on libxslt
351
352* Wed Sep 08 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.1.1-3
353- Added a patch, changeset 1913 from svn trunk. This makes varnish
354  more stable under specific loads.
355
356* Tue Sep 06 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.1.1-2
357- Removed autogen call (only diff from relase tarball)
358
359* Mon Aug 20 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.1.1-1
360- Bumped the version number to 1.1.1.
361
362* Tue Aug 14 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.1.svn
363- Update for 1.1 branch
364- Added the devel package for the header files and static library files
365- Added a varnish user, and fixed the init script accordingly
366
367* Thu Jul 05 2007 Dag-Erling SmÞrgrav <des@des.no> - 1.1-1
368- Bump Version and Release for 1.1
369
370* Mon May 28 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.4-3
371- Fixed initrc-script bug only visible on el4 (fixes #107)
372
373* Sun May 20 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.4-2
374- Repack from unchanged 1.0.4 tarball
375- Final review request and CVS request for Fedora Extras
376- Repack with extra obsoletes for upgrading from older sf.net package
377
378* Fri May 18 2007 Dag-Erling SmÞrgrav <des@des.no> - 1.0.4-1
379- Bump Version and Release for 1.0.4
380
381* Wed May 16 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.svn-20070517
382- Wrapping up for 1.0.4
383- Changes in sysconfig and init scripts. Syncing with files in
384  trunk/debian
385
386* Fri May 11 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.svn-20070511
387- Threw latest changes into svn trunk
388- Removed the conversion of manpages into utf8. They are all utf8 in trunk
389
390* Wed May 09 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.3-7
391- Simplified the references to the subpackage names
392- Added init and logrotate scripts for varnishlog
393
394* Mon Apr 23 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.3-6
395- Removed unnecessary macro lib_name
396- Fixed inconsistently use of brackets in macros
397- Added a condrestart to the initscript
398- All manfiles included, not just the compressed ones
399- Removed explicit requirement for ncurses. rpmbuild figures out the
400  correct deps by itself.
401- Added ulimit value to initskript and sysconfig file
402- Many thanks to Matthias Saou for valuable input
403
404* Mon Apr 16 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.3-5
405- Added the dist tag
406- Exchanged  RPM_BUILD_ROOT variable for buildroot macro
407- Removed stripping of binaries to create a meaningful debug package
408- Removed BuildRoot and URL from subpackages, they are picked from the
409  main package
410- Removed duplication of documentation files in the subpackages
411- 'chkconfig --list' removed from post script
412- Package now includes _sysconfdir/varnish/
413- Trimmed package information
414- Removed static libs and .so-symlinks. They can be added to a -devel package
415  later if anybody misses them
416
417* Wed Feb 28 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.3-4
418- More small specfile fixes for Fedora Extras Package
419  Review Request, see bugzilla ticket 230275
420- Removed rpath (only visible on x86_64 and probably ppc64)
421
422* Tue Feb 27 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.3-3
423- Made post-1.0.3 changes into a patch to the upstream tarball
424- First Fedora Extras Package Review Request
425
426* Fri Feb 23 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.3-2
427- A few other small changes to make rpmlint happy
428
429* Thu Feb 22 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.3-1
430- New release 1.0.3. See the general ChangeLog
431- Splitted the package into varnish, libvarnish1 and
432  libvarnish1-devel
433
434* Thu Oct 19 2006 Ingvar Hagelund <ingvar@linpro.no> - 1.0.2-7
435- Added a Vendor tag
436
437* Thu Oct 19 2006 Ingvar Hagelund <ingvar@linpro.no> - 1.0.2-6
438- Added redhat subdir to svn
439- Removed default vcl config file. Used the new upstream variant instead.
440- Based build on svn. Running autogen.sh as start of build. Also added
441  libtool, autoconf and automake to BuildRequires.
442- Removed rule to move varnishd to sbin. This is now fixed in upstream
443- Changed the sysconfig script to include a lot more nice features.
444  Most of these were ripped from the Debian package. Updated initscript
445  to reflect this.
446
447* Tue Oct 10 2006 Ingvar Hagelund <ingvar@linpro.no> - 1.0.1-3
448- Moved Red Hat specific files to its own subdirectory
449
450* Tue Sep 26 2006 Ingvar Hagelund <ingvar@linpro.no> - 1.0.1-2
451- Added gcc requirement.
452- Changed to an even simpler example vcl in to /etc/varnish (thanks, perbu)
453- Added a sysconfig entry
454
455* Fri Sep 22 2006 Ingvar Hagelund <ingvar@linpro.no> - 1.0.1-1
456- Initial build.
Note: See TracBrowser for help on using the browser.