Bug 204972 - net/samba42: conflicting Python dependencies
Summary: net/samba42: conflicting Python dependencies
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-python (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-02 17:55 UTC by bugs.freebsd.org-qym4
Modified: 2018-02-25 22:11 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (timur)


Attachments
Poudriere build log (14.51 KB, text/plain)
2016-04-14 11:37 UTC, Miroslav Lachman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description bugs.freebsd.org-qym4 2015-12-02 17:55:13 UTC
net/samba42/Makefile:

    USES= cpe compiler waf pkgconfig perl5 python:2 \
          execinfo readline iconv shebangfix

    BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}dnspython>=1.9.4:${PORTSDIR}/dns/py-dnspython
    RUN_DEPENDS+=   ${PYTHON_PKGNAMEPREFIX}dnspython>=1.9.4:${PORTSDIR}/dns/py-dnspython


Setting DEFAULT_VERSIONS=python=3.5 in /etc/make.conf results in dns/py-dnspython being built as py35-dnspython-1.12.0.txz. Installing the generated samba42 package then fails with 

    pkg: samba42 has a missing dependency: py27-dnspython



Regards
Comment 1 Timur I. Bakeyev freebsd_committer freebsd_triage 2015-12-07 03:08:47 UTC
That's really weird, but as a Samba maintainer I can't do much...

I'd rather ask Python maintainer/portmaster for the possible fix.

I'd guess that PYTHON_PKGNAMEPREFIX in the port build stage should be in sync with USES and build appropriate version...
Comment 2 Miroslav Lachman 2016-04-14 11:35:49 UTC
I run in to this problem too. 
Can somebody with proper knowledge look in to this problem?

I have python=3.4 in make.conf and want to build samba42. I tried it in poudriere. I don't know why py34-dnspython-1.12.0 is installed instead of py27-dnspython-1.12.0 which is required.

===>   samba42-4.2.7_2 depends on package: p5-Parse-Pidl>=4.0.0 - found
===>   Returning to build of samba42-4.2.7_2
===>   samba42-4.2.7_2 depends on package: py27-dnspython>=1.9.4 - not found
===>   Installing existing package /packages/All/py34-dnspython-1.12.0.txz
[10_2_amd64-default-global-job-01] Installing py34-dnspython-1.12.0...
[10_2_amd64-default-global-job-01] `-- Installing python34-3.4.4_1...
[10_2_amd64-default-global-job-01] |   `-- Installing libffi-3.2.1...
[10_2_amd64-default-global-job-01] |   | `-- Installing indexinfo-0.2.4...
[10_2_amd64-default-global-job-01] |   | `-- Extracting indexinfo-0.2.4: .... done
[10_2_amd64-default-global-job-01] |   `-- Extracting libffi-3.2.1: .......... done
[10_2_amd64-default-global-job-01] `-- Extracting python34-3.4.4_1: .......... done
[10_2_amd64-default-global-job-01] `-- Installing py34-setuptools34-20.0...
[10_2_amd64-default-global-job-01] `-- Extracting py34-setuptools34-20.0: .......... done
[10_2_amd64-default-global-job-01] Extracting py34-dnspython-1.12.0: .......... done
Comment 3 Miroslav Lachman 2016-04-14 11:37:03 UTC
Created attachment 169311 [details]
Poudriere build log

Failure log
Comment 4 bugs.freebsd.org-qym4 2016-08-21 12:14:50 UTC
Hi,

I have checked the latest behaviour of net/samba43 on 11.0-RC1. Here's what happens:

===>  Installing for py27-dnspython-1.14.0
===>  Checking if py27-dnspython already installed
===>   Registering installation for py27-dnspython-1.14.0 as automatic
Installing py27-dnspython-1.14.0...
===>   samba43-4.3.11_1 depends on package: py27-dnspython>=1.9.4 - found

When building net/samba43, py-dnspython gets correctly built as py27-dnspython. Later in the build, everything still looks OK:

