History log of /freebsd-11-stable/usr.sbin/mergemaster/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
370098 08-Jul-2021 imp

mergemaster: handle symbolic links during update.

/etc/os-release is now a symbolic link to a generated file. Make
mergemaster cope with symbolic links generically. I'm no longer
a big mergemaster user, so this has only been lightly tested
by me, though Kimura-san has ran it through its paces.

Submitted by: Yasushiro KIMURA-san
PR: 242212
MFC After: 2 weeks

(cherry picked from commit 30a56f9ef72705f2f3646ce4330cbc20675a465e)

Git Hash: 27e18c06f08b413cd6d90922971194ae65921805
Git Author: imp@FreeBSD.org

357082 24-Jan-2020 kevans

MFC r352948-r352951, r353002, r353066, r353070: caroot infrastructure

Infrastructure only -- no plans in place currently to commit any certs to
these branches.

r352948:
[1/3] Initial infrastructure for SSL root bundle in base

This setup will add the trusted certificates from the Mozilla NSS bundle
to base.

This commit includes:
- CAROOT option to opt out of installation of certs
- mtree amendments for final destinations
- infrastructure to fetch/update certs, along with instructions

A follow-up commit will add a certctl(8) utility to give the user control
over trust specifics. Another follow-up commit will actually commit the
initial result of updatecerts.

This work was done primarily by allanjude@, with minor contributions by
myself.

r352949:
[2/3] Add certctl(8)

This is a simple utility to hash all trusted on the system into
/etc/ssl/certs. It also allows the user to blacklist certificates they do
not trust.

This work was done primarily by allanjude@, with minor contributions by
myself.

r352950:
[3/3] etcupdate and mergemaster support for certctl

This commit add support for certctl in mergemaster and etcupdate. Both will
either rehash or prompt for rehash as new certificates are
trusted/blacklisted.

This work was done primarily by allanjude@, with minor contributions by
myself.

r352951:
caroot: add @generated tags to extracted .pem

As is the current trend; while these files are manually curated, they are
still generated. If they end up in a review, it would be helpful to also
take the hint and hide them.

r353002:
Unbreak etcupdate(8) and mergemaster(8) after r352950

r352950 introduced improper case fall-through for shell scripts. Fix it with
a pipe.

r353066:
certctl(8): realpath the file before creating the symlink

Otherwise we end up creating broken relative symlinks in
/etc/ssl/blacklisted.

r353070:
certctl(8): let one blacklist based on hashed filenames

It seems reasonable to allow, for instance:

$ certctl list
# reviews output -- ah, yeah, I don't trust that one
$ certctl blacklist ce5e74ef.0
$ certctl rehash

We can unambiguously determine what cert "ce5e74ef.0" refers to, and we've
described it to them in `certctl list` output -- I see little sense in
forcing another level of filesystem inspection to determien what cert file
this physically corresponds to.

Relnotes: yes

356698 13-Jan-2020 bdrewery

MFC r355379,r355381:

r355379:
Run make in parallel.
r355381:
Use full path to sysctl(8) since /sbin is not in PATH.

315344 16-Mar-2017 ngie

MFC r314830:

mergemaster: fix description of -p

-p only handles updating /etc/master.passwd and /etc/group . No more,
no less.

Also, mergemaster (and no other portions of the vanilla FreeBSD build
process) should be messing with __MAKECONF or SRCCONF as part of the
installworld or distribution process. Don't insinuate that mergemaster
does that as it's a false claim.

302912 15-Jul-2016 bdrewery

MFC r302674:

META_MODE: Don't require filemon(4) for mergemaster(8)/etcupdate(8)

Approved by: re (gjb)

302408 08-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
288381 29-Sep-2015 bdrewery

All supported releases have the -m support from r186678, so remove
the mention of it and reword this a bit to remove 'you'.

MFC after: 3 days


284345 13-Jun-2015 sjg

Add META_MODE support.

Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision: D2796
Reviewed by: brooks imp


268351 07-Jul-2014 marcel

Remove ia64.

This includes:
o All directories named *ia64*
o All files named *ia64*
o All ia64-specific code guarded by __ia64__
o All ia64-specific makefile logic
o Mention of ia64 in comments and documentation

This excludes:
o Everything under contrib/
o Everything under crypto/
o sys/xen/interface
o sys/sys/elf_common.h

Discussed at: BSDcan


267668 20-Jun-2014 bapt

use .Mt to mark up email addresses consistently (part2)

PR: 191174
Submitted by: Franco Fichtner <franco@lastsummer.de>


264480 14-Apr-2014 jilles

mergemaster: Avoid "/var/tmp/temproot disappeared" if there is nothing to
compare.

Because of the change to find in SVN r253886, the entire temproot would be
deleted if it became empty, leading to a confusing message "*** FATAL ERROR:
The temproot directory ${TEMPROOT} has disappeared!"

