[Freeipa-devel] [freeipa PR#169][+ack] Replace ipaplatform's symlinks with __path__

2016-10-19 Thread pspacek
  URL: https://github.com/freeipa/freeipa/pull/169
Title: #169: Replace ipaplatform's symlinks with __path__

Label: +ack
-- 
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#171][comment] Build system cleanup phase 2

2016-10-19 Thread pspacek
  URL: https://github.com/freeipa/freeipa/pull/171
Title: #171: Build system cleanup phase 2

pspacek commented:
"""
@lslebodn Decision if we need client_only build is still open. We may drop it 
so reimplementing it would be busy work.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/171#issuecomment-255023841
-- 
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#162][closed] Certificate processing refactoring

2016-10-19 Thread frasertweedale
   URL: https://github.com/freeipa/freeipa/pull/162
Author: frasertweedale
 Title: #162: Certificate processing refactoring
Action: closed

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/162/head:pr162
git checkout pr162
-- 
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#162][comment] Certificate processing refactoring

2016-10-19 Thread frasertweedale
  URL: https://github.com/freeipa/freeipa/pull/162
Title: #162: Certificate processing refactoring

frasertweedale commented:
"""
Closing PR (will retarget to @dkupka's refactoring-certificates staging branch.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/162#issuecomment-255014837
-- 
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#173][opened] Ensure correct IPA CA nickname in DS and HTTP NSSDBs

2016-10-19 Thread frasertweedale
   URL: https://github.com/freeipa/freeipa/pull/173
Author: frasertweedale
 Title: #173: Ensure correct IPA CA nickname in DS and HTTP NSSDBs
Action: opened

PR body:
"""
During replica installation, if the IPA deployment has a custom
subject_base, the routines that create the DS and HTTP NSSDBs
erroneously compare the subject of CA certs to the *default* subject
base. This causes the IPA CA cert to be added to the NSSDBs with a
nickname derived from the subject name, instead of "{REALM} IPA CA".

At a later stage of installation, the `upload_cacrt` plugin reads
certs from the HTTP NSSDB in order to update the cn=certificates
LDAP certstore.  The NSSDB nickname of the cert is used as the CN
for the entry.  Because the IPA CA cert was not installed in the
HTTP NSSDB with the "{REALM} IPA CA", this causes a spurious entry
for the IPA CA to be added to the certstore.

To avoid this scenario, use the deployment's actual subject base
when deciding if a cert is the IPA CA cert.

Fixes: https://fedorahosted.org/freeipa/ticket/6415
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/173/head:pr173
git checkout pr173
From 1b52c2f7dda2bac6de2157c08205b03d6a04e847 Mon Sep 17 00:00:00 2001
From: Fraser Tweedale 
Date: Thu, 20 Oct 2016 14:42:17 +1000
Subject: [PATCH] Ensure correct IPA CA nickname in DS and HTTP NSSDBs

During replica installation, if the IPA deployment has a custom
subject_base, the routines that create the DS and HTTP NSSDBs
erroneously compare the subject of CA certs to the *default* subject
base. This causes the IPA CA cert to be added to the NSSDBs with a
nickname derived from the subject name, instead of "{REALM} IPA CA".

At a later stage of installation, the `upload_cacrt` plugin reads
certs from the HTTP NSSDB in order to update the cn=certificates
LDAP certstore.  The NSSDB nickname of the cert is used as the CN
for the entry.  Because the IPA CA cert was not installed in the
HTTP NSSDB with the "{REALM} IPA CA", this causes a spurious entry
for the IPA CA to be added to the certstore.

To avoid this scenario, use the deployment's actual subject base
when deciding if a cert is the IPA CA cert.

Fixes: https://fedorahosted.org/freeipa/ticket/6415
---
 ipaserver/install/dsinstance.py| 2 +-
 ipaserver/install/server/replicainstall.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py
index aaaba07..cffbc28 100644
--- a/ipaserver/install/dsinstance.py
+++ b/ipaserver/install/dsinstance.py
@@ -1247,7 +1247,7 @@ def __get_ds_keytab(self):
 os.chown(paths.DS_KEYTAB, pent.pw_uid, pent.pw_gid)
 
 def __get_ds_cert(self):
-subject = DN(('O', self.realm))
+subject = self.subject_base or DN(('O', self.realm))
 nssdb_dir = config_dirname(self.serverid)
 db = certs.CertDB(self.realm, nssdir=nssdb_dir, subject_base=subject)
 db.request_service_cert(self.nickname, self.principal, self.fqdn)
diff --git a/ipaserver/install/server/replicainstall.py b/ipaserver/install/server/replicainstall.py
index 6c9f598..3f161bb 100644
--- a/ipaserver/install/server/replicainstall.py
+++ b/ipaserver/install/server/replicainstall.py
@@ -93,7 +93,7 @@ def install_http_certs(config, fstore, remote_api):
 
 # Obtain certificate for the HTTP service
 nssdir = certs.NSS_DIR
-subject = DN(('O', config.realm_name))
+subject = config.subject_base or DN(('O', config.realm_name))
 db = certs.CertDB(config.realm_name, nssdir=nssdir, subject_base=subject)
 db.request_service_cert('Server-Cert', principal, config.host_name, True)
 # FIXME: need Signing-Cert too ?
-- 
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] [help]

2016-10-19 Thread 郑磊
comments inline.





--
祝:
工作顺利!生活愉快!
--
长沙研发中心 郑磊 
Phone:18684703229
Email:zheng...@kylinos.cn
Company:天津麒麟信息技术有限公司
Address:湖南长沙市开福区三一大道工美大厦十四楼
 

 
 
 
-- Original --
From:  "Martin Basti";
Date:  Wed, Oct 19, 2016 07:56 PM
To:  "郑磊"; "freeipa-devel"; 

Subject:  Re: [Freeipa-devel] [help]

 
   
Comments inline
 
 
 On 19.10.2016 10:30, 郑磊 wrote:
 
 
   
  
 
 
 
 --
   祝:
 工作顺利!生活愉快!
 --
 长沙研发中心 郑磊 
 Phone:18684703229
 Email:zheng...@kylinos.cn
 Company:天津麒麟信息技术有限公司
 Address:湖南长沙市开福区三一大道工美大厦十四楼
   
 

   

-- Original --
From:  "Martin 
Basti";
   Date:  Wed, Oct 19, 2016 04:03 PM
   To:  "郑磊"; 
"freeipa-devel"; 
   Subject:  Re: [Freeipa-devel] [help]
 
  
 

 
 
 On 19.10.2016 03:35, 郑磊 wrote:
 
 Hello,
   In the process of using freeipa, we found a lot of content   
without Chinese translation. In order to we can better use  
 the platform, 
  we made a Chinese translation. Sorry but I don't see 
any updates in zanata 
https://fedora.zanata.org/iteration/view/freeipa/master/languages/zh-CN?dswid=-4750
 
 If you do a custom/manual translations this will not scale 
and you will do the same every release
 
 
 I have applied to join Chinese translation organization in 
zanata https://fedora.zanata.org/language/view/zh-CN?dswid=2727,
 but there is no reply. And I have tried to translate in zanata 
https://fedora.zanata.org/iteration/view/freeipa/master/languages/zh-CN?dswid=-4750,
 But there seems to be no permission to modify. Whether I   
  need to put the translation file zh_CN.po to create pull request 
against freeipa/freeipa on github?
 
  
 No please don't, we always generate .po files from zanata before 
releases, so all changes are overwritten
 
 Ok, let me know how the adding you to zanata continue, if nobody will 
answer for longer time, I can put you just to freeIPA project as translator.

Ok, Thx! If  there is still no respond in zanata for a period of time, I 
will contact you again.
 
   
 
 
  I think the translation work for freeipa   
internationalization promotion also can have certain help.   In 
addition, in use process, we found that when test the   
corresponding function of operation in the Web interface   is not a 
straightforward logging which needs to query in   the background, 
and it may not be intuitive and   convenient. In order to we can 
intuitively record what we   have done the operation in the Web 
interface, we do the   log module plug-ins. 
   

 
   
  webUI is just layer on top of our API calls.
 
 
 I know, What I mean is that no matter we are in API calls  
   mode to manipulate freeipa or Web UI way, we all can intuitive 
see clearly under the log module. The log module function is to 
record any of our operation.
 
 
   
 
  I think that they can be many caveats (access control, replication,   
  etc.) maybe would be good to see your code (you can send PR) how is you 
current implementation.

Ok, I organize the content first, you'll create a pull request against 
freeipa/freeipa on github later.
 
 Martin

   
   
   --
 祝:
   工作顺利!生活愉快!
   --
   长沙研发中心 郑磊 
   Phone:18684703229
   Email:zheng...@kylinos.cn
   Company:天津麒麟信息技术有限公司
   Address:湖南长沙市开福区三一大道工美大厦十四楼
 
   

 
  
-- Original 
--
From:  "Martin 
Basti";
 Date: 

Re: [Freeipa-devel] Karma Requests for pki-core-10.3.5-7 and pki-console-10.3.5-2

2016-10-19 Thread Matthew Harmsen

On 10/11/2016 01:12 PM, Matthew Harmsen wrote:
*The following updated candidate builds of pki-core 10.3.5 and 
pki-console 10.3.5 were generated:*


  * *Fedora 24*
  o *pki-core-10.3.5-7.fc24
*
  o *pki-console-10.3.5-2.fc24

*
  * *Fedora 25*
  o *pki-core-10.3.5-7.fc25
*
  o *pki-console-10.3.5-2.fc25

*
  * *Fedora 26*
  o *pki-core-10.3.5-7.fc26 (still working on build issues
encountered on rawhide)*


 * *pki-core-10.3.5-7.fc26
   **
   *


  o *pki-console-10.3.5-2.fc26
*

*Additionally, the CentOS 7 COPR EPEL Builds of Dogtag 10.3.3 were 
also updated:*


  * 
*https://copr.fedorainfracloud.org/coprs/g/pki/epel-7.3/repo/epel-7/group_pki-epel-7.3-epel-7.repo*



[group_pki-epel-7.3]
name=Copr repo for epel-7.3 owned by @pki

baseurl=https://copr-be.cloud.fedoraproject.org/results/@pki/epel-7.3/epel-7-$basearch/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1

gpgkey=https://copr-be.cloud.fedoraproject.org/results/@pki/epel-7.3/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1

*These builds address the following PKI tickets:*

  * PKI TRAC Ticket #1527 - TPS Enrollment always goes to "ca1" (cfu)

  * PKI TRAC Ticket #1664 - [BUG] Add ability to disallow TPS to
enroll a single user on multiple tokens. (jmagne)

  * PKI TRAC Ticket #2463 - Troubleshooting improvements (edewata)

  o potentially more to come in future releases
  * PKI TRAC Ticket #2466 - two-step externally-signed CA installation
fails due to missing AuthorityID (ftweedal)

  * PKI TRAC Ticket #2475 - Multiple host authority entries created
(ftweedal) 
  * PKI TRAC Ticket #2476 - Dogtag Miscellaneous Minor Changes
(edewata) 
  o potentially more to come in future releases
  * PKI TRAC Ticket #2478 - pkispawn fails as it is not able to find
openssl as a dependency package (mharmsen)

  * PKI TRAC Ticket #2483 - Unable to read an encrypted email using
renewed tokens (jmagne) 
  * PKI TRAC Ticket #2496 - Cert/Key recovery is successful when the
cert serial number and key id on the ldap user mismatches (cfu)

  * PKI TRAC Ticket #2497 - KRA installation failed against
externally-signed CA with partial certificate chain (edewata)

  * PKI TRAC Ticket #2505 - Fix packaging duplicates of classes in
multiple jar files (edewata)


*Please provide Karma for the following builds:*

  * *Fedora 24*
  o *https://bodhi.fedoraproject.org/updates/FEDORA-2016-76fae7b25f
pki-core-10.3.5-7.fc24
*
  o *https://bodhi.fedoraproject.org/updates/FEDORA-2016-a9e6c42783
pki-console-10.3.5-2.fc24
*
  * *Fedora 25*
  o *https://bodhi.fedoraproject.org/updates/FEDORA-2016-3496056579
   pki-core-10.3.5-7.fc25*
  o *https://bodhi.fedoraproject.org/updates/FEDORA-2016-70b3b8b697
pki-console-10.3.5-2.fc25

*



-- 
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#159][comment] spec file: clean up BuildRequires

2016-10-19 Thread stlaz
  URL: https://github.com/freeipa/freeipa/pull/159
Title: #159: spec file: clean up BuildRequires

stlaz commented:
"""
@martbab Thanks, that worked. However, first set of patches was not yet ACKed 
in https://github.com/freeipa/freeipa/pull/171.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/159#issuecomment-254843561
-- 
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#159][-ack] spec file: clean up BuildRequires

2016-10-19 Thread stlaz
  URL: https://github.com/freeipa/freeipa/pull/159
Title: #159: spec file: clean up BuildRequires

Label: -ack
-- 
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#159][comment] spec file: clean up BuildRequires

2016-10-19 Thread stlaz
  URL: https://github.com/freeipa/freeipa/pull/159
Title: #159: spec file: clean up BuildRequires

stlaz commented:
"""
@martbab Thanks, that worked. ACK.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/159#issuecomment-254843561
-- 
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#171][-ack] Build system cleanup phase 2

2016-10-19 Thread dkupka
  URL: https://github.com/freeipa/freeipa/pull/171
Title: #171: Build system cleanup phase 2

Label: -ack
-- 
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] Limiting pull request notification sizes

2016-10-19 Thread Martin Basti



On 19.10.2016 16:38, Petr Vobornik wrote:

Looking at: [Freeipa-devel] [freeipa PR#171][synchronized] Build system
cleanup phase 2

I see that the attached freeipa-pr-171.patch has 7.8 MB. With couple
forced pushed to the private branch it creates quite big traffic a takes
space.

Is it possible to limit sizes of these attachments to let's say 50KB?

I.e., I would be interested in the small patches but let's read the
large ones on GitHub.


It is possible, you can:

*) open issue against freeipa/freeipa-tools
or
*) sent PR against freeipa/freeipa-tools

PS: github will not show you the big patches :D you have to use git show

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#159][+ack] spec file: clean up BuildRequires

2016-10-19 Thread stlaz
  URL: https://github.com/freeipa/freeipa/pull/159
Title: #159: spec file: clean up BuildRequires

Label: +ack
-- 
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#171][comment] Build system cleanup phase 2

2016-10-19 Thread lslebodn
  URL: https://github.com/freeipa/freeipa/pull/171
Title: #171: Build system cleanup phase 2

lslebodn commented:
"""
BTW I am really interested in how do you plan to implement client only build.

IMHO it would be much simpler include reduced version of daemon/configure.ac 
(+others)
into top level configure.ac rather then creating if/else branches in huge long 
unified configured.ac 
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/171#issuecomment-254843953
-- 
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] [Test][Patch-0047] Added a test for Ticket N 5964

2016-10-19 Thread Oleg Fayans

Hi Martin,

Thanks for the review. Fixed both issues.

$ ipa-run-tests test_integration/test_topology.py -k TestCASpecificRUVs
WARNING: Couldn't write lextab module 'pycparser.lextab'. [Errno 13] 
Permission denied: 'lextab.py'

WARNING: yacc table file version is out of date
WARNING: Couldn't create 'pycparser.yacctab'. [Errno 13] Permission 
denied: 'yacctab.py'
 
test session starts 
=

platform linux2 -- Python 2.7.11, pytest-2.9.2, py-1.4.31, pluggy-0.3.1
rootdir: /usr/lib/python2.7/site-packages/ipatests, inifile: pytest.ini
plugins: sourceorder-0.5, multihost-1.0
collected 5 items

test_integration/test_topology.py ..

 
2 passed in 2444.84 seconds 
=



On 10/17/2016 07:05 PM, Martin Basti wrote:

1)

