haproxy/haproxy.spec

376 lines
13 KiB
RPMSpec
Raw Normal View History

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
2013-04-22 14:55:41 +00:00
%global _hardened_build 1
2007-09-21 17:26:59 +00:00
Name: haproxy
2015-05-05 13:56:25 +00:00
Version: 1.5.12
2015-05-05 14:25:45 +00:00
Release: %{?dist}
2014-06-20 03:42:30 +00:00
Summary: HAProxy reverse proxy for high availability environments
2007-09-21 17:26:59 +00:00
Group: System Environment/Daemons
2008-06-29 03:55:49 +00:00
License: GPLv2+
2007-09-21 17:26:59 +00:00
2014-07-15 15:34:14 +00:00
URL: http://www.haproxy.org/
Source0: http://www.haproxy.org/download/1.5/src/haproxy-%{version}.tar.gz
2012-02-20 00:29:09 +00:00
Source1: %{name}.service
2007-09-21 17:26:59 +00:00
Source2: %{name}.cfg
Source3: %{name}.logrotate
Source4: %{name}.sysconfig
Source5: halog.1
2007-09-21 17:26:59 +00:00
2014-06-20 03:42:30 +00:00
Patch0: halog-unused-variables.patch
2014-07-15 15:34:14 +00:00
Patch1: iprange-return-type.patch
2015-05-05 14:25:45 +00:00
Patch2: haproxy-tcp-user-timeout.patch
2014-03-27 23:56:39 +00:00
2012-02-20 00:29:09 +00:00
BuildRequires: pcre-devel
2014-06-20 04:32:21 +00:00
BuildRequires: zlib-devel
BuildRequires: openssl-devel
2012-02-20 00:29:09 +00:00
BuildRequires: systemd-units
2007-09-21 17:26:59 +00:00
2012-02-20 00:29:09 +00:00
Requires(pre): shadow-utils
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
2007-09-21 17:26:59 +00:00
%description
2014-06-20 03:42:30 +00:00
HAProxy is a TCP/HTTP reverse proxy which is particularly suited for high
2007-09-21 17:26:59 +00:00
availability environments. Indeed, it can:
2014-06-20 03:42:30 +00:00
- route HTTP requests depending on statically assigned cookies
- spread 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, and delete HTTP headers in both directions
- block requests matching particular patterns
2014-07-15 15:34:14 +00:00
- report detailed status to authenticated users from a URI
2014-06-20 03:42:30 +00:00
intercepted from the application
2007-09-21 17:26:59 +00:00
%prep
%setup -q
2014-03-27 23:56:39 +00:00
%patch0 -p0
2014-07-15 15:34:14 +00:00
%patch1 -p0
%patch2 -p1
2007-09-21 17:26:59 +00:00
%build
regparm_opts=
2008-11-15 21:55:49 +00:00
%ifarch %ix86 x86_64
regparm_opts="USE_REGPARM=1"
2008-11-15 21:24:03 +00:00
%endif
2014-07-15 15:34:14 +00:00
%{__make} %{?_smp_mflags} CPU="generic" TARGET="linux2628" USE_OPENSSL=1 USE_PCRE=1 USE_ZLIB=1 ${regparm_opts} ADDINC="%{optflags}" USE_LINUX_TPROXY=1 ADDLIB="%{__global_ldflags}"
2010-05-30 14:57:58 +00:00
pushd contrib/halog
2014-06-20 03:42:30 +00:00
%{__make} ${halog} OPTIMIZE="%{optflags}"
2010-05-30 14:57:58 +00:00
popd
2007-09-21 17:26:59 +00:00
2014-06-24 21:28:57 +00:00
pushd contrib/iprange
%{__make} iprange OPTIMIZE="%{optflags}"
popd
2007-09-21 17:26:59 +00:00
%install
2014-06-20 03:42:30 +00:00
%{__make} install-bin DESTDIR=%{buildroot} PREFIX=%{_prefix}
%{__make} install-man DESTDIR=%{buildroot} PREFIX=%{_prefix}
2008-11-15 21:24:03 +00:00
2012-02-20 00:29:09 +00:00
%{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
2007-09-21 17:26:59 +00:00
%{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{haproxy_confdir}/%{name}.cfg
%{__install} -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
%{__install} -p -D -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
%{__install} -p -D -m 0644 %{SOURCE5} %{buildroot}%{_mandir}/man1/halog.1
2007-09-21 17:26:59 +00:00
%{__install} -d -m 0755 %{buildroot}%{haproxy_home}
%{__install} -d -m 0755 %{buildroot}%{haproxy_datadir}
2010-05-30 14:57:58 +00:00
%{__install} -d -m 0755 %{buildroot}%{_bindir}
%{__install} -p -m 0755 ./contrib/halog/halog %{buildroot}%{_bindir}/halog
2014-06-24 21:28:57 +00:00
%{__install} -p -m 0755 ./contrib/iprange/iprange %{buildroot}%{_bindir}/iprange
2014-07-15 15:34:14 +00:00
%{__install} -p -m 0644 ./examples/errorfiles/* %{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
2014-07-15 15:34:14 +00:00
%{__rm} -rf ./examples/errorfiles/
find ./examples/* -type f ! -name "*.cfg" -exec %{__rm} -f "{}" \;
2007-09-21 17:26:59 +00:00
for textfile in $(find ./ -type f -name '*.txt')
do
2014-06-20 03:42:30 +00:00
%{__mv} $textfile $textfile.old
2007-09-21 17:26:59 +00:00
iconv --from-code ISO8859-1 --to-code UTF-8 --output $textfile $textfile.old
2014-06-20 03:42:30 +00:00
%{__rm} -f $textfile.old
done
2007-09-21 17:26:59 +00:00
%pre
2014-07-15 15:34:14 +00:00
getent group %{haproxy_group} >/dev/null || \
groupadd -r %{haproxy_group}
2012-02-20 00:29:09 +00:00
getent passwd %{haproxy_user} >/dev/null || \
2014-07-15 15:34:14 +00:00
useradd -r -g %{haproxy_user} -d %{haproxy_home} \
-s /sbin/nologin -c "haproxy" %{haproxy_user}
2012-02-20 00:29:09 +00:00
exit 0
2007-09-21 17:26:59 +00:00
%post
%systemd_post %{name}.service
2007-09-21 17:26:59 +00:00
%preun
%systemd_preun %{name}.service
2012-02-20 00:29:09 +00:00
2007-09-21 17:26:59 +00:00
%postun
%systemd_postun_with_restart %{name}.service
2012-02-20 00:29:09 +00:00
2007-09-21 17:26:59 +00:00
%files
2014-06-20 03:42:30 +00:00
%defattr(-,root,root,-)
2014-07-15 15:34:14 +00:00
%doc doc/* examples/*
%doc CHANGELOG LICENSE README ROADMAP VERSION
%dir %{haproxy_confdir}
2007-09-21 17:26:59 +00:00
%dir %{haproxy_datadir}
2011-09-22 09:18:22 +00:00
%{haproxy_datadir}/*
2007-09-21 17:26:59 +00:00
%config(noreplace) %{haproxy_confdir}/%{name}.cfg
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
2012-02-20 00:29:09 +00:00
%{_unitdir}/%{name}.service
2007-09-21 17:26:59 +00:00
%{_sbindir}/%{name}
2014-06-20 03:42:30 +00:00
%{_sbindir}/%{name}-systemd-wrapper
2010-05-30 14:57:58 +00:00
%{_bindir}/halog
2014-06-24 21:28:57 +00:00
%{_bindir}/iprange
2014-06-20 03:42:30 +00:00
%{_mandir}/man1/*
2007-09-21 17:26:59 +00:00
%attr(-,%{haproxy_user},%{haproxy_group}) %dir %{haproxy_home}
%changelog
2015-05-05 14:25:45 +00:00
* Tue May 05 2015 Ryan O'Hara <rohara@redhat.com> - 1.5.12-2
- Remove unused patches
2015-05-05 13:56:25 +00:00
* Tue May 05 2015 Ryan O'Hara <rohara@redhat.com> - 1.5.12-1
- Update to 1.5.12 (#1217922)
* Wed Mar 04 2015 Ryan O'Hara <rohara@redhat.com> - 1.5.11-4
- Rework systemd service and sysconfig file
* Wed Feb 11 2015 Ryan O'Hara <rohara@redhat.com> - 1.5.11-3
- Add sysconfig file
* Tue Feb 10 2015 Ryan O'Hara <rohara@redhat.com> - 1.5.11-2
- Add tcp-ut bind option to set TCP_USER_TIMEOUT (#1190783)
2015-02-01 16:58:11 +00:00
* Sun Feb 01 2015 Ryan O'Hara <rohara@redhat.com> - 1.5.11-1
- Update to 1.5.11 (#1188029)
2015-01-05 14:51:39 +00:00
* Mon Jan 05 2015 Ryan O'Hara <rohara@redhat.com> - 1.5.10-1
- Update to 1.5.10
2014-12-01 15:34:43 +00:00
* Mon Dec 01 2014 Ryan O'Hara <rohara@redhat.com> - 1.5.9-1
- Update to 1.5.9
2014-11-01 14:07:19 +00:00
* Sat Nov 01 2014 Ryan O'Hara <rohara@redhat.com> - 1.5.8-1
- Update to 1.5.8
2014-10-31 01:20:44 +00:00
* Thu Oct 30 2014 Ryan O'Hara <rohara@redhat.com> - 1.5.7-1
- Update to 1.5.7
2014-10-20 17:57:21 +00:00
* Mon Oct 20 2014 Ryan O'Hara <rohara@redhat.com> - 1.5.6-1
- Update to 1.5.6
2014-10-08 12:46:34 +00:00
* Wed Oct 08 2014 Ryan O'Hara <rohara@redhat.com> - 1.5.5-1
- Update to 1.5.5
2014-09-02 22:02:31 +00:00
* Tue Sep 02 2014 Ryan O'Hara <rohara@redhat.com> - 1.5.4-1
2014-09-02 22:01:27 +00:00
- Update to 1.5.4
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
2014-08-06 18:07:29 +00:00
* Wed Aug 06 2014 Ryan O'Hara <rohara@redhat.com> - 1.5.3-2
- Use haproxy-systemd-wrapper in service file (#1126955)
2014-07-25 20:28:24 +00:00
* Fri Jul 25 2014 Ryan O'Hara <rohara@redhat.com> - 1.5.3-1
- Update to 1.5.3
2014-07-15 15:34:14 +00:00
* Tue Jul 15 2014 Ryan O'Hara <rohara@redhat.com> - 1.5.2-1
- Update to 1.5.2
2014-06-24 21:28:57 +00:00
* Tue Jun 24 2014 Ryan O'Hara <rohara@redhat.com> - 1.5.1-1
- Update to 1.5.1
2014-06-20 04:32:21 +00:00
* Thu Jun 19 2014 Ryan O'Hara <rohara@redhat.com> - 1.5.0-2
- Build with zlib and openssl support
2014-06-20 03:42:30 +00:00
* Thu Jun 19 2014 Ryan O'Hara <rohara@redhat.com> - 1.5.0-1
- Update to 1.5.0
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.25-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2014-03-27 23:56:39 +00:00
* Thu Mar 27 2014 Ryan O'Hara <rohara@redhat.com> - 1.4.25-1
- Update to 1.4.25
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.24-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Jun 17 2013 Ryan O'Hara <rohara@redhat.com> - 1.4.24-1
- Update to 1.4.24 (CVE-2013-2174, #975160)
2013-04-30 14:23:17 +00:00
* Tue Apr 30 2013 Ryan O'Hara <rohara@redhat.com> - 1.4.23-3
- Build with PIE flags (#955182)
2013-04-22 14:55:41 +00:00
* Mon Apr 22 2013 Ryan O'Hara <rohara@redhat.com> - 1.4.23-2
- Build with PIE flags (#955182)
* Tue Apr 02 2013 Ryan O'Hara <rohara@redhat.com> - 1.4.23-1
- Update to 1.4.23 (CVE-2013-1912, #947697)
- Drop supplementary groups after setuid/setgid (#894626)
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.22-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Fri Oct 12 2012 Robin Lee <cheeselee@fedoraproject.org> - 1.4.22-1
- Update to 1.4.22 (CVE-2012-2942, #824544)
- Use linux2628 build target
- No separate x86_64 build target for halog
- halog build honors rpmbuild optflags
- Specfile cleanup
* Mon Sep 17 2012 Václav Pavlín <vpavlin@redhat.com> - 1.4.20-3
- Scriptlets replaced with new systemd macros (#850143)
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.20-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
2012-04-04 01:32:14 +00:00
* Tue Apr 03 2012 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.4.20-1
- Update to 1.4.20
2012-02-20 00:59:55 +00:00
* Sun Feb 19 2012 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.4.19-4
- fix haproxy.services file
2012-02-20 00:29:09 +00:00
* Sun Feb 19 2012 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.4.19-3
- Update to use systemd fixing bug #770305
2012-02-10 13:46:27 +00:00
* Fri Feb 10 2012 Petr Pisar <ppisar@redhat.com> - 1.4.19-2
- Rebuild against PCRE 8.30
2012-01-29 18:53:55 +00:00
* Sun Jan 29 2012 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.4.19-1
- Update to 1.4.19
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.18-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
2011-09-22 09:18:22 +00:00
* Thu Sep 22 2011 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.4.18-1
- Update to 1.4.18
2011-04-27 04:16:02 +00:00
* Tue Apr 26 2011 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.4.15-1
- Update to 1.4.15
2011-02-28 04:46:01 +00:00
* Sun Feb 27 2011 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.4.11-1
- update to 1.4.11
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
2011-02-28 04:46:01 +00:00
* Sun Dec 12 2010 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.4.9-1
- update to 1.4.9
2010-06-20 23:30:01 +00:00
* Sun Jun 20 2010 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.4.8-1
- update to 1.4.8
2010-05-30 14:57:58 +00:00
* Sun May 30 2010 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.4.6-1
- update to 1.4.6
2010-02-19 04:36:51 +00:00
* Thu Feb 18 2010 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.3.23-1
- update to 1.3.23
* Sat Oct 17 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.3.22-1
- update to 1.3.22
- added logrotate configuration
2009-10-12 06:14:45 +00:00
* Mon Oct 12 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.3.21-1
- update to 1.3.21
2009-10-12 03:14:40 +00:00
* Sun Oct 11 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.3.20-1
- update to 1.3.20
* Sun Aug 02 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.3.19-1
2009-08-02 23:20:20 +00:00
- update to 1.3.19
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.18-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
2009-05-17 21:35:41 +00:00
* Sun May 17 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.3.18-1
- update to 1.3.18
* Sat Apr 11 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.3.17-1
2009-04-11 22:39:21 +00:00
- Update to 1.3.17
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.15.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
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
* 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
* 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