coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: building old coreutils versions on new glibc systems


From: Bernhard Voelker
Subject: Re: building old coreutils versions on new glibc systems
Date: Tue, 13 Aug 2019 20:10:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

Hi Assaf,

On 8/11/19 6:09 AM, Assaf Gordon wrote:
> Hello,
> 
> On Sat, Aug 10, 2019 at 03:19:57PM +0200, Bernhard Voelker wrote:
>> On 8/7/19 6:04 PM, Jim Meyering wrote:
>>> Since it is something that may contribute to binaries I build (with
>>> the handy related build target), it feels like it belongs in
>>> version-control
> 
>> okay, fine.  Both variants have advantages and disadvantages, so let's
>> go for the variant easier to maintain.
>>
>> I'll reply wrt/ the patch in the other email.
> 
> Thanks for the improved script, the suggestion and the testing.
> 
> Attached updated patch. changes are:
> - moved to ./script/build-older-versions
> - trimmed whitespace from patches
> - used your version of the script
> - added permissive license to the script
> - added a short blurb at the end of the script, showing PATHs.
> 
> Comments welcomed,
>  -assaf
> 

thanks.

I'd only like to see following additional changes:

- make the script callable from an arbitrary directory, i.e.,
  make the file name of the patches relative to the script, and

- mention to adjust MANPATH (because that also works with the
  common directory: 'man df-8.23').

WDYT?

Have a nice day,
Berny

diff --git a/scripts/build-older-versions/README.older-versions 
b/scripts/build-older-versions/README.older-versions
index 0b73b79bd..713517b4f 100644
--- a/scripts/build-older-versions/README.older-versions
+++ b/scripts/build-older-versions/README.older-versions
@@ -156,7 +156,7 @@ versions 5.0,5.97,6.12,7.6 in `$HOME/old-coreutils/bin` :
 By adding the directory to your $PATH, older versions can be easily used:

     export PATH=$PATH:$HOME/old-coreutils/bin
-
+    export MANPATH=$MANPATH:$HOME/old-coreutils/man



diff --git a/scripts/build-older-versions/build-older-versions.sh 
b/scripts/build-older-versions/build-older-versions.sh
index a179890df..3afb0a433 100755
--- a/scripts/build-older-versions/build-older-versions.sh
+++ b/scripts/build-older-versions/build-older-versions.sh
@@ -7,7 +7,7 @@
 # notice and this notice are preserved.  This file is offered as-is,
 # without any warranty.
 #
-# Written by Assaf Gordon and Bernhard Voelker
+# Written by Assaf Gordon and Bernhard Voelker.


 # To build all versions since 5.0 (if possible):
@@ -23,6 +23,7 @@
 PREFIX="${PREFIX:=$HOME/old-coreutils}"

 base=$(basename "$0")
+scriptdir=$( dirname "$0" )

 die()
 {
@@ -80,7 +81,7 @@ patch_file=$(get_patch_file "$1") \

 # Test for the patch file if the above returned one.
 if test "$patch_file"; then
-  test -e "$patch_file" \
+  test -e "$scriptdir/$patch_file" \
     || die "internal error: patch file '$patch_file' does not exist"
 fi

@@ -119,7 +120,7 @@ cd "$srcdir" \
 # Is there a way to differentiate between 'already applied' and
 # 'failed to apply' ?
 test "$patch_file" \
-  && patch --batch --forward -p1 < "../../$patch_file"
+  && patch --batch --forward -p1 < "$scriptdir/$patch_file"

 ##
 ## Configure
@@ -193,5 +194,6 @@ manual pages for all programs in $PREFIX/share/man/man1
 Run the following command to add all programs to your \$PATH:

     export PATH=\$PATH:\$HOME/old-coreutils/bin
+    export MANPATH=\$MANPATH:\$HOME/old-coreutils/man

 EOF



reply via email to

[Prev in Thread] Current Thread [Next in Thread]