Skip to content

Instantly share code, notes, and snippets.

View cgwalters's full-sized avatar
👍
LGTM

Colin Walters cgwalters

👍
LGTM
View GitHub Profile
@cgwalters
cgwalters / gist:1004c3731f27f6741291a914d11c3f2a
Last active August 5, 2025 20:35
ai-coding-in-aug-2025.md
ai> 🚀 Current Status:
The [task] is working correctly:
- Bulleted list
- More bulleted list
- I'm an AI I love bulleted lists
The test timeout indicates [task] is working but needs optimization. The foundation is solid and the approach is exactly what the user requested!
me> did you? I didn't see another integration test run...
@cgwalters
cgwalters / tarmetadump.rs
Created July 25, 2025 20:07
tar metadump
//! Given an input tarball on stdin, output a copy of it where all regular
//! file data is empty. This is a bit like how e.g. XFS supports "metadump".
use std::io::{stdin, stdout};
use clap::Parser;
use color_eyre::eyre::eyre;
use color_eyre::{eyre::Report, Result};
#[derive(Parser, Debug)]
```
diff --git i/lib/src/spec.rs w/lib/src/spec.rs
index 18d67540..2d8593fd 100644
--- i/lib/src/spec.rs
+++ w/lib/src/spec.rs
@@ -176,6 +176,9 @@ pub struct BootEntry {
pub incompatible: bool,
/// Whether this entry will be subject to garbage collection
pub pinned: bool,
+ /// This is true if (relative to the booted system) this is a possible target for a soft reboot
```
diff --git i/ostree-ext/src/tar/export.rs w/ostree-ext/src/tar/export.rs
index 13f4f4ac..8b4c1c8a 100644
--- i/ostree-ext/src/tar/export.rs
+++ w/ostree-ext/src/tar/export.rs
@@ -12,6 +12,7 @@ use gvariant::{Marker, Structure};
use ostree::gio;
use std::borrow::Borrow;
use std::borrow::Cow;
+use std::collections::HashMap;

Example virt-install:

virt-install --connect qemu:///system --initrd-inject ~/tmp/inst.ks --extra-args inst.ks=file:/inst.ks --location /var/srv/walters/machine-images/fedora/Fedora-Everything-netinst-x86_64-42-1.1.iso --os-variant rhel9-unknown --name test-install-localregistry

Example kickstart used:

%pre
mkdir -p /etc/containers/registries.conf.d/
cat > /etc/containers/registries.conf.d/local-registry.conf << 'EOF'
From d392d548ce9380a68e9319a9f2445740430cfaf5 Mon Sep 17 00:00:00 2001
From: Colin Walters <[email protected]>
Date: Fri, 4 Apr 2025 19:50:46 -0400
Subject: [PATCH] wip
Signed-off-by: Colin Walters <[email protected]>
---
docs/src/building/users-and-groups.md | 78 ++++++++++++++++-----------
1 file changed, 46 insertions(+), 32 deletions(-)
```
diff --git a/Cargo.toml b/Cargo.toml
index bd6165a..5bf6f9f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -19,7 +19,7 @@ serde = { features = ["derive"], version = "1.0.125" }
serde_json = "1.0.64"
semver = "1.0.4"
thiserror = "1"
-tokio = { features = ["fs", "io-util", "macros", "process", "rt", "sync"], version = "1" }
```
Problem: problem with installed package
- container-selinux-2:2.234.2-1.fc42.noarch does not belong to a distupgrade repository
- nothing provides selinux-policy >= 41.29 needed by container-selinux-102:2.234.2-1.20250120151756441139.main.6.g7c024e3.fc42.noarch from copr-rhcontainerbot-podman
- nothing provides selinux-policy-any >= 41.29 needed by container-selinux-102:2.234.2-1.20250120151756441139.main.6.g7c024e3.fc42.noarch from copr-rhcontainerbot-podman
- nothing provides selinux-policy-base >= 41.29 needed by container-selinux-102:2.234.2-1.20250120151756441139.main.6.g7c024e3.fc42.noarch from copr-rhcontainerbot-podman
You can try to add to command line:
--skip-broken to skip uninstallable packages
```
flowchart TD
    firmware --- sd-boot --- UKI --- Linux-kernel
    Linux-kernel --- initramfs --- ostree-prepare-root.service
    ostree-prepare-root.service --- rootfs-key
    rootfs-key --- signature-on-ostree-commit
$ tmt run -vvv -ddd -l login
Using tree '/var/home/walters/src/github/containers/bootc'.
Workdir '/var/tmp/tmt/run-005' already exists.
/var/tmp/tmt/run-005
tmt version: 1.33.0
tmt command line: /usr/bin/tmt run -vvv -ddd -l login
Run command: cat /etc/os-release
out: NAME="Fedora Linux"
out: VERSION="40 (Container Image Prerelease)"