2007-09-21 17:26:59 +00:00
|
|
|
%define haproxy_user haproxy
|
|
|
|
%define haproxy_group %{haproxy_user}
|
|
|
|
%define haproxy_home %{_localstatedir}/lib/haproxy
|
|
|
|
%define haproxy_confdir %{_sysconfdir}/haproxy
|
|
|
|
%define haproxy_datadir %{_datadir}/haproxy
|
|
|
|
|
|
|
|
Name: haproxy
|
2008-12-31 04:27:54 +00:00
|
|
|
Version: 1.3.15.7
|
|
|
|
Release: 1%{?dist}
|
2007-09-21 17:26:59 +00:00
|
|
|
Summary: HA-Proxy is a TCP/HTTP reverse proxy for high availability environments
|
|
|
|
|
|
|
|
Group: System Environment/Daemons
|
2008-06-29 03:55:49 +00:00
|
|
|
License: GPLv2+
|
2007-09-21 17:26:59 +00:00
|
|
|
|
|
|
|
URL: http://haproxy.1wt.eu/
|
|
|
|
Source0: http://haproxy.1wt.eu/download/1.3/src/haproxy-%{version}.tar.gz
|
|
|
|
Source1: %{name}.init
|
|
|
|
Source2: %{name}.cfg
|
|
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
BuildRequires: pcre-devel
|
|
|
|
|
|
|
|
|
|
|
|
Requires(pre): %{_sbindir}/useradd
|
|
|
|
Requires(post): /sbin/chkconfig
|
|
|
|
Requires(preun): /sbin/chkconfig, /sbin/service
|
|
|
|
Requires(postun): /sbin/service
|
|
|
|
|
|
|
|
%description
|
|
|
|
HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high
|
|
|
|
availability environments. Indeed, it can:
|
|
|
|
- route HTTP requests depending on statically assigned cookies
|
|
|
|
- spread the load among several servers while assuring server persistence
|
|
|
|
through the use of HTTP cookies
|
|
|
|
- switch to backup servers in the event a main one fails
|
|
|
|
- accept connections to special ports dedicated to service monitoring
|
|
|
|
- stop accepting connections without breaking existing ones
|
|
|
|
- add/modify/delete HTTP headers both ways
|
|
|
|
- block requests matching a particular pattern
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
2008-11-15 21:24:03 +00:00
|
|
|
|
2007-09-21 17:26:59 +00:00
|
|
|
%build
|
|
|
|
# No configure script is present, it is all done via make flags
|
2008-01-21 00:49:31 +00:00
|
|
|
# FC 7 and up is linux 2.6 so using linux26 as target.
|
2008-11-15 21:46:31 +00:00
|
|
|
|
|
|
|
# Recommended optimization option for x86 builds
|
|
|
|
regparm_opts=
|
2008-11-15 21:55:49 +00:00
|
|
|
%ifarch %ix86 x86_64
|
2008-11-15 21:46:31 +00:00
|
|
|
regparm_opts="USE_REGPARM=1"
|
2008-11-15 21:24:03 +00:00
|
|
|
%endif
|
|
|
|
|
2008-11-15 21:46:31 +00:00
|
|
|
make %{?_smp_mflags} CPU="generic" TARGET="linux26" USE_PCRE=1 ${regparm_opts} ADDINC="%{optflags}"
|
2007-09-21 17:26:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf %{buildroot}
|
2008-11-22 21:08:17 +00:00
|
|
|
make install-bin DESTDIR=%{buildroot} PREFIX=%{_prefix}
|
|
|
|
make install-man DESTDIR=%{buildroot} PREFIX=%{_prefix}
|
2008-11-15 21:24:03 +00:00
|
|
|
|
2007-09-21 17:26:59 +00:00
|
|
|
%{__install} -p -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
|
|
|
|
%{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{haproxy_confdir}/%{name}.cfg
|
|
|
|
%{__install} -d -m 0755 %{buildroot}%{haproxy_home}
|
|
|
|
%{__install} -d -m 0755 %{buildroot}%{haproxy_datadir}
|
2008-11-15 21:24:03 +00:00
|
|
|
|
2007-09-21 17:26:59 +00:00
|
|
|
for httpfile in $(find ./examples/errorfiles/ -type f)
|
|
|
|
do
|
|
|
|
%{__install} -p -m 0644 $httpfile %{buildroot}%{haproxy_datadir}
|
|
|
|
done
|
|
|
|
|
|
|
|
# convert all text files to utf8
|
|
|
|
for textfile in $(find ./ -type f -name '*.txt')
|
|
|
|
do
|
|
|
|
mv $textfile $textfile.old
|
|
|
|
iconv --from-code ISO8859-1 --to-code UTF-8 --output $textfile $textfile.old
|
|
|
|
rm -f $textfile.old
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
|
|
|
|
%pre
|
|
|
|
%{_sbindir}/useradd -c "HAProxy user" -s /bin/false -r -d %{haproxy_home} %{haproxy_user} 2>/dev/null || :
|
|
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
/sbin/chkconfig --add %{name}
|
|
|
|
|
|
|
|
|
|
|
|
%preun
|
|
|
|
if [ $1 = 0 ]; then
|
|
|
|
/sbin/service %{name} stop >/dev/null 2>&1
|
|
|
|
/sbin/chkconfig --del %{name}
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
if [ $1 -ge 1 ]; then
|
|
|
|
/sbin/service %{name} condrestart > /dev/null 2>&1 || :
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc doc/*
|
|
|
|
%doc examples/url-switching.cfg
|
|
|
|
%doc examples/acl-content-sw.cfg
|
|
|
|
%doc examples/content-sw-sample.cfg
|
|
|
|
%doc examples/cttproxy-src.cfg
|
|
|
|
%doc examples/haproxy.cfg
|
|
|
|
%doc examples/tarpit.cfg
|
|
|
|
%doc examples/tcp-splicing-sample.cfg
|
|
|
|
%doc CHANGELOG CONTRIB LICENSE README
|
|
|
|
%dir %{haproxy_datadir}
|
|
|
|
%dir %{haproxy_datadir}/*
|
|
|
|
%dir %{haproxy_confdir}
|
|
|
|
%config(noreplace) %{haproxy_confdir}/%{name}.cfg
|
|
|
|
%{_initrddir}/%{name}
|
|
|
|
%{_sbindir}/%{name}
|
2008-01-21 00:49:31 +00:00
|
|
|
%{_mandir}/man1/%{name}.1.gz
|
2007-09-21 17:26:59 +00:00
|
|
|
%attr(-,%{haproxy_user},%{haproxy_group}) %dir %{haproxy_home}
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2008-12-31 04:27:54 +00:00
|
|
|
* Tue Dec 30 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.3.15.7-1
|
|
|
|
- update to 1.3.15.7
|
|
|
|
- remove upstream patches, they are now part of source distribution
|
|
|
|
|
2008-11-22 21:08:17 +00:00
|
|
|
* Sat Nov 22 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.3.15.6-2
|
|
|
|
- apply upstream patches
|
|
|
|
|
2008-11-15 21:24:03 +00:00
|
|
|
* Sat Nov 15 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.3.15.6-1
|
|
|
|
- update to 1.3.15.6
|
|
|
|
- use new build targets from upstream
|
|
|
|
- add in recommended build options for x86 from upstream
|
|
|
|
|
2008-06-29 03:55:49 +00:00
|
|
|
* Sat Jun 28 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.3.14.6-1
|
|
|
|
- update to 1.3.14.6
|
|
|
|
- remove gcc 4.3 patch, it has been applied upstream
|
|
|
|
- remove MIT license as that code has been removed from upstream
|
|
|
|
|
2008-04-15 04:36:36 +00:00
|
|
|
* Mon Apr 14 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.3.14.4-1
|
|
|
|
- update to 1.3.14.4
|
|
|
|
|
2008-03-16 07:13:13 +00:00
|
|
|
* Sun Mar 16 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.3.14.3-1
|
|
|
|
- update to 1.3.14.3
|
|
|
|
|
2008-03-01 20:43:21 +00:00
|
|
|
* Sat Mar 01 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.3.14.2-4
|
|
|
|
- apply the gcc 4.3 patch to the build process
|
|
|
|
|
2008-03-01 20:28:08 +00:00
|
|
|
* Sat Mar 01 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.3.14.2-3
|
|
|
|
- fix gcc 4.3 bug [#434144]
|
|
|
|
- update init script to properly reload configuration
|
|
|
|
|
2008-02-19 06:17:56 +00:00
|
|
|
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.3.14.2-2
|
|
|
|
- Autorebuild for GCC 4.3
|
|
|
|
|
2008-01-21 00:49:31 +00:00
|
|
|
* Sun Jan 20 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.3.14.2-1
|
|
|
|
- update to 1.3.14.2
|
|
|
|
- update make flags that changed with this upstream release
|
|
|
|
- added man page installation
|
|
|
|
|
2007-12-16 07:44:40 +00:00
|
|
|
* Sun Dec 16 2007 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.3.14-1
|
|
|
|
- update to 1.3.14
|
|
|
|
|
2007-11-06 05:27:39 +00:00
|
|
|
* Mon Nov 05 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 1.3.12.4-1
|
|
|
|
- update to 1.3.12.4
|
|
|
|
|
2007-11-01 16:51:48 +00:00
|
|
|
* Thu Nov 01 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 1.3.12.3-1
|
|
|
|
- update to 1.3.12.3
|
2007-11-06 05:27:39 +00:00
|
|
|
|
2007-11-01 16:51:48 +00:00
|
|
|
* Fri Sep 21 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 1.3.12.2-3
|
|
|
|
- fix init script 'reload' task
|
|
|
|
|
2007-09-21 17:26:59 +00:00
|
|
|
* Thu Sep 20 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 1.3.12.2-2
|
|
|
|
- update License field
|
|
|
|
|
|
|
|
* Thu Sep 20 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 1.3.12.2-1
|
|
|
|
- update to 1.3.12.2
|
|
|
|
- remove the upstream patch
|
|
|
|
|
|
|
|
* Tue Sep 18 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 1.3.12.1-1
|
|
|
|
- switch to 1.3.12.1 branch
|
|
|
|
- add patch from upstream with O'Reilly licensing updates.
|
|
|
|
- convert ISO-8859-1 doc files to UTF-8
|
|
|
|
|
|
|
|
* Sat Mar 24 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 1.2.17-2
|
|
|
|
- addition of haproxy user
|
|
|
|
- add license information
|
|
|
|
|
|
|
|
* Fri Mar 23 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 1.2.17-1
|
|
|
|
- initial packaging
|