forwarded 889929 https://github.com/salt-formulas/salt-formula-keystone/pull/21
thanks

Hi,

the build failure is caused by missing Python 3 support. I created a
upstream pull request and backported that commit for the Debian package.
An attached patch that I applied for the Ubuntu package is attached.

On Thu, 08 Feb 2018 23:05:23 +0200 Adrian Bunk <b...@debian.org> wrote:
> Source: salt-formula-keystone
> Version: 2016.12.1-1
> Severity: serious
> Tags: buster sid
> 
> https://ci.debian.net/packages/s/salt-formula-keystone/unstable/amd64/
> https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/sal
t-formula-keystone.html
> 
> ...
>    dh_auto_test
>       make -j15 test
> make[1]: Entering directory '/build/1st/salt-formula-keystone-
2016.12.1'
> [ ! -d tests ] || (cd tests; ./run_tests.sh)
> /usr/bin/salt-call
> [ERROR   ] Rendering exception occurred: Jinja variable 'dict object'
has no attribute 'iteritems'
> [CRITICAL] Rendering SLS 'base:keystone.server' failed: Jinja variable
'dict object' has no attribute 'iteritems'
> local:
>     - Rendering SLS 'base:keystone.server' failed: Jinja variable
'dict object' has no attribute 'iteritems'
> [ERROR] Execution of keystone.cluster failed
> [ERROR] Execution failed
> Makefile:22: recipe for target 'test' failed
> make[1]: *** [test] Error 1
> 
> 
-- 
Benjamin Drung
Debian & Ubuntu Developer
diff -Nru salt-formula-keystone-2016.12.1/debian/changelog salt-formula-keystone-2016.12.1/debian/changelog
--- salt-formula-keystone-2016.12.1/debian/changelog	2016-12-25 17:05:55.000000000 +0100
+++ salt-formula-keystone-2016.12.1/debian/changelog	2018-02-15 00:32:55.000000000 +0100
@@ -1,3 +1,9 @@
+salt-formula-keystone (2016.12.1-1ubuntu1) bionic; urgency=medium
+
+  * Support Python 3 (Closes: #889929)
+
+ -- Benjamin Drung <bdr...@ubuntu.com>  Thu, 15 Feb 2018 00:32:55 +0100
+
 salt-formula-keystone (2016.12.1-1) unstable; urgency=medium
 
   * New upstream release
diff -Nru salt-formula-keystone-2016.12.1/debian/control salt-formula-keystone-2016.12.1/debian/control
--- salt-formula-keystone-2016.12.1/debian/control	2016-11-21 15:56:04.000000000 +0100
+++ salt-formula-keystone-2016.12.1/debian/control	2018-02-15 00:32:55.000000000 +0100
@@ -1,5 +1,6 @@
 Source: salt-formula-keystone
-Maintainer: PKG OpenStack <openstack-de...@lists.alioth.debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-disc...@lists.ubuntu.com>
+XSBC-Original-Maintainer: PKG OpenStack <openstack-de...@lists.alioth.debian.org>
 Uploaders: Filip Pytloun <fi...@pytloun.cz>,
            Ondřej Nový <on...@debian.org>,
 Section: admin
diff -Nru salt-formula-keystone-2016.12.1/debian/patches/0001-Support-Python-3.patch salt-formula-keystone-2016.12.1/debian/patches/0001-Support-Python-3.patch
--- salt-formula-keystone-2016.12.1/debian/patches/0001-Support-Python-3.patch	1970-01-01 01:00:00.000000000 +0100
+++ salt-formula-keystone-2016.12.1/debian/patches/0001-Support-Python-3.patch	2018-02-15 00:32:55.000000000 +0100
@@ -0,0 +1,177 @@
+From 5fe8041e1b29c067fb38d8b98f6f7f5ef0b239c8 Mon Sep 17 00:00:00 2001
+From: Benjamin Drung <bdr...@debian.org>
+Date: Wed, 14 Feb 2018 23:55:54 +0100
+Subject: [PATCH] Support Python 3
+
+json.dumps() and yaml.safe_dump() return a str object on Python 2 and Python 3.
+Therefore the unicode conversion is only needed for Python 2.
+
+Bug-Debian: https://bugs.debian.org/889929
+Forwarded: https://github.com/salt-formulas/salt-formula-keystone/pull/21
+---
+ _modules/keystone_policy.py                 | 13 ++++++++++---
+ keystone/client/project.sls                 |  4 ++--
+ keystone/client/server.sls                  | 10 +++++-----
+ keystone/control.sls                        |  2 +-
+ keystone/files/kilo/keystone.conf.Debian    |  2 +-
+ keystone/files/liberty/keystone.conf.Debian |  2 +-
+ keystone/files/mitaka/keystone.conf.Debian  |  6 +++---
+ keystone/files/newton/keystone.conf.Debian  |  6 +++---
+ keystone/files/ocata/keystone.conf.Debian   |  6 +++---
+ keystone/files/ocata/keystone.conf.RedHat   |  6 +++---
+ keystone/files/pike/keystone.conf.Debian    |  6 +++---
+ keystone/files/pike/keystone.conf.RedHat    |  6 +++---
+ keystone/meta/salt.yml                      |  2 +-
+ keystone/meta/sphinx.yml                    |  2 +-
+ keystone/server.sls                         | 10 +++++-----
+ 15 files changed, 45 insertions(+), 38 deletions(-)
+
+--- a/keystone/client/project.sls
++++ b/keystone/client/project.sls
+@@ -20,7 +20,7 @@
+   - require:
+     - file: keystone_salt_config
+ 
+-{%- for tenant_name, tenant in client.get('tenant', {}).iteritems() %}
++{%- for tenant_name, tenant in client.get('tenant', {}).items() %}
+ 
+ keystone_tenant_{{ tenant_name }}:
+   keystone.tenant_present:
+@@ -32,7 +32,7 @@
+   - require:
+     - keystone: keystone_client_roles
+ 
+-{%- for user_name, user in tenant.get('user', {}).iteritems() %}
++{%- for user_name, user in tenant.get('user', {}).items() %}
+ 
+ keystone_{{ tenant_name }}_user_{{ user_name }}:
+   keystone.user_present:
+--- a/keystone/client/server.sls
++++ b/keystone/client/server.sls
+@@ -1,7 +1,7 @@
+ {%- from "keystone/map.jinja" import client with context %}
+ {%- if client.enabled %}
+ 
+-{%- for server_name, server in client.get('server', {}).iteritems() %}
++{%- for server_name, server in client.get('server', {}).items() %}
+ 
+ {%- if server.admin.get('api_version', '2') == '3' %}
+ {%- set version = "v3" %}
+@@ -43,7 +43,7 @@
+ 
+ {%- endif %}
+ 
+-{% for service_name, service in server.get('service', {}).iteritems() %}
++{% for service_name, service in server.get('service', {}).items() %}
+ 
+ keystone_{{ server_name }}_service_{{ service_name }}:
+   keystone.service_present:
+@@ -85,7 +85,7 @@
+ 
+ {%- endfor %}
+ 
+-{%- for tenant_name, tenant in server.get('project', {}).iteritems() %}
++{%- for tenant_name, tenant in server.get('project', {}).items() %}
+ 
+ keystone_{{ server_name }}_tenant_{{ tenant_name }}:
+   keystone.tenant_present:
+@@ -103,7 +103,7 @@
+   - connection_auth_url: {{ connection_args.auth_url }}
+   {%- endif %}
+ 
+-{%- for user_name, user in tenant.get('user', {}).iteritems() %}
++{%- for user_name, user in tenant.get('user', {}).items() %}
+ 
+ keystone_{{ server_name }}_tenant_{{ tenant_name }}_user_{{ user_name }}:
+   keystone.user_present:
+--- a/keystone/control.sls
++++ b/keystone/control.sls
+@@ -1,5 +1,5 @@
+ {%- from "keystone/map.jinja" import control with context %}
+-{%- for provider_name, provider in control.get('provider', {}).iteritems() %}
++{%- for provider_name, provider in control.get('provider', {}).items() %}
+ 
+ /root/keystonerc_{{ provider_name }}:
+   file.managed:
+--- a/keystone/files/kilo/keystone.conf.Debian
++++ b/keystone/files/kilo/keystone.conf.Debian
+@@ -713,7 +713,7 @@
+ # There is nothing special about this domain, other than the fact that it must
+ # exist to order to maintain support for your v2 clients. (string value)
+ {%- if server.get('domain', {}) %}
+-{%- for name, domain in server.domain.iteritems() %}
++{%- for name, domain in server.domain.items() %}
+ {%- if domain.get('default', False) %}
+ default_domain_id = {{ name }}
+ {%- endif %}
+--- a/keystone/files/liberty/keystone.conf.Debian
++++ b/keystone/files/liberty/keystone.conf.Debian
+@@ -858,7 +858,7 @@
+ # There is nothing special about this domain, other than the fact that it must
+ # exist to order to maintain support for your v2 clients. (string value)
+ {%- if server.get('domain', {}) %}
+-{%- for name, domain in server.domain.iteritems() %}
++{%- for name, domain in server.domain.items() %}
+ {%- if domain.get('default', False) %}
+ default_domain_id = {{ name }}
+ {%- endif %}
+--- a/keystone/files/mitaka/keystone.conf.Debian
++++ b/keystone/files/mitaka/keystone.conf.Debian
+@@ -913,7 +913,7 @@
+ # exist to order to maintain support for your v2 clients. (string value)
+ #default_domain_id = default
+ {%- if server.get('domain', {}) %}
+-{%- for name, domain in server.domain.iteritems() %}
++{%- for name, domain in server.domain.items() %}
+ {%- if domain.get('default', False) %}
+ default_domain_id = {{ name }}
+ {%- endif %}
+--- a/keystone/meta/sphinx.yml
++++ b/keystone/meta/sphinx.yml
+@@ -41,7 +41,7 @@
+           value: {{ server.database.user }}@{{ server.database.host }}:3306/{{ server.database.name }}
+         services:
+           value: |
+-            {%- for service_name, service in server.get('service', {}).iteritems() %}
++            {%- for service_name, service in server.get('service', {}).items() %}
+             * {{ service_name }}: {{ service.type }}, publicurl '{{ service.bind.get('public_protocol', 'http') }}://{{ service.bind.public_address }}:{{ service.bind.public_port }}{{ service.bind.public_path }}'
+             {%- endfor %}
+         packages:
+--- a/keystone/server.sls
++++ b/keystone/server.sls
+@@ -103,7 +103,7 @@
+     - require:
+       - pkg: keystone_packages
+ 
+-{%- for domain_name, domain in server.domain.iteritems() %}
++{%- for domain_name, domain in server.domain.items() %}
+ 
+ /etc/keystone/domains/keystone.{{ domain_name }}.conf:
+   file.managed:
+@@ -272,7 +272,7 @@
+ 
+ {%- endif %}
+ 
+-{%- for service_name, service in server.get('service', {}).iteritems() %}
++{%- for service_name, service in server.get('service', {}).items() %}
+ 
+ keystone_{{ service_name }}_service:
+   keystone.service_present:
+@@ -317,7 +317,7 @@
+ 
+ {%- endfor %}
+ 
+-{%- for tenant_name, tenant in server.get('tenant', {}).iteritems() %}
++{%- for tenant_name, tenant in server.get('tenant', {}).items() %}
+ 
+ keystone_tenant_{{ tenant_name }}:
+   keystone.tenant_present:
+@@ -327,7 +327,7 @@
+   - require:
+     - keystone: keystone_roles
+ 
+-{%- for user_name, user in tenant.get('user', {}).iteritems() %}
++{%- for user_name, user in tenant.get('user', {}).items() %}
+ 
+ keystone_user_{{ user_name }}:
+   keystone.user_present:
diff -Nru salt-formula-keystone-2016.12.1/debian/patches/series salt-formula-keystone-2016.12.1/debian/patches/series
--- salt-formula-keystone-2016.12.1/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ salt-formula-keystone-2016.12.1/debian/patches/series	2018-02-15 00:32:43.000000000 +0100
@@ -0,0 +1 @@
+0001-Support-Python-3.patch

Reply via email to