Bug 220302

Summary: security/zeronet: Incorrectly (implicitly) specifies support for any/all Python versions Python
Product: Ports & Packages Reporter: Peter Zuidema <peter>
Component: Individual Port(s)Assignee: Kubilay Kocak <koobs>
Status: Closed FIXED    
Severity: Affects Some People CC: koobs, python, yuri
Priority: --- Keywords: easy
Version: LatestFlags: koobs: maintainer-feedback+
koobs: merge-quarterly+
Hardware: Any   
OS: Any   
URL: https://github.com/HelloZeroNet/ZeroNet/issues/149
Attachments:
Description Flags
patch
yuri: maintainer-approval+
patch
yuri: maintainer-approval+
patch yuri: maintainer-approval+

Description Peter Zuidema 2017-06-27 11:44:37 UTC
Zeronet doesn't support Python3. See https://github.com/HelloZeroNet/ZeroNet/issues/149 for a related remark.

currently having set python=3.6 in make.conf prevents Zeronet from building. in the package python2 should be forced.
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2017-06-27 15:25:24 UTC
Created attachment 183843 [details]
patch

Thanks for pointing this out!
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2017-07-03 04:17:30 UTC
python:2 means depend on the lang/python2 port for the python2 symlink, which is not the correct way to declare version compatibility.

This can be done as USE=python:-2.7 if 2.7 is the maximum version that is supported, or USE=python:2.7 if 2.7 is the *only* version that is supported.

Also, incrementing PORTREVISION is not required.
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2017-07-03 04:35:59 UTC
Here it is meant *any python 2.X*.
Isn't python:2 the way to do it?
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2017-07-03 04:56:55 UTC
(In reply to Yuri Victorovich from comment #3)

No, it (only) means depend on python2 (the command/symlink) via lang/python2 port, exactly and only the same as if the following was declared:

RUN_DEPENDS= python2:lang/python2

The reason it's used is that it just 'happens' to result in 'a' version of Python 2.x being installed, again only implicitly via lang/python2 -> lang/pythonXY.

The root cause is a design/implementation/documentation issue in python.mk, which ended up conflating imperative dependencies with declarative version specifications and causing the ambiguity, and ultimate incorrectness in usage.

Versions should be explicitly included/listed as supported/compatible, rather than implicitly (USE=python, USE=python:2, USE=python:3), *unless* they cannot be given the current limitations of the current version specification syntax (X+, -Y, X-Y, etc).
Comment 5 Yuri Victorovich freebsd_committer freebsd_triage 2017-07-03 05:02:44 UTC
Created attachment 184027 [details]
patch

Thanks Kubilay for your explanation!
Comment 6 Yuri Victorovich freebsd_committer freebsd_triage 2017-07-03 05:03:29 UTC
Created attachment 184028 [details]
patch
Comment 7 commit-hook freebsd_committer freebsd_triage 2017-07-03 05:49:15 UTC
A commit references this bug:

Author: koobs
Date: Mon Jul  3 05:48:40 UTC 2017
New revision: 444912
URL: https://svnweb.freebsd.org/changeset/ports/444912

Log:
  security/zeronet: Limit to Python 2.7

  Zeronet doesn't support Python 3 [1]. Limit to compatible version(s) (2.7)
  accordingly.

  [1] https://github.com/HelloZeroNet/ZeroNet/issues/149

  PR:		220302
  Reported by:	Peter Zuidema <peter icebear net>
  Submitted by:	Yuri Victorovich <yuri rawbw com> (maintainer)
  MFH:		2017Q3

Changes:
  head/security/zeronet/Makefile
Comment 8 commit-hook freebsd_committer freebsd_triage 2017-07-03 05:51:19 UTC
A commit references this bug:

Author: koobs
Date: Mon Jul  3 05:50:40 UTC 2017
New revision: 444913
URL: https://svnweb.freebsd.org/changeset/ports/444913

Log:
  MFH: r444912 security/zeronet: Limit to Python 2.7

  Zeronet doesn't support Python 3 [1]. Limit to compatible version(s) (2.7)
  accordingly.

  [1] https://github.com/HelloZeroNet/ZeroNet/issues/149

  PR:		220302
  Reported by:	Peter Zuidema <peter icebear net>
  Submitted by:	Yuri Victorovich <yuri rawbw com> (maintainer)

  Approved by:	ports-secteam (blanket)

Changes:
_U  branches/2017Q3/
  branches/2017Q3/security/zeronet/Makefile
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2017-07-03 05:52:12 UTC
Committed and merged to quarterly. Thank you Peter, Yuri