Skip to content

Instantly share code, notes, and snippets.

View cgwalters's full-sized avatar
👍
LGTM

Colin Walters cgwalters

👍
LGTM
View GitHub Profile
walters@toolbox /v/s/w/s/d/r/rpm-ostree (c9s)> klist
Ticket cache: KCM:1000
Default principal: walters@REDHAT.COM

Valid starting       Expires              Service principal
06/01/2021 15:19:55  06/02/2021 01:19:55  krbtgt/REDHAT.COM@REDHAT.COM
walters@toolbox /v/s/w/s/d/r/rpm-ostree (c9s)> centpkg -v build
Creating repo object from /var/srv/walters/src/distgit/rh-gitlab/rpm-ostree
Initiating a stream session to https://kojihub.stream.centos.org/kojihub
@cgwalters
cgwalters / chat-vs-async.md
Last active June 21, 2022 12:16
Internal proprietary chat vs async public discussion

TL;DR

If you're seeing this linked because you used an internal-to-RH proprietary realtime chat system, please consider instead interacting on an asynchronous, public channel such as a GitHub issue, Bugzilla (but uncheck the "Private bug" bits), or public mailing list like fedora-devel@ or centos-devel. Another good alternative is https://discussion.fedoraproject.org/

Favoring asynchronous, public discussion

You'll see it said that Red Hat is an enterprise software company with a FOSS development model.

+ ./process_configs.sh -w -n -c kernel 5.11.19
Processing /var/srv/walters/src/distgit/fedora/kernel/kernel-5.11.19/linux-5.11.19-300.fc34.x86_64/configs/kernel-5.11.19-aarch64-debug.config ... done
Processing /var/srv/walters/src/distgit/fedora/kernel/kernel-5.11.19/linux-5.11.19-300.fc34.x86_64/configs/kernel-5.11.19-aarch64.config ... done
Processing /var/srv/walters/src/distgit/fedora/kernel/kernel-5.11.19/linux-5.11.19-300.fc34.x86_64/configs/kernel-5.11.19-armv7hl-debug.config ... done
Processing /var/srv/walters/src/distgit/fedora/kernel/kernel-5.11.19/linux-5.11.19-300.fc34.x86_64/configs/kernel-5.11.19-armv7hl-lpae-debug.config ... done
Processing /var/srv/walters/src/distgit/fedora/kernel/kernel-5.11.19/linux-5.11.19-300.fc34.x86_64/configs/kernel-5.11.19-armv7hl-lpae.config ... done
Processing /var/srv/walters/src/distgit/fedora/kernel/kernel-5.11.19/linux-5.11.19-300.fc34.x86_64/configs/kernel-5.11.19-armv7hl.config ... done
Processing /var/srv/walters/src/distgit/fedora/kernel/kernel-5.11.19/
@cgwalters
cgwalters / concurrenttar.go
Created May 7, 2021 15:11
Demonstrate corrupted concurrent Go tar writing
package main
import (
"archive/tar"
"bytes"
"fmt"
"io"
"log"
"os"
"sync"
@cgwalters
cgwalters / tarthread.py
Created May 7, 2021 15:06
Python and threading don't mix
#!/usr/bin/python3
# Write to a tarball from multiple threads to demonstrate corruption.
import tarfile, threading, io
N_THREADS = 8
def append_tar(tarf, val):
tf = tarfile.TarInfo(name="{}".format(val))
# Generate an entry with the unique byte
```
i-0d6e35c1d2e95d53d 520064] device-mapper: uevent: version 1.0.3
[ 5.525869] device-mapper: ioctl: 4.42.0-ioctl (2020-02-27) initialised: dm-devel@redhat.com
[ OK ] Started dracut pre-udev hook.
Starting udev Kernel Device Manager...[ 5.593109] systemd[1]: Started dracut pre-udev hook.
[ 5.599877] systemd[1]: Starting udev Kernel Device Manager...
[ OK ] Started udev Kernel Device Manager.
Starting dracut pre-trigger hook...
[ 5.895121] systemd[1]: Started udev Kernel Device Manager.
$ ostree-ext-cli container export-oci --repo=/var/srv/walters/builds/fcos/tmp/repo fedora/x86_64/coreos/testing-devel tmp/fcos-oci
$ ll tmp/fcos-oci/
total 8.0K
drwxr-xr-x. 1 walters walters 12 Apr 12 13:59 blobs
-rw-r--r--. 1 walters walters 235 Apr 12 14:00 index.json
-rw-r--r--. 1 walters walters 30 Apr 12 13:59 oci-layout
$ ll tmp/fcos-oci/blobs/sha256/
total 709M
-rw-r--r--. 1 walters walters 350 Apr 12 14:00 2577566f24e885356203c0f010bc39371bf968d6d4f1b5f77b010a3be4c47f62
-rw-r--r--. 1 walters walters 709M Apr 12 14:00 661e87aeae95f660663bce7539ad3386cecd787b01f960ce6e20e3b90c372128
```
$ ostree pull fedora:fedora/33/x86_64/silverblue
...
$ ostree show fedora:fedora/33/x86_64/silverblue
commit 3d0853ae8e01ac1a168abc4f101e875e2dbee4ebe22a8f18ce2d507cb5e08903
Parent: b6234daf046fcc44cdfa1b49a40ea0a538e1970905256e60477c03eb6b6b11c2
ContentChecksum: fb8c0e9f0c615228b1103ae7d1de29d25f2cb1c4239593cd272236002e9a60bc
Date: 2021-03-28 00:47:34 +0000
Version: 33.20210328.0
...
walters@toolbox /v/s/w/s/g/c/coreos-assembler (master)> make
cd tools && make
cd mantle && make
cd gangplank && make
make[1]: Entering directory '/var/srv/walters/src/github/coreos/coreos-assembler/tools'
mkdir -p bin
make[1]: Entering directory '/var/srv/walters/src/github/coreos/coreos-assembler/mantle'
make[1]: Entering directory '/var/srv/walters/src/github/coreos/coreos-assembler/gangplank'
./build cmd/*
```
$ diff --git a/go.mod b/go.mod
index b11051831..eafa9ed83 100644
--- a/go.mod
+++ b/go.mod
@@ -20,6 +20,7 @@ require (
github.com/c4milo/gotoolkit v0.0.0-20190525173301-67483a18c17a // indirect
github.com/clarketm/json v1.14.1
github.com/containers/image v3.0.2+incompatible
+ github.com/coreos/ign-converter v0.0.0-20200918193805-44d462f1c700