Note that mergemaster does not do anything useful in this situation anyway
(e.g. put IGNORE_FILES="/etc/group /etc/master.passwd" in
/etc/mergemaster.rc and run mergemaster -p).

As noted in that commit, add -mindepth 1.

PR: bin/188485
Submitted by: David Boyd
MFC after: 1 week


261031 22-Jan-2014 jhb

Generate /var/db/services.db during 'make distribution' so that it is
present during new installs. Update etcupdate and mergemaster to
ignore the generated file.

Tested by: gjb (release build)
MFC after: 1 month


258456 22-Nov-2013 brooks

Fix mergemaster -U by forcing FreeBSD 9 compatiblity in mtree when mtree is
nmtree.

The mtree output used by mergemaster in this case was clearly not meant for
computer consumption and an approach based on -f <file1> -f <file2> would
probalby be a better idea, but this is a minimal change.

MFC after: 3 days
X-MFC-with: r258437


255428 09-Sep-2013 delphij

Pass -n (do not emit comments) when saving mtree information for future
mergemaster(8) runs.

MFC after: 3 days
Approved by: re (kib)


252174 24-Jun-2013 eadler

Remove request to email suggestions and fixes to the author.
He is no longer involved with the FreeBSD project.

While here: remove "no known bugs" and related. This isn't present in other manual pages.

PR: docs/179914


250916 22-May-2013 peter

Don't mess with /etc/localtime if it is a symlink.


250463 10-May-2013 eadler

Permit relative paths with mergemaster -m

Reviewed by: dim, brooks
MFC after: 3 days


249906 25-Apr-2013 brooks

Use the system MAKEOBJDIRPREFIX when running make targets in
mergemaster. This allows bootstrap verions of tools to be used.

Add a note to UPDATING about this change.

Discussed with: jhb
Sponsored by: DARPA, AFRL
MFC after: 5 days


243892 05-Dec-2012 eadler

Remove pointless check for the existence of /usr/bin/less which exists
in all configurations.

Reviewed by: mjg
Approved by: cperciva
MFC after: 2 weeks


243891 05-Dec-2012 eadler

Add ability to mergemaster to permit the user to type
the absolute path to PAGER if mergemaster can not find
the one already set.

Reviewed by: mjg
Approved by: cperciva
MFC after: 2 weeks


241218 05-Oct-2012 dougb

Remove references to CVS so that people will stop bringing it up

For -p:
The localtime update should have been excluded in the first place

The make.conf comparison has been OBE for some time now, and there
is no src.conf equivalent to share/examples/make.conf, so remove
the whole thing.

Update copyright


228122 29-Nov-2011 dougb

If using DISTDIR we need to be sure to create a ${DESTDIR}/var/db/zoneinfo

PR: bin/162891
Submitted by: Helge Oldach <src-mergemaster-nov11@oldach.net>


227013 02-Nov-2011 dougb

1. Add a new option, --run-updates, to always or never run the newalises,
pwd_mkdb, etc. updates at the end of the comparison.

2. Add an update to the end to handle /etc/localtime, if it exists.
If /var/db/zoneinfo exists, automatically update /etc/localtime,
which should (hopefully) be safe to do. If not, prompt the user
to run tzsetup.

3. Update run_it_now(), the function that handles input for the updates,
to make sure that we got a valid answer, and to handle the --run-updates
option if supplied.


224726 09-Aug-2011 dougb

Make clear that the -U option can be dangerous. [1]

In -p mode install the group file with the same permissions as normally
done in etc/Makefile.

Update the copyright.

Requested by: peter [1]

Approved by: re (kib)


213573 08-Oct-2010 uqs

mdoc: drop redundant .Pp and .LP calls

They have no effect when coming in pairs, or before .Bl/.Bd


208088 14-May-2010 dougb

Hide the creation and population of the temproot


207612 04-May-2010 nork

Add support run services_mkdb(8).

Approved by: dougb, imp (mentor)
Reviewed by: ume
MFC after: 2 weeks


205145 14-Mar-2010 dougb

Make it more clear in the docs that -a is not compatible with -iFU,
and enforce this in the code. Apparently a lot of users mistakenly
combine -a with these flags and are then mystified that no changes
were made.

While I'm here, fix a trailing space in mergemaster.8


202817 22-Jan-2010 dougb

Make -U once again honor -D after my change to consolidate setting
of MTREEDB with DESTDIR.

PR: bin/143089
Submitted by: Anton Yuzhaninov <citrin@citrin.ru>


202386 15-Jan-2010 ru

Use the newly brought %U macro.


202340 15-Jan-2010 dougb

Oops, deleted one line too many. Add back the null case for IGNORE_MOTD


202339 15-Jan-2010 dougb

Now that we've officially arrived at FreeBSD 9, remove the IGNORE_MOTD
compat shim as advertised. This change should not be MFC'ed.


