Page MenuHomeFreeBSD

freebsd-update: regenerate man page database after update
ClosedPublic

Authored by emaste on Apr 24 2017, 5:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 22, 5:18 PM
Unknown Object (File)
Fri, Mar 22, 1:01 PM
Unknown Object (File)
Fri, Mar 22, 1:01 PM
Unknown Object (File)
Fri, Mar 22, 11:23 AM
Unknown Object (File)
Sat, Mar 9, 2:10 PM
Unknown Object (File)
Sat, Mar 2, 11:17 AM
Unknown Object (File)
Feb 17 2024, 12:24 PM
Unknown Object (File)
Jan 9 2024, 11:07 AM

Details

Summary

These are currently not reproducible because they're built by the makewhatis on the freebsd-update build host, not the one in the tree. In fact, we should probably not ship the mandoc.db in the freebsd-update data and just regenerate it after update.

PR: 214545, 217389

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

delphij added inline comments.
usr.sbin/freebsd-update/freebsd-update.sh
2903 ↗(On Diff #27686)

No ${BASEDIR} prefix?

This revision is now accepted and ready to land.Apr 22 2018, 6:39 PM
This revision was automatically updated to reflect the committed changes.
bdrewery added inline comments.
head/usr.sbin/freebsd-update/freebsd-update.sh
2951–2954
To install the downloaded upgrades, run "/tmp/poudriere.R0QHx4tP/freebsd-update.hRjQjemy install".
Installing updates...
Kernel updates have been installed.  Please reboot and run
"/tmp/poudriere.R0QHx4tP/freebsd-update.hRjQjemy install" again to finish installing updates.
Installing updates...Scanning /poudriere/jails/exp-12amd64/usr/share/certs/blacklisted for certificates...
Scanning /poudriere/jails/exp-12amd64/usr/share/certs/trusted for certificates...
find: /poudriere/jails/exp-12amd64//usr/share/man/mandoc.db: No such file or directory
find: /poudriere/jails/exp-12amd64//usr/share/openssl/man/mandoc.db: No such file or directory

Completing this upgrade requires removing old shared object files.
Please rebuild all installed 3rd party software (e.g., programs
installed from the ports tree) and then run "/tmp/poudriere.R0QHx4tP/freebsd-update.hRjQjemy install"
again to finish installing updates.
Installing updates... done.
12.2-RELEASE-p5
[01:05:13] Recording filesystem state for clean... done

...

ls: /poudriere/jails/exp-12amd64//usr/share/man/mandoc.db: No such file or directory
ls: /poudriere/jails/exp-12amd64//usr/share/openssl/man/mandoc.db: No such file or directory

The logic seems backwards here or unneeded.
Shouldn't my jail get these databases on an update or install?

head/usr.sbin/freebsd-update/freebsd-update.sh
2951–2954

Oddly a new install produced the mandoc.db files but not an update of a 12.0->12.2.

head/usr.sbin/freebsd-update/freebsd-update.sh
2951–2954

The idea is that if anything in the /usr/share/man or /usr/share/openssl/man directory is newer than mandoc.db we should regenerate mandoc.db. I'm confused by the ls in your sample output, do you know where it's frome?

That said I think we ought to check that mandoc.db exists also, something like

diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh
index 004515bb8bf8..7f9b06f0221f 100644
--- a/usr.sbin/freebsd-update/freebsd-update.sh
+++ b/usr.sbin/freebsd-update/freebsd-update.sh
@@ -2958,7 +2958,8 @@ Kernel updates have been installed.  Please reboot and run
                        if [ ! -d ${BASEDIR}/$D ]; then
                                continue
                        fi
-                       if [ -z "$(find ${BASEDIR}/$D -type f -newer ${BASEDIR}/$D/mandoc.db)" ]; then
+                       if [ -f ${BASEDIR}/$D/mandoc.db ] && \
+                           [ -z "$(find ${BASEDIR}/$D -type f -newer ${BASEDIR}/$D/mandoc.db)" ]; then
                                continue;
                        fi
                        makewhatis ${BASEDIR}/$D