Insomnia: [Distribution] Debian/Ubuntu APT repository

Created on 10 May 2017  路  31Comments  路  Source: Kong/insomnia

Updating Insomnia on Debian/Ubuntu is cumbersome because it doesn't happen through the normal apt-get update && apt-get upgrade flow. In turn this means that often you get alerted about an update just as you're opening Insomnia at which point I'd rather use it than update it, so updating often gets put on hold if not entirely forgotten.

An APT repository would be greatly appreciated.

olinux

Most helpful comment

Are there any plans on adding this to the standard documentation as an installation method? Also, will uploading built versions to this repo be made part of the standard deployment process for new builds? I just don't want the apt repo's version to lose sync with the normal deploys.

All 31 comments

@lillesvin do you have any experience, or interest in learning, how to host an apt repository? The deb files are already hosted via Github Releases (https://github.com/getinsomnia/insomnia/releases) so maybe there is a way to have an apt server link to that?

I have no idea how to host one but I would probably look into using a PPA at Launchpad: https://help.launchpad.net/Packaging/PPA

Hi guys,

@lillesvin I can try to put this on Launchpad if @gschier agree with this.

@joubertredrat that sounds good. The only thing that I can see being a problem is the space required.

Each PPA gets 2 GiB of disk space. If you need more space for a particular PPA, ask us.

While we don't enforce a strict limit on data transfer, we will get in touch with you if your data transfer looks unusually high.

Each package is around 40MB, leaving room for around ~50 releases. As long as we are able to prune old releases in the future, it shouldn't be a huge deal 馃槃

Let us know how it goes!

@gschier other option is Packagecloud, I think that they have free plan for open source projects.
With Packagecloud I can put repos for yum too.

Bintray and Packager have Open source free option too.

Looks like Packagecloud has pretty small limits (250MB) but Bintray has way higher limits (10GB).

I just made an Insomnia Bintray account. If you let me know your email I can add you to it. Just send it to [email protected]

Okay @gschier I will send e-mail to you :+1:

Done @gschier I will start to implement repositories tonight (my UTC -3:00).

@joubertredrat 馃憤

@joubertredrat @gschier Can I give a try using launchpad? I've read a little (very little) about how to use launchpad and the only drawback is that we cannot upload the .deb file, instead, launchpad itself will build the package in both AMD64 and i386 (who uses 32bit computers nowadays?).
So, if you guys are ok with that, I can give it a try.
Regarding the storage space, I think is doable the prune thing in order to not get out of storage space.
(edit)
One thing occurred to me right now. Since launchpad will build packages for both i386 and AMD64 architectures, the storage will be enough to about 25 releases, but I think that this is not a deal breaker.

@lucraraujo I think I would rather stick with Bintray. I'm not sure what happened to @joubertredrat, but I can probably find some time to set up the Bintray account soon. I think all that's left is uploading the file to Bintray using a single Curl command.

@joubertredrat, were you still interested in taking a look at this?

Would like to see Insomnia having an official an APT repository, or maybe even a YUM repository, for that really enhances the overall update experience. While some larger projects opt for self-host, I think Bintray is fine, too.

@gschier , do you still need help with this issue? I can give a hand.

Insomnia is a great tool and has become an every day use tool for me (in Ubuntu) :)

@gschier I found you bintray repository and saw that you last uploaded version 5.1.0. Will new versions be released to bintray in the future? Do you need some help in setting it up properly?

So I gave this up a while ago because it seemed too complicated but I gave it another shot. Apprently, the "legacy" Bintray repository layout is a lot easier to understand, so I did that, and was able to get something published.

I don't have an Ubuntu install to test with. Can someone test this out to see if it works?

https://bintray.com/getinsomnia/Insomnia/Insomnia/v5.11.7

@gschier I tried on an Ubuntu 16.04, everything seems to be running just fine.
Only warnings about authentication I need to address (pointers welcome).

@pascalduez what type of warnings? I haven't used Ubuntu in ~10 years so I may not be the best one to give pointers.

