Bug 247766 - sysutils/cpupdate should provide devd.conf(5) script for resume
Summary: sysutils/cpupdate should provide devd.conf(5) script for resume
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Eugene Grosbein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-04 19:23 UTC by Walter von Entferndt
Modified: 2020-07-05 17:48 UTC (History)
0 users

See Also:
eugen: maintainer-feedback+


Attachments
patch: $LOCALBASE/etc/devd/cpupdate.conf to invoke cpupdate on resume (317 bytes, text/plain)
2020-07-04 19:23 UTC, Walter von Entferndt
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Walter von Entferndt 2020-07-04 19:23:38 UTC
Created attachment 216201 [details]
patch: $LOCALBASE/etc/devd/cpupdate.conf to invoke cpupdate on resume

Hi!

1. The port's message states cpupdate should be called again on resume.
Here's the devd.conf(5) script to do that.  It goes to /usr/local/etc/devd/cpupdate.conf.

2. Another issue I had is that the package version of cpupdate does not include the neccessary data files, only the ports version does (must be enabled).  This might be because I am dialing up, so there is no internet when cpupdate fires up.

3. For me as a naive user, I have no idea what CPM means and if I can use the potomav files instead of the Intel ones. Is CPM a CPU architecture used in academica?

Thx in advance.
Comment 1 Eugene Grosbein freebsd_committer 2020-07-05 08:37:17 UTC
1. devd already handles cpupdate on resume: devd invokes /etc/rc.resume that calls all services having "resume" keyword in their rc.d startup script and cpupdate has it.

2. The file ports/sysutils/cpupdate/Makefile has a commentary describing microcode distribution policy. This is mostly due to copyright issues.

# The license of Intel's microcode binary files prohibits redistribution,
# so they are no part of this port to not restrict packaging and redistribution
# of the port itself. These binaries ought be downloaded and installed
# separately from this package by default. There are non-default port options
# and "make install-microcodes" command to download and install
# the whole bunch of microcode binaries.

3. cpupdate is for Intel CPU only. CPM is short for CPU Microcodes unofficial web collection that includes Intel microcodes too and suitable for cpupdate.
Comment 2 commit-hook freebsd_committer 2020-07-05 08:46:35 UTC
A commit references this bug:

Author: eugen
Date: Sun Jul  5 08:45:51 UTC 2020
New revision: 541259
URL: https://svnweb.freebsd.org/changeset/ports/541259

Log:
  sysutils/cpupdate: minor update

  - Remove stale notes from pkg-descr and pkg-message.in
    that are not relevant for supported branches (*)
  - sync with platomav/CPUMicrocodes MCE DB r151.

  No functional changes so PORTREVISION not bumped.

  PR:		247766

Changes:
  head/sysutils/cpupdate/Makefile
  head/sysutils/cpupdate/distinfo
  head/sysutils/cpupdate/files/pkg-message.in
  head/sysutils/cpupdate/pkg-descr
Comment 3 Walter von Entferndt 2020-07-05 12:55:20 UTC
(In reply to Eugene Grosbein from comment #1)
So the reason cpupdate did not update my CPU was that I did not have the data files.  This will likely happen to many others, too.  Thus, if you put this note in the pkg-message, too, I'm happy.  Luxury version: add a "download" command to the service script, then the user can do "service cpupdate download" with cpupdate_data=intel|potamov in rc.conf.


Thx in advance, Torsten.
Comment 4 Eugene Grosbein freebsd_committer 2020-07-05 13:14:58 UTC
pkg-message already contains a reference to "make install-microcodes" command.
Comment 5 commit-hook freebsd_committer 2020-07-05 17:48:03 UTC
A commit references this bug:

Author: eugen
Date: Sun Jul  5 17:47:36 UTC 2020
New revision: 541295
URL: https://svnweb.freebsd.org/changeset/ports/541295

Log:
  sysutils/cpupdate: introduce "service cpupdate download"

  New command "service cpupdate download" targeted
  for package users is equivalent to "make install-microcodes"
  already present for ports users. (*)

  Also, sync with Intel pack microcode-20200616 available from Github.
  Bump PORTREVISION.

  PR:		247766
  Suggested by:	Walter von Entferndt (*)

Changes:
  head/sysutils/cpupdate/Makefile
  head/sysutils/cpupdate/distinfo
  head/sysutils/cpupdate/files/cpupdate.in
  head/sysutils/cpupdate/files/pkg-message.in