Stale APKBUILDs Detection

By chimo on (updated on )

I wrote a script to detect when my APKBUILDs need to be sync’ed with upstream. Then, I hooked it up to my custom swaybar to be notified.

stale-apkbuilds.sh

The script grabs a copy of master.tar.gz from my APKBUILD repo. It iterates through all the APKBUILDs to check if they need to be updated.

It expects the APKBUILDs to have a variable called “_giturl” pointing to the upstream package’s git repository. It also expects either a “_gittag” variable when the APKBUILD is built against a release/tag, or a “_gitcommit” variable when the APKBUILD is built against the latest git commit.

If “_gittag” is present, it uses the “_giturl” to get the latest git-tag, then compares the value with the value of “_gittag”. If they don’t match, the APKBUILD is considered stale.

Similarly, if “_gitcommit” is present, it compares its value with the latest commit from the upstream repository. Different values means a stale APKBUILD.

shuibar

The shuibar block just calls the script above and displays the number of APKBUILDs that need attention.

It’s the “A: 2” in the following screenshot:

shuibar screenshot

Recent articles from blogs I follow

The Scunthorpe Problem

I was talking with a friend recently about an email of theirs running afoul (🐔) of another aggressive filter system, because they dared to to talk with someone called Dickson. I know right, they’re the absolute worst. For those unfamiliar, this is the The…

via Rubenerd November 21, 2024

In which Neil is surprised by the lack of an HDMI cable

Some modern technology decisions baffle me. Today, I was sitting in a meeting room. In the room was my friend, with her laptop. Her laptop has an HDMI port. Also in the room was a screen, onto which my friend wished to display her laptop’s desktop. The screen …

via Neil's blog November 19, 2024

Helm: JSON schema generation

Helm charts support the inclusion of a values.schema.json file to validate values.yaml. Documentation: https://helm.sh/docs/topics/charts/#schema-files A JSON schema is akin to defining the structure of and type-annotating a JSON file. It helps to “shift lef…

via not just serendipity November 14, 2024