Commit 8e971159 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmbsh: add -w support (use tarball for build in hsh)

parent f4d4b37a
......@@ -39,7 +39,7 @@ phelp()
echog " -e sign and run gear test only task girar build"
echog " -t make temporary commit before build (rpmbb like behavior)"
echog " -l lazy cleanup (clean before build, not after)"
echog " -w build with gear --hasher myhsh directly"
echog " -w use tar as immediate archive for myhsh"
echog " -b REPONAME binary repository name (p6, t6, c7, p8 and so on)"
}
......@@ -86,19 +86,13 @@ if estrlist has spec "$LISTNAMES" ; then
add_changelog_helper "- new version" $LISTNAMES
fi
if [ -n "$THOROUGH" ] ; then
# TODO: use gear --hasher for fix macro problem (https://bugzilla.altlinux.org/show_bug.cgi?id=31673)
docmd time gear --hasher -- $ETERBUILDBIN/myhsh $MENVARG $(drop_args "$LISTRPMARGS" f u a A) $LISTBUILT
exit
else
# We do not not pass args for myhsh here...
# FIXME: не обрабатывает два пропускаемых вместе параметра
pack_src_rpm $COMMIT $(drop_args "$LISTRPMARGS" s u c e l f a A)
# We do not not pass args for myhsh here...
# FIXME: не обрабатывает два пропускаемых вместе параметра
pack_src_rpm $COMMIT $(drop_args "$LISTRPMARGS" s u c e l f a A)
# build in hasher
docmd time $ETERBUILDBIN/myhsh $MENVARG $(drop_args "$LISTRPMARGS" f u a A) $LISTBUILT
RESULT=$?
fi
# build in hasher
docmd time $ETERBUILDBIN/myhsh $MENVARG $(drop_args "$LISTRPMARGS" f u a A) $LISTBUILT
RESULT=$?
# if ok and test install is requested, do it
if [ "$RESULT" = "0" ] && [ -n "$INSTALLPKG" ] ; then
......
......@@ -43,18 +43,28 @@ uni_rpmbuildsrpm()
# FIXME: use spec name as project name
GEARRULES=$(get_gear_rules_by_spec "$SPECNAME")
# build package without MENV checking
if true || [ "$MENV" = "SS" ] ; then
if [ -n "$THOROUGH" ] ; then
# https://bugzilla.altlinux.org/show_bug.cgi?id=31673
# FIXME: workaround for case when gear not supported normal name for --hasher output (out_file can be set only when run without args)
mkdir -p $RPMTOPDIR/SRPMS
NAMESRPMIN=${NAMESRPMIN/.src.rpm/.tar}
echog "Packing git repo with \$SPECNAME as \$NAMESRPMIN"
LANG=$NEULOCALE docmd $NICE $GEAR $COMMIT $GEARRULES $RPMTOPDIR/SRPMS/$NAMESRPMIN
else
# build package without MENV checking
#if true || [ "$MENV" = "SS" ] ; then
echog "Packing git repo with \$SPECNAME as \$NAMESRPMIN"
LANG=$NEULOCALE docmd $NICE $GEAR $COMMIT $GEARRULES --rpmbuild -- $RPMBUILD "$ONEPARAM" "$TWOPARAM" "$THRPARAM" "$@" || RET=$?
[ -z "$COMMANDAFTER" ] || docmd $COMMANDAFTER
else
fatal "Build backported src.rpm from git is unsupported now"
# else
# fatal "Build backported src.rpm from git is unsupported now"
# build src.rpm via hasher (on ALT)
# $NICE gear-hsh --build-args="-bs" --rpmbuild -- $COMMAND "$ONEPARAM" $@
#docmd $NICE $GEAR --hasher -- myhsh --build-prog=$ETERBUILDDIR/functions/rebuild $@ || RET=$?
fi
else
mkdir -p $RPMTOPDIR/BUILD $RPMTOPDIR/SRPMS
echog "Packing \$SPECNAME as \$NAMESRPMIN"
docmd $NICE $RPMBUILD "$ONEPARAM" "$TWOPARAM" "$THRPARAM" "$@" || RET=$?
fi
......@@ -101,7 +111,7 @@ do
# BASENAME, RELEASE, VERSION, NAMESRPMIN, NAMERPMIN
build_rpms_name "$i" $ARGS
if [ -n "${SIGN}" ]; then
echog "Try to packing \$NAMESRPMIN package for sign"
#echog "Try to packing \$NAMESRPMIN package for sign"
add_changelog $i
if [ $? = "0" ]; then
echog "Spec file \$i had not ChangeLog entry. It have added now, check it and enter your command again."
......@@ -109,8 +119,6 @@ do
sleep 10
exit 1
fi
else
echog "Just packing \$NAMESRPMIN"
fi
uni_rpmbuildsrpm $COMMIT $i -bs $ARGS $NODEPS --target $SYSARCH || fatal "Error with rpmbuild"
......
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