Create Debian package via Github workflow

Posting this here after discussing with @hunter so some Livepeer devops folks could provide feedback before I create a PR.
The use-case is:
a) There are many Orchestrators who may not be sysadmins, I know of at least one who will sudo cp the livepeer binary into /usr/local/bin/, not good news for a daemon listening on a port which isn’t firewalled. A signed .deb package solves this, most O’s are running Ubuntu / Deb.
b) There is existing tooling to convert a .deb package to almost every existing Linux distribution.

go-livepeer/build.yaml at master · livepeer/go-livepeer · GitHub git pulls and builds the binaries and creates archives of them by $ARCH and go-livepeer/release.yaml at master · livepeer/go-livepeer · GitHub signs and ships a new release when run

There’s three approaches, I’d prefer to get some feedback before spending the time to create them:

  1. The Debian handbook suggests creating a debian directory in the root of your code structure with every thing needed to package under it. It’d look something like
    livepeer/
    ├── debian/
    │ ├── control
    │ ├── livepeer.conf
    │ ├── livepeer.install
    │ ├── livepeer.postrm
    │ ├── livepeer.postinst
    │ └── livepeer.service
    ├── usr/
    │ ├── bin/
    │ │ └── livepeer
    │ └── share/
    │ └── doc/
    │ └── livepeer/
    │ └── LICENSE
    ├── .github/
    │ └── workflows/
    │ └── build-deb.yaml
    └── build-deb.sh

Then in we hook into the same VM creating the artifacts, and make it create a signed (Livepeer CI Robot) .deb and release it along side the rest of the livepeer-$TAG-$ARCH-.tar,gz archives
A bit more tooling to integrate it with the Changelog and GPG signature file creation may be required.

  1. Fork a Github Actions repo (GitHub - jtdor/build-deb-action: GitHub action for building Debian packages with dpkg-buildpackage.) to create a Debian package for Livepeer, and it can just be called by build,yaml above, similar to how it calls the action to create a ubuntu-latest runner

  2. Either Eli or hjpotter92 (-) · GitHub add it as they see fit.

hey! I had made some progress on releasing installable packages for debian/fedora/macos etc. distros. I was using the excellent tool called fpm to do this.

However, lack of a feature made me drop the project at that time (around april/may of last year). It looks like the feature request was acted upon and was released in november; so it’d be nice to get back to it.

In the meantime, I was able to release macos package as a custom homebrew package through our own tap. linux+windows releases are still tarballs or zip currently :expressionless:

If you want to help, i could push the branch over in go-livepeer for further inspection. I might be busy this month with some other prioritised work; but would be able to pick it up in near future.

Thanks for bringing this up to hunter’s (and mine) attention :slight_smile:

For reference, the fpm config file i was using:

--input-type dir
--name go-livepeer
--license MIT
--maintainer "Livepeer CI Robot <support@livepeer.org>"
--description "Official Go implementation of the Livepeer protocol"
--provides livepeer
--verbose
livepeer=/usr/bin/livepeer livepeer_bench=/usr/bin/livepeer_bench livepeer_cli=/usr/bin/livepeer_cli livepeer_router=/usr/bin/livepeer_router