MRW
http://piratenpartei.ch

Piratenpartei Zürich
PC 85-112704-0

Der Politnetz Auftritt von Marc Wäckerlin Im Politnetz unterstützen

Bootstrap openSUSE into Chroot

Bootstrapping a running openSUSE into a chroot was simpler than I thought:

  1. Just get the basic RPMs for glibc, bash, rpm and zypper including all dependencies.
  2. Unpack them into a chroot-path using cpio
  3. Tweak the minimal system in /etc, add root to /etc/passwd and copy resolv.conf for internet access
  4. bind /dev from the real system to the chroot
  5. Chroot into that minimal installation and install all the RPM packages once again, this time correctly using rpm; that fixes the RPM database and runs the necessary scripts
  6. Add an archive to zypper
  7. Done, now chroot to the path and install whatever you need using zypper

Here's my bash script that I run on Ubuntu to bootstrap a basic openSUSE 11.4 from scratch:

#! /bin/bash -e
 
function error() {
    echo "**** ERROR aborted. Status of last operation: $?"
    if mount | grep -q ${ROOT}/dev; then
        echo "cleanup ${ROOT}/dev"
        sudo umount ${ROOT}/dev
    fi
    exit 1
}
trap error HUP INT QUIT TERM ERR
 
################################################################################
# CONFIGURATION you can overwrite any of the variables when you start the script
# e.g. HW="x86_64 noarch" VERSION=11.4 sudo susebootstrap.sh
 
