# Fixes to make maemo's rootstrap usable for building Debian "etch" packages # # This documents the order of builds and installs necessary to convert # maemo-2.0-rootfs into a armel Debian etch package-building bootstrapping # system. # This system, "mxios" or "maemo-rootfs" runs under QEMU on xios.aleph1.co.uk # There is another slave system, "mpcore", that also builds, but whose /README # file just documents the install order for packages already built. # # Martin Guy , Oct-Dec 2006 # Snapshot from 30 December 2006 # Mug trap echo "This is not a shell script; it is a collection of personal notes." echo "You can follow it and copy and paste from it but you need to" echo "use your judgement and intelligence at every stage." exit 1 # You have to run this first bit all as root. # Down load & unpack rootfs from wget http://repository.maemo.org/stable/2.0/armel/Maemo_Dev_Platform_v2.0_armel-rootstrap.tgz mkdir ~/tftpboot/Maemo tar xzpf Maemo*tgz -C ~/tftpboot/Maemo # If you don't have it already, also get Angstrom to copy missing bits from wget http://www.angstrom-distribution.org/unstable/images/20060905/c7x0/Angstrom -bootstrap-image-test-20060904-c7x0.rootfs.tar.bz2 mkdir ~/tftpboot/Angstrom tar xjpf Angst*bz2 -C ~/tftpboot/Angstrom # Install missing commands necessary for boot: mount, grep, hostname, su, login # and while we're at it, egrep, fgrep, umount, find, xargs ( cd ~/tftpboot # Copy busybox and tinylogin multicall binaries in from Angstrom distro cp -p A*/bin/{busybox,tinylogin} M*/bin/ # version that we always want from these busyboxlinks=hostname tinyloginlinks="login su" # If you've upgraded your Angstrom version following my koen-fix-ipkg2 # document, then copy in the full versions, otherwise use busybox # Actually you need the full versions to build Debian packages. if -f A*/bin/grep.grep then cp -p A*/bin/grep.grep Maemo/bin/grep cp -p A*/bin/egrep.grep Maemo/bin/egrep cp -p A*/bin/fgrep.grep Maemo/bin/fgrep else busyboxlinks="$busyboxlinks grep egrep fgrep" fi if -f A*/bin/mount.util-linux then cp -p A*/bin/mount.util-linux Maemo/bin/mount cp -p A*/bin/umount.util-linux Maemo/bin/umount else busyboxlinks="$busyboxlinks mount umount" fi if -f A*/usr/bin/find then cp -p A*/usr/bin/{find,xargs} Maemo/usr/bin/ else busyboxlinks="$busyboxlinks find xargs" fi # More required stuff. Of these, busybox only provides diff if -f A*/usr/bin/diff then cp -p A*/usr/bin/{cmp,diff,diff3,sdiff} Maemo/usr/bin/ else busyboxlinks="$busyboxlinks diff" fi # put in links to busybox and tinylogin for anything else for a in $busyboxlinks do ln -s busybox Maemo/bin/$a done for a in $tinyloginlinks do ln -s tinylogin Maemo/bin/$a done ln -s ../bin/busybox Maemo/sbin/swapo{n,ff} # Populate /dev (cd A* && tar cf - dev) | (cd M* && tar xpf -) # Also create pseudo-random devices, otherwise sshd will not start mknod Maemo/dev/random c 1 8 mknod Maemo/dev/urandom c 1 9 # Enable login shell on console echo 'co:12345:respawn:/sbin/getty -L console 115200 vt100' >> Maemo/etc/inittab # Set a known root password sed -i '/^root:/s/:[^:]*:/:6knGHW8QndnrY:/' Maemo/etc/passwd # Give it a DNS resolver (the QEMU DNS proxy) echo nameserver 10.0.2.3 > Maemo/etc/resolv.conf # Install more missing software components. # debconf is installed but dpkg-{preconfigure,reconfigure} are missing # (they are just perl script, so copy them from the host Debian system) cp -p /usr/sbin/dpkg-*reconfigure M*/usr/sbin/ ) # Now boot qemu using oldABI-compatability-enabled kernel # (Maemo uses oldABI system calls) and with ~/tftpboot/Maemo as its nfsroot. # Install more missing software to make it work better apt-get install apt-utils # for package preconfig questions apt-get install fakeroot # Needed for user-mode dpkg-buildpackage # -------------end of Maemo repairs-------------- # snapshot Maemo1 is complete up to here (plus a couple of the perl # packages mentioned below) # Augmentation for Debian package building begins... # You only have to be root for system-installation things here. # The package building can all be done as a regular user. # Shorthands: # "build foo" means # apt-get source foo (from debian testing) # cd foo_* # dpkg-checkbuilddeps (should say nothing) # dpkg-buildpackage -rfakeroot # "install foo" means use dpkg -i foo_*.deb on the .debs that the # build stage produced (there should be no unsatisfied deps) # "install-indep foo" means go to packages.debian.org, find the testing # version of the architecture-independent ackage in question, # hit the "all" link, copy the link address from your favourite # mirror, then wget that on the host machine (Maemo has no wget # yet). On Maemo, dpkg -i foo_*.deb # # "# OK" means "I have done this" apt-get install bison flex texinfo # Required builddeps # We want apt-get to fetch etch sources, not maemo ones. sed -i '/^deb-src/s/^/# /' /etc/apt/sources.list cat >> /etc/apt/sources.list << EOF deb-src http://ftp.nl.debian.org/debian/ stable main deb-src http://ftp.nl.debian.org/debian/ testing main EOF chmod 644 /etc/apt/sources.list # Why was it root-only?! # How do I make apt-get prefer testing sources to stable ones? # Not sure if this works or not. Keep an eye on it. # echo 'APT::Default-Release "testing";' > /etc/apt/apt.conf # Package building is blocked cos maemo debhelper is only v4 # while things need v5 # debhelper depends on # po-debconf >=1.0 # arch-indep # depends on a newer intltool-debian, also arch-indep install-indep intltool-debian # OK install-indep po-debconf # OK install-indep debhelper # OK false && { # How to make debhelper package from source... # debhelper build fails because po4a is missing and not in the maemo repo # po4a build fails because libmodule-build-perl is missing and not provided # libmodule-build-perl build fails because libyaml-perl is missing # libyaml-perl OK! # libarchive-tar-perl OK! # libio-zlib-perl OK! # libcompress-zlib-perl OK! # libextutils-parsexs-perl (Debian depends, makefile optional) # build-depends on debhelper >= 5.0 and libextutils-cbuilder-perl # libextutils-cbuilder-perl # build-depends on libmodule-build-perl :( # libmodule-build-perl again # warns: t/xs............_build/compilet.c:1: warning: target CPU does not support interworking # install-depends on libextutils-parsexs-perl # OK, just crap on the installed version of debhelper and fiddle the version # (or better, just install the arch-indep Debian package) (cd debhelper* cp -p dh_* /usr/bin/ debian/rules version # makes Debian/Debhelper/Dh_Version.pm cp -p Debian/Debhelper/* /usr/share/perl5/Debian/Debhelper/ cp -p autoscripts/* /usr/share/debhelper/autoscripts/ # edit Maemo/var/lib/dpkg/status # /^Package: debhelper/ # /^Version:/s/4.2.32/5.0.37.3/ ) } install-indep debhelper # And some tools for comfort build nvi install nvi build telnet # For my "setdate" script. install telnet build less install less # All this package-building was done before I realised that many of these # packages were architecture-independent, so could be had from the standard # debian repo. Exceptions are: # libcompress-zlib-perl # liblocale-gettext-perl # libterm-readkey-perl # libtext-charwidth-perl # The rest can just be installed from regular _all.deb packages for a in \ libyaml-perl \ libcompress-zlib-perl libio-zlib-perl libarchive-tar-perl \ libmodule-build-perl \ libextutils-cbuilder-perl \ libextutils-parsexs-perl \ liblocale-gettext-perl libterm-readkey-perl \ libtext-charwidth-perl libtext-wrapi18n-perl \ libsgmls-perl do # On Debian host: apt-get source $a (cd $a-*; dpkg-buildpackage -rfakeroot) case "$a" in libmodule-build-perl) # Builds ok, but install-depends on parsexs dpkg -i --force-depends $a_*.deb *) dpkg -i $a_*.deb esac done # po4a # warns: # ERROR: Prerequisite Text::WrapI18N isn't installed # ERROR: Prerequisite SGMLS isn't installed # ERROR: Prerequisite Locale::gettext isn't installed # ERROR: Prerequisite Term::ReadKey isn't installed # runtime depends on # libsgmls-perl # arch-indep # perl-modules (installed in Maemo rootfs) # sp (installed in Maemo rootfs) # gettext (installed in Maemo rootfs) # recommends # liblocale-gettext-perl OK # libterm-readkey-perl OK # libtext-wrapi18n-perl # OK # depends: libtext-charwidth-perl # OK # OK # TODO: rebuild and install findutils, diffutils as packages # and update from maemo's util-linux to current debian one. # MIND YOU, Maemo's binutils is 2.16.91, which is probably recent enough. # binutils # builddeps dejagnu expect-tcl8.3 # dejagnu # not present but arch-indep. run-deps expect # expect # needs building, run-dep tcl8.4 build-dep: tcl8.4-dev tk8.4-dev # expect-tcl8.3 # build-dep: tk8.3-dev run-dep: tcl8.3 # tcl8.3-dev [source=tcl8.3] # tk8.3-dev [source=tk8.3] # build-dep: tcl8.3-dev build tcl8.3 # OK install tcl8.3 tcl8.3-dev # OK build tk8.3 # OK install tk8.3 tk8.3-dev # OK build expect-tcl8.3 # OK install expect-tcl8.3 # OK false && { # Unnecessary - expect-tcl8.3 is enough to install arch-indep dejagnu build tcl8.4 # OK install tcl8.4 tcl8.4-dev # OK build tk8.4 # OK install tk8.4 # OK apt-get remove tk8.3-dev # bcos it conflicts with tk8.4-dev install tk8.4-dev # OK build expect # TODO. Actually not necessary cos expect-tcl8.3 is sufficient. install expect # TODO. Actually not necessary cos expect-tcl8.3 is sufficient. } build binutils # OK! # glibc (2.3.6-ds1-4) # builddeps gcc-4.1 gawk quilt po-debconf >=1.0 # gcc-4.1 # gawk # quilt # arch-indep. run-dep gawk # gawk: build fails saying # bison -y awkgram.y # conflicts: 31 shift/reduce # make[3]: *** [awkgram.c] Broken pipe # make[3]: Leaving directory `/home/martin/gawk-3.1.5.dfsg' # make[2]: *** [all-recursive] Error 1 # Their bison (1.875d) creates y.tab.c ok but exits 141 instead of 0 # SIGPIPE is signal 13, and 141==128+13 # bison from etch (2.3.dfsg-4) has no unmet builddeps build bison # OK install bison # OK build gawk # OK install gawk # OK install-indep quilt # OK # The following files are broken in Maemo, being shell scripts whos interpreter # is /scratchbox/tools/bin/* # aclocal-1.[478] autoconf2.13 autoheader autoheader2.13 autom4te # automake-1.[478] autoreconf autoscan autoupdate # glibc-mkenums gtkdoc-* ifnames intltool-* # libtool [package libtool, source libtool. build-dep texi2html and gcj!!!] # mtrace [part of libc6-dev] # remsync [part of sharutils, which need compiling] # Hacky fix mkdir -p /scratchbox/tools/bin ln -s /usr/bin/perl /scratchbox/tools/bin/ apt-get remove autoconf2.13 # conflicts with autoconf-2.60* apt-get remove x-build install-indep autoconf # OK install-indep automake1.9 # OK install-indep intltool-debian # OK # glibc now just requires gcc-4.1 # gcc-4.1 # build-deps: # libc6-dev >= 2.3.6-7 # automake1.9 # OK # autoconf2.13 # OK (indep) # autogen # Builddeps: libguile-dev|guile-1.6-dev tetex-bin # guile-1.6 builddep:libreadline5-dev # readline5 builddeps lsb-release # dejagnu >= 1.4.3 # OK # gperf # Needs built. Builddep dh-buildinfo. OK # dh-buildinfo # OK (Indep) # libmpfr-dev # source: mpfr, build-dep: libgmp3-dev OK # gmp # OK # locales # From Maemo # realpath # Needs built - OK # chrpath # Needs built - OK # lsb-release # indep # depends on python; Maemo only has python2.4 and no "python" package. # "python" is indep and but conflicts with Maemo's. # Debian's "python" package is included in Maemo's python2.4 and # python2.4-dev packages. Fixup: # vi /var/lib/dpkg/status # /Package: python2.4$ # /^Version/ # oProvides: python # :wq # make >= 3.81 (maemo has 3.80) # Built OK # graphviz # Needs built, wants dozens of libraries # gsfonts-x11[indep] depends: # gsfonts[indep] depends defoma[maemo] # xfonts-utils -> lots of X librarie] # xutils -> lots of X libraries install-indep autoconf2.13 # OK apt-get install locales # OK install-indep dh-buildinfo # OK build gperf # OK install gperf # OK build realpath # OK install realpath # OK build chrpath # OK install chrpath # OK build make # Must be >=3.81 # failed trying to overwrite root-owned ../make*diff.gz # Moved it aside and copied it back read-write... build make # OK install make # OK build gmp # OK install libgmp3c2 libgmpxx4 libgmp3-dev # OK builf mpfr # OK install libmprf1 libmpfr-dev # OK # Maemo includes the contents of Debian packages "python" and "python-minimal" # in "python2.4" and "python2.4-dev". Fake up the missing required packages. sed -i '/^Package: python2.4$/a\ Provides: python ' /var/lib/dpkg/status install-indep --force-depends lsb-release # complained about "python" not being installed build readline5 apt-get remove libreadline4 # also wipes libreadline4-dev, osso-obc and sqlite install readline-common libreadline5 libreadline5-dev remove lsb-release # to stop apt-get refusing to work # python2.4 # builddep: # debiandoc-sgml [indep, depends lots of perl modules] # libi8n-langtags-perl [virtual, provided by perl-modules] # libroman-perl [indep, no depends, but barfs if installed] # python-docutils [indep, depends python-central python-roman] # python-central [indep] Fails to install bcos dependency "python" is unsatisfied. # python-roman [indep, depends python-central] # python-defaults builddeps are the same # python-defaults # We need to sort out the lack of a "python" package in Maemo. # wget # builddeps: groff libssl-dev # groff # builddeps: byacc gs netpbm psutils libxmu-dev libxaw7-dev # fine. Later... # For curiosity... # gcc-3.4 # flex >=2.5.33 (Maemo's is 2.5.31) # tetex-bin # help2man # lsb-release # graphviz # gsfonts-x11 -------- '/home/chroots/Maemo copy taken at this point' --------- # Fix timezone so that date setting with /usr/local/bin/setdate works. ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime # Set initial runlevel to the minimum services sed -i 's/^id:2:/id:5:/' /etc/inittab ln -s /proc/self/fd/0 /dev/stdin # Needed by bash configure script ln -s /proc/self/fd/1 /dev/stdout # ...and do the other 2 too... ln -s /proc/self/fd/2 /dev/stderr build byacc # For groff, but only 'cos it's easy... install byacc build guile-1.6 # builddep for autogen for gcc-4.1 install guile-1.6 guile-1.6-dev guile-1.6-libs libguile-ltdl-1 # the other binary package guile makes, libqthreads-12, is for alpha&386 build ed install ed # Install arch-indep proper versions of debconf. Maemo is missing some bits. install debconf debconf-english debconf-utils # OK # nbd source package for nbd-client binary package. # Need to edit debian/control to change nbd-client's arch list to "any" build nbd # OK install nbd-client # OK # meanwhile, get rid of last busybox dependencies build-install hostname # OK # proper swapon with -s is in package "mount" from source util-linux # util-linux builddeps libslang2-dev and libuuid etc # libuuid etc is in e2fsprogs # e2fsprogs builddeps dc libsepol1-dev libdevmapper-dev libselinux1-dev # dc is in bc; bc can be built. # libsepol1-dev is in libsepol; can be built # libdevmapper-dev is in devmapper; devmapper needs libselinux1-dev # libselinux1-dev is in libselinux; needs libsepol1-dev and python-all-dev # python-all-dev is indep but rundeps python python2.3 python2.4; # maybe python dep can be skipped... build bc # OK install dc bc # OK build libsepol install libsepol1 libsepol1-dev # libselinux refuses on unmet builddep python-all-dev. If we override this # the build fails: first warning "pyversions: command not found" # then failing "dpkg-shlibdeps: need at least one executable" # Nchip's one only builddeps on libc/2.3.6 instead of 2.3.5. Just do it... dpkg -i --force-depends nchip/libselinux*deb build-install psmisc # For killall &c # su, part of source package shadow, containing login etc # libpam0g-dev [in nchip's repo] # pam [builddeps: cracklib2-dev libdb4.3-dev libcap-dev] # linxml2-utils [implies a million things] # gnome-doc-utils [similarly] # apt [builddeps: libdb4.4-dev, part of db4] # db4 requires JAVA - needs disabling for armel in debian/{control,rules} # Tools for our autoscripting of the build process build dctrl-tool install dctrl-tools # Fix more crappy warts # sed is necessary for libtool. The rest occur elsewhere in /usr/bin/* # The programs that should be replaced are: # aclocal-1.4 aclocal-1.7 aclocal-1.8 automake-1.4 automake-1.7 automake-1.8 # glib-mkenums # gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mktmpl gtkdoc-scan gtkdoc-scangobj gtkdoc-scanobj # intltool-extract intltool-merge intltool-prepare intltool-update # libglade-convert libtool mtrace patch remsync # "patch" is particularly worrying as it is a binary file! # Fix more atrocious maemo brokenness for a in sed tar bash ed do ln -s /bin/$a /scratchbox/tools/bin/$a done for a in diff python xgettext msgmerge msgfmt do ln -s /usr/bin/$a /scratchbox/tools/bin/$a done # In fact, "patch" is so crucial that we should really rebuild it out of fear # === First bulk build 28-10-2006 === # Success: attr bash bzip2 cpio debianutils diffutils findutils gdbm grep gzip # iputils laptop-detect libcap libsigc++-1.2 libsigc++-2.0 libtasn1-3 # libusb logrotate lzo lzo2 mawk mktemp modutils netcat net-tools # openbsd-inet opencdk8 pcre3 popt procps sed sysklogd sysvinit # traceroute # Failure: cracklib libgpg-error openssl tar # "cracklib2" build fails because maemo cdbs is too old install-indep cdbs build cracklib # openssl requires modification to know about armel, then may work. # tar builds but its testsuite fails on many tests. Structure packing? # Now we can replace more busybox/Angstrom commands with full Debian versions install diff findutils grep # That only leaves login, su, mount, swapon, swapoff. # Install arch-indep builddeps install-indep dbs # Builddep of ruby1.8 # Install built builddeps install cpio install cracklib2 cracklib2-dev cracklib-runtime install libattr1 libattr1-dev install libcap1 libcap-dev install liblzo1 liblzo-dev install libopencdk8 libopencdk8-dev install libpcre3 libpcrecpp0 libpcre3-dev install libsigc++-2.0-0c2a libsigc++-2.0-dev install libtasn1-3 libtasn1-3-dev install libdb4.4 remove libosso-certman-dev remove libloudmouth1-dev remove libcst-dev remove libdb1-dev # conflicts with libdb4.4-dev install libdb4.4-dev # Copy in /usr/lib/dpkg/dpkg-gettext.pl # In Debian etch it is in the dpkg package, but is not in the maemo package. cp -p build/dpkg-1.13.22/scripts/dpkg-gettext.pl /usr/lib/dpkg/ # Now dpkg building only misses the (old version of) libselinux1-dev. (cd build/dpkg* && dpkg-buildpackage -rfakeroot -d) # === build run 2 === # Success: acl # Failure: apt # Install build deps that we have made install libacl1 libacl1-dev #----------backup taken to cluster--------- # Success: fribidi db4.2 db4.3 module-init-tools libtext-iconv-perl # Failure: libgpg-error0 openssl remove libdb4.4-dev # Conflicts libdb4.3-dev install libdb4.3 libdb4.3-dev # Needed by pam build pam install libfribidi0 libfribidi-dev # builddep of libnewt0.52 install-indep libpam-runtime # rundep of libpam0g # Needed to remove and rebuild pam after apt-get update cos version in # testing had increased, so their indep for our binaries was a different vn install libpam0g libpam0g-dev # builddeps remove automake1.4 # conflicts with build of coreutils # Edit coreutils*/debian/control to change builddep groff to groff-base build coreutils install coreutils # Replace maemo versions install-indep ucf # Was waiting for coreutils build zlib install zlib1g zlib1g-dev zlib-bin # Replace maemo version # Update some more maemo stuff with our debian packs install mktemp # debianutils pre-depends on this install debianutils build slang2 remove slang1-utf8-dev # conflicts with slang2-dev # remove slang1a-utf8 # osso util-linux pre-depends on slang1a-utf8 # Can't replace until util-linux is done install libslang2 libslang2-dev build texinfo install texinfo # Replace osso version build openssl install libssl0.9.8 libssl-dev # Replace osso version (0.9.7e...) # Modify debian/control to builddep on groff-base not groff build wget install wget # Make X11 headers available in the usual place ln -s /usr/X11R6/include/X11 /usr/include/X11 build icon install icon[ctx] # some of the builddeps for nowebm build -d gpm # ignore missing tetex-bin; gpm configures around it. install libgpmg1 libgpmg1-dev # last builddeps for ncurses build libgc install libgc1c2 libgc-dev # builddeps for w3m build w3m install w3m # builddep for base-passwd dpkg -i --force-depends sgmltools-lite # rundeps python build base-passwd... # Install arch-independent bits of tetex install-indep tex-common tetex-base build bluez-libs remove libbluetooth1-dev # conflicts with libbluetooth1-dev install libbluetooth2 install libbluetooth2-dev # builddep for python2.4 #----------- Backup taken 20061115 -------- # Chain of removal-deps to get rid of libssl-dev remove libfarsight0.1-dev remove clinkc-dev remove libcurl3-dev remove libssl-dev # conflicts as a builddep of openslp (?!?) build openslp install libslp1 libslp-dev # builddeps for openldap # Put builddeps back install libssl-dev # our openssl package install-mistral libcurl3-dev # from maemo repo build tix install tix tix-dev build ncurses # Update ncurses, add w5 install libncurses5 libncurses5-dev # 5.5-3 install-indep ncurses-base # 5.5-5 :-/ install libncursesw5 libncursesw5-dev # 5.5-3 build nano false && { # doesn't seem to be needed any more # Can't anyway. x11proto-* need x11-common from xorg install-indep x11proto-{core,input,print}-dev build libxau install libxau6 libxau-dev install-indep x11proto-xext-dev build -d libxp # ignore the age of libx11 install libxp6 libxp-dev } # add user and group wookey # Go for full python... build -d libtool # Ignore builddep gcj - it configures round it install libtool libltdl3 libltdl3-dev build blt install blt blt-dev # builddep of python2.3 remove libdb4.4-dev # conflicts with libdb4.3-dev install libdb4.3-dev # needed for python-2.3 remove expect-tcl8.3-dev # depends on tcl8.3-dev remove tcl8.3-dev # build-conflicts with python2.[34] install-indep libroman-perl libtext-format-perl install-indep sgmlspl install-indep debiandoc-sgml build python2.3... fails install-indep lsb-release # builddep of python2.4 remove python2.4-xml-dev python2.4-xml # conflict with build of python2.4 # Warns: while removing python2.4-xml: directory # `/usr/lib/python2.4/site-packag es/_xmlplus/*' not empty so not removed # These are just the *.pyc "compiled" versions of the library files. rm -r /usr/lib/python2.4/site-packages/_xmlplus build python2.4... fails build help2man install help2man # builddep of flex build flex # newer version wanted by gcc-3.4 install flex build autogen # Hacked to omit docs with DEB_BUILD_OPTIONS=nodoc install libopts25 libopts25-dev autogen # Update the versions of system tools that we have built yes | install sed mawk gzip libbz2-1.0 bzip2 bash base-passwd # Says: dpkg - warning: downgrading mawk from 1.3.3-11osso1 to 1.3.3-11 :-/ # install extra base packages omitted from maemo install bsdmainutils # maybe our binutils too... # devmapper fails because maemo's linux-kernel-headers 2.6.16.osso7 # are either not Debian ones or are too old # (linux/types.h fails to define __kernel_dev_t) # Modify and build Debian linux-kernel-headers 2.6.18, then: install linux-kernel-headers build devmapper install libdevmapper1.02 libdevmapper-dev build e2fsprogs # Disown maemo python2.4 of the /usr/bin/python symlink which will now # belong to python-minimal and python2.4-dev of the manual page # (which does not exist in the filesystem!) sed -i '/.usr.bin.python/d' /var/lib/dpkg/info/python2.4.list sed -i '/.usr.share.man.man1.python.1.gz/d' /var/lib/dpkg/info/python2.4-dev.list install-indep --force-depends python-minimal python # also complains about aged dpkg install-indep --force-depends python-all python-dev python-all-dev install-indep --force-depends python-support python-central build libselinux install libselinux1 libselinux1-dev # omitting python-selinux selinux-tools build xorg build libxft install ncurses-bin # for lsb-base install-indep lsb-base # for x11-common install --force-conflicts x11-common # Override the old age of libxft install libxft2 libxft-dev # and put the new libxft in place sh scripts/fix-lists # Fix broken entries in /var/lib/dpkg/info/*.list sh scripts/fix-md5sums # Fix broken entries in /var/lib/dpkg/info/*.md5sums # Failed attempt to update X screwed the existing X install binutils # Maemo's is 2.16.91; first working EABI one is .92 # shadow needs gnome-doc-utils needs python-libxml2. # maemo provides libxml2{,-dev,-utils} but not python-libxml2 build libxml2 # modified not to support python2.3 install libxml2{,-dev,-utils} python-libxml2 install-indep gnome-doc-utils build shadow # xsltproc segfaults # At this point, the maemo repository decide to delete "maemo-repository" and # "maemo-contrib-repository" toy packages. # Their postrm scripts wipe the contents of /etc/apt/sources.list and # the removal itself fails. Henceforth, every time you use apt-get it does the # same thing. To get round this, restore the contents of sources.list and edit # the two files /var/lib/dpkg/info/maemo-*repository.postrm to replace the line: # cat /etc/apt/sources.list | grep -v -e "[deb|deb-src] $REPOSITORY" > /etc/apt/so urces.list # with the two lines: # a=`cat /etc/apt/sources.list | grep -v -e "[deb|deb-src] $REPOSITORY"` # echo "$a" > /etc/apt/sources.list # then dpkg -r maemo-repository maemo-contrib-repository, restore the contents # of sources.list again and run apt-get update. build e2fsprogs # fails on missing -lpthread remove autoconf2.13 # Conflicts with build of newt build newt # Hack debian/rules to set PYVERS=2.4 build linuxdoc-tools # ignoring missiing groff and tetex works ok install linuxdoc-tools # for console-tools and iptables build console-tools modulo groff install-nchip libselinux1{,-dev} # Our lib fails to make e2fsck-static build e2fsprogs patch and build libxslt # Patched to only build installed pyversions install libxslt1.1 libxslt1-dev xsltproc # Maemo xsltproc is broken install libblkid1 libblkid-dev libcomerr2 comerr-dev libss2 ss-dev install libuuid1 uuid-dev e2fslibs e2fslibs-dev install e2fsprogs # predepends on e2fslibs #install e2fsck-static # Not so great, since it binds to old abi syscalls install libselinux1{,-dev} # nchip's lacks selinux_check_passwd_access() build shadow # with new xsltproc build util-linux install-indep x11proto-xf86vidmode-dev # for some sublibrary of mesa ## buiddeps for groff, not necessary for bootstrapping # build libpaper # for gs and psutils # build psutils # Speed hacks and fix weirdness cat >> /etc/fstab << EOF none /var/tmp tmpfs defaults 0 0 EOF mkdir /usr/tmp chmod 1777 /tmp /usr/tmp # /tmp was 1757 in group root (!) # special bootstrapping build ignoring gs netpbm psutils libxmu-dev libxaw7-dev DEB_BUILD_OPTIONS=no-groff-x11 build -d groff install groff-base groff # Make /etc/nbd-client automount swap and connect to 2GB partition mknod /dev/nbd0 b 43 0 mknod /dev/nbd1 b 43 1 cat >> /etc/fstab << EOF #/dev/nbd0 none swap defaults 0 0 Is activated by /etc/init.d/nbd-client /dev/nbd1 /home/martin/nbd ext2 defaults,noauto,user,exec,suid 0 0 EOF cat > /etc/nbd-client << __EOF__ # Configuration file read by /etc/init.d/nbd-client at boot time. # # NBD_TYPE is one of: # s Swap # f Filesystem (fsck and mount at boot) # r Raw (enable but do nothing) NBD_DEVICE[0]="/dev/nbd0" NBD_HOST[0]=xios NBD_PORT[0]=2090 NBD_TYPE[0]=s NBD_DEVICE[1]="/dev/nbd1" NBD_HOST[1]=xios NBD_PORT[1]=2092 NBD_TYPE[1]=f __EOF__ /etc/init.d/nbd-client start # Build deps for cyrus-sasl2 build opie krb5 install libopie-dev install libkrb53 libkadm55 libkrb5-dev # To be able to hangup-proof the builds build screen install screen chgrp utmp /var/run # Funny. mxios was already with this mode. chmod 775 /var/run build util-linux install-indep tzdata # required by util-linux timezone=Europe/London echo $timezone > /etc/timezone cp /usr/share/zoneinfo/$timezone /etc/localtime # Agree to replace /etc/init.d/hwclock.sh echo y | install util-linux bsdutils mount remove slang1a-utf8 # osso util-linux predepended on this build shadow install libpam-modules # rundep of login and passwd install login passwd # That finally replaces all commands provided by "tinylogin" and "busybox" rm /bin/{busybox,tinylogin} build perl # perl-modules is indep, but perl and perl-modules must be installed as a pair. # libperl-dev was not installed in Maemo but is a builddep of libldap-2.3-0 install perl-base install(-indep) perl-modules perl install libperl5.8 libperl-dev build fakeroot # needed updated perl-modules remove fakeroot-net # replace nasty osso version install fakeroot build eperl # needed libperl-dev install eperl # needed by tetex-bin (one day...) install libkrb5-dev # needed by postgresql-8.1 (it was removed cos it # build-conflicted with something) build postgresql-8.1 # libpq is wanted to build libsasl2 install libpq4 libpq-dev # More stuff we can do that was wanted by other things # stuff to build gs, groff etc build libpaper # for psutils, gs &c build netpbm-free # for groff build libgcrypt11 install libgcrypt11 libgcrypt11-dev build gnutls13 install libgnutls{13,-dev} # Stop it moaning about unverified packages install-indep debian-keyring install libpaper{1,-dev} # required to build psutils build psutils install psutils # required to build full groff install libnetpbm10 netpbm # required to build full groff # Make a loop node for XFS attribute testing mknod /dev/loop0 b 7 0 # Install new modified libattr1 with XFS syscall patch install libattr1{,-dev} attr # Update old and scratchbox-dependent versions of things install-indep autotools-dev automake1.7 automake1.8 automake1.9 install-indep autoconf # update from 2.60 to 2.61 install-indep intltool gtk-doc-tools #----------- Backup taken 20061218 -------- build glib-2.0 patch sharutils build -d gs-gpl build glib2.0 install patch sharutils # Can't install libglib2.0-0 libglib2.0-dev cos they rundep libpango1.0-0, and # pango1.0 builddeps libx11-dev (>= 2:1.0.0) libxrender-dev (>= 1:0.9.0.2-2) # libglib2.0-dev (>= 2.10.0) libcairo2-dev (>= 1.2.2) dpkg-dev (>= 1.13.19) # At this point, filesystem corruption screws /var/lib/dpkg/info/ ... # reinstalled all affected packages. :-( # Install our stripped-down gs (without opengl support) install libnewt0.52 # required by whiptail install whiptail # required by defoma # Say yes: maemo's /etc/defoma/loc-cset.data is corrupt, containing # "Romania", "Italish" and "Lithanian" echo y | install-indep defoma # used by gs*. # Maemo's "defoma" just says "(This script does nothing.)" Great. install gs-gpl gs gs-common gsfonts # Make login records work touch /var/log/wtmp /var/run/utmp chgrp utmp /var/log/wtmp /var/run/utmp chmod 644 /var/log/wtmp /var/run/utmp build m4 # updated version is required to build libiodbc2 install m4 # Now we have gnutls we can build lynx and thus ntp for ntpdate. build lynx install lynx built ntp install ntpdate ntp /etc/init.d/ntp start # use ntpdate to keep clock in sync # More little luxuries install iputils-ping remove autoconf2.13 # Conflicts with build of cyrus-sasl2 remove libdb4.4-dev # Conflicts with libdb4.2-dev install libdb4.2 libdb4.2-dev # Builddep of cyrus-sasl2 # Circumvent circular dependencies: # - build cyrus-sasl2 without LDAP support and install libsasl2-dev # - build openldap2 against the cut-down libsasl2 and install libldap2-dev # - rebuild and install cyrus-sasl2 with LDAP support # Patch cyrus-sasl2*/debian/rules to implement DEB_BUILD_OPTIONS, then: DEB_BUILD_OPTIONS='no-sql no-ldap' build -d cyrus-sasl2 install libsasl2{,-dev} install autoconf2.13 # builddep of openldap2 # Remove sql support from openldap2, then build openldap2 install libldap2{,-dev} remove autoconf2.13 # again! DEB_BUILD_OPTIONS='no-sql' build -d cyrus-sasl2 install libsasl2{,-dev} build -d openldap2.3 # Now we can build gnupg, which needed libldap2-dev build gnupg remove osso-gnupg install gnupg gpgv # osso's libaudiofile-dev has a duff entry in aclocal so replace it build audiofile install libaudiofile{0,-dev}