From 880fe2ba82a17ec75a22a1a6f5de87f5106b4783 Mon Sep 17 00:00:00 2001 From: Garrett Holmstrom Date: Mon, 2 Jun 2014 17:16:27 -0700 Subject: [PATCH] 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]