Haproxy 1.8 Rpm Spec File

  1. Haproxy 1.8 Rpm Spec File Define
haproxy.spec
Summary: HA-Proxy is a TCP/HTTP reverse proxy for high availability environments
Name: haproxy
Version: 1.6.4
Release: 1
License: GPL
Group: System Environment/Daemons
URL: http://haproxy.1wt.eu/
Source0: http://haproxy.1wt.eu/download/1.5/src/devel/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: pcre-devel openssl-devel
Requires: /sbin/chkconfig, /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
It needs very little resource. Its event-driven architecture allows it to easily
handle thousands of simultaneous connections on hundreds of instances without
risking the system's stability.
%prep
%setup -q
# We don't want any perl dependecies in this RPM:
%define __perl_requires /bin/true
%build
%{__make} USE_PCRE=1 DEBUG='' ARCH=%{_target_cpu} TARGET=linux26 USE_OPENSSL=1
%install
[ '%{buildroot}'!='/' ] && %{__rm} -rf %{buildroot}
%{__install} -d %{buildroot}%{_sbindir}
%{__install} -d %{buildroot}%{_sysconfdir}/rc.d/init.d
%{__install} -d %{buildroot}%{_sysconfdir}/%{name}
%{__install} -d %{buildroot}%{_mandir}/man1/
mkdir -p %{buildroot}/usr/share/haproxy
mkdir -p %{buildroot}/var/lib/haproxy
cp examples/errorfiles/400.http %{buildroot}/usr/share/haproxy/400.http
cp examples/errorfiles/403.http %{buildroot}/usr/share/haproxy/403.http
cp examples/errorfiles/408.http %{buildroot}/usr/share/haproxy/408.http
cp examples/errorfiles/500.http %{buildroot}/usr/share/haproxy/500.http
cp examples/errorfiles/502.http %{buildroot}/usr/share/haproxy/502.http
cp examples/errorfiles/503.http %{buildroot}/usr/share/haproxy/503.http
cp examples/errorfiles/504.http %{buildroot}/usr/share/haproxy/504.http
cp examples/errorfiles/README %{buildroot}/usr/share/haproxy/README
mkdir -p %{buildroot}/etc/logrotate.d/
mkdir -p %{buildroot}/etc/sysconfig/
%{__install} -s %{name} %{buildroot}%{_sbindir}/
%{__install} -c -m 644 examples/acl-content-sw.cfg %{buildroot}%{_sysconfdir}/%{name}/%{name}-acl-content-sw.cfg.example
%{__install} -c -m 644 examples/auth.cfg %{buildroot}%{_sysconfdir}/%{name}/%{name}-auth.cfg.example
%{__install} -c -m 644 examples/content-sw-sample.cfg %{buildroot}%{_sysconfdir}/%{name}/%{name}-content-sw-sample.cfg.example
%{__install} -c -m 644 examples/option-http_proxy.cfg %{buildroot}%{_sysconfdir}/%{name}/%{name}-option-http_proxy.cfg.example
%{__install} -c -m 644 examples/ssl.cfg %{buildroot}%{_sysconfdir}/%{name}/%{name}-ssl.cfg.example
%{__install} -c -m 644 examples/transparent_proxy.cfg %{buildroot}%{_sysconfdir}/%{name}/%{name}-transparent_proxy.cfg.example
%{__install} -c -m 644 examples/%{name}.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/%{name}
%{__install} -c -m 755 examples/%{name}.init %{buildroot}%{_sysconfdir}/rc.d/init.d/%{name}
%{__install} -c -m 755 examples/%{name}.logrotated %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
%{__install} -c -m 755 doc/%{name}.1 %{buildroot}%{_mandir}/man1/
%clean
[ '%{buildroot}'!='/' ] && %{__rm} -rf %{buildroot}
%pre
/usr/sbin/groupadd -g 188 -r haproxy 2>/dev/null :
/usr/sbin/useradd -u 188 -g haproxy -d /var/lib/haproxy -s /sbin/nologin -r haproxy 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
/usr/share/haproxy
%defattr(-,root,root)
%doc CHANGELOG examples/*.cfg README doc/architecture.txt doc/configuration.txt doc/intro.txt doc/management.txt doc/proxy-protocol.txt
%doc %{_mandir}/man1/%{name}.1*
%attr(0755,root,root) %{_sbindir}/%{name}
%dir %{_sysconfdir}/%{name}
%attr(0644,root,root) %{_sysconfdir}/%{name}/*.cfg.example
%attr(0755,root,root) %config %{_sysconfdir}/rc.d/init.d/%{name}
%attr(0644,root,root) %config %{_sysconfdir}/sysconfig/%{name}
%attr(0644,root,root) %{_sysconfdir}/logrotate.d/%{name}
%attr(0755,haproxy,haproxy) %{_sharedstatedir}/haproxy
%changelog
* Tue Apr 26 2016Taro Hirose <uorat1616@gmail.com>
- initial build @1.6.4
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

There are GitHub repositories with customized.spec files to build your own RPM. In fact, there is an haproxy.spec file that may be found in the official.tar.gz file under examples. However, here is a unique way to build one as close to the original, haproxy-1.5.4-2.el6.rpm, official build found in the CentOS 6 base repositories.

Idle Speed = Manufacturer recommended idle speed in RPM. Max RPM = Manufacturer recommended maximum no-load top speed (other than typically mounted bar and chain) in crankshaft revolutions per minute. SPS = Verified STIHL-published specs. Odd notations within tables: FIXED = The carburetor has a fixed (non-adjustable) jet for this fuel circuit. HAProxy SPEC file for v1.6.4. GitHub Gist: instantly share code, notes, and snippets.

RPM Package Manager is a package management system used primarily for GNU/Linux operating systems. It used the .rpm file format. Cheat droid pro no root.

se-uql#toggleEditor'>
0
File
2answers

Synchronize RPM repository atomically

We have a RPM repository (on a Centos 6 machine) that we need to push to another machine. So far we've been using rsync -av --delete to simply push the repo directory over the network. This makes the ..
1
1answer

How to verify if an rpm was installed from scratch or upgraded?

we installed the following rpm's via yum on redhat version 5# rpm -qa --last head -10 kernel-headers-2.6.18-408.el5 Wed May 18 13:33:59 2016 bind-utils-9.3.6-25.P1.el5_11.6 ..
dandan
4163 gold badges9 silver badges18 bronze badges
0
0answers

Building CentOS kernel from RPM with patches (but missing files that are in the SRPMs)

I have a hardware system that I am running CentOS 7 on. I would like to add some patches to the default CentOS kernel, since I have some custom hardware to support, but I also want to track the ..
0
1answer

Build rpm on CentOS for RHEL

I need to install some software which is not available pre-compiled on a client's RHEL Server. I decided to create a rpm for easier installation on multiple systems. As i have no RHEL subscription, ..
2
1answer

Installing rpm-package to systemd?

I am new to systemd, and trying to get an in-house app packaged as rpm, to install on systemd host (RHEL7).The rpm tries to place the systemd .service-file: myapp.service into: /etc/systemd/system..
0
1answer

If rpm install is running, wait until finished

We had troubles since our application run during rpm installation.In the future we would like to know if the rpm command is currently installing rpm packages.Maybe I am missing the matching ..
guettli
4785 gold badges31 silver badges63 bronze badges
0
0answers

CentOS: unable to verify backported fixes

Generally one uses rpm to verify backported fixes to a package like: rpm -q --changelog httpd But on my CentOS server, it's giving me: package httpd is not installed Or: package php is not ..
Zeno
1671 gold badge2 silver badges13 bronze badges
4
1answer

Why are some RPM's “not relocatable”?

An RPM is relocatable if you can install it like this:rpm -ivh --prefix=/path/to/non/default/dir package-name.rpm Without getting the following error message:error: package package-name is not ..
0
2answers

Which is better, manually create soft link to generic .so or install devel package on Linux

I have the libpng rpm package installed on Centos linux which includes:/usr/lib64/libpng.so.3.49.0/usr/lib64/libpng.so.3 #softlink to libpng.so.3.49.0 I use software that uses:/usr/lib64/libpng..
2
1answer

Matching back ported package versions to major releases

Is there a way to link a backported versions of package to what is released by the original developers. For example the latest Centos package for OpenSSL is : openssl-1.0.1e-42.el6_7.4.x86_64.rpm ..
7
2answers

How to ensure integrity and security enforcing signed unmodified RPM package?

There is a way to verify files related to specific package against original RPM content:# Verify `vsftpd` package.rpm -V vsftpd How to complete the chain and verify that rpm command itself hasn't ..
uvsmtid
4091 gold badge3 silver badges11 bronze badges
0
3answers

Haproxy 1.8 Rpm Spec File Define

upgrading openssl in CentOS 7

First, I tried downloading the source tarball openssl-1.0.1s.tar.gz from openssl.org and doing a ./config && make install, and although it seems to have completed the process successfully, I ..
Haproxy
0
0answers

Exclude or change package used as dependency in rpm package under CentOS

I have an RPM package that depends on many other packages, so installing it will install everything I need - quite a normal approach. But one of the packages depends on custom nginx build (general ..
Alexander
4291 gold badge5 silver badges18 bronze badges
2
1answer

I think I've resolved dependency, rpm doesn't

I have upgraded EPEL repo in order to install Remi repository in order to upgrade PHP to 3.5.4 in order to upgrade civicrm (on a CentOS 6.7 VPS running one production site and its dev site).repolist:..
1
1answer

Dependency issue installing Asterisk 1.8 on Amazon Linux Server

I'm trying to install Asterisk 1.8 on an Amazon Linux Server (2015.09). sudo yum install asterisk This results in the following errors:Error: Package: libresample-0.1.3-12.el6.x86_64 (epel) ..
SPRBRN
2742 gold badges8 silver badges26 bronze badges

prev 15678943 next