# Setup OS sources
#
# VERSION: see http://download.opensuse.org/distribution/
VERSION=${VERSION:-"openSUSE-current"}
#
# HW: list of hardware subdirs in openSUSE, e.g. "x86_64 noarch"
HW=(${HW:-i686 i586 noarch})
#
# URL: where to download RPM packages from
URL=${URL:-http://download.opensuse.org/distribution/${VERSION}/repo/oss/suse}
 
# Setup installation pathes
#
# BASE: Base path to the chroots on your system
BASE=${BASE:-/var/chroot}
#
# OS: name of the OS, used for chroot pathname
OS=${OS:-opensuse}
#
# ROOT: Full path to the chroot directory
ROOT=${ROOT:-${BASE}/${OS}-${VERSION}-${HW[0]}}
#
# PACKAGES: Where to store package lists path+filename-prefix
PACKAGES=${PACKAGES:-${ROOT}/var/tmp/packages}
#
# RPMDIR: Where to store downloaded RPMs, relative to ${ROOT}
RPMDIR=${RPMDIR:-/var/tmp/rpms}
 
# Setup base packages and dependencies to install
#
# Dependencies, found out by try and error using "rpm -i"
GLIBCDEPS="filesystem"
BASHDEPS="libreadline6 libncurses5 terminfo-base"
RPMDEPS="libpopt0 liblua5_1 libselinux1 libcap2 libacl libbz2 zlib     \
         libelf1 liblzma5 libattr insserv sed fillup coreutils grep    \
         diffutils permissions perl info pam libpcre0 perl-base gdbm   \
         libzio libaudit1 libcrack2 libdb file cracklib libxcrypt      \
         cracklib-dict-full"
ZYPPERDEPS="procps libzypp libaugeas libgcc libstdc++ satsolver-tools  \
            util-linux libcurl4 libopenssl1 libexpat libproxy1 libxml2 \
            krb5 libidn libldap libssh2 libmodman libgconf libglib     \
            libcom_err2 keyutils-libs cyrus-sasl gpg2 libudev gzip     \
            bzip2 pwdutils pinentry dirmngr libadns libassuan          \
            libgcrypt libgpg-error libksba libpth libusb pam-modules   \
            libnscd libblkid libmount libuuid1 openssl                 \
            update-alternatives glib2-branding-openSUSE"
#
# RPMS: Base packages to install including dependencies from above
RPMS=${RPMS:-bash glibc rpm zypper $GLIBCDEPS $BASHDEPS $RPMDEPS $ZYPPERDEPS}
################################################################################
 
 
################################################################################
# Main Part
################################################################################
# 1. Download basic RPMs for glibc, bash, rpm, zypper and all dependencies
# 2. Unpack them into a chroot-path using cpio
# 3. Tweak the minimal system in /etc
# 4. Bind /dev from the real system to the chroot
# 5. Properly install all the RPM packages within chroot
# 6. Add an archive to zypper and setup hardware architecture
# 7. Done, now chroot to the path and install whatever you need using zypper
################################################################################
 
echo "Install ${OS} ${VERSION} for ${HW[0]} in ${ROOT}"
 
################################################################################
# Preparation of path for chroot and RPMs
test -d ${ROOT}${RPMDIR} || mkdir -p ${ROOT}${RPMDIR}
################################################################################
 
################################################################################
# For all hardware subdirs, get a list of available RPMs from internet
# stored in files ${PACKAGES}.<HARDWARE>
for h in ${HW[*]}; do
    wget -q -O - ${URL}/${h} 2>/dev/null \
        | sed -n 's/.*<a href="\(.*\.'${h}'\.rpm\)">.*/\1/p' \
        > ${PACKAGES}.${h}
done
################################################################################
 
################################################################################
# 1. Download basic RPMs for glibc, bash, rpm, zypper and all dependencies
 
# We know the logical package names, find matching RPM files on server
# PKGS: Will be filled with a list of RPM files to download and install
PKGS=""
for p in $RPMS; do # for all packages to instaöö
    for h in ${HW[*]}; do # for all available hardware subdirectories
        # find all packages that match the package we're looking for
        # but without "-devel" oder "-doc" packages
        if [ "${h}" = "x86_64" ]; then
            # in 64bit package lists, there are also 32bit compatibility
            # packages
            # we filter them out, we want a plain 64bit installation
            PKG=$(egrep '^'${p//+/\\+}'[-0-9_][-0-9_]' "${PACKAGES}.${h}" \
                | egrep -v -- '-devel-|32bit|-doc-' | sort)
        else
            # same as above, without filtering 32bit
            PKG=$(egrep '^'${p//+/\\+}'[-0-9_][-0-9_]' "${PACKAGES}.${h}" \
                | egrep -v -- '-devel-|-doc-' | sort)
        fi
        if [ -n "$PKG" ]; then # We've found at least one matching package
            for p2 in $PKG; do # for all RPM packages  we found
                # if not yet downloaded, download it now
                echo "   ... download $p2"
                test -f ${ROOT}${RPMDIR}/$p2 || \
                    wget -q -O ${ROOT}${RPMDIR}/$p2 ${URL}/${h}/$p2
                # append RPMs to the list of RPM files to install
                PKGS="$PKGS ${ROOT}${RPMDIR}/$p2"
            done
            break # take the first, no need to further scan hardware directories
        fi
    done
done
################################################################################
 
################################################################################
# 2. Unpack them into a chroot-path using cpio
 
# Extract all downloaded RPMS in the chroot directory
cd ${ROOT}
for p in $PKGS; do # for all downloaded RPM packages
    # just extract the file structure withing the RPM without running
    # pre-/post-install scripts
    # this is necessary for a minimal basic system to chroot in
    echo "   ... unpack $p"
    rpm2cpio $p | sudo cpio -dim --quiet
done
cd -
################################################################################
 
################################################################################
# 3. Tweak the minimal system in /etc
echo "   ... setup system"
 
# Do some system setup tweaks
#
# Create minimal /etc/passwd with user "root"
sudo bash -c "echo 'root:x:0:0:root:/root:/bin/bash' > ${ROOT}/etc/passwd"
#
# copy /etc/resolv.conf into chroot to be able to access internet
sudo cp /etc/resolv.conf ${ROOT}/etc/
 
################################################################################
# 4. Bind /dev from the real system to the chroot
 
# rebind host's /dev into chroot to be able to access hardware within chroot
# NOTE: this step must be repeated (or use "schroot")
sudo mount -o bind /dev ${ROOT}/dev
 
################################################################################
# 5. Properly install all the RPM packages within chroot
 
# now chroot into the newe system and call RPM on all donwloaded RPMs for
# a proper installation that executes triggers and maintains RPM database
echo "   ... install all RPMs"
sudo chroot ${ROOT} rpm -i ${RPMDIR}/*.rpm 2> /dev/null
 
################################################################################
# 6. Add an archive to zypper and setup hardware architecture
# add installation source as zypper repository
echo "   ... setup zypper"
sudo chroot ${ROOT} zypper -q ar ${URL} repo-oss
#
# setup hardware architecture in zypper, necessary if not same as in host
sudo perl -pi \
    -e 's#^\#? *arch = .*$#arch = '${HW[0]}'#g' \
    ${ROOT}/etc/zypp/zypp.conf
################################################################################
 
################################################################################
# Done - use your chroot, install more packages with zypper
################################################################################
 
################################################################################
# 7. Done, now chroot to the path and install whatever you need using ''zypper'
# on opensuse, install some basic packages
echo "   ... install more basic packages"
sudo chroot ${ROOT} zypper -q install aaa_base openSUSE-release
################################################################################
 
################################################################################
################################################################################
# cleanup: umount /dev
# NOTE: you must bind it again, if you want to chroot (or use "schroot")
echo "   ... cleanup"
sudo umount ${ROOT}/dev
################################################################################
 
echo "**** SUCCESS done."
echo
echo "########################################################################"
echo "Use your new chroot:"
echo " > sudo mount -o bind /dev ${ROOT}/dev"
echo " > sudo chroot ${ROOT}"
echo "   > [... work in your chroot, use zypper to install packages ...]"
echo "   > exit"
echo " > sudo umount ${ROOT}/dev"
echo "########################################################################"
echo "IMPORTANT NOTE:"
echo "  Don't forget to umount /dev and other binds before you remove"
echo "  the directory ${ROOT},"
echo "  or you'll loose"
echo "########################################################################"

Why Bootstrap an OS into a Chroot

The chroot helps you build openSUSE RPMs with the correct dependencies on another host system. Fo example I build openSUSE RPMs on Ubuntu within a chroot.

Why not use «mach» or «mock»

There are tools named mach and its unfriendly fork mock to make a chroot of a rpm-based distribution to build rpm packages inside a chroot. My only problem was, the're quite complex and did not work out of the box.- mock is not maintained in Ubuntu and has been dropped, while the packache mach in Ubuntu only provides old SuSE and Fedora releases, up to SuSE 9, but now when writing these lines, openSUSE 11.4 is the current release. So not useful for me and too complex to fix. That's why I started from scratch.

Fedora

The same trick should work on Fedora. I'll try this later and change the script so that Fedora will be supported too.

Working in the Chroot

This is an example session how I checkout and build my project within the chroot environment. I already calles sudo susebootstrap.sh which installed to /var/chroot/opensuse-openSUSE-current-i686:

> sudo mount -o bind /dev /var/chroot/opensuse-openSUSE-current-i686/dev
> sudo chroot /var/chroot/opensuse-openSUSE-current-i686

Now I am working within the chroot. Leave it ith extit or key ctrl+d. Don't forget to call sudo umount /var/chroot/opensuse-openSUSE-current-i686/dev when you finished.

Now I checkout and compile a project within the chroot:

> cd /var/tmp/
> zypper install subversion
> svn co https://dev.marc.waeckerlin.org/svn/libxml-cxx/trunk libxml-cxx
> cd libxml-cxx
> zypper install libcppunit-devel gcc-c++ doxygen graphviz texlive automake autoconf libtool make
> ./bootstrap.sh
> ./configure
> make
> make install

Example Installation Run

When I call the script, I get the following output:

> sudo susebootstrap.sh
Install opensuse openSUSE-current for i686 in /var/chroot/opensuse-openSUSE-current-i686
   ... download bash-4.1-20.25.1.i586.rpm
   ... download glibc-2.11.3-12.15.1.i686.rpm
   ... download rpm-4.8.0-27.1.i586.rpm
   ... download zypper-1.5.3-3.2.i586.rpm
   ... download filesystem-11.4-11.14.1.i586.rpm
   ... download libreadline6-6.1-18.25.1.i586.rpm
   ... download libncurses5-5.7-14.1.i586.rpm
   ... download terminfo-base-5.7-14.1.i586.rpm
   ... download libpopt0-1.16-4.1.i586.rpm
   ... download liblua5_1-5.1.4-18.3.i586.rpm
   ... download libselinux1-2.0.91-10.11.i586.rpm
   ... download libcap2-2.19-8.1.i586.rpm
   ... download libacl-2.2.48-12.1.i586.rpm
   ... download libbz2-1-1.0.6-6.11.i586.rpm
   ... download zlib-1.2.5-8.1.i586.rpm
   ... download libelf1-0.149-2.7.i586.rpm
   ... download liblzma5-5.0.0-13.1.i586.rpm
   ... download libattr-2.4.44-11.1.i586.rpm
   ... download insserv-1.14.0-20.21.1.i586.rpm
   ... download sed-4.2.1-2.1.i586.rpm
   ... download fillup-1.42-254.1.i586.rpm
   ... download coreutils-8.9-4.1.i586.rpm
   ... download grep-2.7-3.1.i586.rpm
   ... download diffutils-3.0-2.1.i586.rpm
   ... download permissions-2011.02.14.0908-2.1.i586.rpm
   ... download perl-5.12.3-11.14.1.i586.rpm
   ... download info-4.13a-14.1.i586.rpm
   ... download pam-1.1.3-4.7.1.i586.rpm
   ... download libpcre0-8.10-4.1.i586.rpm
   ... download perl-base-5.12.3-11.14.1.i586.rpm
   ... download gdbm-1.8.3-384.1.i586.rpm
   ... download libzio-0.99-11.1.i586.rpm
   ... download libaudit1-2.0.5-5.8.1.i586.rpm
   ... download libcrack2-2.8.18-6.1.i586.rpm
   ... download libdb-4_5-4.5.20-108.3.i586.rpm
   ... download libdb-4_8-4.8.30-2.4.i586.rpm
   ... download file-5.04-10.1.i586.rpm
   ... download cracklib-2.8.18-6.1.i586.rpm
   ... download libxcrypt-3.0.3-8.1.i586.rpm
   ... download cracklib-dict-full-2.8.12-50.1.i586.rpm
   ... download procps-3.2.8-26.4.i586.rpm
   ... download libzypp-8.12.1-3.3.i586.rpm
   ... download libaugeas0-0.7.4-3.1.i586.rpm
   ... download libgcc45-4.5.1_20101208-9.8.i586.rpm
   ... download libstdc++33-3.3.3-27.4.i586.rpm
   ... download libstdc++45-4.5.1_20101208-9.8.i586.rpm
   ... download satsolver-tools-0.16.1-4.7.1.i586.rpm
   ... download util-linux-2.19-3.6.1.i586.rpm
   ... download libcurl4-7.21.2-9.1.i586.rpm
   ... download libopenssl1_0_0-1.0.0c-17.1.i586.rpm
   ... download libexpat0-1.95.8-110.1.i586.rpm
   ... download libexpat1-2.0.1-101.1.i586.rpm
   ... download libproxy1-0.4.6-6.9.1.i586.rpm
   ... download libxml2-2.7.8-15.1.i586.rpm
   ... download krb5-1.8.3-15.1.i586.rpm
   ... download libidn-1.15-7.1.i586.rpm
   ... download libldap-2_4-2-2.4.23-10.1.i586.rpm
   ... download libssh2-1-1.2.7-3.1.i586.rpm
   ... download libmodman1-2.0.1-3.1.i586.rpm
   ... download libglib-2_0-0-2.28.0-3.6.1.i586.rpm
   ... download libcom_err2-1.41.14-5.1.i586.rpm
   ... download keyutils-libs-1.3-4.1.i586.rpm
   ... download cyrus-sasl-2.1.23-15.1.i586.rpm
   ... download gpg2-2.0.16-7.1.i586.rpm
   ... download libudev0-166-5.1.i586.rpm
   ... download gzip-1.4-4.11.i586.rpm
   ... download bzip2-1.0.6-6.11.i586.rpm
   ... download pwdutils-3.2.14-3.1.i586.rpm
   ... download pinentry-0.8.0-8.1.i586.rpm
   ... download dirmngr-1.1.0-4.1.i586.rpm
   ... download libadns1-1.4-86.1.i586.rpm
   ... download libassuan0-2.0.1-4.1.i586.rpm
   ... download libgcrypt11-1.4.6-3.1.i586.rpm
   ... download libgpg-error0-1.9-4.1.i586.rpm
   ... download libksba-1.1.0-4.1.i586.rpm
   ... download libpth20-2.0.7-124.1.i586.rpm
   ... download libusb-0_1-4-0.1.13-9.1.i586.rpm
   ... download libusb-1_0-0-1.0.8-4.1.i586.rpm
   ... download pam-modules-11.4-2.1.i586.rpm
   ... download libnscd-2.0.2-118.1.i586.rpm
   ... download libblkid1-2.19-3.6.1.i586.rpm
   ... download libmount1-2.19-3.6.1.i586.rpm
   ... download libuuid1-2.19-3.6.1.i586.rpm
   ... download openssl-1.0.0c-17.1.i586.rpm
   ... download update-alternatives-1.14.19-30.33.1.noarch.rpm
   ... download glib2-branding-openSUSE-11.4-4.2.noarch.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/bash-4.1-20.25.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/glibc-2.11.3-12.15.1.i686.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/rpm-4.8.0-27.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/zypper-1.5.3-3.2.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/filesystem-11.4-11.14.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libreadline6-6.1-18.25.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libncurses5-5.7-14.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/terminfo-base-5.7-14.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libpopt0-1.16-4.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/liblua5_1-5.1.4-18.3.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libselinux1-2.0.91-10.11.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libcap2-2.19-8.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libacl-2.2.48-12.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libbz2-1-1.0.6-6.11.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/zlib-1.2.5-8.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libelf1-0.149-2.7.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/liblzma5-5.0.0-13.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libattr-2.4.44-11.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/insserv-1.14.0-20.21.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/sed-4.2.1-2.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/fillup-1.42-254.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/coreutils-8.9-4.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/grep-2.7-3.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/diffutils-3.0-2.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/permissions-2011.02.14.0908-2.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/perl-5.12.3-11.14.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/info-4.13a-14.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/pam-1.1.3-4.7.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libpcre0-8.10-4.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/perl-base-5.12.3-11.14.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/gdbm-1.8.3-384.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libzio-0.99-11.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libaudit1-2.0.5-5.8.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libcrack2-2.8.18-6.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libdb-4_5-4.5.20-108.3.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libdb-4_8-4.8.30-2.4.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/file-5.04-10.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/cracklib-2.8.18-6.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libxcrypt-3.0.3-8.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/cracklib-dict-full-2.8.12-50.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/procps-3.2.8-26.4.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libzypp-8.12.1-3.3.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libaugeas0-0.7.4-3.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libgcc45-4.5.1_20101208-9.8.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libstdc++33-3.3.3-27.4.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libstdc++45-4.5.1_20101208-9.8.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/satsolver-tools-0.16.1-4.7.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/util-linux-2.19-3.6.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libcurl4-7.21.2-9.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libopenssl1_0_0-1.0.0c-17.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libexpat0-1.95.8-110.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libexpat1-2.0.1-101.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libproxy1-0.4.6-6.9.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libxml2-2.7.8-15.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/krb5-1.8.3-15.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libidn-1.15-7.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libldap-2_4-2-2.4.23-10.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libssh2-1-1.2.7-3.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libmodman1-2.0.1-3.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libglib-2_0-0-2.28.0-3.6.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libcom_err2-1.41.14-5.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/keyutils-libs-1.3-4.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/cyrus-sasl-2.1.23-15.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/gpg2-2.0.16-7.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libudev0-166-5.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/gzip-1.4-4.11.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/bzip2-1.0.6-6.11.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/pwdutils-3.2.14-3.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/pinentry-0.8.0-8.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/dirmngr-1.1.0-4.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libadns1-1.4-86.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libassuan0-2.0.1-4.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libgcrypt11-1.4.6-3.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libgpg-error0-1.9-4.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libksba-1.1.0-4.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libpth20-2.0.7-124.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libusb-0_1-4-0.1.13-9.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libusb-1_0-0-1.0.8-4.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/pam-modules-11.4-2.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libnscd-2.0.2-118.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libblkid1-2.19-3.6.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libmount1-2.19-3.6.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/libuuid1-2.19-3.6.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/openssl-1.0.0c-17.1.i586.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/update-alternatives-1.14.19-30.33.1.noarch.rpm
   ... unpack /var/chroot/opensuse-openSUSE-current-i686/var/tmp/rpms/glib2-branding-openSUSE-11.4-4.2.noarch.rpm
/home/marc/tmp/clean
   ... setup system
   ... install all RPMs
Updating /etc/sysconfig/security...
Updating /etc/sysconfig/services...
   ... setup zypper
   ... install more basic packages
 
New repository or package signing key received:
Key ID: B88B2FD43DBDC284
Key Name: openSUSE Project Signing Key <opensuse@opensuse.org>
Key Fingerprint: 22C07BA534178CD02EFE22AAB88B2FD43DBDC284
Key Created: Wed May  5 15:01:33 2010
Key Expires: Sun May  4 15:01:33 2014
Repository: repo-oss
 
Do you want to reject the key, trust temporarily, or trust always? [r/t/a/?] (r): 
The following NEW packages are going to be installed:
  aaa_base aaa_base-extras bundle-lang-common-ar cpio cron cronie dbus-1 findutils gawk iproute2 iptables klogd libcap-ng0 login logrotate mingetty ncurses-utils net-tools netcfg openSUSE-release openSUSE-release-ftp pkg-config postfix psmisc sysconfig sysvinit-tools udev 
 
The following recommended packages were automatically selected:
  aaa_base-extras bundle-lang-common-ar cron logrotate net-tools netcfg postfix udev 
 
The following packages are suggested, but will not be installed:
  java-1_6_0-openjdk mysql-community-server mysql-community-server-client 
 
27 new packages to install.
Overall download size: 4.6 MiB. After the operation, additional 13.7 MiB will be used.
Continue? [y/n/?] (y):    ... cleanup
**** SUCCESS done.
 
########################################################################
Use your new chroot:
 > sudo mount -o bind /dev /var/chroot/opensuse-openSUSE-current-i686/dev
 > sudo chroot /var/chroot/opensuse-openSUSE-current-i686
   > [... work in your chroot, use zypper to install packages ...]
   > exit
 > sudo umount /var/chroot/opensuse-openSUSE-current-i686/dev
########################################################################
IMPORTANT NOTE:
  Don't forget to umount /dev and other binds before you remove
  the directory /var/chroot/opensuse-openSUSE-current-i686,
  or you'll loose
########################################################################