From owner-svn-ports-head@freebsd.org Fri Mar 23 14:12:06 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3F93F6F891; Fri, 23 Mar 2018 14:12:06 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6709D75E09; Fri, 23 Mar 2018 14:12:06 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 61FE620EEE; Fri, 23 Mar 2018 14:12:06 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2NEC6uo028207; Fri, 23 Mar 2018 14:12:06 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2NEC6GF028205; Fri, 23 Mar 2018 14:12:06 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201803231412.w2NEC6GF028205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Fri, 23 Mar 2018 14:12:06 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r465359 - in head/sysutils/cpupdate: . files X-SVN-Group: ports-head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: in head/sysutils/cpupdate: . files X-SVN-Commit-Revision: 465359 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2018 14:12:06 -0000 Author: eugen Date: Fri Mar 23 14:12:05 2018 New Revision: 465359 URL: https://svnweb.freebsd.org/changeset/ports/465359 Log: sysutils/cpupdate: new convenience target "install-microcodes" Some users may prefer copying the whole bunch of CPU microcodes to their system instead of just needed one. Add new Makefile target "install-microcodes" to ease such copying and mention it in the pkg-message. This is still for convenience only and those blobs do not get into the pkg-plist and the package and need to be manually removed if not needed anymore. PR: 226620 Modified: head/sysutils/cpupdate/Makefile head/sysutils/cpupdate/files/pkg-message.in Modified: head/sysutils/cpupdate/Makefile ============================================================================== --- head/sysutils/cpupdate/Makefile Fri Mar 23 13:57:03 2018 (r465358) +++ head/sysutils/cpupdate/Makefile Fri Mar 23 14:12:05 2018 (r465359) @@ -30,18 +30,20 @@ CPM_ACCOUNT= platomav CPM_PROJECT= CPUMicrocodes CPM_TAGNAME= a0371d6 -OPTIONS_DEFINE= CPM INTEL -CPM_DESC= Download platomav/CPUMicrocodes collection -CPM_GH_ACCOUNT= ${CPM_ACCOUNT}:cpm -CPM_GH_PROJECT= ${CPM_PROJECT}:cpm -CPM_GH_TAGNAME= ${CPM_TAGNAME}:cpm -CPM_DIR=${WRKDIR}/${CPM_PROJECT}-${CPM_TAGNAME} +OPTIONS_DEFINE= CPM INTEL +CPM_DESC= Download platomav/CPUMicrocodes collection +CPM_GH_ACCOUNT= ${CPM_ACCOUNT}:cpm +CPM_GH_PROJECT= ${CPM_PROJECT}:cpm +CPM_GH_TAGNAME= ${CPM_TAGNAME}:cpm +CPM_DIR= ${WRKDIR}/${CPM_PROJECT}-${CPM_TAGNAME} +CPM_DATADIR= ${DATADIR}/CPUMicrocodes/secondary/Intel INTEL_PACK= microcode-20180312.tgz INTEL_DESC= Download Intel microcode pack ${INTEL_PACK} INTEL_MASTER_SITES= https://downloadmirror.intel.com/27591/eng/:intel INTEL_DISTFILES= ${INTEL_PACK}:intel INTEL_DIR= ${WRKDIR}/intel-ucode +INTEL_DATADIR= ${DATADIR}/CPUMicrocodes/primary/Intel post-patch: ${REINPLACE_CMD} -e "s,/usr/local/share/cpupdate,${DATADIR},g" ${WRKSRC}/cpupdate.h @@ -49,5 +51,29 @@ post-patch: do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.8 ${STAGEDIR}${MANPREFIX}/man/man8 + +.include + +install-microcodes: +.if ${PORT_OPTIONS:MINTEL} + ${RM} -rf ${INTEL_DATADIR} + ${MKDIR} ${INTEL_DATADIR} + (cd ${INTEL_DIR} && ${COPYTREE_SHARE} . ${INTEL_DATADIR}) +.endif +.if ${PORT_OPTIONS:MCPM} + ${RM} -rf ${CPM_DATADIR} + ${MKDIR} ${CPM_DATADIR} + (cpupdate -IC -S ${CPM_DIR}/Intel -T ${CPM_DATADIR}) +.endif +.for _o in INTEL CPM +.if ${PORT_OPTIONS:M${_o}} + @${ECHO} '' + @${ECHO} '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' + @${ECHO} NOTE: you have to manually remove the directory + @${ECHO} ${${_o}_DATADIR} + @${ECHO} after deinstallation of ${PORTNAME}. + @${ECHO} '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' +.endif +.endfor .include Modified: head/sysutils/cpupdate/files/pkg-message.in ============================================================================== --- head/sysutils/cpupdate/files/pkg-message.in Fri Mar 23 13:57:03 2018 (r465358) +++ head/sysutils/cpupdate/files/pkg-message.in Fri Mar 23 14:12:05 2018 (r465359) @@ -5,5 +5,8 @@ NOTE: The following directories %%INTEL_DIR%% contain Intel and/or platomav/CPUMicrocodes collections respectively -if you have just built the port with corresponding CPM/INTEL option(s) enabled +if you have just built the port with corresponding CPM/INTEL option(s) enabled. +In this case you can run "make install-microcodes" to install them to + +%%DATADIR%% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!