Re: [Freeipa-devel] [patch 0033] spec file: update the python-polib dependency name to python2-polib

2016-02-15 Thread Lukas Slebodnik
On (15/02/16 17:00), Petr Vobornik wrote:
>On 02/15/2016 04:37 PM, Milan Kubík wrote:
>>Reflect the updated name of the package.
>>
>
>Seems to me as a packaging bug in python-polib. It should use python_provide
>macro to handle the transition.
There is not a bug in python-polib

sh# rpm -q python2-polib
python2-polib-1.0.7-2.fc23.noarch

sh# rpm -q --provides python2-polib
python-polib = 1.0.7-2.fc23
python2-polib = 1.0.7-2.fc23

However it is a change in behaviour in dnf/yum.
You can see more details in BZ1291850 or better BZ1096506.

This a readon why "dnf builddep" will try to remove package.
(it's not downgrade from dnf point of view)

sh# dnf builddep freeipa.spec
Last metadata expiration check performed 0:17:37 ago on Mon Feb 15 16:19:14
2016.
Package python-setuptools-18.0.1-2.fc23.noarch is already installed, skipping.
Package systemd-222-10.fc23.x86_64 is already installed, skipping.
Package systemd-222-10.fc23.x86_64 is already installed, skipping.
Error: installed package python2-polib-1.0.7-2.fc23.noarch obsoletes
python-polib < 1.0.7-2.fc23 provided by python-polib-1.0.3-6.fc23.noarch
(try to add '--allowerasing' to command line to replace conflicting packages)


You might try to file a dnf BZ but mine 1291850 was two tiles closed as not a
but and then closed as a duplicate of another bug.

IMHO the simplest solution would to push the patch with better explanation
in's a workaround.

LSommit message becuase it's a workaround.

LS

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Re: [Freeipa-devel] [patch 0033] spec file: update the python-polib dependency name to python2-polib

2016-02-15 Thread Milan Kubík

On 02/15/2016 05:00 PM, Petr Vobornik wrote:

On 02/15/2016 04:37 PM, Milan Kubík wrote:

Reflect the updated name of the package.



Seems to me as a packaging bug in python-polib. It should use 
python_provide macro to handle the transition.

I will open a bug against it, then.

--
Milan Kubik

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Re: [Freeipa-devel] [patch 0033] spec file: update the python-polib dependency name to python2-polib

2016-02-15 Thread Petr Vobornik

On 02/15/2016 04:37 PM, Milan Kubík wrote:

Reflect the updated name of the package.



Seems to me as a packaging bug in python-polib. It should use 
python_provide macro to handle the transition.

--
Petr Vobornik

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


[Freeipa-devel] [patch 0034] ipatests: extend permission plugin test with new expected output

2016-02-15 Thread Milan Kubík

Patch attached. Applies on ipa-4-3 as well.

--
Milan Kubik

From 0f0433b360f65ffd4431948d1efed4428c39feae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Milan=20Kub=C3=ADk?= 
Date: Mon, 15 Feb 2016 16:54:34 +0100
Subject: [PATCH] ipatests: extend permission plugin test with new expected
 output

---
 ipatests/test_xmlrpc/test_permission_plugin.py | 16 
 1 file changed, 16 insertions(+)

diff --git a/ipatests/test_xmlrpc/test_permission_plugin.py b/ipatests/test_xmlrpc/test_permission_plugin.py
index 01294665814fc667f932272ee8bc3077583b67df..d641a2d078e0f275a44bbc539aef1352c023ae9b 100644
--- a/ipatests/test_xmlrpc/test_permission_plugin.py
+++ b/ipatests/test_xmlrpc/test_permission_plugin.py
@@ -816,6 +816,14 @@ class test_permission(Declarative):
 'ipapermlocation': [users_dn],
 },
 ],
+messages=(
+{
+'message': u'Search result has been truncated to configured search limit.',
+'code': 13017,
+'type': u'warning',
+'name': u'SearchResultTruncated'
+},
+),
 ),
 ),
 
@@ -871,6 +879,14 @@ class test_permission(Declarative):
 DN(res['dn']).endswith(DN(api.env.container_permission,
   api.env.basedn)) and
 'ipapermission' in res['objectclass']],
+messages=(
+{
+'message': u'Search result has been truncated to configured search limit.',
+'code': 13017,
+'type': u'warning',
+'name': u'SearchResultTruncated'
+},
+),
 ),
 ),
 
-- 
2.7.1

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [patch 0033] spec file: update the python-polib dependency name to python2-polib

2016-02-15 Thread Milan Kubík

Reflect the updated name of the package.

--
Milan Kubik

From 43d532107a150538246591b1999afc41bd43315e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Milan=20Kub=C3=ADk?= 
Date: Mon, 15 Feb 2016 15:54:40 +0100
Subject: [PATCH] spec file: update the python-polib dependency name to
 python2-polib

