fortran-lang / registry

Registry for Fortran package manager
MIT License
8 stars 3 forks source link

Support `zip` #40

Closed minhqdao closed 1 year ago

minhqdao commented 1 year ago

It would be great to support both tar and zip formats and it should be easy to add that on the backend, too. Just allow the user to upload and download a zipball equivalent to a tarball.

henilp105 commented 1 year ago

Hi @minhqdao , I have added support for both zipballs and tarballs , the backend will automatically detect the zipball or the tarball and set the file MIME type and upload settings.

minhqdao commented 1 year ago

Great, if you add validation of the packages on the backend, you could unpack both zip- and tarball and make sure that both are identical.

henilp105 commented 1 year ago

@minhqdao I think that we should only allow to upload anyone of them , uploading both would lead to security issues as we have to verify both of them to be exactly same for each element in that tarball/zipball and also lead to redundancy in database and most of the devices have the ability to handle atleast one of them.

minhqdao commented 1 year ago

Well, the idea was to offer more downloadable format options. Therefore redundancy in the database is intended. If we currently don't have verification on the backend, then it's probably better to just stick with tarballs.

henilp105 commented 1 year ago

@minhqdao yes , I think we should give more downloadable options I would suggest that we let the user upload anyone of the zip/tarball then we during the upload directly unzip/untar it to convert into another format and save it in the db the on the download side we could directly give the option for both. (alteast this would help reduce the verification to only 1 tar/zipball and also remove the need for the zip/tarball comparision) .

minhqdao commented 1 year ago

@minhqdao yes , I think we should give more downloadable options I would suggest that we let the user upload anyone of the zip/tarball then we during the upload directly unzip/untar it to convert into another format and save it in the db the on the download side we could directly give the option for both. (alteast this would help reduce the verification to only 1 tar/zipball and also remove the need for the zip/tarball comparision) .

I was also thinking about that. We should do it that way.