Re: [Freeipa-devel] [PATCH 0274] DNS: Check if dns package is installed

2015-07-21 Thread Jan Cholasta

Dne 20.7.2015 v 19:00 Martin Babinsky napsal(a):

On 07/17/2015 02:37 PM, Martin Basti wrote:

On 03/07/15 09:03, Tomas Babej wrote:


On 07/02/2015 02:03 PM, Petr Spacek wrote:

On 2.7.2015 13:54, Jan Cholasta wrote:

Dne 2.7.2015 v 13:34 Petr Spacek napsal(a):

On 2.7.2015 12:57, Tomas Babej wrote:


On 07/02/2015 08:50 AM, Petr Spacek wrote:

On 1.7.2015 20:29, Tomas Babej wrote:


On 07/01/2015 04:45 PM, Petr Spacek wrote:

On 1.7.2015 15:32, Martin Basti wrote:

https://fedorahosted.org/freeipa/ticket/4058
Requires patch freeipa-pspacek-0052

ACK


I must admit I don't really like wrapping a constant in the
method in
the TaskNamespace object.

We're interested in the constant itself - there's no case I can
imagine
where the name of the freeipa's dns package will be dynamic.

For paths we have BasePathNamespace that contains all the paths,
maybe
we should introduce something similar for the non-path platform
dependent constants?

