Skip to content

Instantly share code, notes, and snippets.

View achilleas-k's full-sized avatar
🕹️

Achilleas Koutsou achilleas-k

🕹️
View GitHub Profile
# Export data using https://www.strava.com/athlete/delete_your_account
# Yes, the data export option is on the Delete Your Account page.
#
# Run this script on the 'activities.csv'.
import sys
from datetime import datetime, timedelta
import matplotlib.pyplot as plt
import numpy as np
timesince() {
local now
local last_ts
local last
now=$(date +%s)
last_ts="$(borg list -P "${destprefix}" --json | jq -r '.archives[-1].time')"
last=$(date -d "${last_ts}" +%s)
echo $(( now - last ))
}
import sys
def read_and_trim(fname: str):
with open(fname, "r", encoding="utf-8") as modulesfile:
data = modulesfile.read()
lines = data.split("\n")
return [line.split("/")[-1] for line in lines]
#!/usr/bin/env bash
img="$1"
tmpdir=$(mktemp -d)
mkdir "${tmpdir}/iso" "${tmpdir}/install" "${tmpdir}/root" "${tmpdir}/initrd"
sudo mount "${img}" "${tmpdir}/iso"
sudo mount "${tmpdir}/iso/images/install.img" "${tmpdir}/install"
sudo mount "${tmpdir}/install/LiveOS/rootfs.img" "${tmpdir}/root"
{
"version": "2",
"pipelines": [
{
"name": "build",
"runner": "org.osbuild.rhel86",
"stages": [
{
"type": "org.osbuild.rpm",
"inputs": {
❯ grep '"isolinux"' -A1 -r test/data/manifests
test/data/manifests/centos_8-aarch64-edge_installer-boot.json: "isolinux": {
test/data/manifests/centos_8-aarch64-edge_installer-boot.json- "enabled": false
--
test/data/manifests/centos_8-aarch64-edge_installer_with_users-boot.json: "isolinux": {
test/data/manifests/centos_8-aarch64-edge_installer_with_users-boot.json- "enabled": false
--
test/data/manifests/centos_8-aarch64-image_installer-boot.json: "isolinux": {
test/data/manifests/centos_8-aarch64-image_installer-boot.json- "enabled": false
--

RHEL minor version selection

Generally, osbuild-composer supports building images for all supported RHEL versions at the time of release of the running osbuild-composer version.

The most common exception to this rule is that support is added for the next minor version release during that version's development period.

Build request

When a user requests to build an image, they must specify the distro and major release. Specifying the minor version is only supported for EUS versions.

#!/usr/bin/env python3
import json
import sys
from typing import Dict, Any
import osbuild.meta
import osbuild.formats
import osbuild.formats.v2
#!/usr/bin/env python3
import json
import sys
from typing import Dict, Any
import osbuild.meta
import osbuild.formats
import osbuild.formats.v2
#!/usr/bin/env python3
import argparse
import json
def loadjson(fname: str):
with open(fname, mode="r", encoding="utf-8") as jsonfile:
return json.load(jsonfile)