######################## # install debian etch without using a network mirror # after installing debian etch "desktop" defaults # run this script as root to do a full OFR build ######################## # Setup repository URI's cat <>/etc/apt/sources.list deb http://archive.vyatta.com/vyatta/ community main deb http://ftp.debian.org/debian stable main EOF # Get and add the vyatta public key wget http://archive.vyatta.com/vyatta/vyatta-pubkey.gpg gpg --import vyatta-pubkey.gpg gpg --import /etc/apt/trusted.gpg cp ~/.gnupg/pubring.gpg /etc/apt/trusted.gpg # Get needed packages # TODO: get these from a "virtual package" apt-get update apt-get install -y \ openssh-server \ libc6-dev \ curl \ libcurl3-dev \ syslinux \ bison \ libtool \ fakeroot \ fakechroot \ git-core \ expat \ libexpat1-dev \ asciidoc \ xmlto \ liburi-perl \ libhtml-parser-perl \ libhtml-tree-perl \ libwww-perl \ libhtml-tagset-perl \ autoconf \ flex \ automake1.9 # copy sysroot TODO: create sysroot from sources # also fix up missing library links (mkdir -p /opt/vyatta/share/sysroot/i386 && \ cd /opt/vyatta/share/sysroot && \ wget http://archive.vyatta.com/build-root/sysroot.tgz && \ cd i386 && \ tar xzf ../sysroot.tgz >/dev/null && \ cd /lib && \ ln -s /usr/lib/libfake* . \ ) ######################## # get the sources # and configure them ######################## PATH=/opt/vyatta/bin:$PATH git-clone git://suva.vyatta.com/ofr.git cd ofr autoreconf -i ./configure ######################## # make and install # the tools ######################## tools/pkg-clone git make git.deb dpkg -i git/*.deb #make tools 2>/dev/null tools/pkg-clone binutils make binutils.deb make SUDO= install-binutils tools/pkg-clone gcc make gcc.deb dpkg -i --force-all --instdir=/opt/vyatta/ gcc/*.deb tools/pkg-clone flex make flex.deb dpkg -i --instdir=/opt/vyatta flex/*.deb tools/pkg-clone squashfs-tools make squashfs-tools.deb dpkg -i --instdir=/opt/vyatta/bin squashfs-tools/*.deb ######################## # Re-configure the sources for the new environment ######################## PATH=/opt/vyatta/bin:$PATH autoreconf -i ./configure ######################## # Do the actual make ######################## make echo "DONE: AN ISO (livecd/livecd.iso) SHOULD BE PRESENT"