4907847
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
4907847
4907847
Name:           cloud-init
Steven Hardy da2ae01
Version:        0.7.2
Steven Hardy da2ae01
Release:        0.1.bzr809%{?dist}
dace9fa
Summary:        Cloud instance init scripts
4907847
4907847
Group:          System Environment/Base
4907847
License:        GPLv3
4907847
URL:            http://launchpad.net/cloud-init
Steven Hardy da2ae01
Source0:        http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/tarball/809?/cloud-init-0.7.2-bzr809.tar.gz
4907847
Source1:        cloud-init-fedora.cfg
4907847
Source2:        cloud-init-README.fedora
Steven Hardy da2ae01
Patch0:         cloud-init-0.7.2-fedora.patch
4907847
4907847
BuildArch:      noarch
4907847
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
4907847
4907847
BuildRequires:  python-devel
4907847
BuildRequires:  python-setuptools-devel
4907847
BuildRequires:  systemd-units
7eb4f98
Requires:       dmidecode
4907847
Requires:       e2fsprogs
4907847
Requires:       iproute
4907847
Requires:       libselinux-python
4907847
Requires:       net-tools
0dcf658
Requires:       policycoreutils-python
4907847
Requires:       procps
4907847
Requires:       python-boto
4907847
Requires:       python-cheetah
4907847
Requires:       python-configobj
0dcf658
Requires:       python-prettytable
4907847
Requires:       PyYAML
a6c1636
Requires:       rsyslog
4907847
Requires:       shadow-utils
4907847
Requires:       xfsprogs
a6c1636
Requires:       /usr/bin/run-parts
4907847
Requires(post):   systemd-units
4907847
Requires(preun):  systemd-units
4907847
Requires(postun): systemd-units
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
Steven Hardy da2ae01
%setup -q -n %{name}-%{version}-bzr809
0dcf658
%patch0 -p1
4907847
4907847
cp -p %{SOURCE2} README.fedora
4907847
4907847
4907847
%build
4907847
%{__python} setup.py build
4907847
4907847
4907847
%install
4907847
rm -rf $RPM_BUILD_ROOT
4907847
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
4907847
Orion Poplawski 3eb2ef9
# Don't ship the tests
Orion Poplawski 3eb2ef9
rm -r $RPM_BUILD_ROOT%{python_sitelib}/tests
Orion Poplawski 3eb2ef9
7ce36c0
mkdir -p $RPM_BUILD_ROOT/%{_sharedstatedir}/cloud
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
4907847
# Install the systemd bits
4907847
mkdir -p        $RPM_BUILD_ROOT/%{_unitdir}
4907847
cp -p systemd/* $RPM_BUILD_ROOT/%{_unitdir}
4907847
4907847
4907847
%clean
4907847
rm -rf $RPM_BUILD_ROOT
4907847
4907847
4907847
%post
4907847
if [ $1 -eq 1 ] ; then
4907847
    # Initial installation
4907847
    # Enabled by default per "runs once then goes away" exception
4907847
    /bin/systemctl enable cloud-config.service     >/dev/null 2>&1 || :
4907847
    /bin/systemctl enable cloud-final.service      >/dev/null 2>&1 || :
4907847
    /bin/systemctl enable cloud-init.service       >/dev/null 2>&1 || :
4907847
    /bin/systemctl enable cloud-init-local.service >/dev/null 2>&1 || :
4907847
fi
4907847
4907847
%preun
4907847
if [ $1 -eq 0 ] ; then
4907847
    # Package removal, not upgrade
4907847
    /bin/systemctl --no-reload disable cloud-config.service >/dev/null 2>&1 || :
4907847
    /bin/systemctl --no-reload disable cloud-final.service  >/dev/null 2>&1 || :
4907847
    /bin/systemctl --no-reload disable cloud-init.service   >/dev/null 2>&1 || :
4907847
    /bin/systemctl --no-reload disable cloud-init-local.service >/dev/null 2>&1 || :
4907847
    # One-shot services -> no need to stop
4907847
fi
4907847
4907847
%postun
4907847
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
4907847
# One-shot services -> no need to restart
4907847
4907847
4907847
%files
4907847
%doc ChangeLog LICENSE TODO README.fedora
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/*
4907847
%{_unitdir}/cloud-config.service
4907847
%{_unitdir}/cloud-config.target
4907847
%{_unitdir}/cloud-final.service
4907847
%{_unitdir}/cloud-init-local.service
4907847
%{_unitdir}/cloud-init.service
4907847
%{python_sitelib}/*
4907847
%{_libexecdir}/%{name}
7ce36c0
%{_bindir}/cloud-init*
7ce36c0
%doc %{_datadir}/doc/%{name}
7ce36c0
%dir %{_sharedstatedir}/cloud
4907847
7ce36c0
%config(noreplace) %{_sysconfdir}/rsyslog.d/21-cloudinit.conf
4907847
4907847
4907847
%changelog
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 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