Update to 1.5.0

This commit is contained in:
Ryan O'Hara 2014-06-19 22:42:30 -05:00
parent 0d4a7e368b
commit 8cd8592694
4 changed files with 142 additions and 35 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@ haproxy-1.4.8.tar.gz
/haproxy-1.4.23.tar.gz /haproxy-1.4.23.tar.gz
/haproxy-1.4.24.tar.gz /haproxy-1.4.24.tar.gz
/haproxy-1.4.25.tar.gz /haproxy-1.4.25.tar.gz
/haproxy-1.5.0.tar.gz

108
halog.1 Normal file
View File

@ -0,0 +1,108 @@
.TH HALOG "1" "July 2013" "halog" "User Commands"
.SH NAME
halog \- HAProxy log statistics reporter
.SH SYNOPSIS
.B halog
[\fI-h|--help\fR]
.br
.B halog
[\fIoptions\fR] <LOGFILE
.SH DESCRIPTION
.B halog
reads HAProxy log data from stdin and extracts and displays lines matching
user-specified criteria.
.SH OPTIONS
.SS Input filters \fR(several filters may be combined)
.TP
\fB\-H\fR
Only match lines containing HTTP logs (ignore TCP)
.TP
\fB\-E\fR
Only match lines without any error (no 5xx status)
.TP
\fB\-e\fR
Only match lines with errors (status 5xx or negative)
.TP
\fB\-rt\fR|\fB\-RT\fR <time>
Only match response times larger|smaller than <time>
.TP
\fB\-Q\fR|\fB\-QS\fR
Only match queued requests (any queue|server queue)
.TP
\fB\-tcn\fR|\fB\-TCN\fR <code>
Only match requests with/without termination code <code>
.TP
\fB\-hs\fR|\fB\-HS\fR <[min][:][max]>
Only match requests with HTTP status codes within/not within min..max. Any of
them may be omitted. Exact code is checked for if no ':' is specified.
.SS
Modifiers
.TP
\fB\-v\fR
Invert the input filtering condition
.TP
\fB\-q\fR
Don't report errors/warnings
.TP
\fB\-m\fR <lines>
Limit output to the first <lines> lines
.SS
Output filters \fR\- only one may be used at a time
.TP
\fB\-c\fR
Only report the number of lines that would have been printed
.TP
\fB\-pct\fR
Output connect and response times percentiles
.TP
\fB\-st\fR
Output number of requests per HTTP status code
.TP
\fB\-cc\fR
Output number of requests per cookie code (2 chars)
.TP
\fB\-tc\fR
Output number of requests per termination code (2 chars)
.TP
\fB\-srv\fR
Output statistics per server (time, requests, errors)
.TP
\fB\-u\fR*
Output statistics per URL (time, requests, errors)
.br
Additional characters indicate the output sorting key:
.RS
.TP
\fB\-u\fR
URL
.TP
\fB\-uc\fR
Request count
.TP
\fB\-ue\fR
Error count
.TP
\fB\-ua\fR
Average response time
.TP
\fB\-ut\fR
Average total time
.TP
\fB\-uao\fR, \fB\-uto\fR
Average times computed on valid ('OK') requests
.TP
\fB\-uba\fR
Average bytes returned
.TP
\fB\-ubt\fR
Total bytes returned
.RE
.SH "SEE ALSO"
.BR haproxy (1)
.SH AUTHOR
.PP
\fBhalog\fR was written by Willy Tarreau <w@1wt.eu> and is part of \fBhaproxy\fR(1).
.PP
This manual page was written by Apollon Oikonomopoulos <apoikos@gmail.com> for the Debian project (but may
be used by others).

View File

