mirror of
https://github.com/mfocko/blog.git
synced 2024-11-24 22:11:54 +01:00
blog: add Copr post
Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
3db5b21033
commit
ad9e964c4b
1 changed files with 113 additions and 0 deletions
113
blog/2023-08-02-copr.md
Normal file
113
blog/2023-08-02-copr.md
Normal file
|
@ -0,0 +1,113 @@
|
|||
---
|
||||
title: How can Copr help with broken dependencies
|
||||
description: Copr comes to save you when maintainer doesn't care.
|
||||
date: 2023-08-02
|
||||
authors: mf
|
||||
tags:
|
||||
- 🏭
|
||||
- red-hat
|
||||
- copr
|
||||
- admin
|
||||
- vps
|
||||
---
|
||||
|
||||
When you decide to run Fedora on your VPS, you might get screwed over by using
|
||||
random repositories…
|
||||
|
||||
<!--truncate-->
|
||||
|
||||
When I “reserved” my VPS[^1] back in June '20, I slapped Fedora on it without
|
||||
thinking. I bet 99% of people would say that I'm crazy for doing such thing[^2],
|
||||
**BUT** I've been using Fedora on my PCs for some time already and it felt very
|
||||
stable and natural to just use, even for VPS.
|
||||
|
||||
One of the first things I've done was setting up a mail server. You may guess
|
||||
what's the fun part about having a mail server… Yes, it's all the spam you
|
||||
receive and only then you realize how much “crap” gets filtered on free mail
|
||||
services. To battle this problem I chose to use
|
||||
[rspamd](https://github.com/rspamd/rspamd) that had CentOS support, but someone
|
||||
had a [Copr](https://copr.fedorainfracloud.org/) repository that I used to
|
||||
install it.
|
||||
|
||||
## How does Copr repositories work?
|
||||
|
||||
If you have ever used Ubuntu, you might be familiar with the concept since it is
|
||||
very close to [PPAs](https://help.ubuntu.com/community/PPA).
|
||||
|
||||
tl;dr of the whole process consists of
|
||||
1. enabling the Copr repository, and
|
||||
2. installing the desired package.
|
||||
|
||||
So in shell you would do
|
||||
```
|
||||
# dnf copr enable ‹copr-repository›
|
||||
# dnf install ‹package-from-the-repository›
|
||||
```
|
||||
|
||||
And… that's it! Nothing else needed! Simple, right? And literally same process
|
||||
as you would do for the PPA.
|
||||
|
||||
:::tip AUR
|
||||
|
||||
On the other hand, if you are familiar with the archLinux, you definitely know
|
||||
AUR and what it can do for you. Copr repository is pretty similar, but the
|
||||
packages are prebuilt in Copr and Copr repositories can carry the required
|
||||
dependencies for said packages, which simplifies the distribution, and can even
|
||||
help with installing singular packages (when you just need the dependency, not
|
||||
everything).
|
||||
|
||||
:::
|
||||
|
||||
## My issue
|
||||
|
||||
Now you might wonder how would I use it on my VPS. It's rather simple, once in
|
||||
6 months a new Fedora release comes out. And you need to upgrade to newer
|
||||
release… You don't need to do it right away and for such setup it probably isn't
|
||||
even recommended.
|
||||
|
||||
:::tip
|
||||
|
||||
Fedora releases are supported for a year, i.e. they live 6 months till the next
|
||||
release and then another 6 months till another release.
|
||||
|
||||
Some people prefer to run one version “behind”. If you ever decide to run it on
|
||||
your home server or in a similar setup, it might be a pretty good idea to
|
||||
follow. I'm using the “latest greatest”, cause why not :smile:
|
||||
|
||||
One way or another, you still need to bump the release every six months, unless
|
||||
you'd bump 2 releases at once every year, which would be a decision, since, at
|
||||
least I, cannot see any benefits in it… You don't go for “stability”, cause once
|
||||
a year you switch to the latest release and then, before you bump, you use one
|
||||
year old software, so you're not even using the latest.
|
||||
|
||||
:::
|
||||
|
||||
Fast-forward 2 years in the future, new Fedora release came out (October '22)
|
||||
and I was doing an upgrade. Dependencies of the rspamd have been updated and
|
||||
rspamd builds in Copr have failed and no one fixed it. Cool, so now I can
|
||||
upgrade, but can either ignore the dependencies or uninstall the rspamd…
|
||||
|
||||
## How can Copr help?
|
||||
|
||||
I have managed to find
|
||||
[specfile](https://github.com/rspamd/rspamd/blob/master/rpm/rspamd.spec) for the
|
||||
rspamd package that they use for CentOS. There were some files apart from the
|
||||
specfile, so I had to make an SRPM locally and then… I just uploaded the SRPM
|
||||
to the Copr to
|
||||
[build](https://copr.fedorainfracloud.org/coprs/mfocko/rspamd/build/5046567/)
|
||||
an RPM.
|
||||
|
||||
I have switched the previous Copr repository for rspamd with my own and happily
|
||||
proceeded with the upgrade.
|
||||
|
||||
## Conclusion
|
||||
|
||||
Copr is heavily used for testing builds on the upstream with
|
||||
[Packit](https://packit.dev). However, as you can see, it is possible to use it
|
||||
**very well** for packaging your own stuff and avoiding issues (such as the one
|
||||
I have described above), if need be.
|
||||
|
||||
[^1]: [vpsFree.cz](https://vpsfree.cz)
|
||||
[^2]: Even though I've been running archLinux on some Raspberry Pi's and also
|
||||
on one of my “home servers”, before getting the VPS. You could say I like
|
||||
to live on the edge…
|
Loading…
Reference in a new issue