comparison sources/native-builds/lfs-bootstrap/make-control-image.sh @ 1269:7a60afa1846c

More tweaks to bootstrap-skeleton, implement the first half of lfs-bootstrap for Linux From Scratch 6.7 against the new infrastructure, and tweak gentoo build to stay current with bootstrap-skeleton changes. (Now more common infrastructure, and requires package-list file.)
author Rob Landley <rob@landley.net>
date Sun, 24 Oct 2010 04:17:15 -0500
parents 82d34e55552f
children
comparison
equal deleted inserted replaced
1268:30bab195be94 1269:7a60afa1846c
1 #!/bin/bash 1 ../bootstrap-skeleton/control-image-wrapper.sh
2
3 # Build Linux From Scratch 6.7 packages under target environment.
4
5 # Note: this doesn't rebuild the toolchain packages (libc, binutils,
6 # gcc, linux-headers), but reuses the toolchain we've got, because:
7
8 # 1) Building a new toolchain is a target-dependent can of worms.
9 # 2) Doing so would lose distcc acceleration.
10 # 3) Building glibc under uClibc is buggy because glibc expects that a
11 # 2.6 kernel will have TLS, and uClibc without NPTL doesn't. (Yes,
12 # repeat after me, "autoconf is useless".)
13
14 source sources/include.sh || exit 1
15
16 # Find path to our working directory.
17
18 [ $# -ne 1 ] && echo "usage: $0 FILENAME" >&2 && exit 1
19 [ "$1" != "/dev/null" ] && [ -e "$1" ] && echo "$1" exists && exit 0
20
21 # We use a lot of our own directories because we may have the same packages
22 # as the aboriginal build, but use different versions. So keep things separate
23 # so they don't interfere.
24
25 MYDIR="$(dirname "$(readlink -f "$(which "$0")")")"
26 IMAGENAME="${MYDIR/*\//}"
27 #PATCHDIR="$MYDIR/patches"
28 SRCDIR="$SRCDIR/$IMAGENAME" && mkdir -p "$SRCDIR" || dienow
29 WORK="$WORK/$IMAGENAME" && blank_tempdir "$WORK"
30 SRCTREE="$WORK"
31 PATCHDIR="$SRCTREE"
32
33 echo "=== Download source code."
34
35 EXTRACT_ALL=1
36
37 # Download upstream tarball
38
39 PATCHDIR="$SRCTREE"
40
41 URL=http://ftp.osuosl.org/pub/lfs/lfs-packages/lfs-packages-6.7.tar \
42 SHA1= \
43 RENAME='s/-sources//' \
44 download || dienow
45
46 cleanup_oldfiles
47
48 SRCDIR="$SRCTREE/lfs-packages"
49 PATCHDIR="$SRCDIR"
50
51 # Fixups for tarball names the Aboriginal extract scripts can't parse
52
53 mv "$SRCDIR"/sysvinit-2.88{dsf,}.tar.bz2 &&
54 mv "$SRCDIR"/tcl{8.5.8-src,-src-8.5.8}.tar.gz &&
55 mv "$SRCDIR"/udev-{161-testfiles,testfiles-161}.tar.bz2 || exit 1
56
57 # Remove damaged patches (either whitespace damaged, or don't apply without
58 # "fuzz" support).
59
60 rm "$SRCDIR"/gcc-4.5.1-startfiles_fix-1.patch &&
61 rm "$SRCDIR"/tar-1.23-overflow_fix-1.patch || exit 1
62
63 # Break down upstream tarball
64
65 for i in $(cd "$SRCDIR"; ls *.tar.*)
66 do
67 extract_package $(noversion $i)
68 done
69
70 #URL=http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.7.tar.gz \
71 #SHA1=8233ee56ed84ae05421e4e6d6db6c1fe72ee6797 \
72 #maybe_fork "download || dienow"
73