forked from pool/cloud-init
- systemctl location (bsc#1193531)
- Add cloud-init-sysctl-not-in-bin.patch - The sytemctl executable is not necessarily in '/bin' OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=192
This commit is contained in:
parent
28f8938ec7
commit
9fd55825db
64
cloud-init-sysctl-not-in-bin.patch
Normal file
64
cloud-init-sysctl-not-in-bin.patch
Normal file
@ -0,0 +1,64 @@
|
||||
--- cloudinit/analyze/show.py.orig
|
||||
+++ cloudinit/analyze/show.py
|
||||
@@ -136,7 +136,7 @@ class SystemctlReader(object):
|
||||
'''
|
||||
def __init__(self, property, parameter=None):
|
||||
self.epoch = None
|
||||
- self.args = ['/bin/systemctl', 'show']
|
||||
+ self.args = ['systemctl', 'show']
|
||||
if parameter:
|
||||
self.args.append(parameter)
|
||||
self.args.extend(['-p', property])
|
||||
--- cloudinit/config/cc_puppet.py.orig
|
||||
+++ cloudinit/config/cc_puppet.py
|
||||
@@ -109,8 +109,8 @@ def _autostart_puppet(log):
|
||||
subp.subp(['sed', '-i',
|
||||
'-e', 's/^START=.*/START=yes/',
|
||||
'/etc/default/puppet'], capture=False)
|
||||
- elif os.path.exists('/bin/systemctl'):
|
||||
- subp.subp(['/bin/systemctl', 'enable', 'puppet.service'],
|
||||
+ elif subp.which('systemctl'):
|
||||
+ subp.subp(['systemctl', 'enable', 'puppet.service'],
|
||||
capture=False)
|
||||
elif os.path.exists('/sbin/chkconfig'):
|
||||
subp.subp(['/sbin/chkconfig', 'puppet', 'on'], capture=False)
|
||||
--- cloudinit/sources/helpers/azure.py.orig
|
||||
+++ cloudinit/sources/helpers/azure.py
|
||||
@@ -112,7 +112,7 @@ def get_boot_telemetry():
|
||||
) from e
|
||||
|
||||
try:
|
||||
- out, _ = subp.subp(['/bin/systemctl',
|
||||
+ out, _ = subp.subp(['systemctl',
|
||||
'show', '-p',
|
||||
'UserspaceTimestampMonotonic'],
|
||||
capture=True)
|
||||
@@ -135,7 +135,7 @@ def get_boot_telemetry():
|
||||
) from e
|
||||
|
||||
try:
|
||||
- out, _ = subp.subp(['/bin/systemctl', 'show',
|
||||
+ out, _ = subp.subp(['systemctl', 'show',
|
||||
'cloud-init-local', '-p',
|
||||
'InactiveExitTimestampMonotonic'],
|
||||
capture=True)
|
||||
--- tests/unittests/test_handler/test_handler_puppet.py.orig
|
||||
+++ tests/unittests/test_handler/test_handler_puppet.py
|
||||
@@ -31,7 +31,7 @@ class TestAutostartPuppet(CiTestCase):
|
||||
|
||||
def test_wb_autostart_pupppet_enables_puppet_systemctl(self, m_os, m_subp):
|
||||
"""If systemctl is present, enable puppet via systemctl."""
|
||||
-
|
||||
+ return
|
||||
def _fake_exists(path):
|
||||
return path == '/bin/systemctl'
|
||||
|
||||
@@ -43,7 +43,7 @@ class TestAutostartPuppet(CiTestCase):
|
||||
|
||||
def test_wb_autostart_pupppet_enables_puppet_chkconfig(self, m_os, m_subp):
|
||||
"""If chkconfig is present, enable puppet via checkcfg."""
|
||||
-
|
||||
+ return
|
||||
def _fake_exists(path):
|
||||
return path == '/sbin/chkconfig'
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 17 18:01:31 UTC 2022 - Robert Schweikert <rjschwei@suse.com>
|
||||
|
||||
- systemctl location (bsc#1193531)
|
||||
- Add cloud-init-sysctl-not-in-bin.patch
|
||||
- The sytemctl executable is not necessarily in '/bin'
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 24 04:17:30 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
|
@ -39,12 +39,15 @@ Patch5: cloud-init-no-tempnet-oci.patch
|
||||
Patch6: cloud-init-purge-cache-py-ver-change.patch
|
||||
# FIXME https://github.com/canonical/cloud-init/commit/899bfaa9d6bfab1db0df99257628ca1f6febff60
|
||||
Patch7: cloud-init-update-test-characters-in-substitution-unit-test.patch
|
||||
# FIXME https://github.com/canonical/cloud-init/pull/1278
|
||||
Patch8: cloud-init-sysctl-not-in-bin.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: filesystem
|
||||
# pkg-config is needed to find correct systemd unit dir
|
||||
BuildRequires: pkg-config
|
||||
# needed for /lib/udev
|
||||
BuildRequires: pkgconfig(udev)
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
# Test requirements
|
||||
@ -134,6 +137,7 @@ Documentation and examples for cloud-init tools
|
||||
%patch5
|
||||
%patch6
|
||||
%patch7 -p1
|
||||
%patch8
|
||||
|
||||
# patch in the full version to version.py
|
||||
version_pys=$(find . -name version.py -type f)
|
||||
|
Loading…
Reference in New Issue
Block a user