[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug #35580] bootstrap is not portable to OpenBSD
From: |
Mike Miller |
Subject: |
Re: [bug #35580] bootstrap is not portable to OpenBSD |
Date: |
Fri, 9 Aug 2013 08:55:14 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Aug 09, 2013 at 04:52:40AM +0100, Pádraig Brady wrote:
> On 08/09/2013 03:23 AM, Mike Miller wrote:
>> Thanks for the suggestion. I did try SHA1SUM=sha1, but that still
>> won't work with bootstrap since find_tool() requires that $tool
>> understand the --version option. That was mentioned earlier in the
>> bug
>> report linked above.
>
> Oh that's a bit of a buglet then, as --version isn't required
> unless a version is specified in the requirements.
>
> Does SHA1SUM=sha1 work after applying...
>
> commit 2c519cd635d46d314cd991b1a011464f7345c5fa
> [...]
Yes, that works perfectly. Of course, the code that uses sha1sum isn't
being exercised on my project. I ran it against bison instead and it
looks like it works now with sha1.
Another fix might be to move "find_tool SHA1SUM" into the narrow case
where it's actually used. It is not required unless a project has a po
directory.
Testing against bison has shown one more error in bootstrap on OpenBSD.
The insert_if_absent function fails with the native sed, a file argument
of - is not recognized. The following change works for me and now
bootstrap runs completely without coreutils and without aliasing sed to
gsed.
Thanks,
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index 87d1512..9cd9404 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -322,7 +322,7 @@ insert_if_absent() {
die "Error: Duplicate entries in $file: " $duplicate_entries
fi
linesold=$(gitignore_entries $file | wc -l)
- linesnew=$(echo "$str" | gitignore_entries - $file | sort -u | wc -l)
+ linesnew=$( { echo "$str"; cat $file; } | gitignore_entries | sort -u | wc
-l)
if [ $linesold != $linesnew ] ; then
{ echo "$str" | cat - $file > $file.bak && mv $file.bak $file; } \
|| die "insert_if_absent $file $str: failed"
--
mike
- [bug #35580] bootstrap is not portable to OpenBSD, Mike Miller, 2013/08/07
- Re: [bug #35580] bootstrap is not portable to OpenBSD, Pádraig Brady, 2013/08/08
- Re: [bug #35580] bootstrap is not portable to OpenBSD, Pádraig Brady, 2013/08/08
- Re: [bug #35580] bootstrap is not portable to OpenBSD,
Mike Miller <=
- Re: [bug #35580] bootstrap is not portable to OpenBSD, Eric Blake, 2013/08/09
- Re: [bug #35580] bootstrap is not portable to OpenBSD, Pádraig Brady, 2013/08/09
- Re: [bug #35580] bootstrap is not portable to OpenBSD, Mike Miller, 2013/08/12
- Re: [bug #35580] bootstrap is not portable to OpenBSD, Pádraig Brady, 2013/08/17
- Re: [bug #35580] bootstrap is not portable to OpenBSD, Pádraig Brady, 2013/08/28