-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (63 loc) · 2.41 KB
/
ci_ubuntu_verify_repo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: CI ubuntu verify repo
'on':
workflow_call: null
jobs:
wibu-signed-deb-files:
runs-on: ubuntu-latest
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- name: Install debsig-verify
run: |
sudo apt update
sudo apt install -y debsig-verify
- name: Create debsig directory structures
run: |
sudo mkdir -p /etc/debsig/policies/5FCB7AB40CC62A25
sudo mkdir -p /usr/share/debsig/keyrings/5FCB7AB40CC62A25
- name: Install the debsig policy file
run: sudo cp policy.pol /etc/debsig/policies/5FCB7AB40CC62A25/
working-directory: ubuntu/
- name: Dearmor WIBU pubkey
run: gpg -o wibu_pub_dearmored.gpg --dearmor wibu_pub.gpg
working-directory: ubuntu/
- name: Install dearmored key
run: sudo cp wibu_pub_dearmored.gpg /usr/share/debsig/keyrings/5FCB7AB40CC62A25/debsig.gpg
working-directory: ubuntu/
- name: Verify WIBU systems signed all deb files
run: for i in ./*.deb; do debsig-verify "$i"; done
working-directory: ./ubuntu/
regeneration_is_clean:
runs-on: ubuntu-latest
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- name: Regenerate Packages
run: dpkg-scanpackages --multiversion . > Packages
working-directory: ./ubuntu/
- name: Verify Packages is up to date
run: git diff --exit-code
working-directory: ./ubuntu/
- name: Regenerate Packages.gz
run: gzip -k -f Packages --no-name
working-directory: ./ubuntu/
- name: Verify Packages.gz is up to date
run: git diff --exit-code
working-directory: ./ubuntu/
- name: Verify sha512 sums in the Release file except for itself
run: |
awk '/^SHA512:/ {flag=1; next} /^$/ {flag=0} flag && $3 != "Release" {print}' Release | while read -r checksum size file; do
if [ "$(sha512sum "$file" | awk '{print $1}')" != "$checksum" ]; then
exit 1
fi
done
working-directory: ./ubuntu/
- name: Try to import the pubkey
run: gpg --import wibu-packages-maintainers.gpg
working-directory: ./ubuntu/
- name: Verify Release.gpg
run: gpg --verify Release.gpg Release
working-directory: ./ubuntu/
- name: Verify InRelease
run: gpg --verify InRelease
working-directory: ./ubuntu/