- 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
This commit is contained in:
Robert Schweikert 2018-05-22 19:44:33 +00:00 committed by Git OBS Bridge
parent 9ef5d09e98
commit 0edc4d2a0e
3 changed files with 41 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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