Hi,
On 6.11.2015 13:07, Petr Viktorin wrote:
Hello,
The Python 3 port is not 100% done, but I think the time has come to
start packaging the py3 bits. This will make it easier to plug into CI.
The existing Python 2 packages should not change, except I've added
"freeipa-common" with files that aren't Python-specific.
The new packages follow Fedora's Python guidelines a bit better. The
main thing is the names: python3-ipalib, python3-ipatests,
python3-ipap11helper.
The pure-Python ones are built as noarch.
The Makefiles are reorganized a bit, but they don't support building for
both py versions at once -- you need to do `make` followed by `make
PYTHON=/usr/bin/python3`. (The latter currently only works in the
directories that are ported so far, though.)
Thanks for the patch.
1) The freeipa-common subpackage is not necessary: /etc/ipa/dnssec
should be owned by freeipa-server and everything else in /etc/ipa
currently owned by freeipa-python should be owned by freeipa-client.
This should be a separate patch. I have prepared one, see attachment.
2) IMO this patch does too much, it should only add the Python 3
equivalent of freeipa-python - python3-ipalib - but none of the other
packages/provides.
3) Speaking of freeipa-python, it should be renamed to python-ipalib,
for consistency.
This should also be a separate patch, again see attachment.
4) There should be a python3-devel (and also other python3- equivalents
of python- packages) BuildRequires when Python 3 support is enabled.
5) This line in ipapython/ipap11helper/Makefile uses a Python 2 print
statement:
PYTHONLIBDIR ?= $(shell $(PYTHON) -c "from distutils.sysconfig import *;
print get_python_lib()")
6) The ipalib Makefile is missing the "check" target (see ipapython
Makefile).
Honza
--
Jan Cholasta
From 560751d13e9f75d798d2f7da706b2486129577f5 Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jchol...@redhat.com>
Date: Thu, 26 Nov 2015 10:52:07 +0100
Subject: [PATCH 1/2] spec file: remove non-Python files from freeipa-python
/etc/ipa/dnssec is now owned by freeipa-server. The remaining files are now
owned by freeipa-client.
---
freeipa.spec.in | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/freeipa.spec.in b/freeipa.spec.in
index d66b0ff..a09dd86 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -502,6 +502,9 @@ install daemons/dnssec/ipa-ods-exporter %{buildroot}%{_libexecdir}/ipa/ipa-ods-e
# Web UI plugin dir
mkdir -p %{buildroot}%{_usr}/share/ipa/ui/js/plugins
+# DNSSEC config
+mkdir -p %{buildroot}%{_sysconfdir}/ipa/dnssec
+
# KDC proxy config (Apache config sets KDCPROXY_CONFIG to load this file)
mkdir -p %{buildroot}%{_sysconfdir}/ipa/kdcproxy/
install -m 644 install/share/kdcproxy.conf %{buildroot}%{_sysconfdir}/ipa/kdcproxy/kdcproxy.conf
@@ -535,7 +538,6 @@ mkdir -p %{buildroot}/%{_localstatedir}/lib/ipa/backup
mkdir -p %{buildroot}%{_sysconfdir}/ipa/
/bin/touch %{buildroot}%{_sysconfdir}/ipa/default.conf
/bin/touch %{buildroot}%{_sysconfdir}/ipa/ca.crt
-mkdir -p %{buildroot}%{_sysconfdir}/ipa/dnssec
mkdir -p %{buildroot}%{_sysconfdir}/ipa/nssdb
mkdir -p %{buildroot}/%{_localstatedir}/lib/ipa-client/sysrestore
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
@@ -839,6 +841,7 @@ fi
%ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/httpd/conf.d/ipa-kdc-proxy.conf
%ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/httpd/conf.d/ipa-pki-proxy.conf
%ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/ipa/kdcproxy/ipa-kdc-proxy.conf
+%dir %attr(0755,root,root) %{_sysconfdir}/ipa/dnssec
%{_usr}/share/ipa/ipa.conf
%{_usr}/share/ipa/ipa-rewrite.conf
%{_usr}/share/ipa/ipa-pki-proxy.conf
@@ -927,6 +930,15 @@ fi
%{_sbindir}/ipa-getkeytab
%{_sbindir}/ipa-rmkeytab
%{_sbindir}/ipa-join
+%dir %attr(0755,root,root) %{_sysconfdir}/ipa/
+%ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/ipa/default.conf
+%ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/ipa/ca.crt
+%dir %attr(0755,root,root) %{_sysconfdir}/ipa/nssdb
+%ghost %config(noreplace) %{_sysconfdir}/ipa/nssdb/cert8.db
+%ghost %config(noreplace) %{_sysconfdir}/ipa/nssdb/key3.db
+%ghost %config(noreplace) %{_sysconfdir}/ipa/nssdb/secmod.db
+%ghost %config(noreplace) %{_sysconfdir}/ipa/nssdb/pwdfile.txt
+%ghost %config(noreplace) %{_sysconfdir}/pki/ca-trust/source/ipa.p11-kit
%dir %{_usr}/share/ipa
%dir %{_localstatedir}/lib/ipa-client
%dir %{_localstatedir}/lib/ipa-client/sysrestore
@@ -971,16 +983,6 @@ fi
%{python_sitelib}/ipaplatform-*.egg-info
%{python_sitearch}/python_default_encoding-*.egg-info
%{python_sitearch}/_ipap11helper-*.egg-info
-%dir %attr(0755,root,root) %{_sysconfdir}/ipa/
-%ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/ipa/default.conf
-%ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/ipa/ca.crt
-%dir %attr(0755,root,root) %{_sysconfdir}/ipa/nssdb
-%dir %attr(0755,root,root) %{_sysconfdir}/ipa/dnssec
-%ghost %config(noreplace) %{_sysconfdir}/ipa/nssdb/cert8.db
-%ghost %config(noreplace) %{_sysconfdir}/ipa/nssdb/key3.db
-%ghost %config(noreplace) %{_sysconfdir}/ipa/nssdb/secmod.db
-%ghost %config(noreplace) %{_sysconfdir}/ipa/nssdb/pwdfile.txt
-%ghost %config(noreplace) %{_sysconfdir}/pki/ca-trust/source/ipa.p11-kit
%if ! %{ONLY_CLIENT}
%files tests -f tests-python.list
--
2.4.3
From ec95a254df186acfb3ea9aa5b41f84eb62bd882c Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jchol...@redhat.com>
Date: Thu, 26 Nov 2015 11:13:56 +0100
Subject: [PATCH 2/2] spec file: rename freeipa-python to python-ipalib
---
Makefile | 12 +++++-------
freeipa.spec.in | 20 +++++++++++---------
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/Makefile b/Makefile
index d2c37f1..36618a5 100644
--- a/Makefile
+++ b/Makefile
@@ -3,8 +3,6 @@ include VERSION
SUBDIRS=asn1 daemons install ipapython ipa-client
CLIENTDIRS=ipapython ipa-client asn1
-PRJ_PREFIX=freeipa
-
RPMBUILD ?= $(PWD)/rpmbuild
TARGET ?= master
@@ -236,21 +234,21 @@ rpmdistdir:
rpms: rpmroot rpmdistdir version-update lint tarballs
cp dist/sources/$(TARBALL) $(RPMBUILD)/SOURCES/.
rpmbuild --define "_topdir $(RPMBUILD)" -ba freeipa.spec
- cp $(RPMBUILD)/RPMS/*/$(PRJ_PREFIX)-*-$(IPA_VERSION)-*.rpm dist/rpms/
- cp $(RPMBUILD)/SRPMS/$(PRJ_PREFIX)-$(IPA_VERSION)-*.src.rpm dist/srpms/
+ cp $(RPMBUILD)/RPMS/*/*-$(IPA_VERSION)-*.rpm dist/rpms/
+ cp $(RPMBUILD)/SRPMS/*-$(IPA_VERSION)-*.src.rpm dist/srpms/
rm -rf $(RPMBUILD)
client-rpms: rpmroot rpmdistdir version-update lint tarballs
cp dist/sources/$(TARBALL) $(RPMBUILD)/SOURCES/.
rpmbuild --define "_topdir $(RPMBUILD)" --define "ONLY_CLIENT 1" -ba freeipa.spec
- cp $(RPMBUILD)/RPMS/*/$(PRJ_PREFIX)-*-$(IPA_VERSION)-*.rpm dist/rpms/
- cp $(RPMBUILD)/SRPMS/$(PRJ_PREFIX)-$(IPA_VERSION)-*.src.rpm dist/srpms/
+ cp $(RPMBUILD)/RPMS/*/*-$(IPA_VERSION)-*.rpm dist/rpms/
+ cp $(RPMBUILD)/SRPMS/*-$(IPA_VERSION)-*.src.rpm dist/srpms/
rm -rf $(RPMBUILD)
srpms: rpmroot rpmdistdir version-update lint tarballs
cp dist/sources/$(TARBALL) $(RPMBUILD)/SOURCES/.
rpmbuild --define "_topdir $(RPMBUILD)" -bs freeipa.spec
- cp $(RPMBUILD)/SRPMS/$(PRJ_PREFIX)-$(IPA_VERSION)-*.src.rpm dist/srpms/
+ cp $(RPMBUILD)/SRPMS/*-$(IPA_VERSION)-*.src.rpm dist/srpms/
rm -rf $(RPMBUILD)
diff --git a/freeipa.spec.in b/freeipa.spec.in
index a09dd86..009723a 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -113,7 +113,7 @@ and integration with Active Directory based infrastructures (Trusts).
%package server
Summary: The IPA authentication server
Group: System Environment/Base
-Requires: %{name}-python = %{version}-%{release}
+Requires: python-ipalib = %{version}-%{release}
Requires: %{name}-client = %{version}-%{release}
Requires: %{name}-admintools = %{version}-%{release}
Requires: 389-ds-base >= 1.3.4.4
@@ -254,7 +254,7 @@ dependencies at once.
%package client
Summary: IPA authentication for use on clients
Group: System Environment/Base
-Requires: %{name}-python = %{version}-%{release}
+Requires: python-ipalib = %{version}-%{release}
Requires: python-ldap
Requires: cyrus-sasl-gssapi%{?_isa}
Requires: ntp
@@ -295,7 +295,7 @@ installed on every client machine.
%package admintools
Summary: IPA administrative tools
Group: System Environment/Base
-Requires: %{name}-python = %{version}-%{release}
+Requires: python-ipalib = %{version}-%{release}
Requires: %{name}-client = %{version}-%{release}
Requires: python-ldap
@@ -311,7 +311,7 @@ features for further integration with Linux based clients (SUDO, automount)
and integration with Active Directory based infrastructures (Trusts).
This package provides command-line tools for IPA administrators.
-%package python
+%package -n python-ipalib
Summary: Python libraries used by IPA
Group: System Environment/Libraries
Requires: python-gssapi >= 1.1.2
@@ -335,11 +335,13 @@ Requires: python-setuptools
Requires: python-six
Requires: python-jwcrypto
+Provides: %{name}-python = %{version}-%{release}
+Obsoletes: %{name}-python < 4.3
+
Provides: %{alt_name}-python = %{version}
-Conflicts: %{alt_name}-python
-Obsoletes: %{alt_name}-python < %{version}
+Obsoletes: %{alt_name}-python < 4.3
-%description python
+%description -n python-ipalib
IPA is an integrated solution to provide centrally managed Identity (users,
hosts, services), Authentication (SSO, 2FA), and Authorization
(host access control, SELinux user roles, services). The solution provides
@@ -351,7 +353,7 @@ If you are using IPA, you need to install this package.
%package tests
Summary: IPA tests and test tools
Requires: %{name}-client = %{version}-%{release}
-Requires: %{name}-python = %{version}-%{release}
+Requires: python-ipalib = %{version}-%{release}
Requires: tar
Requires: xz
Requires: python-nose
@@ -960,7 +962,7 @@ fi
%config %{_sysconfdir}/bash_completion.d
%{_mandir}/man1/ipa.1.gz
-%files python -f %{gettext_domain}.lang
+%files -n python-ipalib -f %{gettext_domain}.lang
%defattr(-,root,root,-)
%doc README Contributors.txt
%license COPYING
--
2.4.3
--
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