Gentoo Build Environment on the NAS
From NAS-2000.org
This HowTo will explain how i managed to update the gentoo build environment
Before you update, install the buildroot as described here: http://www.nas-2000.org/mwiki/index.php?title=Compile_Programs_on_the_NAS
Note: Unpacking the "stage3-armv4l-2005.1.tar.bz2" seems not to be possible on the NAS. I used a Live Linux CD with the NAS connected via USB.
Use this manual on your own risk! There are no guaranties!
Contents |
[edit] Ready To Run
for an updated ready to run environment: http://nas-2000.org/download/build-root/
Remember to change the /etc/resolve.conf file !
Again, use on your own risk !
[edit] Backup the Build Environment
To backup, connect the NAS via USB: tar -cjpvf gentoo_buildenv_`date +%Y%m%d`.tbz2 ./gentoo
[edit] Start Update Process
Please be aware updating will take a long time, so i installed "screen" (see below). Now i can close the ssh connection, shutdown my computer and reconnect the next morning ;-)
BTW: Without updating the build environment it seems not to be possible to install "vim". Installing "ccache" worked for me.
after i installed the buildroot i got this message:
# emerge --sync * An update to portage is available. It is _highly_ recommended * that you update portage now, before any other packages are updated. * Please do so and then update ALL of your configuration files.
[edit] Update Portage
i tried to update portage:
# emerge sys-apps/portage Calculating dependencies \!!! Cannot resolve a virtual package name to an ebuild. !!! This is a bug, please report it. (virtual/libiconv-0)
i found: http://www.gentoo.org/proj/en/portage/doc/manually-fixing-portage.xml
here is a short version:
# wget -P /usr/portage/distfiles http://distfiles.gentoo.org/distfiles/portage-2.1.1.tar.bz2 # cd /root # mkdir portage-recover # cd portage-recover # tar xfj /usr/portage/distfiles/portage-2.1.1.tar.bz2 # cd /root/portage-recover/portage-2.1.1 # cp -R pym bin /usr/lib/portage/ # rm -f /usr/lib/portage/bin/sed
now:
# emerge --metadata !!! Problem with sandbox binary. Disabling... !!! Problem with sandbox binary. Disabling... >>> Updating Portage cache: 100%
to fix the sandbox error i tried:
# emerge -av sandbox
success :-)
# emerge -av sys-apps/portage These are the packages that would be merged, in order: Calculating dependencies... done! [blocks B ] <dev-lang/python-2.3.6-r2 (is blocking app-admin/python-updater-0.2)
[edit] Update Python
i found: http://home.leo.org/~loescher/gentoo.html
# quickpkg =dev-lang/python-2.3.5 * Building package for python-2.3.5 ... [ ok ] * Packages now in /usr/portage/packages: * python-2.3.5: 6.5M # emerge --nodeps -avt =dev-lang/python-2.4.4-r6 # emerge -pC python # emerge -aC =dev-lang/python-2.3.5
[edit] Install Screen
now compile "screen", this will allow you to reconnect to a session
#USE="-pam" emerge -av screen #mount -t devpts none /dev/pts/
the next step will take about 15 hours ...
#screen emerge -avt python-updater
[edit] Install strace
install strace (for tracing)
#screen emerge -avt strace
[edit] Sync Build Environment
create "rsync_excludes" again ...
#cd /etc/portage #touch rsync_excludes #emerge --sync ** Skipping packages. Run 'fixpackages' or set it in FEATURES to fix the tbz2's in the packages directory. Note: This can take a very long time. * IMPORTANT: 11 config files in '/etc' need updating. * See the CONFIGURATION FILES section of the emerge * man page to learn how to update config files.
and:
#etc-update
will fix 5 of 11 errors ... till now i did not try to merge the remaining 6 erros ...
[edit] Install vim
now you can install "vim"
#screen emerge -avt vim