galaxyproject / cargo-port

cache packages permanently
https://depot.galaxyproject.org/software/
MIT License
12 stars 34 forks source link

How to tag files with multiple platform binaries? #90

Open peterjc opened 8 years ago

hexylena commented 8 years ago

Hmm. We tag all for multiple architectures, but nothing for multi-platform.

Can you elaborate on the use case a bit?

peterjc commented 8 years ago

This is not so common - the only example which immediately comes to mind is SNNS which I just added recently, see 82a541b221e640ef9d0310cc402d819e2b6bbdb7 and the comment. Although this release only included binaries for Linux x64, from the folder naming convention the author presumably has also included Linux 32 bit binaries as well in the past.

hexylena commented 8 years ago

Ah, just multiple architectures, then all is used there.

For things like scripts which are cross arch + cross platform, I think we've used src all in the past.

peterjc commented 8 years ago

I saw this was used for JAR files and followed this in https://github.com/galaxyproject/cargo-port/commit/4d6b36e8992b268aedfbb94fc8d9c38cd589b3e6

So basically use src for multiple OS (even if not really source code), and all for multiple CPU arch?

hexylena commented 8 years ago

Yep, precisely.

We could add another tag all or so for the OS if need be, but it isn't really used anywhere, since almost no one (that we know of) consumes urls.tsv.

peterjc commented 8 years ago

Although these values do appear in the filenames used on the public depot URLs...

peterjc commented 8 years ago

Concrete example, PhyML provides a ZIP file containing pre-compiled binaries for 32 bit Windows, 32 bit Linux, 64 bit Linux, and 64 bit Mac OS X:

$ curl -L -O http://www.atgc-montpellier.fr/download/binaries/phyml/PhyML-3.1.zip
$ unzip PhyML-3.1.zip 
Archive:  /tmp/PhyML-3.1.zip
   creating: PhyML-3.1/
  inflating: PhyML-3.1/PhyML-3.1_linux32  
  inflating: PhyML-3.1/PhyML-3.1_linux64  
  inflating: PhyML-3.1/PhyML-3.1_macOS-MountainLion  
  inflating: PhyML-3.1/PhyML-3.1_manual.pdf  
  inflating: PhyML-3.1/PhyML-3.1_win32.exe  
  inflating: PhyML-3.1/README        
  inflating: PhyML-3.1/phyml.bat 
$ file PhyML-3.1/PhyML-3.1_linux32
PhyML-3.1/PhyML-3.1_linux32: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped
$ file PhyML-3.1/PhyML-3.1_linux64
PhyML-3.1/PhyML-3.1_linux64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, not stripped
$ file PhyML-3.1/PhyML-3.1_win32.exe 
PhyML-3.1/PhyML-3.1_win32.exe: PE32 executable for MS Windows (console) Intel 80386 32-bit
$ file PhyML-3.1/PhyML-3.1_macOS-MountainLion
PhyML-3.1/PhyML-3.1_macOS-MountainLion: Mach-O 64-bit executable x86_64
$ ./PhyML-3.1/PhyML-3.1_macOS-MountainLion --version

. This is PhyML version 20120412.
hexylena commented 8 years ago

We could add a bin all, if there is something quite so undesirable about src in URLs. That would be a trivial change.