From 5e3db3da623b2c3d32e4a3d7c2458c445e755378 Mon Sep 17 00:00:00 2001 From: Garrett Holmstrom Date: Mon, 2 Jun 2014 18:19:02 -0700 Subject: [PATCH 1/4] Write /etc/locale.conf instead of /etc/sysconfig/i18n https://bugzilla.redhat.com/show_bug.cgi?id=1008250#c13 --- cloud-init-fedora.cfg | 1 - cloud-init.spec | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cloud-init-fedora.cfg b/cloud-init-fedora.cfg index a4ad7ca..0dff3fe 100644 --- a/cloud-init-fedora.cfg +++ b/cloud-init-fedora.cfg @@ -4,7 +4,6 @@ users: disable_root: 1 ssh_pwauth: 0 -locale_configfile: /etc/sysconfig/i18n mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2'] resize_rootfs_tmp: /dev ssh_deletekeys: 0 diff --git a/cloud-init.spec b/cloud-init.spec index 1c61539..898418e 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -2,7 +2,7 @@ Name: cloud-init Version: 0.7.2 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Cloud instance init scripts Group: System Environment/Base @@ -150,6 +150,9 @@ fi %changelog +* Mon Jun 2 2014 Garrett Holmstrom - 0.7.2-9 +- Write /etc/locale.conf instead of /etc/sysconfig/i18n [RH:1008250] + * Sat Jan 25 2014 Sam Kottler - 0.7.2-8 - Remove patch to the Puppet service unit nane [RH:1057860] From 880fe2ba82a17ec75a22a1a6f5de87f5106b4783 Mon Sep 17 00:00:00 2001 From: Garrett Holmstrom Date: Mon, 2 Jun 2014 17:16:27 -0700 Subject: [PATCH 2/4] Add tmpfiles.d configuration for /run/cloud-init https://bugzilla.redhat.com/show_bug.cgi?id=1103761 --- cloud-init-tmpfiles.conf | 1 + cloud-init.spec | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 cloud-init-tmpfiles.conf diff --git a/cloud-init-tmpfiles.conf b/cloud-init-tmpfiles.conf new file mode 100644 index 0000000..0c6d2a3 --- /dev/null +++ b/cloud-init-tmpfiles.conf @@ -0,0 +1 @@ +d /run/cloud-init 0700 root root - - diff --git a/cloud-init.spec b/cloud-init.spec index 898418e..10457c6 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -11,6 +11,7 @@ URL: http://launchpad.net/cloud-init Source0: https://launchpad.net/cloud-init/trunk/%{version}/+download/%{name}-%{version}.tar.gz Source1: cloud-init-fedora.cfg Source2: cloud-init-README.fedora +Source3: cloud-init-tmpfiles.conf # Deal with Fedora/Ubuntu path differences Patch0: cloud-init-0.7.2-fedora.patch @@ -85,7 +86,12 @@ rm -rf $RPM_BUILD_ROOT # Don't ship the tests rm -r $RPM_BUILD_ROOT%{python_sitelib}/tests -mkdir -p $RPM_BUILD_ROOT/%{_sharedstatedir}/cloud +mkdir -p $RPM_BUILD_ROOT/var/lib/cloud + +# /run/cloud-init needs a tmpfiles.d entry +mkdir -p $RPM_BUILD_ROOT/run/cloud-init +mkdir -p $RPM_BUILD_ROOT/%{_tmpfilesdir} +cp -p %{SOURCE3} $RPM_BUILD_ROOT/%{_tmpfilesdir}/%{name}.conf # We supply our own config file since our software differs from Ubuntu's. cp -p %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/cloud/cloud.cfg @@ -94,8 +100,9 @@ mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/rsyslog.d cp -p tools/21-cloudinit.conf $RPM_BUILD_ROOT/%{_sysconfdir}/rsyslog.d/21-cloudinit.conf # Install the systemd bits -mkdir -p $RPM_BUILD_ROOT/%{_unitdir} -cp -p systemd/* $RPM_BUILD_ROOT/%{_unitdir} +mkdir -p $RPM_BUILD_ROOT/%{_unitdir} +cp -p systemd/* $RPM_BUILD_ROOT/%{_unitdir} + %clean @@ -140,11 +147,13 @@ fi %{_unitdir}/cloud-final.service %{_unitdir}/cloud-init-local.service %{_unitdir}/cloud-init.service +%{_tmpfilesdir}/%{name}.conf %{python_sitelib}/* %{_libexecdir}/%{name} %{_bindir}/cloud-init* %doc %{_datadir}/doc/%{name} -%dir %{_sharedstatedir}/cloud +%dir /run/cloud-init +%dir /var/lib/cloud %config(noreplace) %{_sysconfdir}/rsyslog.d/21-cloudinit.conf @@ -152,6 +161,7 @@ fi %changelog * Mon Jun 2 2014 Garrett Holmstrom - 0.7.2-9 - Write /etc/locale.conf instead of /etc/sysconfig/i18n [RH:1008250] +- Add tmpfiles.d configuration for /run/cloud-init [RH:1103761] * Sat Jan 25 2014 Sam Kottler - 0.7.2-8 - Remove patch to the Puppet service unit nane [RH:1057860] From 2ddd8f250f2b05bc7e78bba571cafa0f0cdc7844 Mon Sep 17 00:00:00 2001 From: Garrett Holmstrom Date: Mon, 2 Jun 2014 18:36:14 -0700 Subject: [PATCH 3/4] Use the %license rpm macro --- cloud-init.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cloud-init.spec b/cloud-init.spec index 10457c6..a1d4c70 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -1,4 +1,5 @@ %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%{!?license: %global license %%doc} Name: cloud-init Version: 0.7.2 @@ -135,7 +136,8 @@ fi %files -%doc ChangeLog LICENSE TODO README.fedora +%license LICENSE +%doc ChangeLog TODO README.fedora %config(noreplace) %{_sysconfdir}/cloud/cloud.cfg %dir %{_sysconfdir}/cloud/cloud.cfg.d %config(noreplace) %{_sysconfdir}/cloud/cloud.cfg.d/*.cfg @@ -162,6 +164,7 @@ fi * Mon Jun 2 2014 Garrett Holmstrom - 0.7.2-9 - Write /etc/locale.conf instead of /etc/sysconfig/i18n [RH:1008250] - Add tmpfiles.d configuration for /run/cloud-init [RH:1103761] +- Use the license rpm macro * Sat Jan 25 2014 Sam Kottler - 0.7.2-8 - Remove patch to the Puppet service unit nane [RH:1057860] From 5913670140f9395f9f17067c5aba7abc588ea7e1 Mon Sep 17 00:00:00 2001 From: Garrett Holmstrom Date: Mon, 2 Jun 2014 17:41:31 -0700 Subject: [PATCH 4/4] BuildRequire python-setuptools, not python-setuptools-devel --- cloud-init.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cloud-init.spec b/cloud-init.spec index a1d4c70..b83f54f 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -38,7 +38,7 @@ BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel -BuildRequires: python-setuptools-devel +BuildRequires: python-setuptools BuildRequires: systemd-units Requires: dmidecode Requires: e2fsprogs @@ -165,6 +165,7 @@ fi - Write /etc/locale.conf instead of /etc/sysconfig/i18n [RH:1008250] - Add tmpfiles.d configuration for /run/cloud-init [RH:1103761] - Use the license rpm macro +- BuildRequire python-setuptools, not python-setuptools-devel * Sat Jan 25 2014 Sam Kottler - 0.7.2-8 - Remove patch to the Puppet service unit nane [RH:1057860]