Skip to content

Instantly share code, notes, and snippets.

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

Achilleas Koutsou achilleas-k

🕹️
View GitHub Profile
#!/usr/bin/env bash
set -euo pipefail
checkout() {
git fetch -fu "${2:-origin}" "refs/pull/$1/head:pr/$1"
git checkout "pr/$1"
}
fetch() {
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[5 q'
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
## runtime-postinstall.tmpl
## post-install setup required to make the system work.
<%page args="root, basearch, libdir, configdir"/>
<%
configdir = configdir + "/common"
import os, time
SOURCE_DATE_EPOCH = os.environ.get('SOURCE_DATE_EPOCH', str(int(time.time())))
%>
# 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.