Skip to content

Commit

Permalink
sysutils/devcpu-data-amd: Specify the hash to fetch
Browse files Browse the repository at this point in the history
Fetching the latest revision of these firmware files could result in a
checksum mismatch if the files were updated in the upstream repository.
By downloading a specific revision, we prevent this potential problem.

Reported by:	diizzy
Approved by:	sbruno (maintainer)
Differential Revision:	https://reviews.freebsd.org/D32969
  • Loading branch information
Jehops committed Nov 13, 2021
1 parent 0bef5c1 commit f995684
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
19 changes: 11 additions & 8 deletions sysutils/devcpu-data-amd/Makefile
@@ -1,15 +1,16 @@
PORTNAME= data
PORTVERSION= 20211109
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/amd-ucode/
PKGNAMEPREFIX= devcpu-
PKGNAMESUFFIX= -amd
DISTFILES= microcode_amd.bin \
microcode_amd_fam15h.bin \
microcode_amd_fam16h.bin \
microcode_amd_fam17h.bin \
microcode_amd_fam19h.bin
DISTFILES= microcode_amd.bin?id=${_REV} \
microcode_amd_fam15h.bin?id=${_REV} \
microcode_amd_fam16h.bin?id=${_REV} \
microcode_amd_fam17h.bin?id=${_REV} \
microcode_amd_fam19h.bin?id=${_REV}
DIST_SUBDIR= ${PKGNAME:C/_.*$//}

MAINTAINER= sbruno@FreeBSD.org
COMMENT= AMD CPUs microcode updates
Expand All @@ -29,12 +30,14 @@ NO_BUILD= yes

DATADIR= ${PREFIX}/share/cpucontrol
NO_WRKSUBDIR= yes
PLIST_FILES= ${DISTFILES:S/^/${DATADIR}\//g}
PLIST_FILES= ${DISTFILES:S/^/${DATADIR}\//g:C/\?.*//}

_REV= 4e9f60f2556586246db811e8146798cd1c584604

do-install:
${MKDIR} ${STAGEDIR}${DATADIR}/
.for f in ${DISTFILES}
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DATADIR}/
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DATADIR}/${f:C/\?.*//}
.endfor

.include <bsd.port.mk>
22 changes: 11 additions & 11 deletions sysutils/devcpu-data-amd/distinfo
@@ -1,11 +1,11 @@
TIMESTAMP = 1636599094
SHA256 (microcode_amd.bin) = 8a9d9e8b788e31e61cddc03cb1eeab5db99e0f667128943ff0780e6437d2e43e
SIZE (microcode_amd.bin) = 12684
SHA256 (microcode_amd_fam15h.bin) = 9d4a668410e72a4bdb86dc23e4261eca04daa83456ada02504115223f356981a
SIZE (microcode_amd_fam15h.bin) = 7876
SHA256 (microcode_amd_fam16h.bin) = e02ad653b39c975d6c52674b50f23727bb6706bab7b4e5b391a4ce229e7ff121
SIZE (microcode_amd_fam16h.bin) = 3510
SHA256 (microcode_amd_fam17h.bin) = 5288d1ac032abe61441c5626091458803f925304ee45ca18de38a4edd66cddd2
SIZE (microcode_amd_fam17h.bin) = 6476
SHA256 (microcode_amd_fam19h.bin) = 8bdf0eba5d9c3e8cc960e1bb39a47caeaca6d59d7fcb265ac5efcae46731823f
SIZE (microcode_amd_fam19h.bin) = 16804
TIMESTAMP = 1636741188
SHA256 (devcpu-data-amd-20211109/microcode_amd.bin?id=4e9f60f2556586246db811e8146798cd1c584604) = 8a9d9e8b788e31e61cddc03cb1eeab5db99e0f667128943ff0780e6437d2e43e
SIZE (devcpu-data-amd-20211109/microcode_amd.bin?id=4e9f60f2556586246db811e8146798cd1c584604) = 12684
SHA256 (devcpu-data-amd-20211109/microcode_amd_fam15h.bin?id=4e9f60f2556586246db811e8146798cd1c584604) = 9d4a668410e72a4bdb86dc23e4261eca04daa83456ada02504115223f356981a
SIZE (devcpu-data-amd-20211109/microcode_amd_fam15h.bin?id=4e9f60f2556586246db811e8146798cd1c584604) = 7876
SHA256 (devcpu-data-amd-20211109/microcode_amd_fam16h.bin?id=4e9f60f2556586246db811e8146798cd1c584604) = e02ad653b39c975d6c52674b50f23727bb6706bab7b4e5b391a4ce229e7ff121
SIZE (devcpu-data-amd-20211109/microcode_amd_fam16h.bin?id=4e9f60f2556586246db811e8146798cd1c584604) = 3510
SHA256 (devcpu-data-amd-20211109/microcode_amd_fam17h.bin?id=4e9f60f2556586246db811e8146798cd1c584604) = 5288d1ac032abe61441c5626091458803f925304ee45ca18de38a4edd66cddd2
SIZE (devcpu-data-amd-20211109/microcode_amd_fam17h.bin?id=4e9f60f2556586246db811e8146798cd1c584604) = 6476
SHA256 (devcpu-data-amd-20211109/microcode_amd_fam19h.bin?id=4e9f60f2556586246db811e8146798cd1c584604) = 8bdf0eba5d9c3e8cc960e1bb39a47caeaca6d59d7fcb265ac5efcae46731823f
SIZE (devcpu-data-amd-20211109/microcode_amd_fam19h.bin?id=4e9f60f2556586246db811e8146798cd1c584604) = 16804

0 comments on commit f995684

Please sign in to comment.