package-url / purl-spec

A minimal specification for purl aka. a package "mostly universal" URL, join the discussion at https://gitter.im/package-url/Lobby
https://github.com/package-url/purl-spec
Other
693 stars 161 forks source link

What about packages on ftp? #13

Open zvr opened 6 years ago

zvr commented 6 years ago

There are projects who regularly publish their canonical releases on ftp. A typical example would be something like ftp://ftp.gnu.org/gnu/gcc/gcc-7.2.0/gcc-7.2.0.tar.gz. Are there plans for such a type? (because the spec now says:

Special URL schemes [...] such as [...] ftp:// are NOT valid purl types

pombredanne commented 6 years ago

@zvr good point! There could be two ways to handle these:

  1. as a generic purl such as this: generic:gcc@7.2.0?download_url=ftp://ftp.gnu.org/gnu/gcc/gcc-7.2.0/gcc-7.2.0.tar.gz

  2. or since GNU is rather prominent, and assuming that a good large number of the projects follow similar conventions on gnu.org we could define a gnu: purl type as something like this: gnu:gcc@7.2.0 with a default "repository" of ftp.gnu.org or ftp.gnu.org/gnu

Special URL schemes [...] such as [...] ftp:// are NOT valid purl types

Indeed, one important point is to avoid mixing up purl with other plain web URLs and focus first on the "what" of a package and second on the "how" to get it, which is either implied by the type or can be made explicit with a qualifier for things that are not on the main default package repo of a type

pombredanne commented 6 years ago

@zvr does this answers your question alright? If so please feel free to close.

zvr commented 6 years ago

Yes, thanks! The idea of adding a gnu: type is actually pretty useful.

pombredanne commented 6 years ago

let me reopen this to make sure we do not forget to add a gnu type :)

tchoutri commented 4 weeks ago

@pombredanne Just for the uninitiated reader, wouldn't your first suggestion of putting the download_url qualifier go against the following:

A purl must NOT contain a URL Authority i.e. there is no support for username, password, host and port components. A namespace segment may sometimes look like a host but its interpretation is specific to a type.

?

Or maybe I have mis-interpreted that is referred to as a purl in the above sentence?

(Sorry for the annoying lawyering, I'm discussing purls for the Haskell ecosystem and trying to understand the hard limits of what could be encoded)