Skip to content
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
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ Ready for review / Work in progress
- [ ] Build metadata has been committed to [build-logs](https://github.com/freedomofpress/build-logs).
- [ ] Ensure packages names are the ones expected (i.e. no missing packages)
- [ ] Build locally and compare sha256sum hashes (if reproducible)
- [ ] For kernel packages only: source tarball uploaded internally
59 changes: 59 additions & 0 deletions .github/workflows/check-tarballs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
name: Check kernel tarballs

on:
- pull_request

permissions:
contents: read

jobs:
check-tarballs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.13"

# This writes the key to a temp file and exports GOOGLE_APPLICATION_CREDENTIALS
- uses: google-github-actions/auth@c200f3691d83b41bf9bbd8638997a462592937ed # v2.1.13
with:
credentials_json: ${{ secrets.GRC_TARBALL_AUDITOR_CREDS }}

- name: Install dependencies
run: pip install google-cloud-storage

- name: Verify tarballs present
env:
GCS_BUCKET: "grsec-source-tarballs"
shell: python
run: |
import os
import sys
from pathlib import Path

from google.cloud import storage

bucket_name = os.environ["GCS_BUCKET"]
bucket = {blob.name for blob in storage.Client().list_blobs(bucket_name)}
print(f"Found {len(bucket)} items in GCS bucket")
exit_code = 0
debs = {deb.name for deb in Path(".").glob("**/linux-image*.deb")}
for deb in sorted(debs):
# skip one specific version that had a messed up version number but was uploaded correctly
# TODO: remove once bookworm is dropped
if deb == "linux-image-6.6.22-grsec-workstation-1_6.6.22-grsec-workstation-1_amd64.deb":
continue
# transform deb filename into expected tarball name
tarball = deb.split("_")[0].replace("linux-image-", "linux-upstream_") + ".orig.tar.xz"
if tarball in bucket:
print(f"OK: {deb} -> {tarball}")
else:
print(f"ERROR: {deb} missing tarball (expected {tarball})")
exit_code = 1

sys.exit(exit_code)
Loading