Re: Build failed in Hudson: 3.1-amd64-CentOS-5.3 #14

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Mon, 07 Sep 2009 12:18:49 +1200

On Sun, 06 Sep 2009 23:51:54 +0200, Henrik Nordstrom
<henrik_at_henriknordstrom.net> wrote:
> mån 2009-09-07 klockan 07:29 +1000 skrev Robert Collins:
>> On Sun, 2009-09-06 at 23:25 +0200, Henrik Nordstrom wrote:
>> > Not sure I am comfortable with adding dependencies to automakes own
>> > targets..
>> >
>> > and no, we are not fine with just that. See the rest of previous
>> > response.. To repeat there is more issues here than uninstall racing,
>> > we
>> > don't even install properly if someone tries to override the default
>> > locations by make DEFAULT_CONFIG_FILE=... DEFAULT_MIME_TABLE=...
>>
>> We should definitely fix that :). If its plausible that automake should
>> know and avoid the problem itself, lets file a bug. Otherwise we'll have
>> to work around it I guess.
>
> automake can't know.
>
> There is two things about this, both unsupported by automake
>
> a) The xxx.default construct, where xxx is only installed if missing and
> only removed if identical to xxx.default.
>
> b) make time override of certain filenames (full path including name) on
> a per-file basis.
>
>
> Support for 'a' is missing from automake, which is a shortcoming. Can
> imagine other projects may see benefit from this.
>
> The way automake expects 'b' to be done is to specify a different prefix
> at configure time for the whole category of files but keeping the
> filename as specified in automake.am (possibly with suffix depending
> type & os, i.e. .exe on Windows).
>
>
> Regarding 'a' I have another idea.. we could just add a comment with the
> hash of the file.
>
> # Config install hash. Remove if editing the file: `md5sum
> squid.conf.default`
>
> and compare this hash instead of looking for squid.conf.default.
>
> At build time when making squid.conf:
>
> echo "# Config install hash. Remove if editing the file:`md5sum
> squid.conf`" >>squid.conf
>

Tricky. That would place the hash at the wrong end of the file (last) where
its most likely to be overlooked. Particularly on the longer config files.

There are also some distros (notably Gentoo and clones) which override our
upgrades and move squid.conf.documented into place post-install as their
main squid.conf.

Would embeding the hash(es) into Makefile or an install.state data file
work instead?

Um, we might also have problems with distro like FreeBSD where md5sum is a
non-standard script install. The srcformat scripts struggle with that
already.

> Uninstall:
>
> orig_sum=`grep "^# Config install hash. Remove if editing the file:"
> squid.conf | cut -d: -f2`
> sum="`grep -v # Config install hash. Remove if editing the file:"
> squid.conf | md5sum`"
> test "$sum" = "$orig_sum" && rm squid.conf
>
> Regards
> Henrik

Amos
Received on Mon Sep 07 2009 - 00:18:55 MDT

This archive was generated by hypermail 2.2.0 : Mon Sep 07 2009 - 12:00:04 MDT