201765 08-Jan-2010 dougb

Update copyright date

Update delete_temproot() to include the error message if it fails,
and clean up the places where it's called.

If there are no files left in temproot when the comparison is done
delete it without prompting. This should make "automated" runs of
mergemaster without -a a little easier.

Document the new behavior in the man page.


201323 31-Dec-2009 dougb

If we are using -p it does not make any sense to even create the
MTREENEW file since it will never be used.


201293 30-Dec-2009 dougb

It's not necessary to include both Op and Fl for command line options
included in the text, so use only the latter.

Clarify that using -U doesn't make sense in combination with -a


201292 30-Dec-2009 dougb

Document the DELETE_STALE_RC_FILES option introduced in r201291. This is
an "rc file only" option by design.

While I'm here, update the comments in the example rc file to indicate
which command line options they relate to, and correct the defaults
for a couple of options.


201291 30-Dec-2009 dougb

Add some patches contributed by jhb:
1. Don't prompt the user for "-U but no db" error if we're using -a
2. Add an option to delete stale rc.d files automatically if the user
has DELETE_STALE_RC_FILES in their rc file. Lack of command line option
for this is not an oversight.
3. Add []'s around the terminal $ for the $FreeBSD$ test for -F

For one bug raised by jhb I did a more thorough solution:
There were a lot of things that "snuck in" between the end of the test
for -r and the start of the comparison. One of them is the creation of
the mtree db, as pointed out by jhb. Fix this problem more thoroughly
by moving the end of the test down to where it should/used to be, right
before the comparison. As a result, indent the interloping code to match.


200708 19-Dec-2009 dougb

Fix a problem with how mergemaster handles the hard links for /.cshrc
and /.profile. The problem is that install(1) will unlink the old file
before it installs the new one, which means that in the best case we
have to compare the changes for the old file twice.

So, change the logic to first test to see if the link exists, then
install the file. Then if the link was there and we're using -i, just
create the link in /root and be done with it. Otherwise display the
message to the user and give them the option.

Because we are now sorting things before doing the comparison we can
know conclusively that the files in / should be the sources, and the
files in /root will be the targets, so adjust the paths accordingly.

While I'm here, split a too-long error message into two lines and
just return at the end of handling these files instead of setting
the variable that says "do nothing" and then returning at the end
of the function anyway.


200701 19-Dec-2009 dougb

Fix an indentation issue, no functional changes


200700 19-Dec-2009 dougb

In the places where find is used that the user may see the results,
first pipe it to sort so that order of processing will be deterministic
and like things will be grouped together.


200425 12-Dec-2009 dougb

Over time things that used to be files/directories/links can change
to something else. So add code to detect when things don't match and
give the user choices about how to fix it.

If we're using -P and something in the above check needs to be moved
we need to have the directory there for it, so create it at the
beginning and delete empty versions of it at the end.

The case where something used to be a file or link and now is supposed
to be a directory (e.g., /etc/security) is especially dangerous, so
make failure to install a necessary directory in $DESTDIR a fatal error.


200416 11-Dec-2009 dougb

Simplify handling of MTREEFILE relative to DESTDIR

Make the message about a missing MTREEFILE combined with -U
more informative


193853 09-Jun-2009 dougb

1. Update the message that prints out for -U when the mtree database does
not exist to let the user know that it will be created for the next run.

2. Delete more stuff we're not going to use from the temproot prior to
creating the mtree database to dramatically reduce its size (162K -> 37K).

3. We've been deleting the zero-size files from temproot for a long time
now, so remove the spurious "-size +0" from the find command in the
comparison loop, and remove what is now a really stale comment.


192230 16-May-2009 dougb

Enhance the safety of the -U option:
1. In several places make sure that the mtree database is not empty using
the -s argument to test instead of -f. (I thought I'd already changed this,
but obviously not.)
2. When deriving the list of changed files use a colon-delimited list.
3. If the list of changed files is empty, unset the variable, and test
for a non-empty CHANGED in diff_loop() before entering that routine.

Enhance the speed of the -U option by using an internal case statement
instead of echoing the variable to an external grep for every file.

Fix indentation on one line.


192219 16-May-2009 dougb

Add -L to the mtree invocation to chase symbolic links that are present
in "Service jails."

Submitted by: Jeremie Le Hen <jeremie@le-hen.org>


190320 23-Mar-2009 dougb

Don't tempt svn to expand the example $FreeBSD strings


189994 18-Mar-2009 dougb

1. Update for new -F option from r189992.
2. Sort the command line options to match how they are displayed
in usage()
3. Change references to cvs to the more generic "version control system"
and remove the .Xr for cvs
4. Consistently use ".Op Fl" to refer to command line options in the text.
5. Only use the apostrophe to indicate possession.
6. Add FREEBSD_ID (-F) to the list of variables in the example rc,
and change the DIFF_OPTIONS example to -Bb since -F now covers it.


