Bug 217389

Summary: man page database mandoc.db created by host, not in-tree, makewhatis
Product: Base System Reporter: Ed Maste <emaste>
Component: miscAssignee: Ed Maste <emaste>
Status: In Progress ---    
Severity: Affects Many People CC: anubas, bapt, dch, f.bergknecht, freebsd, kimmo, stephen, wosch
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214545

Description Ed Maste freebsd_committer freebsd_triage 2017-02-27 12:57:31 UTC
makewhatis was recently fixed to produce reproducible output (r307003) and later the format changed and is no longer sqlite (r312593).

Unfortunately the installed makewhatis is used by installworld. When installing to the local system everything works as desired, as the new makewhatis will be installed. When installing to DESTDIR (for producing VM images, FreeBSD-update builds, etc.) the host's makewhatis is used and depending on the version may produce nonreproducible or incorrect format output.

Revision links:
https://svnweb.freebsd.org/base?view=revision&revision=307003
https://svnweb.freebsd.org/base?view=revision&revision=312593
Comment 1 Ed Maste freebsd_committer freebsd_triage 2017-02-27 17:00:56 UTC
Link to reproducible-build CI test run diffoscope output that highlighted this issue: https://tests.reproducible-builds.org/freebsd/dbd/freebsd_master_gitd0cb282.tar.xz.html
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-01-30 19:20:19 UTC
A commit references this bug:

Author: emaste
Date: Wed Jan 30 19:19:14 UTC 2019
New revision: 343589
URL: https://svnweb.freebsd.org/changeset/base/343589

Log:
  freebsd-update: regenerate man page database after update

  These are currently not reproducible because they're built by the
  makewhatis on the freebsd-update build host, not the one in the tree.
  Regenerate after update, and later we can avoid including it in
  freebsd-update data.

  PR:		214545, 217389
  Reviewed by:	delphij
  MFC after:	1 month
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D10482

Changes:
  head/usr.sbin/freebsd-update/freebsd-update.sh
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-03-05 18:11:02 UTC
A commit references this bug:

Author: emaste
Date: Tue Mar  5 18:10:07 UTC 2019
New revision: 344799
URL: https://svnweb.freebsd.org/changeset/base/344799

Log:
  MFC r343589: freebsd-update: regenerate man page database after update

  These are currently not reproducible because they're built by the
  makewhatis on the freebsd-update build host, not the one in the tree.
  Regenerate after update, and later we can avoid including it in
  freebsd-update data.

  PR:		214545, 217389
  Reviewed by:	delphij
  Sponsored by:	The FreeBSD Foundation

Changes:
_U  stable/12/
  stable/12/usr.sbin/freebsd-update/freebsd-update.sh
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-03-05 18:12:10 UTC
A commit references this bug:

Author: emaste
Date: Tue Mar  5 18:11:37 UTC 2019
New revision: 344800
URL: https://svnweb.freebsd.org/changeset/base/344800

Log:
  MFC r343589: freebsd-update: regenerate man page database after update

  These are currently not reproducible because they're built by the
  makewhatis on the freebsd-update build host, not the one in the tree.
  Regenerate after update, and later we can avoid including it in
  freebsd-update data.

  PR:		214545, 217389
  Reviewed by:	delphij
  Sponsored by:	The FreeBSD Foundation

Changes:
_U  stable/11/
  stable/11/usr.sbin/freebsd-update/freebsd-update.sh
Comment 5 Wolfram Schneider freebsd_committer freebsd_triage 2022-09-29 17:40:54 UTC
Does the problem still exists or can we close the bug report?
Comment 6 Ed Maste freebsd_committer freebsd_triage 2022-09-30 13:14:14 UTC
AFAIK we have workarounds in place but the underlying issue still exists.