[Freeipa-devel] [freeipa PR#195][opened] [WIP] Make ipaclient pip install-able

2016-10-27 Thread tiran
   URL: https://github.com/freeipa/freeipa/pull/195
Author: tiran
 Title: #195: [WIP] Make ipaclient pip install-able
Action: opened

PR body:
"""
This makes ipaclient and dependencies pip install-able by adding install 
requirements to all ```setup.py```. A new make target ```bdist_wheel``` creates 
wheel distributions.

## example
```
$ make bdist_wheel
$ cp ../custodia/dist/custodia-0.2-py2.py3-none-any.whl dist/
$ virtualenv /tmp/ipaenv
New python executable in /tmp/ipaenv/bin/python2
Also creating executable in /tmp/ipaenv/bin/python
Installing setuptools, pip, wheel...done.
$ /tmp/ipaenv/bin/pip install dist/*.whl
Processing ./dist/custodia-0.2-py2.py3-none-any.whl
Processing ./dist/ipaclient-4.4.90.201610271437GITd812266-py2.py3-none-any.whl
Processing ./dist/ipalib-4.4.90.201610271437GITd812266-py2.py3-none-any.whl
Processing ./dist/ipaplatform-4.4.90.201610271437GITd812266-py2.py3-none-any.whl
Processing ./dist/ipapython-4.4.90.201610271437GITd812266-py2.py3-none-any.whl
 
...
 
Installing collected packages: configparser, requests, six, idna, pycparser, 
cffi, pyasn1, enum34, ipaddress, cryptography, jwcrypto, custodia, qrcode, 
python-nss, ipaplatform, netaddr, lxml, pyldap, netifaces, decorator, gssapi, 
dnspython, ipapython, ipalib, ipaclient
  Running setup.py install for python-nss ... done
Successfully installed cffi-1.8.3 configparser-3.5.0 cryptography-1.5.2 
custodia-0.2 decorator-4.0.10 dnspython-1.15.0 enum34-1.1.6 gssapi-1.2.0 
idna-2.1 ipaclient-4.4.90.201610271437GITd812266 ipaddress-1.0.17 
ipalib-4.4.90.201610271437GITd812266 ipaplatform-4.4.90.201610271437GITd812266 
ipapython-4.4.90.201610271437GITd812266 jwcrypto-0.3.1 lxml-3.6.4 
netaddr-0.7.18 netifaces-0.10.5 pyasn1-0.1.9 pycparser-2.16 pyldap-2.4.25.1 
python-nss-1.0.0 qrcode-5.3 requests-2.11.1 six-1.10.0
```

## open problems

- [ ] Custodia is not yet released on PyPI (to be released soon)
- [ ] dependencies are duplicated in setup.py and RPM spec
- [ ] ipaplatform hard-codes the distribution on build time
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/195/head:pr195
git checkout pr195
From d8122663b5c9d8c992eec66f21a54be002840029 Mon Sep 17 00:00:00 2001
From: Christian Heimes 
Date: Thu, 27 Oct 2016 14:04:58 +0200
Subject: [PATCH] Add install requirements to Python packages

Signed-off-by: Christian Heimes 
---
 Makefile  | 12 +++-
 ipaclient/setup.cfg   |  4 
 ipaclient/setup.py| 11 +++
 ipalib/setup.cfg  |  4 
 ipalib/setup.py   |  8 
 ipaplatform/setup.cfg |  4 
 ipaplatform/setup.py  |  7 +++
 ipapython/setup.cfg   |  4 
 ipapython/setup.py| 17 +
 ipaserver/setup.cfg   |  4 
 ipaserver/setup.py| 25 -
 ipasetup.py.in| 24 
 ipatests/setup.cfg|  4 
 ipatests/setup.py | 23 ++-
 14 files changed, 148 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 761b57d..be775d3 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,7 @@ SUBDIRS=util asn1 daemons install ipapython ipalib
 CLIENTDIRS=ipapython ipalib client util asn1
 CLIENTPYDIRS=ipaclient ipaplatform
 PYPKGDIRS=$(CLIENTPYDIRS) ipalib ipapython ipaserver ipatests
+WHEELS=$(CLIENTPYDIRS) ipalib ipapython
 
 PRJ_PREFIX=freeipa
 
@@ -166,13 +167,22 @@ ipasetup.py: ipasetup.py.in FORCE
 	sed -e s/__VERSION__/$(IPA_VERSION)/ $< > $@
 
 .PHONY: egg_info
-egg_info: ipapython/version.py ipaplatform/__init__.py ipasetup.py
+egg_info: bootstrap-autogen ipapython/version.py ipasetup.py
 	for directory in $(PYPKGDIRS); do \
 	pushd $${directory} ; \
 	$(PYTHON) setup.py egg_info $(EXTRA_SETUP); \
 	popd ; \
 	done
 
+.PHONY: bdist_wheel
+bdist_wheel: egg_info
+	rm -f dist/*.whl
+	for directory in $(WHEELS); do \
+	pushd $${directory} ; \
+	$(PYTHON) setup.py bdist_wheel; \
+	popd ; \
+	done
+
 version-update: release-update ipapython/version.py ipasetup.py
 	sed -e s/__VERSION__/$(IPA_VERSION)/ -e s/__RELEASE__/$(IPA_RPM_RELEASE)/ \
 		freeipa.spec.in > freeipa.spec
diff --git a/ipaclient/setup.cfg b/ipaclient/setup.cfg
index 34abb12..666b750 100644
--- a/ipaclient/setup.cfg
+++ b/ipaclient/setup.cfg
@@ -1,4 +1,8 @@
+[sdist]
+dist-dir = ../dist
+
 [bdist_wheel]
+dist-dir = ../dist
 universal = 1
 
 [metadata]
diff --git a/ipaclient/setup.py b/ipaclient/setup.py
index 32778b0..6d12171 100644
--- a/ipaclient/setup.py
+++ b/ipaclient/setup.py
@@ -42,4 +42,15 @@
 "ipaclient.remote_plugins.2_156",
 "ipaclient.remote_plugins.2_164",
 ],
+install_requires=[
+"cryptography",
+"ipalib",
+"ipapython",
+"python-nss",
+"qrcode",
+"six",
+],
+extra_requires = {
+"otptoken_yubikey": ["yubico", "usb"]
+}
 )
diff --git a/ipalib/setup.cfg b/ipalib/setup.cfg

[Freeipa-devel] [freeipa PR#196][opened] ipatests: unresolvable nested netgroups

2016-10-27 Thread apophys
   URL: https://github.com/freeipa/freeipa/pull/196
Author: apophys
 Title: #196: ipatests: unresolvable nested netgroups
Action: opened

PR body:
"""
Adds a test case for issue in SSSD that manifested in
an inability to resolve nested membership in netgroups

The test case tests for direct and indirect membership.

https://fedorahosted.org/freeipa/ticket/6439
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/196/head:pr196
git checkout pr196
From 92f114d7b93fe13c4f9f6d06a02916aa8cb00cf5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Milan=20Kub=C3=ADk?= 
Date: Wed, 26 Oct 2016 13:41:02 +
Subject: [PATCH] ipatests: unresolvable nested netgroups

Adds a test case for issue in SSSD that manifested in
an inability to resolve nested membership in netgroups

The test case tests for direct and indirect membership.

https://fedorahosted.org/freeipa/ticket/6439
---
 ipatests/test_xmlrpc/test_netgroup_plugin.py | 113 +++
 1 file changed, 113 insertions(+)

diff --git a/ipatests/test_xmlrpc/test_netgroup_plugin.py b/ipatests/test_xmlrpc/test_netgroup_plugin.py
index b6f004e..42bc579 100644
--- a/ipatests/test_xmlrpc/test_netgroup_plugin.py
+++ b/ipatests/test_xmlrpc/test_netgroup_plugin.py
@@ -26,8 +26,10 @@
 from ipatests.test_xmlrpc.xmlrpc_test import (Declarative, fuzzy_digits,
   fuzzy_uuid, fuzzy_netgroupdn)
 from ipatests.test_xmlrpc import objectclasses
+from ipatests.test_xmlrpc.tracker.user_plugin import UserTracker
 from ipapython.dn import DN
 from ipatests.test_xmlrpc.test_user_plugin import get_user_result
+from ipatests.util import run
 import pytest
 
 # Global so we can save the value between tests
@@ -1408,3 +1410,114 @@ class test_netgroup(Declarative):
 ## and even which user gets into which triple can be random.
 #assert '(nosuchhost,jexample,example.com)' in triples
 #assert '(ipatesthost.%s,pexample,example.com)' % api.env.domain in triples
+
+
+@pytest.fixture(scope='function')
+def netgroup_test1(request):
+name = u'netgroup-test-1'
+
+def ng_cleanup():
+api.Command.netgroup_del(name)
+
+request.addfinalizer(ng_cleanup)
+
+api.Command.netgroup_add(name)
+return name
+
+
+@pytest.fixture(scope='function')
+def netgroup_test2(request):
+name = u'netgroup-test-2'
+
+def ng_cleanup():
+api.Command.netgroup_del(name)
+request.addfinalizer(ng_cleanup)
+
+api.Command.netgroup_add(name)
+return name
+
+
+@pytest.fixture(scope='function')
+def netgroup_test3(request):
+name = u'netgroup-test-3'
+
+def ng_cleanup():
+api.Command.netgroup_del(name)
+request.addfinalizer(ng_cleanup)
+
+api.Command.netgroup_add(name)
+return name
+
+
+@pytest.fixture(scope='function')
+def netgroup_user1(request):
+tr = UserTracker(u'ng_user_1', u'ng', u'user')
+
+return tr.make_fixture(request)
+
+
+@pytest.fixture(scope='function')
+def netgroup_user2(request):
+tr = UserTracker(u'ng_user_2', u'ng', u'user')
+
+return tr.make_fixture(request)
+
+
+@pytest.fixture(scope='function')
+def netgroup_user3(request):
+tr = UserTracker(u'ng_user_3', u'ng', u'user')
+
+return tr.make_fixture(request)
+
+
+def test_netgroup_nested_groups(
+netgroup_test1, netgroup_test2, netgroup_test3,
+netgroup_user1, netgroup_user2, netgroup_user3):
+"""Test resolution of nested netgroup membership
+
+The test sets up a chain of netgroups with user members in
+each of the groups. Then the membership is evaluated on each
+group, expecting the membership of users in nested groups to be
+propagated into parent groups.
+"""
+
+netgroup_user1.create()
+netgroup_user2.create()
+netgroup_user3.create()
+
+# Prepare the nested netgroup hierarchy
+api.Command.netgroup_add_member(netgroup_test1, netgroup=netgroup_test2)
+api.Command.netgroup_add_member(netgroup_test2, netgroup=netgroup_test3)
+
+# Add an user to each group
+api.Command.netgroup_add_member(netgroup_test1, user=netgroup_user1.name)
+api.Command.netgroup_add_member(netgroup_test2, user=netgroup_user2.name)
+api.Command.netgroup_add_member(netgroup_test3, user=netgroup_user3.name)
+
+# Clean the sssd cache
+run(['sudo', 'sss_cache', '-E'], raiseonerr=False)
+
+# Call getent for each group and check if the users are in the right groups
+
+# Expected results: getent output in form (-,USERNAME,DOMAIN)
+# where the DOMAIN part is the nisDomainName of the netgroup
+nisdomain = (
+api.Command.netgroup_show(netgroup_test1)['result']['nisdomainname'][0]
+)
+
+ng_rec_tmpl = '(-,{user},{domain})'
+ng_rec_u1 = ng_rec_tmpl.format(user=netgroup_user1.name, domain=nisdomain)
+ng_rec_u2 = ng_rec_tmpl.format(user=netgroup_user2.name, domain=nisdomain)
+ng_rec_u3 = ng_rec_tmpl.format(user=netgroup_user3.name, domai

[Freeipa-devel] [freeipa PR#166][comment] WebUI: services without canonical name are shown correctly

2016-10-27 Thread pvoborni
  URL: https://github.com/freeipa/freeipa/pull/166
Title: #166: WebUI: services without canonical name are shown correctly

pvoborni commented:
"""
Works for me. Code look OK. I have only one minor nitpick: name of the adaper. 
Current is `SearchTableColumnFieldAdapter` imho better would be e.g. 
`AlternateAttrFieldAdapter`. I.e., to describe function and not place of use. 
IMO it can be even placed in field.js

If you don't want to address that then ACK.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/166#issuecomment-256652549
-- 
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] Github: rebases and commits order

2016-10-27 Thread Martin Basti
FYI: when you change order of commits using `git rebase` github doesn't 
respect this and shows commits in UI based on author date ordering.


https://github.com/isaacs/github/issues/386


It is just for your information, we started using bigger amount of 
commits and surprise, surprise UI shows commits in PR almost random 
order due rebases (git show works fine locally).


ipatool has been already fixed to push in correct order (please pull the 
latest version)



Martin^2

--
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] [freeipa PR#188][comment] Move Python egg-info to top level directory

2016-10-27 Thread tiran
  URL: https://github.com/freeipa/freeipa/pull/188
Title: #188: Move Python egg-info to top level directory

tiran commented:
"""
I have changed the PR a bit

* dist and build are no longer moved
* as discussed on IRC ```freeipa.egg-info``` is now ```ipaserver.egg-info```. 
pkg_resource assumes that a egg-info directory has the same prefix as a package 
directory.
* I added a egg_info command plugin based on 
https://blog.kevin-brown.com/programming/2014/09/24/combining-autotools-and-setuptools.html
 . My variant uses the distutils API properly and corrects a bug with 
```install_egg_info``` plugin.
* ipasetup now calculates the package root path based on the path of setup.py. 
This should be enough to enable VPATH out-of-tree builds.
* By default the egg-info directories are in the top-level project dir or on 
top_builddir. For in-tree tests the egg-info directories must be in sys.path in 
order to register entry points correctly, see PR #187 
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/188#issuecomment-256635536
-- 
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] [freeipa PR#188][synchronized] Move Python build artefacts to top level directory

2016-10-27 Thread tiran
   URL: https://github.com/freeipa/freeipa/pull/188
Author: tiran
 Title: #188: Move Python build artefacts to top level directory
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/188/head:pr188
git checkout pr188
From c01ca1a9b10e89afc29b7f747cfdb1c248bb2faf Mon Sep 17 00:00:00 2001
From: Christian Heimes 
Date: Wed, 26 Oct 2016 12:33:07 +0200
Subject: [PATCH] Move egg-info to support out-of-tree builds

The egg-info directories are now created in build root. For in-place
builds the build root is the project root. For out-of-tree builds it's
$(buildir)/build/../.., which is the same as $(top_builddir) for all
Python projects.

Signed-off-by: Christian Heimes 
---
 .gitignore   |  3 +--
 Makefile |  3 ++-
 freeipa.spec.in  |  2 +-
 ipaclient/setup.py   |  2 +-
 ipalib/setup.py  |  2 +-
 ipaplatform/setup.py |  2 +-
 ipapython/setup.py   |  2 +-
 ipaserver/setup.py   |  4 ++--
 ipasetup.py.in   | 31 ++-
 ipatests/setup.py|  2 +-
 10 files changed, 41 insertions(+), 12 deletions(-)

diff --git a/.gitignore b/.gitignore
index ac69f97..4c113f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,12 +39,11 @@ freeipa2-dev-doc
 /freeipa.spec
 !/Makefile
 /dist/
-/*/dist/
 /RELEASE
 /rpmbuild/
 # Build
 /ipasetup.py
-*.egg-info
+/*.egg-info
 
 # Subdirectories
 /daemons/ipa-otpd/ipa-otpd
diff --git a/Makefile b/Makefile
index 761b57d..3e82ce7 100644
--- a/Makefile
+++ b/Makefile
@@ -131,6 +131,7 @@ pylint: bootstrap-autogen
 	FILES=`find . \
 		-type d -exec test -e '{}/__init__.py' \; -print -prune -o \
 		-path '*/.*' -o \
+		-path '*/build/*' -o \
 		-path './dist/*' -o \
 		-path './lextab.py' -o \
 		-path './yacctab.py' -o \
@@ -166,7 +167,7 @@ ipasetup.py: ipasetup.py.in FORCE
 	sed -e s/__VERSION__/$(IPA_VERSION)/ $< > $@
 
 .PHONY: egg_info
-egg_info: ipapython/version.py ipaplatform/__init__.py ipasetup.py
+egg_info: ipapython/version.py ipasetup.py
 	for directory in $(PYPKGDIRS); do \
 	pushd $${directory} ; \
 	$(PYTHON) setup.py egg_info $(EXTRA_SETUP); \
diff --git a/freeipa.spec.in b/freeipa.spec.in
index 7d55a71..678661b 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -1127,7 +1127,7 @@ fi
 %defattr(-,root,root,-)
 %doc README Contributors.txt
 %license COPYING
-%{python_sitelib}/freeipa-*.egg-info
+%{python_sitelib}/ipaserver-*.egg-info
 %dir %{python_sitelib}/ipaserver
 %dir %{python_sitelib}/ipaserver/install
 %dir %{python_sitelib}/ipaserver/install/plugins
diff --git a/ipaclient/setup.py b/ipaclient/setup.py
index 32778b0..89501fd 100644
--- a/ipaclient/setup.py
+++ b/ipaclient/setup.py
@@ -32,7 +32,7 @@
 name="ipaclient",
 doc=__doc__,
 scripts=['../ipa'],
-package_dir={'ipaclient': ''},
+setupfile=__file__,
 packages=[
 "ipaclient",
 "ipaclient.plugins",
diff --git a/ipalib/setup.py b/ipalib/setup.py
index 982a783..be496dd 100644
--- a/ipalib/setup.py
+++ b/ipalib/setup.py
@@ -31,7 +31,7 @@
 ipasetup(
 name="ipalib",
 doc=__doc__,
-package_dir={'ipalib': ''},
+setupfile=__file__,
 packages=[
 "ipalib",
 ],
diff --git a/ipaplatform/setup.py b/ipaplatform/setup.py
index 82499da..ce1957d 100644
--- a/ipaplatform/setup.py
+++ b/ipaplatform/setup.py
@@ -31,7 +31,7 @@
 ipasetup(
 name="ipaplatform",
 doc=__doc__,
-package_dir={'ipaplatform': ''},
+setupfile=__file__,
 packages=[
 "ipaplatform",
 "ipaplatform.base",
diff --git a/ipapython/setup.py b/ipapython/setup.py
index 47acdd6..8b5a686 100755
--- a/ipapython/setup.py
+++ b/ipapython/setup.py
@@ -31,7 +31,7 @@
 ipasetup(
 name="ipapython",
 doc=__doc__,
-package_dir={'ipapython': ''},
+setupfile=__file__,
 packages=[
 "ipapython",
 "ipapython.dnssec",
diff --git a/ipaserver/setup.py b/ipaserver/setup.py
index e24e197..df1b1a3 100755
--- a/ipaserver/setup.py
+++ b/ipaserver/setup.py
@@ -31,9 +31,9 @@
 from ipasetup import ipasetup  # noqa: E402
 
 ipasetup(
-name='freeipa',
+name='ipaserver',
 doc=__doc__,
-package_dir={'ipaserver': ''},
+setupfile=__file__,
 packages=[
 'ipaserver',
 'ipaserver.advise',
diff --git a/ipasetup.py.in b/ipasetup.py.in
index f291d22..81a264b 100644
--- a/ipasetup.py.in
+++ b/ipasetup.py.in
@@ -15,9 +15,33 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see .
 #
+from __future__ import print_function
+
 import os
 import sys
 
+from setuptools.command.egg_info import egg_info as setuptools_egg_info
+
+
+class egg_info(setuptools_egg_info):
+def initialize_options(self):
+setuptools_egg_info.initialize_options(s

[Freeipa-devel] [freeipa PR#188][synchronized] Move Python build artefacts to top level directory

2016-10-27 Thread tiran
   URL: https://github.com/freeipa/freeipa/pull/188
Author: tiran
 Title: #188: Move Python build artefacts to top level directory
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/188/head:pr188
git checkout pr188
From 919b7e81c4786ad841308238ccfdad78f762d872 Mon Sep 17 00:00:00 2001
From: Christian Heimes 
Date: Wed, 26 Oct 2016 12:33:07 +0200
Subject: [PATCH] Move egg-info to support out-of-tree builds

The egg-info directories are now created in build root. For in-place
builds the build root is the project root. For out-of-tree builds it's
$(buildir)/build/../.., which is the same as $(top_builddir) for all
Python projects.

Signed-off-by: Christian Heimes 
---
 .gitignore|  3 +--
 Makefile  |  3 ++-
 freeipa.spec.in   |  2 +-
 ipaclient/setup.cfg   |  4 
 ipaclient/setup.py|  2 +-
 ipalib/setup.cfg  |  4 
 ipalib/setup.py   |  2 +-
 ipaplatform/setup.cfg |  4 
 ipaplatform/setup.py  |  2 +-
 ipapython/setup.cfg   |  4 
 ipapython/setup.py|  2 +-
 ipaserver/setup.cfg   |  4 
 ipaserver/setup.py|  4 ++--
 ipasetup.py.in| 33 -
 ipatests/setup.cfg|  4 
 ipatests/setup.py |  2 +-
 16 files changed, 67 insertions(+), 12 deletions(-)

diff --git a/.gitignore b/.gitignore
index ac69f97..4c113f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,12 +39,11 @@ freeipa2-dev-doc
 /freeipa.spec
 !/Makefile
 /dist/
-/*/dist/
 /RELEASE
 /rpmbuild/
 # Build
 /ipasetup.py
-*.egg-info
+/*.egg-info
 
 # Subdirectories
 /daemons/ipa-otpd/ipa-otpd
diff --git a/Makefile b/Makefile
index 761b57d..3e82ce7 100644
--- a/Makefile
+++ b/Makefile
@@ -131,6 +131,7 @@ pylint: bootstrap-autogen
 	FILES=`find . \
 		-type d -exec test -e '{}/__init__.py' \; -print -prune -o \
 		-path '*/.*' -o \
+		-path '*/build/*' -o \
 		-path './dist/*' -o \
 		-path './lextab.py' -o \
 		-path './yacctab.py' -o \
@@ -166,7 +167,7 @@ ipasetup.py: ipasetup.py.in FORCE
 	sed -e s/__VERSION__/$(IPA_VERSION)/ $< > $@
 
 .PHONY: egg_info
-egg_info: ipapython/version.py ipaplatform/__init__.py ipasetup.py
+egg_info: ipapython/version.py ipasetup.py
 	for directory in $(PYPKGDIRS); do \
 	pushd $${directory} ; \
 	$(PYTHON) setup.py egg_info $(EXTRA_SETUP); \
diff --git a/freeipa.spec.in b/freeipa.spec.in
index 7d55a71..678661b 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -1127,7 +1127,7 @@ fi
 %defattr(-,root,root,-)
 %doc README Contributors.txt
 %license COPYING
-%{python_sitelib}/freeipa-*.egg-info
+%{python_sitelib}/ipaserver-*.egg-info
 %dir %{python_sitelib}/ipaserver
 %dir %{python_sitelib}/ipaserver/install
 %dir %{python_sitelib}/ipaserver/install/plugins
diff --git a/ipaclient/setup.cfg b/ipaclient/setup.cfg
index 34abb12..666b750 100644
--- a/ipaclient/setup.cfg
+++ b/ipaclient/setup.cfg
@@ -1,4 +1,8 @@
+[sdist]
+dist-dir = ../dist
+
 [bdist_wheel]
+dist-dir = ../dist
 universal = 1
 
 [metadata]
diff --git a/ipaclient/setup.py b/ipaclient/setup.py
index 32778b0..89501fd 100644
--- a/ipaclient/setup.py
+++ b/ipaclient/setup.py
@@ -32,7 +32,7 @@
 name="ipaclient",
 doc=__doc__,
 scripts=['../ipa'],
-package_dir={'ipaclient': ''},
+setupfile=__file__,
 packages=[
 "ipaclient",
 "ipaclient.plugins",
diff --git a/ipalib/setup.cfg b/ipalib/setup.cfg
index 34abb12..666b750 100644
--- a/ipalib/setup.cfg
+++ b/ipalib/setup.cfg
@@ -1,4 +1,8 @@
+[sdist]
+dist-dir = ../dist
+
 [bdist_wheel]
+dist-dir = ../dist
 universal = 1
 
 [metadata]
diff --git a/ipalib/setup.py b/ipalib/setup.py
index 982a783..be496dd 100644
--- a/ipalib/setup.py
+++ b/ipalib/setup.py
@@ -31,7 +31,7 @@
 ipasetup(
 name="ipalib",
 doc=__doc__,
-package_dir={'ipalib': ''},
+setupfile=__file__,
 packages=[
 "ipalib",
 ],
diff --git a/ipaplatform/setup.cfg b/ipaplatform/setup.cfg
index 34abb12..666b750 100644
--- a/ipaplatform/setup.cfg
+++ b/ipaplatform/setup.cfg
@@ -1,4 +1,8 @@
+[sdist]
+dist-dir = ../dist
+
 [bdist_wheel]
+dist-dir = ../dist
 universal = 1
 
 [metadata]
diff --git a/ipaplatform/setup.py b/ipaplatform/setup.py
index 82499da..ce1957d 100644
--- a/ipaplatform/setup.py
+++ b/ipaplatform/setup.py
@@ -31,7 +31,7 @@
 ipasetup(
 name="ipaplatform",
 doc=__doc__,
-package_dir={'ipaplatform': ''},
+setupfile=__file__,
 packages=[
 "ipaplatform",
 "ipaplatform.base",
diff --git a/ipapython/setup.cfg b/ipapython/setup.cfg
index 34abb12..666b750 100644
--- a/ipapython/setup.cfg
+++ b/ipapython/setup.cfg
@@ -1,4 +1,8 @@
+[sdist]
+dist-dir = ../dist
+
 [bdist_wheel]
+dist-dir = ../dist
 universal = 1
 
 [metadata]
diff --git a/ipapython/setup.py b/ipapython/setup.py
index 47acdd6..8b5a686 100755
--- a/ipapython/setup.py
+++ b/ipapython/setup.py
@@ -31,7 +31,7 @@

[Freeipa-devel] [freeipa PR#189][closed] Create relative symbol links

2016-10-27 Thread tiran
   URL: https://github.com/freeipa/freeipa/pull/189
Author: tiran
 Title: #189: Create relative symbol links
Action: closed

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/189/head:pr189
git checkout pr189
-- 
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] [freeipa PR#188][synchronized] Move Python build artefacts to top level directory

2016-10-27 Thread tiran
   URL: https://github.com/freeipa/freeipa/pull/188
Author: tiran
 Title: #188: Move Python build artefacts to top level directory
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/188/head:pr188
git checkout pr188
From a5c55c4dc93545129972ab1278e0eb1897c1f128 Mon Sep 17 00:00:00 2001
From: Christian Heimes 
Date: Wed, 26 Oct 2016 12:33:07 +0200
Subject: [PATCH] Move egg-info to support out-of-tree builds

The egg-info directories are now created in build root. For in-place
builds the build root is the project root. For out-of-tree builds it's
$(buildir)/build/../.., which is the same as $(top_builddir) for all
Python projects.

Signed-off-by: Christian Heimes 
---
 .gitignore|  3 +--
 Makefile  |  3 ++-
 ipaclient/setup.cfg   |  4 
 ipaclient/setup.py|  2 +-
 ipalib/setup.cfg  |  4 
 ipalib/setup.py   |  2 +-
 ipaplatform/setup.cfg |  4 
 ipaplatform/setup.py  |  2 +-
 ipapython/setup.cfg   |  4 
 ipapython/setup.py|  2 +-
 ipaserver/setup.cfg   |  4 
 ipaserver/setup.py|  4 ++--
 ipasetup.py.in| 33 -
 ipatests/setup.cfg|  4 
 ipatests/setup.py |  2 +-
 15 files changed, 66 insertions(+), 11 deletions(-)

diff --git a/.gitignore b/.gitignore
index ac69f97..4c113f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,12 +39,11 @@ freeipa2-dev-doc
 /freeipa.spec
 !/Makefile
 /dist/
-/*/dist/
 /RELEASE
 /rpmbuild/
 # Build
 /ipasetup.py
-*.egg-info
+/*.egg-info
 
 # Subdirectories
 /daemons/ipa-otpd/ipa-otpd
diff --git a/Makefile b/Makefile
index 761b57d..3e82ce7 100644
--- a/Makefile
+++ b/Makefile
@@ -131,6 +131,7 @@ pylint: bootstrap-autogen
 	FILES=`find . \
 		-type d -exec test -e '{}/__init__.py' \; -print -prune -o \
 		-path '*/.*' -o \
+		-path '*/build/*' -o \
 		-path './dist/*' -o \
 		-path './lextab.py' -o \
 		-path './yacctab.py' -o \
@@ -166,7 +167,7 @@ ipasetup.py: ipasetup.py.in FORCE
 	sed -e s/__VERSION__/$(IPA_VERSION)/ $< > $@
 
 .PHONY: egg_info
-egg_info: ipapython/version.py ipaplatform/__init__.py ipasetup.py
+egg_info: ipapython/version.py ipasetup.py
 	for directory in $(PYPKGDIRS); do \
 	pushd $${directory} ; \
 	$(PYTHON) setup.py egg_info $(EXTRA_SETUP); \
diff --git a/ipaclient/setup.cfg b/ipaclient/setup.cfg
index 34abb12..666b750 100644
--- a/ipaclient/setup.cfg
+++ b/ipaclient/setup.cfg
@@ -1,4 +1,8 @@
+[sdist]
+dist-dir = ../dist
+
 [bdist_wheel]
+dist-dir = ../dist
 universal = 1
 
 [metadata]
diff --git a/ipaclient/setup.py b/ipaclient/setup.py
index 32778b0..89501fd 100644
--- a/ipaclient/setup.py
+++ b/ipaclient/setup.py
@@ -32,7 +32,7 @@
 name="ipaclient",
 doc=__doc__,
 scripts=['../ipa'],
-package_dir={'ipaclient': ''},
+setupfile=__file__,
 packages=[
 "ipaclient",
 "ipaclient.plugins",
diff --git a/ipalib/setup.cfg b/ipalib/setup.cfg
index 34abb12..666b750 100644
--- a/ipalib/setup.cfg
+++ b/ipalib/setup.cfg
@@ -1,4 +1,8 @@
+[sdist]
+dist-dir = ../dist
+
 [bdist_wheel]
+dist-dir = ../dist
 universal = 1
 
 [metadata]
diff --git a/ipalib/setup.py b/ipalib/setup.py
index 982a783..be496dd 100644
--- a/ipalib/setup.py
+++ b/ipalib/setup.py
@@ -31,7 +31,7 @@
 ipasetup(
 name="ipalib",
 doc=__doc__,
-package_dir={'ipalib': ''},
+setupfile=__file__,
 packages=[
 "ipalib",
 ],
diff --git a/ipaplatform/setup.cfg b/ipaplatform/setup.cfg
index 34abb12..666b750 100644
--- a/ipaplatform/setup.cfg
+++ b/ipaplatform/setup.cfg
@@ -1,4 +1,8 @@
+[sdist]
+dist-dir = ../dist
+
 [bdist_wheel]
+dist-dir = ../dist
 universal = 1
 
 [metadata]
diff --git a/ipaplatform/setup.py b/ipaplatform/setup.py
index 82499da..ce1957d 100644
--- a/ipaplatform/setup.py
+++ b/ipaplatform/setup.py
@@ -31,7 +31,7 @@
 ipasetup(
 name="ipaplatform",
 doc=__doc__,
-package_dir={'ipaplatform': ''},
+setupfile=__file__,
 packages=[
 "ipaplatform",
 "ipaplatform.base",
diff --git a/ipapython/setup.cfg b/ipapython/setup.cfg
index 34abb12..666b750 100644
--- a/ipapython/setup.cfg
+++ b/ipapython/setup.cfg
@@ -1,4 +1,8 @@
+[sdist]
+dist-dir = ../dist
+
 [bdist_wheel]
+dist-dir = ../dist
 universal = 1
 
 [metadata]
diff --git a/ipapython/setup.py b/ipapython/setup.py
index 47acdd6..8b5a686 100755
--- a/ipapython/setup.py
+++ b/ipapython/setup.py
@@ -31,7 +31,7 @@
 ipasetup(
 name="ipapython",
 doc=__doc__,
-package_dir={'ipapython': ''},
+setupfile=__file__,
 packages=[
 "ipapython",
 "ipapython.dnssec",
diff --git a/ipaserver/setup.cfg b/ipaserver/setup.cfg
index 34abb12..666b750 100644
--- a/ipaserver/setup.cfg
+++ b/ipaserver/setup.cfg
@@ -1,4 +1,8 @@
+[sdist]
+dist-dir = ../dist
+
 [bdist_wheel]
+dist-dir = ../dist
 universal = 1
 
 [met

[Freeipa-devel] [freeipa PR#188][comment] Move Python build artefacts to top level directory

2016-10-27 Thread stlaz
  URL: https://github.com/freeipa/freeipa/pull/188
Title: #188: Move Python build artefacts to top level directory

stlaz commented:
"""
+1 with @pspacek, build artefacts should be in the same directory as is their 
source. I would like to have them removed on `make clean` if that does not 
currently work.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/188#issuecomment-256583611
-- 
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] [freeipa PR#192][synchronized] server-del: fix incorrect check for one IPA master

2016-10-27 Thread martbab
   URL: https://github.com/freeipa/freeipa/pull/192
Author: martbab
 Title: #192: server-del: fix incorrect check for one IPA master
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/192/head:pr192
git checkout pr192
From 26707441582547e908c222df78cc9a5eb6aafaaf Mon Sep 17 00:00:00 2001
From: Martin Babinsky 
Date: Wed, 26 Oct 2016 16:07:21 +0200
Subject: [PATCH] server-del: fix incorrect check for one IPA master

https://fedorahosted.org/freeipa/ticket/6417
---
 ipaserver/plugins/server.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipaserver/plugins/server.py b/ipaserver/plugins/server.py
index ec71dbc..ded7661 100644
--- a/ipaserver/plugins/server.py
+++ b/ipaserver/plugins/server.py
@@ -473,7 +473,7 @@ def handler(msg, ignore_last_of_role):
 ipa_masters = ipa_config['ipa_master_server']
 
 # skip these checks if the last master is being removed
-if ipa_masters == [hostname]:
+if len(ipa_masters) <= 1:
 return
 
 if self.api.Command.dns_is_enabled()['result']:
-- 
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