[MacPorts] #48078: cantera binary files not executable
#48078: cantera binary files not executable -------------------------+-------------------------------- Reporter: jjstickel@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Keywords: haspatch | Port: cantera -------------------------+-------------------------------- With the recent version update to cantera (2.2.0), some of the binary files are not installed as executable. The attached patch resolves this. I did not test with the devel subport. Also, I found the macports-archived source file to be stale, and the one direct from https://github.com/Cantera/cantera/releases/download/v2.2.0/cantera-2.2.0.ta... needed different checksums. -- Ticket URL: <https://trac.macports.org/ticket/48078> MacPorts <https://www.macports.org/> Ports system for OS X
#48078: cantera binary files not executable --------------------------+-------------------------- Reporter: jjstickel@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: haspatch Port: cantera | --------------------------+-------------------------- Changes (by ryandesign@…): * owner: macports-tickets@… => ryandesign@… Comment: Replying to [ticket:48078 jjstickel@…]:
With the recent version update to cantera (2.2.0), some of the binary files are not installed as executable. The attached patch resolves this. I did not test with the devel subport.
The `file attributes` proc should be used instead of using `system` to call `chmod`.
Also, I found the macports-archived source file to be stale, and the one direct from https://github.com/Cantera/cantera/releases/download/v2.2.0/cantera-2.2.0.ta... needed different checksums.
I do not experience a checksum error with the port as it is currently written, but I would experience one if I applied your patch. The port currently uses "tarball" style download, whereas the URL you show above is a "release" style download, and yes, it is normal that these would have different checksums and slightly different contents. The former is automatically generated from the repository by the github architecture, whereas the second is manually created by the developers and uploaded to github. It is true that the port should be updated to use the "release" style download (by using `github.tarball_from releases`), but unless this improves the build of the software in some way, it can wait until the next version update. If switching to "release" would improve the build, then the [wiki:PortfileRecipes#stealth-updates stealth update] recipe must be followed. -- Ticket URL: <https://trac.macports.org/ticket/48078#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#48078: cantera binary files not executable --------------------------+-------------------------- Reporter: jjstickel@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: haspatch Port: cantera | --------------------------+-------------------------- Comment (by macports@…): I wasn't able to reproduce your error on my system: Both `ck2cti` and `ctml_writer` are executable. The script `setup_cantera` is not needed as all files are installed into standard directories. The reason `github.tarball_from releases` is not used is because this would result in failures in the cantera-devel subport. -- Ticket URL: <https://trac.macports.org/ticket/48078#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#48078: cantera binary files not executable --------------------------+-------------------------- Reporter: jjstickel@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: haspatch Port: cantera | --------------------------+-------------------------- Comment (by larryv@…): Replying to [comment:1 ryandesign@…]:
It is true that the port should be updated to use the "release" style download (by using `github.tarball_from releases`), but unless this improves the build of the software in some way, it can wait until the next version update.
I removed `github.tarball_from releases` in r137350 because the tarball did not seem to differ from the release, and leaving it in would have complicated things with the `cantera-devel` subport (r137351), which must fetch a tarball. -- Ticket URL: <https://trac.macports.org/ticket/48078#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#48078: cantera binary files not executable --------------------------+-------------------------- Reporter: jjstickel@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: haspatch Port: cantera | --------------------------+-------------------------- Comment (by jjstickel@…): Replying to [comment:1 ryandesign@…]:
Replying to [ticket:48078 jjstickel@…]:
With the recent version update to cantera (2.2.0), some of the binary files are not installed as executable. The attached patch resolves this. I did not test with the devel subport.
The `file attributes` proc should be used instead of using `system` to call `chmod`.
OK; can you point me to an example? I looked through the Macports documentation but couldn't find anything. I know that "system" calls are not preferred. I was just pointing out the inconsistencies of the tarballs and checksums. That's fine if there is a good reason for the way things are. -- Ticket URL: <https://trac.macports.org/ticket/48078#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
#48078: cantera binary files not executable --------------------------+-------------------------- Reporter: jjstickel@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: haspatch Port: cantera | --------------------------+-------------------------- Comment (by larryv@…): Replying to [comment:4 jjstickel@…]:
OK; can you point me to an example? I looked through the Macports documentation but couldn't find anything. I know that "system" calls are not preferred.
`file attributes` is a Tcl command, not part of MacPorts. - http://www.tcl.tk/man/tcl8.5/TclCmd/file.htm#M6 - http://wiki.tcl.tk/10066 -- Ticket URL: <https://trac.macports.org/ticket/48078#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X
#48078: cantera binary files not executable --------------------------+-------------------------- Reporter: jjstickel@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: haspatch Port: cantera | --------------------------+-------------------------- Comment (by jjstickel@…): I updated the portfile patch to use "file attributes" and removed the change to the checksums. -- Ticket URL: <https://trac.macports.org/ticket/48078#comment:6> MacPorts <https://www.macports.org/> Ports system for OS X
#48078: cantera binary files not executable --------------------------+-------------------------- Reporter: jjstickel@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: haspatch Port: cantera | --------------------------+-------------------------- Comment (by macports@…): Thank you for the patch! If it is standard procedure to have binaries both in `/opt/local/bin` and in `/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/`, this patch should be applied. -- Ticket URL: <https://trac.macports.org/ticket/48078#comment:7> MacPorts <https://www.macports.org/> Ports system for OS X
#48078: cantera binary files not executable --------------------------+-------------------------- Reporter: jjstickel@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: haspatch Port: cantera | --------------------------+-------------------------- Comment (by larryv@…): Replying to [comment:2 macports@…]:
You're right, `/opt/local/bin/ck2cti` and the other Cantera binaries in that directory are not installed as executables. However, the ones installed in `/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/` are installed as executables.
Are the files in the main `bin` directory distinct from the ones under the Python framework? -- Ticket URL: <https://trac.macports.org/ticket/48078#comment:8> MacPorts <https://www.macports.org/> Ports system for OS X
#48078: cantera binary files not executable --------------------------+-------------------------- Reporter: jjstickel@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: haspatch Port: cantera | --------------------------+-------------------------- Comment (by macports@…): Replying to [comment:8 larryv@…]:
Are the files in the main `bin` directory distinct from the ones under the Python framework?
Well, in fact, they are. While the ones in `/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/` rely on functions of the Python Cantera module, the ones in `/opt/local/bin/` restate the entire code in Python. The latter is used if the Python module is not installed (however, Python is needed anyway to run the script). Using the above Portfile, the Python module is always installed, so it doesn't make a difference. Still, it is probably best to apply jjstickel's patch as is. There are numerous other Portfiles installing binaries both in `/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/` and `/opt/local/bin`. -- Ticket URL: <https://trac.macports.org/ticket/48078#comment:9> MacPorts <https://www.macports.org/> Ports system for OS X
#48078: cantera binary files not executable --------------------------+-------------------------- Reporter: jjstickel@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: haspatch Port: cantera | --------------------------+-------------------------- Comment (by ryandesign@…): Replying to [comment:9 macports@…]:
There are numerous other Portfiles installing binaries both in `/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/` and `/opt/local/bin`.
Are there really? All of the ones I can remember only install symlinks in /opt/local/bin pointing to the ones in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin. -- Ticket URL: <https://trac.macports.org/ticket/48078#comment:10> MacPorts <https://www.macports.org/> Ports system for OS X
#48078: cantera binary files not executable --------------------------+-------------------------- Reporter: jjstickel@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: haspatch Port: cantera | --------------------------+-------------------------- Comment (by ryandesign@…): Replying to [comment:2 macports@…]:
The reason `github.tarball_from releases` is not used is because this would result in failures in the cantera-devel subport.
Not if you only include the directive conditionally where it's needed, e.g. {{{ if {${subport} eq ${name}} { github.tarball_from releases checksums ... } -- Ticket URL: <https://trac.macports.org/ticket/48078#comment:11> MacPorts <https://www.macports.org/> Ports system for OS X
#48078: cantera binary files not executable --------------------------+-------------------------- Reporter: jjstickel@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: haspatch Port: cantera | --------------------------+-------------------------- Comment (by macports@…): Replying to [comment:10 ryandesign@…]:
Replying to [comment:9 macports@…]:
There are numerous other Portfiles installing binaries both in `/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/` and `/opt/local/bin`.
Are there really? All of the ones I can remember only install symlinks in /opt/local/bin pointing to the ones in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin. You're right, I couldn't find one that isn't a symlink.
-- Ticket URL: <https://trac.macports.org/ticket/48078#comment:12> MacPorts <https://www.macports.org/> Ports system for OS X
#48078: cantera binary files not executable --------------------------+-------------------------- Reporter: jjstickel@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: haspatch Port: cantera | --------------------------+-------------------------- Comment (by khindenburg@…): It looks like these are not executable {{{ -rw-r--r-- 1 macports admin 82752 Jun 4 2015 /opt/local/bin/ck2cti -rw-r--r-- 1 macports admin 88274 Jun 4 2015 /opt/local/bin/ctml_writer -rw-r--r-- 1 macports admin 1966 Jan 19 23:07 /opt/local/bin/setup_cantera }}} -- Ticket URL: <https://trac.macports.org/ticket/48078#comment:14> MacPorts <https://www.macports.org/> Ports system for OS X
#48078: cantera binary files not executable --------------------------+-------------------------- Reporter: jjstickel@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: haspatch Port: cantera | --------------------------+-------------------------- Comment (by jjstickel@…): Replying to [comment:14 khindenburg@…]:
It looks like these are not executable
{{{ -rw-r--r-- 1 macports admin 82752 Jun 4 2015 /opt/local/bin/ck2cti -rw-r--r-- 1 macports admin 88274 Jun 4 2015 /opt/local/bin/ctml_writer -rw-r--r-- 1 macports admin 1966 Jan 19 23:07 /opt/local/bin/setup_cantera }}}
The patch attached to this ticket will solve this problem. The maintainers got hung up on a technical detail and haven't committed it. -- Ticket URL: <https://trac.macports.org/ticket/48078#comment:15> MacPorts <https://www.macports.org/> Ports system for OS X
#48078: cantera binary files not executable --------------------------+-------------------------- Reporter: jjstickel@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: fixed | Keywords: haspatch Port: cantera | --------------------------+-------------------------- Changes (by khindenburg@…): * status: new => closed * resolution: => fixed Comment: done r144963 -- Ticket URL: <https://trac.macports.org/ticket/48078#comment:16> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts