[Exherbo-dev] unnatended wget, update and deploy images

Vasiliy G Tolstov v.tolstov at selfip.ru
Thu Dec 9 09:22:13 GMT 2010


Hello. I'm try to build images for Xen, based on tar ball archives. But
if i do it with following scrip, paludis cannot be updated:





#!/bin/bash

export LC_ALL=C

ROOT=$1
ARCH=$2

cd "${ROOT}"

if [ "x${ARCH}" == "x64" -o "x${ARCH}" == "xx86_64" ]; then
  wget http://dev.exherbo.org/stages/exherbo-amd64-current.tar.xz
else
  wget http://dev.exherbo.org/stages/exherbo-x86-current.tar.xz
fi

unxz -c exherbo*xz | tar xpf -

rm exherbo*xz

mount -o rbind /dev ${ROOT}/dev/
mount -o bind /sys ${ROOT}/sys/
mount -t proc none ${ROOT}/proc/

grep -v rootfs /proc/mounts > ${ROOT}/etc/mtab

cat > "${ROOT}/etc/resolv.conf" <<EOF
nameserver 77.221.141.148
EOF

#grep -v rootfs /proc/mounts > "${ROOT}/etc/mtab"

cat > "${ROOT}/install" <<EOF
#!/bin/bash

source /etc/profile

mkdir -p /var/cache/ccache

declare -x
CONFIG_PROTECT_MASK="/lib64/udev/rules.d /etc/ca-certificates.conf"
declare -x CVS_RSH="ssh"
declare -x DISPLAY=":0.0"
declare -x EDITOR="/usr/bin/vim"
declare -x GDK_USE_XFT="1"
declare -x HOME="/root"
declare -x INFOPATH="/usr/share/info"
declare -x LANG="en_GB.utf8"
declare -x LDPATH="/usr/local/lib"
declare -x LESS="-R -M --shift 5"
declare -x LOGNAME="root"
declare -x
LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:"
declare -x MANPATH="/usr/local/share/man:/usr/share/man"
declare -x OLDPWD
declare -x PAGER="/usr/bin/less"
declare -x
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin"
declare -x PWD="/"
declare -x SHELL="/bin/bash"
declare -x SHLVL="2"
declare -x TERM="xterm"
declare -x USER="root"

cave resolve -x1 paludis || exit
cave sync

#cd /usr/src
#tar xjf linux-2.6.36.tar.bz2
#ln -sf linux-2.6.36 linux;
#cd linux
#zcat /proc/config.gz > .config
#make oldconfig
#make prepare


#make all  modules_install install

cat > "/etc/paludis/options.conf" <<REOF
*/* build_options: jobs=3 -recommended_tests -split
*/* -bash-completion -tcpd
*/* systemd udev dbus caps threads curl idn ipv6 fontconfig truetype gmp
pcre acl xattr
*/* LINGUAS: ru
sys-apps/paludis -bash-completion -pbin search-index xml
net-misc/curl ares
REOF


cave resolve world -cx

cave resolve -x sys-apps/systemd

echo buildbot.clodo.ru > /etc/hostname

ln -sf /proc/mounts /etc/mtab

localedef -i en_US -f ISO-8859-1 en_US
localedef -i en_US -f UTF-8 en_US.UTF-8
localedef -i ru_RU -f UTF-8 ru_RU.UTF-8

cave resolve -x grub
EOF

chmod +x  "${ROOT}/install"

env -i TERM=$TERM SHELL=/bin/bash HOME=$HOME chroot "${ROOT}" /install

mkdir -p "${ROOT}/boot/grub"

cat > "${ROOT}/boot/grub/grub.cfg" <<EOF
set timeout=10
set default=0
menuentry "Exherbo" {
        set root=(hd0,0)
        linux /boot/vmlinuz root=/dev/xvda1
}
EOF












