Commit Graph

47 Commits

Author SHA1 Message Date
Doug Barton
27d5ecc317 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
2003-08-04 10:23:45 +00:00
Doug Barton
f3fff89357 Preserve directory structure in PRESERVED_FILES_DIR to avoid
filename collisions.

Submitted by:	des
2003-05-03 06:35:19 +00:00
Doug Barton
6203d02c6a rc.sendmail should not have been removed yet.
Don't include it in the rcOG removal prompt.
2003-05-02 11:07:58 +00:00
Doug Barton
1317aed784 * 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.
2003-05-02 06:26:23 +00:00
Doug Barton
5750fb86d7 Put back the deletion of TEMPROOT/etc/passwd.
Noticed by: maxim
2003-03-05 12:42:08 +00:00
Doug Barton
40a392599f 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.
2003-03-05 08:20:55 +00:00
Doug Barton
1d825c58fb * 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.
2003-02-05 11:09:21 +00:00
Matthew Dillon
f959d23788 Backout last commit by request. 2003-01-28 18:44:40 +00:00
Matthew Dillon
c3342fe141 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.
2003-01-25 19:12:06 +00:00
Poul-Henning Kamp
0398919dc7 Don't use NO_MAKEDEV* option, its the default now. 2002-10-22 15:04:32 +00:00
Doug Barton
0aed4a4c3f 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.
2002-08-05 08:47:52 +00:00
Doug Barton
6ba81e778e 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.
2002-08-05 01:03:12 +00:00
Doug Barton
3a33dac41f * Handle all flags, not just schg
* Make chflags -R more efficient by deleting everything we can first
2002-06-30 18:47:57 +00:00
Doug Barton
a85eac0492 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.
2002-06-26 14:14:07 +00:00
Doug Barton
30d6b8e113 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.
2002-06-10 07:16:42 +00:00
Doug Barton
d50489bc95 * 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.
2002-06-06 20:38:22 +00:00
Doug Barton
aaa8b7ff8c Actually accept the default argument to SCREEN_WIDTH.
Submitted by:	brian
2002-05-28 07:25:44 +00:00
Doug Barton
b3559845fb * 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.
2002-05-04 22:45:12 +00:00
Doug Barton
3e9d29b012 Solve the problem of spuriously comparing files that were created
in the ${TEMPROOT}/usr/obj directory by deleting them first.
2002-04-08 10:30:44 +00:00
Doug Barton
13c801713d Improve grep'ing for variables in make.conf and rc.conf*.
Thanks to cjc for the idea.
2002-02-25 04:52:56 +00:00
Doug Barton
d7b94dc447 * 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"
2002-02-24 10:22:14 +00:00
Doug Barton
f6694187c2 * 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.
2002-02-12 09:54:56 +00:00
Doug Barton
e4a9231de9 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
2001-08-07 06:22:12 +00:00
Doug Barton
31e58c1713 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 :-/
2001-06-20 07:15:38 +00:00
Doug Barton
370b8c6831 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>
2001-05-30 08:50:10 +00:00
Doug Barton
68bec7b7a1 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
2001-05-28 13:17:20 +00:00
Doug Barton
e5a2a8f241 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>
2001-05-28 09:46:18 +00:00
Doug Barton
217239504e 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>
2001-05-28 09:35:30 +00:00
Doug Barton
25756f4470 Whitespace only changes to try and fit a little better into 80 columns. 2001-05-28 09:07:27 +00:00
Jeroen Ruigrok van der Werven
2baf30741f 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.
2001-03-29 14:04:19 +00:00
Doug Barton
5d7b107e1c * 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>
2001-03-05 10:13:21 +00:00
Doug Barton
6f8d4c2ffc * 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
2000-11-09 00:19:21 +00:00
Doug Barton
bc21bd54d0 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.
2000-11-01 07:21:56 +00:00
Doug Barton
d5a5b144b6 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.
2000-10-30 10:33:51 +00:00
Doug Barton
0006169a06 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
2000-10-29 09:40:22 +00:00
Doug Barton
3bc374238a 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.)
2000-10-29 07:47:51 +00:00
Ben Smithurst
cf8728a497 Make mergemaster ignore files in /dev if /dev is a devfs.
Approved by:	Doug Barton <Doug@gorean.org>
2000-08-26 12:15:24 +00:00
Gregory Neil Shapiro
7e5e46fad7 Use new aliases path (/etc/mail/aliases)
Approved by:	Doug Barton <DougB@gorean.org>
2000-08-13 19:32:19 +00:00
Brian Somers
6c2ccd0a61 Be more careful about selecting a PAGER.
Improve the question asked when the PAGER is invalid.

Submitted by: Doug Barton <DougB@gorean.org>
2000-08-09 20:36:15 +00:00
Brian S. Dean
c0c9cad1af Actually accept 'm' as a PAGER query response to mean 'more'. 2000-05-12 03:09:57 +00:00
Alfred Perlstein
bdbca6ddeb 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
2000-04-02 02:47:15 +00:00
Bill Fumerola
638a3aacaa Use the new (Hi rwatson!) NO_MAKEDEV when making our temproot.
Submitted by:	Doug Barton <Doug@gorean.org> (maintainer)
Approved by:	you-know-who.
2000-02-12 22:14:02 +00:00
Bill Fumerola
b85666e879 Allow $PAGER to have arguments.
Submitted by:	brian
Reviewed by:	Doug Barton <Doug@gorean.org>
Approved by:	jkh
2000-02-08 22:31:53 +00:00
Bill Fumerola
256d3d1de0 Add IGNORE_MOTD to allow the sysadmin to ignore (likely) differences in
the FreeBSD default motd and the system motd

Submitted by:	author
1999-10-26 19:06:31 +00:00
Bill Fumerola
5edab78fb5 Use $FreeBSD$ (instead of the author's $Revision$) to report the
version number now that we have it.

Reviewed by:	author
1999-10-26 19:05:04 +00:00
Bill Fumerola
f543e6bdd2 Add $FreeBSD$ 1999-10-25 21:51:04 +00:00
Bill Fumerola
b9d7a08d37 Import mergemaster into the tree, a product of freebsdcon.
Submitted by: 	Doug Barton <doug@gorean.org>
1999-10-20 07:22:52 +00:00