189992 18-Mar-2009 dougb

Add a new -F option to automatically install files that differ
only by version control Id strings


189763 13-Mar-2009 dougb

1. Clean up usage() output a bit by grouping options that take an argument
2. Fix a comment to refer to the right loop


189761 13-Mar-2009 dougb

When using the -D option:
1. The new mtree file should be created in the "host" system /tmp
2. The existing mtree file in the "host" system should not be deleted

Submitted by: scf


186749 04-Jan-2009 dougb

Instead of using obj and all targets which are not cross-build aware,
use _obj and everything which are.

Submitted by: ru


186704 02-Jan-2009 dougb

Add a note to the -m option indicating that you should now specify src/
instead of src/etc.


186695 02-Jan-2009 dougb

Simplify the code a little by moving the working part of
ARCHSTRING into the new MM_MAKE variable.

We only need to check for the presence of the target of $PAGER
if that variable is actually set. [1]

Pointed out by: Steve Kargl <sgk@troutmask.apl.washington.edu> [1]


186689 02-Jan-2009 dougb

Only check for 'nodev' in fstab if that file exists

Submitted by: sam


186688 02-Jan-2009 dougb

For IGNORE_FILES delete the version in the TEMPROOT, not the base.

Submitted by: clemens fischer <ino-news@spotteswoode.dnsalias.org>


186679 01-Jan-2009 dougb

General Improvements
====================
1. List the command line options in a more standard way
2. Improve the explanations of some of the arguments (-A, -D)
3. Add ARCHSTRING and MTREEDB to the example rc file
4. Re-sort some of the examples according to the existing distinction
of "has a command line version" vs. "does not have a command line version"

Document changes for r186678
===========================
1. /usr/src/etc -> /usr/src where needed [1]
2. Add IGNORE_FILES to the example rc [2] (and remove IGNORE_MOTD)
3. Update the EXIT STATUS section for [3] and [4]

Update Copyright and .Dd accordingly

PR: bin/96528 [1]
Submitted by: ru [1]
PR: bin/106642 [2]
Submitted by: Henrik Brix Andersen <henrik@brixandersen.dk>
PR: bin/122282 [3]
Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru> [3]
PR: bin/108183 [4]
Submitted by: Riccardo Torrini <riccardo@torrini.org> [4]


186678 01-Jan-2009 dougb

Maintenance and updates
=======================
1. Various improvements to the mtree (-U) feature:
a. Seperate the notion of directory and file (user can override db path)
b. Only check for the existence of the mtree file if -U is set
c. Use mktemp to create the new version of the file
d. More safely install the new file
e. Standardize error messages a bit
2. Remove the last of the MAKEDEV stuff (RIP)

New Features
============
1. Switch to using the top level (e.g., /usr/src) Makefile, and specify
that we should use the *.mk files from the source directory instead of
the installed versions. [1][2] This allows easier cross builds and
simplifies (or in some cases permits) upgrading.
2. Check for the deprecated 'nodev' option in /etc/fstab [3]
3. Add support for the IGNORE_FILES variable [4] and deprecate IGNORE_MOTD
accordingly.
4. Before installing a file check to make sure that the target does not
already exist as a directory [5]
5. Check to be sure that the file installed and error out if not

PR: bin/96528 [1]
Submitted by: ru [1]
PR: bin/129639 [2]
Submitted by: sam [2]
PR: bin/122282 [3]
Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru> [3]
PR: bin/106642 [4]
Submitted by: Henrik Brix Andersen <henrik@brixandersen.dk> [4]
PR: bin/108183 [5]
Submitted by: Riccardo Torrini <riccardo@torrini.org> [5]


186677 01-Jan-2009 dougb

Revert 184781, 184804, and 184832 (automatic installation of files
that differ only by VCS Id) for the following reasons:
1. It was added without my consent, review, or even a heads up
2. It is something that I've repeatedly said I do not want, and certainly
do not want as the default
3. It is poorly implemented (much too complex, produces false positives
e.g., /etc/mail/helpfile)

Given that this is a situation that comes up very infrequently (usually
only for a major version upgrade) and can usually be handled simply
enough on a one-off basis, I will once again point out that I think
this is a Bad Idea. I would be willing to consider a better implementation
as an option that is off by default.


184832 11-Nov-2008 sobomax

No need to run rm ${COMPFILE} after mm_install() - mm_install()
does it for us.


184804 09-Nov-2008 sobomax

Improve on 184781 - instead of ignoring the file when the only difference
is CVS Id, replace the old one with the new one automatically. While I
don't see much difference, some people think it's somehow better that way.


184781 09-Nov-2008 sobomax

Ignore files that only differ in CVS Id tag.

MFC after: 2 weeks


179725 11-Jun-2008 dougb

