FreeBSD: improve bootstrapping, re-enable bdb for heimdal

This commit is contained in:
janus 2015-12-24 02:04:18 +00:00
parent cbcab5521b
commit 3c8f0a92d3
2 changed files with 23 additions and 12 deletions

View File

@ -11,7 +11,7 @@ rec {
inherit system; inherit system;
name = "trivial-bootstrap-tools"; name = "trivial-bootstrap-tools";
builder = "/bin/sh"; builder = "/usr/local/bin/bash";
args = [ ./trivial-bootstrap.sh ]; args = [ ./trivial-bootstrap.sh ];
mkdir = "/bin/mkdir"; mkdir = "/bin/mkdir";
@ -23,8 +23,8 @@ rec {
name = "stdenv-freebsd-boot-1"; name = "stdenv-freebsd-boot-1";
inherit system config; inherit system config;
initialPath = null; initialPath = [ "/" "/usr" ];
shell = "foo"; shell = "${bootstrapTools}/bin/bash";
fetchurlBoot = null; fetchurlBoot = null;
cc = null; cc = null;
}; };

View File

@ -1,3 +1,7 @@
set -e
set -o nounset
set -o pipefail
echo Building the trivial bootstrap environment... echo Building the trivial bootstrap environment...
echo echo
echo Needed FreeBSD packages: echo Needed FreeBSD packages:
@ -6,15 +10,22 @@ echo findutils gcpio gawk gnugrep coreutils bash gsed gtar gmake xar binutils gp
$mkdir -p $out/bin $mkdir -p $out/bin
ln () { ln () {
if test "x$2" != x -a -f "$out/bin/$2"; then if [ ! -z "${2:-}" ]; then
if [ -f "$out/bin/$2" ]; then
echo "$2 exists" echo "$2 exists"
exit 1; exit 1
fi; fi
fi
if test ! -f "$1"; then if test ! -f "$1"; then
echo Target "$2" does not exist echo Target "$2" does not exist
exit 1; exit 1
fi fi
# TODO: check that destination directory exists
if [ ! -z "${2:-}" ]; then
$ln -s "$1" "$out/bin/$2" $ln -s "$1" "$out/bin/$2"
else
$ln -s "$1" "$out/bin/"
fi
} }
ln /usr/local/bin/bash ln /usr/local/bin/bash
@ -76,16 +87,16 @@ ln /usr/local/bin/gcomm comm
ln /usr/local/bin/gcpio cpio ln /usr/local/bin/gcpio cpio
ln /usr/local/bin/curl curl ln /usr/local/bin/curl curl
ln /usr/local/bin/gfind find ln /usr/local/bin/gfind find
ln /usr/local/bin/grep grep #other grep is in /usr/bin ln /usr/local/bin/grep grep # other grep is in /usr/bin
ln /usr/bin/gzip ln /usr/bin/gzip
ln /usr/bin/gunzip ln /usr/bin/gunzip
ln /usr/bin/zcat ln /usr/bin/zcat
ln /usr/local/bin/ghead head ln /usr/local/bin/ghead head
ln /usr/bin/tail tail ln /usr/bin/tail tail # note that we are not using gtail!!!
ln /usr/local/bin/guniq uniq ln /usr/local/bin/guniq uniq
ln /usr/bin/less less ln /usr/bin/less less
ln /usr/local/bin/gtrue true ln /usr/local/bin/gtrue true
# ln /usr/bin/diff diff # ln /usr/bin/diff diff # we are using gdiff (see above)
ln /usr/local/bin/egrep egrep ln /usr/local/bin/egrep egrep
ln /usr/local/bin/fgrep fgrep ln /usr/local/bin/fgrep fgrep
ln /usr/local/bin/gpatch patch ln /usr/local/bin/gpatch patch