===>  Staging for samba43-4.3.11_1
===>   samba43-4.3.11_1 depends on package: libarchive>=3.1.2 - found
===>   samba43-4.3.11_1 depends on package: py27-dnspython>=1.9.4 - found
===>   samba43-4.3.11_1 depends on package: py27-iso8601>=0.1.11 - found
===>   samba43-4.3.11_1 depends on package: talloc>=2.1.5 - found
===>   samba43-4.3.11_1 depends on package: tevent>=0.9.28 - found
===>   samba43-4.3.11_1 depends on package: tdb>=1.3.8 - found
===>   samba43-4.3.11_1 depends on package: ldb>=1.1.24 - found
===>   samba43-4.3.11_1 depends on file: /usr/local/bin/python2.7 - found
===>   samba43-4.3.11_1 depends on executable: python2 - found

However, when the final packages are built, things go wrong:

'install' finished successfully (1m2.561s)
install  -m 0644 /usr/obj/usr/ports/net/samba43/work/README.FreeBSD /usr/obj/usr/ports/net/samba43/work/stage/usr/local/share/doc/samba43
====> Compressing man pages (compress-man)
===> Staging rc.d startup script(s)
===>  Building package for samba43-4.3.11_1
===>  Building package for libarchive-3.2.1,1
===>  Building package for libiconv-1.14_9
===>  Building package for liblz4-131
===>  Building package for lzo2-2.09
===>  Building package for p5-Parse-Pidl-4.3.11
===>  Building package for p5-Parse-Yapp-1.05_2
===>  Building package for py35-dnspython-1.14.0
                           ^^^^^^^^^^^^^^^^^^^^^
===>  Building package for py35-iso8601-0.1.11
                           ^^^^^^^^^^^^^^^^^^^
===>  Building package for talloc-2.1.6
===>  Building package for python27-2.7.12
===>  Building package for python2-2_3
===>  Building package for tevent-0.9.28
===>  Building package for tdb-1.3.9,1
===>  Building package for ldb-1.1.26
===>  Building package for popt-1.16_1
===>  Building package for libinotify-20160505
===>  Building package for gnutls-3.4.14
===>  Building package for nettle-3.2
===>  Building package for gmp-5.1.3_3
===>  Building package for libtasn1-4.9
===>  Building package for libidn-1.33_1
===>  Building package for p11-kit-0.23.2
===>  Building package for libsunacl-1.0
===>  Building package for gamin-0.1.10_8
===>  Building package for gettext-tools-0.19.8.1
===>  Building package for gettext-runtime-0.19.8.1
===>  Building package for glib-2.46.2_2

We end up with a wrong package, but which contains the right contents:

# tar tvf py35-dnspython-1.14.0.txz | head -n 5
-rw-r--r--  0 root   wheel    1006 Jan  1  1970 +COMPACT_MANIFEST
-rw-r--r--  0 root   wheel   38895 Jan  1  1970 +MANIFEST
-rw-r--r--  0 root   wheel   52809 Aug 21 02:05 /usr/local/share/doc/py27-dnspython/ChangeLog
-rw-r--r--  0 root   wheel   17414 Aug 21 02:05 /usr/local/share/doc/py27-dnspython/README.md
-rw-r--r--  0 root   wheel    1204 Aug 21 02:05 /usr/local/share/examples/py27-dnspython/ddns.py
#

Best regards
Comment 5 Miroslav Lachman 2016-08-22 10:23:21 UTC
(In reply to bugs.freebsd.org-qym4 from comment #4)

This is really crazy thing!

I started to modify those 2 ports. I use USES= python:2 instead of USES= python but it can't work globally. 
It should be fixed by Python team in Mk/Uses/python.mk or something like this.
Comment 6 Walter Schwarzenfeld freebsd_triage 2018-01-12 11:32:20 UTC
net/samba42|net/samba44|2017-06-07|Has expired: not supported upstream https://wiki.samba.org/index.php/Samba_Release_Planning

Please, close the PR.