Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase on Fedora 41 #15

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
image_name: custom-silverblue
tags: |
${{ github.sha }}
40
41
secrets:
cosign_password: ${{ secrets.COSIGN_PASSWORD }}
cosign_private_key: ${{ secrets.COSIGN_PRIVATE_KEY }}
cosign_private_key: ${{ secrets.COSIGN_PRIVATE_KEY }}
5 changes: 2 additions & 3 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
ARG silverblue_version=40
ARG silverblue_version=41
FROM quay.io/fedora-ostree-desktops/silverblue:${silverblue_version}

COPY cosign.pub /etc/pki/cosign/cosign.pub
COPY overlay-root/etc/ /etc/
COPY overlay-root/ /

RUN mkdir -p /var/opt \
&& mkdir -p /usr/lib/opt/google \
Expand Down
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,41 @@

Following Jorge Castro's lead and making my own spin on Silverblue

## Rebasing onto this image

This bootstrapping process helps get the public keys onto your machine
and makes sure everything is configured right.

From another Silverblue based image, first, rebase onto the _unverified_ image.

```
rpm-ostree rebase ostree-unverified-registry:ghcr.io/samhclark/custom-silverblue:41
```

Optional: Manually verify that the image you just rebased onto is signed.

```
$ wget -O - https://raw.githubusercontent.com/samhclark/custom-silverblue/refs/heads/main/overlay-root/usr/etc/pki/cosign/cosign.pub \
| cosign verify --key /dev/stdin ghcr.io/samhclark/custom-silverblue@$( \
rpm-ostree status \
| head -n 7 \
| grep -o 'sha256:[a-f0-9]\{64\}' \
)
```

If the above command fails (returns with a non-zero exit code), then you should abort the rebase

```
rpm-ostree cleanup --pending
```

Assuming it succeeded, then reboot: `systemctl reboot`.
After that, rebase onto the signed image.

```
rpm-ostree rebase ostree-image-signed:docker://ghcr.io/samhclark/custom-silverblue:41
```

## Google Linux Signing Keys

Google does something weird with their keys for signing RPMs.
Expand Down
86 changes: 86 additions & 0 deletions overlay-root/usr/etc/containers/policy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"default": [
{
"type": "reject"
}
],
"transports": {
"docker": {
"ghcr.io/samhclark/custom-silverblue:40": [
{
"type": "insecureAcceptAnything"
}
],
"ghcr.io/samhclark": [
{
"type": "sigstoreSigned",
"keyPath": "/etc/pki/cosign/cosign.pub",
"signedIdentity": {
"type": "matchRepository"
}
}
],
"": [
{
"type": "insecureAcceptAnything"
}
]
},
"docker-daemon": {
"": [
{
"type": "insecureAcceptAnything"
}
]
},
"atomic": {
"": [
{
"type": "insecureAcceptAnything"
}
]
},
"containers-storage": {
"": [
{
"type": "insecureAcceptAnything"
}
]
},
"dir": {
"": [
{
"type": "insecureAcceptAnything"
}
]
},
"oci": {
"": [
{
"type": "insecureAcceptAnything"
}
]
},
"oci-archive": {
"": [
{
"type": "insecureAcceptAnything"
}
]
},
"docker-archive": {
"": [
{
"type": "insecureAcceptAnything"
}
]
},
"tarball": {
"": [
{
"type": "insecureAcceptAnything"
}
]
}
}
}
3 changes: 3 additions & 0 deletions overlay-root/usr/etc/containers/registries.d/50-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
docker:
ghcr.io/samhclark:
use-sigstore-attachments: true
File renamed without changes.
6 changes: 1 addition & 5 deletions packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@
"name": "gnome-software-rpm-ostree",
"_comment": "Don't want to manage rom-ostree software from a GUI in the OS"
},
{
"name": "gnome-terminal-nautilus",
"_comment": "Don't want Gnome Terminal in the file browser"
},
{
"name": "gnome-tour",
"_comment": "Don't want the tour"
Expand All @@ -108,4 +104,4 @@
}
]
}