Bug 271801 - sysutils/cpupdate: installation of microcode to /usr/local/share/cpupdate is not done
Summary: sysutils/cpupdate: installation of microcode to /usr/local/share/cpupdate is...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Eugene Grosbein
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2023-06-03 09:39 UTC by Graham Perrin
Modified: 2023-08-10 03:07 UTC (History)
2 users (show)

See Also:
eugen: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin freebsd_committer freebsd_triage 2023-06-03 09:39:17 UTC
From <https://www.freshports.org/sysutils/cpupdate/#message>: 

> … If you installed the package then you may download microcodes with 
> following command:
> service cpupdate download

The response to the command does suggest that installation is done, however the relevant path does not exist. 

After creating the path, a rerun of the command suggests that installation is done, however nothing is installed. 


root@mowa219-gjp4-8570p-freebsd:~ # service cpupdate download
Installing microcodes to /usr/local/share/cpupdate ... done.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
NOTE: you have to manually remove the directory
/usr/local/share/cpupdate
after deinstallation of cpupdate.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
root@mowa219-gjp4-8570p-freebsd:~ # file /usr/local/share/cpupdate
/usr/local/share/cpupdate: cannot open `/usr/local/share/cpupdate' (No such file or directory)
root@mowa219-gjp4-8570p-freebsd:~ # service cpupdate status
cpupdate is not running.
root@mowa219-gjp4-8570p-freebsd:~ # grep cpupdate /var/log/console.log
Jun  3 10:16:01 mowa219-gjp4-8570p-freebsd kernel: File /usr/local/share/cpupdate/CPUMicrocodes/secondary/Intel/06-3a-09: Read error!
Jun  3 10:16:01 mowa219-gjp4-8570p-freebsd kernel: /etc/rc: WARNING: failed to start cpupdate
root@mowa219-gjp4-8570p-freebsd:~ # mkdir /usr/local/share/cpupdate
root@mowa219-gjp4-8570p-freebsd:~ # service cpupdate download
Installing microcodes to /usr/local/share/cpupdate ... done.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
NOTE: you have to manually remove the directory
/usr/local/share/cpupdate
after deinstallation of cpupdate.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
root@mowa219-gjp4-8570p-freebsd:~ # ls -hl /usr/local/share/cpupdate
total 0
root@mowa219-gjp4-8570p-freebsd:~ # service cpupdate start
Starting cpupdate.
Found CPU(s) from Intel
File /usr/local/share/cpupdate/CPUMicrocodes/secondary/Intel/06-3a-09: Read error!
/usr/local/etc/rc.d/cpupdate: WARNING: failed to start cpupdate
root@mowa219-gjp4-8570p-freebsd:~ # ls -hl /usr/local/share/cpupdate
total 0
root@mowa219-gjp4-8570p-freebsd:~ # service cpupdate download
Installing microcodes to /usr/local/share/cpupdate ... done.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
NOTE: you have to manually remove the directory
/usr/local/share/cpupdate
after deinstallation of cpupdate.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
root@mowa219-gjp4-8570p-freebsd:~ # ls -hl /usr/local/share/cpupdate
total 0
root@mowa219-gjp4-8570p-freebsd:~ # uname -aKU
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #41 main-n263189-c2c9ac88c2bb-dirty: Sat May 27 16:55:26 BST 2023     grahamperrin@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG amd64 1400089 1400089
root@mowa219-gjp4-8570p-freebsd:~ #
Comment 1 commit-hook freebsd_committer freebsd_triage 2023-06-19 10:25:14 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6667c5ca7ab31bc463a357f217371661620a730b

commit 6667c5ca7ab31bc463a357f217371661620a730b
Author:     Eugene Grosbein <eugen@FreeBSD.org>
AuthorDate: 2023-06-19 10:18:46 +0000
Commit:     Eugene Grosbein <eugen@FreeBSD.org>
CommitDate: 2023-06-19 10:25:03 +0000

    sysutils/cpupdate: fix microcode download for package users

    * adopt for changes in Mk/ that broke microcode download for package users;
    * update for platomav/CPUMicrocodes r268;
    * update for Intel pack microcode-20230613.

    Bump PORTREVISION.

    PR:             271801

 sysutils/cpupdate/Makefile          | 23 ++++++++++++++---------
 sysutils/cpupdate/distinfo          | 10 +++++-----
 sysutils/cpupdate/files/cpupdate.in |  4 ++--
 3 files changed, 21 insertions(+), 16 deletions(-)
Comment 2 Eugene Grosbein freebsd_committer freebsd_triage 2023-06-19 10:27:36 UTC
Thank you very much for the report. Sorry for late reply. The port is updated with fix. I would be glad to know if new revision works for you, too. Please report back.
Comment 3 void 2023-08-10 00:48:06 UTC
Shouldn't 'service cpupdate status' return that it's running?

# service cpupdate start 
Starting cpupdate.
Found CPU(s) from Intel
No updating error. Registering CPU features
Successfully registered new CPU features
hw.ibrs_disable: 0 -> 0
# service cpupdate status
cpupdate is not running.
Comment 4 Eugene Grosbein freebsd_committer freebsd_triage 2023-08-10 03:07:44 UTC
(In reply to void from comment #3)

No, because there should be no process running to track. The utility installs the microcode and terminates.