Bug 220302 - security/zeronet: Incorrectly (implicitly) specifies support for any/all Python versions Python
Summary: security/zeronet: Incorrectly (implicitly) specifies support for any/all Pyth...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kubilay Kocak
URL: https://github.com/HelloZeroNet/ZeroN...
Keywords: easy
Depends on:
Blocks:
 
Reported: 2017-06-27 11:44 UTC by Peter Zuidema
Modified: 2017-07-03 05:52 UTC (History)
3 users (show)

See Also:
koobs: maintainer-feedback+
koobs: merge-quarterly+


Attachments
patch (610 bytes, patch)
2017-06-27 15:25 UTC, Yuri Victorovich
yuri: maintainer-approval+
Details | Diff
patch (612 bytes, patch)
2017-07-03 05:02 UTC, Yuri Victorovich
yuri: maintainer-approval+
Details | Diff
patch (484 bytes, patch)
2017-07-03 05:03 UTC, Yuri Victorovich
yuri: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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