diff options
author | Georg Kunz <georg.kunz@ericsson.com> | 2016-12-10 16:35:49 +0100 |
---|---|---|
committer | Georg Kunz <georg.kunz@ericsson.com> | 2016-12-13 11:18:58 +0100 |
commit | 28850f28aaa80cc71563f4c4698af70da6334f03 (patch) | |
tree | d6dc9b90c534a53e8112414f0334c5b80205b17c /build | |
parent | c62b63e6f4b2560dcc673206faee74706fd9e7bc (diff) |
Basic CI integration for Gluon
This first iteration of OPNFV CI integration targets a daily
build of an installable RPM package based on the lastest
Gluon upstream master branch.
Change-Id: I6ad0b339284e58e566eb85a3bcf981b52ba372b8
Signed-off-by: Georg Kunz <georg.kunz@ericsson.com>
Diffstat (limited to 'build')
-rw-r--r-- | build/Makefile | 6 | ||||
-rw-r--r-- | build/rpm_specs/gluon.spec | 85 |
2 files changed, 55 insertions, 36 deletions
diff --git a/build/Makefile b/build/Makefile index 9e5e8dd..0ba8be8 100644 --- a/build/Makefile +++ b/build/Makefile @@ -1,8 +1,10 @@ +OPNFV_RELEASE=$(shell echo $(shell date -u +"%Y%m%d")) GLUON_REPO=https://github.com/openstack/gluon.git GLUON_BRANCH=master -GLUON_VER=0.0.1 +GLUON_VER=$(shell grep Version $(shell pwd)/rpm_specs/gluon.spec | head -n 1 | awk '{ print $$2 }') +GLUON_REL=$(shell grep 'define release' $(shell pwd)/rpm_specs/gluon.spec | head -n 1 | awk '{ print $$3 }')_$(OPNFV_RELEASE) GLUON_TAR=gluon.tar.gz -GLUON_RPM=noarch/gluon-$(GLUON_VER)-1.noarch.rpm +GLUON_RPM=noarch/gluon-$(GLUON_VER)-$(GLUON_REL).noarch.rpm .PHONY: all diff --git a/build/rpm_specs/gluon.spec b/build/rpm_specs/gluon.spec index f64640f..946d415 100644 --- a/build/rpm_specs/gluon.spec +++ b/build/rpm_specs/gluon.spec @@ -1,35 +1,42 @@ %define release 1 %define _sharedstatedir /var/lib - -Summary: OpenStack Gluon Framework -Name: gluon -Version: 0.0.1 -Release: %{release}%{?git}%{?dist} - -License: Apache 2.0 -Group: Applications/Internet -Source0: gluon.tar.gz -Url: https://github.com/openstack/gluon -BuildArch: noarch - -Vendor: OpenStack <openstack-dev@lists.openstack.org> -Packager: Georg Kunz <georg.kunz@ericsson.com> - -Requires: python-pbr -Requires: python-click -Requires: python-six -Requires: python-requests -Requires: python-yaml -Requires: python-sqlalchemy -Requires: python2-babel -Requires: python2-oslo-db -Requires: python2-oslo-config -Requires: python2-oslo-versionedobjects -Requires: python2-oslo-log -Requires: python2-oslo-utils -Requires: python2-oslo-i18n -Requires: python2-wsme -Requires: pytz +%define build_timestamp %(date +"%Y%m%d") + +Summary: OpenStack Gluon Framework +Name: gluon +Version: 0.0.1 +Release: %{release}_%{build_timestamp} + +License: Apache 2.0 +Group: Applications/Internet +Source0: gluon.tar.gz +Url: https://github.com/openstack/gluon +BuildArch: noarch + +#BuildRequires: systemd + +Vendor: OpenStack <openstack-dev@lists.openstack.org> +Packager: Georg Kunz <georg.kunz@ericsson.com> + +Requires: python-pbr +Requires: python-click +Requires: python-six +Requires: python-requests +Requires: python-yaml +Requires: python-sqlalchemy +Requires: python2-babel +Requires: python2-oslo-db +Requires: python2-oslo-config +Requires: python2-oslo-versionedobjects +Requires: python2-oslo-log +Requires: python2-oslo-utils +Requires: python2-oslo-i18n +Requires: python2-wsme +Requires: pytz + +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd %description OpenStack Gluon framework for NFV networking @@ -76,6 +83,15 @@ if ! getent passwd proton >/dev/null; then fi exit 0 +%post +%systemd_post openstack-proton-server +systemctl start openstack-proton-server + +%preun +%systemd_preun openstack-proton-server + +%postun +%systemd_postun_with_restart openstack-proton-server %clean rm -rf %{buildroot} @@ -83,7 +99,8 @@ rm -rf %{buildroot} %files -f INSTALLED_FILES %defattr(-,root,root) %attr(644,root,root) /usr/lib/systemd/system/openstack-proton-server.service -%attr(640,proton,root) /etc/proton/proton.conf -%attr(750,proton,root) /var/log/proton -%attr(750,proton,root) /var/run/proton -%attr(755,proton,root) /var/lib/proton +%dir %attr(700,proton,root) %{_sysconfdir}/proton +%attr(640,proton,root) %{_sysconfdir}/proton/proton.conf +%dir %attr(750,proton,root) %{_localstatedir}/log/proton +%dir %attr(750,proton,root) %{_localstatedir}/run/proton +%dir %attr(755,proton,root) %{_sharedstatedir}/proton |