Commit 2140456b authored by Vitaly Lipatov's avatar Vitaly Lipatov

replace DEFAULTARCH with BUILDARCH

parent dc817e16
......@@ -66,7 +66,7 @@ fi
DISTCXX="$DISTCC"
if [ "$DEFAULTARCH" = "x86_64" ] ; then
if [ "$BUILDARCH" = "x86_64" ] ; then
export DISTCC_HOSTS="$(extra_to_pump_mode $DISTCC_64_HOSTS)"
DISTCC_THREADS=$DISTCC_64_THREADS
else
......@@ -76,7 +76,7 @@ else
DISTCXX="$DISTCXX g++ -m32"
fi
echo "Build on '$DISTCC_HOSTS' hosts ($DEFAULTARCH arch)"
echo "Build on '$DISTCC_HOSTS' hosts ($BUILDARCH arch)"
if [ -z "$DISTCC_HOSTS" ] || [ -z "$DISTCC_THREADS" ] ; then
fatal "Set DISTCC_??_HOSTS and DISTCC_??_THREADS var in config"
......
......@@ -82,7 +82,7 @@ set_binaryrepo $MENV
# use MENV
prepare_aptconfig
HASHERARG="$HASHERARG --apt-config=$OURAPTCONF --target $DEFAULTARCH --with-stuff"
HASHERARG="$HASHERARG --apt-config=$OURAPTCONF --target $BUILDARCH --with-stuff"
set_hasherdir
if [ -n "$TESTMODE" ] || [ -n "$AUTOMODE" ] ; then
......
......@@ -84,7 +84,7 @@ prepare_aptconfig
# FIXME: we override config value here?
# TODO: for add $LISTRPMARGS we need skip function for delete "our" params
# we do not need check cases for mount points, thanks ldv@
HASHERARG="--no-sisyphus-check=$HASHER_NOCHECK --apt-config=$OURAPTCONF --target $DEFAULTARCH $HASHERARG"
HASHERARG="--no-sisyphus-check=$HASHER_NOCHECK --apt-config=$OURAPTCONF --target $BUILDARCH $HASHERARG"
HASHERARG="--mountpoints=/proc,/dev/pts $HASHERARG"
BUILDARGS=""
......@@ -131,9 +131,9 @@ echo
if [ "$RESULT" = "0" -a -n "$TESTINSTALL" ] ; then
# test install (only for last package in list)
# some key for build hasher from scratch
echog "Find binary packages for '$(basename $LASTPACKAGE)' in $HASHERDIR/repo/$DEFAULTARCH/RPMS.hasher..."
BINPACKAGES=`get_binpkg_list $HASHERDIR/repo/$DEFAULTARCH/RPMS.hasher $LASTPACKAGE | grep -v debuginfo`
test -n "$BINPACKAGES" || fatal "Can't find binary packages for $LASTPACKAGE in `ls -l $HASHERDIR/repo/$DEFAULTARCH/RPMS.hasher`"
echog "Find binary packages for '$(basename $LASTPACKAGE)' in $HASHERDIR/repo/$BUILDARCH/RPMS.hasher..."
BINPACKAGES=`get_binpkg_list $HASHERDIR/repo/$BUILDARCH/RPMS.hasher $LASTPACKAGE | grep -v debuginfo`
test -n "$BINPACKAGES" || fatal "Can't find binary packages for $LASTPACKAGE in `ls -l $HASHERDIR/repo/$BUILDARCH/RPMS.hasher`"
echo "List: $BINPACKAGES"
echo
docmd $ETERBUILDBIN/loginhsh -a $MENVARG $BINPACKAGES
......
......@@ -95,7 +95,7 @@ if [ -n "$BUILDOPT" ] ; then
is_alt || fatal "Sorry, only ALT Linux rpm supports --short-circuit correctly"
for it in $BUILDOPT
do
uni_rpmbuild --commit $LISTNAMES -b$it $LISTRPMARGS --target $DEFAULTARCH --short-circuit
uni_rpmbuild --commit $LISTNAMES -b$it $LISTRPMARGS --target $BUILDARCH --short-circuit
done
exit 0
fi
......@@ -117,7 +117,7 @@ do
LOGFILE="$LOGDIR/`basename $NAMESRPMIN .src.rpm`$MENVARG.log"
echo "Build in native system" >$LOGFILE
rm -f $LOGFILE.failed
(uni_rpmbuild --commit $i -bb $LISTRPMARGS $NODEPS --target $DEFAULTARCH 2>&1 || touch $LOGFILE.failed) | tee -a $LOGFILE
(uni_rpmbuild --commit $i -bb $LISTRPMARGS $NODEPS --target $BUILDARCH 2>&1 || touch $LOGFILE.failed) | tee -a $LOGFILE
[ -r "$LOGFILE.failed" ] && RET=1 || RET=0
if [ "$RET" = "0" ] ; then
......
......@@ -91,10 +91,8 @@ if [ "$VENDOR" = "generic" ] ; then
%__subst 's|readlink -mv|realpath|g' libtool configure ltmain.sh"
fi
# FIXME HACK need only for wine on x86_64
#if [ "$DISTRSYS" = "Ubuntu" ] || [ "$DISTRSYS" = "Debian" ]; then
# FIXME: add BUILDARCH using
if echo $SPECNAME | grep -q wine ; then
# HACK need only for wine on x86_64
if [ "$BUILDARCH" = x86_64" ] && echo $SPECNAME | grep -q wine ; then
test -z "$VERBOSE" || echo "Add remove_optflags -m64"
ADDFIXCOMMAND="$ADDFIXCOMMAND
%remove_optflags -m64"
......
......@@ -91,7 +91,7 @@ echo "Prepare to unmets checking..."
# Prepare our confdir
prepare_aptconfig
TESTINGAPTCONF=$OURAPTCONF
echo "rpm file:$HASHERDIR/repo/ $DEFAULTARCH hasher" >>$OURSOURCES
echo "rpm file:$HASHERDIR/repo/ $BUILDARCH hasher" >>$OURSOURCES
make_ordinalbox
make_testingbox
......@@ -109,7 +109,7 @@ if [ ! -d "$SISYPHUSPATH" ] ; then
exit 1
fi
NEWPKGDIR=$HASHERDIR/repo/$DEFAULTARCH/RPMS.hasher/
NEWPKGDIR=$HASHERDIR/repo/$BUILDARCH/RPMS.hasher/
echo
echo "Compare requires between new packages and their Sisyphus version"
......
......@@ -17,11 +17,12 @@ fi
OURTMPDIR=$TMPDIR
[ -z "$OURTMPDIR" ] || [ -d "$OURTMPDIR" ] || OURTMPDIR=/tmp
# detect our arch
# current arch
SYSARCH=$(uname -m)
[ "$SYSARCH" = "x86_64" ] || SYSARCH=i586
[ -n "$DEFAULTARCH" ] || DEFAULTARCH=$SYSARCH
# set default target arch
[ -n "$BUILDARCH" ] || BUILDARCH=$SYSARCH
NICE="nice"
RPMBUILD=rpmbuild
......
......@@ -16,7 +16,7 @@ set_hasherdir()
# fatal "Possible HASHERBASEDIR is not set correctly. Please replace HASHERDIR with HASHERBASEDIR in the config file"
#fi
HASHERDIR=$HASHERBASEDIR$MENVARG
if [ "$DEFAULTARCH" = "x86_64" ] ; then
if [ "$BUILDARCH" = "x86_64" ] ; then
HASHERDIR="$HASHERDIR-64"
fi
}
......@@ -69,11 +69,11 @@ print_tmp_sourceslist()
grep "/sources.list" | sed -e 's|.*"\(.*\)".*|\1|g'`
fi
test -r "$SLIST" || fatal "'$SLIST' - sources.list path from $1 is missed"
if [ "$DEFAULTARCH" = "x86_64" ] ; then
cat "$SLIST" | sed -e "s|i[56]86|$DEFAULTARCH|g"
if [ "$BUILDARCH" = "x86_64" ] ; then
cat "$SLIST" | sed -e "s|i[56]86|$BUILDARCH|g"
else
# Note: drop biarch 32bit on real 32bit
cat "$SLIST" | sed -e "s|x86_64|$DEFAULTARCH|g" | grep -v "x86_32"
cat "$SLIST" | sed -e "s|x86_64|$BUILDARCH|g" | grep -v "x86_32"
fi
}
......
......@@ -40,7 +40,7 @@ tolocal_anyrepl()
fi
# Add hack for replace lib with lib64 on Mandriva
if [ "$VENDOR" = "mdv" ] && [ $DEFAULTARCH = "x86_64" ] ; then
if [ "$VENDOR" = "mdv" ] && [ $BUILDARCH = "x86_64" ] ; then
local NEWRESULT=`echo $GREP | sed -e "s|^lib\([^6]\)|lib64\1|g"`
[ "$NEWRESULT" = "$GREP" ] && return 1
ALTPKGNAME=$GREP
......@@ -101,7 +101,7 @@ internal_repl_list()
print_replbased_list()
{
local REPLBASE="$1"
if [ "$DEFAULTARCH" = "x86_64" ] ; then
if [ "$BUILDARCH" = "x86_64" ] ; then
internal_repl_list $REPLBASE .x86_64
fi
......
......@@ -49,7 +49,7 @@ build_rpms_name()
PKGARCH=$(cat $tmprpm | get_var "BuildArch")
if [ "$PKGARCH" != "noarch" ] ; then
PKGARCH=$DEFAULTARCH
PKGARCH=$BUILDARCH
fi
NAMERPMIN=$BASENAME-$VERSION-$RELEASE.$PKGARCH.rpm
NAMESRPMIN=$BASENAME-$VERSION-$RELEASE.src.rpm
......@@ -88,7 +88,7 @@ build_rpms_name_by_srpm()
PKGARCH=$(querypackage $SRPM ARCH)
# suggest target arch
if [ "$PKGARCH" != "noarch" ] ; then
PKGARCH=$DEFAULTARCH
PKGARCH=$BUILDARCH
fi
NAMERPMIN=$BASENAME-$VERSION-$RELEASE.$PKGARCH.rpm
NAMESRPMIN=$BASENAME-$VERSION-$RELEASE.src.rpm
......
......@@ -9,7 +9,7 @@ set_hasherdir
for i in `ls -1 $HASHERDIR/repo/SRPMS.hasher` ; do
echo "get for $i:"
LISTNAMES=`get_binpkg_list $HASHERDIR/repo/$DEFAULTARCH/RPMS.hasher $(basename $i)`
LISTNAMES=`get_binpkg_list $HASHERDIR/repo/$BUILDARCH/RPMS.hasher $(basename $i)`
echo $LISTNAMES
echo "without ext: $(drop_pkg_extensions $LISTNAMES)"
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment