git: 717c3a90c54f - main - sysutils/devcpu-data-amd: Download microcode from ucode repo

From: Joseph Mingrone <jrm_at_FreeBSD.org>
Date: Thu, 11 Nov 2021 22:15:44 UTC
The branch main has been updated by jrm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=717c3a90c54f8f61d391ebe23ef52c27ce945f46

commit 717c3a90c54f8f61d391ebe23ef52c27ce945f46
Author:     Joseph Mingrone <jrm@FreeBSD.org>
AuthorDate: 2021-11-11 03:05:50 +0000
Commit:     Joseph Mingrone <jrm@FreeBSD.org>
CommitDate: 2021-11-11 22:10:27 +0000

    sysutils/devcpu-data-amd: Download microcode from ucode repo
    
    - Download AMD microcode firmware from git.kernel.org.
    
    - Make updates slightly simpler by referencing ${DISTFILES} rather than
      repeating the contents.
    
    - Expand pkg-descr.
    
    - Group and sort standard bsd.port.mk variables.
    
    Reported by:    sbruno (maintainer)
    Approved by:    sbruno (maintainer)
    Differential Revision:  https://reviews.freebsd.org/D32935
---
 sysutils/devcpu-data-amd/Makefile  | 26 +++++++++++++++-----------
 sysutils/devcpu-data-amd/distinfo  | 14 +++++++++++---
 sysutils/devcpu-data-amd/pkg-descr |  6 ++++--
 sysutils/devcpu-data-amd/pkg-plist |  5 -----
 4 files changed, 30 insertions(+), 21 deletions(-)

diff --git a/sysutils/devcpu-data-amd/Makefile b/sysutils/devcpu-data-amd/Makefile
index e8417df50c4c..79ba8bc23fa6 100644
--- a/sysutils/devcpu-data-amd/Makefile
+++ b/sysutils/devcpu-data-amd/Makefile
@@ -1,10 +1,15 @@
 PORTNAME=	data
 PORTVERSION=	20211109
+PORTREVISION=	1
 CATEGORIES=	sysutils
-MASTER_SITES=	LOCAL/sbruno
+MASTER_SITES=	https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/amd-ucode/
 PKGNAMEPREFIX=	devcpu-
 PKGNAMESUFFIX=	-amd
-DISTNAME=	amd64-microcode.${PORTVERSION}
+DISTFILES=	microcode_amd.bin \
+		microcode_amd_fam15h.bin \
+		microcode_amd_fam16h.bin \
+		microcode_amd_fam17h.bin \
+		microcode_amd_fam19h.bin
 
 MAINTAINER=	sbruno@FreeBSD.org
 COMMENT=	AMD CPUs microcode updates
@@ -16,21 +21,20 @@ LICENSE_PERMS=	dist-mirror no-dist-sell pkg-mirror no-pkg-sell auto-accept
 
 ONLY_FOR_ARCHS=	amd64 i386
 
-USES=		tar:xz
-
+EXTRACT_CMD=	${CP}
+EXTRACT_BEFORE_ARGS=	# empty
+EXTRACT_AFTER_ARGS=	.
 NO_ARCH=	yes
 NO_BUILD=	yes
 
-NO_WRKSUBDIR=	yes
-
 DATADIR=	${PREFIX}/share/cpucontrol
+NO_WRKSUBDIR=	yes
+PLIST_FILES=	${DISTFILES:S/^/${DATADIR}\//g}
 
 do-install:
 	${MKDIR} ${STAGEDIR}${DATADIR}/
-	${INSTALL_DATA} ${WRKSRC}/microcode_amd.bin ${STAGEDIR}${DATADIR}/
-	${INSTALL_DATA} ${WRKSRC}/microcode_amd_fam15h.bin ${STAGEDIR}${DATADIR}/
-	${INSTALL_DATA} ${WRKSRC}/microcode_amd_fam16h.bin ${STAGEDIR}${DATADIR}/
-	${INSTALL_DATA} ${WRKSRC}/microcode_amd_fam17h.bin ${STAGEDIR}${DATADIR}/
-	${INSTALL_DATA} ${WRKSRC}/microcode_amd_fam19h.bin ${STAGEDIR}${DATADIR}/
+.for f in ${DISTFILES}
+	${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DATADIR}/
+.endfor
 
 .include <bsd.port.mk>
diff --git a/sysutils/devcpu-data-amd/distinfo b/sysutils/devcpu-data-amd/distinfo
index 092211260c61..0ed88fa54a45 100644
--- a/sysutils/devcpu-data-amd/distinfo
+++ b/sysutils/devcpu-data-amd/distinfo
@@ -1,3 +1,11 @@
-TIMESTAMP = 1636501751
-SHA256 (amd64-microcode.20211109.tar.xz) = eadfc633bb4390b18f383b96f782c14a5cec0d5712d4b8d525dc6f76f2ae7522
-SIZE (amd64-microcode.20211109.tar.xz) = 49584
+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
diff --git a/sysutils/devcpu-data-amd/pkg-descr b/sysutils/devcpu-data-amd/pkg-descr
index beb555e676c7..54659a1e1b75 100644
--- a/sysutils/devcpu-data-amd/pkg-descr
+++ b/sysutils/devcpu-data-amd/pkg-descr
@@ -1,2 +1,4 @@
-This port uses the cpuctl(4) microcode update facility to keep your AMD
-processor's firmware up-to-date.
+Processor microcode updates provide bug fixes, which can be critical to
+the security and stability of your system.  This port uses the cpuctl(4)
+microcode update facility to keep your AMD processor's firmware
+up-to-date.
diff --git a/sysutils/devcpu-data-amd/pkg-plist b/sysutils/devcpu-data-amd/pkg-plist
deleted file mode 100644
index d45478f284bc..000000000000
--- a/sysutils/devcpu-data-amd/pkg-plist
+++ /dev/null
@@ -1,5 +0,0 @@
-%%DATADIR%%/microcode_amd.bin
-%%DATADIR%%/microcode_amd_fam15h.bin
-%%DATADIR%%/microcode_amd_fam16h.bin
-%%DATADIR%%/microcode_amd_fam17h.bin
-%%DATADIR%%/microcode_amd_fam19h.bin