Skip to content

Commit b502959

Browse files
committed
Add reprotest workflow
Signed-off-by: bakhtin <[email protected]>
1 parent 2500bc0 commit b502959

File tree

3 files changed

+78
-3
lines changed

3 files changed

+78
-3
lines changed

.github/workflows/reprotest.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: reproducible-build-test
2+
3+
on:
4+
workflow_dispatch: {}
5+
schedule:
6+
- cron: "0 1 */2 * *"
7+
8+
jobs:
9+
build:
10+
name: build reproducible images
11+
runs-on: ${{ matrix.runner }}
12+
strategy:
13+
matrix:
14+
include:
15+
- runner: warp-ubuntu-2404-x64-32x
16+
machine: machine-1
17+
- runner: warp-ubuntu-2204-x64-32x
18+
machine: machine-2
19+
steps:
20+
- uses: actions/checkout@v5
21+
22+
- name: Install mkosi
23+
run: |
24+
sudo apt-get update && sudo apt-get install -y debian-archive-keyring
25+
sudo -H pip3 install git+https://github.com/systemd/mkosi.git@$(cat .mkosi_version)
26+
27+
- name: Build image
28+
run: |
29+
sudo mkosi --force -I buildernet.conf --profile=gcp,cloud
30+
31+
- name: Calculate SHA256
32+
id: sha256
33+
run: |
34+
sha256sum buildernet/mkosi.output/buildernet.efi > checksum.sha256
35+
echo "buildernet.efi SHA256 on ${{ matrix.machine }}: $(cat checksum.sha256)"
36+
37+
- name: Upload the hash
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: checksum-${{ matrix.machine }}
41+
path: |
42+
checksum.sha256
43+
retention-days: 1
44+
45+
compare:
46+
name: compare results
47+
needs: build
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: Download artifacts from machine-1
51+
uses: actions/download-artifact@v4
52+
with:
53+
name: checksum-machine-1
54+
path: machine-1/
55+
- name: Download artifacts from machine-2
56+
uses: actions/download-artifact@v4
57+
with:
58+
name: checksum-machine-2
59+
path: machine-2/
60+
- name: Compare SHA256 hashes
61+
run: |
62+
echo "=== SHA256 Comparison ==="
63+
echo "Machine 1 hash:"
64+
cat machine-1/checksum.sha256
65+
echo "Machine 2 hash:"
66+
cat machine-2/checksum.sha256
67+
68+
if cmp -s machine-1/checksum.sha256 machine-2/checksum.sha256; then
69+
echo "✅ SUCCESS: Images are identical (reproducible build verified)"
70+
else
71+
echo "❌ FAILURE: Images differ (reproducible build failed)"
72+
exit 1
73+
fi

buildernet/mkosi.build.d/17-flowproxy.sh.chroot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ set -euo pipefail
33

44
echo "Installing flowproxy..."
55
# https://github.com/BuilderNet/FlowProxy/releases
6-
EXPECTED_SHA256=3089ee8eb797d2be8baa456f14ea13dda8ab95b6f6e05eebb9cb37808887242a
6+
EXPECTED_SHA256=5392acabe3caa1d8ac3ebba5fb93904cfbd064ba5c7b3e310a6d53402d7a7447
77
mkdir -p $DESTDIR/usr/bin
8-
curl -fSsL -o $DESTDIR/usr/bin/flowproxy https://github.com/BuilderNet/FlowProxy/releases/download/v1.1.3/flowproxy
8+
curl -fSsL -o $DESTDIR/usr/bin/flowproxy https://github.com/BuilderNet/FlowProxy/releases/download/v1.2.1/flowproxy
99
echo "${EXPECTED_SHA256}" $DESTDIR/usr/bin/flowproxy | sha256sum --check
1010
chmod +x $DESTDIR/usr/bin/flowproxy

buildernet/mkosi.extra/etc/systemd/resolved.conf.d/10-default.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ DNS=8.8.8.8#dns.google
33
DNS=9.9.9.9#dns.quad9.net
44
DNS=1.1.1.1#cloudflare-dns.com
55
Domains=~.
6-
DNSOverTLS=yes
6+
# DNS over TLS is broken in systemd 257 we currenly use.
7+
# Fixed in 258.1: https://github.com/systemd/systemd/pull/38625
8+
DNSOverTLS=no

0 commit comments

Comments
 (0)