echo " --cleanafter | -ca - clean after build"
echo " --forceumount | -fu - force umount tmpfs"
echo " --debug - enable debug"
+ echo " --network - allow build to use networking"
echo " -a, -b, -c, -d, -e - select alternative chroot directory"
exit 1
}
CLEAN=false
CREATE=false
BUILD=false
+NETWORK=false
INSTALL=false
case "$0" in
--debug)
NODEBUG=false
;;
+ --network)
+ NETWORK=true
+ ;;
--forceumount | -fu)
FORCE_UMOUNT=true
;;
done
ignore \
- vserver-packages \
upstart\* \
+ upstart \
compat-\* \
systemd-init \
- kmod \
+ hhvm \
+ vserver-packages \
xorg-driver-video-fglrx\* xorg-driver-video-nvidia\* xorg-xserver-xgl-libGL \
+ xorg-driver-video-vboxvideo \
xorg-data-xbitmaps \
compat-gcc\* \
libpng1\* \
perl-Scalar-List-Utils \
perl-ExtUtils-Install \
phonon-backend-mplayer phonon-backend-vlc \
- icedtea6-jre java-sun-jre java5-sun-jre libgcj oracle-java7-jre \
+ libgcj libgcj-devel \
+ icedtea6-jre icedtea6-jdk \
+ icedtea7-jre icedtea7-jdk \
+ java-sun-jre java-sun-jdk \
+ java5-sun-jre java5-sun-jdk \
+ oracle-java7-jre oracle-java7-jdk \
gnome-menus \
gnome-speech-driver-festival gnome-speech-driver-speech-dispatcher
rpm --root=$CHDIR --initdb
fi
poldek --up || :
- poldek -O "ignore=$IGNORE" -u rpm-build pwdutils coreutils util-linux git-core gawk
+ poldek -O "ignore=$IGNORE" -u rpm-build pwdutils coreutils time util-linux git-core gawk
echo Poldek exit: $?
for DIR in dev proc sys; do
mount -o bind /$DIR $CHDIR/$DIR
done
- chroot $CHDIR groupadd $(id $USER -gn) -g$(id $USER -g)
+ # group 'users' may already exist, so ignore errors
+ chroot $CHDIR groupadd $(id $USER -gn) -g$(id $USER -g) || :
chroot $CHDIR useradd -m $USER -u$(id $USER -u) -g $(id $USER -gn)
# replicate files which already belong to $USER
{
$NODEBUG || set -x
mount -o bind $HOME/rpm $CHDIR/$CHHOME/rpm
-}
+ # ensure RPMS dir is available
+ chroot $CHDIR su $USER -c 'mkdir -p $(rpm -E %_rpmdir)'
+}
print_installed()
{
LAST_INSTALL=""
poldek_install()
{
- I="$1";
+ local I="$1" ret
# Nothing to install
[ -n "$I" ] || return 1
# Installing same packets second time
[ -n "$ret" ] && return $ret
# try harder
+ info "Poldek install failed, retry without ignore"
poldek -u $I && return 0
+ info "Poldek install failed, retry once more without ignore"
poldek -u $I && return 0
warn "Poldek:" "Could not install" $I
return 1
local func="$1"; shift
[ $cond = "false" ] && return
- $func "$@"
+ "$func" "$@"
[ $cond = "exit_after" ] && exit
}
maybe_call $INSTALL poldek_install "$*"
+maybe_call $NETWORK cp -bf /etc/resolv.conf $CHDIR/etc/
+
$BUILD || exit
if [ -p /tmp/fixfreq ]; then
fi
./findunusedbr -c $CHDIR $HOME/rpm/packages/$build_pkg/$build_pkg.spec
title "building"
- ./teeboth $buildlog chroot $CHDIR su $USER -c "$CHHOME/rpm/packages/builder -nn -bb $build_pkg $builder_options"
+ ./teeboth $buildlog chroot $CHDIR su $USER -c "$CHHOME/rpm/packages/builder -nn --define '_enable_debug_packages 0' -bb $build_pkg $builder_options"
ECODE=$?
if grep -q "error: Failed build dependencies:" $buildlog; then