aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2019-04-23 17:48:18 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2019-04-23 17:48:18 +0100
commitee4e88597ca010e5189d8b481505894eee8335d6 (patch)
tree54c4aa47d81571d72dbb0d2172ef7adef15d18a6
parent17f68b89944b9dd8999d49e00afc617adbdbba86 (diff)
Bash updated with patched tarball (version 5.0.7)
Until now we were using the official tarball of GNU Bash. However, Bash is distributed using patches, not a public version controlled history. So to implement newer features of Bash, its necessary to apply those patches and make the tarball ourselves. With this commit, we have done just that: we used the 7 patches that have been released since version 5.0.0 and made a tarball to use for this template. The instructions on how to make the patched tarball are also given above the Bash build rule.
-rw-r--r--reproduce/software/config/installation/versions.mk4
-rw-r--r--reproduce/software/make/basic.mk28
2 files changed, 27 insertions, 5 deletions
diff --git a/reproduce/software/config/installation/versions.mk b/reproduce/software/config/installation/versions.mk
index cfa7f81..8276431 100644
--- a/reproduce/software/config/installation/versions.mk
+++ b/reproduce/software/config/installation/versions.mk
@@ -22,8 +22,8 @@
# Basic/low-level programs and libraires (installed in any case)
# --------------------------------------------------------------
-bash-version = 5.0
-binutils-version = 2.31.1
+bash-version = 5.0.7
+binutils-version = 2.32
coreutils-version = 8.31
curl-version = 7.63.0
diffutils-version = 3.7
diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk
index 0a35e79..c800411 100644
--- a/reproduce/software/make/basic.mk
+++ b/reproduce/software/make/basic.mk
@@ -90,7 +90,7 @@ all: $(foreach p, $(top-level-programs), $(ibidir)/$(p))
# its easier to just keep a with the others.
$(lockdir): | $(BDIR); mkdir $@
downloadwrapper = ./reproduce/analysis/bash/download-multi-try
-tarballs = $(foreach t, bash-$(bash-version).tar.gz \
+tarballs = $(foreach t, bash-$(bash-version).tar.lz \
binutils-$(binutils-version).tar.lz \
bzip2-$(bzip2-version).tar.gz \
cert.pem \
@@ -137,7 +137,7 @@ $(tarballs): $(tdir)/%: | $(lockdir)
| awk '{print $$1}' ); \
\
mergenames=1; \
- if [ $$n = bash ]; then w=http://ftp.gnu.org/gnu/bash; \
+ if [ $$n = bash ]; then w=http://akhlaghi.org/src; \
elif [ $$n = binutils ]; then w=http://ftp.gnu.org/gnu/binutils; \
elif [ $$n = bzip ]; then w=http://akhlaghi.org/src; \
elif [ $$n = cert ]; then w=http://akhlaghi.org/src; \
@@ -526,12 +526,34 @@ $(ibidir)/patchelf: $(tdir)/patchelf-$(patchelf-version).tar.gz \
# is linking with the system's `readline'. But if you run that same command
# within a rule in this project, you'll see that it is indeed linking with
# our own built readline.
+#
+# Unfortunately Bash doesn't maintain a Git repository and minor fixes are
+# released as patches. Therefore we'll need to make our own fully-working
+# and updated tarball to build the proper version of Bash. You download and
+# apply them to the original tarball and make a new one with the following
+# series of commands (just replace `NUMBER' with the total number of
+# patches that you want to apply).
+#
+# $ number=NUMBER
+# $ tar xf bash-5.0.tar.gz
+# $ cd bash-5.0
+# $ for i in $(seq 1 $number); do \
+# pname=bash50-$(printf "%03d" $i); \
+# wget http://ftp.gnu.org/gnu/bash/bash-5.0-patches/$pname -O ../$pname;\
+# patch -p0 -i ../$pname; \
+# done
+# $ cd ..
+# $ mv bash-5.0 bash-5.0.$number
+# $ tar cf bash-5.0.$number.tar bash-5.0.$number
+# $ lzip --best bash-5.0.$number.tar
+# $ rm bash50-*
+
ifeq ($(on_mac_os),yes)
needpatchelf =
else
needpatchelf = $(ibidir)/patchelf
endif
-$(ibidir)/bash: $(tdir)/bash-$(bash-version).tar.gz \
+$(ibidir)/bash: $(tdir)/bash-$(bash-version).tar.lz \
$(ibidir)/readline \
$(needpatchelf)