Update to bzr snapshot 1245

This commit is contained in:
Garrett Holmstrom 2016-07-06 18:38:38 -07:00
parent f4abf80d55
commit 45ef3b0bcc
8 changed files with 101 additions and 73 deletions

View File

@ -1,31 +0,0 @@
Index: cloud-init-0.7.6-bzr1060/cloudinit/distros/__init__.py
===================================================================
--- 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']
+ # Options that are comma separated lists which we need to parse
+ list_stripped_opts = ['groups']
# Check the values and create the command
for key, val in kwargs.items():
if key in adduser_opts and val and isinstance(val, str):
+ if key in list_stripped_opts:
+ values = [x.strip() for x in val.split(',')]
+ val = ','.join(values)
adduser_cmd.extend([adduser_opts[key], val])
# Redact certain fields from the logs
@@ -629,6 +634,9 @@ def _normalize_groups(grp_cfg):
raise TypeError("Bad group member type %s" %
type_utils.obj_name(v))
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()
if i not in c_grp_cfg:
c_grp_cfg[i] = []
else:

View File

@ -1,11 +1,11 @@
Index: cloud-init-0.7.6/cloudinit/ssh_util.py
Index: cloud-init-0.7.6-bzr1245/cloudinit/ssh_util.py
===================================================================
--- cloud-init-0.7.6.orig/cloudinit/ssh_util.py
+++ cloud-init-0.7.6/cloudinit/ssh_util.py
@@ -32,6 +32,7 @@ DEF_SSHD_CFG = "/etc/ssh/sshd_config"
--- cloud-init-0.7.6-bzr1245.orig/cloudinit/ssh_util.py
+++ cloud-init-0.7.6-bzr1245/cloudinit/ssh_util.py
@@ -33,6 +33,7 @@ DEF_SSHD_CFG = "/etc/ssh/sshd_config"
# taken from openssh source key.c/key_type_from_name
VALID_KEY_TYPES = ("rsa", "dsa", "ssh-rsa", "ssh-dss", "ecdsa",
VALID_KEY_TYPES = (
"rsa", "dsa", "ssh-rsa", "ssh-dss", "ecdsa",
+ "ecdsa-sha2-nistp256", "ecdsa-sha2-nistp384", "ecdsa-sha2-nistp521",
"ssh-rsa-cert-v00@openssh.com", "ssh-dss-cert-v00@openssh.com",
"ssh-rsa-cert-v00@openssh.com", "ssh-dss-cert-v00@openssh.com",

View File

@ -0,0 +1,12 @@
Index: cloud-init-0.7.6-bzr1245/setup.py
===================================================================
--- cloud-init-0.7.6-bzr1245.orig/setup.py
+++ cloud-init-0.7.6-bzr1245/setup.py
@@ -207,7 +207,6 @@ setuptools.setup(
scripts=['tools/cloud-init-per'],
license='GPLv3',
data_files=data_files,
- install_requires=requirements,
cmdclass=cmdclass,
entry_points={
'console_scripts': [

View File

@ -0,0 +1,38 @@
Index: cloud-init-0.7.6-bzr1245/cloudinit/distros/__init__.py
===================================================================
--- cloud-init-0.7.6-bzr1245.orig/cloudinit/distros/__init__.py
+++ cloud-init-0.7.6-bzr1245/cloudinit/distros/__init__.py
@@ -376,7 +376,7 @@ class Distro(object):
# that can go right through to the command.
kwargs['groups'] = ",".join(groups)
else:
- groups = groups.split(",")
+ groups = [group.strip() for group in groups.split(",")]
primary_group = kwargs.get('primary_group')
if primary_group:
@@ -673,7 +673,7 @@ def _get_arch_package_mirror_info(packag
# of cloud-init
def _normalize_groups(grp_cfg):
if isinstance(grp_cfg, six.string_types):
- grp_cfg = grp_cfg.strip().split(",")
+ grp_cfg = [grp.strip() for grp in grp_cfg.strip().split(",")]
if isinstance(grp_cfg, list):
c_grp_cfg = {}
for i in grp_cfg:
@@ -691,11 +691,14 @@ def _normalize_groups(grp_cfg):
if isinstance(v, list):
c_grp_cfg[k].extend(v)
elif isinstance(v, six.string_types):
- c_grp_cfg[k].append(v)
+ c_grp_cfg[k].append(v.strip())
else:
raise TypeError("Bad group member type %s" %
type_utils.obj_name(v))
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()
if i not in c_grp_cfg:
c_grp_cfg[i] = []
else:

View File

@ -1,5 +1,12 @@
The following cloud-init modules are currently unsupported on this OS:
- apt_update_upgrade ('apt_update', 'apt_upgrade', 'apt_mirror', 'apt_preserve_sources_list', 'apt_old_mirror', 'apt_sources', 'debconf_selections', 'packages' options)
- byobu ('byobu_by_default' option)
- apt-configure
- apt-pipelining
- apt_update_upgrade
- byobu
- chef
- emit_upstart
- fan
- grub_dpkg
- landscape
- lxd
- snappy

View File

@ -12,8 +12,9 @@ syslog_fix_perms: ~
cloud_init_modules:
- migrator
- seed_random
- bootcmd
- write-files
- write_files
- growpart
- resizefs
- set_hostname
@ -24,6 +25,7 @@ cloud_init_modules:
- ssh
cloud_config_modules:
- disk_setup
- mounts
- locale
- set-passwords
@ -39,6 +41,7 @@ cloud_config_modules:
cloud_final_modules:
- rightscale_userdata
- scripts-vendor
- scripts-per-once
- scripts-per-boot
- scripts-per-instance
@ -47,6 +50,7 @@ cloud_final_modules:
- keys-to-console
- phone-home
- final-message
- power-state-change
system_info:
default_user:

View File

@ -1,52 +1,45 @@
%{!?license: %global license %%doc}
Name: cloud-init
Version: 0.7.6
Release: 8.20150813bzr1137%{?dist}
Release: 9.20160622bzr1245%{?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
# bzr export -r 1137 cloud-init-0.7.6-bzr1137.tar.gz lp:cloud-init
Source0: cloud-init-0.7.6-bzr1137.tar.gz
# bzr export -r 1245 cloud-init-0.7.6-bzr1245.tar.gz lp:cloud-init
Source0: cloud-init-0.7.6-bzr1245.tar.gz
Source1: cloud-init-fedora.cfg
Source2: cloud-init-README.fedora
Source3: cloud-init-tmpfiles.conf
Patch0: cloud-init-0.7.6-bzr1245-fedora.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
# Systemd 213 removed the --quiet option from ``udevadm settle''
Patch2: cloud-init-0.7.5-udevadm-quiet.patch
# Add 3 ecdsa-sha2-nistp* ssh key types now that they are standardized
# https://bugzilla.redhat.com/show_bug.cgi?id=1151824
Patch3: cloud-init-0.7.6-ecdsa.patch
Patch3: cloud-init-0.7.6-bzr1245-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-bzr1060-groupadd-list.patch
Patch4: cloud-init-0.7.6-bzr1245-groupadd-list.patch
# Use dnf instead of yum when available
# https://bugzilla.redhat.com/show_bug.cgi?id=1194451
Patch7: cloud-init-0.7.6-dnf.patch
# Deal with noarch -> arch
# https://bugzilla.redhat.com/show_bug.cgi?id=1067089
#
# In cloud-init-0.7.6-4 we switched back to noarch now that it uses
# sysfs for DMI data on linux.
Obsoletes: cloud-init < 0.7.6-4
BuildArch: noarch
BuildRequires: pkgconfig
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: systemd-units
BuildRequires: systemd
# For pkgconfig
BuildRequires: systemd-devel
# For tests
BuildRequires: iproute
@ -62,6 +55,7 @@ BuildRequires: python3-pyserial
BuildRequires: python3-PyYAML
BuildRequires: python3-requests
BuildRequires: python3-six
BuildRequires: python3-unittest2
Requires: e2fsprogs
Requires: iproute
@ -79,10 +73,10 @@ Requires: python3-PyYAML
Requires: python3-requests
Requires: python3-six
Requires: shadow-utils
Requires: util-linux
Requires: /usr/bin/run-parts
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
%{?systemd_requires}
%description
Cloud-init is a set of init scripts for cloud instances. Cloud instances
@ -91,7 +85,7 @@ ssh keys and to let the user run various scripts.
%prep
%autosetup -p1 -n %{name}-%{version}-bzr1137
%autosetup -p1 -n %{name}-%{version}-bzr1245
# Change shebangs
sed -i -e 's|#!/usr/bin/env python|#!/usr/bin/env python3|' \
@ -124,13 +118,11 @@ cp -p %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/cloud/cloud.cfg
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/rsyslog.d
cp -p tools/21-cloudinit.conf $RPM_BUILD_ROOT/%{_sysconfdir}/rsyslog.d/21-cloudinit.conf
# Install the systemd bits
mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
cp -p systemd/* $RPM_BUILD_ROOT/%{_unitdir}
%check
nosetests-%{python3_version}
%clean
rm -rf $RPM_BUILD_ROOT
@ -138,10 +130,12 @@ rm -rf $RPM_BUILD_ROOT
%post
# These services are now enabled by the cloud image's kickstart.
# They should probably be done with a preset instead.
%systemd_post cloud-config.service cloud-final.service cloud-init.service cloud-init-local.service
%systemd_post cloud-config.service cloud-config.target cloud-final.service cloud-init.service cloud-init.target cloud-init-local.service
%preun
%systemd_preun cloud-config.service cloud-final.service cloud-init.service cloud-init-local.service
%systemd_preun cloud-config.service cloud-config.target cloud-final.service cloud-init.service cloud-init.target cloud-init-local.service
%postun
%systemd_postun
@ -159,22 +153,26 @@ rm -rf $RPM_BUILD_ROOT
%config(noreplace) %{_sysconfdir}/cloud/templates/*
/lib/udev/rules.d/66-azure-ephemeral.rules
%{_unitdir}/cloud-config.service
%{_unitdir}/cloud-config.target
%{_unitdir}/cloud-final.service
%{_unitdir}/cloud-init-local.service
%{_unitdir}/cloud-init.service
%{_unitdir}/cloud-init-local.service
%{_unitdir}/cloud-config.target
%{_unitdir}/cloud-init.target
/usr/lib/systemd/system-generators/cloud-init-generator
%{_tmpfilesdir}/%{name}.conf
%{python3_sitelib}/*
%{_libexecdir}/%{name}
%{_bindir}/cloud-init*
%dir /run/cloud-init
%dir /var/lib/cloud
%dir %{_sysconfdir}/rsyslog.d
%config(noreplace) %{_sysconfdir}/rsyslog.d/21-cloudinit.conf
%changelog
* Wed Jul 6 2016 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.6-20160622bzr1245
- Updated to bzr snapshot 1245
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.6-8.20150813bzr1137
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

View File

@ -1 +1 @@
b8537b7002f2904e0c1cf247b16a998f cloud-init-0.7.6-bzr1137.tar.gz
c7c12536f909c472d259d5039450c5b7 cloud-init-0.7.6-bzr1245.tar.gz