Document the AUTO_UPGRADE (-U) knob for .mergemasterrc

Submitted by: mezz
No Cookie For: gordon :)


179315 26-May-2008 bz

Remove ISDN4BSD (I4B) from HEAD as it is not MPSAFE and
parts relied on the now removed NET_NEEDS_GIANT.
Most of I4B has been disconnected from the build
since July 2007 in HEAD/RELENG_7.

This is what was removed:
- configuration in /etc/isdn
- examples
- man pages
- kernel configuration
- sys/i4b (drivers, layers, include files)
- user space tools
- i4b support from ppp
- further documentation

Discussed with: rwatson, re


174841 21-Dec-2007 dougb

In the following scenario:
1. Start mergemaster
2. Interrupt it
3. < Somehow the temproot directory disappears >
4. mergemaster -r
Many bad things can happen, especially if the -i option is in use.

Therefore, add a check to make sure it still exists before we start
comparing files.

Brought to my attention by:
PR: bin/40538
Submitted by: Cyrille Lefevre <cyrille.lefevre@laposte.net>


158194 30-Apr-2006 gordon

Add missed SYNOPSIS flag for auto upgrade.

Submitted by: marck at rinet dot ru


158149 29-Apr-2006 gordon

Add auto upgrade capability to mergemaster.

An mtree description of all non-zero files that make
distribution installs (only size and md5) is built from the
temproot. When the user completes a mergemaster run, the
mtree description file gets installed into /var/db for
safe-keeping.

When the user then decides to do a subsequent upgrade (with
the -U flag), the existing mtree description from /var/db
is called into service looking for files that are different in
DESTDIR. This is stashed away until a file that would normally
end up prompting the user to look at changes is encountered.
Since there are no user modified changes, the new file is
installed without bothering the user.

Looked at by: dougb
MFC after: 6 weeks


155309 04-Feb-2006 rwatson

Add a -A argument to mergemaster to allow explicitly specifying an
architecture to pass through to the underlying makefiles. This is
quite useful when building on an i386 box to populate an amd64 NFS
root.

Head nod: dougb
MFC after: 1 week


153604 21-Dec-2005 dougb

Change the default for deleting stale files from yes (which violates
the general principle that mm should do nothing by default) to no.

PR: bin/85449
Submitted by: Kevin Oberman <oberman@es.net>


148179 20-Jul-2005 keramida

Point to the right path under www.freebsd.org/doc for the Handbook
section on "make world". The old link still works fine, but all the
hyperlinks of the referenced document are broken; the same links
work find if /doc/en_US.ISO8859-1 is used instead of plain /doc to
reach the online Handbook copy.


141851 13-Feb-2005 ru

Expand contractions.


140442 18-Jan-2005 ru

Sort sections.


140368 17-Jan-2005 ru

Added the EXIT STATUS section where appropriate.


131500 02-Jul-2004 ru

Mechanically kill hard sentence breaks.


126718 07-Mar-2004 dougb

In the case where /etc/rc.d/ is empty, do not bogusly ask the user if
they want to delete '*'. It turns out that there is one valid case where
this might happen, installing to an empty DESTDIR.

Patch submitted by: schweikh


126694 06-Mar-2004 ru

Set MAKEOBJDIRPREFIX in the environment, like God intended. This
only worked because src/Makefile.inc1 is wrapped by src/Makefile.

Silence from: dougb


124136 04-Jan-2004 dougb

mergemaster -p (pre-world) doesn't populate /etc/rc.d, which led to a
false positive for every file according to the new stale rc.d checker.

Friendly reminder by: dhw


124053 01-Jan-2004 dougb

* Update copyright
* Delete a trailing space
* Add a 'stale /etc/rc.d file checker', offer to delete any stale
files for the user.


118420 04-Aug-2003 dougb

Use the actual build target (all), since relying on the build as a
side effect of the distribution target was apparently just good luck
all these years.

Submitted by: ru


115821 04-Jun-2003 dougb

Remove MAINTAINER line in favor of the entry in src/MAINTAINERS


114565 03-May-2003 dougb

Preserve directory structure in PRESERVED_FILES_DIR to avoid
filename collisions.

Submitted by: des


114523 02-May-2003 dougb

rc.sendmail should not have been removed yet.
Don't include it in the rcOG removal prompt.


114503 02-May-2003 dougb

* Document the -P option

* Add a paragraph suggesting that the merge option be used only for
files that users have modified. People have been using this option
for all files that are different, causing unecessary confusion.


114501 02-May-2003 dougb

* Add a -P (Preserve) option, which saves a copy of files that you replace.
The idea for this option came from Marc Schneiders <marc@schneiders.org>

* I've been meaning to remove the code that checked for the existence of
/etc/sysconfig for a while now, since that file was last seen in 2.2.2.