Generally I support this but it seems like a 4.3 material (and
out of
scope of
#4058). We need to finish 4.2 now.

Please ACK or NACK ASAP.


It's fairly straightforward to introduce a new platform namespace
for
constants.

See attached patch, it implements the namespace and already
contains the
proper values for the dns package name.

The original patch 274 would only need to use:

  >>> from ipaplatform.constants import constants
  >>> constants.DNS_PACKAGE_NAME
  'freeipa-server-dns'

I'm okay with that if Honza or somebody else knowledgable about the
whole
platform-thingy can ACK this, amend Martin^2's patch 274 and test
the whole
thing.

Unfortunately I do not have time for it myself. If nobody does that
please
push the original patch (when it's dependency pspacek-0052 gets ACK).


I think you are overengineering this a little bit, adding whatever
ipaplatform
stuff just because of an error message seems rather unnecessary to
me. I think
changing the error message to "Integrated DNS requires
'freeipa-server-dns'
package" or even "Integrated DNS requires IPA DNS server package"
would be
perfectly fine.

The message should be as specific as possible but I do not care how
it will be
implemented.


Alright, let's not get stuck. Petr insists on specific message on each
platform. Given that package name is platform dependent, I think we
should keep it as platform constant, task makes little sense.

Given that Martin's not available right now, I'll amend his patches and
send the updated version.

Tomas

Updated patches attached.

ACK for 332
I just removed DNS constants from 332 patch




ACK for Martin's patch.


Pushed to:
master: 92828d3cf50e00fe75ebf3ec9e0edc8b9c8eae35
ipa-4-2: eefe6dc3a2a6fb316650638c3db90ed63f8551de

--
Jan Cholasta

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


Re: [Freeipa-devel] [PATCH 0274] DNS: Check if dns package is installed

2015-07-20 Thread Martin Babinsky

On 07/17/2015 02:37 PM, Martin Basti wrote:

On 03/07/15 09:03, Tomas Babej wrote:


On 07/02/2015 02:03 PM, Petr Spacek wrote:

On 2.7.2015 13:54, Jan Cholasta wrote:

Dne 2.7.2015 v 13:34 Petr Spacek napsal(a):

On 2.7.2015 12:57, Tomas Babej wrote:


On 07/02/2015 08:50 AM, Petr Spacek wrote:

On 1.7.2015 20:29, Tomas Babej wrote:


On 07/01/2015 04:45 PM, Petr Spacek wrote:

On 1.7.2015 15:32, Martin Basti wrote:

https://fedorahosted.org/freeipa/ticket/4058
Requires patch freeipa-pspacek-0052

ACK


I must admit I don't really like wrapping a constant in the
method in
the TaskNamespace object.

We're interested in the constant itself - there's no case I can
imagine
where the name of the freeipa's dns package will be dynamic.

For paths we have BasePathNamespace that contains all the paths,
maybe
we should introduce something similar for the non-path platform
dependent constants?

Generally I support this but it seems like a 4.3 material (and
out of
scope of
#4058). We need to finish 4.2 now.

Please ACK or NACK ASAP.


It's fairly straightforward to introduce a new platform namespace for
constants.

See attached patch, it implements the namespace and already
contains the
proper values for the dns package name.

The original patch 274 would only need to use:

  >>> from ipaplatform.constants import constants
  >>> constants.DNS_PACKAGE_NAME
  'freeipa-server-dns'

I'm okay with that if Honza or somebody else knowledgable about the
whole
platform-thingy can ACK this, amend Martin^2's patch 274 and test
the whole
thing.

Unfortunately I do not have time for it myself. If nobody does that
please
push the original patch (when it's dependency pspacek-0052 gets ACK).


I think you are overengineering this a little bit, adding whatever
ipaplatform
stuff just because of an error message seems rather unnecessary to
me. I think
changing the error message to "Integrated DNS requires
'freeipa-server-dns'
package" or even "Integrated DNS requires IPA DNS server package"
would be
perfectly fine.

The message should be as specific as possible but I do not care how
it will be
implemented.


Alright, let's not get stuck. Petr insists on specific message on each
platform. Given that package name is platform dependent, I think we
should keep it as platform constant, task makes little sense.

Given that Martin's not available right now, I'll amend his patches and
send the updated version.

Tomas

Updated patches attached.

ACK for 332
I just removed DNS constants from 332 patch




ACK for Martin's patch.

--
Martin^3 Babinsky

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


Re: [Freeipa-devel] [PATCH 0274] DNS: Check if dns package is installed

2015-07-17 Thread Martin Basti

On 03/07/15 09:03, Tomas Babej wrote:


On 07/02/2015 02:03 PM, Petr Spacek wrote:

On 2.7.2015 13:54, Jan Cholasta wrote:

Dne 2.7.2015 v 13:34 Petr Spacek napsal(a):

On 2.7.2015 12:57, Tomas Babej wrote:


On 07/02/2015 08:50 AM, Petr Spacek wrote:

On 1.7.2015 20:29, Tomas Babej wrote:


On 07/01/2015 04:45 PM, Petr Spacek wrote:

On 1.7.2015 15:32, Martin Basti wrote:

https://fedorahosted.org/freeipa/ticket/4058
Requires patch freeipa-pspacek-0052

ACK


I must admit I don't really like wrapping a constant in the method in
the TaskNamespace object.

We're interested in the constant itself - there's no case I can imagine
where the name of the freeipa's dns package will be dynamic.

For paths we have BasePathNamespace that contains all the paths, maybe
we should introduce something similar for the non-path platform
dependent constants?

Generally I support this but it seems like a 4.3 material (and out of
scope of
#4058). We need to finish 4.2 now.

Please ACK or NACK ASAP.


It's fairly straightforward to introduce a new platform namespace for
constants.

See attached patch, it implements the namespace and already contains the
proper values for the dns package name.

The original patch 274 would only need to use:

  >>> from ipaplatform.constants import constants
  >>> constants.DNS_PACKAGE_NAME
  'freeipa-server-dns'

I'm okay with that if Honza or somebody else knowledgable about the whole
platform-thingy can ACK this, amend Martin^2's patch 274 and test the whole
thing.

Unfortunately I do not have time for it myself. If nobody does that please
push the original patch (when it's dependency pspacek-0052 gets ACK).


I think you are overengineering this a little bit, adding whatever ipaplatform
stuff just because of an error message seems rather unnecessary to me. I think
changing the error message to "Integrated DNS requires 'freeipa-server-dns'
package" or even "Integrated DNS requires IPA DNS server package" would be
perfectly fine.

The message should be as specific as possible but I do not care how it will be
implemented.


Alright, let's not get stuck. Petr insists on specific message on each
platform. Given that package name is platform dependent, I think we
should keep it as platform constant, task makes little sense.

Given that Martin's not available right now, I'll amend his patches and
send the updated version.

Tomas

Updated patches attached.

ACK for 332
I just removed DNS constants from 332 patch

--
Martin Basti

From 4194a9df1e384b8713ecc92d1b8563c322e30dcf Mon Sep 17 00:00:00 2001
From: Martin Basti 
Date: Wed, 1 Jul 2015 15:05:45 +0200
Subject: [PATCH 2/2] DNS: check if DNS package is installed

Instead of separate checking of DNS required packages, we need just
check if IPA DNS package is installed.

https://fedorahosted.org/freeipa/ticket/4058
---
 ipaplatform/base/constants.py   |  2 +-
 ipaplatform/base/paths.py   |  1 +
 ipaplatform/rhel/constants.py   |  2 +-
 ipaserver/install/bindinstance.py   | 19 +--
 ipaserver/install/dns.py| 11 ++-
 ipaserver/install/dnskeysyncinstance.py |  6 --
 ipaserver/install/opendnssecinstance.py |  8 
 7 files changed, 10 insertions(+), 39 deletions(-)

diff --git a/ipaplatform/base/constants.py b/ipaplatform/base/constants.py
index 70485055fa5a12fac878ace3dea11ea442ebe6be..cef829e2d3886db00ae6d0299ddcf325d1add80e 100644
--- a/ipaplatform/base/constants.py
+++ b/ipaplatform/base/constants.py
@@ -8,4 +8,4 @@ This base platform module exports platform dependant constants.
 
 
 class BaseConstantsNamespace(object):
-pass
+IPA_DNS_PACKAGE_NAME = "freeipa-server-dns"
diff --git a/ipaplatform/base/paths.py b/ipaplatform/base/paths.py
index 9fef3e7a1351dd42895fe560bb3c1bc5a1c852b4..6ca4965d3deab61030d09b4b07582ff27e6af120 100644
--- a/ipaplatform/base/paths.py
+++ b/ipaplatform/base/paths.py
@@ -218,6 +218,7 @@ class BasePathNamespace(object):
 GROUPADD = "/usr/sbin/groupadd"
 HTTPD = "/usr/sbin/httpd"
 IPA_CLIENT_INSTALL = "/usr/sbin/ipa-client-install"
+IPA_DNS_INSTALL = "/usr/sbin/ipa-dns-install"
 SBIN_IPA_JOIN = "/usr/sbin/ipa-join"
 IPA_REPLICA_CONNCHECK = "/usr/sbin/ipa-replica-conncheck"
 IPA_RMKEYTAB = "/usr/sbin/ipa-rmkeytab"
diff --git a/ipaplatform/rhel/constants.py b/ipaplatform/rhel/constants.py
index eaca48030fa28804c70c161b07228646a95fc1a3..17abde1f861778bec83067cb01e9a1faae325527 100644
--- a/ipaplatform/rhel/constants.py
+++ b/ipaplatform/rhel/constants.py
@@ -11,6 +11,6 @@ from ipaplatform.redhat.constants import RedHatConstantsNamespace
 
 
 class RHELConstantsNamespace(RedHatConstantsNamespace):
-pass
+IPA_DNS_PACKAGE_NAME = "ipa-server-dns"
 
 constants = RHELConstantsNamespace()
diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py
index 2228342dc40ee415d1adf2687a7ae91a5963d3c7..9705e845a76191a252bfa963b54d9c31d83ad18e 100644
--- a/ipaserver/install/bindinstance

Re: [Freeipa-devel] [PATCH 0274] DNS: Check if dns package is installed

2015-07-03 Thread Tomas Babej


On 07/02/2015 02:03 PM, Petr Spacek wrote:
> On 2.7.2015 13:54, Jan Cholasta wrote:
>> Dne 2.7.2015 v 13:34 Petr Spacek napsal(a):
>>> On 2.7.2015 12:57, Tomas Babej wrote:


 On 07/02/2015 08:50 AM, Petr Spacek wrote:
> On 1.7.2015 20:29, Tomas Babej wrote:
>>
>>
>> On 07/01/2015 04:45 PM, Petr Spacek wrote:
>>> On 1.7.2015 15:32, Martin Basti wrote:
 https://fedorahosted.org/freeipa/ticket/4058
 Requires patch freeipa-pspacek-0052
>>>
>>> ACK
>>>
>>
>> I must admit I don't really like wrapping a constant in the method in
>> the TaskNamespace object.
>>
>> We're interested in the constant itself - there's no case I can imagine
>> where the name of the freeipa's dns package will be dynamic.
>>
>> For paths we have BasePathNamespace that contains all the paths, maybe
>> we should introduce something similar for the non-path platform
>> dependent constants?
>
> Generally I support this but it seems like a 4.3 material (and out of
> scope of
> #4058). We need to finish 4.2 now.
>
> Please ACK or NACK ASAP.
>

 It's fairly straightforward to introduce a new platform namespace for
 constants.

 See attached patch, it implements the namespace and already contains the
 proper values for the dns package name.

 The original patch 274 would only need to use:

  >>> from ipaplatform.constants import constants
  >>> constants.DNS_PACKAGE_NAME
  'freeipa-server-dns'
>>>
>>> I'm okay with that if Honza or somebody else knowledgable about the whole
>>> platform-thingy can ACK this, amend Martin^2's patch 274 and test the whole
>>> thing.
>>>
>>> Unfortunately I do not have time for it myself. If nobody does that please
>>> push the original patch (when it's dependency pspacek-0052 gets ACK).
>>>
>>
>> I think you are overengineering this a little bit, adding whatever 
>> ipaplatform
>> stuff just because of an error message seems rather unnecessary to me. I 
>> think
>> changing the error message to "Integrated DNS requires 'freeipa-server-dns'
>> package" or even "Integrated DNS requires IPA DNS server package" would be
>> perfectly fine.
> 
> The message should be as specific as possible but I do not care how it will be
> implemented.
> 

Alright, let's not get stuck. Petr insists on specific message on each
platform. Given that package name is platform dependent, I think we
should keep it as platform constant, task makes little sense.

Given that Martin's not available right now, I'll amend his patches and
send the updated version.

Tomas

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


Re: [Freeipa-devel] [PATCH 0274] DNS: Check if dns package is installed

2015-07-02 Thread Petr Spacek
On 2.7.2015 13:54, Jan Cholasta wrote:
> Dne 2.7.2015 v 13:34 Petr Spacek napsal(a):
>> On 2.7.2015 12:57, Tomas Babej wrote:
>>>
>>>
>>> On 07/02/2015 08:50 AM, Petr Spacek wrote:
 On 1.7.2015 20:29, Tomas Babej wrote:
>
>
> On 07/01/2015 04:45 PM, Petr Spacek wrote:
>> On 1.7.2015 15:32, Martin Basti wrote:
>>> https://fedorahosted.org/freeipa/ticket/4058
>>> Requires patch freeipa-pspacek-0052
>>
>> ACK
>>
>
> I must admit I don't really like wrapping a constant in the method in
> the TaskNamespace object.
>
> We're interested in the constant itself - there's no case I can imagine
> where the name of the freeipa's dns package will be dynamic.
>
> For paths we have BasePathNamespace that contains all the paths, maybe
> we should introduce something similar for the non-path platform
> dependent constants?

 Generally I support this but it seems like a 4.3 material (and out of
 scope of
 #4058). We need to finish 4.2 now.

 Please ACK or NACK ASAP.

>>>
>>> It's fairly straightforward to introduce a new platform namespace for
>>> constants.
>>>
>>> See attached patch, it implements the namespace and already contains the
>>> proper values for the dns package name.
>>>
>>> The original patch 274 would only need to use:
>>>
>>>  >>> from ipaplatform.constants import constants
>>>  >>> constants.DNS_PACKAGE_NAME
>>>  'freeipa-server-dns'
>>
>> I'm okay with that if Honza or somebody else knowledgable about the whole
>> platform-thingy can ACK this, amend Martin^2's patch 274 and test the whole
>> thing.
>>
>> Unfortunately I do not have time for it myself. If nobody does that please
>> push the original patch (when it's dependency pspacek-0052 gets ACK).
>>
> 
> I think you are overengineering this a little bit, adding whatever ipaplatform
> stuff just because of an error message seems rather unnecessary to me. I think
> changing the error message to "Integrated DNS requires 'freeipa-server-dns'
> package" or even "Integrated DNS requires IPA DNS server package" would be
> perfectly fine.

The message should be as specific as possible but I do not care how it will be
implemented.

-- 
Petr^2 Spacek

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


Re: [Freeipa-devel] [PATCH 0274] DNS: Check if dns package is installed

2015-07-02 Thread Jan Cholasta

Dne 2.7.2015 v 13:34 Petr Spacek napsal(a):

On 2.7.2015 12:57, Tomas Babej wrote:



On 07/02/2015 08:50 AM, Petr Spacek wrote:

On 1.7.2015 20:29, Tomas Babej wrote:



On 07/01/2015 04:45 PM, Petr Spacek wrote:

On 1.7.2015 15:32, Martin Basti wrote:

https://fedorahosted.org/freeipa/ticket/4058
Requires patch freeipa-pspacek-0052


ACK



I must admit I don't really like wrapping a constant in the method in
the TaskNamespace object.

We're interested in the constant itself - there's no case I can imagine
where the name of the freeipa's dns package will be dynamic.

For paths we have BasePathNamespace that contains all the paths, maybe
we should introduce something similar for the non-path platform
dependent constants?


Generally I support this but it seems like a 4.3 material (and out of scope of
#4058). We need to finish 4.2 now.

Please ACK or NACK ASAP.



It's fairly straightforward to introduce a new platform namespace for
constants.

See attached patch, it implements the namespace and already contains the
proper values for the dns package name.

The original patch 274 would only need to use:

 >>> from ipaplatform.constants import constants
 >>> constants.DNS_PACKAGE_NAME
 'freeipa-server-dns'


I'm okay with that if Honza or somebody else knowledgable about the whole
platform-thingy can ACK this, amend Martin^2's patch 274 and test the whole 
thing.

Unfortunately I do not have time for it myself. If nobody does that please
push the original patch (when it's dependency pspacek-0052 gets ACK).



I think you are overengineering this a little bit, adding whatever 
ipaplatform stuff just because of an error message seems rather 
unnecessary to me. I think changing the error message to "Integrated DNS 
requires 'freeipa-server-dns' package" or even "Integrated DNS requires 
IPA DNS server package" would be perfectly fine.


BTW the location of ipa-dns-install is /usr/sbin, not /sbin.

--
Jan Cholasta

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


Re: [Freeipa-devel] [PATCH 0274] DNS: Check if dns package is installed

2015-07-02 Thread Petr Spacek
On 2.7.2015 12:57, Tomas Babej wrote:
> 
> 
> On 07/02/2015 08:50 AM, Petr Spacek wrote:
>> On 1.7.2015 20:29, Tomas Babej wrote:
>>>
>>>
>>> On 07/01/2015 04:45 PM, Petr Spacek wrote:
 On 1.7.2015 15:32, Martin Basti wrote:
> https://fedorahosted.org/freeipa/ticket/4058
> Requires patch freeipa-pspacek-0052

 ACK

>>>
>>> I must admit I don't really like wrapping a constant in the method in
>>> the TaskNamespace object.
>>>
>>> We're interested in the constant itself - there's no case I can imagine
>>> where the name of the freeipa's dns package will be dynamic.
>>>
>>> For paths we have BasePathNamespace that contains all the paths, maybe
>>> we should introduce something similar for the non-path platform
>>> dependent constants?
>>
>> Generally I support this but it seems like a 4.3 material (and out of scope 
>> of
>> #4058). We need to finish 4.2 now.
>>
>> Please ACK or NACK ASAP.
>>
> 
> It's fairly straightforward to introduce a new platform namespace for
> constants.
> 
> See attached patch, it implements the namespace and already contains the
> proper values for the dns package name.
> 
> The original patch 274 would only need to use:
> 
> >>> from ipaplatform.constants import constants
> >>> constants.DNS_PACKAGE_NAME
> 'freeipa-server-dns'

I'm okay with that if Honza or somebody else knowledgable about the whole
platform-thingy can ACK this, amend Martin^2's patch 274 and test the whole 
thing.

Unfortunately I do not have time for it myself. If nobody does that please
push the original patch (when it's dependency pspacek-0052 gets ACK).

-- 
Petr^2 Spacek

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


Re: [Freeipa-devel] [PATCH 0274] DNS: Check if dns package is installed

2015-07-02 Thread Tomas Babej


On 07/02/2015 08:50 AM, Petr Spacek wrote:
> On 1.7.2015 20:29, Tomas Babej wrote:
>>
>>
>> On 07/01/2015 04:45 PM, Petr Spacek wrote:
>>> On 1.7.2015 15:32, Martin Basti wrote:
 https://fedorahosted.org/freeipa/ticket/4058
 Requires patch freeipa-pspacek-0052
>>>
>>> ACK
>>>
>>
>> I must admit I don't really like wrapping a constant in the method in
>> the TaskNamespace object.
>>
>> We're interested in the constant itself - there's no case I can imagine
>> where the name of the freeipa's dns package will be dynamic.
>>
>> For paths we have BasePathNamespace that contains all the paths, maybe
>> we should introduce something similar for the non-path platform
>> dependent constants?
> 
> Generally I support this but it seems like a 4.3 material (and out of scope of
> #4058). We need to finish 4.2 now.
> 
> Please ACK or NACK ASAP.
> 

It's fairly straightforward to introduce a new platform namespace for
constants.

See attached patch, it implements the namespace and already contains the
proper values for the dns package name.

The original patch 274 would only need to use:

>>> from ipaplatform.constants import constants
>>> constants.DNS_PACKAGE_NAME
'freeipa-server-dns'

Tomas
>From 64578186b73a73f428f2505570551db05a2f98dc Mon Sep 17 00:00:00 2001
From: Tomas Babej 
Date: Thu, 2 Jul 2015 12:38:43 +0200
Subject: [PATCH] ipaplatform: Add constants submodule

Introduce a ipaplatform/constants.py file to store platform related
constants, which are not paths.
---
 Makefile|  3 ++-
 freeipa.spec.in |  2 ++
 ipaplatform/base/constants.py   | 11 +++
 ipaplatform/fedora/constants.py | 16 
 ipaplatform/redhat/constants.py | 17 +
 ipaplatform/rhel/constants.py   | 16 
 6 files changed, 64 insertions(+), 1 deletion(-)
 create mode 100644 ipaplatform/base/constants.py
 create mode 100644 ipaplatform/fedora/constants.py
 create mode 100644 ipaplatform/redhat/constants.py
 create mode 100644 ipaplatform/rhel/constants.py

diff --git a/Makefile b/Makefile
index abf58382960099a54b8920dd0e741b9fda17682f..3c81466d3728022c1d9cf5bb216990f14a59b7e5 100644
--- a/Makefile
+++ b/Makefile
@@ -159,10 +159,11 @@ 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; \
+		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/freeipa.spec.in b/freeipa.spec.in
index de250d8843506acd6109525c0630132fe60e2268..7d9852c1941bfed17ca06e18d0b3486565b42ba5 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -362,6 +362,7 @@ rm -f ipapython/version.py
 rm -f ipaplatform/services.py
 rm -f ipaplatform/tasks.py
 rm -f ipaplatform/paths.py
+rm -f ipaplatform/constants.py
 make version-update
 cd ipa-client; ../autogen.sh --prefix=%{_usr} --sysconfdir=%{_sysconfdir} --localstatedir=%{_localstatedir} --libdir=%{_libdir} --mandir=%{_mandir}; cd ..
 %if ! %{ONLY_CLIENT}
@@ -384,6 +385,7 @@ rm -f ipapython/version.py
 rm -f ipaplatform/services.py
 rm -f ipaplatform/tasks.py
 rm -f ipaplatform/paths.py
+rm -f ipaplatform/constants.py
 make version-update
 %if ! %{ONLY_CLIENT}
 make install DESTDIR=%{buildroot}
diff --git a/ipaplatform/base/constants.py b/ipaplatform/base/constants.py
new file mode 100644
index ..ffcfd1f2ab64338622408d798bd5db158ea36a6c
--- /dev/null
+++ b/ipaplatform/base/constants.py
@@ -0,0 +1,11 @@
+#
+# Copyright (C) 2015  FreeIPA Contributors see COPYING for license
+#
+
+'''
+This base platform module exports platform dependant constants.
+'''
+
+
+class BaseConstantsNamespace(object):
+DNS_PACKAGE_NAME = "freeipa-server-dns"
diff --git a/ipaplatform/fedora/constants.py b/ipaplatform/fedora/constants.py
new file mode 100644
index ..ce03f58cf95be1a72a9ce3da65e6d21ef193cefe
--- /dev/null
+++ b/ipaplatform/fedora/constants.py
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2015  FreeIPA Contributors see COPYING for license
+#
+
+'''
+This Fedora base platform module exports platform related constants.
+'''
+
+# Fallback to default constant definitions
+from ipaplatform.redhat.constants import RedHatConstantsNamespace
+
+
+class FedoraConstantsNamespace(RedHatConstantsNamespace):
+pass
+
+constants = FedoraConstantsNamespace()
diff --git a/ipaplatform/redhat/constants.py b/ipaplatform/redhat/constants.py
new file mode 100644
index 00

Re: [Freeipa-devel] [PATCH 0274] DNS: Check if dns package is installed

2015-07-01 Thread Petr Spacek
On 1.7.2015 20:29, Tomas Babej wrote:
> 
> 
> On 07/01/2015 04:45 PM, Petr Spacek wrote:
>> On 1.7.2015 15:32, Martin Basti wrote:
>>> https://fedorahosted.org/freeipa/ticket/4058
>>> Requires patch freeipa-pspacek-0052
>>
>> ACK
>>
> 
> I must admit I don't really like wrapping a constant in the method in
> the TaskNamespace object.
> 
> We're interested in the constant itself - there's no case I can imagine
> where the name of the freeipa's dns package will be dynamic.
> 
> For paths we have BasePathNamespace that contains all the paths, maybe
> we should introduce something similar for the non-path platform
> dependent constants?

Generally I support this but it seems like a 4.3 material (and out of scope of
#4058). We need to finish 4.2 now.

Please ACK or NACK ASAP.

-- 
Petr^2 Spacek

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


Re: [Freeipa-devel] [PATCH 0274] DNS: Check if dns package is installed

2015-07-01 Thread Tomas Babej


On 07/01/2015 04:45 PM, Petr Spacek wrote:
> On 1.7.2015 15:32, Martin Basti wrote:
>> https://fedorahosted.org/freeipa/ticket/4058
>> Requires patch freeipa-pspacek-0052
> 
> ACK
> 

I must admit I don't really like wrapping a constant in the method in
the TaskNamespace object.

We're interested in the constant itself - there's no case I can imagine
where the name of the freeipa's dns package will be dynamic.

For paths we have BasePathNamespace that contains all the paths, maybe
we should introduce something similar for the non-path platform
dependent constants?

Tomas

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


Re: [Freeipa-devel] [PATCH 0274] DNS: Check if dns package is installed

2015-07-01 Thread Petr Spacek
On 1.7.2015 15:32, Martin Basti wrote:
> https://fedorahosted.org/freeipa/ticket/4058
> Requires patch freeipa-pspacek-0052

ACK

-- 
Petr^2 Spacek

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