The signature file will be stored in the same directory structure it was
picked from, to allow having multiple files with the same name
# First step: if there are UKI signatures, attach them
while read -r SIG; do
infile="${SIG%.sig}"
+ test -f "/usr/src/packages/SOURCES/$infile" || continue
sattrs="hashes/ukis/${SIG%.sig}"
test -s "$sattrs"
echo -n "$pol" | tr '[:lower:]' '[:upper:]' | basenc --base16 --decode >"hashes/pcrs/${f}/${pol}"
done < <(jq -r 'to_entries[] | .value[].pol' <"${OUTPUTDIR}/${f%.efi}.pcrs")
else
- mkdir -p hashes/ukis
+ mkdir -p "$(dirname "hashes/ukis/$f")"
pesign --force -n sql:"$nss_db" -i "${OUTPUTDIR}/${f}" -E "hashes/ukis/$f"
fi
done
for f in "${KERNELS[@]}"; do
test -f "${OUTPUTDIR}/${f}" || continue
- mkdir -p hashes/kernels
+ mkdir -p "$(dirname "hashes/kernels/$f")"
pesign --force -n sql:"$nss_db" -i "${OUTPUTDIR}/${f}" -E "hashes/kernels/$f"
done