tar -xjvf /sources/iana-etc-2.30.tar.bz2 cd iana-etc-2.30 make $CORES_TO_USE make install cd .. rm -rvf iana-etc-2.30
Final version of M4:
tar -xjvf /sources/m4-1.4.13.tar.bz2 cd m4-1.4.13 ./configure --prefix=/usr make $CORES_TO_USE make check
==================== All 76 tests passed (1 test was not run) ====================
Handy.
make install cd .. rm -rvf m4-1.4.13
BISON, according to the book, is a parser generator. Whatever that is. It is also a replacement for an earlier bit of software called Yacc. Presumably the next version will be called Capybara. I think it is used in building software because it was one of the packages that we needed to apt-get for the ubuntu LiveCD to build the Toolchain.
tar -xjvf /sources/bison-2.4.1.tar.bz2 cd bison-2.4.1 ./configure --prefix=/usr echo '#define YYENABLE_NLS 1' >> lib/config.h
That command adds support for internationalisation stuff.
make $CORES_TO_USE make $CORES_TO_USE check
## ------------- ## ## Test results. ## ## ------------- ## 224 tests were successful. 16 tests were skipped.
Sounds good.
make install cd .. rm -rvf bison-2.4.1
The procps package contains tools for monitoring processes. I usually use the 'ps' part of this to search for misbehaving programs to 'kill' them.
tar -xzvf /sources/procps-3.2.8.tar.gz cd procps-3.2.8
We need to patch away a problem with one of the programs and Unicode. No particular idea what the problem is but hopefully it should have gone.
patch -Np1 -i /sources/procps-3.2.8-watch_unicode-1.patch
patching file Makefile patching file watch.c
make $CORES_TO_USE make install cd .. rm -rvf procps-3.2.8
GREP is a ubiquitous search program. Used to search files, or to filter the output of other files.
tar -xjvf /sources/grep-2.5.4.tar.bz2 cd grep-2.5.4 patch -Np1 -i /sources/grep-2.5.4-debian_fixes-1.patch
patching file lib/posix/regex.h Hunk #1 succeeded at 166 (offset 1 line). patching file src/dfa.c Hunk #1 succeeded at 595 (offset 1 line). Hunk #2 succeeded at 693 (offset 1 line). Hunk #3 succeeded at 723 (offset 1 line). patching file src/grep.c Hunk #3 succeeded at 1847 (offset 7 lines). Hunk #4 succeeded at 2270 (offset 10 lines). patching file src/search.c
./configure --prefix=/usr --bindir=/bin --without-included-regex make $CORES_TO_USE make check || true
I got:
FAIL: fmbtest.sh
But that is OK, because the book says "There are known test failures in the fmbtest.sh tests."
make install cd .. rm -rvf grep-2.5.4
The Readline software has something to do with text manipulation at the command line. It does not include any actual programs, it is more to support other programs.
tar -xzvf /sources/readline-6.1.tar.gz cd readline-6.1
Right from the start, we've got a fucking 'sed' inclusion. This is something to do with stopping existing libraries being copied to *.old.
sed -i '/MV.*old/d' Makefile.in sed -i '/{OLDSUFF}/c:' support/shlib-install sed -i -e 's/0x0600/0x0601/' -e 's/6\.0/6.1/' -e 's/RL_VERSION_MINOR\t0/RL_VERSION_MINOR\t1/' readline.h
Actually the last command is nothing to do with the .old stuff, it actually JUST CHANGES THE VERSION NUMBER IN THE MANUAL. That's just insane.
./configure --prefix=/usr --libdir=/lib make $CORES_TO_USE SHLIB_LIBS=-lncurses
The [SHLIB_LIBS] option tells the make command about the ncurses that we have already built, so it can take it into account.
make install
The libraries need to be put in the FHS proper place, and some symbolic links need to be put in place accordingly.
mv -v /lib/lib{readline,history}.a /usr/lib rm -v /lib/lib{readline,history}.so ln -sfv ../../lib/libreadline.so.6 /usr/lib/libreadline.so ln -sfv ../../lib/libhistory.so.6 /usr/lib/libhistory.so
We also need the documentation:
mkdir -v /usr/share/doc/readline-6.1 install -v -m644 doc/*.{ps,pdf,html,dvi} /usr/share/doc/readline-6.1 cd .. rm -rvf readline-6.1
Next we build the actual BASH program that generates the command line.
tar -xzvf /sources/bash-4.1.tar.gz cd bash-4.1 ./configure --prefix=/usr --bindir=/bin --htmldir=/usr/share/doc/bash-4.1 --without-bash-malloc --with-installed-readline
The [readline] obviously refers to the package we just installed and prevents BASH using its own version.
make $CORES_TO_USE
Before we run the tests we need to tell the system to use our own localisation stuff and to make 'nobody' own the source files.
sed -i 's/LANG/LC_ALL/' tests/intl.tests sed -i 's@tests@& </dev/tty@' tests/run-test chown -Rv nobody ./
Not entirely sure how nobody can own this when we deleted the reference to nobody from the /etc/group file... Lets see how it goes when we [su-tools] as [nobody] the [make $CORES_TO_USE check] command:
su-tools nobody -s /bin/bash -c "make tests"
Well, that was fucking pointless. Screeds and screeds of crap, and no obvious Yeah! or Fuck! message at the end. Bollocks.
make install
Now that we have made our final bash, lets run it to replace the Toolchain one that we have been using:
exec /bin/bash --login +h cd .. rm -rvf bash-4.1
Libtool, is as its name might suggest, a tool for use in managing libraries.
tar -xzvf /sources/libtool-2.2.6b.tar.gz cd libtool-2.2.6b ./configure --prefix=/usr make $CORES_TO_USE make $CORES_TO_USE check
70 tests behaved as expected. 5 tests were skipped.
Well, OK then.
make install cd .. rm -rvf libtool-2.2.6b
GDBM stands for Gnu Database Manager, which sounds like a simple command line database. All that is installed though, are libraries rather than programs.
At this point, I would have liked to add more, but I cannot because my USB Key with the LiveCD has started playing silly buggers. All I get from it is Bus Errors. That sounds bad.
So, I rebooted the machine, and ran all the commands from the end of the setup for chroot post, and it I all still working. I can only surmise that the USB Key burped or something. It is working fine now.
tar -xzvf /sources/gdbm-1.8.3.tar.gz cd gdbm-1.8.3 ./configure --prefix=/usr make $CORES_TO_USE make install make install-compat
The [install-compat] command installs “DBM and NDBM compatibility headers”, whatever they are. I think they are make special versions of the software that is compatible with older programs. As with another package, we have to do the .info stuff manually:
install-info --dir-file=/usr/info/dir /usr/info/gdbm.info cd .. rm -rvf gdbm-1.8.3
Inetutils is a continuation of the binutils and coreutils tradition of keeping a bunch of similarly themed programs together. In this case it is networking utilities.
tar -xzvf /sources/inetutils-1.7.tar.gz cd inetutils-1.7 ./configure --prefix=/usr --libexecdir=/usr/sbin --localstatedir=/var --disable-ifconfig --disable-logger --disable-syslogd --disable-whois --disable-servers
The [disable-servers] option prevents certain server software being installed, which are not considered to be secure, or required. The rest of the [disable] commands exclude various programs which other packages are going to, or have already, installed.
make $CORES_TO_USE make install
Once more some programs need to be moved somewhere FHS compliant.
mv -v /usr/bin/{hostname,ping,ping6} /bin mv -v /usr/bin/traceroute /sbin cd .. rm -rvf inetutils-1.7
The last package we need to install before we just churn through the rest in alphabetical order is the Perl language.
tar -xjvf /sources/perl-5.10.1.tar.bz2 cd perl-5.10.1
This package is the first that needs a /etc/hosts file installed, so we'd better create a basic one. This is just a file which associates computers with their IP numbers. A kind of local fixed DNS server, if you will. This is just a temporary file, and will be overwritten in due course.
echo "127.0.0.1 localhost $(hostname)" > /etc/hosts patch -Np1 -i /sources/perl-5.10.1-utf8-1.patch
patching file ext/re/t/regop.t Hunk #1 succeeded at 233 (offset 2 lines). patching file regcomp.c Hunk #1 succeeded at 2820 (offset -13 lines). patching file regexec.c Hunk #1 succeeded at 1006 (offset -99 lines). Hunk #2 succeeded at 1040 (offset -99 lines). Hunk #3 succeeded at 1052 (offset -99 lines).
This time we do not have to use the libc patch that we needed when we were building this package for the toolchain.
sed -i -e "s|BUILD_ZLIB\s*= True|BUILD_ZLIB = False|" -e "s|INCLUDE\s*= ./zlib-src|INCLUDE = /usr/include|" -e "s|LIB\s*= ./zlib-src|LIB = /usr/lib|" ext/Compress-Raw-Zlib/config.in
That horror of a command tells Perl that we have already compiled and installed a working version of Zlib, so it should use that.
sh Configure -des -Dprefix=/usr -Dvendorprefix=/usr -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dpager="/usr/bin/less -isR"
Oh, crap that looks complicated. As with before, Perl needs to be a little different. The [Dvendorprefix] tells Perl where it should be installing programs it compiles in due course. the [Dman{1,3}dir] options force the documentation to be installed, as it would usually need to find Groff installed to do this automatically. The [Dpager] command corrects an error in the way that one of the installed programs interacts with the [less] command.
make $CORES_TO_USE make $CORES_TO_USE test
All tests successful.
Superb, took long enough.
make install cd .. rm -rvf perl-5.10.1
No comments:
Post a Comment