@gschier Thanks for the update! I tried it on my dev machine (Ubuntu 17.04 / Zesty). After configuring it as an apt source, the box would print this after apt update:

Reading package lists... Done
E: The repository 'https://dl.bintray.com/getinsomnia/Insomnia  Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

EDIT: Regarding the signing of APT packages, please have a look at the respective Debian Wiki page as well as this post from PackageCloud.

Thanks! I think Bintray offers the ability to automatically sign every release so I'll take a look at that.

I _think_ signing is enabled now. Can one of you give the new version a shot? https://bintray.com/getinsomnia/Insomnia/Insomnia/v5.12.3

W: GPG-Fehler: https://dl.bintray.com/getinsomnia/Insomnia Release: Die folgenden Signaturen konnten nicht 眉berpr眉ft werden, weil ihr 枚ffentlicher Schl眉ssel nicht verf眉gbar ist: NO_PUBKEY 379CE192D401AB61
W: The repository 'https://dl.bintray.com/getinsomnia/Insomnia Release' is not signed.

I think I figured it out (tested on Elementary OS). It _was_ signed but you need to add Bintray's public key first. I added instructions here on how to that to the Ubuntu Docs

Here's what you need:

# Add to sources.list
echo "deb https://dl.bintray.com/getinsomnia/Insomnia /" | sudo tee -a /etc/apt/sources.list

# Add public key used to verify code signature
wget --quiet -O - https://insomnia.rest/keys/debian-public.key.asc | sudo apt-key add -

# Refresh repository sources and install Insomnia
sudo apt-get update
sudo apt-get install insomnia

THANK YOU!
Adding the key killed the error!

Awesome! Going to close this issue finally 馃槃

Great job setting this up!

I have just one thing to note regarding the setup. Instead of adding stuff directly in /etc/apt/sources.list it'd probably be better to take advantage of the fact that Debian derivatives usually load all *.list files in /etc/apt/sources.list.d/.

So instead of:

echo "deb https://dl.bintray.com/getinsomnia/Insomnia /" | sudo tee -a /etc/apt/sources.list

do:

echo "deb https://dl.bintray.com/getinsomnia/Insomnia /" | sudo tee /etc/apt/sources.list.d/insomnia.list

That'll make it a lot more "standard" plus it makes it a lot easier to locate and enable/disable the Insomnia repo.

Are there any plans on adding this to the standard documentation as an installation method? Also, will uploading built versions to this repo be made part of the standard deployment process for new builds? I just don't want the apt repo's version to lose sync with the normal deploys.

@gschier Please add this to the standard documentation.

@JayAndCatchFire and @MartinX3. This is already in the docs here. Did you want it in another place too?

@JayAndCatchFire the deployment process is not yet fully automated. Currently, builds are pushed to GitHub Releases automatically whenever a git tag for a new version is added (eg v5.5.5). Then, I manually update the AUR repo, upload the deb to Bintray, and add a new entry to the Changelog.

It is the changelog that defines what the latest version of the app is, which powers the auto updates and app notifications.

In summary, yes the repo will be updated for every new build... unless I forget. And, eventually, the whole thing will be automated in a better way 馃槃

Hey @gschier ,
thank you for your fast response. :)

The information should be on this page: https://insomnia.rest/download/

I think I figured it out (tested on Elementary OS). It _was_ signed but you need to add Bintray's public key first. I added instructions here on how to that to the Ubuntu Docs

Here's what you need:

# Add to sources.list
echo "deb https://dl.bintray.com/getinsomnia/Insomnia /" | sudo tee -a /etc/apt/sources.list

# Add public key used to verify code signature
wget --quiet -O - https://insomnia.rest/keys/debian-public.key.asc | sudo apt-key add -

# Refresh repository sources and install Insomnia
sudo apt-get update
sudo apt-get install insomnia

gpg: no valid OpenPGP data found.

Was this page helpful?
0 / 5 - 0 ratings