Force PGP signature file extension

archiso/mkarchiso:
Force the file extension in use for the PGP signatures of the rootfs to always be .sig.
When gnupg's 'armor' configuration option is used, the output otherwise defaults to using .asc.
As the verification hook in mkinitcpio-archiso expects the .sig file extension, verifying the rootfs will fail in that
scenario.
This commit is contained in:
David Runge 2021-05-01 16:51:28 +02:00
parent 73e3ccdb59
commit cc735dbbfc
No known key found for this signature in database
GPG key ID: 7258734B41C31549

View file

@ -227,10 +227,11 @@ _mkchecksum() {
_mksignature() { _mksignature() {
_msg_info "Signing SquashFS image..." _msg_info "Signing SquashFS image..."
cd -- "${isofs_dir}/${install_dir}/${arch}" cd -- "${isofs_dir}/${install_dir}/${arch}"
# always use the .sig file extension, as that is what mkinitcpio-archiso's hooks expect
if [[ -e "${isofs_dir}/${install_dir}/${arch}/airootfs.sfs" ]]; then if [[ -e "${isofs_dir}/${install_dir}/${arch}/airootfs.sfs" ]]; then
gpg --detach-sign --default-key "${gpg_key}" airootfs.sfs gpg --output airootfs.sfs.sig --detach-sign --default-key "${gpg_key}" airootfs.sfs
elif [[ -e "${isofs_dir}/${install_dir}/${arch}/airootfs.erofs" ]]; then elif [[ -e "${isofs_dir}/${install_dir}/${arch}/airootfs.erofs" ]]; then
gpg --detach-sign --default-key "${gpg_key}" airootfs.erofs gpg --output airootfs.erofs.sig --detach-sign --default-key "${gpg_key}" airootfs.erofs
fi fi
cd -- "${OLDPWD}" cd -- "${OLDPWD}"
_msg_info "Done!" _msg_info "Done!"