you don't need to disable/enable dirsrv, just stop/start. Please remove
disable/enable parts


2)




traceback





self = 

def test_delete_ruvs(self):
"""
http://www.freeipa.org/page/V4/Manage_replication_topology_4_4/
Test_Plan#Test_case:_clean-ruv_subcommand
"""
replica = self.replicas[0]
master = self.master
res1 = master.run_command(['ipa-replica-manage', 'list-ruv', '-p',
  master.config.dirman_password])

  assert(res1.stdout_text.count(replica.hostname) == 2 and

   "Certificate Server Replica Update Vectors" in res1), (
"CA-specific RUVs are not displayed")
E   TypeError: argument of type 'SSHCommand' is not iterable

test_integration/test_topology.py:215: TypeError



entering PDB







/usr/lib/python2.7/site-packages/ipatests/test_integration/test_topology.py(215)test_delete_ruvs()


-> assert(res1.stdout_text.count(replica.hostname) == 2 and



On 14.10.2016 11:36, Oleg Fayans wrote:

Right you are! I am sorry.

On 10/13/2016 06:10 PM, Martin Basti wrote:

I think that you forgot to squash commits. Patch 47 doesn't apply


On 13.10.2016 14:01, Oleg Fayans wrote:

Hi Martin,

Thanks for the review.
With disabling directory server it works as well, thanks for the hint.
Also I moved the cleanup logic to the test itself for the sake of
simplicity. Patch-0048 was not changed

On 10/12/2016 02:35 PM, Martin Basti wrote:

1)

Can you just turn off dirsrv on replica instead of doing iptables
magic?


2) NACK

No more eval() ever in code, use 'getattr', 'get' or whatever in the
object that can be used.

+evalhost = eval("args[0].%s" % host)

Martin^2

On 12.10.2016 14:03, Oleg Fayans wrote:

Hi Martin,

After extensive discussion with Ludwig, I finally got the clue on how
does this feature work. When we uninstall the replica, the master
cleans the replication agreements with this replica and automatically
cleans all replica's RUVs.
If we clean replica's RUVs on master without uninstalling the
replica,
the replica's RUVs get recreated on master (replication works!). So,
the only way to test the clean-ruv subcommand is to turn off the
replica, or block the traffic on it so it gets inaccessible to
updates
from master.
The testcases were updated, see [1] and [2]

The updated versions of the patches are attached

[1]
http://www.freeipa.org/page/V4/Manage_replication_topology_4_4/Test_Plan#Test_case:_.2A-ruv_subcommands_of_ipa-replica-manage_are_extended_to_handle_CA-specific_RUVs




[2]
http://www.freeipa.org/page/V4/Manage_replication_topology_4_4/Test_Plan#Test_case:_clean-ruv_subcommand




On 08/05/2016 06:36 PM, Martin Basti wrote:



On 03.08.2016 14:45, Oleg Fayans wrote:

Hi Martin,

Thanks for the review! Both patches were updated.

On 07/28/2016 04:11 PM, Martin Basti wrote:



On 08.07.2016 15:41, Oleg Fayans wrote:

Hi Martin,

Thanks for the review!

On 07/08/2016 02:18 PM, Martin Basti wrote:



On 27.06.2016 13:53, Oleg Fayans wrote:

Hi guys,

Is there a chance the patches NN 0047.1 and 0048.1 get reviewed
before
4.4 release? They cover a good part of the Managed Topology 4.4
feature.

On 06/17/2016 11:18 AM, Oleg Fayans wrote:

One more test was added to the patch-0048

On 06/17/2016 09:43 AM, Oleg Fayans wrote:

Fixed a bug in the previous patch, automated 2 more testcases
from
http://www.freeipa.org/page/V4/Manage_replication_topology_4_4/Test_Plan







On 06/16/2016 04:46 PM, Oleg Fayans wrote:










IIUC, this will turn off the machine completely, how is cleanup
done
then.  AFAIK our tests cannot turn on machine again and run
cleanup, so
you will not be able to run more tests on the same topology
without
manual cleanup and manual start.

+replica = self.replicas[0]
+replica.run_command(['poweroff'])

IMO would be better to just call 'ipactl stop' instead of
'poweroff'


Agreed! Fixed.



Martin^2

