Mercurial > hg > aboriginal
changeset 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.)
line wrap: on
line diff
--- a/sources/native-builds/bootstrap-skeleton/files/build-one-package.sh Sat Oct 23 15:15:29 2010 -0500 +++ b/sources/native-builds/bootstrap-skeleton/files/build-one-package.sh Sun Oct 24 04:17:15 2010 -0500 @@ -25,6 +25,10 @@ cd "$1" || exit 1 # Lobotomize config.guess so it won't complain about unknown target types. + # 99% of packages do not care, but autoconf throws a temper tantrum if + # the version of autoconf that created this back when the package shipped + # didn't know what a microblaze or hexagon was. Repeat after me: + # "Autoconf is useless" for guess in $(find . -name config.guess) do
--- a/sources/native-builds/bootstrap-skeleton/files/run-build-stages.sh Sat Oct 23 15:15:29 2010 -0500 +++ b/sources/native-builds/bootstrap-skeleton/files/run-build-stages.sh Sun Oct 24 04:17:15 2010 -0500 @@ -2,7 +2,8 @@ # Run each of the individual package build files, in order. -for i in zlib ncurses python bash rsync patch file portage +[ -z "$FILTER" ] || FILTER="/$FILTER/d" +for i in $(sed -r -e "$FILTER" -e "s@#.*@@" /mnt/package-list) do /mnt/build-one-package.sh "$i" || exit 1 done
--- a/sources/native-builds/gentoo-bootstrap/download.sh Sat Oct 23 15:15:29 2010 -0500 +++ b/sources/native-builds/gentoo-bootstrap/download.sh Sun Oct 24 04:17:15 2010 -0500 @@ -1,5 +1,3 @@ -#!/bin/bash - # Download all the source tarballs we haven't got up-to-date copies of. URL=http://zlib.net/zlib-1.2.5.tar.bz2 \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/gentoo-bootstrap/mnt/package-list Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,1 @@ +zlib ncurses python bash rsync patch file portage
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/download.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,44 @@ +# Build Linux From Scratch 6.7 packages under target environment. + +# Note: this doesn't rebuild the toolchain packages (libc, binutils, +# gcc, linux-headers), but reuses the toolchain we've got, because: + +# 1) Building a new toolchain is a target-dependent can of worms. +# 2) Doing so would lose distcc acceleration. +# 3) Building glibc under uClibc is buggy because glibc expects that a +# 2.6 kernel will have TLS, and uClibc without NPTL doesn't. (Yes, +# repeat after me, "autoconf is useless".) + +# Download upstream tarball + +URL=http://ftp.osuosl.org/pub/lfs/lfs-packages/lfs-packages-6.7.tar \ +SHA1= \ +RENAME='s/-sources//' \ +download || dienow + +cleanup_oldfiles + +# Extract the individual packages from the upstream tarball + +SRCDIR="$SRCTREE/lfs-packages" +PATCHDIR="$SRCDIR" + +# Fixups for tarball names the Aboriginal extract scripts can't parse + +mv "$SRCDIR"/sysvinit-2.88{dsf,}.tar.bz2 && +mv "$SRCDIR"/tcl{8.5.8-src,-src-8.5.8}.tar.gz && +mv "$SRCDIR"/udev-{161-testfiles,testfiles-161}.tar.bz2 || exit 1 + +# Remove damaged patches (whitespace damaged, don't apply without "fuzz"). + +rm "$SRCDIR"/gcc-4.5.1-startfiles_fix-1.patch && +rm "$SRCDIR"/tar-1.23-overflow_fix-1.patch || exit 1 + +# Break down upstream tarball + +for i in $(cd "$SRCDIR"; ls *.tar.*) +do + extract_package $(noversion $i) +done + +rm -rf "$SRCDIR"
--- a/sources/native-builds/lfs-bootstrap/make-control-image.sh Sat Oct 23 15:15:29 2010 -0500 +++ b/sources/native-builds/lfs-bootstrap/make-control-image.sh Sun Oct 24 04:17:15 2010 -0500 @@ -1,73 +1,1 @@ -#!/bin/bash - -# Build Linux From Scratch 6.7 packages under target environment. - -# Note: this doesn't rebuild the toolchain packages (libc, binutils, -# gcc, linux-headers), but reuses the toolchain we've got, because: - -# 1) Building a new toolchain is a target-dependent can of worms. -# 2) Doing so would lose distcc acceleration. -# 3) Building glibc under uClibc is buggy because glibc expects that a -# 2.6 kernel will have TLS, and uClibc without NPTL doesn't. (Yes, -# repeat after me, "autoconf is useless".) - -source sources/include.sh || exit 1 - -# Find path to our working directory. - -[ $# -ne 1 ] && echo "usage: $0 FILENAME" >&2 && exit 1 -[ "$1" != "/dev/null" ] && [ -e "$1" ] && echo "$1" exists && exit 0 - -# We use a lot of our own directories because we may have the same packages -# as the aboriginal build, but use different versions. So keep things separate -# so they don't interfere. - -MYDIR="$(dirname "$(readlink -f "$(which "$0")")")" -IMAGENAME="${MYDIR/*\//}" -#PATCHDIR="$MYDIR/patches" -SRCDIR="$SRCDIR/$IMAGENAME" && mkdir -p "$SRCDIR" || dienow -WORK="$WORK/$IMAGENAME" && blank_tempdir "$WORK" -SRCTREE="$WORK" -PATCHDIR="$SRCTREE" - -echo "=== Download source code." - -EXTRACT_ALL=1 - -# Download upstream tarball - -PATCHDIR="$SRCTREE" - -URL=http://ftp.osuosl.org/pub/lfs/lfs-packages/lfs-packages-6.7.tar \ -SHA1= \ -RENAME='s/-sources//' \ -download || dienow - -cleanup_oldfiles - -SRCDIR="$SRCTREE/lfs-packages" -PATCHDIR="$SRCDIR" - -# Fixups for tarball names the Aboriginal extract scripts can't parse - -mv "$SRCDIR"/sysvinit-2.88{dsf,}.tar.bz2 && -mv "$SRCDIR"/tcl{8.5.8-src,-src-8.5.8}.tar.gz && -mv "$SRCDIR"/udev-{161-testfiles,testfiles-161}.tar.bz2 || exit 1 - -# Remove damaged patches (either whitespace damaged, or don't apply without -# "fuzz" support). - -rm "$SRCDIR"/gcc-4.5.1-startfiles_fix-1.patch && -rm "$SRCDIR"/tar-1.23-overflow_fix-1.patch || exit 1 - -# Break down upstream tarball - -for i in $(cd "$SRCDIR"; ls *.tar.*) -do - extract_package $(noversion $i) -done - -#URL=http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.7.tar.gz \ -#SHA1=8233ee56ed84ae05421e4e6d6db6c1fe72ee6797 \ -#maybe_fork "download || dienow" - +../bootstrap-skeleton/control-image-wrapper.sh \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/bash.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,13 @@ +#!/bin/sh + +./configure --prefix=/usr --bindir=/bin --htmldir=/usr/share/doc/bash \ + --without-bash-malloc --with-installed-readline && +make -j $CPUS || exit 1 + +if [ ! -z "$CHECK" ] +then + chown -R nobody . && + su-tools nobody -s /bin/bash -c "make tests" || exit 1 +fi + +make install
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/bison.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,12 @@ +#!/bin/sh + +./configure --prefix=/usr && +echo '#define YYENABLE_NLS 1' >> lib/config.h && +make -j $CPUS || exit 1 + +if [ ! -z "$CHECK" ] +then + make check || exit 1 +fi + +make install
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/coreutils.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,17 @@ +#!/bin/sh + +./configure --prefix=/usr --enable-no-install-program=kill,uptime && +make -j $CPUS || exit 1 + +if [ ! -z "$CHECK" ] +then + make NON_ROOT_USERNAME=nobody check-root && + echo "dummy:x:1000:nobody" >> /etc/group && + chown -R nobody . && + su-tools nobody -s /bin/bash -c "make RUN_EXPENSIVE_TESTS=yes check" && + sed -i '/^dummy:/d' /etc/group || exit 1 +fi + +make install && +mv /usr/bin/chroot /usr/sbin +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/e2fsprogs.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,17 @@ +#!/bin/bash + +mkdir build && +cd build && +../configure --prefix=/usr --with-root-prefix="" \ + --enable-elf-shlibs --disable-libblkid --disable-libuuid \ + --disable-uuidd --disable-fsck --disable-tls && +make -j $CPUS || exit 1 + +if [ ! -z "$CHECK" ] +then + make check || exit 1 +fi + +make install && +make install-libs && +chmod u+w /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/gdbm.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,6 @@ +#!/bin/sh + +./configure --prefix=/usr && +make -j $CPUS && +make install && +make install-compat
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/gmp.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,22 @@ +#!/bin/sh + +# Doesn't work with uClibc++ yet. +# [ ! -z "$(which c++)" ] && X="--enable-cxx" + +./configure --prefix=/usr $X --enable-mpbsd && +make -j $CPUS || exit 1 + +if [ ! -z "$CHECK" ] +then + make check 2>&1 | tee gmp-check-log + awk '/tests passed/{total+=$2} ; END{print total}' gmp-check-log +fi + +make install || exit 1 + +if [ ! -z "$DOCS" ] +then + mkdir -p /usr/share/doc/gmp-5.0.1 && + cp doc/isa_abi_headache doc/connfiguration doc/*.html \ + /usr/share/doc/gmp-5.0.1 +fi
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/grep.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,11 @@ +#!/bin/sh + +./configure --prefix=/usr --bindir=/bin && +make -j $CPUS || exit 1 + +if [ ! -z "$CHECK" ] +then + make check || exit 1 +fi + +make install
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/iana-etc.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,4 @@ +#!/bin/sh + +make -j $CPUS && +make install
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/inetutils.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,6 @@ +#!/bin/sh + +./configure --prefix=/usr --libexecdir=/usr/sbin --localstatedir=/var \ + --disable-logger --disable-syslogd --disable-whois --disable-servers && +make -j $CPUS && +make install
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/libtool.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,11 @@ +#!/bin/sh + +./configure --prefix=/usr && +make -j $CPUS || exit 1 + +if [ ! -z "$CHECK" ] +then + make check || exit 1 +fi + +make install
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/m4.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,12 @@ +#!/bin/sh + +sed -i -e '/"m4.h"/a#include <sys/stat.h>' src/path.c && +./configure --prefix=/usr && +make || exit 1 + +if [ ! -z "$CHECK" ] +then + make check || exit 1 +fi + +make install
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/mpc.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,11 @@ +#!/bin/sh + +./configure --prefix=/usr && +make -j $CPUS || exit 1 + +if [ ! -z "$CHECK" ] +then + make check || exit 1 +fi + +make install
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/mpfr.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,19 @@ +#!/bin/sh + +# TODO: The --enable-thread-safe here requires TLS + +./configure --prefix=/usr --docdir=/usr/share/doc/mpfr-3.0.0 && +make -j $CPUS || exit 1 + +if [ ! -z "$CHECK" ] +then + make check || exit 1 +fi + +make install || exit 1 + +if [ ! -z "$DOCS" ] +then + make html && + make install-html +fi
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/ncurses.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,25 @@ +#!/bin/sh + +[ ! -z "$(which c++)" ] && X="--without-cxx --without-cxx-binding" + +./configure --prefix=/usr --with-shared --without-debug --enable-widec $X && +make -j $CPUS && +make install || exit 1 + +# Make sure various packages can find ncurses no matter what weird names +# they look for. + +for lib in ncurses form panel menu +do + ln -sf lib${lib}w.so /usr/lib/lib${lib}.so && + ln -sf lib${lib}w.a /usr/lib/lib${lib}.a || exit 1 +done +ln -sf libncursesw.so libcursesw.so && +ln -sf libncurses.so /usr/lib/libcurses.so && +ln -sf libncursesw.a /usr/lib/libcursesw.a && +ln -sf libncurses.a /usr/lib/libcurses.a || exit 1 + +if [ ! -z "$(which c++)" ] +then + ln -sf libncurses++w.a /usr/lib/libncurses++.a || exit 1 +fi
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/pkg-config.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,13 @@ +#!/bin/sh + +sed -i -e 's/XT])dnl/XT])[]dnl/' \ + -e 's/\.])dnl/\.])[]dnl/' pkg.m4 && +./configure --prefix=/usr && +make -j $CPUS || exit 1 + +if [ ! -z "$CHECK" ] +then + make check || exit 1 +fi + +make install
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/procps.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,5 @@ +#!/bin/sh + +sed -i -e 's@\*/module.mk@proc/module.mk ps/module.mk@' Makefile && +make -j $CPUS && +make install
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/readline.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,14 @@ +#!/bin/sh + +sed -k '/MV.*old/d' Makefile.in && +sed -i '/{OLDSUFF}/c:' support/shlib-install && +./configure --prefix=/usr --libdir=/lib && +make -j $CPUS SHLIB_LIBS=-lncurses && +make install || exit 1 + +if [ ! -z "$DOCS" ] +then + mkdir /usr/share/doc/readline && + install -m644 doc/*.ps doc/*.pdf doc/*.html doc/*.dvi \ + /usr/share/doc/readline +fi
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/sed.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,17 @@ +#!/bin/sh + +./configure --prefix=/usr --bindir=/bin --htmldir=/usr/share/doc/sed-4.2.1 && +make -j $CPUS || exit 1 + +if [ ! -z "$DOCS" ] +then + make html && + make -C doc install-html || exit 1 +fi + +if [ ! -z "$CHECK" ] +then + make check || exit 1 +fi + +make install
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/setup.nosrc Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,53 @@ +#!/bin/bash + +# Basic setup. Create directories not in the aboriginal base system. + +cd / && + +mkdir -p boot etc/opt opt media/floppy media/cdrom srv var/tmp && +chmod 0750 root && +chmod 1777 tmp var/tmp && +rm -rf /usr/local && +ln -sf . usr/local && +cd usr/share && +mkdir -p doc info locale man misc terminfo zoneinfo && +cd ../.. && +ln -sf share/man share/doc share/info usr && +cd var && +mkdir -p lib lock log mail run spool opt cache local && +cd lib && +mkdir -p misc locate && +cd ../.. && + +cat > etc/passwd << "EOF" && +root:x:0:0:root:/root:/bin/bash +bin:x:1:1:bin:/dev/null:/bin/false +nobody:x:99:99:Unprivileged User:/dev/null:/bin/false +guest:x:500:500:guest:/home/guest:/bin/sh +EOF + +cat > etc/group << "EOF" && +root:x:0: +bin:x:1: +sys:x:2: +kmem:x:3: +tty:x:4: +tape:x:5: +daemon:x:6: +floppy:x:7: +disk:x:8: +lp:x:9: +dialout:x:10: +audio:x:11: +video:x:12: +utmp:x:13: +usb:x:14: +cdrom:x:15: +mail:x:34: +nogroup:x:99: +guest:x:500: +EOF + +touch /var/run/utmp /var/log/btmp /var/log/lastlog /var/log/wtmp && +chgrp -v utmp /var/run/utmp /var/log/lastlog && +chmod -v 664 /var/run/utmp /var/log/lastlog
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/util-linux-ng.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,8 @@ +#!/bin/sh + +sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \ + -i $(grep -rl '/etc/adjtime' .) && +mkdir -p /var/lib/hwclock && +./configure --enable-arch --enable-partx --enable-write && +make -j $CPUS && +make install
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/build/zlib.sh Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,22 @@ +#!/bin/sh + +# zlib 1.2.5 accidentally shipped a generated file, which it then tries to +# overwrite in-place. This doesn't work so well on a read only filesystem. + +rm -f Makefile && + +# Fix another bug. + +sed -i 's/ifdef _LARGEFILE64_SOURCE/ifndef _LARGEFILE64_SOURCE/' zlib.h && + +# Otherwise, standard build + +./configure --prefix=/usr && +make -j $CPUS || exit 1 + +if [ ! -z "$CHECK" ] +then + make check || exit 1 +fi + +make install
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/native-builds/lfs-bootstrap/mnt/package-list Sun Oct 24 04:17:15 2010 -0500 @@ -0,0 +1,48 @@ +setup +zlib +m4 #development +gmp #development +mpfr #development +mpc #development +sed #busybox +pkg-config #development +ncurses +util-linux-ng +e2fsprogs #busybox +coreutils #busybox +gawk #busybox +iana-etc +bison #development +procps #busybox +grep #busybox +readline #development +gettext #development internationalization +bash #development +libtool #development pointless +gdbm +inetutils #busybox? +perl +autoconf #development +automake #development +bzip2 #busybox +diffutils #busybox +file +findutils #busybox +flex #development +groff +gzip #busybox +iproute2 #busybox? +kbd #busybox? +less #busybox +make #development +man-db +module-init-tools #busybox +patch #busybox +psmisc #busybox? +shadow #busybox +sysklogd #busybox +sysvinit #busybox +tar #busybox +texinfo #development pointless +udev #busybox +vim