From de49812990871e1705b64051c35161d5e6400269 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 24 Dec 2018 14:11:38 +0000 Subject: gentoo resync : 24.12.2018 --- .../18.4-add-support-for-package_upgrade.patch | 54 ++++++++++++++++++++++ .../18.4-fix-filename-for-storing-locale.patch | 30 ++++++++++++ .../18.4-fix-update_package_sources-function.patch | 26 +++++++++++ .../files/18.5-fix-invalid-string-format.patch | 46 ++++++++++++++++++ .../cloud-init/files/cloud-init-0.7.9-tests.patch | 13 ------ ...it-18.4-gentoo-support-upstream-templates.patch | 10 ++-- 6 files changed, 161 insertions(+), 18 deletions(-) create mode 100644 app-emulation/cloud-init/files/18.4-add-support-for-package_upgrade.patch create mode 100644 app-emulation/cloud-init/files/18.4-fix-filename-for-storing-locale.patch create mode 100644 app-emulation/cloud-init/files/18.4-fix-update_package_sources-function.patch create mode 100644 app-emulation/cloud-init/files/18.5-fix-invalid-string-format.patch delete mode 100644 app-emulation/cloud-init/files/cloud-init-0.7.9-tests.patch (limited to 'app-emulation/cloud-init/files') diff --git a/app-emulation/cloud-init/files/18.4-add-support-for-package_upgrade.patch b/app-emulation/cloud-init/files/18.4-add-support-for-package_upgrade.patch new file mode 100644 index 000000000000..9c542cfc0777 --- /dev/null +++ b/app-emulation/cloud-init/files/18.4-add-support-for-package_upgrade.patch @@ -0,0 +1,54 @@ +From 7868b97507d0dd7d7721ad5c4539e22c67635f92 Mon Sep 17 00:00:00 2001 +From: Gilles Dartiguelongue +Date: Wed, 14 Nov 2018 15:58:30 +0100 +Subject: [PATCH 5/5] gentoo: add support for package_upgrade + +--- + cloudinit/distros/gentoo.py | 25 ++++++++++++++----------- + 1 file changed, 14 insertions(+), 11 deletions(-) + +diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py +index 7b838e82..22ad2cf3 100644 +--- a/cloudinit/distros/gentoo.py ++++ b/cloudinit/distros/gentoo.py +@@ -189,23 +189,26 @@ class Distro(distros.Distro): + distros.set_etc_timezone(tz=tz, tz_file=self._find_tz_file(tz)) + + def package_command(self, command, args=None, pkgs=None): +- if pkgs is None: +- pkgs = [] +- + cmd = ['emerge'] + # Redirect output + cmd.append("--quiet") + +- if args and isinstance(args, str): +- cmd.append(args) +- elif args and isinstance(args, list): +- cmd.extend(args) ++ if command == "upgrade": ++ cmd.extend(["--update", "world"]) ++ else: ++ if pkgs is None: ++ pkgs = [] ++ ++ if args and isinstance(args, str): ++ cmd.append(args) ++ elif args and isinstance(args, list): ++ cmd.extend(args) + +- if command: +- cmd.append(command) ++ if command: ++ cmd.append(command) + +- pkglist = util.expand_package_list('%s-%s', pkgs) +- cmd.extend(pkglist) ++ pkglist = util.expand_package_list('%s-%s', pkgs) ++ cmd.extend(pkglist) + + # Allow the output of this to flow outwards (ie not be captured) + util.subp(cmd, capture=False) +-- +2.19.1 + diff --git a/app-emulation/cloud-init/files/18.4-fix-filename-for-storing-locale.patch b/app-emulation/cloud-init/files/18.4-fix-filename-for-storing-locale.patch new file mode 100644 index 000000000000..a5bbf6034ac5 --- /dev/null +++ b/app-emulation/cloud-init/files/18.4-fix-filename-for-storing-locale.patch @@ -0,0 +1,30 @@ +From 3756cdea3e844b9611de321a8075df80e7dbf74d Mon Sep 17 00:00:00 2001 +From: Gilles Dartiguelongue +Date: Wed, 14 Nov 2018 15:28:22 +0100 +Subject: [PATCH 3/5] gentoo: fix filename for storing locale + +There must have been a misunderstanding as locale.gen is meant to +contain locales to be generated if no argument is passed to locale-gen. + +When using openrc, Gentoo stores system locale in /etc/env.d/02locale +which is generally manipulated through eselect. +--- + cloudinit/distros/gentoo.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py +index 98ac41ca..50bb61fb 100644 +--- a/cloudinit/distros/gentoo.py ++++ b/cloudinit/distros/gentoo.py +@@ -20,7 +20,7 @@ LOG = logging.getLogger(__name__) + + + class Distro(distros.Distro): +- locale_conf_fn = '/etc/locale.gen' ++ locale_conf_fn = '/etc/env.d/02locale' + network_conf_fn = '/etc/conf.d/net' + resolve_conf_fn = '/etc/resolv.conf' + hostname_conf_fn = '/etc/conf.d/hostname' +-- +2.19.1 + diff --git a/app-emulation/cloud-init/files/18.4-fix-update_package_sources-function.patch b/app-emulation/cloud-init/files/18.4-fix-update_package_sources-function.patch new file mode 100644 index 000000000000..d90258d1bc48 --- /dev/null +++ b/app-emulation/cloud-init/files/18.4-fix-update_package_sources-function.patch @@ -0,0 +1,26 @@ +From b15c4c4b24c894b3c8d444466110c881c35525e2 Mon Sep 17 00:00:00 2001 +From: Gilles Dartiguelongue +Date: Wed, 14 Nov 2018 15:35:37 +0100 +Subject: [PATCH 4/5] gentoo: fix update_package_sources function + +Method is meant to update packages repository, not to update the system. +--- + cloudinit/distros/gentoo.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py +index 50bb61fb..7b838e82 100644 +--- a/cloudinit/distros/gentoo.py ++++ b/cloudinit/distros/gentoo.py +@@ -212,7 +212,7 @@ class Distro(distros.Distro): + + def update_package_sources(self): + self._runner.run("update-sources", self.package_command, +- ["-u", "world"], freq=PER_INSTANCE) ++ ["--sync"], freq=PER_INSTANCE) + + + def convert_resolv_conf(settings): +-- +2.19.1 + diff --git a/app-emulation/cloud-init/files/18.5-fix-invalid-string-format.patch b/app-emulation/cloud-init/files/18.5-fix-invalid-string-format.patch new file mode 100644 index 000000000000..42030f57dc45 --- /dev/null +++ b/app-emulation/cloud-init/files/18.5-fix-invalid-string-format.patch @@ -0,0 +1,46 @@ +From 5b065316113b97aadb43e63cc31bb8639f6a6376 Mon Sep 17 00:00:00 2001 +From: Scott Moser +Date: Fri, 14 Dec 2018 03:24:26 +0000 +Subject: [PATCH] Update to pylint 2.2.2. + +The tip-pylint tox target correctly reported the invalid use of +string formatting. The change here is to: + +a.) Fix the error that was caught. +b.) move to pylint 2.2.2 for the default 'pylint' target. +--- + cloudinit/sources/DataSourceAzure.py | 4 ++-- + tox.ini | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py +index e076d5dc..46efca4a 100644 +--- a/cloudinit/sources/DataSourceAzure.py ++++ b/cloudinit/sources/DataSourceAzure.py +@@ -980,8 +980,8 @@ def read_azure_ovf(contents): + raise NonAzureDataSource("No LinuxProvisioningConfigurationSet") + if len(lpcs_nodes) > 1: + raise BrokenAzureDataSource("found '%d' %ss" % +- ("LinuxProvisioningConfigurationSet", +- len(lpcs_nodes))) ++ (len(lpcs_nodes), ++ "LinuxProvisioningConfigurationSet")) + lpcs = lpcs_nodes[0] + + if not lpcs.hasChildNodes(): +diff --git a/tox.ini b/tox.ini +index 2fb3209d..d983348b 100644 +--- a/tox.ini ++++ b/tox.ini +@@ -21,7 +21,7 @@ setenv = + basepython = python3 + deps = + # requirements +- pylint==1.8.1 ++ pylint==2.2.2 + # test-requirements because unit tests are now present in cloudinit tree + -r{toxinidir}/test-requirements.txt + commands = {envpython} -m pylint {posargs:cloudinit tests tools} +-- +2.20.0 + diff --git a/app-emulation/cloud-init/files/cloud-init-0.7.9-tests.patch b/app-emulation/cloud-init/files/cloud-init-0.7.9-tests.patch deleted file mode 100644 index b80a60a47b7f..000000000000 --- a/app-emulation/cloud-init/files/cloud-init-0.7.9-tests.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/setup.py b/setup.py -index bbadd7b..1578a3d 100755 ---- a/setup.py -+++ b/setup.py -@@ -205,7 +207,7 @@ setuptools.setup( - author='Scott Moser', - author_email='scott.moser@canonical.com', - url='http://launchpad.net/cloud-init/', -- packages=setuptools.find_packages(exclude=['tests']), -+ packages=setuptools.find_packages(exclude=['tests.*', 'tests']), - scripts=['tools/cloud-init-per'], - license='GPLv3', - data_files=data_files, diff --git a/app-emulation/cloud-init/files/cloud-init-18.4-gentoo-support-upstream-templates.patch b/app-emulation/cloud-init/files/cloud-init-18.4-gentoo-support-upstream-templates.patch index 60d9da600557..6f87399af94b 100644 --- a/app-emulation/cloud-init/files/cloud-init-18.4-gentoo-support-upstream-templates.patch +++ b/app-emulation/cloud-init/files/cloud-init-18.4-gentoo-support-upstream-templates.patch @@ -1,7 +1,7 @@ -From 946ce2b005a71e9922654af79bce51fefa16c3d4 Mon Sep 17 00:00:00 2001 +From 823454f1ea140ec47f5f9c5c3c5ad62eb458eb8a Mon Sep 17 00:00:00 2001 From: Gilles Dartiguelongue Date: Wed, 24 Oct 2018 10:52:46 +0200 -Subject: [PATCH 2/2] Add support for gentoo in cloud.cfg and templates +Subject: [PATCH 2/5] Add support for gentoo in cloud.cfg and templates --- config/cloud.cfg.tmpl | 8 ++++++-- @@ -11,7 +11,7 @@ Subject: [PATCH 2/2] Add support for gentoo in cloud.cfg and templates create mode 100644 templates/hosts.gentoo.tmpl diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl -index 1fef133a..f66b5f7e 100644 +index 1fef133a..3f5a41a2 100644 --- a/config/cloud.cfg.tmpl +++ b/config/cloud.cfg.tmpl @@ -134,7 +134,7 @@ cloud_final_modules: @@ -39,7 +39,7 @@ index 1fef133a..f66b5f7e 100644 +{% elif variant == "gentoo" %} + groups: [users, wheel] + primary_group: users -+ no-user-group: true ++ no_user_group: true {% else %} groups: [wheel, adm, systemd-journal] {% endif %} @@ -87,5 +87,5 @@ index 8b7cb875..d109044e 100755 if "avoid-pep8-E402-import-not-top-of-file": _tdir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) -- -2.19.0 +2.19.1 -- cgit v1.2.3