Created attachment 204977 [details] Makefile.patch I get an error when I execute conkyemail. ============================================================ % conky -D -c myconkyEmail.conf ... File "/usr/local/share/conkyemail/conkyEmail.py", line 167 except Exception, e: ^ SyntaxError: invalid syntax ... ============================================================ This is because conkyemail used python of python3.6. ============================================================ % grep python /usr/local/bin/conkyEmail $PYTHONPATH /usr/bin/env python /usr/local/share/conkyemail/conkyEmail.py "$@" % python --version Python 3.6.8 % pkg info 'python*' python-3.6_3,2 python2-2_3 python27-2.7.16_1 python3-3_3 python36-3.6.8_2 ============================================================ (PYTHON_DEFAULT=3.6 is the current default.) USES=python:2.7 is specified in conkyemail/Makefile, and conkyemail needs to use python2.7. Attach a simple patch to use ${PYTHON_VERSION}. Thanks.
Thank you for the report Katsuyuki. The change should probably take the form of using USES=shabangfix, rather than a REINPLACE_CMD command
(In reply to Kubilay Kocak from comment #1) Yes, Please implement more appropriate method. But more specifically, conkyEmail(the original of conkyemail_2.07.tar.gz) is as follows. ======================================== % cat src/conkyEmail #! /bin/sh cd /usr/share/conkyemail/ $PYTHONPATH /usr/bin/python /usr/share/conkyemail/conkyEmail.py "$@" ======================================== This is not python shebang. Are there other ports that handle this case well? (By the way, it is a known original bug that $PYTHONPATH is here.) Thanks.
(In reply to Katsuyuki Miyoshi from comment #2) I did some improvements together with your patch because the port was in a rather bad shape. Would you like to adopt the port? If so, I'll add your Bugzilla email address to the MAINTAINER field.
(In reply to Kai Knoblich from comment #3) That's fine with me. Please use katsubsd@gmail.com for my email address in the MAINTAINER field. I will also change my Bugzilla email address to this one.
(In reply to Katsuyuki Miyoshi from comment #4) I have changed my Bugzilla email address to katsubsd@gmail.com.
Created attachment 205084 [details] conkyemail-2.15.patch (In reply to Katsuyuki Miyoshi from comment #5) Hi Katsuyuki, thank you for taking maintainership! Meanwhile I did some research and discovered that the latest release of desktutils/conkyemail is 2.15. I attached a new patch for 2.15 with all the required fixes/dependencies to make it work but I haven't tested it fully regarding the runtime. Can you please test the patch on occasion if everything works for you? As soon as I receive a short feedback from you I'll commit it then.
(In reply to Kai Knoblich from comment #6) Great! It works well with conkyemail-2.15.patch. If I have to say something, 1) conkyemail will not need the conky command for RUN_DEPEND. Conkyemail actually works independently of conky. 2) If we use conkyemail_2.15, we would like to use conkykeyring. The keyring function used in conkyemail_2.15 will be expected to use conkykeyring (https://launchpad.net/~conky-companions/+archive/ubuntu/ppa/+sourcefiles/conkykeyring/1.01/conkykeyring_1.01.tar.gz). However, conkykeyring does not exist in FreeBSD ports collection. Thanks.
(In reply to Katsuyuki Miyoshi from comment #7) Thank you for testing the update and your suggestions. Point 1) can be easily fixed and I'll do that when committing the patch. Point 2) should be also no problem. Question here is: Would you like to give it a try to port conkykeyring by yourself? If so, please open a new PR with the attached patch / shar file. If not, it's also fine. Then I'll add that port during this week to the ports tree. Don't hesitate to ask if there are any questions.
(In reply to Kai Knoblich from comment #8) Thank you for your response. > Would you like to give it a try to port conkykeyring by yourself? I'm afraid it is a little difficult for me. I would be grateful if you would port conkykeyring.
A commit references this bug: Author: kai Date: Sun Jun 23 22:32:34 UTC 2019 New revision: 504995 URL: https://svnweb.freebsd.org/changeset/ports/504995 Log: deskutils/conkyemail: Fix invocation of Python script at runtime Since the default version of Python has been switched to 3.6 in r498529 the script "conkyEmail.py" that is invoked by the shell script "conkyEmail" fails at runtime due incompatible code. This occurs only if the Python meta port is also installed otherwise it won't start at all due a hardcoded reference (= /usr/bin/env python) in the shell script, thus: * Update and simplify the patch for "conkyEmail" by using placeholders for the Python interpreter and ${DATADIR} that will be replaced by the post-patch target. [1] Also while I'm here: * Silence all commands of the post-patch target to reduce cluttering of logfiles * Add license information * Pet portlint PR: 238487 Submitted by: Katsuyuki Miyoshi <katsubsd@gmail.com> (initial patch) MFH: 2019Q2 (blanket, runtime fix and framework compliance) Changes: head/deskutils/conkyemail/Makefile head/deskutils/conkyemail/files/patch-conkyEmail
A commit references this bug: Author: kai Date: Sun Jun 23 22:38:06 UTC 2019 New revision: 504996 URL: https://svnweb.freebsd.org/changeset/ports/504996 Log: MFH: r504995 deskutils/conkyemail: Fix invocation of Python script at runtime Since the default version of Python has been switched to 3.6 in r498529 the script "conkyEmail.py" that is invoked by the shell script "conkyEmail" fails at runtime due incompatible code. This occurs only if the Python meta port is also installed otherwise it won't start at all due a hardcoded reference (= /usr/bin/env python) in the shell script, thus: * Update and simplify the patch for "conkyEmail" by using placeholders for the Python interpreter and ${DATADIR} that will be replaced by the post-patch target. [1] Also while I'm here: * Silence all commands of the post-patch target to reduce cluttering of logfiles * Add license information * Pet portlint PR: 238487 Submitted by: Katsuyuki Miyoshi <katsubsd@gmail.com> (initial patch) Approved by: ports-secteam (blanket: runtime fix, framework compliance) Changes: _U branches/2019Q2/ branches/2019Q2/deskutils/conkyemail/Makefile branches/2019Q2/deskutils/conkyemail/files/patch-conkyEmail
(In reply to Katsuyuki Miyoshi from comment #9) The fix for the runtime has been applied to /head and the 2019Q2 branch. deskutils/conkyemail should be usable again in its current version. The next steps are now: - I'll soon add the "conkykeyring" port to the Ports tree. - Once that port has landed I'll update deskutils/conkyemail to the latest version and add you as maintainer for it.
(In reply to Kai Knoblich from comment #12) It's working! Thanks.
(In reply to Katsuyuki Miyoshi from comment #13) Thank you for the feedback, it's nice to hear that it's working again. Meanwhile I've contacted upstream to ask about the actual state of all those tools for conky. They weren't updated since 2013 and they don't seem to be compatible with later versions of Python 3. In my opinion it doesn't make much sense to add Python 2.7 only ports to the ports tree since Python 2.7 will be EOL to the end of this year. Once I get some info from upstream I'll let you know asap.
(In reply to Kai Knoblich from comment #14) I was also worried that they have not been updated for a long time. I can give up using conkyemail, but I hope there is good news. Thanks.
(In reply to Katsuyuki Miyoshi from comment #15) Apparently upstream has abandoned conkyemail because I haven't received a reply yet and the repository wasn't updated for a long time. I would mark the port as deprecated without an expiration date as deskutils/conkyemail works fine as long as Python 2.7 is present in the ports tree.
(In reply to Kai Knoblich from comment #16) I understand.
A commit references this bug: Author: kai Date: Fri Nov 22 10:50:39 UTC 2019 New revision: 518140 URL: https://svnweb.freebsd.org/changeset/ports/518140 Log: deskutils/conkyemail: Mark as DEPRECATED * Deprecate the port because the upstream repository hasn't changed since 6+ years and the scripts aren't compatible with Python 3. * Don't set an expiration date for now as it runs fine as long as Python 2.7 is present in the Ports tree. PR: 238487 Changes: head/deskutils/conkyemail/Makefile
Comment on attachment 205084 [details] conkyemail-2.15.patch ^ Triage: Set maintainer-approval to '+' as it's given implicitly by portmgr for unmaintained ports.
(In reply to Katsuyuki Miyoshi from comment #17) The port is now deprecated but can be used as long as Python 2.7 is available in the ports tree. Once again thanks for reporting the issue with the broken runtime!