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