Move RPM spec and deb rules from fuel-main to fuel-web repository

Related blueprint: package-fuel-components

Change-Id: Id5d787d6638bcea1258cbc7c726f0dad44dd1afa
This commit is contained in:
Vladimir Kuklin 2015-03-27 16:58:13 +03:00
parent b339a2b877
commit 57887baf65
9 changed files with 407 additions and 0 deletions

17
debian/changelog vendored Normal file
View File

@ -0,0 +1,17 @@
nailgun (6.0.0-1) trusty; urgency=low
* Update code from upstream
-- Igor Kalnitsky <ikalnitsky@mirantis.com> Wed, 26 Nov 2014 19:49:00 +0200
nailgun (0.1.0-ubuntu1) precise; urgency=low
* Update code from upstream
-- OSCI Jenkins <dburmistrov@mirantis.com> Wed, 03 Sep 2014 15:17:07 +0400
nailgun (0.1.0-1ubuntu0) precise; urgency=low
* Add fencing agent script as a separated task
-- Bogdan Dobrelya <bdobrelia@mirantis.com> Thu, 23 Jan 2014 18:55:00 +0400

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
8

36
debian/control vendored Normal file
View File

@ -0,0 +1,36 @@
Source: nailgun
Section: unknown
Priority: net
Maintainer: Mirantis Producta <product@mirantis.com>
Build-Depends: debhelper (>= 8.0.0), python-setuptools
X-Python-Version: 2.6, 2.7
Standards-Version: 3.9.2
Homepage: mirantis.com
Package: fencing-agent
Architecture: all
Depends: ohai (<< 7),
ruby-httpclient,
ruby-rethtool,
ruby-cstruct,
ruby-json,
${misc:Depends}
Description: <insert up to 60 chars description>
<insert long description, indented with spaces>
Package: nailgun-agent
Architecture: all
Depends: ohai (<< 7),
ruby-httpclient,
ruby-rethtool,
ruby-cstruct,
ruby-json,
${misc:Depends}
Description: <insert up to 60 chars description>
<insert long description, indented with spaces>
Package: nailgun-net-check
Architecture: all
Depends: ${misc:Depends}, ${python:Depends}, python-pypcap, vlan, python-scapy, cliff-tablib, python-stevedore, python-daemonize, python-yaml, tcpdump
Description: NailGun client net-check
.

1
debian/fencing-agent.install vendored Normal file
View File

@ -0,0 +1 @@
bin/fencing-agent.rb /opt/nailgun/bin

1
debian/nailgun-agent.cron.d vendored Normal file
View File

@ -0,0 +1 @@
* * * * * root flock -w 0 -o /var/lock/agent.lock -c "/opt/nailgun/bin/agent 2>&1 | tee -a /var/log/nailgun-agent.log | /usr/bin/logger -t nailgun-agent"

1
debian/nailgun-agent.install vendored Normal file
View File

@ -0,0 +1 @@
bin/agent /opt/nailgun/bin

18
debian/rules vendored Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/make -f
DH_VERBOSE=1
topdir=$(shell pwd)
%:
dh $@ --with python2
override_dh_auto_install:
cd network_checker && python setup.py install -O0 --single-version-externally-managed --install-layout=deb --root=$(topdir)/debian/nailgun-net-check
dh_auto_install
override_dh_auto_build:
dh_clean
cd network_checker && python setup.py build
dh_auto_build
override_dh_auto_clean:
cd network_checker && python setup.py clean
dh_auto_clean

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

331
specs/nailgun.spec Normal file
View File