* Replace the above with a check for elements of the old rc system.
Offer to move these files out of DESTDIR/etc for the user's convenience.


113091 04-Apr-2003 obrien

style.Makefile(5)


111905 05-Mar-2003 dougb

Put back the deletion of TEMPROOT/etc/passwd.

Noticed by: maxim


111901 05-Mar-2003 dougb

Better handle the recent (desirable) change to create login.conf.db at
install time, and make sure to catch any future .db files as well.


111604 27-Feb-2003 dougb

Try another solution for not expanding a CVS tag.

Submitted by: roam


110633 10-Feb-2003 dougb

Try to fix two problems with the -I example. One is the fact that we
want to match a character $, not EOL. The other is that CVS helpfully
expanded my example into an actual CVS tag.

Submitted by: gad


110377 05-Feb-2003 dougb

* Update copyright year.
* Give back one line of ws when showing a diff.
This was requested by several.
* Un-quote DIFF_FLAG, and add DIFF_OPTIONS. This will allow the user to
do more creative things in a mergemaster rc file. Un-quoting is necessary
in order to handle things like CVS Id tags that look like shell variables.
* Simplify terminal width determination.

Suggestions related to ignoring the CVS Id's were taken from several, with
dillon and gad providing particularly helpful feedback.


110375 05-Feb-2003 dougb

* Update copyright year.
* Add an example that ignores CVS Id tags for the new DIFF_OPTIONS variable.


109993 28-Jan-2003 dillon

Backout last commit by request.


109826 25-Jan-2003 dillon

Commit simple mergemaster changes to make the UI more deterministic
(far easier to use) by limiting the initial display to the size of the
window.


105705 22-Oct-2002 phk

Don't use NO_MAKEDEV* option, its the default now.


101362 05-Aug-2002 dougb

Suppress spurious warning messages about rm -rf TEMPROOT failing
before chflags, and exit non-zero if the old TEMPROOT dir
can't be deleted for whatever reason.


101348 05-Aug-2002 dougb

Fix a couple DESTDIR related problems. Credit for the "Only in" section
goes to James <James_Bond_79@yahoo.com>, and Cyrille Lefevre
<cyrille.lefevre@laposte.net>. The make variables problem was found
by jon.


100974 30-Jul-2002 blackend

Correct links to Handbook's pages, old URLs does not work anymore.

MFC after: 1 week


99968 14-Jul-2002 charnier

The .Nm utility


99152 30-Jun-2002 dougb

* Handle all flags, not just schg
* Make chflags -R more efficient by deleting everything we can first


98876 26-Jun-2002 dougb

Add 'chflags -R noschg' to the deletion process for the TEMPROOT
directory so that /var/empty, and any other such items that are
added in the future can be deleted effectively.


98084 10-Jun-2002 dougb

Go back to taking the user's umask into account. Thanks to Alfred for
hatching the idea of using dc, and Giorgos (keramida) for incubating it.

This also reverses most of the previous commit which took out or
modified the text about umask stuff.


97960 06-Jun-2002 dougb

* Use the new stat(1) to get mode information from the files we
are installing.
* Since this means that for now we can't accomodate non-standard
umask's, warn the user accordingly.
* Convert the "press enter to continue" prompt into a function.


97380 28-May-2002 dougb

Actually accept the default argument to SCREEN_WIDTH.

Submitted by: brian


96046 04-May-2002 dougb

* Fix a small typo, thanks to olgeni
* Document the COMP_CONFS variable in the .mergemasterrc example


96045 04-May-2002 dougb

* Add some niceties to make the -p option quieter, and better behaved
* Take a simple idea about setting the screen width using stty (for sdiff's
purposes) thoughtfully suggested by Joerg to an absurd conclusion.


94196 08-Apr-2002 dougb

Solve the problem of spuriously comparing files that were created
in the ${TEMPROOT}/usr/obj directory by deleting them first.


94188 08-Apr-2002 dougb

Document the two new options, pre buildworld mode and
post-mm rc.conf[.local] comparisons.


91223 25-Feb-2002 dougb

Improve grep'ing for variables in make.conf and rc.conf*.
Thanks to cjc for the idea.


91193 24-Feb-2002 dougb

* Add a feature to do a "pre {build|install}world" check of (so far)
master.passwd, group, and make.conf
* Add a feature to check variables in rc.conf[.local] to their
counterparts in /etc/defaults/rc.conf after a run
* Twiddle whitespace a little
* Change some "[ -f file ] && rm file" to "rm -f file"


90564 12-Feb-2002 dougb

* Update (c)
* Fix a problem with files that have no CVS $Id's. Thanks to naddy for
spotting this one. It wasn't a _huge_ problem since almost all the files
we install (except motd) have one, but still, it's a bug.
* Add a divider between diff outputs, which is helpful both for logs,
and for giving a good visual clue for diffs that are smaller than
$LINES. Another helpful suggestion from Gary W. Swearingen, swear@blarg.net.


