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