Skip to content

Commit

Permalink
attempt to unwrap dnf
Browse files Browse the repository at this point in the history
  • Loading branch information
detiber committed Dec 8, 2024
1 parent 47d331d commit dcadfa1
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
15 changes: 15 additions & 0 deletions files/scripts/unwrap-cli.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/bash
set -eoux pipefail

# there is no 'rpm-ostree cliwrap uninstall-from-root', but this is close enough. See:
# https://github.com/coreos/rpm-ostree/blob/6d2548ddb2bfa8f4e9bafe5c6e717cf9531d8001/rust/src/cliwrap.rs#L25-L32
if [ -d /usr/libexec/rpm-ostree/wrapped ]; then
# binaries which could be created if they did not exist thus may not be in wrapped dir
rm -f \
/usr/bin/yum \
/usr/bin/dnf \
/usr/bin/kernel-install
# binaries which were wrapped
mv -f /usr/libexec/rpm-ostree/wrapped/* /usr/bin
rm -fr /usr/libexec/rpm-ostree
fi
14 changes: 13 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ bluebuild:
sudo bluebuild generate-iso --iso-name output/beardy-os.iso image ghcr.io/detiber/beardy-os:latest

generate-images:
sudo podman pull ghcr.io/detiber/beardy-os:latest
mkdir -p output
sudo podman run \
--rm \
Expand All @@ -31,6 +30,19 @@ generate-images:
--type iso \
ghcr.io/detiber/beardy-os:latest

# sudo podman run \
# --rm \
# -it \
# --privileged \
# --pull=newer \
# --security-opt label=type:unconfined_t \
# -v ./output:/output \
# -v ./hack/bootc-image-builder-config.toml:/config.toml:ro \
# -v /var/lib/containers/storage:/var/lib/containers/storage \
# quay.io/centos-bootc/bootc-image-builder:latest \
# --type qcow2 \
# --rootfs btrfs \
# ghcr.io/detiber/beardy-os:latest
# sudo podman run --rm --privileged --volume ./iso-output:/build-container-installer/build --security-opt label=disable --pull=newer ghcr.io/lauretano/t2-atomic-bluefin:latest
# sudo docker run --rm --privileged --volume ./iso-output:/build-container-installer/build --pull=always ghcr.io/lauretano/t2-atomic-bluefin:latest
# or maybe https://wiki.archlinux.org/title/Mkosi
4 changes: 4 additions & 0 deletions recipes/beardy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,8 @@ modules:
- sshd.service
- ublue-update.service

- type: script
scripts:
- unwrap-cli.sh

- type: signing # this sets up the proper policy & signing files for signed images to work fully

0 comments on commit dcadfa1

Please sign in to comment.