annotate images/lfs-bootstrap/download.sh @ 40:ef471ef37665 draft default tip

Yank reliance on ash.
author Rob Landley <rob@landley.net>
date Sat, 18 Jul 2015 01:39:24 -0500
parents 0bdce741ba83
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 # Build Linux From Scratch 6.7 packages under target environment.
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
2
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
3 # Note: this doesn't rebuild the toolchain packages (libc, binutils,
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
4 # gcc, linux-headers), but reuses the toolchain we've got, because:
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
5
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
6 # 1) Building a new toolchain is a target-dependent can of worms.
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
7 # 2) Doing so would lose distcc acceleration.
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
8 # 3) Building glibc under uClibc is buggy because glibc expects that a
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
9 # 2.6 kernel will have TLS, and uClibc without NPTL doesn't. (Yes,
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
10 # repeat after me, "autoconf is useless".)
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
11
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
12 # Download upstream tarball
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
13
16
0bdce741ba83 Upgrade lfs-bootstrap from 6.7 to Linux From Scratch 6.8.
Rob Landley <rob@landley.net>
parents: 0
diff changeset
14 URL=http://ftp.osuosl.org/pub/lfs/lfs-packages/lfs-packages-6.8.tar \
0bdce741ba83 Upgrade lfs-bootstrap from 6.7 to Linux From Scratch 6.8.
Rob Landley <rob@landley.net>
parents: 0
diff changeset
15 SHA1=6ea087c36553a13f4da1152014d226806013db15 \
0
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
16 RENAME='s/-sources//' \
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
17 download || dienow
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
18
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
19 URL=ftp://penma.de/code/gettext-stub/gettext-stub-1.tar.gz \
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
20 SHA1=ef706667010893c5492173c543d2c5b715abb8a7 \
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
21 download || dienow
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
22
16
0bdce741ba83 Upgrade lfs-bootstrap from 6.7 to Linux From Scratch 6.8.
Rob Landley <rob@landley.net>
parents: 0
diff changeset
23 # Call cleanup before we move SRCDIR
0bdce741ba83 Upgrade lfs-bootstrap from 6.7 to Linux From Scratch 6.8.
Rob Landley <rob@landley.net>
parents: 0
diff changeset
24
0
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
25 cleanup_oldfiles
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
26
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
27 # Extract the individual packages from the upstream tarball
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
28
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
29 SRCDIR="$SRCTREE/lfs-packages"
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
30 PATCHDIR="$SRCDIR"
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
31
16
0bdce741ba83 Upgrade lfs-bootstrap from 6.7 to Linux From Scratch 6.8.
Rob Landley <rob@landley.net>
parents: 0
diff changeset
32 # Fixups for tarball names the Aboriginal extract scripts can't parse into
0bdce741ba83 Upgrade lfs-bootstrap from 6.7 to Linux From Scratch 6.8.
Rob Landley <rob@landley.net>
parents: 0
diff changeset
33 # package name, version number, and archive type.
0
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
34
16
0bdce741ba83 Upgrade lfs-bootstrap from 6.7 to Linux From Scratch 6.8.
Rob Landley <rob@landley.net>
parents: 0
diff changeset
35 mv "$SRCDIR"/expect{,-}5.45.tar.gz &&
0
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
36 mv "$SRCDIR"/sysvinit-2.88{dsf,}.tar.bz2 &&
16
0bdce741ba83 Upgrade lfs-bootstrap from 6.7 to Linux From Scratch 6.8.
Rob Landley <rob@landley.net>
parents: 0
diff changeset
37 mv "$SRCDIR"/tcl{8.5.9-src,-src-8.5.9}.tar.gz &&
0bdce741ba83 Upgrade lfs-bootstrap from 6.7 to Linux From Scratch 6.8.
Rob Landley <rob@landley.net>
parents: 0
diff changeset
38 mv "$SRCDIR"/udev-{166-testfiles,testfiles-166}.tar.bz2 || exit 1
0
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
39
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
40 # Remove damaged patches (whitespace damaged, don't apply without "fuzz").
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
41
16
0bdce741ba83 Upgrade lfs-bootstrap from 6.7 to Linux From Scratch 6.8.
Rob Landley <rob@landley.net>
parents: 0
diff changeset
42 rm "$SRCDIR"/gcc-4.5.2-startfiles_fix-1.patch &&
0bdce741ba83 Upgrade lfs-bootstrap from 6.7 to Linux From Scratch 6.8.
Rob Landley <rob@landley.net>
parents: 0
diff changeset
43 rm "$SRCDIR"/procps-3.2.8-fix_HZ_errors-1.patch || exit 1
0bdce741ba83 Upgrade lfs-bootstrap from 6.7 to Linux From Scratch 6.8.
Rob Landley <rob@landley.net>
parents: 0
diff changeset
44 #rm "$SRCDIR"/tar-1.23-overflow_fix-1.patch || exit 1
0
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
45
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
46 # Break down upstream tarball
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
47
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
48 for i in $(cd "$SRCDIR"; ls *.tar.*)
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
49 do
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
50 extract_package $(noversion $i)
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
51 done
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
52
bcd2e358d57f Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
Rob Landley <rob@landley.net>
parents:
diff changeset
53 rm -rf "$SRCDIR"