@ -0,0 +1,331 @@
%define name nailgun
%define version 6.0.0
%define release 1
#FIXME(aglarendil): actually, we should have one version
#everywhere, but we will fix it a little bit later
%define new_version 6.1.0
Summary: Nailgun package
Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{name}-%{version}.tar.gz
License: Apache
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
Prefix: %{_prefix}
BuildRequires: python-setuptools
BuildRequires: git
BuildRequires: npm
BuildRequires: nodejs
BuildArch: noarch
Requires: python-alembic >= 0.6.2
Requires: python-amqplib >= 1.0.2
Requires: python-anyjson >= 0.3.3
Requires: python-argparse >= 1.2.1
Requires: python-babel >= 1.3
Requires: python-crypto >= 2.6.1
Requires: python-decorator >= 3.4.0
Requires: python-fysom >= 1.0.11
Requires: python-iso8601 >= 0.1.9
Requires: python-jinja2 >= 2.7
Requires: python-jsonschema >= 2.3.0
Requires: python-keystoneclient >= 0.11
Requires: python-keystonemiddleware >= 1.2.0
Requires: python-kombu >= 1:3.0.16
Requires: python-mako >= 0.9.1
Requires: python-markupsafe >= 0.18
Requires: python-netaddr >= 0.7.10
Requires: python-netifaces >= 0.8
Requires: python-oslo-config >= 1:1.2.1
Requires: python-oslo-serialization >= 1.0.0
Requires: python-paste >= 1.7.5.1
Requires: python-ply >= 3.4
Requires: python-psycopg2 >= 2.5.1
Requires: python-requests >= 1.2.3
Requires: python-simplejson >= 3.3.0
Requires: python-six >= 1.5.2
Requires: python-sqlalchemy >= 0.7.9
Requires: python-stevedore >= 0.14
Requires: python-urllib3 >= 1.7
Requires: python-webpy >= 0.37
Requires: python-wsgilog >= 0.3
Requires: python-wsgiref >= 0.1.2
Requires: PyYAML >= 3.10
Requires: python-novaclient >= 2.17.0
Requires: python-networkx-core >= 1.8.0
Requires: python-cinderclient >= 1.0.7
Requires: pydot-ng >= 1.0.0
Requires: python-ordereddict >= 1.1
# Workaroud for babel bug
Requires: pytz
%description
Nailgun package
%prep
%setup -cq -n %{name}-%{version}
npm install --prefix %{_builddir}/%{name}-%{version}/nailgun/ gulp
%build
mkdir -p %{_builddir}/%{name}-%{version}/nailgun/npm-cache
cd %{_builddir}/%{name}-%{version}/nailgun && npm --cache %{_builddir}/%{name}-%{version}/nailgun/npm-cache install && %{_builddir}/%{name}-%{version}/nailgun/node_modules/.bin/gulp build --static-dir=compressed_static
[ -n %{_builddir} ] && rm -rf %{_builddir}/%{name}-%{version}/nailgun/static
mv %{_builddir}/%{name}-%{version}/nailgun/compressed_static %{_builddir}/%{name}-%{version}/nailgun/static
cd %{_builddir}/%{name}-%{version}/nailgun && python setup.py build
cd %{_builddir}/%{name}-%{version}/network_checker && python setup.py build
cd %{_builddir}/%{name}-%{version}/shotgun && python setup.py build
cd %{_builddir}/%{name}-%{version}/fuelmenu && python setup.py build
cd %{_builddir}/%{name}-%{version}/fuel_agent && python setup.py build
cd %{_builddir}/%{name}-%{version}/fuel_upgrade_system/fuel_package_updates && python setup.py build
%install
cd %{_builddir}/%{name}-%{version}/nailgun && python setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=%{_builddir}/%{name}-%{version}/nailgun/INSTALLED_FILES
cd %{_builddir}/%{name}-%{version}/network_checker && python setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=%{_builddir}/%{name}-%{version}/network_checker/INSTALLED_FILES
cd %{_builddir}/%{name}-%{version}/shotgun && python setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=%{_builddir}/%{name}-%{version}/shotgun/INSTALLED_FILES
cd %{_builddir}/%{name}-%{version}/fuelmenu && python setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=%{_builddir}/%{name}-%{version}/fuelmenu/INSTALLED_FILES
cd %{_builddir}/%{name}-%{version}/fuel_agent && python setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=%{_builddir}/%{name}-%{version}/fuel_agent/INSTALLED_FILES
cd %{_builddir}/%{name}-%{version}/fuel_upgrade_system/fuel_package_updates && python setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=%{_builddir}/%{name}-%{version}/fuel_upgrade_system/fuel_package_updates/INSTALLED_FILES
mkdir -p %{buildroot}/opt/nailgun/bin
mkdir -p %{buildroot}/etc/cron.d
mkdir -p %{buildroot}/etc/fuel
install -d -m 755 %{buildroot}/etc/fuel
install -m 600 %{_builddir}/%{name}-%{version}/fuelmenu/fuelmenu/settings.yaml %{buildroot}/etc/fuel/astute.yaml
install -m 755 %{_builddir}/%{name}-%{version}/bin/agent %{buildroot}/opt/nailgun/bin/agent
install -m 755 %{_builddir}/%{name}-%{version}/bin/fencing-agent.rb %{buildroot}/opt/nailgun/bin/fencing-agent.rb
install -m 644 %{_builddir}/%{name}-%{version}/bin/nailgun-agent.cron %{buildroot}/etc/cron.d/nailgun-agent
install -m 644 %{_builddir}/%{name}-%{version}/bin/fencing-agent.cron %{buildroot}/etc/cron.d/fencing-agent
install -d -m 755 %{buildroot}%{_sysconfdir}/fuel-agent
install -p -D -m 644 %{_builddir}/%{name}-%{version}/fuel_agent/etc/fuel-agent/fuel-agent.conf.sample %{buildroot}%{_sysconfdir}/fuel-agent/fuel-agent.conf
install -p -D -m 755 %{_builddir}/%{name}-%{version}/bin/download-debian-installer %{buildroot}%{_bindir}/download-debian-installer
# Install template file
install -d -m 755 %{buildroot}%{_datadir}/fuel-agent/cloud-init-templates
install -p -D -m 644 %{_builddir}/%{name}-%{version}/fuel_agent/cloud-init-templates/* %{buildroot}%{_datadir}/fuel-agent/cloud-init-templates
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %{_builddir}/%{name}-%{version}/nailgun/INSTALLED_FILES
%defattr(0755,root,root)
%package -n nailgun-agent
Summary: Nailgun startup agent
Version: 6.0.0
Release: 1
License: GPLv2
BuildRoot: %{_tmppath}/%{name}-%{version}
URL: http://mirantis.com
Requires: rubygem-rethtool
Requires: rubygem-ohai
Requires: rubygem-httpclient
Requires: rubygem-ipaddress
Requires: rubygem-json
Requires: rubygems
%description -n nailgun-agent
Nailgun startup agent that register node at Nailgun and make a little setup
of other services.
%files -n nailgun-agent
/etc/cron.d/nailgun-agent
/opt/nailgun/bin/agent
%package -n nailgun-net-check
Summary: Network checking package for CentOS6.x
Version: %{version}
Release: %{release}
License: GPLv2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
URL: http://github.com/Mirantis
Requires: vconfig
Requires: scapy
Requires: python-argparse
Requires: python-pypcap
Requires: python-cliff-tablib
Requires: python-stevedore
Requires: python-daemonize
Requires: python-yaml
Requires: tcpdump
%description -n nailgun-net-check
This is a network tool that helps to verify networks connectivity
between hosts in network.
%files -n nailgun-net-check -f %{_builddir}/%{name}-%{version}/network_checker/INSTALLED_FILES
%defattr(-,root,root)
%package -n shotgun
Summary: Shotgun package
Version: %{version}
Release: %{release}
URL: http://mirantis.com
License: Apache
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
Prefix: %{_prefix}
BuildArch: noarch
Requires: postgresql
Requires: python-fabric >= 1.10.0
Requires: python-argparse
Requires: tar
Requires: gzip
Requires: bzip2
Requires: openssh-clients
Requires: xz
%description -n shotgun
Shotgun package.
%files -n shotgun -f %{_builddir}/%{name}-%{version}/shotgun/INSTALLED_FILES
%defattr(-,root,root)
%package -n fuelmenu
Summary: Console utility for pre-configuration of Fuel server
Version: %{version}
Release: %{release}
License: Apache
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
BuildArch: noarch
Vendor: Matthew Mosesohn <mmosesohn@mirantis.com>
BuildRequires: python-setuptools
Requires: bind-utils
Requires: nailgun-net-check
Requires: ntp
Requires: python-setuptools
Requires: python-netaddr
Requires: python-netifaces
Requires: python-urwid >= 1.1.0
Requires: PyYAML
Requires: python-ordereddict
%description -n fuelmenu
Summary: Console utility for pre-configuration of Fuel server
%files -n fuelmenu -f %{_builddir}/%{name}-%{version}/fuelmenu/INSTALLED_FILES
%defattr(-,root,root)
%config(noreplace) /etc/fuel/astute.yaml
%package -n fuel-agent
Summary: Fuel-agent package
Version: %{version}
Release: %{release}
URL: http://mirantis.com
License: Apache
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
Prefix: %{_prefix}
BuildRequires: python-setuptools
BuildRequires: python-pbr
BuildArch: noarch
Requires: python
Requires: python-babel
Requires: python-eventlet
Requires: python-jsonschema
Requires: python-oslo-config
Requires: python-oslo-serialization >= 1.0.0
Requires: python-iso8601
Requires: python-six
Requires: python-stevedore
Requires: python-jinja2
Requires: python-requests
Requires: python-urllib3
Requires: PyYAML
Requires: python-argparse
Requires: python-pbr
Requires: tar
Requires: gzip
Requires: bzip2
Requires: openssh-clients
Requires: mdadm
Requires: util-linux-ng
Requires: udev
Requires: lvm2
Requires: dmidecode
Requires: parted
Requires: cloud-utils
Requires: e2fsprogs
Requires: gdisk
Requires: genisoimage
Requires: xfsprogs
Requires: pciutils
Requires: ethtool
%description -n fuel-agent
Fuel-agent package
%files -n fuel-agent -f %{_builddir}/%{name}-%{version}/fuel_agent/INSTALLED_FILES
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/fuel-agent/fuel-agent.conf
%{_datadir}/fuel-agent/cloud-init-templates/*
%package -n fencing-agent
Summary: Fencing agent
Version: 6.0.0
Release: 1
License: GPLv2
BuildRoot: %{_tmppath}/%{name}-%{version}
URL: http://mirantis.com
Requires: rubygem-ohai
%description -n fencing-agent
Fuel fencing agent
%files -n fencing-agent
/opt/nailgun/bin/fencing-agent.rb
/etc/cron.d/fencing-agent
%defattr(-,root,root)
%package -n fuel-package-updates
Summary: Fuel package update downloader
Version: %{version}
Release: %{release}
License: Apache
Group: Development/Libraries
Prefix: %{_prefix}
BuildArch: noarch
Requires: python-keystoneclient >= 0.11
Requires: python-keystonemiddleware >= 1.2.0
Requires: python-ordereddict >= 1.1
%description -n fuel-package-updates
Command line utility to download apt/yum repositories for Fuel
%files -n fuel-package-updates -f %{_builddir}/%{name}-%{version}/fuel_upgrade_system/fuel_package_updates/INSTALLED_FILES
%defattr(0755,root,root)
%package -n fuel-provisioning-scripts
Summary: Fuel provisioning scripts
Version: %{new_version}
Release: %{release}
URL: http://mirantis.com
License: Apache
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
Prefix: %{_prefix}
BuildArch: noarch
Requires: wget
%description -n fuel-provisioning-scripts
Fuel provisioning scripts package.
This is a part of Fuel All-in-one Controle plane
for Openstack. For more info go to http://wiki.openstack.org/Fuel
%files -n fuel-provisioning-scripts
%defattr(-,root,root)
%{_bindir}/download-debian-installer