Hello community,

here is the log from the commit of package cloud-init for openSUSE:Factory 
checked in at 2016-10-02 00:07:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cloud-init (Old)
 and      /work/SRC/openSUSE:Factory/.cloud-init.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cloud-init"

Changes:
--------
--- /work/SRC/openSUSE:Factory/cloud-init/cloud-init.changes    2016-06-14 
23:08:43.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.cloud-init.new/cloud-init.changes       
2016-10-02 00:07:21.000000000 +0200
@@ -1,0 +2,197 @@
+Thu Sep 15 13:01:35 UTC 2016 - rjsch...@suse.com
+
+- Decoding error (boo#998843)
+  + Added cloud-init-fix-unicode-handling-binarydecode.patch
+- Fix dependencies, depends on oauthlib instead of oauth
+
+-------------------------------------------------------------------
+Wed Sep 14 14:24:07 UTC 2016 - rjsch...@suse.com
+
+- Fix dataSourceOpenNebula.patch, missing closing paren (boo#998836)
+
+-------------------------------------------------------------------
+Wed Sep 14 12:24:55 UTC 2016 - rjsch...@suse.com
+
+- Fix typo in cloud-init-service.patch
+
+-------------------------------------------------------------------
+Tue Sep 13 13:19:51 UTC 2016 - rjsch...@suse.com
+
+- update to version 0.7.8 (bsc#998103)
+ + added cloud-init-net-eni.patch based on work by eblock
+   - Using config-drive instead of metadata failed because the network 
+     translation to Ubuntu-style did not return gateway information to
+     opensuse.py
+ + added cloud-init-service.patch based on work by eblock
+   - The service file cloud-init.service referenced networking.service
+     which on SUSE is network.service
+ + remove no_logic_change.patch included in updated upstream source
+ + forward port suseIntegratedHandler.patch
+ + forward port setupSUSEsysVInit.diff
+ + forward port cloud-init-no-dmidecode-on-ppc64.patch
+ + foward port dataSourceOpenNebula.patch
+ + forward port fix-default-systemd-unit-dir.patch
+ + forward port cloud-init-finalbeforelogin.patch
+ + forward port cloud-init-python2-sigpipe.patch
+ + SmartOS: more improvements for network configuration
+ + add ntp config module [Ryan Harper]
+ + ChangeLog: update changelog for previous commit.
+ + Add distro tags on config modules that should have it.
+ + NoCloud: fix bug providing network-interfaces via meta-data. (LP: 1577982)
+ + ConfigDrive: recognize 'tap' as a link type. (LP: #1610784)
+ + Upgrade to a configobj package new enough to work
+ + MAAS: add vendor-data support (LP: #1612313)
+ + DigitalOcean: use the v1.json endpoint [Ben Howard]
+ + Get Azure endpoint server from DHCP client [Brent Baude]
+ + Apt: add new apt configuration format [Christian Ehrhardt]
+ + distros: fix get_primary_arch method use of os.uname [Andrew Jorgensen]
+ + Fix Gentoo net config generation [Matthew Thode]
+ + Minor cleanups to atomic_helper and add unit tests.
+ + azure dhclient-hook cleanups
+ + network: fix get_interface_mac for bond slave, read_sys_net for ENOTDIR
+ + Generate a dummy bond name for OpenStack (LP: #1605749)
+ + add install option for openrc [Matthew Thode]
+ + Add a module that can configure spacewalk.
+ + python2.6: fix dict comprehension usage in _lsb_release.
+ + apt-config: allow both old and new format to be present.
+   [Christian Ehrhardt] (LP: #1616831)
+ + bddeb: add --release flag to specify the release in changelog.
+ + salt minion: update default pki directory for newer salt minion.
+   (LP: #1609899)
+ + Fix typo in default keys for phone_home [Roland Sommer] (LP: #1607810)
+ + apt config conversion: treat empty string as not provided.  (LP: #1621180)
+ + tests: cleanup tempdirs in apt_source tests
+ + systemd: Better support package and upgrade. (LP: #1576692, #1621336)
+ + remove obsolete .bzrignore
+ + DataSourceOVF: fix user-data as base64 with python3 (LP: #1619394)
+ + Allow link type of null in network_data.json [Jon Grimm] (LP: #1621968)
+from 0.7.7:
+ + Digital Ocean: add datasource for Digital Ocean. [Neal Shrader]
+ + expose uses_systemd as a distro function (fix rhel7)
+ + fix broken 'output' config (LP: #1387340)
+ + begin adding cloud config module docs to config modules (LP: #1383510)
+ + retain trailing eol from template files (sources.list) when
+   rendered with jinja (LP: #1355343)
+ + Only use datafiles and initsys addon outside virtualenvs
+ + Fix the digital ocean test case on python 2.6
+ + Increase the usefulness, robustness, configurability of the chef module
+   so that it is more useful, more documented and better for users
+ + Fix how '=' signs are not handled that well in ssh_utils (LP: #1391303)
+ + Be more tolerant of ssh keys passed into 'ssh_authorized_keys'; allowing
+   for list, tuple, set, dict, string types and warning on other unexpected
+   types
+ + Update to use newer/better OMNIBUS_URL for chef module
+ + GCE: Allow base64 encoded user-data (LP: #1404311) [Wayne Witzell III]
+ + GCE: use short hostname rather than fqdn (LP: #1383794) [Ben Howard]
+ + systemd: make init stage run before login prompts shown [Steve Langasek]
+ + hostname: on first boot apply hostname to be same as is written for
+   persistent hostname.  (LP: #1246485)
+ + remove usage of dmidecode on linux in favor of /sys interface [Ben Howard]
+ + python3 support [Barry Warsaw, Daniel Watkins, Josh Harlow] (LP: #1247132)
+ + support managing gpt partitions in disk config [Daniel Watkins]
+ + Azure: utilze gpt support for ephemeral formating [Daniel Watkins]
+ + CloudStack: support fetching password from virtual router [Daniel Watkins]
+   (LP: #1422388)
+ + readurl, read_file_or_url returns bytes, user must convert as necessary
+ + SmartOS: use v2 metadata service (LP: #1436417) [Daniel Watkins]
+ + NoCloud: fix local datasource claiming found without explicit dsmode
+ + Snappy: add support for installing snappy packages and configuring.
+ + systemd: use network-online instead of network.target (LP: #1440180)
+   [Steve Langasek]
+ + Add functionality to fixate the uid of a newly added user.
+ + Don't overwrite the hostname if the user has changed it after we set it.
+ + GCE datasource does not handle instance ssh keys (LP: 1403617)
+ + sysvinit: make cloud-init-local run before network (LP: #1275098)
+   [Surojit Pathak]
+ + Azure: do not re-set hostname if user has changed it (LP: #1375252)
+ + Fix exception when running with no arguments on Python 3. [Daniel Watkins]
+ + Centos: detect/expect use of systemd on centos 7. [Brian Rak]
+ + Azure: remove dependency on walinux-agent [Daniel Watkins]
+ + EC2: know about eu-central-1 availability-zone (LP: #1456684)
+ + Azure: remove password from on-disk ovf-env.xml (LP: #1443311) [Ben Howard]
+ + Doc: include information on user-data in OpenStack [Daniel Watkins]
+ + Systemd: check for systemd using sd_booted symantics (LP: #1461201)
+   [Lars Kellogg-Stedman]
+ + Add an rh_subscription module to handle registration of Red Hat instances.
+   [Brent Baude]
+ + cc_apt_configure: fix importing keys under python3 (LP: #1463373)
+ + cc_growpart: fix specification of 'devices' list (LP: #1465436)
+ + CloudStack: fix password setting on cloudstack > 4.5.1 (LP: #1464253)
+ + GCE: fix determination of availability zone (LP: #1470880)
+ + ssh: generate ed25519 host keys (LP: #1461242)
+ + distro mirrors: provide datasource to mirror selection code to support
+   GCE regional mirrors. (LP: #1470890)
+ + add udev rules that identify ephemeral device on Azure (LP: #1411582)
+ + _read_dmi_syspath: fix bad log message causing unintended exception
+ + rsyslog: add additional configuration mode (LP: #1478103)
+ + status_wrapper in main: fix use of print_exc when handling exception
+ + reporting: add reporting module for web hook or logging of events.
+ + NoCloud: fix consumption of vendordata (LP: #1493453)
+ + power_state_change: support 'condition' to disable or enable poweroff
+ + ubuntu fan: support for config and installing of ubuntu fan (LP: #1504604)
+ + Azure: support extracting SSH key values from ovf-env.xml (LP: #1506244)
+ + AltCloud: fix call to udevadm settle (LP: #1507526)
+ + Ubuntu templates: modify sources.list template to provide same sources
+   as install from server or desktop ISO. (LP: #1177432)
+ + cc_mounts: use 'nofail' if system uses systemd. (LP: #1514485)
+ + Azure: get instance id from dmi instead of SharedConfig (LP: #1506187)
+ + systemd/power_state: fix power_state to work even if cloud-final
+   exited non-zero (LP: #1449318)
+ + SmartOS: Add support for Joyent LX-Brand Zones (LP: #1540965)
+   [Robert C Jennings]
+ + systemd: support using systemd-detect-virt to detect container
+   (LP: #1539016) [Martin Pitt]
+ + docs: fix lock_passwd documentation [Robert C Jennings]
+ + Azure: Handle escaped quotes in WALinuxAgentShim.find_endpoint.
+   (LP: #1488891) [Dan Watkins]
+ + lxd: add support for setting up lxd using 'lxd init' (LP: #1522879)
+ + Add Image Customization Parser for VMware vSphere Hypervisor
+   Support. [Sankar Tanguturi]
+ + timezone: use a symlink rather than copy for /etc/localtime
+   unless it is already a file (LP: #1543025).
+ + Enable password changing via a hashed string [Alex Sirbu]
+ + Added BigStep datasource [Alex Sirbu]
+ + No longer run pollinate in seed_random (LP: #1554152)
+ + groups: add defalt user to 'lxd' group.  Create groups listed
+   for a user if they do not exist. (LP: #1539317)
+ + dmi data: fix failure of reading dmi data for unset dmi values
+ + doc: mention label for nocloud datasource must be 'cidata' [Peter Hurley]
+ + ssh_pwauth: fix module to support 'unchanged' and match behavior
+   described in documentation [Chris Cosby]
+ + quickly check to see if the previous instance id is still valid to
+   avoid dependency on network metadata service on every boot (LP: #1553815)
+ + support network configuration in cloud-init --local with support
+   device naming via systemd.link.
+ + FreeBSD: add support for installing packages, setting password and
+   timezone.  Change default user to 'freebsd'. [Ben Arblaster]
+ + locale: list unsupported environment settings in warning (LP: #1558069)
+ + disk_setup: correctly send --force to mkfs on block devices (LP: #1548772)
+ + chef: fix chef install from gems (LP: #1553345)
+ + systemd: do not specify After of obsolete syslog.target (LP: #1536964)
+ + centos: Ensure that resolve conf object is written as a str (LP: #1479988)
+ + chef: straighten out validation_cert and validation_key (LP: #1568940)
+ + phone_home: allow usage of fqdn (LP: #1566824) [Ollie Armstrong]
+ + cloudstack: Only use DHCPv4 lease files as a datasource (LP: #1576273)
+   [Wido den Hollander]
+ + Paths: fix instance path if datasource's id has a '/'. (LP: #1575938)
+   [Robert Jennings]
+ + Ec2: do not retry requests for user-data path on 404.
+ + settings on the kernel command line (cc:) override all local settings
+   rather than only those in /etc/cloud/cloud.cfg (LP: #1582323)
+ + Improve merging documentation [Daniel Watkins]
+ + apt sources: support inserting key/key-id only, custom sources.list,
+   long gpg key fingerprints with spaces, and dictionary format (LP: #1574113)
+ + SmartOS: datasource improvements and support for metadata service
+   providing networking information.
+ + Datasources: centrally handle 'dsmode' and no longer require datasources
+   to "pass" if modules_init should be executed with network access.
+ + ConfigDrive: improved support for networking information from
+   a network_data.json or older interfaces formated network_config.
+ + Change missing Cheetah log warning to debug [Andrew Jorgensen]
+ + Remove trailing dot from GCE metadata URL (LP: #1581200) [Phil Roche]
+ + support network rendering to sysconfig (for centos and RHEL)
+ + write_files: if no permissions are given, just use default without warn.
+ + user_data: fix error when user-data is not utf-8 decodable (LP: #1532072)
+ + fix mcollective module with python3 (LP: #1597699) [Sergii Golovatiuk] 
+
+-------------------------------------------------------------------

Old:
----
  cloud-init-0.7.6.tar.gz
  no_logic_change.patch

New:
----
  cloud-init-0.7.8.tar.gz
  cloud-init-fix-unicode-handling-binarydecode.patch
  cloud-init-net-eni.patch
  cloud-init-service.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cloud-init.spec ++++++
--- /var/tmp/diff_new_pack.bNXciQ/_old  2016-10-02 00:07:22.000000000 +0200
+++ /var/tmp/diff_new_pack.bNXciQ/_new  2016-10-02 00:07:22.000000000 +0200
@@ -16,7 +16,7 @@
 #
 
 Name:           cloud-init
-Version:        0.7.6
+Version:        0.7.8
 Release:        0
 License:        GPL-3.0
 Summary:        Cloud node initialization tool
@@ -39,10 +39,12 @@
 Patch10:        cloud-init-no-user-lock-if-already-locked.patch
 Patch11:        dataSourceOpenNebula.patch
 Patch12:        fix-default-systemd-unit-dir.patch
-Patch13:        no_logic_change.patch
 Patch14:        cloud-init-finalbeforelogin.patch
 # python2 disables SIGPIPE, causing broken pipe errors in shell scripts 
(bsc#903449)
 Patch20:        cloud-init-python2-sigpipe.patch
+Patch21:        cloud-init-net-eni.patch
+Patch22:        cloud-init-service.patch
+Patch23:        cloud-init-fix-unicode-handling-binarydecode.patch
 BuildRequires:  fdupes
 BuildRequires:  filesystem
 BuildRequires:  python-devel
@@ -60,11 +62,12 @@
 Requires:       python-configobj
 Requires:       python-Jinja2
 Requires:       python-jsonpatch
-Requires:       python-oauth
+Requires:       python-oauthlib
 Requires:       python-PrettyTable
 Requires:       python-pyserial
 Requires:       python-PyYAML
 Requires:       python-requests
+Requires:       python-setuptools
 Requires:       python-xml
 Requires:       sudo
 Requires:       util-linux
@@ -134,16 +137,18 @@
 %patch0 -p1
 %patch1 -p1
 %patch2
-%patch3 -p1
+%patch3
 %patch5
 %patch6
-%patch9 -p1
+%patch9
 %patch10 -p1
-%patch11 -p2
+%patch11
 %patch12
-%patch13
 %patch14
-%patch20 -p1
+%patch20
+%patch21
+%patch22
+%patch23
 
 %if 0%{?suse_version} <= 1130
 # disable ecdsa for SLE 11 (not available)
@@ -221,6 +226,8 @@
 %{_bindir}/cloud-init
 %{_bindir}/cloud-init-per
 %config(noreplace) %{_sysconfdir}/cloud/
+%{_sysconfdir}/dhcp/dhclient-exit-hooks.d/hook-dhclient
+%{_sysconfdir}/NetworkManager/dispatcher.d/hook-network-manager
 %{python_sitelib}/cloudinit
 %{python_sitelib}/cloud_init-%{version}-py%{py_ver}.egg-info
 %{_prefix}/lib/cloud-init
@@ -234,18 +241,27 @@
 %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
 %{systemd_prefix}/systemd/system/cloud-init.service
+%{systemd_prefix}/systemd/system/cloud-init.target
 %{systemd_prefix}/systemd/system/cloud-final.service
 %endif
 %if 0%{?suse_version} && 0%{?suse_version} > 1110
 %dir %{_sysconfdir}/rsyslog.d
 %{_sysconfdir}/rsyslog.d/21-cloudinit.conf
 %endif
+/lib/udev/rules.d/66-azure-ephemeral.rules
 %dir %attr(0755, root, root) %{_localstatedir}/lib/cloud
 %dir %{docdir}
+%dir /etc/NetworkManager
+%dir /etc/NetworkManager/dispatcher.d
+%dir /etc/dhcp
+%dir /etc/dhcp/dhclient-exit-hooks.d
+%dir /lib/udev
+%dir /lib/udev/rules.d
 
 
 %files doc

++++++ cloud-init-0.7.6.tar.gz -> cloud-init-0.7.8.tar.gz ++++++
++++ 53471 lines of diff (skipped)

++++++ cloud-init-finalbeforelogin.patch ++++++
--- /var/tmp/diff_new_pack.bNXciQ/_old  2016-10-02 00:07:23.000000000 +0200
+++ /var/tmp/diff_new_pack.bNXciQ/_new  2016-10-02 00:07:23.000000000 +0200
@@ -3,8 +3,8 @@
 @@ -1,6 +1,7 @@
  [Unit]
  Description=Execute cloud user/final scripts
- After=network.target syslog.target cloud-config.service rc-local.service
+ After=network-online.target cloud-config.service rc-local.service 
multi-user.target
 +Before=systemd-logind.service
- Requires=cloud-config.target
- Wants=network.target
+ Wants=network-online.target cloud-config.service
  
+ [Service]

++++++ cloud-init-fix-unicode-handling-binarydecode.patch ++++++
--- cloudinit/util.py.orig
+++ cloudinit/util.py
@@ -154,7 +154,7 @@ def target_path(target, path=None):
 
 def decode_binary(blob, encoding='utf-8'):
     # Converts a binary type into a text type using given encoding.
-    if isinstance(blob, six.text_type):
+    if isinstance(blob, six.string_types):
         return blob
     return blob.decode(encoding)
 
++++++ cloud-init-net-eni.patch ++++++
--- cloudinit/net/eni.py.orig
+++ cloudinit/net/eni.py
@@ -338,6 +338,7 @@ class Renderer(renderer.Renderer):
         up = indent + "post-up route add"
         down = indent + "pre-down route del"
         or_true = " || true"
+       gateway = indent + "gateway "
         mapping = {
             'network': '-net',
             'netmask': 'netmask',
@@ -346,6 +347,7 @@ class Renderer(renderer.Renderer):
         }
         if route['network'] == '0.0.0.0' and route['netmask'] == '0.0.0.0':
             default_gw = " default gw %s" % route['gateway']
+           content.append(gateway + route['gateway'])
             content.append(up + default_gw + or_true)
             content.append(down + default_gw + or_true)
         elif route['network'] == '::' and route['netmask'] == 0:
++++++ cloud-init-no-dmidecode-on-ppc64.patch ++++++
--- /var/tmp/diff_new_pack.bNXciQ/_old  2016-10-02 00:07:23.000000000 +0200
+++ /var/tmp/diff_new_pack.bNXciQ/_new  2016-10-02 00:07:23.000000000 +0200
@@ -1,26 +1,11 @@
-Index: cloud-init-0.7.5/cloudinit/sources/DataSourceAltCloud.py
-===================================================================
---- cloud-init-0.7.5.orig/cloudinit/sources/DataSourceAltCloud.py
-+++ cloud-init-0.7.5/cloudinit/sources/DataSourceAltCloud.py
-@@ -116,7 +116,7 @@ class DataSourceAltCloud(sources.DataSou
-         '''
+--- cloudinit/util.py.orig
++++ cloudinit/util.py
+@@ -2337,7 +2337,7 @@ def read_dmi_data(key):
  
-         uname_arch = os.uname()[4]
--        if uname_arch.startswith("arm") or uname_arch == "aarch64":
-+        if uname_arch.startswith("arm") or uname_arch == "aarch64" or 
uname_arch.startswith("ppc"):
-             # Disabling because dmidecode in CMD_DMI_SYSTEM crashes kvm 
process
-             LOG.debug("Disabling AltCloud datasource on arm (LP: #1243287)")
-             return 'UNKNOWN'
-Index: cloud-init-0.7.5/cloudinit/sources/DataSourceSmartOS.py
-===================================================================
---- cloud-init-0.7.5.orig/cloudinit/sources/DataSourceSmartOS.py
-+++ cloud-init-0.7.5/cloudinit/sources/DataSourceSmartOS.py
-@@ -175,7 +175,7 @@ class DataSourceSmartOS(sources.DataSour
-             return False
+     # running dmidecode can be problematic on some arches (LP: #1243287)
+     uname_arch = os.uname()[4]
+-    if uname_arch.startswith("arm") or uname_arch == "aarch64":
++    if uname_arch.startswith("arm") or uname_arch == "aarch64" or 
uname_arch.startswith("ppc"):
+         LOG.debug("dmidata is not supported on %s", uname_arch)
+         return None
  
-         uname_arch = os.uname()[4]
--        if uname_arch.startswith("arm") or uname_arch == "aarch64":
-+        if uname_arch.startswith("arm") or uname_arch == "aarch64" or 
uname_arch.startswith("ppc"):
-             # Disabling because dmidcode in dmi_data() crashes kvm process
-             LOG.debug("Disabling SmartOS datasource on arm (LP: #1243287)")
-             return False

++++++ cloud-init-python2-sigpipe.patch ++++++
--- /var/tmp/diff_new_pack.bNXciQ/_old  2016-10-02 00:07:23.000000000 +0200
+++ /var/tmp/diff_new_pack.bNXciQ/_new  2016-10-02 00:07:23.000000000 +0200
@@ -1,22 +1,20 @@
-Index: cloud-init-0.7.6/cloudinit/util.py
-===================================================================
---- cloud-init-0.7.6.orig/cloudinit/util.py
-+++ cloud-init-0.7.6/cloudinit/util.py
-@@ -59,6 +59,7 @@ from cloudinit import version
- 
- from cloudinit.settings import (CFG_BUILTIN)
+--- cloudinit/util.py.orig
++++ cloudinit/util.py
+@@ -46,6 +46,7 @@ import tempfile
+ import time
  
+ from base64 import b64decode, b64encode
 +from signal import signal, SIGPIPE, SIG_DFL
+ from six.moves.urllib import parse as urlparse
+ 
+ import six
+@@ -1802,7 +1803,8 @@ def subp(args, data=None, rcs=None, env=
  
- _DNS_REDIRECT_IP = None
- LOG = logging.getLogger(__name__)
-@@ -1559,7 +1560,8 @@ def subp(args, data=None, rcs=None, env=
-         stdin = subprocess.PIPE
          sp = subprocess.Popen(args, stdout=stdout,
-                         stderr=stderr, stdin=stdin,
--                        env=env, shell=shell)
-+                        env=env, shell=shell,
-+                      preexec_fn=lambda: signal(SIGPIPE, SIG_DFL))
+                               stderr=stderr, stdin=stdin,
+-                              env=env, shell=shell)
++                              env=env, shell=shell,
++                            preexec_fn=lambda: signal(SIGPIPE, SIG_DFL))
          (out, err) = sp.communicate(data)
-     except OSError as e:
-         raise ProcessExecutionError(cmd=args, reason=e)
+ 
+         # Just ensure blank instead of none.

++++++ cloud-init-service.patch ++++++
--- systemd/cloud-init.service.orig
+++ systemd/cloud-init.service
@@ -1,8 +1,8 @@
 [Unit]
 Description=Initial cloud-init job (metadata service crawler)
-After=cloud-init-local.service networking.service
+After=cloud-init-local.service network.service
 Before=network-online.target sshd.service sshd-keygen.service 
systemd-user-sessions.service
-Requires=networking.service
+Requires=network.service
 Wants=local-fs.target cloud-init-local.service sshd.service sshd-keygen.service
 
 [Service]
++++++ dataSourceOpenNebula.patch ++++++
--- /var/tmp/diff_new_pack.bNXciQ/_old  2016-10-02 00:07:23.000000000 +0200
+++ /var/tmp/diff_new_pack.bNXciQ/_new  2016-10-02 00:07:23.000000000 +0200
@@ -1,45 +1,41 @@
-diff -Nurb suse/opensuse-13.2-orig/cloudinit/sources/DataSourceOpenNebula.py 
suse/opensuse-13.2-opennebula-patch/cloudinit/sources/DataSourceOpenNebula.py
---- suse/opensuse-13.2-orig/cloudinit/sources/DataSourceOpenNebula.py  
2015-02-21 18:33:37.148247653 +0200
-+++ 
suse/opensuse-13.2-opennebula-patch/cloudinit/sources/DataSourceOpenNebula.py   
   2015-02-21 19:45:29.535835879 +0200
-@@ -149,7 +149,7 @@
+--- cloudinit/sources/DataSourceOpenNebula.py.orig
++++ cloudinit/sources/DataSourceOpenNebula.py
+@@ -121,7 +121,7 @@ class BrokenContextDiskDir(Exception):
  
  class OpenNebulaNetwork(object):
      REG_DEV_MAC = re.compile(
--                    r'^\d+: (eth\d+):.*?link\/ether (..:..:..:..:..:..) ?',
-+                    r'^\d+: (\w+):.*?link\/\w+ (..:..:..:..:..:..) ?',
-                     re.MULTILINE | re.DOTALL)
+-        r'^\d+: (eth\d+):.*?link\/ether (..:..:..:..:..:..) ?',
++        r'^\d+: (eth\d+):.*?link\/\W+ (..:..:..:..:..:..) ?',
+         re.MULTILINE | re.DOTALL)
  
      def __init__(self, ip, context):
-@@ -158,7 +158,11 @@
+@@ -130,12 +130,24 @@ class OpenNebulaNetwork(object):
          self.ifaces = self.get_ifaces()
  
      def get_ifaces(self):
 -        return self.REG_DEV_MAC.findall(self.ip)
-+        list = self.REG_DEV_MAC.findall(self.ip)
-+        ifaces = dict()
-+        for l in list:
-+            ifaces[l[1]] = l[0]
++      list = self.REG_DEV_MAC.findall(self.ip)
++      ifaces = dict()
++      for l in list:
++          ifaces[l[1]] = l[0]
 +        return ifaces
  
      def mac2ip(self, mac):
          components = mac.split(':')[2:]
-@@ -206,6 +210,15 @@
-         else:
-             return None
+         return [str(int(c, 16)) for c in components]
  
 +    def get_context_interfaces(self):
-+
-+        def device_mac(t): return re.match(r"ETH\d+_MAC", t)
++      
++      def device_mac(t): return re.match(r"ETH\d+_MAC", t)
 +
 +        mac_vars = filter(device_mac, self.context.keys())
++      context_interfaces = [v.split('_')[0] for v in mac_vars]
++      return context_interfaces
 +
-+        context_interfaces = [v.split('_')[0] for v in mac_vars]
-+        return context_interfaces
-+            
-     def gen_conf(self):
-         global_dns = []
-         if 'DNS' in self.context:
-@@ -216,27 +229,39 @@
+     def get_ip(self, dev, components):
+         var_name = dev.upper() + '_IP'
+         if var_name in self.context:
+@@ -188,27 +200,39 @@ class OpenNebulaNetwork(object):
          conf.append('iface lo inet loopback')
          conf.append('')
  
@@ -48,18 +44,18 @@
 -            mac = i[1]
 +        context_interfaces = self.get_context_interfaces()
 +
-+        if len(context_interfaces):
-+            try:
-+                (out, _err) = util.subp(["systemctl", "stop", 
"NetworkManager"])
-+                (out, _err) = util.subp(["systemctl", "disable", 
"NetworkManager"])
-+            except util.ProcessExecutionError:
-+                util.logexc(LOG, "Disable NetworkManager command failed")
++      if len(context_interfaces):
++          try:
++              (out, _err) = util.subp(["systemctl", "stop", "NetworkManager"])
++              (out, _err) = util.subp(["systemctl", "disable", 
"NetworkManager"])
++          except util.ProcessExecutionError:
++              util.logexc(LOG, "Disable NetworkManager command failed")
 +
-+        for interface in context_interfaces:
++      for interface in context_interfaces:
 +            mac = self.context[interface+"_MAC"]
 +            dev = self.ifaces.get(mac)
-+            if dev is None:
-+                continue
++          if dev is None:
++              continue
 +
              ip_components = self.mac2ip(mac)
  
@@ -68,7 +64,7 @@
 -            conf.append('  address ' + self.get_ip(dev, ip_components))
 -            conf.append('  network ' + self.get_network(dev, ip_components))
 -            conf.append('  netmask ' + self.get_mask(dev))
-+            conf.append('  address ' + self.get_ip(interface, ip_components))
++            conf.append('  address ' + self.get_ip(nterface, ip_components))
 +            conf.append('  network ' + self.get_network(interface, 
ip_components))
 +            conf.append('  netmask ' + self.get_mask(interface))
  
@@ -88,14 +84,15 @@
              if global_dns or dns:
                  all_dns = global_dns
                  if dns:
-@@ -404,8 +429,8 @@
+@@ -375,9 +399,8 @@ def read_context_disk_dir(source_dir, as
  
      if ssh_key_var:
          lines = context.get(ssh_key_var).splitlines()
 -        results['metadata']['public-keys'] = [l for l in lines
--            if len(l) and not l.startswith("#")]
-+        ssh_keys = [l for l in lines if len(l) and not l.startswith("#")]
-+        results['metadata']['public-keys'] = ssh_keys
+-                                              if len(l) and not
+-                                              l.startswith("#")]
++      ssh_keys = [l for l in lines if len(l) and not l.startswith("#")]
++      results['metadata']['public-keys'] = ssh_keys
  
      # custom hostname -- try hostname or leave cloud-init
      # itself create hostname from IP address later

++++++ fix-default-systemd-unit-dir.patch ++++++
--- /var/tmp/diff_new_pack.bNXciQ/_old  2016-10-02 00:07:23.000000000 +0200
+++ /var/tmp/diff_new_pack.bNXciQ/_new  2016-10-02 00:07:23.000000000 +0200
@@ -1,13 +1,13 @@
-=== modified file 'setup.py'
---- setup.py   2015-01-21 20:28:32 +0000
-+++ setup.py   2015-04-13 09:20:40 +0000
-@@ -60,7 +60,7 @@
-     try:
-         (path, err) = tiny_p(cmd)
-     except:
--        return '/lib/systemd/system'
-+        return '/usr/lib/systemd/system'
-     return str(path).strip()
- 
- INITSYS_FILES = {
-
+--- setup.py.orig
++++ setup.py
+@@ -58,8 +58,8 @@ def tiny_p(cmd, capture=True):
+ def pkg_config_read(library, var):
+     fallbacks = {
+         'systemd': {
+-            'systemdsystemunitdir': '/lib/systemd/system',
+-            'systemdsystemgeneratordir': '/lib/systemd/system-generators',
++            'systemdsystemunitdir': '/usr/lib/systemd/system',
++            'systemdsystemgeneratordir': '/usr/lib/systemd/system-generators',
+         }
+     }
+     cmd = ['pkg-config', '--variable=%s' % var, library]

++++++ setupSUSEsysVInit.diff ++++++
--- /var/tmp/diff_new_pack.bNXciQ/_old  2016-10-02 00:07:23.000000000 +0200
+++ /var/tmp/diff_new_pack.bNXciQ/_new  2016-10-02 00:07:23.000000000 +0200
@@ -1,20 +1,18 @@
-Index: cloud-init-0.7.6/setup.py
-===================================================================
---- cloud-init-0.7.6.orig/setup.py
-+++ cloud-init-0.7.6/setup.py
-@@ -65,6 +65,7 @@ INITSYS_FILES = {
-     'sysvinit': [f for f in glob('sysvinit/redhat/*') if is_f(f)],
+--- setup.py.orig
++++ setup.py
+@@ -75,6 +75,7 @@ INITSYS_FILES = {
      'sysvinit_freebsd': [f for f in glob('sysvinit/freebsd/*') if is_f(f)],
      'sysvinit_deb': [f for f in glob('sysvinit/debian/*') if is_f(f)],
+     'sysvinit_openrc': [f for f in glob('sysvinit/gentoo/*') if is_f(f)],
 +    'sysvinit_suse': [f for f in glob('sysvinit/suse/*') if is_f(f)],
-     'systemd': [f for f in glob('systemd/*') if is_f(f)],
-     'upstart': [f for f in glob('upstart/*') if is_f(f)],
- }
-@@ -72,6 +73,7 @@ INITSYS_ROOTS = {
-     'sysvinit': '/etc/rc.d/init.d',
+     'systemd': [f for f in (glob('systemd/*.service') +
+                             glob('systemd/*.target')) if is_f(f)],
+     'systemd.generators': [f for f in glob('systemd/*-generator') if is_f(f)],
+@@ -85,6 +86,7 @@ INITSYS_ROOTS = {
      'sysvinit_freebsd': '/usr/local/etc/rc.d',
      'sysvinit_deb': '/etc/init.d',
+     'sysvinit_openrc': '/etc/init.d',
 +    'sysvinit_suse': '/etc/init.d',
-     'systemd': systemd_unitdir(),
-     'upstart': '/etc/init/',
- }
+     'systemd': pkg_config_read('systemd', 'systemdsystemunitdir'),
+     'systemd.generators': pkg_config_read('systemd',
+                                           'systemdsystemgeneratordir'),

++++++ suseIntegratedHandler.patch ++++++
--- /var/tmp/diff_new_pack.bNXciQ/_old  2016-10-02 00:07:23.000000000 +0200
+++ /var/tmp/diff_new_pack.bNXciQ/_new  2016-10-02 00:07:23.000000000 +0200
@@ -1,6 +1,6 @@
 --- /dev/null
 +++ cloudinit/distros/opensuse.py
-@@ -0,0 +1,223 @@
+@@ -0,0 +1,212 @@
 +# vi: ts=4 expandtab
 +#
 +#    Copyright (C) 2014 SUSE LLC
@@ -152,11 +152,6 @@
 +        host_fn = self.hostname_conf_fn
 +        return (host_fn, self._read_hostname(host_fn))
 +
-+    def _select_hostname(self, hostname, fqdn):
-+        if fqdn:
-+            return fqdn
-+        return hostname
-+
 +    def _write_hostname(self, hostname, out_fn):
 +        if self.systemdDist:
 +            util.subp(['hostnamectl', 'set-hostname', str(hostname)])
@@ -171,7 +166,7 @@
 +            if not conf:
 +                conf = HostnameConf('')
 +            conf.set_hostname(hostname)
-+            util.write_file(out_fn, str(conf), 0644)
++            util.write_file(out_fn, str(conf), 0o644)
 +
 +    def _write_network(self, settings):
 +        # Convert debian settings to ifcfg format
@@ -182,7 +177,7 @@
 +        nameservers = []
 +        searchservers = []
 +        dev_names = entries.keys()
-+        for (dev, info) in entries.iteritems():
++        for (dev, info) in entries.items():
 +            net_fn = self.network_script_tpl % (dev)
 +            route_fn = self.route_conf_tpl % (dev)
 +            mode = None
@@ -218,28 +213,22 @@
 +            rhutil.update_resolve_conf_file(self.resolve_conf_fn,
 +                                               nameservers, searchservers)
 +        return dev_names
-+
-+
-+
-+
-+
-+
 --- cloudinit/distros/sles.py.orig
 +++ cloudinit/distros/sles.py
-@@ -1,10 +1,8 @@
+@@ -1,10 +1,9 @@
  # vi: ts=4 expandtab
  #
 -#    Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
+-#
+-#    Author: Juerg Haefliger <juerg.haefli...@hp.com>
 +#    Copyright (C) 2014 SUSE LLC
  #
--#    Author: Juerg Haefliger <juerg.haefli...@hp.com>
--#
--#    Leaning very heavily on the RHEL and Debian implementation
+ #    Leaning very heavily on the RHEL and Debian implementation
 +#    Author: Robert Schweikert <rjsch...@suse.com>
  #
  #    This program is free software: you can redistribute it and/or modify
  #    it under the terms of the GNU General Public License version 3, as
-@@ -18,169 +16,11 @@
+@@ -18,162 +17,12 @@
  #    You should have received a copy of the GNU General Public License
  #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
@@ -258,7 +247,9 @@
  
  LOG = logging.getLogger(__name__)
  
--
++class Distro(opensuse.Distro):
++    pass
+ 
 -class Distro(distros.Distro):
 -    clock_conf_fn = '/etc/sysconfig/clock'
 -    locale_conf_fn = '/etc/sysconfig/language'
@@ -288,7 +279,7 @@
 -        nameservers = []
 -        searchservers = []
 -        dev_names = entries.keys()
--        for (dev, info) in entries.iteritems():
+-        for (dev, info) in entries.items():
 -            net_fn = self.network_script_tpl % (dev)
 -            mode = info.get('auto')
 -            if mode and mode.lower() == 'true':
@@ -339,14 +330,7 @@
 -        if not conf:
 -            conf = HostnameConf('')
 -        conf.set_hostname(hostname)
--        util.write_file(out_fn, str(conf), 0644)
--
--    def _select_hostname(self, hostname, fqdn):
--        # Prefer the short hostname over the long
--        # fully qualified domain name
--        if not hostname:
--            return fqdn
--        return hostname
+-        util.write_file(out_fn, str(conf), 0o644)
 -
 -    def _read_system_hostname(self):
 -        host_fn = self.hostname_conf_fn
@@ -410,5 +394,3 @@
 -    def update_package_sources(self):
 -        self._runner.run("update-sources", self.package_command,
 -                         ['refresh'], freq=PER_INSTANCE)
-+class Distro(opensuse.Distro):
-+    pass


Reply via email to