[openshift-origin-port-proxy] First import of port proxy into Fedora
Adam Miller
maxamillion at fedoraproject.org
Tue Oct 16 19:19:14 UTC 2012
commit d41f7632a8988ad957869f0a9b69496535dbea31
Author: Adam Miller <admiller at redhat.com>
Date: Tue Oct 16 14:18:58 2012 -0500
First import of port proxy into Fedora
.gitignore | 1 +
LICENSE | 11 ++++
openshift-origin-port-proxy.spec | 113 ++++++++++++++++++++++++++++++++++++++
sources | 1 +
4 files changed, 126 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..c55bb2b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/openshift-origin-port-proxy-0.3.3.tar.gz
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..90edcee
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,11 @@
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/openshift-origin-port-proxy.spec b/openshift-origin-port-proxy.spec
new file mode 100644
index 0000000..c537400
--- /dev/null
+++ b/openshift-origin-port-proxy.spec
@@ -0,0 +1,113 @@
+Summary: Script to configure HAProxy to do port forwarding for OpenShift Origin
+Name: openshift-origin-port-proxy
+Version: 0.3.3
+Release: 2%{?dist}
+Group: Applications/Internet
+License: ASL 2.0
+URL: http://openshift.redhat.com
+Source0: https://mirror.openshift.com/pub/openshift-origin/source/%{name}/%{name}-%{version}.tar.gz
+
+# Added by hand for now, filed upstream
+# https://github.com/openshift/crankcase/pull/509
+Source1: LICENSE
+
+%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
+%define with_systemd 1
+%else
+%define with_systemd 0
+%endif
+
+Requires: haproxy
+Requires: sed
+
+%if %{with_systemd}
+BuildRequires: systemd-units
+Requires: systemd-units
+%endif
+BuildArch: noarch
+
+%description
+OpenShift Origin script to configure HAProxy to do port forwarding from internal
+to external ports.
+
+%prep
+%setup -q
+
+%build
+
+%install
+%if %{with_systemd}
+mkdir -p %{buildroot}%{_unitdir}
+mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
+mkdir -p %{buildroot}%{_sbindir}
+%else
+mkdir -p %{buildroot}%{_initddir}
+%endif
+mkdir -p %{buildroot}%{_sysconfdir}/stickshift
+mkdir -p %{buildroot}%{_bindir}
+
+%if %{with_systemd}
+install -m 644 systemd/stickshift-proxy.service %{buildroot}%{_unitdir}
+install -m 644 systemd/stickshift-proxy.env %{buildroot}%{_sysconfdir}/sysconfig/stickshift-proxy
+install -m 755 systemd/stickshift-proxy %{buildroot}%{_sbindir}
+%else
+install -m 755 init-scripts/stickshift-proxy %{buildroot}%{_initddir}
+%endif
+install -m 644 config/stickshift-proxy.cfg %{buildroot}%{_sysconfdir}/stickshift/
+install -m 755 bin/stickshift-proxy-cfg %{buildroot}%{_bindir}/stickshift-proxy-cfg
+
+%post
+%if %{with_systemd}
+/bin/systemctl --system daemon-reload
+/bin/systemctl try-restart stickshift-proxy.service
+%else
+/sbin/chkconfig --add stickshift-proxy || :
+/sbin/service stickshift-proxy condrestart || :
+%endif
+
+%preun
+if [ "$1" -eq "0" ]; then
+%if %{with_systemd}
+ /bin/systemctl --no-reload disable stickshift-proxy.service
+ /bin/systemctl stop stickshift-proxy.service
+%else
+ /sbin/service stickshift-proxy stop || :
+ /sbin/chkconfig --del stickshift-proxy || :
+%endif
+fi
+
+%files
+%doc LICENSE
+%if %{with_systemd}
+%{_unitdir}/stickshift-proxy.service
+%{_sysconfdir}/sysconfig/stickshift-proxy
+%{_sbindir}/stickshift-proxy
+%else
+%{_initddir}/stickshift-proxy
+%endif
+%{_bindir}/stickshift-proxy-cfg
+%config(noreplace) %{_sysconfdir}/stickshift/stickshift-proxy.cfg
+
+%changelog
+* Tue Oct 16 2012 Adam Miller <admiller at redhat.com> 0.3.3-2
+- Removed unneccessary part of post section
+
+* Tue Sep 25 2012 Adam Miller <admiller at redhat.com> 0.3.3-1
+- updated to latest upstream to fix package review bits
+ https://github.com/openshift/crankcase/pull/512
+- cleaned up requires as recommended in package review
+
+* Thu Sep 20 2012 Adam Miller <admiller at redhat.com> 0.2.3-2
+- fixed inconsistent macro
+- Added LICENSE file
+
+* Wed Sep 12 2012 Adam Miller <admiller at redhat.com> 0.2.3-1
+- Updated to latest upstream to incorporate review fixes
+- https://github.com/openshift/crankcase/pull/467
+
+* Fri Sep 07 2012 Adam Miller <admiller at redhat.com> 0.2.2-2
+- Fixed up the requires section
+- removed non-el5 spec file cruft
+
+* Wed Sep 05 2012 Adam Miller <admiller at redhat.com> 0.2.2-1
+- First build for Fedora 18
diff --git a/sources b/sources
index e69de29..3d9737d 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+bcbf47f693501f0e12e8be52eda81028 openshift-origin-port-proxy-0.3.3.tar.gz
More information about the scm-commits
mailing list