Debian Codegraph @

debian/gen_signing_json

raw symbols SCIP
1 #!/bin/sh
2 #
3 # Generate a json file to go in the the fwupd-signed template
4 # package. Describes exactly what needs to be signed, and how.
5
6 DIR=$1
7 ARCH=$2
8 OUT="$DIR/files.json"
9
10 # What file are we looking to sign?
11 BINARY=$(find debian/tmp -name '*.efi' | xargs basename)
12
13 # Actually needs full path within the binary deb
14 BINARY="usr/libexec/fwupd/efi/${BINARY}"
15
16 rm -f $OUT
17
18 printf '{\n' >> $OUT
19 printf ' "packages": {\n' >> $OUT
20 printf ' "fwupd-unsigned": {\n' >> $OUT
21 printf ' "trusted_certs": [],\n' >> $OUT
22 printf ' "files": [ \n' >> $OUT
23 printf ' {"sig_type": "efi", "file": "%s"}\n' "${BINARY}" >> $OUT
24 printf ' ]\n' >> $OUT
25 printf ' }\n' >> $OUT
26 printf ' }\n' >> $OUT
27 printf '}\n' >> $OUT