Opened 9 years ago
Closed 9 years ago
#48078 closed defect (fixed)
cantera binary files not executable
Reported by: | jjstickel (Jonathan Stickel) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.3 |
Keywords: | haspatch | Cc: | macports@…, kurthindenburg (Kurt Hindenburg) |
Port: | cantera |
Description
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.tar.gz needed different checksums.
Attachments (2)
Change History (18)
Changed 9 years ago by jjstickel (Jonathan Stickel)
Attachment: | cantera_Portfile.diff added |
---|
comment:1 follow-ups: 3 4 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | changed from macports-tickets@… to ryandesign@… |
---|
comment:2 follow-ups: 8 11 Changed 9 years ago by macports@…
Sorry, that was a bit too early from my side (Original text: 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.)
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.
I assume that it would either be good to have all files executable, or to just have one binary in the first place. Is there a recommended way of doing this?
The reason github.tarball_from releases
is not used is because this would result in failures in the cantera-devel subport.
comment:3 Changed 9 years ago by larryv (Lawrence Velázquez)
Replying to 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.
comment:4 follow-up: 5 Changed 9 years ago by jjstickel (Jonathan Stickel)
Replying to ryandesign@…:
Replying to 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 usingsystem
to callchmod
.
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.
comment:5 Changed 9 years ago by larryv (Lawrence Velázquez)
Replying to 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.
Changed 9 years ago by jjstickel (Jonathan Stickel)
Attachment: | cantera_Portfile.2.diff added |
---|
using "file attributes"
comment:6 Changed 9 years ago by jjstickel (Jonathan Stickel)
I updated the portfile patch to use "file attributes" and removed the change to the checksums.
comment:7 Changed 9 years ago 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.
comment:8 follow-up: 9 Changed 9 years ago by larryv (Lawrence Velázquez)
Replying to 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?
comment:9 follow-up: 10 Changed 9 years ago by macports@…
Replying to 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
.
comment:10 follow-up: 12 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to 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.
comment:11 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to 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 ... }
comment:12 Changed 9 years ago by macports@…
Replying to ryandesign@…:
Replying to 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.
comment:14 follow-up: 15 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)
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
comment:15 Changed 9 years ago by jjstickel (Jonathan Stickel)
Replying to 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.
comment:16 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)
Resolution: | → fixed |
---|---|
Status: | new → closed |
done r144963
Replying to jjstickel@…:
The
file attributes
proc should be used instead of usingsystem
to callchmod
.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 stealth update recipe must be followed.