Re: [CFT] [sys/conf/newvers.sh] Cleanup and additions.

From: Anonymous <swell.k_at_gmail.com>
Date: Wed, 11 Aug 2010 19:16:00 +0400
jhell <jhell_at_dataix.net> writes:

> On 08/11/2010 08:20, Anonymous wrote:
>> jhell <jhell_at_dataix.net> writes:
>> 
>>> Based on the parts of the script with the additions for tracking source
>>> using git(1) I set out to add support for mercurial hg(1) and ended up
>>> cleaning some of the script while making some of those additions.
>> 
>> FYI, some ports don't like unusual characters in uname(1), e.g. ports/148255.
>
> Thank you for the heads-up.
>
> I can adjust for that. This was original git code from newvers.sh that I
> had let be what it is now and really holds no extra meaning to me unless
> it does to someone else?.
>
> Easy enough to change 137,13 to a space instead of equal sign.
>
> Questionable whether the '+' sign at 143,14 would cause any problems so
> I am testing that out now and will submit another followup patch.

No, `=' and `+' signs are good enough. It's just when introducing[1] such
changes better to do an exp-run on ports tree so you can identify all
ports that try to do funny things with the tool's output and fix them.

Besides, as noted in gentoo bug it affects hostname, too.

[1] and you're not the one who introduced `=' sign

>
> Does not make any sense to me why a port would configure using (uname
> -v) for identifying its environment. More specifically there should not
> be anything more needed than the output of ( uname -rms ) and maybe on
> occasion '-n' and __FreeBSD_version.

Since I can't trace back in perl5 repo why `=' is stripped my guess it's
some kind of ancient workaround

  myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e "s,['/],,g" | \
          ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`

>
> I have had thoughts before about a patch for uname that also outputs the
> ABI or __FreeBSD_version but really don't see a need for that since it
> can already be identified by kernel headers or through the use of
> sysctl(8) or some system call.

Nah, __FreeBSD_version is not atomic. Would be better if there was at
least svn revision exported via sysctl separate from kern.version.
Received on Wed Aug 11 2010 - 13:21:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:06 UTC