Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Mar 2009 14:34:05 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        Tim Kientzle <kientzle@freebsd.org>
Cc:        Andreas Tobler <andreast-list@fgznet.ch>, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: New mergemaster option to install files that differ only by $FreeBSD
Message-ID:  <49CAA34D.3080209@FreeBSD.org>
In-Reply-To: <49CA9E02.5070706@freebsd.org>
References:  <49C16ECD.1040901@FreeBSD.org>	<49CA90BA.5090004@fgznet.ch>	<49CA968A.5070403@FreeBSD.org>	<49CA9A21.3090302@fgznet.ch> <49CA9BD0.70205@FreeBSD.org> <49CA9E02.5070706@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Tim Kientzle wrote:
> Doug Barton wrote:
>> Andreas Tobler wrote:
>>> Hm, then it seems to me that I did something 'wrong' when I co'ed the
>>> svn repository. I am an anonymous user, aka having no svn account.
>>
>> You're not using the devel/subversion-freebsd port.
> 
>> I'm glad you're happy now, but you won't be when you do your next
>> mergemaster run.  :)
>>
>> Mergemaster counts on there being a real version number in the VCS Id
>> string to compare against and learn about new versions of files. If
>> the files in your base and the files in the src tree all have
>> identical strings (i.e., they are all equal to $FreeBSD$) then
>> mergemaster will never know that there is a new version available.
> 
> This sounds like a problem. 

This sounds like the way that mergemaster has worked for 11 years.
That said, mergemaster has the option for doing a "strict" comparison
that ignores the VCS Id already. If this issue becomes widespread
before a better solution arises I can enable that option by default.

> I'm not sure we can
> safely assume that non-committers will be using
> devel/subversion-freebsd.

Then we need to make sure that the server side does the right thing in
that case. (This will be a problem that goes way past a minor
inconvenience for mergemaster if we don't get it right.)

> I've long wondered if there were some way to generically
> checksum every one of these files at install time
> (Maybe adding a final "#md5:XXXXXXXX" line?  Does every
> file in /etc/ support "#" as a comment start?)

Well that definitely won't work, and no, not every file supports that
kind of comment.

However, there is a -U option to mergemaster that works off the
checksum of the unmodified files created in the temproot directory
from your last run that allows you to automatically update the files
in your base that you haven't modified. There is a boot-strapping
problem with new installs that the -F option was designed to help work
around.

If I get the time I will work with re@ to see if we can't generate
that mtree database as part of the release build, but I'm not making
any promises.

> Then these checksums could be used to definitively
> determine:
>   * Files that had local edits (checksum mismatch)
>   * Old files that were different from the system being installed
> all without relying on VCS IDs or other conventions.
> In particular, it would be really nice to be able to
> say "just update everything that doesn't have local edits
> and let me manually review the rest."

As I said, the -U option already does that.

I really wish that people who had Bright IdeasTM for mergemaster would
read the man page first.


Doug

-- 

    This .signature sanitized for your protection




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49CAA34D.3080209>