Have you read the Solus Hacktoberfest blog post yet? If not, go check it out first. Done? Great, let’s dive in.
My personal goal for this Hacktoberfest is to add a monitoring.yaml file to every package in the Solus repository. Yes, all of them. Luckily, I don’t have to start from scratch—contributors have already added it to 3,384 packages, which leaves just 1,390 more. Easy peasy.
Of course, I could finish this on my own. But where’s the fun in that? I’m giving you all a chance—a chance to try and beat me (though let’s be honest, that’s not going to happen). So here’s the challenge:
Who can beat me at adding the most monitoring.yaml files to the package repository?
What is monitoring.yaml
?
monitoring.yaml
is a supplementary file in Solus (Also AerynOS) packages repository which helps tracking new releases and security advisories. At basic level it uses Anitya/release-monitoring.org ID for tracking releases and Common Platform Enumeration Name (CPE) from the National Vulnerability Database for security advisories. You can read more about it in the Help Center.
Rule of engagements
1. Join Solus packaging room on Matrix
This way, you can ask question (or get ignored) in real time. Fun!
2. Pick a letter to work on
To avoid overlapping works, please pick a letter and mention it in the reply of this thread. I will maintain the list of people joining and the letter they picked up.
3. Fill in as many field as possible
At the minimum, monitoring.yaml
must contain releases id and rss. Also a security cpe, if it exist. Just creating a blank monitoring.yaml
doesn't count toward your progress.
Tips from the best
Obviously, I don’t expect anyone to beat me. But in the spirit of fairness, here are some tips that may slightly improve your odds—by about 0.00000000001% :
1. Follow packaging tutorial
Strictly speaking, you don't need to follow it to a tee. If you already have experience with git
, you are pretty much golden. Although, if you follow the tutorial to the end, you will have your git
, commit hooks, and helper scripts set-up. This will make your endeavour to try to beat me even possible.
2. Use available tools
As I already said in the first point, if you follow the packaging tutorial you will get helper script. One of them is in the form of Taskfile.yaml
which include command go-task add-monitoring
. This command will automatically detect the package name, try matching it with an Anitya/release-monitoring.org ID and fill the monitoring.yaml file.
You also can use boulder
which is created for AerynOS. It includes command boulder new
which will do similiar thing like go-task add-monitoring
but written in Rust 🦀. To use boulder
, you have to compile it yourself. And this is the command I usually uses:
## For Bash and Zsh
boulder new `yq '.source[0] | keys[]' package.yml`; rm stone.yaml
## For Fish
boulder new (yq '.source[0] | keys[]' package.yml); rm stone.yaml
3. Be creative
Solus provdes many tools to help you beat me but you can always do better. You can wrap those tools in a script to make adding monitoring.yaml
even easier. For example:
for i in (seq 1 43)
gotopkg (sed -n {$i}p ~/monitoring-d.txt ) ; boulder new (yq '.source[0] | keys[]' package.yml); rm stone.yaml
end
This little command will parse each line on monitoring-d.txt
file which contain packages name like this:
❯ cat ~/Documents/Solus-Dev/monitoring-d.txt
dash
davfs2
db5
dbus-glib
dcraw
Then it will automatically create monitoring.yaml
file using boulder
and the move on to next package on the list.
You can always do better than this. Be creative!
4. Register to release-monitoring.org
Sometimes a package doesn't have a corresponding ID on release-monitoring.org. When that is the case, If hou have an account, you can add the package yourself to release-monitoring.org to be tracked. Packages that are sourced from Github, Gitlab, Codeberg, Gitea, and Sourceforge are pretty easy to add. Other than those sources, it can become tricky and might force you to use regex.
5. RSS usually has patterns
Most of git forges support RSS feeds for tags and releases. It usually follow a pattern, so you can write the rss feeds without visiting the website. In fact go-task add-monitoring
uses this assumption to fill in monitoring.yaml
. Here are the most popular examples:
Are you ready?
Joking aside and all that theatrics about beating me (which will not happen), I hope this will give some of you motivation and a bit guidance on how to contribute to Solus. It certainly motivates me.
If you can spare an hour or two to get started, this will be worth your time. Try to have fun with it. I might also livestream some of my work if I ever figure out how to do it, so you can follow along and see how bad I am fumbling things.
As always if you have any question, feel free to ask me here or on Matrix. See you all on November 1st (Or when I will write the conclusion of this challenge). Cheers!