Bug 204231 - [patch] lang/jython: Fix numerous bugs and update to 2.7.0
Summary: [patch] lang/jython: Fix numerous bugs and update to 2.7.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Ruslan Makhmatkhanov
URL: https://reviews.freebsd.org/D4073
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-11-02 22:02 UTC by Serhii (Sergey) Kozlov
Modified: 2015-11-23 11:50 UTC (History)
2 users (show)

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


Attachments
Patch to 2.7.0 (151.88 KB, patch)
2015-11-02 22:02 UTC, Serhii (Sergey) Kozlov
no flags Details | Diff
poudriere testport log for 2.7.0 (644.08 KB, text/plain)
2015-11-02 22:04 UTC, Serhii (Sergey) Kozlov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Serhii (Sergey) Kozlov freebsd_committer freebsd_triage 2015-11-02 22:02:29 UTC
Created attachment 162715 [details]
Patch to 2.7.0

* Update to 2.7.0
* Update distinfo
* Change MASTER_SITES to use https and modern mirror as suggested by [1]
* Jython uses two licenses, indicate that in the port. Extract the licenses from the jar earlier so ports framework can find them
* The port complains when trying to build with openjdk6, so set JAVE_VERSION to 1.7+
* Mark NO_ARCH
* Null the PATH for installer invocation. If installer finds python2.7 in PATH it installs python wrapper script instead of bash one. [2]
* Exclude "ensurepip" module from the installation as it doesn't build on FreeBSD
* Change kinda dirty and not obvious replacement of "-cl"(asspath) to addition to JAVA_OPTS. This hack is needed to place jython cachedir into user's home directory, as it needs to be writable by the user invoking jython
* Write comments to not obvious parts of the installation
* Wrapper script is now placed in bin/ directory in JYTHON_PREFIX rather then in root, fix that
* Jython uses *$py.class files as an analog for *.pyc ones in plain Python, installer puts pre-compiled *$py.class files into the STAGEDIR. We need to recompile that because, after installation: 1) If we invoke Jython as user - it can't use the *$py.class files as they have different source path inside, slowing down the startup; 2) If we invoke jython as root - it will recompile the *$py.class files breaking the de-installation process of the package. Compilation phase always have non-portrelated errors, so we need to ignore it's exit code
* Don't ignore the exit code of symlink installation as we don't expect that to fail

[1] https://central.maven.org/
[2] https://hg.python.org/jython/file/tip/installer/src/java/org/python/util/install/StartScriptGenerator.java#l22
Comment 1 Serhii (Sergey) Kozlov freebsd_committer freebsd_triage 2015-11-02 22:04:47 UTC
Created attachment 162716 [details]
poudriere testport log for 2.7.0
Comment 2 Serhii (Sergey) Kozlov freebsd_committer freebsd_triage 2015-11-02 22:17:32 UTC
Revision: https://reviews.freebsd.org/D4073
Changes: https://hg.python.org/jython/file/412a8f9445f7/NEWS
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-11-20 22:14:48 UTC
A commit references this bug:

Author: rm
Date: Fri Nov 20 22:14:01 UTC 2015
New revision: 402105
URL: https://svnweb.freebsd.org/changeset/ports/402105

Log:
  lang/jython: update to 2.7.0

  - update to 2.7.0
  - change MASTER_SITES to use https and modern mirror as suggested by [1]
  - Jython uses two licenses, indicate that in the port. Extract the licenses from
    the jar earlier so ports framework can find them
  - the port complains when trying to build with openjdk6, so set JAVA_VERSION
    to 1.7+
  - mark NO_ARCH
  - null the PATH for installer invocation. If installer finds python2.7 in PATH
    it installs python wrapper script instead of bash one. [2]
  - exclude "ensurepip" module from the installation as it doesn't build on FreeBSD
  - change kinda dirty and not obvious replacement of "-cl"(asspath) to addition
    to JAVA_OPTS. This hack is needed to place jython cachedir into user's home
    directory, as it needs to be writable by the user invoking jython
  - write comments to not obvious parts of the installation
  - wrapper script is now placed in bin/ directory in JYTHON_PREFIX rather then
    in root, fix that
  - Jython uses *$py.class files as an analog for *.pyc ones in plain Python,
    installer puts pre-compiled *$py.class files into the STAGEDIR. We need to
    recompile that because, after installation:
    1) If we invoke Jython as user - it can't use the *$py.class files as they
       have different source path inside, slowing down the startup;
    2) If we invoke jython as root - it will recompile the *$py.class files
       breaking the de-installation process of the package. Compilation phase
       always have non-portrelated errors, so we need to ignore it's exit code
  - Don't ignore the exit code of symlink installation as we don't expect that to fail

  [1] https://central.maven.org/
  [2] https://hg.python.org/jython/file/tip/installer/src/java/org/python/util/install/StartScriptGenerator.java#l22

  PR:		204231
  Submitted by:	Sergey Kozlov <kozlov.sergey.404@gmail.com>

Changes:
  head/lang/jython/Makefile
  head/lang/jython/distinfo
  head/lang/jython/pkg-plist
Comment 4 Ruslan Makhmatkhanov freebsd_committer freebsd_triage 2015-11-20 22:15:18 UTC
Excellent work, Sergey! Committed, thank you!
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-21 00:23:34 UTC
Assign to committer that resolved.

@Ruslan Does this need to be merged (MFH) to quarterly. Please set merge-quarterly flag accordingly
Comment 6 Ruslan Makhmatkhanov freebsd_committer freebsd_triage 2015-11-23 11:47:56 UTC
@koobs It wasn't requested by submitter, so I'd skip it from MVH for the case if any bugs will be exposed.
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-23 11:50:31 UTC
Restore original resolution, set merge-quarterly according to comment 6