tus / tusd

Reference server implementation in Go of tus: the open protocol for resumable file uploads
https://tus.github.io/tusd
MIT License
3.07k stars 478 forks source link

Installation using package managers #683

Open kishaningithub opened 2 years ago

kishaningithub commented 2 years ago

To reduce the "getting started" barrier which begins with the installation itself..

As part of the release i propose publishing it to homebrew and other package managers (apt, snap, choco etc)

Acconut commented 2 years ago

Yes, we would love to offer tusd using package manager but have no experience with including tusd there. Do you have some knowledge and would be able to help us?

nh2 commented 2 years ago

I have packaged tusd for nixpkgs, which will make it easy to get a built binary on NixOS, any Linux distribution, and OSX.

After my PR is merged, install the nix package manager and run:

nix-shell -p tusd --run 'tusd --help'

Before the PR is merged, you can try it out by pinning the nixpkgs version:

NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/14a76bca594408f98da6666cd2551d871230277c.tar.gz nix-shell -p tusd --run 'tusd --help'

The PR also includes an automated test that will run tusd on a VM, and do an upload from another VM.

I would like to have co-maintainers for tusd in nixpkgs; please let me know on that PR if you are interested. You don't need to run NixOS to use nix packages, and you don't need to have commit rights to become a co-maintainer.

nh2 commented 2 years ago

@kvz I read on the blog that Transloadit is using Nix as well -- would you join me as co-maintainer on the above nixpkgs PR for tusd?

kvz commented 2 years ago

We could probably ask @Ma27 to provide assistance with reviewing your Nix tusd PR. As for the other distros, https://github.com/jordansissel/fpm used to be a good way to build rpms and debs, but this was from hearsay and a long time ago, I do not have hands-on experience, things may have changed.

Since tusd is just a single binary, i can't imagine it would be very hard, but knowing people who have done it before and are willing to lend a hand probably helps.

nh2 commented 2 years ago

@kvz To clarify, it's less that I'm looking for technical help with that PR (reviews are of course always appreciated), but that I don't want to be the only person listed as maintainer, e.g. to do future version updates.

I packaged tusd because I want to try it out for my use case and want it to be available, but I think it's healthy to have more than 1 maintainer in such situations, as it isn't clear yet whether I'll use tusd for anything serious or not.

geor-g commented 1 year ago

There is an "Request For Package" in Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014812 But, as far as I know, no one is working on this, as of now.

kvz commented 1 year ago

I'm thinking of starting an opencollective for tus as an org, and then we could perhaps sponsor a debian maintainer from donations, if any. Would that work, or is that in fact not how any of that works

geor-g commented 1 year ago

I'm thinking of starting an opencollective for tus as an org, and then we could perhaps sponsor a debian maintainer from donations, if any. Would that work, or is that in fact not how any of that works

This could work, yes. :+1:

kishaningithub commented 1 year ago

I highly recommend using goreleaser for generating artifacts (.Deb, .rpm, Dockerfile, homebrew formulas, snaps etc) and publishing them

https://goreleaser.com/

Yes this tool is opensource and is widely used across several go projects for this purpose 😊

Acconut commented 1 year ago

GoReleaser looks interesting indeed! So far we do a lot of this work manual in our scripts, which works fine. But maybe this tool could clean that up in the future. Thanks for sharing!