From 0edc4d2a0e4f054dfa8c7c335d659853d57b97517a79fe768c40f2c8339a62b2 Mon Sep 17 00:00:00 2001 From: Robert Schweikert Date: Tue, 22 May 2018 19:44:33 +0000 Subject: [PATCH] - Re-add generator (bsc#1089824, boo#1093501) + Add cloud-init-setpath-dsitentify.patch, upstream solution to hanle PATH issue + Re-enable th egenerator to reduce effort in cloud-init configuration OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=113 --- cloud-init-setpath-dsitentify.patch | 27 +++++++++++++++++++++++++++ cloud-init.changes | 8 ++++++++ cloud-init.spec | 9 ++++++--- 3 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 cloud-init-setpath-dsitentify.patch diff --git a/cloud-init-setpath-dsitentify.patch b/cloud-init-setpath-dsitentify.patch new file mode 100644 index 0000000..69d4e15 --- /dev/null +++ b/cloud-init-setpath-dsitentify.patch @@ -0,0 +1,27 @@ +--- tools/ds-identify.orig ++++ tools/ds-identify +@@ -186,6 +186,16 @@ block_dev_with_label() { + return 0 + } + ++ensure_sane_path() { ++ local t ++ for t in /sbin /usr/sbin /bin /usr/bin; do ++ case ":$PATH:" in ++ *:$t:*|*:$t/:*) continue;; ++ esac ++ PATH="${PATH:+${PATH}:}$t" ++ done ++} ++ + read_fs_info() { + cached "${DI_BLKID_OUTPUT}" && return 0 + # do not rely on links in /dev/disk which might not be present yet. +@@ -1420,6 +1430,7 @@ _main() { + + main() { + local ret="" ++ ensure_sane_path + [ -d "$PATH_RUN_CI" ] || mkdir -p "$PATH_RUN_CI" + if [ "${1:+$1}" != "--force" ] && [ -f "$PATH_RUN_CI_CFG" ] && + [ -f "$PATH_RUN_DI_RESULT" ]; then diff --git a/cloud-init.changes b/cloud-init.changes index 7e8fd8f..ec98c58 100644 --- a/cloud-init.changes +++ b/cloud-init.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue May 22 18:12:43 UTC 2018 - rjschwei@suse.com + +- Re-add generator (bsc#1089824, boo#1093501) + + Add cloud-init-setpath-dsitentify.patch, upstream solution to + hanle PATH issue + + Re-enable th egenerator to reduce effort in cloud-init configuration + ------------------------------------------------------------------- Wed May 16 15:21:33 UTC 2018 - rjschwei@suse.com diff --git a/cloud-init.spec b/cloud-init.spec index 289be0b..b3e7fc2 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -27,6 +27,7 @@ Group: System/Management Source0: %{name}-%{version}.tar.gz Source1: rsyslog-cloud-init.cfg + # FIXME cloud-init-translate-netconf-ipv4-keep-gw (bsc#1064854) # proposed for upstream merge (lp#1732966) Patch8: cloud-init-translate-netconf-ipv4-keep-gw.patch @@ -55,6 +56,9 @@ Patch42: cloud-init-skip-ovf-tests.patch # #lp1770462 # https://code.launchpad.net/~rjschwei/cloud-init/+git/cloud-init/+merge/345377 Patch43: cloud-init-no-trace-empt-sect.patch +# FIXME cloud-init-setpath-gen.patch (boo#1093501) +# Merged upstream remove for 18.3 +Patch44: cloud-init-setpath-dsitentify.patch BuildRequires: fdupes BuildRequires: filesystem # pkg-config is needed to find correct systemd unit dir @@ -201,6 +205,7 @@ Documentation and examples for cloud-init tools %patch41 %patch42 %patch43 +%patch44 %build %if 0%{?suse_version} && 0%{?suse_version} <= 1315 @@ -261,9 +266,6 @@ rm %{buildroot}/%{_sysconfdir}/cloud/templates/*.debian.* rm %{buildroot}/%{_sysconfdir}/cloud/templates/*.redhat.* rm %{buildroot}/%{_sysconfdir}/cloud/templates/*.ubuntu.* -# Remove the systemd generator (bsc#1089824, boo#1093501) -rm -rf %{buildroot}/%{systemd_prefix}/systemd/system-generators/cloud-init-generator - # move sysvinit scripts into the "right" place %if 0%{?suse_version} && 0%{?suse_version} <= 1210 mkdir -p %{buildroot}/%{_initddir} @@ -318,6 +320,7 @@ popd %attr(0755, root, root) %{_initddir}/cloud-init-local %attr(0755, root, root) %{_initddir}/cloud-final %else +%{systemd_prefix}/systemd/system-generators/cloud-init-generator %{systemd_prefix}/systemd/system/cloud-config.service %{systemd_prefix}/systemd/system/cloud-config.target %{systemd_prefix}/systemd/system/cloud-init-local.service