Provide software repositories for linux packages

Providing repositories for the packages would make it super easy to automate the update process.

How to do? Well there is on one hand the option of pushing everything to https://packagecloud.io as Atom does.

But while we were waiting for Atom to provide a repository, someone was creative and creates this repo:

it makes it easy to host a repository on a usual webserver so may you are alternatively interested in it.

Hi,
Another solution for that is JFrog Open-Source program: https://jfrog.com/open-source/

1 Like

Sorry guys, but I really don’t know a whole lot about Linux distros and package distribution so I may need some help here. Is there not some default/central repo that people submit these to? I guess there are different repos for deb and rpm? Will snap packages not suffice?

1 Like

Data point only, packages for Arch already exist in AUR:

Packages typically enjoy a healthier life when created and maintained by the end user communities themselves, as each distro has it’s opinions on how things should work and be designed. While upstream can provide packages for everyone, it’s usually easier to let downstream interested users create proper packages for their distro and maintain (just some life experience). Creating 70 different Linux distro packages over and over again takes time away from devs who would rather be writing code.

$0.02! Hope this helps some.

7 Likes

I don’t agree. Especially electron apps are usually not packaged from distros because it’s a mess to package all dependencies.

There are various examples of electron applications that provide repositories. Like Atom or VSCode as well as keybase and some more.

Setting up a repo is not that complicated and one for apt based repos and one for rpm based repos.

Basically you need a webserver, if you don’t want to care, packagecloud.io provides this as a service and has a easy integration with travis-ci.org.

You can may send a mail to them as they support Open Source projects. And provide more storage for free.

2 Likes

I contacted packagecloud.io. Waiting to hear back.

packagecloud.io rejected our request for the open source offer since we have paid plans available. Is this something we can just stand up and distribute from our own servers?

Is something like this a viable option? http://www.hackgnar.com/2016/01/creating-remote-apt-package.html

Yes, you can also provide this from own servers. I posted a script in the first entry which provides all you need.

Just replace the packages with the latest releases from GitHub and of course replace your secrets in the repo as well. They use it to upload it to a remote server, but you can also replace the upload part with an upload command to your own webserver.

With a few more commands you can also sign the packages, but that’s another step we can do later.

Edit: And yes, this tutorial which uploads it to a github repository, should work as well

I’d prefer if we could distribute them from a GitHub repo or S3 bucket or something where we don’t have to manage a server for if possible.

1 Like

The current script, that is linked, actually uses a branch to provide the packages. Let me check if I can provide a PoC and you can just push it into an own repo and it works fine.

Give me a few hours to make sure it works fine :slight_smile:

2 Likes

I finally made it. Took me some patience to realize that there is a breaking change in the Openssl version difference between Ubuntu Trusty and Fedora 27, but it works now :slight_smile:

Check the repository:

All you need to do is adding a deploy section either to a webserver of your choice or to github pages. Just upload the pkgs directory.

If you like we can also generate a container with a webserver you can simply serve from your azure infrastructure. All you need to do is generating an own keypair so you can sign your work.

4 Likes

I like the GitHub pages option. That would be the easiest for me to automate. Can you show that on your repo? I don’t see anything uploaded here:

Add the repository:

Debian/Ubuntu/Linux Mint: echo 'deb https://sisheogorath.github.io/bitwarden-rpm-deb-mirror/debs/ bitwarden main' >> /etc/apt/sources.list

Fedora/RHEL: dnf config-manager --add-repo https://sisheogorath.github.io/bitwarden-rpm-deb-mirror/rpms/

openSUSE/SUSE: zypper addrepo -t YUM https://sisheogorath.github.io/bitwarden-rpm-deb-mirror/rpms/ bitwarden_mirror_on_github

Can you show a full working example that I can test on an Ubuntu and Fedora VM?

Thanks!

2 Likes

Nevermind, you don’t have to. I can see the output from the atom example. I’ll try to get this up and running next week. Thanks a lot.

5 Likes

We would then be able to get rid of the Docker stack using Linux packages ?
Or would we still need Docker somewhere ?
Thx !

Please remember this is about the desktop client, not about the server application.

1 Like

Sorry I did not catch this, but you’re right, this feature request is in app:desktop category :slight_smile:

1 Like

Just added a package signing process so not only the repo metadata is signed but also the packages themselves which allows everyone to re-distribute the packages without breaking any trust in them :slight_smile:

Should be really helpful for local mirrors, etc. I’ll merge this soon.

4 Likes

Mhm as my test turned out it looks like you can’t host your apt and yum/dnf/zypper repository on GitHub. I haven’t figured out all details, but they actively prevent using github pages as well as the raw cdn for this.

So you probably have to host it yourself. But I’ll write a little docker file which should make it easy to serve it :slight_smile:

What platforms use zypper ?