@ -7,20 +7,21 @@
%global _hardened_build 1 %global _hardened_build 1
Name: haproxy Name: haproxy
Version: 1.4.25 Version: 1.5.0
Release: 2%{?dist} Release: 1%{?dist}
Summary: HA-Proxy is a TCP/HTTP reverse proxy for high availability environments Summary: HAProxy reverse proxy for high availability environments
Group: System Environment/Daemons Group: System Environment/Daemons
License: GPLv2+ License: GPLv2+
URL: http://haproxy.1wt.eu/ URL: http://haproxy.1wt.eu/
Source0: http://haproxy.1wt.eu/download/1.4/src/haproxy-%{version}.tar.gz Source0: http://haproxy.1wt.eu/download/1.5/src/haproxy-%{version}.tar.gz
Source1: %{name}.service Source1: %{name}.service
Source2: %{name}.cfg Source2: %{name}.cfg
Source3: %{name}.logrotate Source3: %{name}.logrotate
Source4: halog.1
Patch0: halog-unused-variables.patch Patch0: halog-unused-variables.patch
BuildRequires: pcre-devel BuildRequires: pcre-devel
BuildRequires: systemd-units BuildRequires: systemd-units
@ -31,48 +32,45 @@ Requires(preun): systemd
Requires(postun): systemd Requires(postun): systemd
%description %description
HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high HAProxy is a TCP/HTTP reverse proxy which is particularly suited for high
availability environments. Indeed, it can: availability environments. Indeed, it can:
- route HTTP requests depending on statically assigned cookies - route HTTP requests depending on statically assigned cookies
- spread the load among several servers while assuring server persistence - spread load among several servers while assuring server persistence
through the use of HTTP cookies through the use of HTTP cookies
- switch to backup servers in the event a main one fails - switch to backup servers in the event a main one fails
- accept connections to special ports dedicated to service monitoring - accept connections to special ports dedicated to service monitoring
- stop accepting connections without breaking existing ones - stop accepting connections without breaking existing ones
- add/modify/delete HTTP headers both ways - add, modify, and delete HTTP headers in both directions
- block requests matching a particular pattern - block requests matching particular patterns
- persists clients to the correct application server depending on
application cookies
- report detailed status as HTML pages to authenticated users from a URI
intercepted from the application
%prep %prep
%setup -q %setup -q
%patch0 -p0 %patch0 -p0
%build %build
# No configure script is present, it is all done via make flags
# Kernels of Fedora 11 and up and EL 6 and up are newer than 2.6.28,
# so using linux2628 as target.
# Recommended optimization option for x86 builds
regparm_opts= regparm_opts=
%ifarch %ix86 x86_64 %ifarch %ix86 x86_64
regparm_opts="USE_REGPARM=1" regparm_opts="USE_REGPARM=1"
%endif %endif
make %{?_smp_mflags} CPU="generic" TARGET="linux2628" USE_PCRE=1 ${regparm_opts} ADDINC="%{optflags}" USE_LINUX_TPROXY=1 ADDLIB="%{__global_ldflags}" %{__make} %{?_smp_mflags} CPU="generic" TARGET="linux2628" USE_PCRE=1 ${regparm_opts} ADDINC="%{optflags}" USE_LINUX_TPROXY=1 ADDLIB="%{__global_ldflags}"
# build the halog contrib program.
pushd contrib/halog pushd contrib/halog
make ${halog} OPTIMIZE="%{optflags}" %{__make} ${halog} OPTIMIZE="%{optflags}"
popd popd
%install %install
make install-bin DESTDIR=%{buildroot} PREFIX=%{_prefix} %{__make} install-bin DESTDIR=%{buildroot} PREFIX=%{_prefix}
make install-man DESTDIR=%{buildroot} PREFIX=%{_prefix} %{__make} install-man DESTDIR=%{buildroot} PREFIX=%{_prefix}
%{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service %{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
%{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{haproxy_confdir}/%{name}.cfg %{__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 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
%{__install} -p -D -m 0644 %{SOURCE4} %{buildroot}%{_mandir}/man1/halog.1
%{__install} -d -m 0755 %{buildroot}%{haproxy_home} %{__install} -d -m 0755 %{buildroot}%{haproxy_home}
%{__install} -d -m 0755 %{buildroot}%{haproxy_datadir} %{__install} -d -m 0755 %{buildroot}%{haproxy_datadir}
%{__install} -d -m 0755 %{buildroot}%{_bindir} %{__install} -d -m 0755 %{buildroot}%{_bindir}
@ -83,15 +81,13 @@ do
%{__install} -p -m 0644 $httpfile %{buildroot}%{haproxy_datadir} %{__install} -p -m 0644 $httpfile %{buildroot}%{haproxy_datadir}
done done
# convert all text files to utf8
for textfile in $(find ./ -type f -name '*.txt') for textfile in $(find ./ -type f -name '*.txt')
do do
mv $textfile $textfile.old %{__mv} $textfile $textfile.old
iconv --from-code ISO8859-1 --to-code UTF-8 --output $textfile $textfile.old iconv --from-code ISO8859-1 --to-code UTF-8 --output $textfile $textfile.old
rm -f $textfile.old %{__rm} -f $textfile.old
done done
%pre %pre
getent group %{haproxy_group} >/dev/null || groupadd -r %{haproxy_group} getent group %{haproxy_group} >/dev/null || groupadd -r %{haproxy_group}
getent passwd %{haproxy_user} >/dev/null || \ getent passwd %{haproxy_user} >/dev/null || \
@ -99,19 +95,17 @@ getent passwd %{haproxy_user} >/dev/null || \
-c "HAProxy user" %{haproxy_user} -c "HAProxy user" %{haproxy_user}
exit 0 exit 0
%post %post
%systemd_post %{name}.service %systemd_post %{name}.service
%preun %preun
%systemd_preun %{name}.service %systemd_preun %{name}.service
%postun %postun
%systemd_postun_with_restart %{name}.service %systemd_postun_with_restart %{name}.service
%files %files
%defattr(-,root,root,-)
%doc doc/* %doc doc/*
%doc examples/url-switching.cfg %doc examples/url-switching.cfg
%doc examples/acl-content-sw.cfg %doc examples/acl-content-sw.cfg
@ -127,12 +121,16 @@ exit 0
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%{_unitdir}/%{name}.service %{_unitdir}/%{name}.service
%{_sbindir}/%{name} %{_sbindir}/%{name}
%{_sbindir}/%{name}-systemd-wrapper
%{_bindir}/halog %{_bindir}/halog
%{_mandir}/man1/%{name}.1.gz %{_mandir}/man1/*
%attr(-,%{haproxy_user},%{haproxy_group}) %dir %{haproxy_home} %attr(-,%{haproxy_user},%{haproxy_group}) %dir %{haproxy_home}
%changelog %changelog
* 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 * 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 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

View File

@ -1 +1 @@
74b5ec1f0f9b4d148c8083bcfb512ccd haproxy-1.4.25.tar.gz e33bb97e644e98af948090f1ecebbda9 haproxy-1.5.0.tar.gz