Learn about your package manager
source link: https://drewdevault.com/2018/01/10/Learn-your-package-manager.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
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/[email protected] [mailing list etiquette]
Articles from blogs I read Generated by openring
Go on ARM and Beyond
The industry is abuzz about non-x86 processors recently, so we thought it would be worth a brief post about Go’s support for them. It has always been important to us for Go to be portable, not overfitting to any particular operating sys…
via The Go Programming Language Blog December 17, 2020Status update, December 2020
Hi all! This status update is the 24th one, so it’s been 2 years I’ve started writing those now (ignoring a little hiatus). Time flies! This month I’ve invested a lot of time into wlroots. My main focus has been renderer v6, which has now been internally rol…
via emersion December 16, 2020What's cooking on Sourcehut? December 2020
A brisk wind of winter chill sets a stir down my spine, as I sit down with a fresh cup of coffee to yarn a story of careful engineering and passionate spirit that took place over the course of 30 days. The last 30 days. Cause this is the monthly “what’s cook…
via Blogs on Sourcehut December 15, 2020Recommend
-
171
cargo.el Cargo mode for Emacs. This package gives you a set of key combinations to perform Cargo tasks within your Rust projects. NOTICE Currently I'm not using Rust, nor will I in the (near) future. I've lost track of all...
-
112
Using the Correct Versions in Your Package ManagerThis article is aimed at everyone from novice to expert. If you don’t feel like reading the summary is:When introducing a new p...
-
95
npm - a package manager for javascript
-
99
README.md Swift Package Manager Project The Swift Package Manager is a tool for managing distribution of source code, aimed at making it easy to share your code and reuse others’ code. The tool...
-
81
Earlier in the month the Cloud Native Computing Foundation (CNCF) Technical Oversight Committee
-
224
README.md
-
76
GitHub is where people build software. More than 28 million people use GitHub to discover, fork, and contribute to over 85 million projects.
-
128
README.md Kubernetes Helm
-
57
README.md
-
80
For the sake of this article, let us pretend that you are an ardent Org 1, 2 user. One fine day you learn from a friend that the version of Org that comes with your Emacs 25.2 is 8.2.10 and that in terms of features and stability, this version...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK