Merge "Refactor patches for haproxy package."
This commit is contained in:
commit
afb2aabe13
2
base/haproxy-config/centos/build_srpm.data
Normal file
2
base/haproxy-config/centos/build_srpm.data
Normal file
@ -0,0 +1,2 @@
|
||||
SRC_DIR="files"
|
||||
TIS_PATCH_VER=1
|
41
base/haproxy-config/centos/haproxy-config.spec
Normal file
41
base/haproxy-config/centos/haproxy-config.spec
Normal file
@ -0,0 +1,41 @@
|
||||
Summary: haproxy-config
|
||||
Name: haproxy-config
|
||||
Version: 1.0
|
||||
Release: %{tis_patch_ver}%{?_tis_dist}
|
||||
License: Apache-2.0
|
||||
Group: base
|
||||
Packager: StarlingX
|
||||
URL: unknown
|
||||
BuildArch: noarch
|
||||
Source: %name-%version.tar.gz
|
||||
|
||||
Requires: haproxy
|
||||
Summary: package StarlingX configuration files of haproxy to system folder.
|
||||
|
||||
%description
|
||||
package StarlingX configuration files of haproxy to system folder.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
%{__install} -d 755 %{buildroot}%{_sysconfdir}/haproxy/errors/
|
||||
%{__install} -m 755 503.http %{buildroot}%{_sysconfdir}/haproxy/errors/503.http
|
||||
|
||||
%{__install} -d %{buildroot}%{_sysconfdir}/systemd/system
|
||||
%{__install} -m 644 haproxy.service %{buildroot}%{_sysconfdir}/systemd/system
|
||||
|
||||
mkdir -p %{_sysconfdir}/init.d
|
||||
%{__install} -p -D -m 0755 haproxy.sh %{buildroot}%{_sysconfdir}/init.d/haproxy
|
||||
|
||||
%post
|
||||
/bin/systemctl disable haproxy.service
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{_sysconfdir}/haproxy/errors/
|
||||
%{_sysconfdir}/haproxy/errors/*
|
||||
%{_sysconfdir}/init.d/haproxy
|
||||
%{_sysconfdir}/systemd/system/haproxy.service
|
13
base/haproxy-config/files/haproxy.service
Normal file
13
base/haproxy-config/files/haproxy.service
Normal file
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=HAProxy Load Balancer
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/etc/sysconfig/haproxy
|
||||
ExecStart=/etc/init.d/haproxy start
|
||||
ExecStop=/etc/init.d/haproxy stop
|
||||
ExecReload=/bin/kill -USR2 $MAINPID
|
||||
KillMode=mixed
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
0
base/haproxy/haproxy/haproxy.sh → base/haproxy-config/files/haproxy.sh
Executable file → Normal file
0
base/haproxy/haproxy/haproxy.sh → base/haproxy-config/files/haproxy.sh
Executable file → Normal file
@ -1,2 +1,2 @@
|
||||
COPY_LIST="haproxy/*"
|
||||
TIS_PATCH_VER=7
|
||||
SRC_DIR="files"
|
||||
TIS_PATCH_VER=8
|
||||
|
@ -3,14 +3,13 @@ From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 16:12:36 -0400
|
||||
Subject: [PATCH] WRS: 0001-Update-package-versioning-for-TIS-format.patch
|
||||
|
||||
Conflicts:
|
||||
SPECS/haproxy.spec
|
||||
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
|
||||
---
|
||||
SPECS/haproxy.spec | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SPECS/haproxy.spec b/SPECS/haproxy.spec
|
||||
index 0d6e19a..3bc75e1 100644
|
||||
index 39c0c86..b0d5862 100644
|
||||
--- a/SPECS/haproxy.spec
|
||||
+++ b/SPECS/haproxy.spec
|
||||
@@ -8,7 +8,7 @@
|
||||
@ -23,5 +22,5 @@ index 0d6e19a..3bc75e1 100644
|
||||
|
||||
Group: System Environment/Daemons
|
||||
--
|
||||
2.7.4
|
||||
1.8.3.1
|
||||
|
||||
|
@ -1,7 +1,3 @@
|
||||
spec-include-TiS-config.patch
|
||||
haproxy-spec-add-init-script.patch
|
||||
spec-add-haproxy-env-var-patch.patch
|
||||
spec-include-TiS-changes.patch
|
||||
meta_remove_bad_logrotate.patch
|
||||
haproxy-service-file.patch
|
||||
meta_add_support_for_tpm.patch
|
||||
0001-Update-package-versioning-for-TIS-format.patch
|
||||
|
@ -1,26 +0,0 @@
|
||||
From c4d74c67ee001af849e7a30e824cc0f8e38ef948 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 16:12:36 -0400
|
||||
Subject: [PATCH 5/7] WRS: haproxy-service-file.patch
|
||||
|
||||
---
|
||||
SOURCES/haproxy.service | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SOURCES/haproxy.service b/SOURCES/haproxy.service
|
||||
index 2d4c954..c2f1086 100644
|
||||
--- a/SOURCES/haproxy.service
|
||||
+++ b/SOURCES/haproxy.service
|
||||
@@ -4,7 +4,8 @@ After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/etc/sysconfig/haproxy
|
||||
-ExecStart=/usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid $OPTIONS
|
||||
+ExecStart=/etc/init.d/haproxy start
|
||||
+ExecStop=/etc/init.d/haproxy stop
|
||||
ExecReload=/bin/kill -USR2 $MAINPID
|
||||
KillMode=mixed
|
||||
|
||||
--
|
||||
1.9.1
|
||||
|
@ -1,47 +0,0 @@
|
||||
From 959767df3285a81f1c5650018ed846fe90a68c9d Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 16:12:36 -0400
|
||||
Subject: [PATCH 2/7] WRS: haproxy-spec-add-init-script.patch
|
||||
|
||||
---
|
||||
SPECS/haproxy.spec | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/SPECS/haproxy.spec b/SPECS/haproxy.spec
|
||||
index 42ddeb0..cbd9161 100644
|
||||
--- a/SPECS/haproxy.spec
|
||||
+++ b/SPECS/haproxy.spec
|
||||
@@ -21,6 +21,7 @@ Source2: %{name}.cfg
|
||||
Source3: %{name}.logrotate
|
||||
Source4: %{name}.sysconfig
|
||||
Source5: halog.1
|
||||
+Source10: %{name}.sh
|
||||
|
||||
# WRS
|
||||
Source6: 503.http
|
||||
@@ -81,11 +82,14 @@ popd
|
||||
%{__make} install-bin DESTDIR=%{buildroot} PREFIX=%{_prefix} TARGET="linux2628"
|
||||
%{__make} install-man DESTDIR=%{buildroot} PREFIX=%{_prefix}
|
||||
|
||||
+mkdir -p /etc/init.d
|
||||
+
|
||||
%{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
|
||||
%{__install} -p -D -m 0640 %{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
|
||||
+%{__install} -p -D -m 0755 %{SOURCE10} %{buildroot}/etc/init.d/%{name}
|
||||
%{__install} -d -m 0755 %{buildroot}%{haproxy_home}
|
||||
%{__install} -d -m 0755 %{buildroot}%{haproxy_datadir}
|
||||
%{__install} -d -m 0755 %{buildroot}%{_bindir}
|
||||
@@ -149,6 +153,7 @@ fi
|
||||
%{_bindir}/halog
|
||||
%{_bindir}/iprange
|
||||
%{_mandir}/man1/*
|
||||
+/etc/init.d/%{name}
|
||||
%attr(-,%{haproxy_user},%{haproxy_group}) %dir %{haproxy_home}
|
||||
|
||||
# WRS
|
||||
--
|
||||
1.9.1
|
||||
|
@ -1,42 +0,0 @@
|
||||
From a5329bf1468f55c8d6b983e5999c12139dc7479d Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 16:12:36 -0400
|
||||
Subject: [PATCH 6/7] WRS: meta_add_support_for_tpm.patch
|
||||
|
||||
---
|
||||
SPECS/haproxy.spec | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/SPECS/haproxy.spec b/SPECS/haproxy.spec
|
||||
index 3d112e0..c1547ef 100644
|
||||
--- a/SPECS/haproxy.spec
|
||||
+++ b/SPECS/haproxy.spec
|
||||
@@ -30,6 +30,7 @@ Patch1: iprange-return-type.patch
|
||||
Patch2: haproxy-tcp-user-timeout.patch
|
||||
Patch3: haproxy-systemd-wrapper-exit-code.patch
|
||||
Patch4: haproxy-env-var.patch
|
||||
+Patch5: haproxy-tpm-support.patch
|
||||
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: zlib-devel
|
||||
@@ -41,6 +42,9 @@ Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
|
||||
+Requires: tpm2-openssl-engine
|
||||
+
|
||||
+
|
||||
%description
|
||||
HAProxy is a TCP/HTTP reverse proxy which is particularly suited for high
|
||||
availability environments. Indeed, it can:
|
||||
@@ -62,6 +66,7 @@ availability environments. Indeed, it can:
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
+%patch5 -p1
|
||||
|
||||
%build
|
||||
regparm_opts=
|
||||
--
|
||||
1.9.1
|
||||
|
@ -1,14 +1,15 @@
|
||||
From 3eac39ba534b92dbcb3a898442b09be7acc389bb Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 16:12:36 -0400
|
||||
Subject: [PATCH 4/7] WRS: meta_remove_bad_logrotate.patch
|
||||
Subject: [PATCH] WRS: meta_remove_bad_logrotate.patch
|
||||
|
||||
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
|
||||
---
|
||||
SPECS/haproxy.spec | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/SPECS/haproxy.spec b/SPECS/haproxy.spec
|
||||
index af94d46..3d112e0 100644
|
||||
index 53def97..39c0c86 100644
|
||||
--- a/SPECS/haproxy.spec
|
||||
+++ b/SPECS/haproxy.spec
|
||||
@@ -18,7 +18,6 @@ URL: http://www.haproxy.org/
|
||||
@ -18,16 +19,16 @@ index af94d46..3d112e0 100644
|
||||
-Source3: %{name}.logrotate
|
||||
Source4: %{name}.sysconfig
|
||||
Source5: halog.1
|
||||
Source10: %{name}.sh
|
||||
@@ -88,7 +87,6 @@ mkdir -p /etc/init.d
|
||||
|
||||
@@ -86,7 +85,6 @@ popd
|
||||
|
||||
%{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
|
||||
%{__install} -p -D -m 0640 %{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
|
||||
%{__install} -p -D -m 0755 %{SOURCE10} %{buildroot}/etc/init.d/%{name}
|
||||
@@ -147,7 +145,6 @@ fi
|
||||
%{__install} -d -m 0755 %{buildroot}%{haproxy_home}
|
||||
@@ -139,7 +137,6 @@ fi
|
||||
%dir %{haproxy_datadir}
|
||||
%{haproxy_datadir}/*
|
||||
%config(noreplace) %{haproxy_confdir}/%{name}.cfg
|
||||
@ -36,5 +37,5 @@ index af94d46..3d112e0 100644
|
||||
%{_unitdir}/%{name}.service
|
||||
%{_sbindir}/%{name}
|
||||
--
|
||||
1.9.1
|
||||
1.8.3.1
|
||||
|
||||
|
@ -1,32 +0,0 @@
|
||||
From 2e37207c026047e2ce1bc9a5278faddfea81c011 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 16:12:36 -0400
|
||||
Subject: [PATCH 3/7] WRS: spec-add-haproxy-env-var-patch.patch
|
||||
|
||||
---
|
||||
SPECS/haproxy.spec | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/SPECS/haproxy.spec b/SPECS/haproxy.spec
|
||||
index cbd9161..af94d46 100644
|
||||
--- a/SPECS/haproxy.spec
|
||||
+++ b/SPECS/haproxy.spec
|
||||
@@ -30,6 +30,7 @@ Patch0: halog-unused-variables.patch
|
||||
Patch1: iprange-return-type.patch
|
||||
Patch2: haproxy-tcp-user-timeout.patch
|
||||
Patch3: haproxy-systemd-wrapper-exit-code.patch
|
||||
+Patch4: haproxy-env-var.patch
|
||||
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: zlib-devel
|
||||
@@ -61,6 +62,7 @@ availability environments. Indeed, it can:
|
||||
%patch1 -p0
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
+%patch4 -p1
|
||||
|
||||
%build
|
||||
regparm_opts=
|
||||
--
|
||||
1.9.1
|
||||
|
@ -0,0 +1,53 @@
|
||||
From 0b326ac9fcee3fbac7e41e3bc269cc7251dcf9dd Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 16:12:36 -0400
|
||||
Subject: WRS: spec-include-TiS-changes.patch
|
||||
|
||||
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
|
||||
---
|
||||
SPECS/haproxy.spec | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SPECS/haproxy.spec b/SPECS/haproxy.spec
|
||||
index 30dca25..53def97 100644
|
||||
--- a/SPECS/haproxy.spec
|
||||
+++ b/SPECS/haproxy.spec
|
||||
@@ -26,6 +26,8 @@ Patch0: halog-unused-variables.patch
|
||||
Patch1: iprange-return-type.patch
|
||||
Patch2: haproxy-tcp-user-timeout.patch
|
||||
Patch3: haproxy-systemd-wrapper-exit-code.patch
|
||||
+Patch4: haproxy-env-var.patch
|
||||
+Patch5: haproxy-tpm-support.patch
|
||||
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: zlib-devel
|
||||
@@ -37,6 +39,8 @@ Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
|
||||
+Requires: tpm2-openssl-engine
|
||||
+
|
||||
%description
|
||||
HAProxy is a TCP/HTTP reverse proxy which is particularly suited for high
|
||||
availability environments. Indeed, it can:
|
||||
@@ -57,6 +61,8 @@ availability environments. Indeed, it can:
|
||||
%patch1 -p0
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
+%patch4 -p1
|
||||
+%patch5 -p1
|
||||
|
||||
%build
|
||||
regparm_opts=
|
||||
@@ -79,7 +85,7 @@ popd
|
||||
%{__make} install-man DESTDIR=%{buildroot} PREFIX=%{_prefix}
|
||||
|
||||
%{__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 0640 %{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
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,58 +0,0 @@
|
||||
From 0b326ac9fcee3fbac7e41e3bc269cc7251dcf9dd Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 16:12:36 -0400
|
||||
Subject: WRS: spec-include-TiS-config.patch
|
||||
|
||||
---
|
||||
SPECS/haproxy.spec | 14 +++++++++++++-
|
||||
1 file changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SPECS/haproxy.spec b/SPECS/haproxy.spec
|
||||
index 30dca25..988e7cf 100644
|
||||
--- a/SPECS/haproxy.spec
|
||||
+++ b/SPECS/haproxy.spec
|
||||
@@ -22,6 +22,9 @@ Source3: %{name}.logrotate
|
||||
Source4: %{name}.sysconfig
|
||||
Source5: halog.1
|
||||
|
||||
+# WRS
|
||||
+Source6: 503.http
|
||||
+
|
||||
Patch0: halog-unused-variables.patch
|
||||
Patch1: iprange-return-type.patch
|
||||
Patch2: haproxy-tcp-user-timeout.patch
|
||||
@@ -79,7 +82,7 @@ popd
|
||||
%{__make} install-man DESTDIR=%{buildroot} PREFIX=%{_prefix}
|
||||
|
||||
%{__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 0640 %{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
|
||||
@@ -106,6 +109,11 @@ do
|
||||
%{__rm} -f $textfile.old
|
||||
done
|
||||
|
||||
+# WRS
|
||||
+%{__install} -d 755 %{buildroot}/etc/haproxy/errors/
|
||||
+%{__install} -m 755 %{SOURCE6} %{buildroot}/etc/haproxy/errors/503.http
|
||||
+
|
||||
+
|
||||
%pre
|
||||
getent group %{haproxy_group} >/dev/null || groupadd -f -g 188 -r %{haproxy_group}
|
||||
if ! getent passwd %{haproxy_user} >/dev/null ; then
|
||||
@@ -143,6 +151,10 @@ fi
|
||||
%{_mandir}/man1/*
|
||||
%attr(-,%{haproxy_user},%{haproxy_group}) %dir %{haproxy_home}
|
||||
|
||||
+# WRS
|
||||
+%dir /etc/haproxy/errors/
|
||||
+/etc/haproxy/errors/*
|
||||
+
|
||||
%changelog
|
||||
* Thu Nov 30 2017 Ryan O'Hara <rohara@redhat.com> - 1.5.18-7
|
||||
- Rebuild with openssl-1.0.2k (#1509139)
|
||||
--
|
||||
2.7.4
|
||||
|
0
base/haproxy/haproxy/haproxy.cfg → base/haproxy/files/haproxy.cfg
Executable file → Normal file
0
base/haproxy/haproxy/haproxy.cfg → base/haproxy/files/haproxy.cfg
Executable file → Normal file
@ -291,6 +291,7 @@ bash
|
||||
|
||||
# haproxy
|
||||
haproxy
|
||||
haproxy-config
|
||||
|
||||
# iscsi-initiator-utils
|
||||
iscsi-initiator-utils
|
||||
|
@ -128,6 +128,7 @@ base/cluster-resource-agents
|
||||
base/libfdt
|
||||
base/bash
|
||||
base/haproxy
|
||||
base/haproxy-config
|
||||
filesystem/iscsi-initiator-utils
|
||||
ldap/ldapscripts
|
||||
networking/net-tools
|
||||
|
Loading…
Reference in New Issue
Block a user