SHA256
1
0
forked from pool/cloud-init
cloud-init/cloud-init.spec

211 lines
6.3 KiB
RPMSpec
Raw Normal View History

#
# spec file for package cloud-init
#
# Copyright (c) 2013 SUSE LINUX Products 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/
#
Name: cloud-init
- update to version 0.7.5 - open 0.7.5 - Add a debug log message around import failures - add a 'debug' module for easily printing out some information about datasource and cloud-init [Shraddha Pandhe] - support running apt with 'eatmydata' via configuration token apt_get_wrapper (LP: #1236531). - convert paths provided in config-drive 'files' to string before writing (LP: #1260072). - Azure: minor changes in logging output. ensure filenames are strings (not unicode). - config/cloud.cfg.d/05_logging.cfg: provide a default 'output' setting, to redirect cloud-init stderr and stdout /var/log/cloud-init-output.log. - drop support for resizing partitions with parted entirely (LP: #1212492). This was broken as it was anyway. - add support for vendordata in SmartOS and NoCloud datasources. - drop dependency on boto for crawling ec2 metadata service. - add 'Requires' on sudo (for OpenNebula datasource) in rpm specs, and 'Recommends' in the debian/control.in [Vlastimil Holer] - if mount_info reports /dev/root is a device path for /, then convert that to a device via help of kernel cmdline. - configdrive: consider partitions as possible datasources if they have theh correct filesystem label. [Paul Querna] - initial freebsd support [Harm Weites] - fix in is_ipv4 to accept IP addresses with a '0' in them. - Azure: fix issue when stale data in /var/lib/waagent (LP: #1269626) - skip config_modules that declare themselves only verified on a set of distros. Add them to 'unverified_modules' list to run anyway. - Add CloudSigma datasource [Kiril Vladimiroff] - Add initial support for Gentoo and Arch distributions [Nate House] OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=12
2014-04-14 21:15:14 +02:00
Version: 0.7.5
Release: 0
License: GPL-3.0
Summary: Cloud node initialization tool
Url: http://launchpad.net/cloud-init/
Group: System/Management
- update to version 0.7.5 - open 0.7.5 - Add a debug log message around import failures - add a 'debug' module for easily printing out some information about datasource and cloud-init [Shraddha Pandhe] - support running apt with 'eatmydata' via configuration token apt_get_wrapper (LP: #1236531). - convert paths provided in config-drive 'files' to string before writing (LP: #1260072). - Azure: minor changes in logging output. ensure filenames are strings (not unicode). - config/cloud.cfg.d/05_logging.cfg: provide a default 'output' setting, to redirect cloud-init stderr and stdout /var/log/cloud-init-output.log. - drop support for resizing partitions with parted entirely (LP: #1212492). This was broken as it was anyway. - add support for vendordata in SmartOS and NoCloud datasources. - drop dependency on boto for crawling ec2 metadata service. - add 'Requires' on sudo (for OpenNebula datasource) in rpm specs, and 'Recommends' in the debian/control.in [Vlastimil Holer] - if mount_info reports /dev/root is a device path for /, then convert that to a device via help of kernel cmdline. - configdrive: consider partitions as possible datasources if they have theh correct filesystem label. [Paul Querna] - initial freebsd support [Harm Weites] - fix in is_ipv4 to accept IP addresses with a '0' in them. - Azure: fix issue when stale data in /var/lib/waagent (LP: #1269626) - skip config_modules that declare themselves only verified on a set of distros. Add them to 'unverified_modules' list to run anyway. - Add CloudSigma datasource [Kiril Vladimiroff] - Add initial support for Gentoo and Arch distributions [Nate House] OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=12
2014-04-14 21:15:14 +02:00
Source0: %{name}-%{version}.tar.gz
Source1: cloud.cfg.suse
- update to version 0.7.4 + fix issue mounting 'ephemeral0' if ephemeral0 was an alias for a partitioned block device with target filesystem on ephemeral0.1. (LP: #1236594) + fix DataSourceAzure incompatibility with 2.6 (LP: #1232175) + fix power_state_change config module so that example works. Improve its documentation and add reference to 'timeout' + support apt-add-archive with 'cloud-archive:' format. (LP: #1244355) + Change SmartOS verb for availability zone (LP: #1249124) + documentation fix for boothooks to use 'cloud-init-per' + fix resizefs module by supporting kernels that do not have /proc/PID/mountinfo. (LP: #1248625) [Tim Daly Jr.] + fix 'make rpm' by removing 0.6.4 entry from ChangeLog (LP: #1241834) + fix omnibus chef installer (LP: #1182265) [Chris Wing] + small fix for OVF datasource for iso transport on non-iso9660 filesystem + determine if upstart version is suitable for 'initctl reload-configuration' (LP: #1124384). If so, then invoke it. supports setting up instance-store disk with partition table and filesystem. + add Azure datasource. + add support for SuSE / SLES [Juerg Haefliger] + add a trailing carriage return to chpasswd input, which reportedly caused a problem on rhel5 if missing. + support individual MIME segments to be gzip compressed (LP: #1203203) + always finalize handlers even if processing failed (LP: #1203368) + support merging into cloud-config via jsonp. (LP: #1200476) + add datasource 'SmartOS' for Joyent Cloud. Adds a dependency on serial. + add 'log_time' helper to util for timing how long things take which also reads from uptime. uptime is useful as clock may change during boot due to ntp. + prefer growpart resizer to 'parted resizepart' (LP: #1212492) OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=4
2014-01-04 18:43:26 +01:00
Patch0: suseSysVInit.diff
- update to version 0.7.5 - open 0.7.5 - Add a debug log message around import failures - add a 'debug' module for easily printing out some information about datasource and cloud-init [Shraddha Pandhe] - support running apt with 'eatmydata' via configuration token apt_get_wrapper (LP: #1236531). - convert paths provided in config-drive 'files' to string before writing (LP: #1260072). - Azure: minor changes in logging output. ensure filenames are strings (not unicode). - config/cloud.cfg.d/05_logging.cfg: provide a default 'output' setting, to redirect cloud-init stderr and stdout /var/log/cloud-init-output.log. - drop support for resizing partitions with parted entirely (LP: #1212492). This was broken as it was anyway. - add support for vendordata in SmartOS and NoCloud datasources. - drop dependency on boto for crawling ec2 metadata service. - add 'Requires' on sudo (for OpenNebula datasource) in rpm specs, and 'Recommends' in the debian/control.in [Vlastimil Holer] - if mount_info reports /dev/root is a device path for /, then convert that to a device via help of kernel cmdline. - configdrive: consider partitions as possible datasources if they have theh correct filesystem label. [Paul Querna] - initial freebsd support [Harm Weites] - fix in is_ipv4 to accept IP addresses with a '0' in them. - Azure: fix issue when stale data in /var/lib/waagent (LP: #1269626) - skip config_modules that declare themselves only verified on a set of distros. Add them to 'unverified_modules' list to run anyway. - Add CloudSigma datasource [Kiril Vladimiroff] - Add initial support for Gentoo and Arch distributions [Nate House] OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=12
2014-04-14 21:15:14 +02:00
Patch1: addopenSUSEBase.patch
Patch2: suseIntegratedHandler.patch
- update to version 0.7.4 + fix issue mounting 'ephemeral0' if ephemeral0 was an alias for a partitioned block device with target filesystem on ephemeral0.1. (LP: #1236594) + fix DataSourceAzure incompatibility with 2.6 (LP: #1232175) + fix power_state_change config module so that example works. Improve its documentation and add reference to 'timeout' + support apt-add-archive with 'cloud-archive:' format. (LP: #1244355) + Change SmartOS verb for availability zone (LP: #1249124) + documentation fix for boothooks to use 'cloud-init-per' + fix resizefs module by supporting kernels that do not have /proc/PID/mountinfo. (LP: #1248625) [Tim Daly Jr.] + fix 'make rpm' by removing 0.6.4 entry from ChangeLog (LP: #1241834) + fix omnibus chef installer (LP: #1182265) [Chris Wing] + small fix for OVF datasource for iso transport on non-iso9660 filesystem + determine if upstart version is suitable for 'initctl reload-configuration' (LP: #1124384). If so, then invoke it. supports setting up instance-store disk with partition table and filesystem. + add Azure datasource. + add support for SuSE / SLES [Juerg Haefliger] + add a trailing carriage return to chpasswd input, which reportedly caused a problem on rhel5 if missing. + support individual MIME segments to be gzip compressed (LP: #1203203) + always finalize handlers even if processing failed (LP: #1203368) + support merging into cloud-config via jsonp. (LP: #1200476) + add datasource 'SmartOS' for Joyent Cloud. Adds a dependency on serial. + add 'log_time' helper to util for timing how long things take which also reads from uptime. uptime is useful as clock may change during boot due to ntp. + prefer growpart resizer to 'parted resizepart' (LP: #1212492) OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=4
2014-01-04 18:43:26 +01:00
Patch3: setupSUSEsysVInit.diff
Patch5: openSUSEhostsTemplate.diff
BuildRequires: fdupes
BuildRequires: filesystem
BuildRequires: python-devel
BuildRequires: python-setuptools
Requires: growpart
Requires: python-argparse
Requires: python-boto >= 2.7
Requires: python-cheetah
Requires: python-configobj
Requires: python-jsonpatch
Requires: python-oauth
Requires: python-PrettyTable
Requires: python-pyserial
Requires: python-PyYAML
Requires: python-requests
Requires: python-xml
Requires: python-yaml
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define docdir %{_defaultdocdir}/%{name}
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%else
BuildArch: noarch
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 1210
- update to version 0.7.4 + fix issue mounting 'ephemeral0' if ephemeral0 was an alias for a partitioned block device with target filesystem on ephemeral0.1. (LP: #1236594) + fix DataSourceAzure incompatibility with 2.6 (LP: #1232175) + fix power_state_change config module so that example works. Improve its documentation and add reference to 'timeout' + support apt-add-archive with 'cloud-archive:' format. (LP: #1244355) + Change SmartOS verb for availability zone (LP: #1249124) + documentation fix for boothooks to use 'cloud-init-per' + fix resizefs module by supporting kernels that do not have /proc/PID/mountinfo. (LP: #1248625) [Tim Daly Jr.] + fix 'make rpm' by removing 0.6.4 entry from ChangeLog (LP: #1241834) + fix omnibus chef installer (LP: #1182265) [Chris Wing] + small fix for OVF datasource for iso transport on non-iso9660 filesystem + determine if upstart version is suitable for 'initctl reload-configuration' (LP: #1124384). If so, then invoke it. supports setting up instance-store disk with partition table and filesystem. + add Azure datasource. + add support for SuSE / SLES [Juerg Haefliger] + add a trailing carriage return to chpasswd input, which reportedly caused a problem on rhel5 if missing. + support individual MIME segments to be gzip compressed (LP: #1203203) + always finalize handlers even if processing failed (LP: #1203368) + support merging into cloud-config via jsonp. (LP: #1200476) + add datasource 'SmartOS' for Joyent Cloud. Adds a dependency on serial. + add 'log_time' helper to util for timing how long things take which also reads from uptime. uptime is useful as clock may change during boot due to ntp. + prefer growpart resizer to 'parted resizepart' (LP: #1212492) OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=4
2014-01-04 18:43:26 +01:00
%define initsys sysvinit_suse
%else
%define initsys systemd
BuildRequires: systemd
%{?systemd_requires}
%if 0%{?suse_version} && 0%{?suse_version} == 1220
%define systemd_prefix /lib
%else
%define systemd_prefix /usr/lib
%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 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
- update to version 0.7.4 + fix issue mounting 'ephemeral0' if ephemeral0 was an alias for a partitioned block device with target filesystem on ephemeral0.1. (LP: #1236594) + fix DataSourceAzure incompatibility with 2.6 (LP: #1232175) + fix power_state_change config module so that example works. Improve its documentation and add reference to 'timeout' + support apt-add-archive with 'cloud-archive:' format. (LP: #1244355) + Change SmartOS verb for availability zone (LP: #1249124) + documentation fix for boothooks to use 'cloud-init-per' + fix resizefs module by supporting kernels that do not have /proc/PID/mountinfo. (LP: #1248625) [Tim Daly Jr.] + fix 'make rpm' by removing 0.6.4 entry from ChangeLog (LP: #1241834) + fix omnibus chef installer (LP: #1182265) [Chris Wing] + small fix for OVF datasource for iso transport on non-iso9660 filesystem + determine if upstart version is suitable for 'initctl reload-configuration' (LP: #1124384). If so, then invoke it. supports setting up instance-store disk with partition table and filesystem. + add Azure datasource. + add support for SuSE / SLES [Juerg Haefliger] + add a trailing carriage return to chpasswd input, which reportedly caused a problem on rhel5 if missing. + support individual MIME segments to be gzip compressed (LP: #1203203) + always finalize handlers even if processing failed (LP: #1203368) + support merging into cloud-config via jsonp. (LP: #1200476) + add datasource 'SmartOS' for Joyent Cloud. Adds a dependency on serial. + add 'log_time' helper to util for timing how long things take which also reads from uptime. uptime is useful as clock may change during boot due to ntp. + prefer growpart resizer to 'parted resizepart' (LP: #1212492) OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=4
2014-01-04 18:43:26 +01:00
%patch0 -p1
%patch1 -p1
%patch2
- update to version 0.7.4 + fix issue mounting 'ephemeral0' if ephemeral0 was an alias for a partitioned block device with target filesystem on ephemeral0.1. (LP: #1236594) + fix DataSourceAzure incompatibility with 2.6 (LP: #1232175) + fix power_state_change config module so that example works. Improve its documentation and add reference to 'timeout' + support apt-add-archive with 'cloud-archive:' format. (LP: #1244355) + Change SmartOS verb for availability zone (LP: #1249124) + documentation fix for boothooks to use 'cloud-init-per' + fix resizefs module by supporting kernels that do not have /proc/PID/mountinfo. (LP: #1248625) [Tim Daly Jr.] + fix 'make rpm' by removing 0.6.4 entry from ChangeLog (LP: #1241834) + fix omnibus chef installer (LP: #1182265) [Chris Wing] + small fix for OVF datasource for iso transport on non-iso9660 filesystem + determine if upstart version is suitable for 'initctl reload-configuration' (LP: #1124384). If so, then invoke it. supports setting up instance-store disk with partition table and filesystem. + add Azure datasource. + add support for SuSE / SLES [Juerg Haefliger] + add a trailing carriage return to chpasswd input, which reportedly caused a problem on rhel5 if missing. + support individual MIME segments to be gzip compressed (LP: #1203203) + always finalize handlers even if processing failed (LP: #1203368) + support merging into cloud-config via jsonp. (LP: #1200476) + add datasource 'SmartOS' for Joyent Cloud. Adds a dependency on serial. + add 'log_time' helper to util for timing how long things take which also reads from uptime. uptime is useful as clock may change during boot due to ntp. + prefer growpart resizer to 'parted resizepart' (LP: #1212492) OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=4
2014-01-04 18:43:26 +01:00
%patch3 -p1
%patch5
%if 0%{?suse_version} <= 1130
# disable ecdsa for SLE 11 (not available)
echo "ssh_genkeytypes: ['rsa', 'dsa']" >> %{SOURCE1}
%endif
# Install service files into correct location
sed -i "s|/etc/systemd/system|%{systemd_prefix}/systemd/system|" setup.py
%build
python setup.py build
%install
python setup.py install --root=%{buildroot} --prefix=%{_prefix} --install-lib=%{python_sitelib} --init-system=%{initsys}
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}
cp -a %{SOURCE1} %{buildroot}/%{_sysconfdir}/cloud/cloud.cfg
# 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/INSERT_SUSE_DISTRO/sles/ %{buildroot}/%{_sysconfdir}/cloud/cloud.cfg
%endif
%if 0%{?suse_version} > 1140
%if 0%{?suse_version} == 1315
# SLE 12
sed -i s/INSERT_SUSE_DISTRO/sles/ %{buildroot}/%{_sysconfdir}/cloud/cloud.cfg
%else
sed -i s/INSERT_SUSE_DISTRO/opensuse/ %{buildroot}/%{_sysconfdir}/cloud/cloud.cfg
%endif
%endif
%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}
%fdupes %{buildroot}%{python_sitelib}
%endif
%postun
%insserv_cleanup
%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
%config(noreplace) %{_sysconfdir}/cloud/
%{python_sitelib}/cloudinit
%{python_sitelib}/cloud_init-%{version}-py%{py_ver}.egg-info
%{_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/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-final.service
%endif
%dir %attr(0755, root, root) %{_localstatedir}/lib/cloud
%dir %{docdir}
%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