>From 2280a4c4fee63e2b79be57fbbecebc1344f65c4a Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Mon, 5 Oct 2015 08:06:45 +0200 Subject: [PATCH] BUILD: Avoid symlinks with python modules We need to use different names for python{2,3} modules if we want to build them in the same time with automake (prefix _py2 and _py3). But resulting name need to correspond with name of module because it is used in C import function. We used symbolic links for that purpose but it breaks debian python tools which rename the real modules making symbolic links to point nowhere Resolves: https://fedorahosted.org/sssd/ticket/2814 --- Makefile.am | 16 ++++++++-------- contrib/sssd.spec.in | 8 -------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/Makefile.am b/Makefile.am index ce3166716eab20c7b98005faf938f32458dbd673..b12fa86cc75cbdb9489917c2bf4281f1981fc20f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3523,10 +3523,10 @@ if BUILD_PYTHON2_BINDINGS --record=$(abs_builddir)/src/config/.files2 --root=$(DESTDIR); \ fi cd $(DESTDIR)$(py2execdir) && \ - $(LN_S) -f _py2sss.so pysss.so ; \ - $(LN_S) -f _py2hbac.so pyhbac.so ; \ - $(LN_S) -f _py2sss_murmur.so pysss_murmur.so ; \ - $(LN_S) -f _py2sss_nss_idmap.so pysss_nss_idmap.so + mv -f _py2sss.so pysss.so ; \ + mv -f _py2hbac.so pyhbac.so ; \ + mv -f _py2sss_murmur.so pysss_murmur.so ; \ + mv -f _py2sss_nss_idmap.so pysss_nss_idmap.so endif if BUILD_PYTHON3_BINDINGS if [ "$(DESTDIR)" = "" ]; then \ @@ -3541,10 +3541,10 @@ if BUILD_PYTHON3_BINDINGS --record=$(abs_builddir)/src/config/.files3 --root=$(DESTDIR); \ fi cd $(DESTDIR)$(py3execdir) && \ - $(LN_S) -f _py3sss.so pysss.so ; \ - $(LN_S) -f _py3hbac.so pyhbac.so ; \ - $(LN_S) -f _py3sss_murmur.so pysss_murmur.so ; \ - $(LN_S) -f _py3sss_nss_idmap.so pysss_nss_idmap.so + mv -f _py3sss.so pysss.so ; \ + mv -f _py3hbac.so pyhbac.so ; \ + mv -f _py3sss_murmur.so pysss_murmur.so ; \ + mv -f _py3sss_nss_idmap.so pysss_nss_idmap.so endif for doc in $(SSSD_DOCS); do \ $(MKDIR_P) $$doc $(DESTDIR)/$(docdir); \ diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in index 63c107c1ea1eb30ffed4dc7bbecd137548dc470a..d377af4c8c7049faea02adf021c9be976ab75a22 100644 --- a/contrib/sssd.spec.in +++ b/contrib/sssd.spec.in @@ -867,25 +867,21 @@ rm -rf $RPM_BUILD_ROOT %files -n python-sss %defattr(-,root,root,-) %{python2_sitearch}/pysss.so -%{python2_sitearch}/_py2sss.so %if (0%{?with_python3} == 1) %files -n python3-sss %defattr(-,root,root,-) %{python3_sitearch}/pysss.so -%{python3_sitearch}/_py3sss.so %endif %files -n python-sss-murmur %defattr(-,root,root,-) %{python2_sitearch}/pysss_murmur.so -%{python2_sitearch}/_py2sss_murmur.so %if (0%{?with_python3} == 1) %files -n python3-sss-murmur %defattr(-,root,root,-) %{python3_sitearch}/pysss_murmur.so -%{python3_sitearch}/_py3sss_murmur.so %endif %files -n libsss_idmap @@ -927,25 +923,21 @@ rm -rf $RPM_BUILD_ROOT %files -n python-libsss_nss_idmap %defattr(-,root,root,-) %{python2_sitearch}/pysss_nss_idmap.so -%{python2_sitearch}/_py2sss_nss_idmap.so %if (0%{?with_python3} == 1) %files -n python3-libsss_nss_idmap %defattr(-,root,root,-) %{python3_sitearch}/pysss_nss_idmap.so -%{python3_sitearch}/_py3sss_nss_idmap.so %endif %files -n python-libipa_hbac %defattr(-,root,root,-) %{python2_sitearch}/pyhbac.so -%{python2_sitearch}/_py2hbac.so %if (0%{?with_python3} == 1) %files -n python3-libipa_hbac %defattr(-,root,root,-) %{python3_sitearch}/pyhbac.so -%{python3_sitearch}/_py3hbac.so %endif %files libwbclient -- 2.5.0