freebsd-update "The following files will be added" output

Issue: freebsd-update(8) shows output for source files after patching, even if no source component was selected when installing the OS.

Steps to reproduce:
1. Install FreeBSD. Do not select the option to install source code. This will create /usr/src as an empty directory.
2. Patch the server using freebsd-update.
3. Run freebsd-version to verify the patch version.
4. Run freebsd-update fetch. The output lists source files that still need to be updated because those files do not exist. This gives the impression that the server has not been patched. When running freebsd-update cron in /etc/crontab, a "[server_hostname] security updates" email is produced that gives the same impression.

Possible resolution:
Do not show freebsd-update output for source files if the OS source component is not installed (/usr/src is empty).

Example output:
Code:
$ freebsd-version
10.1-RELEASE-p14
$ sudo freebsd-update fetch
Looking up update.FreeBSD.org mirrors... 5 mirrors found.
Fetching metadata signature for 10.1-RELEASE from update4.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

The following files will be added as part of updating to 10.1-RELEASE-p14:
/usr/src/contrib/file/magic/Magdir/kerberos
/usr/src/contrib/file/magic/Magdir/meteorological
/usr/src/contrib/file/magic/Magdir/qt
/usr/src/crypto/openssl/util/mkbuildinf.pl
 
As a temporary workaround, you can use /usr/sbin/freebsd-update cron > /dev/null 2>&1 in your crontab to quiet things down. However, this would hide legitimate misconfiguration of the freebsd-update(8) tool so I would advise only doing this if you know the configuration is good and validating it if you change it in the future.
 
Back
Top