From 640ca562bb09c49aae1f7a4ed9bb14a979b278db Mon Sep 17 00:00:00 2001 From: Garrett Holmstrom Date: Sat, 21 Feb 2015 19:58:55 +0000 Subject: [PATCH] Update to bzr snapshot 1060 for python 3 support --- ...oud-init-0.7.6-bzr1060-groupadd-list.patch | 14 +++---- ...ud-init-0.7.6-bzr1060-network-online.patch | 20 +++++----- cloud-init-0.7.6-path.patch | 40 ------------------- cloud-init-0.7.6-user-session.patch | 13 ------ cloud-init.spec | 22 +++++----- sources | 2 +- 6 files changed, 28 insertions(+), 83 deletions(-) rename cloud-init-0.7.6-groupadd-list.patch => cloud-init-0.7.6-bzr1060-groupadd-list.patch (73%) rename cloud-init-0.7.6-network-online.patch => cloud-init-0.7.6-bzr1060-network-online.patch (66%) delete mode 100644 cloud-init-0.7.6-path.patch delete mode 100644 cloud-init-0.7.6-user-session.patch diff --git a/cloud-init-0.7.6-groupadd-list.patch b/cloud-init-0.7.6-bzr1060-groupadd-list.patch similarity index 73% rename from cloud-init-0.7.6-groupadd-list.patch rename to cloud-init-0.7.6-bzr1060-groupadd-list.patch index ea71034..7f38924 100644 --- a/cloud-init-0.7.6-groupadd-list.patch +++ b/cloud-init-0.7.6-bzr1060-groupadd-list.patch @@ -1,8 +1,8 @@ -Index: cloud-init-0.7.6/cloudinit/distros/__init__.py +Index: cloud-init-0.7.6-bzr1060/cloudinit/distros/__init__.py =================================================================== ---- cloud-init-0.7.6.orig/cloudinit/distros/__init__.py -+++ cloud-init-0.7.6/cloudinit/distros/__init__.py -@@ -328,11 +328,16 @@ class Distro(object): +--- cloud-init-0.7.6-bzr1060.orig/cloudinit/distros/__init__.py ++++ cloud-init-0.7.6-bzr1060/cloudinit/distros/__init__.py +@@ -333,11 +333,16 @@ class Distro(object): } redact_opts = ['passwd'] @@ -10,7 +10,7 @@ Index: cloud-init-0.7.6/cloudinit/distros/__init__.py + list_stripped_opts = ['groups'] # Check the values and create the command - for key, val in kwargs.iteritems(): + for key, val in kwargs.items(): if key in adduser_opts and val and isinstance(val, str): + if key in list_stripped_opts: @@ -19,10 +19,10 @@ Index: cloud-init-0.7.6/cloudinit/distros/__init__.py adduser_cmd.extend([adduser_opts[key], val]) # Redact certain fields from the logs -@@ -612,6 +617,9 @@ def _normalize_groups(grp_cfg): +@@ -629,6 +634,9 @@ def _normalize_groups(grp_cfg): raise TypeError("Bad group member type %s" % type_utils.obj_name(v)) - elif isinstance(i, (str, basestring)): + elif isinstance(i, six.string_types): + # Common to have leading whitespace in string lists, + # but not all useradd tools will support it.- + i = i.strip() diff --git a/cloud-init-0.7.6-network-online.patch b/cloud-init-0.7.6-bzr1060-network-online.patch similarity index 66% rename from cloud-init-0.7.6-network-online.patch rename to cloud-init-0.7.6-bzr1060-network-online.patch index 6bdb223..5b5983a 100644 --- a/cloud-init-0.7.6-network-online.patch +++ b/cloud-init-0.7.6-bzr1060-network-online.patch @@ -1,7 +1,7 @@ -Index: cloud-init-0.7.6/systemd/cloud-config.service +Index: cloud-init-0.7.6-bzr1060/systemd/cloud-config.service =================================================================== ---- cloud-init-0.7.6.orig/systemd/cloud-config.service -+++ cloud-init-0.7.6/systemd/cloud-config.service +--- cloud-init-0.7.6-bzr1060.orig/systemd/cloud-config.service ++++ cloud-init-0.7.6-bzr1060/systemd/cloud-config.service @@ -1,8 +1,8 @@ [Unit] Description=Apply the settings specified in cloud-config @@ -13,25 +13,25 @@ Index: cloud-init-0.7.6/systemd/cloud-config.service [Service] Type=oneshot -Index: cloud-init-0.7.6/systemd/cloud-init.service +Index: cloud-init-0.7.6-bzr1060/systemd/cloud-init.service =================================================================== ---- cloud-init-0.7.6.orig/systemd/cloud-init.service -+++ cloud-init-0.7.6/systemd/cloud-init.service +--- cloud-init-0.7.6-bzr1060.orig/systemd/cloud-init.service ++++ cloud-init-0.7.6-bzr1060/systemd/cloud-init.service @@ -1,8 +1,8 @@ [Unit] Description=Initial cloud-init job (metadata service crawler) -After=local-fs.target network.target cloud-init-local.service +After=local-fs.target network-online.target cloud-init-local.service - Before=sshd.service sshd-keygen.service + Before=sshd.service sshd-keygen.service systemd-user-sessions.service -Requires=network.target +Requires=network-online.target Wants=local-fs.target cloud-init-local.service sshd.service sshd-keygen.service [Service] -Index: cloud-init-0.7.6/systemd/cloud-final.service +Index: cloud-init-0.7.6-bzr1060/systemd/cloud-final.service =================================================================== ---- cloud-init-0.7.6.orig/systemd/cloud-final.service -+++ cloud-init-0.7.6/systemd/cloud-final.service +--- cloud-init-0.7.6-bzr1060.orig/systemd/cloud-final.service ++++ cloud-init-0.7.6-bzr1060/systemd/cloud-final.service @@ -1,8 +1,8 @@ [Unit] Description=Execute cloud user/final scripts diff --git a/cloud-init-0.7.6-path.patch b/cloud-init-0.7.6-path.patch deleted file mode 100644 index 30ebb46..0000000 --- a/cloud-init-0.7.6-path.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 08c53df33fba378116ae4cf61e107407537ed761 Mon Sep 17 00:00:00 2001 -From: rpm-build -Date: Fri, 14 Nov 2014 13:45:22 -0500 -Subject: [PATCH] Move helper tools to usr/lib - -This is more in line with the Fedora filesystem standards. ---- - cloudinit/config/cc_keys_to_console.py | 2 +- - setup.py | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/cloudinit/config/cc_keys_to_console.py b/cloudinit/config/cc_keys_to_console.py -index ed7af69..e8bc33a 100644 ---- a/cloudinit/config/cc_keys_to_console.py -+++ b/cloudinit/config/cc_keys_to_console.py -@@ -26,7 +26,7 @@ from cloudinit import util - frequency = PER_INSTANCE - - # This is a tool that cloud init provides --HELPER_TOOL = '/usr/lib/cloud-init/write-ssh-key-fingerprints' -+HELPER_TOOL = '/usr/libexec/cloud-init/write-ssh-key-fingerprints' - - - def handle(name, cfg, _cloud, log, _args): -diff --git a/setup.py b/setup.py -index bd41bc9..dbc9105 100755 ---- a/setup.py -+++ b/setup.py -@@ -149,7 +149,7 @@ setuptools.setup(name='cloud-init', - data_files=[(ETC + '/cloud', glob('config/*.cfg')), - (ETC + '/cloud/cloud.cfg.d', glob('config/cloud.cfg.d/*')), - (ETC + '/cloud/templates', glob('templates/*')), -- (USR + '/lib/cloud-init', -+ (USR + '/libexec/cloud-init', - ['tools/uncloud-init', - 'tools/write-ssh-key-fingerprints']), - (USR + '/share/doc/cloud-init', --- -1.8.3.1 - diff --git a/cloud-init-0.7.6-user-session.patch b/cloud-init-0.7.6-user-session.patch deleted file mode 100644 index df36ee9..0000000 --- a/cloud-init-0.7.6-user-session.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: cloud-init-0.7.6/systemd/cloud-init.service -=================================================================== ---- cloud-init-0.7.6.orig/systemd/cloud-init.service -+++ cloud-init-0.7.6/systemd/cloud-init.service -@@ -1,7 +1,7 @@ - [Unit] - Description=Initial cloud-init job (metadata service crawler) - After=local-fs.target network-online.target cloud-init-local.service --Before=sshd.service sshd-keygen.service -+Before=sshd.service sshd-keygen.service systemd-user-sessions.service - Requires=network-online.target - Wants=local-fs.target cloud-init-local.service sshd.service sshd-keygen.service - diff --git a/cloud-init.spec b/cloud-init.spec index 3c6c041..9041a33 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -7,20 +7,19 @@ Name: cloud-init Version: 0.7.6 -Release: 3%{?dist} +Release: 4.20140218bzr1060%{?dist} Summary: Cloud instance init scripts Group: System Environment/Base License: GPLv3 URL: http://launchpad.net/cloud-init -Source0: https://launchpad.net/cloud-init/trunk/%{version}/+download/%{name}-%{version}.tar.gz +#Source0: https://launchpad.net/cloud-init/trunk/%{version}/+download/%{name}-%{version}.tar.gz +# bzr export -r 1060 cloud-init-0.7.6-bzr1060.tar.gz lp:cloud-init +Source0: cloud-init-0.7.6-bzr1060.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.6-path.patch - # Fix rsyslog log filtering # https://code.launchpad.net/~gholms/cloud-init/rsyslog-programname/+merge/186906 Patch1: cloud-init-0.7.5-rsyslog-programname.patch @@ -35,17 +34,13 @@ Patch3: cloud-init-0.7.6-ecdsa.patch # Handle whitespace in lists of groups to add new users to # https://bugs.launchpad.net/cloud-init/+bug/1354694 # https://bugzilla.redhat.com/show_bug.cgi?id=1126365 -Patch4: cloud-init-0.7.6-groupadd-list.patch +Patch4: cloud-init-0.7.6-bzr1060-groupadd-list.patch # Change network.target systemd deps to network-online.target # https://bugzilla.redhat.com/show_bug.cgi?id=1110731 # https://bugzilla.redhat.com/show_bug.cgi?id=1112817 # https://bugzilla.redhat.com/show_bug.cgi?id=1147613 -Patch5: cloud-init-0.7.6-network-online.patch - -# Ensure cloud-init.service doesn't write all over the login prompt -# http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/revision/1050 -Patch6: cloud-init-0.7.6-user-session.patch +Patch5: cloud-init-0.7.6-bzr1060-network-online.patch # Use dnf instead of yum when available # https://bugzilla.redhat.com/show_bug.cgi?id=1194451 @@ -87,7 +82,7 @@ ssh keys and to let the user run various scripts. %prep -%autosetup -p1 +%autosetup -p1 -n %{name}-%{version}-bzr1060 cp -p %{SOURCE2} README.fedora @@ -164,6 +159,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Feb 21 2015 Garrett Holmstrom - 0.7.6-4.20140218bzr1060 +- Updated to bzr snapshot 1060 for python 3 support + * Thu Feb 19 2015 Garrett Holmstrom - 0.7.6-3 - Stopped depending on git to build - Stopped implicitly listing doc files twice diff --git a/sources b/sources index da06987..418dccf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cd392e943dd0165e90a6d56afd0e4ad3 cloud-init-0.7.6.tar.gz +708db3a0f84cdb4420a0bb1b916a8fd0 cloud-init-0.7.6-bzr1060.tar.gz