forked from pool/cloud-init
- Update to version 17.1
+ Version numbering scheme change now YY.NUMBER_OF_RELESE_THAT_YEAR + Remove cloud.cfg.suse, use generated default config file + Remove addopenSUSEBase.patch, included upstream + Remove suseIntegratedHandler.patch, included upstream + Remove openSUSEhostsTemplate.diff, included upstream + Remove cloud-init-handle-no-carrier.patch, included upstream + Remove cloud-init-digital-ocean-datasource.patch, use upstream implementation + Remove cloud-init-digital-ocean-datasource-enable-by-default.patch, use upstream implementation + Remove cloud-init-fix-unicode-handling-binarydecode.patch, included upstream + Remove cloud-init-no-dmidecode-on-ppc64.patch, included upstream + Remove dataSourceOpenNebula.patch, use upstream implementation + Remove setupSUSEsysVInit.diff, included upstream + Remove SUSEsysVInit.diff, included upstream + Remove cloud-init-finalbeforelogin.patch, don't block login + Remove cloud-init-handle-not-implemented-query.patch, query option removed + Remove cloud-init-spceandtabs-clean.patch, indentation fixed upstream + Remove dynamicInitCmd.diff, different solution from upstream + Added cloud-init-more-tasks.patch, (bsc#1047363) replace cloud-init-finalbeforelogin.patch + Forward port cloud-init-python2-sigpipe.patch + Remove cloud-init-net-eni.patch, included upstream + Remove cloud-init-service.patch, included upstream + Forward port cloud-init-sysconfig-netpathfix.patch + Remove cloud-init-net-sysconfig-lp1665441.patch, included upstream + Remove cloud-init-python26.patch, included upstream + Add cloud-init-tests-set-exec.patch OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=88
This commit is contained in:
150
cloud-init.spec
150
cloud-init.spec
@@ -18,73 +18,59 @@
|
||||
%global configver 0.7
|
||||
|
||||
Name: cloud-init
|
||||
Version: 0.7.8
|
||||
Version: 17.1
|
||||
Release: 0
|
||||
License: GPL-3.0 and AGPL-3.0
|
||||
Summary: Cloud node initialization tool
|
||||
Url: http://launchpad.net/cloud-init/
|
||||
Group: System/Management
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Source1: cloud.cfg.suse
|
||||
Source2: rsyslog-cloud-init.cfg
|
||||
Patch0: suseSysVInit.diff
|
||||
# FIXME addopenSUSEBase.patch proposed for upstream merge
|
||||
Patch1: addopenSUSEBase.patch
|
||||
# FIXME suseIntegratedHandler.patch proposed for upstream merge
|
||||
Patch2: suseIntegratedHandler.patch
|
||||
Patch3: setupSUSEsysVInit.diff
|
||||
# FIXME openSUSEhostsTemplate.diff proposed for upstream merge
|
||||
Patch5: openSUSEhostsTemplate.diff
|
||||
# FIXME dynamicInitCmd.patch proposed for upstream merge
|
||||
Patch6: dynamicInitCmd.diff
|
||||
Patch9: cloud-init-no-dmidecode-on-ppc64.patch
|
||||
Source1: rsyslog-cloud-init.cfg
|
||||
# FIXME zypp_add_repos.diff needs proposed for upstream merge
|
||||
Patch4: zypp_add_repos.diff
|
||||
Patch10: cloud-init-no-user-lock-if-already-locked.patch
|
||||
Patch11: dataSourceOpenNebula.patch
|
||||
Patch12: fix-default-systemd-unit-dir.patch
|
||||
Patch14: cloud-init-finalbeforelogin.patch
|
||||
# FIXME cloud-init-more-tasks.patch proposed for upstream merge
|
||||
Patch13: cloud-init-more-tasks.patch
|
||||
# python2 disables SIGPIPE, causing broken pipe errors in shell scripts (bsc#903449)
|
||||
Patch20: cloud-init-python2-sigpipe.patch
|
||||
Patch21: cloud-init-net-eni.patch
|
||||
Patch22: cloud-init-service.patch
|
||||
Patch23: cloud-init-fix-unicode-handling-binarydecode.patch
|
||||
# From upstream patch
|
||||
Patch24: cloud-init-handle-no-carrier.patch
|
||||
Patch25: cloud-init-digital-ocean-datasource.patch
|
||||
Patch26: cloud-init-digital-ocean-datasource-enable-by-default.patch
|
||||
Patch27: cloud-init-sysconfig-netpathfix.patch
|
||||
Patch28: zypp_add_repos.diff
|
||||
Patch29: datasourceLocalDisk.patch
|
||||
Patch30: cloud-init-handle-not-implemented-query.patch
|
||||
Patch32: cloud-init-net-sysconfig-lp1665441.patch
|
||||
Patch33: cloud-init-spceandtabs-clean.patch
|
||||
Patch34: skip-argparse-on-python3.patch
|
||||
Patch34: cloud-init-tests-set-exec.patch
|
||||
Patch35: cloud-init-final-no-apt.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: filesystem
|
||||
%if 0%{?suse_version} && 0%{?suse_version} > 1315
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
%else
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-setuptools
|
||||
%endif
|
||||
# pkg-config is needed to find correct systemd unit dir
|
||||
BuildRequires: pkg-config
|
||||
# needed for /lib/udev
|
||||
BuildRequires: udev
|
||||
%if 0%{?suse_version} > 1320
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
# Test requirements
|
||||
#BuildRequires: python3-Cheetah
|
||||
BuildRequires: python3-Jinja2
|
||||
BuildRequires: python3-PrettyTable
|
||||
BuildRequires: python3-PyYAML
|
||||
BuildRequires: python3-configobj
|
||||
#BuildRequires: python3-contextlib2
|
||||
BuildRequires: python3-configobj >= 5.0.2
|
||||
BuildRequires: python3-httpretty
|
||||
BuildRequires: python3-jsonpatch
|
||||
BuildRequires: python3-mock
|
||||
BuildRequires: python3-nose
|
||||
BuildRequires: python3-oauthlib
|
||||
BuildRequires: python3-requests
|
||||
BuildRequires: python3-testtools
|
||||
%else
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-Jinja2
|
||||
BuildRequires: python-PyYAML
|
||||
BuildRequires: python-requests
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python-six
|
||||
%endif
|
||||
%if 0%{?is_opensuse} || 0%{?suse_version} == 1310 || 0%{?suse_version} == 1320
|
||||
BuildRequires: openSUSE-release
|
||||
%else
|
||||
BuildRequires: sles-release
|
||||
%endif
|
||||
Requires: bash
|
||||
Requires: file
|
||||
@@ -97,9 +83,10 @@ Requires: net-tools-deprecated
|
||||
Requires: openssh
|
||||
%if 0%{?suse_version} > 1320
|
||||
Requires: python3-boto >= 2.7
|
||||
Requires: python3-configobj
|
||||
Requires: python3-configobj >= 5.0.2
|
||||
Requires: python3-Jinja2
|
||||
Requires: python3-jsonpatch
|
||||
Requires: python3-jsonschema
|
||||
Requires: python3-oauthlib
|
||||
Requires: python3-PrettyTable
|
||||
Requires: python3-pyserial
|
||||
@@ -111,9 +98,10 @@ Requires: python3-xml
|
||||
%else
|
||||
Requires: python-argparse
|
||||
Requires: python-boto >= 2.7
|
||||
Requires: python-configobj
|
||||
Requires: python-configobj >= 5.0.2
|
||||
Requires: python-Jinja2
|
||||
Requires: python-jsonpatch
|
||||
Requires: python-jsonschema
|
||||
Requires: python-oauthlib
|
||||
Requires: python-PrettyTable
|
||||
Requires: python-pyserial
|
||||
@@ -140,7 +128,6 @@ Requires: dmidecode
|
||||
%endif
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1210
|
||||
%define initsys sysvinit_suse
|
||||
Patch40: cloud-init-python26.patch
|
||||
%else
|
||||
%define initsys systemd
|
||||
BuildRequires: systemd
|
||||
@@ -187,52 +174,29 @@ according to the fetched configuration data from the admin node.
|
||||
|
||||
Documentation and examples for cloud-init tools
|
||||
|
||||
%package test
|
||||
Summary: Cloud node initialization tool - Testsuite
|
||||
Group: System/Management
|
||||
Requires: cloud-init = %{version}
|
||||
|
||||
%description test
|
||||
Cloud-init is an init script that initializes a cloud node (VM)
|
||||
according to the fetched configuration data from the admin node.
|
||||
|
||||
Unit tests for the cloud-init tools
|
||||
#%package test
|
||||
#Summary: Cloud node initialization tool - Testsuite
|
||||
#Group: System/Management
|
||||
#Requires: cloud-init = %{version}
|
||||
#
|
||||
#%description test
|
||||
#Cloud-init is an init script that initializes a cloud node (VM)
|
||||
#according to the fetched configuration data from the admin node.
|
||||
#
|
||||
#Unit tests for the cloud-init tools
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2
|
||||
%patch3
|
||||
%patch5
|
||||
%patch6
|
||||
%patch9
|
||||
%patch4 -p0
|
||||
%patch10 -p1
|
||||
%patch11
|
||||
%patch12
|
||||
%patch14
|
||||
%patch13
|
||||
%patch20
|
||||
%patch21
|
||||
%patch22
|
||||
%patch23
|
||||
%patch24
|
||||
%patch25 -p1
|
||||
%patch26 -p1
|
||||
%patch27
|
||||
%patch28 -p0
|
||||
%patch29 -p0
|
||||
%patch30
|
||||
%patch32 -p1
|
||||
%patch33 -p1
|
||||
%patch34
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1210
|
||||
%patch40 -p1
|
||||
%endif
|
||||
%patch35 -p1
|
||||
|
||||
%if 0%{?suse_version} <= 1130
|
||||
# disable ecdsa for SLE 11 (not available)
|
||||
echo "ssh_genkeytypes: ['rsa', 'dsa']" >> %{SOURCE1}
|
||||
%endif
|
||||
|
||||
%build
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1315
|
||||
@@ -247,16 +211,11 @@ python3 setup.py build
|
||||
# these tests are currently failing due to suse patches
|
||||
rm -v tests/unittests/test_distros/test_netconfig.py
|
||||
rm -v tests/unittests/test_net.py
|
||||
# Ignore test failure currently not doing anything with opennebula
|
||||
rm -v tests/unittests/test_datasource/test_opennebula.py
|
||||
rm -v tests/unittests/test_datasource/test_cloudstack.py
|
||||
# These tests fail in python 3
|
||||
rm -v tests/unittests/test_datasource/test_altcloud.py
|
||||
rm -v tests/unittests/test_handler/test_handler_apt_source_v3.py
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1315
|
||||
python -m testtools.run
|
||||
%else
|
||||
python3 -m testtools.run
|
||||
%endif
|
||||
# To be investigated
|
||||
rm -v tests/unittests/test_handler/test_handler_ntp.py
|
||||
make test
|
||||
%endif
|
||||
|
||||
|
||||
@@ -275,7 +234,10 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/cloud
|
||||
# move documentation
|
||||
mkdir -p %{buildroot}%{_defaultdocdir}
|
||||
mv %{buildroot}%{_datadir}/doc/%{name} %{buildroot}%{docdir}
|
||||
cp -a %{SOURCE1} %{buildroot}/%{_sysconfdir}/cloud/cloud.cfg
|
||||
%if 0%{?suse_version} <= 1130
|
||||
# disable ecdsa for SLE 11 (not available)
|
||||
echo "ssh_genkeytypes: ['rsa', 'dsa']" >> %{buildroot}/%{_sysconfdir}/cloud/cloud.cfg
|
||||
%endif
|
||||
# copy the LICENSE
|
||||
cp LICENSE %{buildroot}%{docdir}
|
||||
# Set the distribution indicator
|
||||
@@ -296,7 +258,7 @@ sed -i s/INSERT_SUSE_DISTRO/opensuse/ %{buildroot}/%{_sysconfdir}/cloud/cloud.cf
|
||||
%if 0%{?suse_version} && 0%{?suse_version} > 1110
|
||||
mkdir -p %{buildroot}/%{_sysconfdir}/rsyslog.d
|
||||
mkdir -p %{buildroot}/usr/lib/udev/rules.d/
|
||||
cp -a %{SOURCE2} %{buildroot}/%{_sysconfdir}/rsyslog.d/21-cloudinit.conf
|
||||
cp -a %{SOURCE1} %{buildroot}/%{_sysconfdir}/rsyslog.d/21-cloudinit.conf
|
||||
mv %{buildroot}/lib/udev/rules.d/66-azure-ephemeral.rules %{buildroot}/usr/lib/udev/rules.d/
|
||||
%endif
|
||||
|
||||
@@ -396,15 +358,11 @@ popd
|
||||
%{docdir}/examples/*
|
||||
%{docdir}/README
|
||||
%{docdir}/*.txt
|
||||
%{docdir}/*.rst
|
||||
#%{docdir}/*.rst
|
||||
%dir %{docdir}/examples
|
||||
|
||||
%files test
|
||||
%defattr(-,root,root)
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1315
|
||||
%{python_sitelib}/tests
|
||||
%else
|
||||
%{python3_sitelib}/tests
|
||||
%endif
|
||||
#%files test
|
||||
#%defattr(-,root,root)
|
||||
#%{python_sitelib}/tests
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user