90563 12-Feb-2002 dougb

* Update (c)
* Expand on the definition of the -s (strict) option, at the suggestion
of Gary W. Swearingen, swear@blarg.net.


81224 07-Aug-2001 dougb

Hopefully squish the problem of mm creating sendmail files in
the source tree once and for all.

Pointed out by: A cast of thousands

Reviewed by: asmodai


80029 20-Jul-2001 obrien

Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.


79537 10-Jul-2001 ru

mdoc(7) police: removed HISTORY info from the .Os call.


79454 09-Jul-2001 dd

mdoc(7) police: remove extraneous .Pp before and/or after .Sh.


79300 05-Jul-2001 ru

mdoc(7) police:

Use -tag list in the FILES section to work around the bug
when .Pa font is not restored to its original value if one
of the -hang, -ohang, or -inset lists is used in the FILES
section. (The fix for the bug has just been submitted to
the GNU Groff maintainers.)

Also, fixed the Handbook reference in the SEE ALSO.


78490 20-Jun-2001 dougb

Work around the problem in RELENG_4 where the file doesn't actually
exist, and therefore mm_install is returning the "fail" value of
the test instead of the "success" value for install.

This change is a no-op on HEAD, but since the only harm on RELENG_4
ATM is a spurious warning it can follow the usual MFC practice.

Submitted by: A cast of thousands :-/


77478 30-May-2001 dougb

Add the last of the compatibility mods from openbsd. Neatly, the
"install && rm" change fits in with the new FreeBSD default of
copy instead of move for install. Changing the order of the deletion
of the spurious password files doesn't affect FreeBSD functionality,
but it's done in such a way as not to matter.

Obtained from: Christian Weisgerber <naddy@mips.inka.de>


77335 28-May-2001 dougb

Various fixes, including suggestions from some thoughtful folks, thanks.

* Minor umask portability change (Christian Weisgerber <naddy@mips.inka.de>)
* Clarify default value of the "run it now" option (bmah)
* Make "run it now" $DESTDIR safe (bsd)
* Handle installation of hard links for /.profile and /.cshrc properly
when the auto-install option is selected
* Fix some more whitespace issues


77334 28-May-2001 dougb

Clarify handling of /etc/mergemaster.rc and $HOME/.mergemasterrc


77326 28-May-2001 dougb

Be more consistent with the terminology, referring to "temporary and
installed" instead of "old and new". Inspired by the somewhat
non-linear PR, which really didn't have a fix, per se.

PR: conf/27235 Roelof Osinga <roelof@eboa.com>


77325 28-May-2001 dougb

Fix a problem when user selects -a (auto run) but we encounter a file
missing on the system. Instead of passing it by, mm was prompting...
bad mm, no cookie!

Brought to my attention by the PR, but the fix needed to be tweaked to
handle the auto-install option as well.

PR: misc/25731 Gilbert Gong <ggong@cal.alumni.berkeley.edu>


77323 28-May-2001 dougb

Whitespace only changes to try and fit a little better into 80 columns.


75670 18-Apr-2001 ru

mdoc(7) police: normalize .Nd.


75286 07-Apr-2001 ru

beforeinstall -> SCRIPTS.


74992 29-Mar-2001 asmodai

Change NO_MAKEDEV to a finer granularity method:
NO_MAKEDEV_INSTALL and NO_MAKEDEV_RUN. The former implying the latter.
The names imply what they do. The last commit by DES based on a PR defeated
the original idea behind NO_MAKEDEV, which was not to run MAKEDEV, but to do
the installation of MAKEDEV. This should satisfy both parties on the MAKEDEV
challenge.
Reflect this in mergemaster, this might later on be decided to be set to
NO_MAKEDEV_INSTALL, for now I kept to the old behaviour.


74816 26-Mar-2001 ru

- Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.


73651 05-Mar-2001 dougb

* Add two requested features, source'ing of /etc/mergemaster.rc, and
asking the user to actually run the recommended commands related
to installation of files such as aliases or login.conf.

* Return to using grep for CVS $Id comparison. Using ident caused too
many problems for people with local CVS/RCS tags in their stuff.
Attempt to make portability a little easier to maintain in spite of
this change by defining the name of the tag to search for. This
is a slightly different change that solves the problem in the PR.

PR: bin/24564
Submitted by: Tony Finch <dot@dotat.at>


70403 27-Dec-2000 ru

Prepare for mdoc(7)NG.


68965 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


68854 17-Nov-2000 ru

mdoc(7) police: use certified section headers wherever possible.


68716 14-Nov-2000 ru

Use Fx macro wherever possible.


68507 09-Nov-2000 dougb

