Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:Update
cloud-init.5901
cloud-init.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File cloud-init.spec of Package cloud-init.5901
# # spec file for package cloud-init # # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %global configver 0.7 Name: cloud-init Version: 17.1 Release: 0 Summary: Cloud node initialization tool License: GPL-3.0 and AGPL-3.0 Group: System/Management Url: http://launchpad.net/cloud-init/ Source0: %{name}-%{version}.tar.gz Source1: rsyslog-cloud-init.cfg # Remove Patch 4 & 5 for next source updated, included upstream Patch4: zypp_add_repos.diff Patch5: zypp_add_repo_test.patch # Remove Patch 6 for next source updated, included upstream (bsc#1064594) Patch6: cloud-init-hosts-template.patch # FIXME cloud-init-ntp-conf-suse.patch proposed for upstream merge (lp#1726572) Patch7: cloud-init-ntp-conf-suse.patch # FIXME cloud-init-translate-netconf-ipv4-keep-gw (bsc#1064854) # proposed for upstream merge (lp#1732966) Patch8: cloud-init-translate-netconf-ipv4-keep-gw.patch # FIXME cloud-init-break-cycle-local-service.patch Patch9: cloud-init-break-cycle-local-service.patch Patch10: cloud-init-no-user-lock-if-already-locked.patch Patch12: fix-default-systemd-unit-dir.patch # Remove Patch 13 for next source updated, included upstream Patch13: cloud-init-more-tasks.patch # python2 disables SIGPIPE, causing broken pipe errors in shell scripts (bsc#903449) Patch20: cloud-init-python2-sigpipe.patch Patch27: cloud-init-sysconfig-netpathfix.patch Patch29: datasourceLocalDisk.patch Patch34: cloud-init-tests-set-exec.patch Patch35: cloud-init-final-no-apt.patch Patch36: cloud-init-resize-ro-btrfs.patch BuildRequires: fdupes BuildRequires: filesystem # 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-Jinja2 BuildRequires: python3-PrettyTable BuildRequires: python3-PyYAML 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-Jinja2 BuildRequires: python-PyYAML BuildRequires: python-devel 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: e2fsprogs Requires: file Requires: growpart Requires: net-tools %if 0%{?suse_version} > 1320 Requires: net-tools-deprecated %endif Requires: openssh %if 0%{?suse_version} > 1320 Requires: python3-Jinja2 Requires: python3-PrettyTable Requires: python3-PyYAML Requires: python3-boto >= 2.7 Requires: python3-configobj >= 5.0.2 Requires: python3-jsonpatch Requires: python3-jsonschema Requires: python3-oauthlib Requires: python3-pyserial Requires: python3-requests Requires: python3-setuptools Requires: python3-six Requires: python3-xml %else Requires: python-Jinja2 Requires: python-PrettyTable Requires: python-PyYAML Requires: python-argparse Requires: python-boto >= 2.7 Requires: python-configobj >= 5.0.2 Requires: python-jsonpatch Requires: python-jsonschema Requires: python-oauthlib Requires: python-pyserial Requires: python-requests Requires: python-setuptools Requires: python-six Requires: python-xml %endif Requires: cloud-init-config = %configver Requires: sudo Requires: util-linux BuildRoot: %{_tmppath}/%{name}-%{version}-build %define docdir %{_defaultdocdir}/%{name} %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %ifarch %ix86 x86_64 Requires: pmtools %endif %else %ifarch %ix86 x86_64 Requires: dmidecode %endif %endif %if 0%{?suse_version} && 0%{?suse_version} <= 1210 %define initsys sysvinit_suse %else %define initsys systemd BuildRequires: systemd Requires: systemd %{?systemd_requires} %if 0%{?suse_version} && 0%{?suse_version} == 1220 %define systemd_prefix /lib %else %define systemd_prefix /usr/lib %endif %endif %if 0%{?suse_version} && 0%{?suse_version} >= 1315 Requires: wicked-service %else %if 0%{?suse_version} && 0%{?suse_version} <= 1110 Requires: sysconfig %else Requires: sysconfig-network %endif %endif %description Cloud-init is an init script that initializes a cloud node (VM) according to the fetched configuration data from the admin node. %package config-suse Summary: Configuration file for Cloud node initialization tool Group: System/Management Provides: cloud-init-config = %configver Conflicts: otherproviders(cloud-init-config) %description config-suse This package contains the product specific configuration file for cloud-init. %package doc Summary: Cloud node initialization tool - Documentation Group: System/Management Recommends: cloud-init = %{version} %description doc Cloud-init is an init script that initializes a cloud node (VM) 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 %prep %setup -q %patch4 -p0 %patch5 -p0 %patch6 %patch7 %patch8 %patch9 %patch10 -p1 %patch12 %patch13 %patch20 %patch27 %patch29 -p0 %patch34 %patch35 -p1 %patch36 %build %if 0%{?suse_version} && 0%{?suse_version} <= 1315 python setup.py build %else python3 setup.py build %endif %if 0%{?suse_version} > 1320 %check # 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 # To be investigated rm -v tests/unittests/test_handler/test_handler_ntp.py make test %endif %install %if 0%{?suse_version} && 0%{?suse_version} <= 1315 python setup.py install --root=%{buildroot} --prefix=%{_prefix} --install-lib=%{python_sitelib} --init-system=%{initsys} %else python3 setup.py install --root=%{buildroot} --prefix=%{_prefix} --install-lib=%{python3_sitelib} --init-system=%{initsys} %endif find %{buildroot} \( -name .gitignore -o -name .placeholder \) -delete # from debian install script for x in "%{buildroot}%{_bindir}/"*.py; do [ -f "${x}" ] && mv "${x}" "${x%.py}" done mkdir -p %{buildroot}%{_localstatedir}/lib/cloud # move documentation mkdir -p %{buildroot}%{_defaultdocdir} mv %{buildroot}%{_datadir}/doc/%{name} %{buildroot}%{docdir} %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 %if 0%{?suse_version} %if 0%{?suse_version} < 1130 #SLE 11, openSUSE 11.x is EOL sed -i s/suse/sles/ %{buildroot}/%{_sysconfdir}/cloud/cloud.cfg %endif %if 0%{?suse_version} > 1140 %if 0%{?is_opensuse} sed -i s/suse/opensuse/ %{buildroot}/%{_sysconfdir}/cloud/cloud.cfg %else sed -i s/suse/sles/ %{buildroot}/%{_sysconfdir}/cloud/cloud.cfg %endif %endif %endif %if 0%{?suse_version} && 0%{?suse_version} > 1110 mkdir -p %{buildroot}/%{_sysconfdir}/rsyslog.d mkdir -p %{buildroot}/usr/lib/udev/rules.d/ 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 # remove debian/ubuntu specific profile.d file (bnc#779553) rm -f %{buildroot}%{_sysconfdir}/profile.d/Z99-cloud-locale-test.sh # Remove non-SUSE templates rm %{buildroot}/%{_sysconfdir}/cloud/templates/*.debian.* rm %{buildroot}/%{_sysconfdir}/cloud/templates/*.redhat.* rm %{buildroot}/%{_sysconfdir}/cloud/templates/*.ubuntu.* # move sysvinit scripts into the "right" place %if 0%{?suse_version} && 0%{?suse_version} <= 1210 mkdir -p %{buildroot}/%{_initddir} mkdir -p %{buildroot}/%{_sbindir} pushd "%{buildroot}%{_initddir}" for iniF in *; do ln -s "%{_initddir}/${iniF}" "%{buildroot}/%{_sbindir}/rc${iniF}" done popd %endif # remove duplicate files %if 0%{?suse_version} %if 0%{?suse_version} <= 1315 %fdupes -n %{buildroot}%{python_sitelib} %else %fdupes -n %{buildroot}%{python3_sitelib} %endif %endif %if 0%{?suse_version} && 0%{?suse_version} <= 1210 %postun %insserv_cleanup %endif %files %defattr(-,root,root) # do not mark as doc or we get conflicts with the doc package %{docdir}/LICENSE %{_bindir}/cloud-init %{_bindir}/cloud-init-per %dir %{_sysconfdir}/cloud %config(noreplace) %{_sysconfdir}/cloud/cloud.cfg.d %config(noreplace) %{_sysconfdir}/cloud/templates %{_sysconfdir}/dhcp/dhclient-exit-hooks.d/hook-dhclient %{_sysconfdir}/NetworkManager/dispatcher.d/hook-network-manager %if 0%{?suse_version} && 0%{?suse_version} <= 1315 %{python_sitelib}/cloudinit %{python_sitelib}/cloud_init-%{version}-py%{py_ver}.egg-info %else %{python3_sitelib}/cloudinit %{python3_sitelib}/cloud_init-%{version}-py%{py3_ver}.egg-info %endif %{_prefix}/lib/cloud-init %if 0%{?suse_version} && 0%{?suse_version} <= 1210 %{_sbindir}/rccloud-config %{_sbindir}/rccloud-init %{_sbindir}/rccloud-init-local %{_sbindir}/rccloud-final %attr(0755, root, root) %{_initddir}/cloud-config %attr(0755, root, root) %{_initddir}/cloud-init %attr(0755, root, root) %{_initddir}/cloud-init-local %attr(0755, root, root) %{_initddir}/cloud-final %else %{systemd_prefix}/systemd/system-generators/cloud-init-generator %{systemd_prefix}/systemd/system/cloud-config.service %{systemd_prefix}/systemd/system/cloud-config.target %{systemd_prefix}/systemd/system/cloud-init-local.service %{systemd_prefix}/systemd/system/cloud-init.service %{systemd_prefix}/systemd/system/cloud-init.target %{systemd_prefix}/systemd/system/cloud-final.service %endif %if 0%{?suse_version} && 0%{?suse_version} > 1110 %dir %{_sysconfdir}/rsyslog.d %{_sysconfdir}/rsyslog.d/21-cloudinit.conf /usr/lib/udev/rules.d/66-azure-ephemeral.rules # This if condition really distinquished between OBS and IBS. # For SLE 12 builds in OBS owning the directories is not required, while # SLE 12 builds in IBS require owning the directories %else /lib/udev/rules.d/66-azure-ephemeral.rules %endif %dir %attr(0755, root, root) %{_localstatedir}/lib/cloud %dir %{docdir} %dir /etc/NetworkManager %dir /etc/NetworkManager/dispatcher.d %dir /etc/dhcp %dir /etc/dhcp/dhclient-exit-hooks.d %files config-suse %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/cloud/cloud.cfg %files doc %defattr(-,root,root) %{docdir}/examples/* %{docdir}/README %{docdir}/*.txt #%{docdir}/*.rst %dir %{docdir}/examples #%files test #%defattr(-,root,root) #%{python_sitelib}/tests %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor