4907847
Name:           cloud-init
090f910
Version:        0.7.8
01c4b43
Release:        3%{?dist}
dace9fa
Summary:        Cloud instance init scripts
4907847
4907847
Group:          System Environment/Base
4907847
License:        GPLv3
4907847
URL:            http://launchpad.net/cloud-init
1508f89
Source0:        https://launchpad.net/cloud-init/trunk/%{version}/+download/%{name}-%{version}.tar.gz
45ef3b0
# bzr export -r 1245 cloud-init-0.7.6-bzr1245.tar.gz lp:cloud-init
1508f89
#Source0:        cloud-init-0.7.6-bzr1245.tar.gz
4907847
Source1:        cloud-init-fedora.cfg
4907847
Source2:        cloud-init-README.fedora
880fe2b
Source3:        cloud-init-tmpfiles.conf
f048ee2
090f910
Patch0:         cloud-init-0.7.8-fedora.patch
45ef3b0
4bfe367
# Fix rsyslog log filtering
4bfe367
# https://code.launchpad.net/~gholms/cloud-init/rsyslog-programname/+merge/186906
090f910
#Patch1:         cloud-init-0.7.5-rsyslog-programname.patch
48cd58f
0a23a4d
# Add 3 ecdsa-sha2-nistp* ssh key types now that they are standardized
0a23a4d
# https://bugzilla.redhat.com/show_bug.cgi?id=1151824
45ef3b0
Patch3:         cloud-init-0.7.6-bzr1245-ecdsa.patch
0a23a4d
a510c9b
# Handle whitespace in lists of groups to add new users to
a510c9b
# https://bugs.launchpad.net/cloud-init/+bug/1354694
a510c9b
# https://bugzilla.redhat.com/show_bug.cgi?id=1126365
45ef3b0
Patch4:         cloud-init-0.7.6-bzr1245-groupadd-list.patch
a510c9b
37c3202
# Use dnf instead of yum when available
37c3202
# https://bugzilla.redhat.com/show_bug.cgi?id=1194451
090f910
Patch7:         cloud-init-0.7.8-dnf.patch
090f910
090f910
# Skip apt-source tests that are sensitive to the system's hostname
090f910
# https://bugs.launchpad.net/cloud-init/+bug/1629149
090f910
Patch8:         cloud-init-0.7.8-apt-dns-test.patch
37c3202
6565dcf
# Ensure cloud-init-local runs before NetworkManager
6565dcf
# https://git.launchpad.net/cloud-init/commit/?id=1b71b47
6565dcf
Patch9:         cloud-init-0.7.8-before-nm.patch
6565dcf
83956db
# Backport DigitalOcean network configuration support
83956db
# https://git.launchpad.net/cloud-init/commit/?id=9f83bb8
83956db
# https://bugzilla.redhat.com/show_bug.cgi?id=1380489
83956db
Patch10:        cloud-init-0.7.8-digitalocean-net.patch
83956db
b48cb59
# Do not write NM_CONTROLLED=no in generated interface config files
b48cb59
# https://bugzilla.redhat.com/show_bug.cgi?id=1385172
b48cb59
Patch11:        cloud-init-0.7.8-nm-controlled.patch
b48cb59
01c4b43
# Enable the DigitalOcean metadata provider by default
01c4b43
# https://git.launchpad.net/cloud-init/commit/?id=7ae2011
01c4b43
# https://bugzilla.redhat.com/show_bug.cgi?id=1388568
01c4b43
Patch12:        cloud-init-0.7.8-enable-digitalocean.patch
01c4b43
70a100e
BuildArch:      noarch
4907847
45ef3b0
BuildRequires:  pkgconfig
ec4b2b3
BuildRequires:  python3-devel
ec4b2b3
BuildRequires:  python3-setuptools
45ef3b0
BuildRequires:  systemd
45ef3b0
# For pkgconfig
45ef3b0
BuildRequires:  systemd-devel
ec4b2b3
ec4b2b3
# For tests
31b1029
BuildRequires:  iproute
ec4b2b3
BuildRequires:  python3-configobj
ec4b2b3
BuildRequires:  python3-httpretty
ec4b2b3
BuildRequires:  python3-jinja2
ec4b2b3
BuildRequires:  python3-jsonpatch
ec4b2b3
BuildRequires:  python3-mock
ec4b2b3
BuildRequires:  python3-nose
ec4b2b3
BuildRequires:  python3-oauthlib
4175f1c
BuildRequires:  python3-prettytable
ec4b2b3
BuildRequires:  python3-pyserial
ec4b2b3
BuildRequires:  python3-PyYAML
ec4b2b3
BuildRequires:  python3-requests
ec4b2b3
BuildRequires:  python3-six
45ef3b0
BuildRequires:  python3-unittest2
ec4b2b3
4907847
Requires:       e2fsprogs
4907847
Requires:       iproute
ec4b2b3
Requires:       libselinux-python3
4907847
Requires:       net-tools
ec4b2b3
Requires:       policycoreutils-python3
4907847
Requires:       procps
ec4b2b3
Requires:       python3-configobj
ec4b2b3
Requires:       python3-jinja2
ec4b2b3
Requires:       python3-jsonpatch
ec4b2b3
Requires:       python3-oauthlib
ec4b2b3
Requires:       python3-prettytable
ec4b2b3
Requires:       python3-pyserial
ec4b2b3
Requires:       python3-PyYAML
ec4b2b3
Requires:       python3-requests
ec4b2b3
Requires:       python3-six
4907847
Requires:       shadow-utils
45ef3b0
Requires:       util-linux
10d7e75
Requires:       xfsprogs
1bd98b8
45ef3b0
%{?systemd_requires}
45ef3b0
4907847
4907847
%description
4907847
Cloud-init is a set of init scripts for cloud instances.  Cloud instances
4907847
need special scripts to run during initialization to retrieve and install
4907847
ssh keys and to let the user run various scripts.
4907847
4907847
4907847
%prep
1508f89
%autosetup -p1
4907847
4d2d775
# Change shebangs
4d2d775
sed -i -e 's|#!/usr/bin/env python|#!/usr/bin/env python3|' \
4d2d775
       -e 's|#!/usr/bin/python|#!/usr/bin/python3|' tools/* cloudinit/ssh_util.py
4d2d775
4907847
cp -p %{SOURCE2} README.fedora
4907847
4907847
4907847
%build
ec4b2b3
%{__python3} setup.py build
4907847
4907847
4907847
%install
4907847
rm -rf $RPM_BUILD_ROOT
45ef3b0
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT --init-system=systemd
4907847
Orion Poplawski 3eb2ef9
# Don't ship the tests
ec4b2b3
rm -r $RPM_BUILD_ROOT%{python3_sitelib}/tests
Orion Poplawski 3eb2ef9
880fe2b
mkdir -p $RPM_BUILD_ROOT/var/lib/cloud
880fe2b
880fe2b
# /run/cloud-init needs a tmpfiles.d entry
880fe2b
mkdir -p $RPM_BUILD_ROOT/run/cloud-init
45ef3b0
mkdir -p $RPM_BUILD_ROOT/%{_tmpfilesdir}
880fe2b
cp -p %{SOURCE3} $RPM_BUILD_ROOT/%{_tmpfilesdir}/%{name}.conf
4907847
4907847
# We supply our own config file since our software differs from Ubuntu's.
7ce36c0
cp -p %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/cloud/cloud.cfg
4907847
7ce36c0
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/rsyslog.d
7ce36c0
cp -p tools/21-cloudinit.conf $RPM_BUILD_ROOT/%{_sysconfdir}/rsyslog.d/21-cloudinit.conf
4907847
880fe2b
ec4b2b3
%check
be823e5
nosetests-%{python3_version} tests/unittests/
4907847
45ef3b0
4907847
%clean
4907847
rm -rf $RPM_BUILD_ROOT
4907847
4907847
4907847
%post
469555b
# These services are now enabled by the cloud image's kickstart.
469555b
# They should probably be done with a preset instead.
45ef3b0
%systemd_post cloud-config.service cloud-config.target cloud-final.service cloud-init.service cloud-init.target cloud-init-local.service
45ef3b0
4907847
4907847
%preun
45ef3b0
%systemd_preun cloud-config.service cloud-config.target cloud-final.service cloud-init.service cloud-init.target cloud-init-local.service
45ef3b0
4907847
4907847
%postun
469555b
%systemd_postun
4907847
4907847
4907847
%files
2ddd8f2
%license LICENSE
Colin Walters 4b64923
%doc ChangeLog README.fedora
4175f1c
%doc doc/*
7ce36c0
%config(noreplace) %{_sysconfdir}/cloud/cloud.cfg
7ce36c0
%dir               %{_sysconfdir}/cloud/cloud.cfg.d
7ce36c0
%config(noreplace) %{_sysconfdir}/cloud/cloud.cfg.d/*.cfg
7ce36c0
%doc               %{_sysconfdir}/cloud/cloud.cfg.d/README
7ce36c0
%dir               %{_sysconfdir}/cloud/templates
7ce36c0
%config(noreplace) %{_sysconfdir}/cloud/templates/*
090f910
%dir               %{_sysconfdir}/rsyslog.d
090f910
%config(noreplace) %{_sysconfdir}/rsyslog.d/21-cloudinit.conf
090f910
%{_sysconfdir}/NetworkManager/dispatcher.d/hook-network-manager
4175f1c
/lib/udev/rules.d/66-azure-ephemeral.rules
4907847
%{_unitdir}/cloud-config.service
4907847
%{_unitdir}/cloud-final.service
4907847
%{_unitdir}/cloud-init.service
45ef3b0
%{_unitdir}/cloud-init-local.service
45ef3b0
%{_unitdir}/cloud-config.target
45ef3b0
%{_unitdir}/cloud-init.target
45ef3b0
/usr/lib/systemd/system-generators/cloud-init-generator
880fe2b
%{_tmpfilesdir}/%{name}.conf
ec4b2b3
%{python3_sitelib}/*
4907847
%{_libexecdir}/%{name}
7ce36c0
%{_bindir}/cloud-init*
880fe2b
%dir /run/cloud-init
880fe2b
%dir /var/lib/cloud
4907847
4907847
4907847
%changelog
01c4b43
* Tue Oct 25 2016 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.8-3
01c4b43
- Enabled the DigitalOcean metadata provider by default [RH:1388568]
01c4b43
b48cb59
* Fri Oct 14 2016 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.8-2
b48cb59
- Stopped writing NM_CONTROLLED=no to interface config files [RH:1385172]
b48cb59
090f910
* Thu Sep 29 2016 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.8-1
090f910
- Updated to 0.7.8
1bd98b8
- Dropped run-parts dependency [RH:1355917]
6565dcf
- Ordered cloud-init-local before NetworkManager
83956db
- Backported DigitalOcean network configuration support [RH:1380489]
10d7e75
- Added xfsprogs dependency for Fedora Server's default filesystem
090f910
1508f89
* Tue Aug 30 2016 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.7-1
1508f89
- Updated to 0.7.7
1508f89
4aeff11
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.6-10.20160622bzr1245
4aeff11
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
4aeff11
45ef3b0
* Wed Jul  6 2016 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.6-20160622bzr1245
45ef3b0
- Updated to bzr snapshot 1245
45ef3b0
f4abf80
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.6-8.20150813bzr1137
f4abf80
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
f4abf80
7246df9
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.6-7.20150813bzr1137
7246df9
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
7246df9
4175f1c
* Thu Aug 13 2015 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.6-6.20150813bzr1137
4175f1c
- Updated to bzr snapshot 1137
4175f1c
e758014
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.6-5.20140218bzr1060
e758014
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
e758014
640ca56
* Sat Feb 21 2015 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.6-4.20140218bzr1060
640ca56
- Updated to bzr snapshot 1060 for python 3 support
ec4b2b3
- Switched to python 3 [RH:1024357]
ec4b2b3
- Added %%check
70a100e
- Dropped dmidecode dependency, switched back to noarch
640ca56
daa1660
* Thu Feb 19 2015 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.6-3
daa1660
- Stopped depending on git to build
22dbc1a
- Stopped implicitly listing doc files twice
0a23a4d
- Added recognition of 3 ecdsa-sha2-nistp* ssh key types [RH:1151824]
a510c9b
- Fixed handling of user group lists that contain spaces [RH:1126365 LP:1354694]
851688f
- Changed network.target systemd deps to network-online.target [RH:1110731 RH:1112817 RH:1147613]
c33ce8c
- Fixed race condition between cloud-init.service and the login prompt
469555b
- Stopped enabling services in %%post (now done by kickstart) [RH:850058]
37c3202
- Switched to dnf instead of yum when available [RH:1194451]
daa1660
Colin Walters 69ff73f
* Fri Nov 14 2014 Colin Walters <walters@redhat.com> - 0.7.6-2
Colin Walters 4b64923
- New upstream version [RH:974327]
Colin Walters 4b64923
- Drop python-cheetah dependency (same as above bug)
Colin Walters 4b64923
02b4985
* Fri Nov  7 2014 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.5-8
02b4985
- Dropped python-boto dependency [RH:1161257]
fe9243f
- Dropped rsyslog dependency [RH:986511]
02b4985
99b14b3
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.5-7
99b14b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
99b14b3
30d3081
* Thu Jun 12 2014 Dennis Gilmore <dennis@ausil.us> - 0.7.5-6
30d3081
- fix typo in settings.py preventing metadata being fecthed in ec2
30d3081
a4207cd
* Mon Jun  9 2014 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.5-5
a4207cd
- Stopped calling ``udevadm settle'' with --quiet since systemd 213 removed it
a4207cd
b30bf1e
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.5-4
b30bf1e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
b30bf1e
8146eb3
* Mon Jun  2 2014 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.5-3
8146eb3
- Make dmidecode dependency arch-dependent [RH:1025071 RH:1067089]
8146eb3
5e3db3d
* Mon Jun  2 2014 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.2-9
5e3db3d
- Write /etc/locale.conf instead of /etc/sysconfig/i18n [RH:1008250]
880fe2b
- Add tmpfiles.d configuration for /run/cloud-init [RH:1103761]
2ddd8f2
- Use the license rpm macro
5913670
- BuildRequire python-setuptools, not python-setuptools-devel
5e3db3d
095988f
* Fri May 30 2014 Matthew Miller <mattdm@fedoraproject.org> - 0.7.5-2
7824503
- add missing python-jsonpatch dependency [RH:1103281]
095988f
Sam Kottler d0075a9
* Tue Apr 29 2014 Sam Kottler <skottler@fedoraproject.org> - 0.7.5-1
Sam Kottler 729a213
- Update to 0.7.5 and remove patches which landed in the release
Sam Kottler 729a213
Sam Kottler 063a33c
* Sat Jan 25 2014 Sam Kottler <skottler@fedoraproject.org> - 0.7.2-8
Sam Kottler 063a33c
- Remove patch to the Puppet service unit nane [RH:1057860]
Sam Kottler 063a33c
56c5500
* Tue Sep 24 2013 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.2-7
56c5500
- Dropped xfsprogs dependency [RH:974329]
56c5500
af5c508
* Tue Sep 24 2013 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.2-6
af5c508
- Added yum-add-repo module
af5c508
f048ee2
* Fri Sep 20 2013 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.2-5
f048ee2
- Fixed puppet agent service name [RH:1008250]
1b39f6b
- Let systemd handle console output [RH:977952 LP:1228434]
48cd58f
- Fixed restorecon failure when selinux is disabled [RH:967002 LP:1228441]
4bfe367
- Fixed rsyslog log filtering
d15a872
- Added missing modules [RH:966888]
f048ee2
c4c2955
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-4
c4c2955
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
c4c2955
9670285
* Sat Jun 15 2013 Matthew Miller <mattdm@fedoraproject.org> - 0.7.2-3
9670285
- switch ec2-user to "fedora" --  see bugzilla #971439. To use another
9670285
  name, use #cloud-config option "users:" in userdata in cloud metadata
9670285
  service
9670285
- add that user to systemd-journal group
9670285
Steven Hardy c695a1d
* Fri May 17 2013 Steven Hardy <shardy@redhat.com> - 0.7.2
Steven Hardy c695a1d
- Update to the 0.7.2 release
Steven Hardy c695a1d
Steven Hardy da2ae01
* Thu May 02 2013 Steven Hardy <shardy@redhat.com> - 0.7.2-0.1.bzr809
Steven Hardy da2ae01
- Rebased against upstream rev 809, fixes several F18 related issues
Steven Hardy f9b1697
- Added dependency on python-requests
Steven Hardy da2ae01
Orion Poplawski 3eb2ef9
* Sat Apr  6 2013 Orion Poplawski <orion@cora.nwra.com> - 0.7.1-4
Orion Poplawski 3eb2ef9
- Don't ship tests
Orion Poplawski 3eb2ef9
d726a2a
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-3
d726a2a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
d726a2a
bf4ebef
* Thu Dec 13 2012 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.1-2
bf4ebef
- Added default_user to cloud.cfg (this is required for ssh keys to work)
bf4ebef
e8a0807
* Wed Nov 21 2012 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.1-1
e8a0807
- Rebased against version 0.7.1
82213ac
- Fixed broken sudoers file generation
fac1467
- Fixed "resize_root: noblock" [LP:1080985]
e8a0807
4e9b7b0
* Tue Oct  9 2012 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.0-1
4e9b7b0
- Rebased against version 0.7.0
a851231
- Fixed / filesystem resizing
4e9b7b0
7eb4f98
* Sat Sep 22 2012 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.0-0.3.bzr659
7eb4f98
- Added dmidecode dependency for DataSourceAltCloud
7eb4f98
b792554
* Sat Sep 22 2012 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.0-0.2.bzr659
b792554
- Rebased against upstream rev 659
dcf5001
- Fixed hostname persistence
bb974cc
- Fixed ssh key printing
cd4f6f4
- Fixed sudoers file permissions
b792554
0dcf658
* Mon Sep 17 2012 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.0-0.1.bzr650
0dcf658
- Rebased against upstream rev 650
0dcf658
- Added support for useradd --selinux-user
0dcf658
e6cb1a9
* Thu Sep 13 2012 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.3-0.5.bzr532
4a01ffd
- Use a FQDN (instance-data.) for instance data URL fallback [RH:850916 LP:1040200]
1e6bbb9
- Shut off systemd timeouts [RH:836269]
26a577b
- Send output to the console [RH:854654]
4a01ffd
3c73e4f
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.3-0.4.bzr532
3c73e4f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
3c73e4f
7dfb056
* Wed Jun 27 2012 Pádraig Brady <P@draigBrady.com> - 0.6.3-0.3.bzr532
7dfb056
- Add support for installing yum packages
7dfb056
Andy Grimm 83d60c4
* Sat Mar 31 2012 Andy Grimm <agrimm@gmail.com> - 0.6.3-0.2.bzr532
Andy Grimm 83d60c4
- Fixed incorrect interpretation of relative path for
Andy Grimm 83d60c4
  AuthorizedKeysFile (BZ #735521)
Andy Grimm 83d60c4
2f7ad55
* Mon Mar  5 2012 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.3-0.1.bzr532
2f7ad55
- Rebased against upstream rev 532
1829b52
- Fixed runparts() incompatibility with Fedora
2f7ad55
0c4c3ba
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.2-0.8.bzr457
0c4c3ba
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
0c4c3ba
87f3319
* Wed Oct  5 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.7.bzr457
87f3319
- Disabled SSH key-deleting on startup
87f3319
a2171c6
* Wed Sep 28 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.6.bzr457
a2171c6
- Consolidated selinux file context patches
56f9947
- Fixed cloud-init.service dependencies
f354744
- Updated sshkeytypes patch
974de09
- Dealt with differences from Ubuntu's sshd
a2171c6
ae2090c
* Sat Sep 24 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.5.bzr457
655e316
- Rebased against upstream rev 457
a6c1636
- Added missing dependencies
655e316
7ce36c0
* Fri Sep 23 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.4.bzr450
7ce36c0
- Added more macros to the spec file
7ce36c0
3135871
* Fri Sep 23 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.3.bzr450
3135871
- Fixed logfile permission checking
f3b8d56
- Fixed SSH key generation
1d49adc
- Fixed a bad method call in FQDN-guessing [LP:857891]
924e2ab
- Updated localefile patch
c338482
- Disabled the grub_dpkg module
de68608
- Fixed failures due to empty script dirs [LP:857926]
3135871
c29b445
* Fri Sep 23 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.2.bzr450
c29b445
- Updated tzsysconfig patch
c29b445
4907847
* Wed Sep 21 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.1.bzr450
4907847
- Initial packaging