Skip to content

Instantly share code, notes, and snippets.

@bookwar
bookwar / koji-test.py
Created May 11, 2023 12:46
Playing with public API of Stream Koji
import koji
from pprint import pprint
mytag = "c9s-build"
mybuild = "glibc-2.34-8.el9"
event_id = '627803'
session = koji.ClientSession("https://kojihub.stream.centos.org/kojihub")
build_info = session.getBuild(mybuild)
@bookwar
bookwar / status.txt
Created October 26, 2020 20:33
rawhide vs eln-build-side-32813 after gcc11 mass-rebuild
Date: 2020-10-26 21:15:42.847314
Source1: f34
Source2: eln-build-side-32813
ERROR: 2
SAME: 4157
NONE: 181
NEW: 52
OLD: 30
EXTRA: 2
total: 4424
from fedora_messaging import api, config
config.conf.setup_logging()
def printer_callback(message):
"""
Print the message to standard output.
Args:
message (fedora_messaging.message.Message): The message we received
@bookwar
bookwar / README.md
Last active January 15, 2022 22:32
Jinja renderer

J2Render

Use jinja2 to render arbitrary templates using parameters provided in YAML format.

Usage

Run command:

$ j2render -v vars/ -t templates/ -o output/
@bookwar
bookwar / pi-cpuinfo.md
Created July 16, 2017 21:40
raspberry-pi cpuinfo

Libraries use cpuinfo to determine the raspbery pi version. But it doesn't work as Hardware and Revision are not set in Fedora

Fedora 26

# cat /proc/cpuinfo
...
processor	: 3
model name	: ARMv7 Processor rev 4 (v7l)
BogoMIPS	: 38.40
@bookwar
bookwar / description.md
Last active June 23, 2017 15:04
Overlay structure for salt configurations

Problem

There are two sources of salt configurations: base and overlay.

The goal is to use the base states and pillar data but ignore the base top file, using only the top files from overlay repo.

Prerequisites

Filesystem layout

/srv/salt/
@bookwar
bookwar / compare_jjb_xml.sh
Created May 22, 2017 12:51
compare_jjb.xml outputA/ outputB/
#!/bin/bash
# Recursively compare XML outputs of two JJB test runs
set -e
A_DIR="$1"
B_DIR="$2"
# Cleanup trailing slashes if exist