[Freeipa-devel] [freeipa PR#171][comment] Build system cleanup phase 2

2016-10-19 Thread lslebodn
  URL: https://github.com/freeipa/freeipa/pull/171
Title: #171: Build system cleanup phase 2

lslebodn commented:
"""
I see you need to increase patch_count and not to have proper review
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/171#issuecomment-254820687
-- 
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] Limiting pull request notification sizes

2016-10-19 Thread Petr Vobornik
Looking at: [Freeipa-devel] [freeipa PR#171][synchronized] Build system
cleanup phase 2

I see that the attached freeipa-pr-171.patch has 7.8 MB. With couple
forced pushed to the private branch it creates quite big traffic a takes
space.

Is it possible to limit sizes of these attachments to let's say 50KB?

I.e., I would be interested in the small patches but let's read the
large ones on GitHub.
-- 
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] [freeipa PR#165][+ack] Tests: Verify that cert-find show CA without --all

2016-10-19 Thread tomaskrizek
  URL: https://github.com/freeipa/freeipa/pull/165
Title: #165: Tests: Verify that cert-find show CA without --all

Label: +ack
-- 
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#165][comment] Tests: Verify that cert-find show CA without --all

2016-10-19 Thread tomaskrizek
  URL: https://github.com/freeipa/freeipa/pull/165
Title: #165: Tests: Verify that cert-find show CA without --all

tomaskrizek commented:
"""
Ticket/commit msg seems to be correct now.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/165#issuecomment-254822204
-- 
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#132][synchronized] Draft for a new setup.py (WIP)

2016-10-19 Thread tiran
   URL: https://github.com/freeipa/freeipa/pull/132
Author: tiran
 Title: #132: Draft for a new setup.py (WIP)
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/132/head:pr132
git checkout pr132
From 6973e69e17cdee5816ab81f31fd7385b86dfed33 Mon Sep 17 00:00:00 2001
From: Christian Heimes 
Date: Tue, 4 Oct 2016 13:23:22 +0200
Subject: [PATCH] Draft for a new setup.py

Signed-off-by: Christian Heimes 
---
 .gitignore  | 11 ++
 MANIFEST.in |  2 -
 Makefile| 66 +++--
 ipaclient/setup.cfg |  5 +++
 ipaclient/setup.py  | 44 ++
 ipaclient/setup.py.in   | 80 
 ipalib/Makefile |  2 +-
 ipalib/setup.cfg|  5 +++
 ipalib/setup.py | 38 +++
 ipalib/setup.py.in  | 71 
 ipaplatform/setup.cfg   |  5 +++
 ipaplatform/setup.py| 42 +
 ipaplatform/setup.py.in | 79 
 ipapython/MANIFEST.in   |  2 -
 ipapython/Makefile  |  2 +-
 ipapython/setup.cfg |  5 +++
 ipapython/setup.py  | 44 ++
 ipapython/setup.py.in   | 79 
 ipasetup.py.in  | 71 
 ipatests/setup.cfg  |  5 +++
 ipatests/setup.py   | 60 ++
 ipatests/setup.py.in| 97 -
 setup.cfg   |  5 +++
 setup.py|  8 ++--
 24 files changed, 377 insertions(+), 451 deletions(-)
 delete mode 100644 MANIFEST.in
 create mode 100644 ipaclient/setup.cfg
 create mode 100644 ipaclient/setup.py
 delete mode 100644 ipaclient/setup.py.in
 create mode 100644 ipalib/setup.cfg
 create mode 100644 ipalib/setup.py
 delete mode 100644 ipalib/setup.py.in
 create mode 100644 ipaplatform/setup.cfg
 create mode 100644 ipaplatform/setup.py
 delete mode 100644 ipaplatform/setup.py.in
 delete mode 100644 ipapython/MANIFEST.in
 create mode 100644 ipapython/setup.cfg
 create mode 100755 ipapython/setup.py
 delete mode 100755 ipapython/setup.py.in
 create mode 100644 ipasetup.py.in
 create mode 100644 ipatests/setup.cfg
 create mode 100644 ipatests/setup.py
 delete mode 100644 ipatests/setup.py.in
 create mode 100644 setup.cfg

diff --git a/.gitignore b/.gitignore
index 61054de..37b8004 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,8 +39,12 @@ freeipa2-dev-doc
 /freeipa.spec
 !/Makefile
 /dist/
+/*/dist/
 /RELEASE
 /rpmbuild/
+# Build
+/ipasetup.py
+*.egg-info
 
 # Subdirectories
 /daemons/ipa-otpd/ipa-otpd
@@ -64,19 +68,12 @@ freeipa2-dev-doc
 /client/ipa-join
 /client/ipa-rmkeytab
 
-/ipatests/setup.py
-
-/ipaclient/setup.py
-
-/ipalib/setup.py
 !/ipalib/Makefile
 
-/ipapython/setup.py
 /ipapython/version.py
 !/ipapython/Makefile
 
 /ipaplatform/__init__.py
-/ipaplatform/setup.py
 /ipaplatform/tasks.py
 /ipaplatform/services.py
 /ipaplatform/paths.py
diff --git a/MANIFEST.in b/MANIFEST.in
deleted file mode 100644
index dd76e10..000
--- a/MANIFEST.in
+++ /dev/null
@@ -1,2 +0,0 @@
-include COPYING TODO lite-server.py
-include tests/*/*.py
diff --git a/Makefile b/Makefile
index 6324308..324086d 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,7 @@ include VERSION
 SUBDIRS=asn1 daemons install ipapython ipalib
 CLIENTDIRS=ipapython ipalib client asn1
 CLIENTPYDIRS=ipaclient ipaplatform
+PYPKGDIRS=$(CLIENTPYDIRS) ipalib ipapython ipatests
 
 PRJ_PREFIX=freeipa
 
@@ -74,6 +75,10 @@ all: bootstrap-autogen server tests
 		(cd $$subdir && $(MAKE) $@) || exit 1; \
 	done
 
+# empty target to force executation
+.PHONY=FORCE
+FORCE:
+
 client: client-autogen
 	@for subdir in $(CLIENTDIRS); do \
 		(cd $$subdir && $(MAKE) all) || exit 1; \
@@ -161,31 +166,45 @@ test:
 release-update:
 	if [ ! -e RELEASE ]; then echo 0 > RELEASE; fi
 
-version-update: release-update
+ipapython/version.py: ipapython/version.py.in FORCE
+	sed -e s/__VERSION__/$(IPA_VERSION)/ $< > $@
+	sed -i -e "s:__NUM_VERSION__:$(IPA_NUM_VERSION):" $@
+	sed -i -e "s:__VENDOR_VERSION__:$(IPA_VENDOR_VERSION):" $@
+	sed -i -e "s:__API_VERSION__:$(IPA_API_VERSION_MAJOR).$(IPA_API_VERSION_MINOR):" $@
+	grep -Po '(?<=default: ).*' API.txt | sed -n -i -e "/__DEFAULT_PLUGINS__/!{p;b};r /dev/stdin" $@
+	touch -r $< $@
+
+ipasetup.py: ipasetup.py.in FORCE
+	sed -e s/__VERSION__/$(IPA_VERSION)/ $< > $@
+
+ipaplatform/__init__.py: ipaplatform/__init__.py.in FORCE
+	if [ "$(SUPPORTED_PLATFORM)" != "" ]; then \
+		sed -e s/__PLATFORM__/$(SUPPORTED_PLATFORM)/ \
+			$< > $@; \
+		rm -f ipaplatform/paths.py ipaplatform/services.py ipaplatform/tasks.py ipaplatform/constants.py; \
+		ln -s $(SUPPORTED_PLATFORM)/paths.py ipaplatform/paths.py; \
+		ln -s $(SUPPORTED_PLATFORM)/services.py ipaplatform/services.py; \
+		ln -s $(SUPPORTED_PLATFORM)/tasks.py ipaplatform/tasks.py; \
+		ln -

[Freeipa-devel] [freeipa PR#132][synchronized] Draft for a new setup.py (WIP)

2016-10-19 Thread tiran
   URL: https://github.com/freeipa/freeipa/pull/132
Author: tiran
 Title: #132: Draft for a new setup.py (WIP)
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/132/head:pr132
git checkout pr132
From e85fd89e975d2491489e3eae8e7b347ec4490aff Mon Sep 17 00:00:00 2001
From: Christian Heimes 
Date: Tue, 4 Oct 2016 13:23:22 +0200
Subject: [PATCH] Draft for a new setup.py

Signed-off-by: Christian Heimes 
---
 .gitignore  | 13 +++
 MANIFEST.in |  2 -
 Makefile| 66 +++--
 ipaclient/setup.cfg |  5 +++
 ipaclient/setup.py  | 44 ++
 ipaclient/setup.py.in   | 80 
 ipalib/Makefile |  2 +-
 ipalib/setup.cfg|  5 +++
 ipalib/setup.py | 38 +++
 ipalib/setup.py.in  | 71 
 ipaplatform/setup.cfg   |  5 +++
 ipaplatform/setup.py| 42 +
 ipaplatform/setup.py.in | 79 
 ipapython/MANIFEST.in   |  2 -
 ipapython/Makefile  |  2 +-
 ipapython/setup.cfg |  5 +++
 ipapython/setup.py  | 44 ++
 ipapython/setup.py.in   | 79 
 ipasetup.py.in  | 71 
 ipatests/setup.cfg  |  5 +++
 ipatests/setup.py   | 60 ++
 ipatests/setup.py.in| 97 -
 setup.cfg   |  5 +++
 setup.py|  8 ++--
 24 files changed, 378 insertions(+), 452 deletions(-)
 delete mode 100644 MANIFEST.in
 create mode 100644 ipaclient/setup.cfg
 create mode 100644 ipaclient/setup.py
 delete mode 100644 ipaclient/setup.py.in
 create mode 100644 ipalib/setup.cfg
 create mode 100644 ipalib/setup.py
 delete mode 100644 ipalib/setup.py.in
 create mode 100644 ipaplatform/setup.cfg
 create mode 100644 ipaplatform/setup.py
 delete mode 100644 ipaplatform/setup.py.in
 delete mode 100644 ipapython/MANIFEST.in
 create mode 100644 ipapython/setup.cfg
 create mode 100755 ipapython/setup.py
 delete mode 100755 ipapython/setup.py.in
 create mode 100644 ipasetup.py.in
 create mode 100644 ipatests/setup.cfg
 create mode 100644 ipatests/setup.py
 delete mode 100644 ipatests/setup.py.in
 create mode 100644 setup.cfg

diff --git a/.gitignore b/.gitignore
index 61054de..9bdaa93 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,8 +39,12 @@ freeipa2-dev-doc
 /freeipa.spec
 !/Makefile
 /dist/
+/*/dist/
 /RELEASE
 /rpmbuild/
+# Build
+/ipasetup.py
+*.egg-info
 
 # Subdirectories
 /daemons/ipa-otpd/ipa-otpd
@@ -64,20 +68,13 @@ freeipa2-dev-doc
 /client/ipa-join
 /client/ipa-rmkeytab
 
-/ipatests/setup.py
-
-/ipaclient/setup.py
-
-/ipalib/setup.py
 !/ipalib/Makefile
 
-/ipapython/setup.py
 /ipapython/version.py
 !/ipapython/Makefile
 
 /ipaplatform/__init__.py
-/ipaplatform/setup.py
+/ipaplatform/constants.py
 /ipaplatform/tasks.py
 /ipaplatform/services.py
 /ipaplatform/paths.py
-/ipaplatform/constants.py
diff --git a/MANIFEST.in b/MANIFEST.in
deleted file mode 100644
index dd76e10..000
--- a/MANIFEST.in
+++ /dev/null
@@ -1,2 +0,0 @@
-include COPYING TODO lite-server.py
-include tests/*/*.py
diff --git a/Makefile b/Makefile
index 6324308..3ff25b0 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,7 @@ include VERSION
 SUBDIRS=asn1 daemons install ipapython ipalib
 CLIENTDIRS=ipapython ipalib client asn1
 CLIENTPYDIRS=ipaclient ipaplatform
+PYPKGDIRS=$(CLIENTPYDIRS) ipalib ipapython ipatests
 
 PRJ_PREFIX=freeipa
 
@@ -74,6 +75,10 @@ all: bootstrap-autogen server tests
 		(cd $$subdir && $(MAKE) $@) || exit 1; \
 	done
 
+# empty target to force executation
+.PHONY=FORCE
+FORCE:
+
 client: client-autogen
 	@for subdir in $(CLIENTDIRS); do \
 		(cd $$subdir && $(MAKE) all) || exit 1; \
@@ -161,31 +166,45 @@ test:
 release-update:
 	if [ ! -e RELEASE ]; then echo 0 > RELEASE; fi
 
-version-update: release-update
+ipapython/version.py: ipapython/version.py.in FORCE
+	sed -e s/__VERSION__/$(IPA_VERSION)/ $< > $@
+	sed -i -e "s:__NUM_VERSION__:$(IPA_NUM_VERSION):" $@
+	sed -i -e "s:__VENDOR_VERSION__:$(IPA_VENDOR_VERSION):" $@
+	sed -i -e "s:__API_VERSION__:$(IPA_API_VERSION_MAJOR).$(IPA_API_VERSION_MINOR):" $@
+	grep -Po '(?<=default: ).*' API.txt | sed -n -i -e "/__DEFAULT_PLUGINS__/!{p;b};r /dev/stdin" $@
+	touch -r $< $@
+
+ipasetup.py: ipasetup.py.in FORCE
+	sed -e s/__VERSION__/$(IPA_VERSION)/ $< > $@
+
+ipaplatform/__init__.py: ipaplatform/__init__.py.in FORCE
+	if [ "$(SUPPORTED_PLATFORM)" != "" ]; then \
+		sed -e s/__PLATFORM__/$(SUPPORTED_PLATFORM)/ \
+			$< > $@; \
+		rm -f ipaplatform/paths.py ipaplatform/services.py ipaplatform/tasks.py ipaplatform/constants.py; \
+		ln -s $(SUPPORTED_PLATFORM)/paths.py ipaplatform/paths.py; \
+		ln -s $(SUPPORTED_PLATFORM)/services.py ipaplatform/services.py; \
+		ln -s $(SUPPO

[Freeipa-devel] [freeipa PR#171][comment] Build system cleanup phase 2

2016-10-19 Thread mbasti-rh
  URL: https://github.com/freeipa/freeipa/pull/171
Title: #171: Build system cleanup phase 2

mbasti-rh commented:
"""
I see just bikeshading here, on IRC Petr1 agreed that this should be pushed and 
incrementally upgraded according our needs
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/171#issuecomment-254809761
-- 
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#132][synchronized] Draft for a new setup.py (WIP)

2016-10-19 Thread tiran
   URL: https://github.com/freeipa/freeipa/pull/132
Author: tiran
 Title: #132: Draft for a new setup.py (WIP)
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/132/head:pr132
git checkout pr132
From b21ed18d045e19d588ae9b42688daf2615eb9c7f Mon Sep 17 00:00:00 2001
From: Christian Heimes 
Date: Tue, 4 Oct 2016 13:23:22 +0200
Subject: [PATCH] Draft for a new setup.py

Signed-off-by: Christian Heimes 
---
 .gitignore  | 15 ++--
 MANIFEST.in |  2 -
 Makefile| 45 ++-
 ipaclient/setup.cfg |  5 +++
 ipaclient/setup.py  | 44 ++
 ipaclient/setup.py.in   | 80 
 ipalib/Makefile |  2 +-
 ipalib/setup.cfg|  5 +++
 ipalib/setup.py | 38 +++
 ipalib/setup.py.in  | 71 
 ipaplatform/setup.cfg   |  5 +++
 ipaplatform/setup.py| 42 +
 ipaplatform/setup.py.in | 79 
 ipapython/MANIFEST.in   |  2 -
 ipapython/Makefile  |  2 +-
 ipapython/setup.cfg |  5 +++
 ipapython/setup.py  | 44 ++
 ipapython/setup.py.in   | 79 
 ipasetup.py.in  | 71 
 ipatests/setup.cfg  |  5 +++
 ipatests/setup.py   | 60 ++
 ipatests/setup.py.in| 97 -
 setup.cfg   |  5 +++
 setup.py|  8 ++--
 24 files changed, 366 insertions(+), 445 deletions(-)
 delete mode 100644 MANIFEST.in
 create mode 100644 ipaclient/setup.cfg
 create mode 100644 ipaclient/setup.py
 delete mode 100644 ipaclient/setup.py.in
 create mode 100644 ipalib/setup.cfg
 create mode 100644 ipalib/setup.py
 delete mode 100644 ipalib/setup.py.in
 create mode 100644 ipaplatform/setup.cfg
 create mode 100644 ipaplatform/setup.py
 delete mode 100644 ipaplatform/setup.py.in
 delete mode 100644 ipapython/MANIFEST.in
 create mode 100644 ipapython/setup.cfg
 create mode 100755 ipapython/setup.py
 delete mode 100755 ipapython/setup.py.in
 create mode 100644 ipasetup.py.in
 create mode 100644 ipatests/setup.cfg
 create mode 100644 ipatests/setup.py
 delete mode 100644 ipatests/setup.py.in
 create mode 100644 setup.cfg

diff --git a/.gitignore b/.gitignore
index 61054de..e471371 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,8 +39,12 @@ freeipa2-dev-doc
 /freeipa.spec
 !/Makefile
 /dist/
+/*/dist/
 /RELEASE
 /rpmbuild/
+# Build
+/ipasetup.py
+*.egg-info
 
 # Subdirectories
 /daemons/ipa-otpd/ipa-otpd
@@ -64,20 +68,9 @@ freeipa2-dev-doc
 /client/ipa-join
 /client/ipa-rmkeytab
 
-/ipatests/setup.py
-
-/ipaclient/setup.py
-
-/ipalib/setup.py
 !/ipalib/Makefile
 
-/ipapython/setup.py
 /ipapython/version.py
 !/ipapython/Makefile
 
 /ipaplatform/__init__.py
-/ipaplatform/setup.py
-/ipaplatform/tasks.py
-/ipaplatform/services.py
-/ipaplatform/paths.py
-/ipaplatform/constants.py
diff --git a/MANIFEST.in b/MANIFEST.in
deleted file mode 100644
index dd76e10..000
--- a/MANIFEST.in
+++ /dev/null
@@ -1,2 +0,0 @@
-include COPYING TODO lite-server.py
-include tests/*/*.py
diff --git a/Makefile b/Makefile
index 6324308..4e6844b 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,7 @@ include VERSION
 SUBDIRS=asn1 daemons install ipapython ipalib
 CLIENTDIRS=ipapython ipalib client asn1
 CLIENTPYDIRS=ipaclient ipaplatform
+PYPKGDIRS=$(CLIENTPYDIRS) ipalib ipapython ipatests
 
 PRJ_PREFIX=freeipa
 
@@ -74,6 +75,10 @@ all: bootstrap-autogen server tests
 		(cd $$subdir && $(MAKE) $@) || exit 1; \
 	done
 
+# empty target to force executation
+.PHONY=FORCE
+FORCE:
+
 client: client-autogen
 	@for subdir in $(CLIENTDIRS); do \
 		(cd $$subdir && $(MAKE) all) || exit 1; \
@@ -161,31 +166,34 @@ test:
 release-update:
 	if [ ! -e RELEASE ]; then echo 0 > RELEASE; fi
 
-version-update: release-update
+ipapython/version.py: ipapython/version.py.in FORCE
+	sed -e s/__VERSION__/$(IPA_VERSION)/ $< > $@
+	sed -i -e "s:__NUM_VERSION__:$(IPA_NUM_VERSION):" $@
+	sed -i -e "s:__VENDOR_VERSION__:$(IPA_VENDOR_VERSION):" $@
+	sed -i -e "s:__API_VERSION__:$(IPA_API_VERSION_MAJOR).$(IPA_API_VERSION_MINOR):" $@
+	grep -Po '(?<=default: ).*' API.txt | sed -n -i -e "/__DEFAULT_PLUGINS__/!{p;b};r /dev/stdin" $@
+	touch -r $< $@
+
+ipasetup.py: ipasetup.py.in ipapython/version.py FORCE
+	sed -e s/__VERSION__/$(IPA_VERSION)/ $< > $@
+
+.PHONY: egg_info
+egg_info: ipasetup.py
+	$(PYTHON) setup.py egg_info $(EXTRA_SETUP)
+	for directory in $(PYPKGDIRS); do \
+	pushd $${directory} ; \
+	$(PYTHON) setup.py egg_info $(EXTRA_SETUP); \
+	popd ; \
+	done
+
+version-update: release-update ipapython/version.py ipasetup.py egg_info
 	sed -e s/__VERSION__/$(IPA_VERSION)/ -e s/__RELEASE__/$(IPA_RPM_RELEASE)/ \
 		freeipa.spec.in > freeipa.spec
 	sed -e s/__VERSION__/$

[Freeipa-devel] [freeipa PR#169][edited] Replace ipaplatform's symlinks with __path__

2016-10-19 Thread tiran
   URL: https://github.com/freeipa/freeipa/pull/169
Author: tiran
 Title: #169: Replace ipaplatform's symlinks with __path__
Action: edited

 Changed field: title
Original value:
"""
Replace ipaplatform's symlinks with a meta importer
"""

-- 
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#132][synchronized] Draft for a new setup.py (WIP)

2016-10-19 Thread tiran
   URL: https://github.com/freeipa/freeipa/pull/132
Author: tiran
 Title: #132: Draft for a new setup.py (WIP)
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/132/head:pr132
git checkout pr132
From 4de782d1aa48df9326d4c86c6c64939a1dbe7685 Mon Sep 17 00:00:00 2001
From: Christian Heimes 
Date: Tue, 4 Oct 2016 13:23:22 +0200
Subject: [PATCH] Draft for a new setup.py

Signed-off-by: Christian Heimes 
---
 .gitignore  | 11 ++
 MANIFEST.in |  2 -
 Makefile| 45 ++-
 ipaclient/setup.cfg |  5 +++
 ipaclient/setup.py  | 44 ++
 ipaclient/setup.py.in   | 80 
 ipalib/Makefile |  2 +-
 ipalib/setup.cfg|  5 +++
 ipalib/setup.py | 38 +++
 ipalib/setup.py.in  | 71 
 ipaplatform/setup.cfg   |  5 +++
 ipaplatform/setup.py| 42 +
 ipaplatform/setup.py.in | 79 
 ipapython/MANIFEST.in   |  2 -
 ipapython/Makefile  |  2 +-
 ipapython/setup.cfg |  5 +++
 ipapython/setup.py  | 44 ++
 ipapython/setup.py.in   | 79 
 ipasetup.py.in  | 71 
 ipatests/setup.cfg  |  5 +++
 ipatests/setup.py   | 60 ++
 ipatests/setup.py.in| 97 -
 setup.cfg   |  5 +++
 setup.py|  8 ++--
 24 files changed, 366 insertions(+), 441 deletions(-)
 delete mode 100644 MANIFEST.in
 create mode 100644 ipaclient/setup.cfg
 create mode 100644 ipaclient/setup.py
 delete mode 100644 ipaclient/setup.py.in
 create mode 100644 ipalib/setup.cfg
 create mode 100644 ipalib/setup.py
 delete mode 100644 ipalib/setup.py.in
 create mode 100644 ipaplatform/setup.cfg
 create mode 100644 ipaplatform/setup.py
 delete mode 100644 ipaplatform/setup.py.in
 delete mode 100644 ipapython/MANIFEST.in
 create mode 100644 ipapython/setup.cfg
 create mode 100755 ipapython/setup.py
 delete mode 100755 ipapython/setup.py.in
 create mode 100644 ipasetup.py.in
 create mode 100644 ipatests/setup.cfg
 create mode 100644 ipatests/setup.py
 delete mode 100644 ipatests/setup.py.in
 create mode 100644 setup.cfg

diff --git a/.gitignore b/.gitignore
index 61054de..37b8004 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,8 +39,12 @@ freeipa2-dev-doc
 /freeipa.spec
 !/Makefile
 /dist/
+/*/dist/
 /RELEASE
 /rpmbuild/
+# Build
+/ipasetup.py
+*.egg-info
 
 # Subdirectories
 /daemons/ipa-otpd/ipa-otpd
@@ -64,19 +68,12 @@ freeipa2-dev-doc
 /client/ipa-join
 /client/ipa-rmkeytab
 
-/ipatests/setup.py
-
-/ipaclient/setup.py
-
-/ipalib/setup.py
 !/ipalib/Makefile
 
-/ipapython/setup.py
 /ipapython/version.py
 !/ipapython/Makefile
 
 /ipaplatform/__init__.py
-/ipaplatform/setup.py
 /ipaplatform/tasks.py
 /ipaplatform/services.py
 /ipaplatform/paths.py
diff --git a/MANIFEST.in b/MANIFEST.in
deleted file mode 100644
index dd76e10..000
--- a/MANIFEST.in
+++ /dev/null
@@ -1,2 +0,0 @@
-include COPYING TODO lite-server.py
-include tests/*/*.py
diff --git a/Makefile b/Makefile
index 6324308..4e6844b 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,7 @@ include VERSION
 SUBDIRS=asn1 daemons install ipapython ipalib
 CLIENTDIRS=ipapython ipalib client asn1
 CLIENTPYDIRS=ipaclient ipaplatform
+PYPKGDIRS=$(CLIENTPYDIRS) ipalib ipapython ipatests
 
 PRJ_PREFIX=freeipa
 
@@ -74,6 +75,10 @@ all: bootstrap-autogen server tests
 		(cd $$subdir && $(MAKE) $@) || exit 1; \
 	done
 
+# empty target to force executation
+.PHONY=FORCE
+FORCE:
+
 client: client-autogen
 	@for subdir in $(CLIENTDIRS); do \
 		(cd $$subdir && $(MAKE) all) || exit 1; \
@@ -161,31 +166,34 @@ test:
 release-update:
 	if [ ! -e RELEASE ]; then echo 0 > RELEASE; fi
 
-version-update: release-update
+ipapython/version.py: ipapython/version.py.in FORCE
+	sed -e s/__VERSION__/$(IPA_VERSION)/ $< > $@
+	sed -i -e "s:__NUM_VERSION__:$(IPA_NUM_VERSION):" $@
+	sed -i -e "s:__VENDOR_VERSION__:$(IPA_VENDOR_VERSION):" $@
+	sed -i -e "s:__API_VERSION__:$(IPA_API_VERSION_MAJOR).$(IPA_API_VERSION_MINOR):" $@
+	grep -Po '(?<=default: ).*' API.txt | sed -n -i -e "/__DEFAULT_PLUGINS__/!{p;b};r /dev/stdin" $@
+	touch -r $< $@
+
+ipasetup.py: ipasetup.py.in ipapython/version.py FORCE
+	sed -e s/__VERSION__/$(IPA_VERSION)/ $< > $@
+
+.PHONY: egg_info
+egg_info: ipasetup.py
+	$(PYTHON) setup.py egg_info $(EXTRA_SETUP)
+	for directory in $(PYPKGDIRS); do \
+	pushd $${directory} ; \
+	$(PYTHON) setup.py egg_info $(EXTRA_SETUP); \
+	popd ; \
+	done
+
+version-update: release-update ipapython/version.py ipasetup.py egg_info
 	sed -e s/__VERSION__/$(IPA_VERSION)/ -e s/__RELEASE__/$(IPA_RPM_RELEASE)/ \
 		freeipa.spec.in > freeipa.spec
 	sed -e s/__VERSION__/$(IPA_VERSION)/ version.m4.in

[Freeipa-devel] [freeipa PR#171][comment] Build system cleanup phase 2

2016-10-19 Thread pspacek
  URL: https://github.com/freeipa/freeipa/pull/171
Title: #171: Build system cleanup phase 2

pspacek commented:
"""
@lslebodn If you read the pull request description you will notice that 
client-only build will be solved later on.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/171#issuecomment-254803410
-- 
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#171][comment] Build system cleanup phase 2

2016-10-19 Thread lslebodn
  URL: https://github.com/freeipa/freeipa/pull/171
Title: #171: Build system cleanup phase 2

lslebodn commented:
"""
BTW.
previously it was possible to build just a client code. But after these changes 
configure will require to have installed even daemon dependencies If someone 
decide to build just a client.
Is there a reason why there is not a configure time option for such use-case.
It would skip detections of build requirements for daemon part.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/171#issuecomment-254802847
-- 
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#171][comment] Build system cleanup phase 2

2016-10-19 Thread pspacek
  URL: https://github.com/freeipa/freeipa/pull/171
Title: #171: Build system cleanup phase 2

pspacek commented:
"""
I consider CURL topic to be just bikesheding.

Ad POPT: RHEL is going to require explicit configuration as designed in 
http://www.freeipa.org/page/V4/Build_system_refactoring because you have to 
explicitly disable missing checks etc. anyway. At the same time you can provide 
correct POPT flags.

If RHEL packager disagrees we can use some auto-magic but I would rather avoid 
it whenever possible. For reasons above, I think that upstream version should 
use pkgconfig as it is preferred way for library auto-detection.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/171#issuecomment-254802857
-- 
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#159][comment] spec file: clean up BuildRequires

2016-10-19 Thread martbab
  URL: https://github.com/freeipa/freeipa/pull/159
Title: #159: spec file: clean up BuildRequires

martbab commented:
"""
On F24 you need to explicitly install python-srpm-macros due to broken package 
dependencies

dnf install -y python-srpm-macros

otherwise dnf/rpm is unable to expand python-specific macros in the spec and 
fails.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/159#issuecomment-254800991
-- 
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#171][comment] Build system cleanup phase 2

2016-10-19 Thread lslebodn
  URL: https://github.com/freeipa/freeipa/pull/171
Title: #171: Build system cleanup phase 2

lslebodn commented:
"""
and the explanation for changing curl is not appropriate.
-1
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/171#issuecomment-254800904
-- 
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#171][comment] Build system cleanup phase 2

2016-10-19 Thread stlaz
  URL: https://github.com/freeipa/freeipa/pull/171
Title: #171: Build system cleanup phase 2

stlaz commented:
"""
+1 to push, the comments were added to outdated diffs so I thought them 
resolved. They are now.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/171#issuecomment-254800566
-- 
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#171][comment] Build system cleanup phase 2

2016-10-19 Thread lslebodn
  URL: https://github.com/freeipa/freeipa/pull/171
Title: #171: Build system cleanup phase 2

lslebodn commented:
"""
I am sorry I still do not agree with popt change reducing 3lines to 1 is not 
huge simplification.
And it does not work on rhel7.2
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/171#issuecomment-254800570
-- 
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#159][comment] spec file: clean up BuildRequires

2016-10-19 Thread stlaz
  URL: https://github.com/freeipa/freeipa/pull/159
Title: #159: spec file: clean up BuildRequires

stlaz commented:
"""
For some reason, after running `sudo dnf builddep freeipa.spec`, which is 
successful, if I run the same command again, if fails:
```
[login@vm freeipa-git]$ sudo dnf builddep --spec freeipa.spec
Last metadata expiration check: 0:23:03 ago on Wed Oct 19 13:53:25 2016.
Failed to open: 'freeipa.spec', not a valid spec file.
Error: Some packages could not be found.
```
Adding `-v` or `-d 10` options did not provide any more useful output about 
this error. This may possibly be a dnf bug.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/159#issuecomment-254795768
-- 
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#159][comment] spec file: clean up BuildRequires

2016-10-19 Thread stlaz
  URL: https://github.com/freeipa/freeipa/pull/159
Title: #159: spec file: clean up BuildRequires

stlaz commented:
"""
For some reason, after running `sudo dnf builddep freeipa.spec`, which is 
successful, if I run the same command again, if fails:
```
[login@vm freeipa-git]$ sudo dnf builddep --spec freeipa.spec
Last metadata expiration check: 0:23:03 ago on Wed Oct 19 13:53:25 2016.
Failed to open: 'freeipa.spec', not a valid spec file.
Error: Some packages could not be found.
```
Adding `-v` or `-d 10` options did not provide any more useful output about 
this error. This may possibly be a dnf bug.

edit: This was done on minimal systems with "Development Tools" group 
installed. The very same .spec file works on other systems, though.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/159#issuecomment-254795768
-- 
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#171][comment] Build system cleanup phase 2

2016-10-19 Thread pspacek
  URL: https://github.com/freeipa/freeipa/pull/171
Title: #171: Build system cleanup phase 2

pspacek commented:
"""
Justification is above, please push.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/171#issuecomment-254800046
-- 
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#171][comment] Build system cleanup phase 2

2016-10-19 Thread lslebodn
  URL: https://github.com/freeipa/freeipa/pull/171
Title: #171: Build system cleanup phase 2

lslebodn commented:
"""
-ACK,
my comments has not been addressed yet.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/171#issuecomment-254797969
-- 
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#159][comment] spec file: clean up BuildRequires

2016-10-19 Thread stlaz
  URL: https://github.com/freeipa/freeipa/pull/159
Title: #159: spec file: clean up BuildRequires

stlaz commented:
"""
For some reason, after running `sudo dnf builddep freeipa.spec`, which is 
successful, if I run the same command again, if fails:
```
[login@vm freeipa-git]$ sudo dnf builddep --spec freeipa.spec
Last metadata expiration check: 0:23:03 ago on Wed Oct 19 13:53:25 2016.
Failed to open: 'freeipa.spec', not a valid spec file.
Error: Some packages could not be found.
```
Adding `-v` or `-d 10` options did not provide any more useful output about 
this error. This may possibly be a dnf bug.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/159#issuecomment-254795768
-- 
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#159][comment] spec file: clean up BuildRequires

2016-10-19 Thread stlaz
  URL: https://github.com/freeipa/freeipa/pull/159
Title: #159: spec file: clean up BuildRequires

stlaz commented:
"""
For some reason, after running `sudo dnf builddep freeipa.spec`, which is 
successful, if I run the same command again, if fails:
```
[login@vm freeipa-git]$ sudo dnf builddep --spec freeipa.spec
Last metadata expiration check: 0:23:03 ago on Wed Oct 19 13:53:25 2016.
Failed to open: 'freeipa.spec', not a valid spec file.
Error: Some packages could not be found.
```
Adding `-v` or `-d 10` options did not provide any more useful output about 
this error.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/159#issuecomment-254795768
-- 
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] [help]

2016-10-19 Thread Martin Basti

Comments inline


On 19.10.2016 10:30, 郑磊 wrote:







--
祝:
工作顺利!生活愉快!
--
长沙研发中心 郑磊
Phone:18684703229
Email:zheng...@kylinos.cn
Company:天津麒麟信息技术有限公司
Address:湖南长沙市开福区三一大道工美大厦十四楼
-- Original --
*From: * "Martin Basti";
*Date: * Wed, Oct 19, 2016 04:03 PM
*To: * "郑磊"; 
"freeipa-devel";

*Subject: * Re: [Freeipa-devel] [help]



On 19.10.2016 03:35, 郑磊 wrote:

Hello,
In the process of using freeipa, we found a lot of content without 
Chinese translation. In order to we can better use the platform,



we made a Chinese translation.
Sorry but I don't see any updates in zanata 
https://fedora.zanata.org/iteration/view/freeipa/master/languages/zh-CN?dswid=-4750


If you do a custom/manual translations this will not scale and you 
will do the same every release



I have applied to join Chinese translation organization in zanata 
https://fedora.zanata.org/language/view/zh-CN?dswid=2727, but there is 
no reply. And I have tried to translate in zanata 
https://fedora.zanata.org/iteration/view/freeipa/master/languages/zh-CN?dswid=-4750, 
But there seems to be no permission to modify. Whether I need to put 
the translation file zh_CN.po to create pull request against 
freeipa/freeipa on github?


No please don't, we always generate .po files from zanata before 
releases, so all changes are overwritten


Ok, let me know how the adding you to zanata continue, if nobody will 
answer for longer time, I can put you just to freeIPA project as translator.






I think the translation work for freeipa internationalization 
promotion also can have certain help. In addition, in use process, we 
found that when test the corresponding function of operation in the 
Web interface is not a straightforward logging which needs to query 
in the background, and it may not be intuitive and convenient. In 
order to we can intuitively record what we have done the operation in 
the Web interface, we do the log module plug-ins.




webUI is just layer on top of our API calls.


I know, What I mean is that no matter we are in API calls mode to 
manipulate freeipa or Web UI way, we all can intuitive see clearly 
under the log module. The log module function is to record any of our 
operation.



I think that they can be many caveats (access control, replication, 
etc.) maybe would be good to see your code (you can send PR) how is you 
current implementation.


Martin




--
祝:
工作顺利!生活愉快!
--
长沙研发中心 郑磊
Phone:18684703229
Email:zheng...@kylinos.cn
Company:天津麒麟信息技术有限公司
Address:湖南长沙市开福区三一大道工美大厦十四楼
-- Original --
*From: * "Martin Basti";
*Date: * Tue, Oct 18, 2016 06:50 PM
*To: * "郑磊"; 
"freeipa-devel";

*Subject: * Re: [Freeipa-devel] [help]



On 18.10.2016 03:28, 郑磊 wrote:

Hello everyone,
I'm using freeipa, and having a test and research with the 
function of freeipa. At the same time, I have carried on the Chinese 
translation to the web interface, also added own log module in web 
interface, referring to the following screenshots. However, for 
these changes I don't know how to interact with the community. Is 
there a administrator to review these changes? Who should I send 
mail to? Please help me. Thank you very much!






Hello,

at first you can write here what is your goal, what are your use 
cases and how do you plan to achieve that.


Then, if we agree on solution, you can send code as pull request to 
our github repository https://github.com/freeipa/freeipa



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#169][synchronized] Replace ipaplatform's symlinks with a meta importer

2016-10-19 Thread tiran
   URL: https://github.com/freeipa/freeipa/pull/169
Author: tiran
 Title: #169: Replace ipaplatform's symlinks with a meta importer
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/169/head:pr169
git checkout pr169
From d852c0032d90fcb281f8c565170d87540f3c66f9 Mon Sep 17 00:00:00 2001
From: Christian Heimes 
Date: Tue, 18 Oct 2016 09:14:31 +0200
Subject: [PATCH] Replace ipaplatform's symlinks with a meta importer

Signed-off-by: Christian Heimes 
---
 .gitignore   |  4 
 Makefile |  5 -
 ipaplatform/__init__.py.in   | 18 +-
 ipaplatform/base/services.py |  5 -
 ipaserver/dcerpc.py  |  2 +-
 pylint_plugins.py| 20 +++-
 6 files changed, 37 insertions(+), 17 deletions(-)

diff --git a/.gitignore b/.gitignore
index 61054de..9b15475 100644
--- a/.gitignore
+++ b/.gitignore
@@ -77,7 +77,3 @@ freeipa2-dev-doc
 
 /ipaplatform/__init__.py
 /ipaplatform/setup.py
-/ipaplatform/tasks.py
-/ipaplatform/services.py
-/ipaplatform/paths.py
-/ipaplatform/constants.py
diff --git a/Makefile b/Makefile
index 6324308..0435fe9 100644
--- a/Makefile
+++ b/Makefile
@@ -197,11 +197,6 @@ version-update: release-update
 	if [ "$(SUPPORTED_PLATFORM)" != "" ]; then \
 		sed -e s/__PLATFORM__/$(SUPPORTED_PLATFORM)/ \
 			ipaplatform/__init__.py.in > ipaplatform/__init__.py; \
-		rm -f ipaplatform/paths.py ipaplatform/services.py ipaplatform/tasks.py ipaplatform/constants.py; \
-		ln -s $(SUPPORTED_PLATFORM)/paths.py ipaplatform/paths.py; \
-		ln -s $(SUPPORTED_PLATFORM)/services.py ipaplatform/services.py; \
-		ln -s $(SUPPORTED_PLATFORM)/tasks.py ipaplatform/tasks.py; \
-		ln -s $(SUPPORTED_PLATFORM)/constants.py ipaplatform/constants.py; \
 	fi
 
 	if [ "$(SKIP_API_VERSION_CHECK)" != "yes" ]; then \
diff --git a/ipaplatform/__init__.py.in b/ipaplatform/__init__.py.in
index 61f6f3c..9821bf6 100644
--- a/ipaplatform/__init__.py.in
+++ b/ipaplatform/__init__.py.in
@@ -1,12 +1,20 @@
 #
 # Copyright (C) 2015  FreeIPA Contributors see COPYING for license
 #
+"""Module containing platform-specific functionality.
+
+ipaplatform.constants
+ipaplatform.paths
+ipaplatform.services
+ipaplatform.tasks
+"""
+import os
 
-'''
-Module containing platform-specific functionality for every platform.
-'''
 
 NAME = "__PLATFORM__"
 
-# FIXME: too much cyclic dependencies
-# from __PLATFORM__ import paths, tasks, services
+# Create an alias for platform specific modulues, e.g.
+# 'import ipaplatform.paths' loads 'ipaplatform/NAME/paths.py'.
+
+__path__.append(
+os.path.join(os.path.dirname(os.path.abspath(__file__)), NAME))
diff --git a/ipaplatform/base/services.py b/ipaplatform/base/services.py
index 750d979..ec38b28 100644
--- a/ipaplatform/base/services.py
+++ b/ipaplatform/base/services.py
@@ -483,7 +483,10 @@ def remove(self):
 
 # Objects below are expected to be exported by platform module
 
-service = None
+def base_service_class_factory(name):
+raise NotImplementedError
+
+service = base_service_class_factory
 knownservices = None
 
 # System may support more time&date services. FreeIPA supports ntpd only, other
diff --git a/ipaserver/dcerpc.py b/ipaserver/dcerpc.py
index bd1d8c1..a6d10db 100644
--- a/ipaserver/dcerpc.py
+++ b/ipaserver/dcerpc.py
@@ -58,7 +58,7 @@
 import pysss_nss_idmap
 import pysss
 import six
-from ipaplatform.paths import paths
+from ipaplatform.paths import paths  # pylint: disable=import-error
 
 from ldap.filter import escape_filter_chars
 from time import sleep
diff --git a/pylint_plugins.py b/pylint_plugins.py
index bf35773..6273d2c 100644
--- a/pylint_plugins.py
+++ b/pylint_plugins.py
@@ -6,9 +6,11 @@
 
 import copy
 import sys
+import textwrap
 
-from astroid import MANAGER
+from astroid import MANAGER, register_module_extender
 from astroid import scoped_nodes
+from astroid.builder import AstroidBuilder
 
 
 def register(linter):
@@ -255,3 +257,19 @@ def fix_ipa_classes(cls):
 fake_class(cls, ipa_class_members[class_name_with_module])
 
 MANAGER.register_transform(scoped_nodes.Class, fix_ipa_classes)
+
+
+def ipaplatform_transform():
+"""Module aliases for IpaPlatformImporter
+"""
+return AstroidBuilder(MANAGER).string_build(textwrap.dedent(
+"""
+from ipaplatform.base import constants
+from ipaplatform.base import paths
+from ipaplatform.base import services
+from ipaplatform.base import tasks
+"""
+))
+
+
+register_module_extender(MANAGER, 'ipaplatform', ipaplatform_transform)
-- 
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#171][+ack] Build system cleanup phase 2

2016-10-19 Thread stlaz
  URL: https://github.com/freeipa/freeipa/pull/171
Title: #171: Build system cleanup phase 2

Label: +ack
-- 
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#171][comment] Build system cleanup phase 2

2016-10-19 Thread stlaz
  URL: https://github.com/freeipa/freeipa/pull/171
Title: #171: Build system cleanup phase 2

stlaz commented:
"""
ACK, works for me.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/171#issuecomment-254788258
-- 
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] Refactoring certificate-handling code: Staging branch and copr

2016-10-19 Thread David Kupka

Hello!
If you're interested in certificate refactoring you can find our staging 
branch here [0] and builds in copr repository here [1].


Currently the branch is identical to master and copr contains some test 
builds but this will change soon.


[0] https://github.com/dkupka/freeipa/tree/refactoring-certificates
[1] 
https://copr.fedorainfracloud.org/coprs/dkupka/freeipa-refactoring-certificates/


--
David Kupka

--
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#169][synchronized] Replace ipaplatform's symlinks with a meta importer

2016-10-19 Thread tiran
   URL: https://github.com/freeipa/freeipa/pull/169
Author: tiran
 Title: #169: Replace ipaplatform's symlinks with a meta importer
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/169/head:pr169
git checkout pr169
From bc506657267095fb2f1b3299e57906b346df1707 Mon Sep 17 00:00:00 2001
From: Christian Heimes 
Date: Tue, 18 Oct 2016 09:14:31 +0200
Subject: [PATCH] Replace ipaplatform's symlinks with a meta importer

Signed-off-by: Christian Heimes 
---
 .gitignore   |  4 
 Makefile |  5 -
 ipaplatform/__init__.py.in   | 18 +-
 ipaplatform/base/services.py |  5 -
 ipaserver/dcerpc.py  |  2 +-
 pylint_plugins.py| 20 +++-
 6 files changed, 37 insertions(+), 17 deletions(-)

diff --git a/.gitignore b/.gitignore
index 61054de..9b15475 100644
--- a/.gitignore
+++ b/.gitignore
@@ -77,7 +77,3 @@ freeipa2-dev-doc
 
 /ipaplatform/__init__.py
 /ipaplatform/setup.py
-/ipaplatform/tasks.py
-/ipaplatform/services.py
-/ipaplatform/paths.py
-/ipaplatform/constants.py
diff --git a/Makefile b/Makefile
index 6324308..0435fe9 100644
--- a/Makefile
+++ b/Makefile
@@ -197,11 +197,6 @@ version-update: release-update
 	if [ "$(SUPPORTED_PLATFORM)" != "" ]; then \
 		sed -e s/__PLATFORM__/$(SUPPORTED_PLATFORM)/ \
 			ipaplatform/__init__.py.in > ipaplatform/__init__.py; \
-		rm -f ipaplatform/paths.py ipaplatform/services.py ipaplatform/tasks.py ipaplatform/constants.py; \
-		ln -s $(SUPPORTED_PLATFORM)/paths.py ipaplatform/paths.py; \
-		ln -s $(SUPPORTED_PLATFORM)/services.py ipaplatform/services.py; \
-		ln -s $(SUPPORTED_PLATFORM)/tasks.py ipaplatform/tasks.py; \
-		ln -s $(SUPPORTED_PLATFORM)/constants.py ipaplatform/constants.py; \
 	fi
 
 	if [ "$(SKIP_API_VERSION_CHECK)" != "yes" ]; then \
diff --git a/ipaplatform/__init__.py.in b/ipaplatform/__init__.py.in
index 61f6f3c..9821bf6 100644
--- a/ipaplatform/__init__.py.in
+++ b/ipaplatform/__init__.py.in
@@ -1,12 +1,20 @@
 #
 # Copyright (C) 2015  FreeIPA Contributors see COPYING for license
 #
+"""Module containing platform-specific functionality.
+
+ipaplatform.constants
+ipaplatform.paths
+ipaplatform.services
+ipaplatform.tasks
+"""
+import os
 
-'''
-Module containing platform-specific functionality for every platform.
-'''
 
 NAME = "__PLATFORM__"
 
-# FIXME: too much cyclic dependencies
-# from __PLATFORM__ import paths, tasks, services
+# Create an alias for platform specific modulues, e.g.
+# 'import ipaplatform.paths' loads 'ipaplatform/NAME/paths.py'.
+
+__path__.append(
+os.path.join(os.path.dirname(os.path.abspath(__file__)), NAME))
diff --git a/ipaplatform/base/services.py b/ipaplatform/base/services.py
index 750d979..ec38b28 100644
--- a/ipaplatform/base/services.py
+++ b/ipaplatform/base/services.py
@@ -483,7 +483,10 @@ def remove(self):
 
 # Objects below are expected to be exported by platform module
 
-service = None
+def base_service_class_factory(name):
+raise NotImplementedError
+
+service = base_service_class_factory
 knownservices = None
 
 # System may support more time&date services. FreeIPA supports ntpd only, other
diff --git a/ipaserver/dcerpc.py b/ipaserver/dcerpc.py
index bd1d8c1..a6d10db 100644
--- a/ipaserver/dcerpc.py
+++ b/ipaserver/dcerpc.py
@@ -58,7 +58,7 @@
 import pysss_nss_idmap
 import pysss
 import six
-from ipaplatform.paths import paths
+from ipaplatform.paths import paths  # pylint: disable=import-error
 
 from ldap.filter import escape_filter_chars
 from time import sleep
diff --git a/pylint_plugins.py b/pylint_plugins.py
index bf35773..6273d2c 100644
--- a/pylint_plugins.py
+++ b/pylint_plugins.py
@@ -6,9 +6,11 @@
 
 import copy
 import sys
+import textwrap
 
-from astroid import MANAGER
+from astroid import MANAGER, register_module_extender
 from astroid import scoped_nodes
+from astroid.builder import AstroidBuilder
 
 
 def register(linter):
@@ -255,3 +257,19 @@ def fix_ipa_classes(cls):
 fake_class(cls, ipa_class_members[class_name_with_module])
 
 MANAGER.register_transform(scoped_nodes.Class, fix_ipa_classes)
+
+
+def ipaplatform_transform():
+"""Module aliases for IpaPlatformImporter
+"""
+return AstroidBuilder(MANAGER).string_build(textwrap.dedent(
+"""
+from ipaplatform.base import constants
+from ipaplatform.base import paths
+from ipaplatform.base import services
+from ipaplatform.base import tasks
+"""
+))
+
+
+register_module_extender(MANAGER, 'ipaplatform', ipaplatform_transform)
-- 
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#169][comment] Replace ipaplatform's symlinks with a meta importer

2016-10-19 Thread pspacek
  URL: https://github.com/freeipa/freeipa/pull/169
Title: #169: Replace ipaplatform's symlinks with a meta importer

pspacek commented:
"""
NACK

freeipa-server-4.4.90.201610190959GITf8012c0-0.fc24.x86_64 it broke following 
call which is used in RPM `%post client` scriptlet:
~~~
$ python2 -c 'from ipapython.certdb import update_ipa_nssdb; update_ipa_nssdb()'
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.7/site-packages/ipapython/certdb.py", line 28, in 

from ipaplatform.paths import paths
ImportError: No module named paths
~~~
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/169#issuecomment-254783841
-- 
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#171][comment] Build system cleanup phase 2

2016-10-19 Thread lslebodn
  URL: https://github.com/freeipa/freeipa/pull/171
Title: #171: Build system cleanup phase 2

lslebodn commented:
"""
ACK to
Build: modernize SASL library detection
Build: modernize XMLRPC-client library detection
Build: cleanup INI library detection

It would be good to push them if you do not want to wait for review of other 
patches.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/171#issuecomment-254777931
-- 
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] [Test][Patch-0049, 0050] Certs in ID overrides test

2016-10-19 Thread Oleg Fayans

Hi Martin,

As you suggested, I've extended the 
test_xmlrpc/test_add_remove_cert_cmd.py to contain basic tests for certs 
in idoverrides.
The integration part still needs some polishing in the part related to 
user lookup by cert


On 10/14/2016 03:57 PM, Martin Babinsky wrote:

On 10/14/2016 03:48 PM, Oleg Fayans wrote:

So, did I understand correctly, that there would be 2 patches: one
containing test for basic idoverrides functionality without
AD-integration, and the second one - with AD-integration and an sssd
check, correct?
I guess, the
freeipa-ofayans-0050.1-Automated-test-for-certs-in-idoverrides-feature.patch

might be a good candidate for the first one, I only have to change the
filename to test_idviews.py, right?



Oleg, we already have XMLRPC tests for idoverrides:

ipatests/test_xmlrpc/test_idviews_plugin.py

Is there any particular reason why not to extend them with add
cert/remove cert operations?

Even better, you can extend
`ipatests/test_xmlrpc/test_add_remove_cert_cmd.py` suite by doing the
same set of tests on idoverrideuser objects.

Or am I missing something?


On 09/15/2016 10:32 AM, Martin Basti wrote:



On 15.09.2016 10:10, Oleg Fayans wrote:

Hi Martin,

The file was renamed. Did I understand correctly that for now we are
leaving the test as is and are planning to extend it later?


I would like to have there SSSD check involved, please use what Summit
recommends. No new test cases.

And this can be done by separate patch, I want to have API/CLI
certificate override tests for non-AD idview (extending current tests I
posted in this thread)

Martin^2


On 09/15/2016 09:49 AM, Martin Basti wrote:



On 14.09.2016 18:53, Sumit Bose wrote:

On Wed, Sep 14, 2016 at 06:03:37PM +0200, Martin Basti wrote:


On 14.09.2016 17:53, Alexander Bokovoy wrote:

On Wed, 14 Sep 2016, Martin Basti wrote:


On 14.09.2016 17:41, Alexander Bokovoy wrote:

On Wed, 14 Sep 2016, Martin Basti wrote:

1)
I still don't see the reason why AD trust is needed. Default
trust ID view is added just by ipa-adtrust-install, adding
trust is not needed for current implementation. You don't
need AD for this, IDviews is generic feature not just for
AD. Is that user configured on AD side?

You cannot add non-AD user to 'default trust view', so you will
not be
able to set up certificates to ID override which does not exist.

For non-'default trust view' you can add both IPA and AD users,
so using
some other view and then assign certificate for a ID override in
that
one.


Ok then, but anyway I would like to see API/CLI tests for this
feature with proper output validation.


How can be this tested with SSSD?

You need to log into the system with a certificate...

Is this possible from test? We are logged remotely as root, is
there any
cmdline util which allows us to test certificate against AD user?


You can use 'sss_ssh_authorizedkeys aduser@ad.domain' which should
return the ssh key derived from the public key in the certificate.
This
should work for certificate stored in AD as well as for overrides.

You can also you the DBus lookup by certificate as described in
https://fedorahosted.org/sssd/wiki/DesignDocs/LookupUsersByCertificate

.

HTH

bye,
Sumit


Thank you Alexander and Summit for hints.

Oleg I realized we don't have any other idviews integration tests

So I propose to rename test file you are adding to test_idviews.py. We
can add more testcases for idviews there later

Martin^2

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

















--
Oleg Fayans
Quality Engineer
FreeIPA team
RedHat.
From de874f4e7bae77a1149846b2dd1fd4ce487e8c66 Mon Sep 17 00:00:00 2001
From: Oleg Fayans 
Date: Wed, 19 Oct 2016 11:59:44 +0200
Subject: [PATCH] tests: Added basic tests for certs in idoverrides

https://fedorahosted.org/freeipa/ticket/6412
---
 ipatests/test_xmlrpc/test_add_remove_cert_cmd.py | 88 
 1 file changed, 88 insertions(+)

diff --git a/ipatests/test_xmlrpc/test_add_remove_cert_cmd.py b/ipatests/test_xmlrpc/test_add_remove_cert_cmd.py
index edc97f07b0bf7d621bf9313a8ba20b4071b9e394..82a81b04997b8b4b41a45d65e00b773daef52099 100644
--- a/ipatests/test_xmlrpc/test_add_remove_cert_cmd.py
+++ b/ipatests/test_xmlrpc/test_add_remove_cert_cmd.py
@@ -352,3 +352,91 @@ class TestCertManipCmdService(CertManipCmdTestBase):
 api.Command.host_del(TestCertManipCmdHost.entity_pkey)
 except errors.NotFound:
 pass
+
+
+@pytest.mark.tier1
+class TestCertManipIdOverride(XMLRPC_test):
+idview = u'testview'
+testuser = u'testuser'
+entity_subject = testuser
+entity_principal = testuser
+
+cert_add_cmd = api.Command.idoverrideuser_add_cert
+cert_del_cmd = api.Command.idoverrideuser_remove_cert
+
+def del_cert_from_idoverride(self, username, view_name, cert):
+result = self.cert_del_cmd(view_name,

[Freeipa-devel] [freeipa PR#169][synchronized] Replace ipaplatform's symlinks with a meta importer

2016-10-19 Thread tiran
   URL: https://github.com/freeipa/freeipa/pull/169
Author: tiran
 Title: #169: Replace ipaplatform's symlinks with a meta importer
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/169/head:pr169
git checkout pr169
From f8012c07c7c237be4f14e1e5d0eb993ed58d5697 Mon Sep 17 00:00:00 2001
From: Christian Heimes 
Date: Tue, 18 Oct 2016 09:14:31 +0200
Subject: [PATCH] Replace ipaplatform's symlinks with a meta importer

Signed-off-by: Christian Heimes 
---
 .gitignore   |  4 
 Makefile |  5 -
 ipaplatform/__init__.py.in   | 16 +++-
 ipaplatform/base/services.py |  5 -
 ipaserver/dcerpc.py  |  2 +-
 pylint_plugins.py| 20 +++-
 6 files changed, 35 insertions(+), 17 deletions(-)

diff --git a/.gitignore b/.gitignore
index 61054de..9b15475 100644
--- a/.gitignore
+++ b/.gitignore
@@ -77,7 +77,3 @@ freeipa2-dev-doc
 
 /ipaplatform/__init__.py
 /ipaplatform/setup.py
-/ipaplatform/tasks.py
-/ipaplatform/services.py
-/ipaplatform/paths.py
-/ipaplatform/constants.py
diff --git a/Makefile b/Makefile
index 6324308..0435fe9 100644
--- a/Makefile
+++ b/Makefile
@@ -197,11 +197,6 @@ version-update: release-update
 	if [ "$(SUPPORTED_PLATFORM)" != "" ]; then \
 		sed -e s/__PLATFORM__/$(SUPPORTED_PLATFORM)/ \
 			ipaplatform/__init__.py.in > ipaplatform/__init__.py; \
-		rm -f ipaplatform/paths.py ipaplatform/services.py ipaplatform/tasks.py ipaplatform/constants.py; \
-		ln -s $(SUPPORTED_PLATFORM)/paths.py ipaplatform/paths.py; \
-		ln -s $(SUPPORTED_PLATFORM)/services.py ipaplatform/services.py; \
-		ln -s $(SUPPORTED_PLATFORM)/tasks.py ipaplatform/tasks.py; \
-		ln -s $(SUPPORTED_PLATFORM)/constants.py ipaplatform/constants.py; \
 	fi
 
 	if [ "$(SKIP_API_VERSION_CHECK)" != "yes" ]; then \
diff --git a/ipaplatform/__init__.py.in b/ipaplatform/__init__.py.in
index 61f6f3c..1340522 100644
--- a/ipaplatform/__init__.py.in
+++ b/ipaplatform/__init__.py.in
@@ -1,12 +1,18 @@
 #
 # Copyright (C) 2015  FreeIPA Contributors see COPYING for license
 #
+"""Module containing platform-specific functionality.
+
+ipaplatform.constants
+ipaplatform.paths
+ipaplatform.services
+ipaplatform.tasks
+"""
+import os
 
-'''
-Module containing platform-specific functionality for every platform.
-'''
 
 NAME = "__PLATFORM__"
 
-# FIXME: too much cyclic dependencies
-# from __PLATFORM__ import paths, tasks, services
+# Create an alias for platform specific modulues, e.g.
+# 'import ipaplatform.paths' loads 'ipaplatform/NAME/paths.py'.
+__path__.append(os.path.join(__name__, NAME))
diff --git a/ipaplatform/base/services.py b/ipaplatform/base/services.py
index 750d979..ec38b28 100644
--- a/ipaplatform/base/services.py
+++ b/ipaplatform/base/services.py
@@ -483,7 +483,10 @@ def remove(self):
 
 # Objects below are expected to be exported by platform module
 
-service = None
+def base_service_class_factory(name):
+raise NotImplementedError
+
+service = base_service_class_factory
 knownservices = None
 
 # System may support more time&date services. FreeIPA supports ntpd only, other
diff --git a/ipaserver/dcerpc.py b/ipaserver/dcerpc.py
index bd1d8c1..a6d10db 100644
--- a/ipaserver/dcerpc.py
+++ b/ipaserver/dcerpc.py
@@ -58,7 +58,7 @@
 import pysss_nss_idmap
 import pysss
 import six
-from ipaplatform.paths import paths
+from ipaplatform.paths import paths  # pylint: disable=import-error
 
 from ldap.filter import escape_filter_chars
 from time import sleep
diff --git a/pylint_plugins.py b/pylint_plugins.py
index bf35773..6273d2c 100644
--- a/pylint_plugins.py
+++ b/pylint_plugins.py
@@ -6,9 +6,11 @@
 
 import copy
 import sys
+import textwrap
 
-from astroid import MANAGER
+from astroid import MANAGER, register_module_extender
 from astroid import scoped_nodes
+from astroid.builder import AstroidBuilder
 
 
 def register(linter):
@@ -255,3 +257,19 @@ def fix_ipa_classes(cls):
 fake_class(cls, ipa_class_members[class_name_with_module])
 
 MANAGER.register_transform(scoped_nodes.Class, fix_ipa_classes)
+
+
+def ipaplatform_transform():
+"""Module aliases for IpaPlatformImporter
+"""
+return AstroidBuilder(MANAGER).string_build(textwrap.dedent(
+"""
+from ipaplatform.base import constants
+from ipaplatform.base import paths
+from ipaplatform.base import services
+from ipaplatform.base import tasks
+"""
+))
+
+
+register_module_extender(MANAGER, 'ipaplatform', ipaplatform_transform)
-- 
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] [help]

2016-10-19 Thread 郑磊
--
祝:
工作顺利!生活愉快!
--
长沙研发中心 郑磊 
Phone:18684703229
Email:zheng...@kylinos.cn
Company:天津麒麟信息技术有限公司
Address:湖南长沙市开福区三一大道工美大厦十四楼
 

 
 
 
-- Original --
From:  "Martin Basti";
Date:  Wed, Oct 19, 2016 04:03 PM
To:  "郑磊"; "freeipa-devel"; 

Subject:  Re: [Freeipa-devel] [help]

 
   

 
 
 On 19.10.2016 03:35, 郑磊 wrote:
 
 Hello,
   In the process of using freeipa, we found a lot of content without   
Chinese translation. In order to we can better use the platform, 
  we made a Chinese translation. Sorry but I don't see any updates in 
zanata 
https://fedora.zanata.org/iteration/view/freeipa/master/languages/zh-CN?dswid=-4750
 
 If you do a custom/manual translations this will not scale and you 
will do the same every release


I have applied to join Chinese translation organization in zanata 
https://fedora.zanata.org/language/view/zh-CN?dswid=2727, but there is no 
reply. And I have tried to translate in zanata 
https://fedora.zanata.org/iteration/view/freeipa/master/languages/zh-CN?dswid=-4750,
 But there seems to be no permission to modify. Whether I need to put the 
translation file zh_CN.po to create pull request against freeipa/freeipa on 
github?
 

  I think the translation work for freeipa   internationalization 
promotion also can have certain help. In   addition, in use process, we 
found that when test the   corresponding function of operation in the Web 
interface is not a   straightforward logging which needs to query in the 
background,   and it may not be intuitive and convenient. In order to we 
can   intuitively record what we have done the operation in the Web   
interface, we do the log module plug-ins. 
   
  
   
 
  webUI is just layer on top of our API calls.
 

 I know, What I mean is that no matter we are in API calls mode to 
manipulate freeipa or Web UI way, we all can intuitive see clearly under the 
log module. The log module function is to record any of our operation.


  
 
 
 --
   祝:
 工作顺利!生活愉快!
 --
 长沙研发中心 郑磊 
 Phone:18684703229
 Email:zheng...@kylinos.cn
 Company:天津麒麟信息技术有限公司
 Address:湖南长沙市开福区三一大道工美大厦十四楼
   
 

   

-- Original --
From:  "Martin 
Basti";
   Date:  Tue, Oct 18, 2016 06:50 PM
   To:  "郑磊"; 
"freeipa-devel"; 
   Subject:  Re: [Freeipa-devel] [help]
 
  
 

 
 
 On 18.10.2016 03:28, 郑磊 wrote:
 
 Hello everyone,
   I'm using freeipa, and having a test and research with   
the function of freeipa. At the same time, I have carried   
on the Chinese translation to the web interface, also   added own 
log module in web interface, referring to the   following 
screenshots. However, for these changes I don't   know how to 
interact with the community. Is there a   administrator to review 
these changes? Who should I send   mail to? Please help me. Thank 
you very much!
   
   
  
  
 Hello,
 
 at first you can write here what is your goal, what are your   
  use cases and how do you plan to achieve that.
 
 Then, if we agree on solution, you can send code as pull   
  request to our github repository https://github.com/freeipa/freeipa
 
 
 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#169][synchronized] Replace ipaplatform's symlinks with a meta importer

2016-10-19 Thread tiran
   URL: https://github.com/freeipa/freeipa/pull/169
Author: tiran
 Title: #169: Replace ipaplatform's symlinks with a meta importer
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/169/head:pr169
git checkout pr169
From bfa3898e58fc5a280beb8112a1c285d1d6680659 Mon Sep 17 00:00:00 2001
From: Christian Heimes 
Date: Tue, 18 Oct 2016 09:14:31 +0200
Subject: [PATCH] Replace ipaplatform's symlinks with a meta importer

Signed-off-by: Christian Heimes 
---
 .gitignore   |  4 
 Makefile |  5 -
 ipaplatform/__init__.py.in   | 14 +-
 ipaplatform/base/services.py |  5 -
 ipaserver/dcerpc.py  |  2 +-
 pylint_plugins.py| 20 +++-
 6 files changed, 33 insertions(+), 17 deletions(-)

diff --git a/.gitignore b/.gitignore
index 61054de..9b15475 100644
--- a/.gitignore
+++ b/.gitignore
@@ -77,7 +77,3 @@ freeipa2-dev-doc
 
 /ipaplatform/__init__.py
 /ipaplatform/setup.py
-/ipaplatform/tasks.py
-/ipaplatform/services.py
-/ipaplatform/paths.py
-/ipaplatform/constants.py
diff --git a/Makefile b/Makefile
index 6324308..0435fe9 100644
--- a/Makefile
+++ b/Makefile
@@ -197,11 +197,6 @@ version-update: release-update
 	if [ "$(SUPPORTED_PLATFORM)" != "" ]; then \
 		sed -e s/__PLATFORM__/$(SUPPORTED_PLATFORM)/ \
 			ipaplatform/__init__.py.in > ipaplatform/__init__.py; \
-		rm -f ipaplatform/paths.py ipaplatform/services.py ipaplatform/tasks.py ipaplatform/constants.py; \
-		ln -s $(SUPPORTED_PLATFORM)/paths.py ipaplatform/paths.py; \
-		ln -s $(SUPPORTED_PLATFORM)/services.py ipaplatform/services.py; \
-		ln -s $(SUPPORTED_PLATFORM)/tasks.py ipaplatform/tasks.py; \
-		ln -s $(SUPPORTED_PLATFORM)/constants.py ipaplatform/constants.py; \
 	fi
 
 	if [ "$(SKIP_API_VERSION_CHECK)" != "yes" ]; then \
diff --git a/ipaplatform/__init__.py.in b/ipaplatform/__init__.py.in
index 61f6f3c..f1028aa 100644
--- a/ipaplatform/__init__.py.in
+++ b/ipaplatform/__init__.py.in
@@ -1,12 +1,16 @@
 #
 # Copyright (C) 2015  FreeIPA Contributors see COPYING for license
 #
+"""Module containing platform-specific functionality.
 
-'''
-Module containing platform-specific functionality for every platform.
-'''
+ipaplatform.constants
+ipaplatform.paths
+ipaplatform.services
+ipaplatform.tasks
+"""
 
 NAME = "__PLATFORM__"
 
-# FIXME: too much cyclic dependencies
-# from __PLATFORM__ import paths, tasks, services
+# Create an alias for platform specific modulues, e.g.
+# 'import ipaplatform.paths' loads 'ipaplatform/NAME/paths.py'.
+__path__.append(NAME)
diff --git a/ipaplatform/base/services.py b/ipaplatform/base/services.py
index 750d979..ec38b28 100644
--- a/ipaplatform/base/services.py
+++ b/ipaplatform/base/services.py
@@ -483,7 +483,10 @@ def remove(self):
 
 # Objects below are expected to be exported by platform module
 
-service = None
+def base_service_class_factory(name):
+raise NotImplementedError
+
+service = base_service_class_factory
 knownservices = None
 
 # System may support more time&date services. FreeIPA supports ntpd only, other
diff --git a/ipaserver/dcerpc.py b/ipaserver/dcerpc.py
index bd1d8c1..a6d10db 100644
--- a/ipaserver/dcerpc.py
+++ b/ipaserver/dcerpc.py
@@ -58,7 +58,7 @@
 import pysss_nss_idmap
 import pysss
 import six
-from ipaplatform.paths import paths
+from ipaplatform.paths import paths  # pylint: disable=import-error
 
 from ldap.filter import escape_filter_chars
 from time import sleep
diff --git a/pylint_plugins.py b/pylint_plugins.py
index bf35773..6273d2c 100644
--- a/pylint_plugins.py
+++ b/pylint_plugins.py
@@ -6,9 +6,11 @@
 
 import copy
 import sys
+import textwrap
 
-from astroid import MANAGER
+from astroid import MANAGER, register_module_extender
 from astroid import scoped_nodes
+from astroid.builder import AstroidBuilder
 
 
 def register(linter):
@@ -255,3 +257,19 @@ def fix_ipa_classes(cls):
 fake_class(cls, ipa_class_members[class_name_with_module])
 
 MANAGER.register_transform(scoped_nodes.Class, fix_ipa_classes)
+
+
+def ipaplatform_transform():
+"""Module aliases for IpaPlatformImporter
+"""
+return AstroidBuilder(MANAGER).string_build(textwrap.dedent(
+"""
+from ipaplatform.base import constants
+from ipaplatform.base import paths
+from ipaplatform.base import services
+from ipaplatform.base import tasks
+"""
+))
+
+
+register_module_extender(MANAGER, 'ipaplatform', ipaplatform_transform)
-- 
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] [help]

2016-10-19 Thread Petr Vobornik
On 10/19/2016 10:03 AM, Martin Basti wrote:
> 
> 
> On 19.10.2016 03:35, 郑磊 wrote:
>> Hello,
>> In the process of using freeipa, we found a lot of content without Chinese 
>> translation. In order to we can better use the platform,
> 
>> we made a Chinese translation.
> Sorry but I don't see any updates in zanata 
> https://fedora.zanata.org/iteration/view/freeipa/master/languages/zh-CN?dswid=-4750
> 
> If you do a custom/manual translations this will not scale and you will do 
> the 
> same every release
> 
>> I think the translation work for freeipa internationalization promotion also 
>> can have certain help. In addition, in use process, we found that when test 
>> the corresponding function of operation in the Web interface is not a 
>> straightforward logging which needs to query in the background, and it may 
>> not 
>> be intuitive and convenient. In order to we can intuitively record what we 
>> have done the operation in the Web interface, we do the log module plug-ins.
>>
>>
> webUI is just layer on top of our API calls.

Note that there are some parts of Web UI that aren't translated. Mainly
login page. It's because translations are fetched by API call which
needs successful auth.
> 
> 
>>
>>
>>
>> --
>> 祝:
>> 工作顺利!生活愉快!
>> --
>> 长沙研发中心 郑磊
>> Phone:18684703229
>> Email:zheng...@kylinos.cn
>> Company:天津麒麟信息技术有限公司
>> Address:湖南长沙市开福区三一大道工美大厦十四楼
>> -- Original --
>> *From: * "Martin Basti";
>> *Date: * Tue, Oct 18, 2016 06:50 PM
>> *To: * "郑磊"; "freeipa-devel";
>> *Subject: * Re: [Freeipa-devel] [help]
>>
>>
>>
>> On 18.10.2016 03:28, 郑磊 wrote:
>>> Hello everyone,
>>> I'm using freeipa, and having a test and research with the function of 
>>> freeipa. At the same time, I have carried on the Chinese translation to the 
>>> web interface, also added own log module in web interface, referring to the 
>>> following screenshots. However, for these changes I don't know how to 
>>> interact with the community. Is there a administrator to review these 
>>> changes? Who should I send mail to? Please help me. Thank you very much!
>>>
>>>
>>>
>>
>> Hello,
>>
>> at first you can write here what is your goal, what are your use cases and 
>> how 
>> do you plan to achieve that.
>>
>> Then, if we agree on solution, you can send code as pull request to our 
>> github 
>> repository https://github.com/freeipa/freeipa
>>
>>
>> Martin^2
> 
> 
> 


-- 
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

Re: [Freeipa-devel] [help]

2016-10-19 Thread Martin Basti



On 19.10.2016 03:35, 郑磊 wrote:

Hello,
In the process of using freeipa, we found a lot of content without 
Chinese translation. In order to we can better use the platform,



we made a Chinese translation.
Sorry but I don't see any updates in zanata 
https://fedora.zanata.org/iteration/view/freeipa/master/languages/zh-CN?dswid=-4750


If you do a custom/manual translations this will not scale and you will 
do the same every release


I think the translation work for freeipa internationalization 
promotion also can have certain help. In addition, in use process, we 
found that when test the corresponding function of operation in the 
Web interface is not a straightforward logging which needs to query in 
the background, and it may not be intuitive and convenient. In order 
to we can intuitively record what we have done the operation in the 
Web interface, we do the log module plug-ins.




webUI is just layer on top of our API calls.






--
祝:
工作顺利!生活愉快!
--
长沙研发中心 郑磊
Phone:18684703229
Email:zheng...@kylinos.cn
Company:天津麒麟信息技术有限公司
Address:湖南长沙市开福区三一大道工美大厦十四楼
-- Original --
*From: * "Martin Basti";
*Date: * Tue, Oct 18, 2016 06:50 PM
*To: * "郑磊"; 
"freeipa-devel";

*Subject: * Re: [Freeipa-devel] [help]



On 18.10.2016 03:28, 郑磊 wrote:

Hello everyone,
I'm using freeipa, and having a test and research with the 
function of freeipa. At the same time, I have carried on the Chinese 
translation to the web interface, also added own log module in web 
interface, referring to the following screenshots. However, for these 
changes I don't know how to interact with the community. Is there a 
administrator to review these changes? Who should I send mail to? 
Please help me. Thank you very much!






Hello,

at first you can write here what is your goal, what are your use cases 
and how do you plan to achieve that.


Then, if we agree on solution, you can send code as pull request to 
our github repository https://github.com/freeipa/freeipa



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#172][opened] fix pki-tomcat error after uninstall

2016-10-19 Thread shanyin
   URL: https://github.com/freeipa/freeipa/pull/172
Author: shanyin
 Title: #172: fix pki-tomcat error after uninstall
Action: opened

PR body:
"""
I set up the freeipa(version 4.3.1) environment in Ubuntu 16.04, there is a 
reconfigure error found after uninstall. The error message is ERROR CA 
configuration failed. The pki log message shows that pkispawn : ERROR ... 
OSError: [Errno 2] No such file or directory! The reason is that there is no 
pki-tomcatd.target.wants directory in /etc/systemd/system/ directory. Creating 
the directory can solve the problem.
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/172/head:pr172
git checkout pr172
From 1dd08b6aa6d97597483b951cb8f5337bfc1c31b0 Mon Sep 17 00:00:00 2001
From: shanyin 
Date: Wed, 19 Oct 2016 14:39:47 +0800
Subject: [PATCH] fix pki-tomcat error after uninstall

---
 ipaserver/install/cainstance.py | 5 +
 1 file changed, 5 insertions(+)

diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py
index 384abc3..55184f0 100644
--- a/ipaserver/install/cainstance.py
+++ b/ipaserver/install/cainstance.py
@@ -585,6 +585,11 @@ def __spawn_instance(self):
 with open(cfg_file, "wb") as f:
 config.write(f)
 
+# Create parent directory for pki-tomcatd service file
+PKI_SERVICE_LOCATION="/etc/systemd/system/pki-tomcatd.target.wants"
+if not os.path.exists(PKI_SERVICE_LOCATION):
+os.mkdir(PKI_SERVICE_LOCATION)
+
 self.backup_state('installed', True)
 try:
 DogtagInstance.spawn_instance(self, cfg_file)
-- 
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