Learn about your package manager January 10, 2018 on Drew DeVault's blog

Tools like virtualenv, rbenv, and to a lesser extent npm and pip, are occasionally useful in development but encourage bad practices in production. Many people forget that their distro already has a package manager! And there’s more– you, the user, can write packages for it!

Your distro’s package repositories probably already have a lot of your dependencies, and can conveniently update your software alongside the rest of your system. On the whole you can expect your distro packages to be much better citizens on your system than a language-specific package manager will be. Additionally, pretty much all distros provide a means for you to host your own package repositories, from which you can install and update any packages you choose to make.

If you find some packages to be outdated, find out who the package maintainer is and shoot them an email. Or better yet - find out how the package is built and send them a patch instead. Linux distributions are run by volunteers, and it’s easy to volunteer yourself! Even if you find missing packages, it’s a simple matter to whip up a package yourself and submit it for inclusion in your distro’s package repository, installing it from your private repo in the meanwhile.

“But what if dependencies update and break my stuff?”, you ask. First of all, why aren’t you keeping your dependencies up-to-date? That aside, some distros, like Alpine, let you pin packages to a specific version. Also, using the distro’s package manager doesn’t necessarily mean you have to use the distro’s package repositories - you can stand up your own repos and prioritize it over the distro repos, then release on any schedule you want.

In my opinion, the perfect deployment strategy for some software is pushing a new package to your package repository, then SSHing into your fleet and running system updates (probably automatically). This is how I manage deployments for most of my software. As a bonus, these packages offer a good place to configure things that your language’s package manager may be ill suited to, such as service files or setting up new users/groups on the system. Consider it!

Have a comment on one of my posts? Start a discussion in my public inbox by sending an email to ~sircmpwn/public-inbox@lists.sr.ht [mailing list etiquette]

Articles from blogs I read Generated by openring

Status update, August 2020

Hi! Regardless of the intense heat I’ve been exposed to this last month, I’ve still been able to get some stuff done (although having to move out to another room which isn’t right under the roof). I’ve worked a lot on IRC-related projects. I’ve added a znc-i…

via emersion 2020-08-19 00:00:00 +0200 +0200

What's cooking on Sourcehut? August 2020

Another month passes and we find ourselves writing (or reading) this status update on a quiet, rainy Sunday morning. Today our userbase numbers 16,683 members strong, up 580 from last month. Please extend a kind welcome to our new colleagues! Thanks for read…

via Blogs on Sourcehut 2020-08-16 00:00:00 +0000 +0000

Go 1.15 is released

Today the Go team is very happy to announce the release of Go 1.15. You can get it from the download page. Some of the highlights include: Substantial improvements to the Go linker Improved allocation for small objects at high core coun…

via The Go Programming Language Blog 2020-08-11 11:00:00 +0000 +0000

North Pacific Logbook

The passage from Japan (Shimoda) to Canada (Victoria) took 51 days, and it was the hardest thing we've ever done. We decided to keep a logbook, to better remember it and so it can help others who wish to make this trip.Continue Reading

via Hundred Rabbits 2020-07-31 00:00:00 +0000 GMT