Trying to install the package depending on python-polib breaks
when the system has newer (and renamed) version python2-polib.
This patch removes the conflict.
---
 freeipa.spec.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/freeipa.spec.in b/freeipa.spec.in
index 54a11bfc8cced643c19c29c5ada70bacf7540395..b775eca8cb31e28660e057436b8aed438bdf8c87 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -77,7 +77,7 @@ BuildRequires:  python-gssapi >= 1.1.2
 BuildRequires:  python-rhsm
 BuildRequires:  pyOpenSSL
 BuildRequires:  pylint >= 1.0
-BuildRequires:  python-polib
+BuildRequires:  python2-polib
 BuildRequires:  python-libipa_hbac
 BuildRequires:  python-memcached
 BuildRequires:  python-lxml
@@ -562,7 +562,7 @@ Requires: python-nose
 Requires: pytest >= 2.6
 Requires: python-paste
 Requires: python-coverage
-Requires: python-polib
+Requires: python2-polib
 Requires: python-pytest-multihost >= 0.5
 Requires: python-pytest-sourceorder
 Requires: ldns-utils
-- 
2.7.1

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Re: [Freeipa-devel] [PATCH] 0005 webui: topology graph: canvas resizes itself according to the window size

2016-02-15 Thread Pavel Vomacka



On 02/12/2016 01:52 PM, Pavel Vomacka wrote:



On 02/11/2016 12:31 PM, Pavel Vomacka wrote:

Hello,

The canvas of the graph had static size. This patch fixes this issue 
and from now the graph canvas is resized according to the window size.


Pavel Vomacka


Because of changes in previous patch I'm sending also this one again. 
Plus I fixed some jslint warnings.


And again a link to the ticket: 
https://fedorahosted.org/freeipa/ticket/5647 .


--
Pavel^3 Vomacka


And another change in the code. This patch adds checking whether a svg 
element even exists. And don't add 'col-sm-12' class to the svg element 
any more. This class just added useless paddings to the element.


--
Pavel^3 Vomacka
>From 81fc60c8e7f0fee81c59ee77c62f5b2e2c6205be Mon Sep 17 00:00:00 2001
From: Pavel Vomacka 
Date: Tue, 9 Feb 2016 16:17:08 +0100
Subject: [PATCH] Resize topology graph canvas according to window size.

Calculate proper size of the svg element which contains the topology graph.
The svg element size is recalculated when the window is resized.

https://fedorahosted.org/freeipa/ticket/5647
---
 install/ui/src/freeipa/topology_graph.js | 37 +++-
 1 file changed, 32 insertions(+), 5 deletions(-)

diff --git a/install/ui/src/freeipa/topology_graph.js b/install/ui/src/freeipa/topology_graph.js
index 8d8876f9063abe20c4fbb7f13a490a6b9c12569b..0243ecbd2d0e1b95e629038c63b0a978041f5e3c 100644
--- a/install/ui/src/freeipa/topology_graph.js
+++ b/install/ui/src/freeipa/topology_graph.js
@@ -27,8 +27,6 @@ var topology_graph = {
  * @class
  */
 topology_graph.TopoGraph = declare([Evented], {
-width: 960,
-height: 500,
 _colors: d3.scale.category10(),
 _svg : null,
 _path: null,
@@ -62,6 +60,18 @@ topology_graph.TopoGraph = declare([Evented], {
  * @param  {HTMLElement} container container where to put the graph svg element
  */
 initialize: function(container) {
+var that = this;
+
+$(window).on('resize', function () {
+window.clearTimeout(this.delay);
+this.delay = window.setTimeout( function () {
+// Check whether a svg element exists.
+if ($('svg').length) {
+that._recalculate_svg_size();
+}
+}, 100);
+});
+
 this._create_svg(container);
 this.update(this.nodes, this.links, this.suffixes);
 return;
@@ -130,9 +140,26 @@ topology_graph.TopoGraph = declare([Evented], {
 
 _create_svg: function(container) {
 this._svg = d3.select(container[0]).
-append('svg').
-attr('width', this.width).
-attr('height', this.height);
+append('svg');
+
+this._recalculate_svg_size();
+},
+
+_recalculate_svg_size: function() {
+var space = parseInt($('.col-sm-12').css('paddingRight'), 10);
+
+// The right padding of col-sm-12 class is substracted from the height and the width
+// because we want to have the same space at the bottom and on the right side
+// as on the left side of the svg element.
+this.height = $(window).height() - $('svg').offset().top - space;
+this.width = $(window).width() - $('svg').offset().left.toFixed(1) - space;
+
+// Negative numbers cause exceptions in counting position of the graph.
+if (this.height >= 0 && this.width >= 0) {
+this._svg
+.attr("width", this.width)
+.attr("height", this.height);
+}
 },
 
 _init_layout: function() {
-- 
2.5.0

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code