firmware: in retrospect always fetch the signature file

When we move to the next major the file contents for
the txz are all the same but their signature is not.
So until the next changelog sync was carried out the
CHECKSUM matched and the signature will stay stale.
This commit is contained in:
Franco Fichtner 2022-10-26 12:53:38 +02:00
parent 5c65f49bce
commit 607faca9ba

View File

@ -65,21 +65,16 @@ changelog_fetch()
{
mkdir -p ${DESTDIR}
CHECKSUM=$(changelog_checksum ${DESTDIR}/changelog.txz)
URL=$(changelog_url)
${FETCH} -mo ${DESTDIR}/changelog.txz "${URL}"
${FETCH} -o ${DESTDIR}/changelog.txz.sig "${URL}.sig"
if [ "${CHECKSUM}" != "$(changelog_checksum ${DESTDIR}/changelog.txz)" ]; then
${FETCH} -o ${DESTDIR}/changelog.txz.sig "${URL}.sig"
fi
opnsense-verify -q ${DESTDIR}/changelog.txz
if opnsense-verify -q ${DESTDIR}/changelog.txz; then
changelog_remove
tar -C ${DESTDIR} -xJf ${DESTDIR}/changelog.txz
else
rm -f ${DESTDIR}/changelog.txz ${DESTDIR}/changelog.txz.sig
fi
changelog_remove
tar -C ${DESTDIR} -xJf ${DESTDIR}/changelog.txz
}
changelog_show()