freebsd-dev/usr.sbin
Colin Percival c55b7e5226 freebsd-update: Fix merging already-updated files
When performing an "upgrade" (moving between FreeBSD releases, as
opposed to "update" which merely applies security/errata updates
to the installed release) FreeBSD Update:

1. Generates a list of "files needing to be merged", namely those
files which don't match the version installed in the "old" release
and have paths matching the MergeChanges configuration directive
(by default, /boot/device.hints and everything under /etc/).

and later on,

2. Compares the currently-installed files to the versions in the
"new" release, removing index entries for files which "don't need
to be updated because they're not changing".

Unfortunately if a file falls into both of these categories -- that
is to say, if a file in /etc/ is the same as the version in the new
release and not the same as the version in the old release -- the
resulting "merge" step saw that the file was no longer listed as
being part of the new release, resulting in the file being deleted.

For the first 18 years of FreeBSD Update's existence, this never
happened, since $FreeBSD$ tags resulted in "new release" files
always being different from any files systems would already have
installed.

This commit fixes this behaviour by only placing a file into the
"files needing to be merged" list if it does not match the version
in the old release *or* the version in the new release.

Reported by:	des
Reviewed by:	delphij (earlier version), des, emaste
MFC after:	7 days
X-EN-Candidate:	yes
Differential Revision:	https://reviews.freebsd.org/D39973
2023-05-09 16:28:09 -07:00
..
ac Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
accton Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
acpi Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
adduser
apm Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
apmd
arp arp/ndp: Use valid prototypes for function declarations with no arguments. 2023-04-26 13:18:53 -07:00
audit Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
auditd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
auditdistd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
auditreduce Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
authpf Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
autofs Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
bhyve bhyve: fix vCPU single-stepping on VMX 2023-05-09 10:04:55 +02:00
bhyvectl bhyve: use directory file descriptor for checkpoint 2023-04-28 09:00:48 +02:00
bhyveload Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
binmiscctl Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
blacklistctl Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
blacklistd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
bluetooth bluetooth/hccontrol: Fix unterminated command list 2023-05-04 16:01:36 -06:00
boot0cfg Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
bootparamd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
boottrace boottrace(8): small wrapper utility 2022-02-21 20:16:12 -04:00
bsdconfig bsdconfig: correct name of the wpa_supplicant config file 2023-01-16 18:56:45 +00:00
bsdinstall bsdinstall avoid subdir depending on parent 2023-04-20 22:00:40 -07:00
bsnmpd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
btxld Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
camdd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
cdcontrol Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
certctl Strip trailing slashes from DESTDIR 2023-02-04 12:11:02 -07:00
chkgrp Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
chown Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
chroot Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
ckdist Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
clear_locks Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
config Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
cpucontrol Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
crashinfo Indicate that kgdb.1 is from ports/devel/gdb. 2022-08-14 15:17:29 +02:00
cron Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
crunch Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
ctladm Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
ctld Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
cxgbetool Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
daemon daemon: EINTR from kevent(2) is not a fatal error 2023-05-05 10:28:40 -05:00
dconschat Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
devctl Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
devinfo Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
diskinfo Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
dumpcis Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
editmap Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
edquota Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
efibootmgr efibootmgr: add missing break for 'u' case 2023-02-23 14:13:18 -05:00
efidp Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
efitable
efivar Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
efiwake efiwake(8): add man page 2023-05-09 17:33:18 +03:00
etcupdate etcupdate: Chase test case after pwd_mkdb(8) no longer copies comments. 2023-01-29 20:40:58 -08:00
extattr Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
extattrctl Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
fdcontrol Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
fdformat Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
fdread Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
fdwrite Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
fifolog Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
flowctl Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
freebsd-update freebsd-update: Fix merging already-updated files 2023-05-09 16:28:09 -07:00
fstyp Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
ftp-proxy Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
fwcontrol Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
fwget fwget: Use BSD-2-Clause instead of BSD-2-Clause-FreeBSD 2023-05-09 16:03:39 +02:00
getfmac Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
getpmac Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
gpioctl Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
gssd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
gstat Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
hyperv Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
i2c Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
ifmcstat Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
inetd pkgbase: Create a FreeBSD-inetd package 2023-02-08 08:48:43 +01:00
iostat Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
iovctl Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
ip6addrctl Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
ipfwpcap Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
iscsid Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
jail Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
jexec Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
jls Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
kbdcontrol Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
kbdmap Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
keyserv Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
kldxref Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
lastlogin Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
lpr Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
lptcontrol Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
mailstats Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
mailwrapper Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
makefs Build host tools on non-FreeBSD host with DIRDEPS_BUILD 2023-04-22 13:13:22 -07:00
makemap Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
manctl
memcontrol Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
mergemaster mergemaster: add deprecation notice to man page 2023-03-02 20:43:34 -05:00
mfiutil Add mrsasutil(8) as alias to mfiutil(8) 2023-05-05 09:20:48 -07:00
mixer Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
mld6query Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
mlx5tool Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
mlxcontrol Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
mount_smbfs Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
mountd mountd: Improve error message for exports lines 2023-05-06 15:02:08 -04:00
moused Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
mpsutil mpsutil(8): Remove a stray paragraph 2023-05-04 16:06:28 -06:00
mptable Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
mptutil Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
mtest Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
ndp arp/ndp: Use valid prototypes for function declarations with no arguments. 2023-04-26 13:18:53 -07:00
newsyslog Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
nfscbd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
nfsd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
nfsdumpstate Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
nfsrevoke Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
nfsuserd nfsuserd.c: Replace slave with server 2023-04-22 08:18:02 -07:00
ngctl Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
nghook Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
nmtree local.meta.sys.mk set BOOTSTRAPPING 2023-05-03 12:20:02 -07:00
nologin Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
nscd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
ntp ntpd: Support IPv6-only hosts 2023-05-04 21:37:02 -07:00
nvram
ofwdump ofwdump.8: Remove references to eeprom(8) 2022-02-27 09:03:42 -07:00
pciconf Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
periodic 310.accounting: Verify process accounting is active before log rotation. 2023-02-28 09:59:34 -07:00
pkg Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
pmc pmc: remove write-only variable 2022-10-19 20:59:23 +00:00
pmcannotate Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
pmccontrol pmccontrol: drop Pentium 4 special case 2023-05-06 14:49:18 -03:00
pmcstat pmcstat: augment an error message 2023-05-06 14:49:19 -03:00
pmcstudy Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
pnfsdscopymr
pnfsdsfile
pnfsdskill
pnpinfo
powerd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
ppp ppp: Use valid prototypes for function declarations with no arguments. 2023-04-24 08:53:49 -07:00
pppctl Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
praliases Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
praudit Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
prometheus_sysctl_exporter prometheus_sysctl_exporter: Replace magic numbers with identifiers. 2023-04-26 18:29:33 +10:00
pstat Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
pw Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
pwd_mkdb Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
pwm
quot Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
quotaon Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
rarpd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
repquota Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
rip6query Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
rmt Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
route6d Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
rpc.lockd rpc.lockd: Use valid prototypes for function declarations with no arguments. 2023-04-24 08:53:49 -07:00
rpc.statd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
rpc.tlsclntd report full error string on SSL_connect() failure 2023-02-27 16:07:30 -07:00
rpc.tlsservd rpc.tlsservd: Check for a tls syscall failure. 2022-12-22 09:10:27 -08:00
rpc.umntall rpc.umntall: Use valid prototype for function declaration with no arguments. 2023-04-24 08:53:49 -07:00
rpc.yppasswdd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
rpc.ypupdated Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
rpc.ypxfrd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
rpcbind rpcbind: Remove useless return at the end of void function 2023-03-02 08:01:39 -07:00
rrenumd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
rtadvctl Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
rtadvd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
rtprio Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
rtsold rtsol: introduce an 'always' script 2023-05-02 18:07:36 +02:00
rwhod Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
sa Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
sendmail Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
service
services_mkdb Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
sesutil Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
setfib Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
setfmac Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
setpmac Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
smbmsg Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
snapinfo Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
spi
spkrtest spkrtest(8): Replace dialog with bsddialog 2022-03-16 01:48:53 +01:00
spray Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
syslogd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
sysrc sysrc.8: Mention it requires chroot(8) 2022-04-03 13:54:11 +02:00
tcpdchk Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
tcpdmatch Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
tcpdrop Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
tcpdump Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
tcpsso tcp_sso: add support for TCP_MAXUNACKTIME 2022-09-29 02:02:11 +02:00
tests
traceroute Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
traceroute6 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
trim
tzsetup tzsetup: appease checkstyle9 2023-04-27 20:29:55 +02:00
uathload Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
uefisign Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
ugidfw Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
uhsoctl Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
unbound Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
usbconfig Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
usbdump Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
utx Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
valectl pkgbase: Create a FreeBSD-netmap package 2023-02-08 08:49:28 +01:00
vidcontrol Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
vigr
vipw Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
wake Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
watch Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
watchdogd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
wlandebug Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
wpa Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
yp_mkdb Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
ypbind Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
ypldap Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
yppoll Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
yppush Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
ypserv yp: Use more accurate function pointer types. 2023-04-18 11:28:57 -07:00
ypset Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
zdump tzcode: Move configuration into separate header. 2023-01-11 11:39:12 +01:00
zic tzcode: Move configuration into separate header. 2023-01-11 11:39:12 +01:00
zonectl Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
zzz
Makefile fwget: Introduce new utility 2023-05-01 08:32:59 +02:00
Makefile.aarch64 Fix the name of Makefile.aarch64 2022-05-19 11:30:21 +01:00
Makefile.amd64 Makefile.amd64: remove construct that serves no purpose 2023-02-08 12:19:39 -07:00
Makefile.arm
Makefile.i386 hyperv: Build and install where supported 2023-02-01 10:21:57 -07:00
Makefile.inc
Makefile.powerpc
Makefile.riscv