Commit 82ea757e authored by Vitaly Lipatov's avatar Vitaly Lipatov

use distr_vendor from git repo if possible

parent ed82d2cb
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
. `dirname $0`/../share/eterbuild/functions/common . `dirname $0`/../share/eterbuild/functions/common
load_mod repl rpm git load_mod repl rpm git
DISTRVERSION=`distr_vendor -v` DISTRVERSION=`$DISTRVENDOR -v`
altspec_to_local() altspec_to_local()
{ {
...@@ -69,8 +69,10 @@ cat $SPECNAME | grep rpm-build-compat &>/dev/null && BUILDREQ="" ...@@ -69,8 +69,10 @@ cat $SPECNAME | grep rpm-build-compat &>/dev/null && BUILDREQ=""
FIXMKTEMP="" FIXMKTEMP=""
DISTRSYS="$($DISTRVENDOR -d)"
# fix readlink -m, introduced by new libtool and missed in RHEL4 (replace with readlink -f) # fix readlink -m, introduced by new libtool and missed in RHEL4 (replace with readlink -f)
if [ "`distr_vendor -d`/$DISTRVERSION" = "ASPLinux/11.2" ] ; then if [ "$DISTRSYS/$DISTRVERSION" = "ASPLinux/11.2" ] ; then
test -z "$VERBOSE" || echo "Add subst readlink -m" test -z "$VERBOSE" || echo "Add subst readlink -m"
FIXMKTEMP="%__subst 's|readlink -m|readlink -f|g' libtool ltmain.sh" FIXMKTEMP="%__subst 's|readlink -m|readlink -f|g' libtool ltmain.sh"
fi fi
...@@ -81,7 +83,7 @@ if [ "$VENDOR" = "generic" ] ; then ...@@ -81,7 +83,7 @@ if [ "$VENDOR" = "generic" ] ; then
FIXMKTEMP="%__subst 's|readlink -mv|realpath|g' configure ltmain.sh" FIXMKTEMP="%__subst 's|readlink -mv|realpath|g' configure ltmain.sh"
fi fi
if [ "`distr_vendor -d`" = "Ubuntu" ] || [ "`distr_vendor -d`" = "Debian" ]; then if [ "$DISTRSYS" = "Ubuntu" ] || [ "$DISTRSYS" = "Debian" ]; then
test -z "$VERBOSE" || echo "Add remove_optflags -m64" test -z "$VERBOSE" || echo "Add remove_optflags -m64"
FIXMKTEMP="%remove_optflags -m64" FIXMKTEMP="%remove_optflags -m64"
fi fi
...@@ -243,12 +245,12 @@ if [ "$VENDOR" = "alt" ] ; then ...@@ -243,12 +245,12 @@ if [ "$VENDOR" = "alt" ] ; then
export USE_LEGACY_COMPRESSION=1 export USE_LEGACY_COMPRESSION=1
fi fi
subst "1i# This spec is backported to `distr_vendor -d` $DISTRVERSION automatically by rpmbph script. Do not edit it." $SPECNAME subst "1i# This spec is backported to $DISTRSYS $DISTRVERSION automatically by rpmbph script. Do not edit it." $SPECNAME
ENTRY="- backport to `distr_vendor -d` $DISTRVERSION (by rpmbph script)" ENTRY="- backport to $DISTRSYS $DISTRVERSION (by rpmbph script)"
DISTRARG="-$MDISTR" DISTRARG="-$MDISTR"
else else
subst "1i# This spec is autoported from ALT Linux Sisyphus to `distr_vendor -d` $DISTRVERSION automatically by rpmbph script. Do not edit it." $SPECNAME subst "1i# This spec is autoported from ALT Linux Sisyphus to $DISTRSYS $DISTRVERSION automatically by rpmbph script. Do not edit it." $SPECNAME
ENTRY="- autoport to `distr_vendor -d` $DISTRVERSION (by rpmbph script)" ENTRY="- autoport to $DISTRSYS $DISTRVERSION (by rpmbph script)"
export USE_VENDOR=$RPMVENDOR export USE_VENDOR=$RPMVENDOR
export USE_LEGACY_COMPRESSION=1 export USE_LEGACY_COMPRESSION=1
DISTRARG="" DISTRARG=""
......
...@@ -225,8 +225,7 @@ if [ -n "$INSTALLBINARY" ] ; then ...@@ -225,8 +225,7 @@ if [ -n "$INSTALLBINARY" ] ; then
# pack by LISTNAMES list # pack by LISTNAMES list
pack_src_rpm --commit $LISTRPMARGS pack_src_rpm --commit $LISTRPMARGS
LISTPKG=$(rpmquery --requires -p $LISTBUILT | clean_pkgreq | sed -e "s|rpm-build-altlinux-compat||g") LISTPKG=$(rpmquery --requires -p $LISTBUILT | clean_pkgreq | sed -e "s|rpm-build-altlinux-compat||g")
DISTRVENDOR=$(distr_vendor -d) CMD=$(get_install_package_command `$DISTRVENDOR -d` interactive)
CMD=$(get_install_package_command $DISTRVENDOR interactive)
echog "Running $SUDO $CMD $LISTPKG" echog "Running $SUDO $CMD $LISTPKG"
exec $SUDO $CMD $LISTPKG exec $SUDO $CMD $LISTPKG
fi fi
......
...@@ -18,6 +18,8 @@ set_eterbuilddir() ...@@ -18,6 +18,8 @@ set_eterbuilddir()
[ -n "$TOPDIR" ] || TOPDIR=../ [ -n "$TOPDIR" ] || TOPDIR=../
ETERBUILDDIR=$(realpath `dirname $0`/$TOPDIR/share/eterbuild) ETERBUILDDIR=$(realpath `dirname $0`/$TOPDIR/share/eterbuild)
ETERBUILDETC=$(realpath `dirname $0`/$TOPDIR/etc) ETERBUILDETC=$(realpath `dirname $0`/$TOPDIR/etc)
DISTRVENDOR=$(realpath `dirname $0`/$TOPDIR/../rpm-build-altlinux-compat/bin/distr_vendor)
[ -x "$DISTRVENDOR" ] || DISTRVENDOR=distr_vendor
if [ -r "$ETERBUILDETC/../AUTHORS" ] ; then if [ -r "$ETERBUILDETC/../AUTHORS" ] ; then
if [ -n "$VERBOSE" ] ; then if [ -n "$VERBOSE" ] ; then
echo "Note: run from source tree, datadir=$ETERBUILDDIR, sysconfdir=$ETERBUILDETC" echo "Note: run from source tree, datadir=$ETERBUILDDIR, sysconfdir=$ETERBUILDETC"
...@@ -136,11 +138,11 @@ fi ...@@ -136,11 +138,11 @@ fi
# Internal # Internal
detect_target_env() detect_target_env()
{ {
local DISTRNAME=`distr_vendor -e` local DISTRNAME=$($DISTRVENDOR -e)
MENVARG="" MENVARG=""
TARGET=`distr_vendor -p` TARGET=$($DISTRVENDOR -p)
VENDOR=`distr_vendor -s` VENDOR=$($DISTRVENDOR -s)
RPMVENDOR=`distr_vendor -n` RPMVENDOR=$($DISTRVENDOR -n)
if [ "$VENDOR" = "alt" ] && [ -n "$MENV" ] ; then if [ "$VENDOR" = "alt" ] && [ -n "$MENV" ] ; then
#[ -n "$APTCONF" ] && fatal "Internal error: APTCONF already defined as $APTCONF for $MENV" #[ -n "$APTCONF" ] && fatal "Internal error: APTCONF already defined as $APTCONF for $MENV"
......
...@@ -76,7 +76,7 @@ print_replbased_list() ...@@ -76,7 +76,7 @@ print_replbased_list()
{ {
local REPLBASE="$1" local REPLBASE="$1"
# VENDOR, TARGET is already defined in detect_target_env() func # VENDOR, TARGET is already defined in detect_target_env() func
[ -z "$DISTRVERSION" ] && DISTRVERSION=`distr_vendor -v` [ -z "$DISTRVERSION" ] && DISTRVERSION=`$($DISTRVENDOR -v)`
# separate checking for x86_64 # separate checking for x86_64
if [ $DEFAULTARCH = "x86_64" ] ; then if [ $DEFAULTARCH = "x86_64" ] ; then
......
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