Bug 213717

Summary: net-p2p/bitmessage: Update fixing python path
Product: Ports & Packages Reporter: Yuri Victorovich <yuri>
Component: Individual Port(s)Assignee: Dmitry Marakasov <amdmi3>
Status: Closed FIXED    
Severity: Affects Only Me CC: jbeich
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 212046    
Attachments:
Description Flags
patch yuri: maintainer-approval+

Description Yuri Victorovich freebsd_committer freebsd_triage 2016-10-23 05:01:37 UTC
Created attachment 176071 [details]
patch

The patch fixes the problem somehow committed with the previous update. For some reason python path was messed up in the patch stage.

Passes poudriere 10.3 amd64.
Comment 1 Jan Beich freebsd_committer freebsd_triage 2016-11-03 04:04:30 UTC
Comment on attachment 176071 [details]
patch

>  post-patch:
> -	@${REINPLACE_CMD} -e 's|python2|${PYTHON_CMD}| ; s|share/man|man|' \
> +	@${REINPLACE_CMD} -e 's|@PYTHON@|${PYTHON_CMD}|' \
[...]
> -+	echo 'exec /usr/local/bin/python2.7 bitmessagemain.py' >> ${DESTDIR}${PREFIX}/bin/${APP}
> ++	echo 'exec @PYTHON@ bitmessagemain.py' >> ${DESTDIR}${PREFIX}/bin/${APP}

Why not pass $(PYTHON) via MAKE_ENV then completely drop REINPLACE_CMD against ${WRKSRC}/Makefile ?

> 	@${REINPLACE_CMD} -e 's|^#!.*$$|#!${PYTHON_CMD}|' \
> 		${WRKSRC}/compiletest.py ${WRKSRC}/src/bitmessagecli.py ${WRKSRC}/src/bitmessagemain.py \
> 		${WRKSRC}/src/depends.py \

Convert to USES=shebangfix, see ports r399684 or /usr/ports/CHANGES from 20151022. Ditto for missed files:

  $ pkg info -qxl bitmessage|xargs grep '#!.*/env'
  /usr/local/share/pybitmessage/pyelliptic/cipher.py:#!/usr/bin/env python
  /usr/local/share/pybitmessage/pyelliptic/ecc.py:#!/usr/bin/env python
  /usr/local/share/pybitmessage/pyelliptic/hash.py:#!/usr/bin/env python
  /usr/local/share/pybitmessage/pyelliptic/openssl.py:#!/usr/bin/env python
  /usr/local/share/pybitmessage/qidenticon.py:#!/usr/bin/env python
  /usr/local/share/pybitmessage/singleton.py:#! /usr/bin/env python
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2016-11-03 04:07:17 UTC
The funny thing is that these shouldn't even be executables. There is one and only one executable in this port. They placed these shebangs by mistake. Some committer complained, so I added this patch. But they aren't needed altogether.
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-01-30 11:35:34 UTC
A commit references this bug:

Author: amdmi3
Date: Mon Jan 30 11:35:18 UTC 2017
New revision: 432835
URL: https://svnweb.freebsd.org/changeset/ports/432835

Log:
  - Fix python paths

  PR:		213717
  Submitted by:	yuri@rawbw.com (maintainer)
  MFH:		2017Q1

Changes:
  head/net-p2p/bitmessage/Makefile
  head/net-p2p/bitmessage/files/patch-Makefile
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-01-30 11:37:37 UTC
A commit references this bug:

Author: amdmi3
Date: Mon Jan 30 11:37:16 UTC 2017
New revision: 432836
URL: https://svnweb.freebsd.org/changeset/ports/432836

Log:
  MFH: r432835

  - Fix python paths

  PR:		213717
  Submitted by:	yuri@rawbw.com (maintainer)
  Approved by:	ports-secteam (with hat)

Changes:
_U  branches/2017Q1/
  branches/2017Q1/net-p2p/bitmessage/Makefile
  branches/2017Q1/net-p2p/bitmessage/files/patch-Makefile