2019-09-30 10:35:22 -04:00
|
|
|
Name: cloud-init
|
|
|
|
|
Version: 17.1
|
2020-03-14 16:30:33 +08:00
|
|
|
Release: 12
|
2019-09-30 10:35:22 -04:00
|
|
|
Summary: the defacto multi-distribution package that handles early initialization of a cloud instance.
|
|
|
|
|
License: ASL 2.0 or GPLv3
|
|
|
|
|
URL: http://launchpad.net/cloud-init
|
2019-11-06 19:04:31 +08:00
|
|
|
Source0: https://launchpad.net/%{name}/trunk/%{version}/+download/%{name}-%{version}.tar.gz
|
2019-09-30 10:35:22 -04:00
|
|
|
|
|
|
|
|
Source1: cloud-init-tmpfiles.conf
|
|
|
|
|
|
|
|
|
|
Patch0: cloud-init-17.1-disable-lxd-tests.patch
|
2019-11-08 15:32:39 +08:00
|
|
|
Patch1: cloud-init-17.1-nm-controlled.patch
|
2019-09-30 10:35:22 -04:00
|
|
|
Patch2: cloud-init-17.1-no-override-default-network.patch
|
|
|
|
|
|
2019-11-06 19:04:31 +08:00
|
|
|
Patch6000: EC2-Limit-network-config-to-fallback-nic-fix-local-i.patch
|
|
|
|
|
Patch6001: ntp-fix-config-module-schema-to-allow-empty-ntp-conf.patch
|
|
|
|
|
Patch6002: resizefs-Fix-regression-when-system-booted-with-root.patch
|
|
|
|
|
Patch6003: hosts-Fix-openSUSE-and-SLES-setup-for-etc-hosts-and-.patch
|
|
|
|
|
Patch6004: EC2-Fix-bug-using-fallback_nic-and-metadata-when-res.patch
|
|
|
|
|
Patch6005: Fix-ssh-keys-validation-in-ssh_util.patch
|
|
|
|
|
Patch6006: stages-fix-tracebacks-if-a-module-stage-is-undefined.patch
|
|
|
|
|
Patch6007: stages-Fix-bug-causing-datasource-to-have-incorrect-.patch
|
2019-09-30 10:35:22 -04:00
|
|
|
|
2019-12-25 15:43:33 +08:00
|
|
|
Patch9000: bugfix-cloud-init-add-openEuler-os.patch
|
2019-11-06 19:04:31 +08:00
|
|
|
Patch9001: bugfix-sort-requirements.patch
|
|
|
|
|
Patch9002: add-variable-to-forbid-tmp-dir.patch
|
2019-09-30 10:35:22 -04:00
|
|
|
|
2019-11-06 19:04:31 +08:00
|
|
|
BuildRequires: pkgconfig(systemd) python3-devel python3-setuptools systemd
|
2019-09-30 10:35:22 -04:00
|
|
|
BuildRequires: iproute python3-configobj python3-httpretty >= 0.8.14-2
|
|
|
|
|
BuildRequires: python3-jinja2 python3-jsonpatch python3-jsonschema
|
|
|
|
|
BuildRequires: python3-mock python3-nose python3-oauthlib python3-prettytable
|
|
|
|
|
BuildRequires: python3-pyserial python3-PyYAML python3-requests python3-six
|
2019-12-03 18:32:47 +08:00
|
|
|
BuildRequires: python3-unittest2 dnf %{_vendor}-release
|
2019-09-30 10:35:22 -04:00
|
|
|
|
|
|
|
|
Requires: e2fsprogs iproute python3-libselinux net-tools python3-policycoreutils
|
|
|
|
|
Requires: procps python3-configobj python3-jinja2 python3-jsonpatch xfsprogs
|
|
|
|
|
Requires: python3-jsonschema python3-oauthlib python3-prettytable util-linux
|
|
|
|
|
Requires: python3-pyserial python3-pyyaml python3-requests python3-six shadow
|
|
|
|
|
%{?systemd_requires}
|
|
|
|
|
|
2019-11-06 19:04:31 +08:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
2019-09-30 10:35:22 -04:00
|
|
|
%description
|
|
|
|
|
Cloud-init is the defacto multi-distribution package that handles early
|
|
|
|
|
initialization of a cloud instance.
|
|
|
|
|
|
|
|
|
|
%package_help
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n %{name}-%{version} -p1
|
2019-12-03 18:32:47 +08:00
|
|
|
echo %{_vendor}
|
2019-09-30 10:35:22 -04:00
|
|
|
sed -i -e 's|#!/usr/bin/env python|#!/usr/bin/env python3|' \
|
|
|
|
|
-e 's|#!/usr/bin/python|#!/usr/bin/python3|' tools/* cloudinit/ssh_util.py
|
2019-12-03 18:32:47 +08:00
|
|
|
sed -i 's/\/etc\/redhat-release/\/etc\/%{_vendor}-release/g' setup.py
|
2019-09-30 10:35:22 -04:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%py3_install -- --init-system=systemd
|
2019-12-25 15:43:33 +08:00
|
|
|
python3 tools/render-cloudcfg --variant openEuler > %{buildroot}/%{_sysconfdir}/cloud/cloud.cfg
|
2019-09-30 10:35:22 -04:00
|
|
|
install -d %{buildroot}/var/lib/cloud
|
2019-11-06 19:04:31 +08:00
|
|
|
install -d %{buildroot}/run/%{name}
|
2019-09-30 10:35:22 -04:00
|
|
|
install -D -m 0644 %{SOURCE1} %{buildroot}/%{_tmpfilesdir}/%{name}.conf
|
|
|
|
|
install -D -m 0644 tools/21-cloudinit.conf %{buildroot}/%{_sysconfdir}/rsyslog.d/21-cloudinit.conf
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
rm -f $RPM_BUILD_DIR/%{name}-%{version}/tests/unittests/test_handler/test_handler_ntp.py
|
2019-12-25 15:43:33 +08:00
|
|
|
rm -f $RPM_BUILD_DIR/%{name}-%{version}/tests/unittests/test_datasource/test_opennebula.py
|
2019-09-30 10:35:22 -04:00
|
|
|
|
2020-03-14 16:30:33 +08:00
|
|
|
#nosetests-%%{python3_version} tests/unittests/
|
2019-09-30 10:35:22 -04:00
|
|
|
|
2019-11-06 19:04:31 +08:00
|
|
|
%pre
|
|
|
|
|
|
2019-09-30 10:35:22 -04:00
|
|
|
%preun
|
|
|
|
|
%systemd_preun cloud-config.service cloud-config.target cloud-final.service cloud-init.service cloud-init.target cloud-init-local.service
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
if [ $1 -eq 1 ] ; then
|
|
|
|
|
/bin/systemctl enable cloud-config.service >/dev/null 2>&1 || :
|
|
|
|
|
/bin/systemctl enable cloud-final.service >/dev/null 2>&1 || :
|
|
|
|
|
/bin/systemctl enable cloud-init.service >/dev/null 2>&1 || :
|
|
|
|
|
/bin/systemctl enable cloud-init-local.service >/dev/null 2>&1 || :
|
|
|
|
|
elif [ $1 -eq 2 ]; then
|
|
|
|
|
/bin/systemctl is-enabled cloud-config.service >/dev/null 2>&1 &&
|
|
|
|
|
/bin/systemctl reenable cloud-config.service >/dev/null 2>&1 || :
|
|
|
|
|
/bin/systemctl is-enabled cloud-final.service >/dev/null 2>&1 &&
|
|
|
|
|
/bin/systemctl reenable cloud-final.service >/dev/null 2>&1 || :
|
|
|
|
|
/bin/systemctl is-enabled cloud-init.service >/dev/null 2>&1 &&
|
|
|
|
|
/bin/systemctl reenable cloud-init.service >/dev/null 2>&1 || :
|
|
|
|
|
/bin/systemctl is-enabled cloud-init-local.service >/dev/null 2>&1 &&
|
|
|
|
|
/bin/systemctl reenable cloud-init-local.service >/dev/null 2>&1 || :
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
%postun
|
2019-12-03 18:32:47 +08:00
|
|
|
%systemd_postun cloud-config.service cloud-config.target cloud-final.service cloud-init.service cloud-init.target cloud-init-local.service
|
2019-09-30 10:35:22 -04:00
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%doc ChangeLog
|
|
|
|
|
%license LICENSE LICENSE-Apache2.0 LICENSE-GPLv3
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/cloud/cloud.cfg
|
|
|
|
|
%dir %{_sysconfdir}/cloud/cloud.cfg.d
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/cloud/cloud.cfg.d/*.cfg
|
|
|
|
|
%doc %{_sysconfdir}/cloud/cloud.cfg.d/README
|
|
|
|
|
%dir %{_sysconfdir}/rsyslog.d
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/rsyslog.d/21-cloudinit.conf
|
|
|
|
|
%{_sysconfdir}/NetworkManager/dispatcher.d/hook-network-manager
|
|
|
|
|
%{_sysconfdir}/dhcp/dhclient-exit-hooks.d/hook-dhclient
|
|
|
|
|
/lib/udev/rules.d/66-azure-ephemeral.rules
|
|
|
|
|
%{_unitdir}/cloud-config.service
|
|
|
|
|
%{_unitdir}/cloud-final.service
|
|
|
|
|
%{_unitdir}/cloud-init.service
|
|
|
|
|
%{_unitdir}/cloud-init-local.service
|
|
|
|
|
%{_unitdir}/cloud-config.target
|
|
|
|
|
%{_unitdir}/cloud-init.target
|
|
|
|
|
/usr/lib/systemd/system-generators/cloud-init-generator
|
|
|
|
|
%{_tmpfilesdir}/%{name}.conf
|
|
|
|
|
%{_libexecdir}/%{name}
|
|
|
|
|
%{_bindir}/cloud-init*
|
|
|
|
|
%{python3_sitelib}/*
|
2019-11-06 19:04:31 +08:00
|
|
|
%dir /run/%{name}
|
2019-09-30 10:35:22 -04:00
|
|
|
%dir /var/lib/cloud
|
|
|
|
|
|
|
|
|
|
%files help
|
|
|
|
|
%doc doc/*
|
|
|
|
|
%dir %{_sysconfdir}/cloud/templates
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/cloud/templates/*
|
|
|
|
|
%exclude /usr/share/doc/*
|
|
|
|
|
|
|
|
|
|
%changelog
|
2020-03-14 16:30:33 +08:00
|
|
|
* Sat Mar 14 2020 chengquan <chengquan3@huawei.com> - 17.1-12
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:fixbug in self-building
|
|
|
|
|
|
2019-12-25 15:43:33 +08:00
|
|
|
* Mon Dec 23 2019 chengquan <chengquan3@huawei.com> - 17.1-11
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:add openEuler into distros
|
|
|
|
|
|
2019-12-03 18:32:47 +08:00
|
|
|
* Thu Oct 31 2019 chengquan <chengquan3@huawei.com> - 17.1-10
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:fix %postun marco and change OS realease
|
|
|
|
|
|
2019-11-06 19:04:31 +08:00
|
|
|
* Tue Oct 22 2019 openEuler Buildteam <buildteam@openeuler.org> - 17.1-9
|
|
|
|
|
- Package rebuild.
|
|
|
|
|
|
2019-09-30 10:35:22 -04:00
|
|
|
* Tue Sep 17 2019 openEuler Buildteam <buildteam@openeuler.org> - 17.1-8
|
2019-11-06 19:04:31 +08:00
|
|
|
- Package init.
|