Skip to content

Instantly share code, notes, and snippets.

View agraul's full-sized avatar

Alexander Graul agraul

View GitHub Profile
@agraul
agraul / changes.py
Created January 19, 2026 10:46
Python3 RPM changelog helper PoC
#!/usr/bin/python3
"""Manipulate the changelog entries for all code-streams.
Different code streams that use the same version of the source code (same git
commit) can have different RPM changelogs. They differ in structure due to
different release times: entries that are grouped in one code stream might be
split into multiple entries in another.
This tools helps with adding a new entry to all changelogs and with editing the
latest changelog entry for all code streams at once.
@agraul
agraul / dedup-rhnpackagename
Created April 2, 2026 14:18
Python script to deduplicate rhnPackageName
#!/usr/bin/python3
"""Deduplicate rhnPackageName name entries
Steps:
1. Update all references to refer to a single entry
2. Delete unreferenced entries
3. Add unique index to verify uniqueness and persist it
Steps 1 and 2 are repeated for all duplicate name entries, then step 3 is executed.