--2010-12-09 12:11:35--
http://dev.exherbo.org/stages/exherbo-amd64-current.tar.xz
Resolving dev.exherbo.org (dev.exherbo.org)... 78.47.197.147
Connecting to dev.exherbo.org (dev.exherbo.org)|78.47.197.147|:80...
connected.
HTTP request sent, awaiting response... 200 OK
Length: 132227644 (126M) [application/x-tar]
Saving to: `exherbo-amd64-current.tar.xz'

100%[=====================================================================================================================================================================>] 132,227,644  569K/s   in 3m 53s  

2010-12-09 12:15:28 (555 KB/s) - `exherbo-amd64-current.tar.xz' saved
[132227644/132227644]

Resolving: cave at 1291886202: [WARNING repository.names_cache.unversioned]
In thread ID '19332':
  ... In program cave resolve -x1 paludis:
  ... When adding targets from commandline:
  ... When parsing user package dep spec 'paludis':
  ... When parsing generic package dep spec 'paludis':
  ... When disambiguating package name 'paludis':
  ... When finding all versions in some arbitrary order from packages
matching */paludis with filter all matches filtered through all matches
filtered through packages matching */*:
  ... When using name cache at '/var/cache/paludis/names/arbor':
  ... Names cache for 'arbor' has no version information, so cannot be
used. Either it was generated using an older Paludis version or it has
not yet been generated. Perhaps you need to regenerate the cache using
'paludis --regenerate-installed-cache' or 'paludis
--regenerate-installable-cache'?
Done: 298 steps, 77 metadata (77 arbor)                

These are the actions I will take, in order:

r   sys-apps/paludis:0::arbor scm to ::installed replacing scm
    bash-completion -cran -doc -gemcutter -pbin -pink -python -ruby
-search-index vim-syntax -xml -zsh-completion build_options:
recommended_tests split strip jobs=2 -trace -preserve_work
    Reasons: target

Total: 1 reinstalls

Executing pretend actions: 1 of 1

1 of 1: Starting fetch for sys-apps/paludis-scm:0::arbor...


Done fetch for sys-apps/paludis-scm:0::arbor


1 of 1: Starting install to / for sys-apps/paludis-scm:0::arbor
replacing scm:0::installed...


Output from installing sys-apps/paludis-scm:0::arbor to ::installed
replacing scm:0::installed:

=== Running ebuild phase killold as root:root...
=== Starting builtin_killold
=== Done builtin_killold
=== Completed ebuild phase killold
=== Running ebuild phases initmisc saveenv as
paludisbuild:paludisbuild...
=== Starting builtin_initmisc
=== Done builtin_initmisc
=== Starting builtin_saveenv
=== Done builtin_saveenv
=== Completed ebuild phases initmisc saveenv
=== Running ebuild phases loadenv fetch_extra as
paludisbuild:paludisbuild...
=== Starting builtin_loadenv
=== Done builtin_loadenv
=== Starting src_fetch_extra
git clone --bare
git://git.pioto.org/paludis /var/cache/paludis/distfiles/scm/paludis
Cloning into bare repository /var/cache/paludis/distfiles/scm/paludis...
remote: Counting objects: 77353, done.
remote: Compressing objects: 100% (11711/11711), done.
remote: Total 77353 (delta 65763), reused 77123 (delta 65580)
Receiving objects: 100% (77353/77353), 15.54 MiB | 273 KiB/s, done.
Resolving deltas: 100% (65763/65763), done.
git --git-dir=/var/cache/paludis/distfiles/scm/paludis config
remote.origin.url git://git.pioto.org/paludis
git --git-dir=/var/cache/paludis/distfiles/scm/paludis gc --auto
=== Done src_fetch_extra
=== Completed ebuild phases loadenv fetch_extra
=== Running ebuild phase tidyup as root:root...
=== Starting builtin_tidyup
=== Done builtin_tidyup
=== Completed ebuild phase tidyup
rm -fr /var/tmp/paludis/build/sys-apps-paludis-scm-fetch_extra
=== Running ebuild phase killold as root:root...
=== Starting builtin_killold
=== Done builtin_killold
=== Completed ebuild phase killold
=== Running ebuild phases init saveenv as paludisbuild:paludisbuild...
=== Starting builtin_init
=== Done builtin_init
=== Starting builtin_saveenv
=== Done builtin_saveenv
=== Completed ebuild phases init saveenv
=== Running ebuild phases loadenv setup saveenv as root:root...
=== Starting builtin_loadenv
=== Done builtin_loadenv
=== Starting pkg_setup
=== Done pkg_setup
=== Starting builtin_saveenv
=== Done builtin_saveenv
=== Completed ebuild phases loadenv setup saveenv
=== Running ebuild phases loadenv unpack saveenv as
paludisbuild:paludisbuild...
=== Starting builtin_loadenv
=== Done builtin_loadenv
=== Starting src_unpack
git clone -s
-n /var/cache/paludis/distfiles/scm/paludis /var/tmp/paludis/build/sys-apps-paludis-scm/work/paludis-scm
Cloning
into /var/tmp/paludis/build/sys-apps-paludis-scm/work/paludis-scm...
done.
git
--git-dir=/var/tmp/paludis/build/sys-apps-paludis-scm/work/paludis-scm/.git --work-tree=/var/tmp/paludis/build/sys-apps-paludis-scm/work/paludis-scm checkout -f --
sydbox at 1291886349: Access Violation!
sydbox at 1291886349: Child Process ID: 3853
sydbox at 1291886349: Child
CWD: /var/tmp/paludis/build/sys-apps-paludis-scm/work
sydbox at 1291886349: Last Exec: execve("/usr/bin/git", ["clone", "-s",
"-n", "/var/cache/paludis/distfiles/scm/paludis",
"/var/tmp/paludis/build/sys-apps-paludis-scm/work/paludis-scm",
"/var/tmp/paludis/build/sys-apps-paludis-scm/work/paludis-scm"])
sydbox at 1291886349: Reason: connect{family=AF_INET addr=77.221.141.148
port=53}
sydbox at 1291886349: Access Violation!
sydbox at 1291886349: Child Process ID: 3853
sydbox at 1291886349: Child
CWD: /var/tmp/paludis/build/sys-apps-paludis-scm/work
sydbox at 1291886349: Last Exec: execve("/usr/bin/git", ["clone", "-s",
"-n", "/var/cache/paludis/distfiles/scm/paludis",
"/var/tmp/paludis/build/sys-apps-paludis-scm/work/paludis-scm",
"/var/tmp/paludis/build/sys-apps-paludis-scm/work/paludis-scm"])
sydbox at 1291886349: Reason: connect{family=AF_INET addr=77.221.141.148
port=53}
=== Done src_unpack
=== Starting builtin_saveenv
=== Done builtin_saveenv
=== Completed ebuild phases loadenv unpack saveenv
=== Running ebuild phases loadenv prepare saveenv as
paludisbuild:paludisbuild...
=== Starting builtin_loadenv
=== Done builtin_loadenv
=== Starting src_prepare
>>> m4 -I. -I.. -I../.. -E paludis/Makefile.am.m4 > paludis/Makefile.am
>>> m4 -I. -I.. -I../.. -E paludis/paludis.hh.m4 > paludis/paludis.hh
>>> m4 -I. -I.. -I../.. -E paludis/util/util.hh.m4 >
paludis/util/util.hh
>>> m4 -I. -I.. -I../.. -E paludis/util/Makefile.am.m4 >
paludis/util/Makefile.am
>>> m4 -I. -I.. -I../.. -E hooks/Makefile.am.m4 > hooks/Makefile.am
>>> mkdir -p config
>>> libtoolize --copy --force --automake
>>> aclocal-1.11
>>> autoheader
>>> autoconf
>>> automake-1.11 -a --copy
configure.ac:78: installing `config/config.guess'
configure.ac:78: installing `config/config.sub'
configure.ac:25: installing `config/install-sh'
configure.ac:25: installing `config/missing'
doc/api/cplusplus/examples/Makefile.am: installing `config/depcomp'
=== Done src_prepare
=== Starting builtin_saveenv
=== Done builtin_saveenv
=== Completed ebuild phases loadenv prepare saveenv
=== Running ebuild phases loadenv configure saveenv as
paludisbuild:paludisbuild...
=== Starting builtin_loadenv
=== Done builtin_loadenv
=== Starting src_configure
econf:
updating /var/tmp/paludis/build/sys-apps-paludis-scm/work/paludis-scm/config/config.guess with /usr/share/gnuconfig/config.guess
econf:
updating /var/tmp/paludis/build/sys-apps-paludis-scm/work/paludis-scm/config/config.sub with /usr/share/gnuconfig/config.sub
./configure --prefix=/usr --host=x86_64-pc-linux-gnu
--build=x86_64-pc-linux-gnu --mandir=/usr/share/man
--infodir=/usr/share/info --datadir=/usr/share
--docdir=/usr/share/doc/paludis-scm --sysconfdir=/etc
--localstatedir=/var/lib --disable-dependency-tracking
--disable-silent-rules --enable-fast-install --libdir=/usr/lib64
--disable-doxygen --disable-pbins --disable-pink --disable-python
--disable-ruby --disable-search-index --enable-vim --disable-xml
--with-vim-install-dir=/usr/share/vim/vimfiles --enable-visibility
--with-clients=default,accerso,adjutrix,cave,importare,inquisitio,instruo,paludis,reconcilio --with-environments=default --with-repositories=default,accounts,repository --with-default-distribution=exherbo --with-config-framework=eclectic
configure: WARNING: unrecognized options: --disable-silent-rules
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for git head... 0.56.0-10-gba814b0
checking for slot... 0.57_gba814b0
checking whether we're building shared libaries... 
checking whether we're building static libaries... no
checking whether the C++ compiler works... no
configure: error: in
`/var/tmp/paludis/build/sys-apps-paludis-scm/work/paludis-scm':
configure: error: C++ compiler cannot create executables
See `config.log' for more details

Error:
  * In program cave perform install --hooks --managed-output
--output-exclusivity with-others =sys-apps/paludis-scm:0::arbor
--destination installed --replacing =sys-apps/paludis-scm:0::installed
--x-of-y 1 of 1:
  * When installing 'sys-apps/paludis-scm:0::arbor' replacing
{ 'sys-apps/paludis-scm:0::installed' }:
  * When running an ebuild command on 'sys-apps/paludis-scm:0::arbor':
  * Install failed for
'sys-apps/paludis-scm:0::arbor' (paludis::ActionFailedError)


!!! ERROR in sys-apps/paludis-scm::arbor:
!!! In econf at line 1210
!!! econf failed

!!! Call stack:
!!!    * paludis_die_unless_nonfatal_func
(/var/tmp/paludis/build/sys-apps-paludis-scm/temp/loadsaveenv:1920)
!!!    * econf
(/var/tmp/paludis/build/sys-apps-paludis-scm/temp/loadsaveenv:1210)
!!!    * src_configure
(/var/tmp/paludis/build/sys-apps-paludis-scm/temp/loadsaveenv:2847)
!!!    * exheres_internal_configure
(/usr/libexec/paludis/exheres-0/src_configure.bash:60)
!!!    * ebuild_main (/usr/libexec/paludis/ebuild.bash:647)
!!!    * main (/usr/libexec/paludis/ebuild.bash:675)

diefunc: making ebuild PID 4490 exit with error
die trap: exiting with error.
** (sydbox:4465 at 1291886368) Message: eldest child 4490 exited with
return code 250

Failed install to / for sys-apps/paludis-scm:0::arbor replacing
scm:0::installed


 * Checking whether the GNU info directory needs updating...


-- 
Vasiliy G Tolstov <v.tolstov at selfip.ru>
Selfip.Ru




More information about the Exherbo-dev mailing list