* Reduce diffs to RELENG_4 by specifying a full path to sysctl
* Adjust a little whitespace
* Make the distrib-dirs/mtree on DESTDIR conditional on user
actually specifying a DESTDIR. This seemed like a safe
way to get the right directories and permissions in the
installed tree since 'make installworld' does the same
thing, but in practice too many people have custom hacks
that we should leave unmolested. Still need to find a way
to deal with 'install -d' and permissions on nonexistent
directories in the middle of the path, but this is at
least no worse that it was before.

PR: bin/22661


68153 01-Nov-2000 dougb

Reorder one of the new features based on experience. Since the number
of files auto-installed during an upgrade from a really old system
can get quite long, and it's piped to the PAGER already, print
that first, then print any of the 4 two-line messages that might
apply.


67949 30-Oct-2000 dougb

Add several new features, reorder some code, and continue with the
process of making the script more cross platform friendly.

* Add -i option to automatically install files that do not exist
on the system already.
* Add the ability to specify DESTDIR.
* Allow the user to specify scripts to run right before the
comparison starts, and when mm is done. This will
allow the user to specify customized local behavior, and
implement features such as automatically deleting files.
* Document the above changes in the man page.
* Switch to using 'ident' for the CVS Id comparison, which
should help with portability, and makes it faster.
* Reorder, and in one case fix some code by doing things in
ways that make more sense.
* Check to see if the file exists on the system before doing
the comparisons. This saves CPU cycles, and streamlines
the auto-install process.

I used bits and pieces of suggestions and patches from various
people, ultimately too numerous to name. Which is not to say
that they were not both appreciated, and helpful in achieving
the ultimate result.


67860 29-Oct-2000 dougb

Update copyright


67859 29-Oct-2000 dougb

More changes that don't modify functionality.

* More whitespace
* Change read -p to echo -n/read to help support portability
* Genericize an informational message regarding /.cshrc and /.profile
for the same reason


67850 29-Oct-2000 dougb

Whitespace only. Make the style of the contributed sections consistent with
the rest of the file. (Read, put it back the way I like it.)


67601 26-Oct-2000 billf

Almost a year exactly from when I first imported mergemaster at freebsdcon,
remove myself as co-maintainer and let Doug handle all the fun.


65115 26-Aug-2000 ben

Make mergemaster ignore files in /dev if /dev is a devfs.

Approved by: Doug Barton <Doug@gorean.org>


64625 13-Aug-2000 gshapiro

Use new aliases path (/etc/mail/aliases)

Approved by: Doug Barton <DougB@gorean.org>


64467 09-Aug-2000 brian

Be more careful about selecting a PAGER.
Improve the question asked when the PAGER is invalid.

Submitted by: Doug Barton <DougB@gorean.org>


64368 07-Aug-2000 marko

Update link to Making the World tutorial (now in the handbook)


60420 12-May-2000 bsd

Actually accept 'm' as a PAGER query response to mean 'more'.


58910 02-Apr-2000 alfred

Make mergemaster only take single letters for options as well as loop
asking a question again if given an invalid input instead of assuming
what the user wants. /etc is not the place to make assumptions when
given invalid input.

Reformat some of the more convoluted code into seperate functions instead
of being inline using tabs instead of space indents.

Allow the user to view merged files they created with sdiff.

Allow the user to redisplay the diff between the installed file and
the new file again.

Time wasted waiting for review: 1 month 2 weeks


57673 01-Mar-2000 sheldonh

Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.


57173 12-Feb-2000 billf

Use the new (Hi rwatson!) NO_MAKEDEV when making our temproot.

Submitted by: Doug Barton <Doug@gorean.org> (maintainer)
Approved by: you-know-who.


57066 08-Feb-2000 billf

Allow $PAGER to have arguments.

Submitted by: brian
Reviewed by: Doug Barton <Doug@gorean.org>
Approved by: jkh


52732 01-Nov-1999 chris

``mergemaster'' was repo-copied to ``mergemaster.sh'' as it's a shell script.

Delete the original mergemaster and modify Makefile to install mergemaster.sh.

Seen no problem with by: billf
No objections by: Doug Barton


52534 26-Oct-1999 billf

Add IGNORE_MOTD to allow the sysadmin to ignore (likely) differences in
the FreeBSD default motd and the system motd

Submitted by: author


52533 26-Oct-1999 billf

Use $FreeBSD$ (instead of the author's $Revision$) to report the
version number now that we have it.

Reviewed by: author


52532 26-Oct-1999 billf

freebsd -> FreeBSD


52531 26-Oct-1999 billf

Add $FreeBSD$

Submitted by: chris


52530 26-Oct-1999 billf

Co-MAINTAINER this module.


52495 25-Oct-1999 billf

Add $FreeBSD$


52403 20-Oct-1999 billf

mergemaster bmake glue.


52401 20-Oct-1999 billf

This commit was generated by cvs2svn to compensate for changes in r52400,
which included commits to RCS files with non-trunk default branches.