Commit 3f4ebe4a authored by Vitaly Lipatov's avatar Vitaly Lipatov

optimization and fixes for LISTNAMES using and gear detecting

parent 9e64b394
...@@ -151,39 +151,40 @@ if [ -n "${DELETENOW}" ]; then ...@@ -151,39 +151,40 @@ if [ -n "${DELETENOW}" ]; then
exit 0 exit 0
fi fi
check_gear() # create tag according to package release
check_gear_and_tag()
{ {
local SPECDIR=$1
local GEARCTAG=gear-create-tag local GEARCTAG=gear-create-tag
# create tag according to package release
# workaround about spaces in LISTNAMES # set SPECDIR from LISTNAMES if empty
if [ -r "$(echo $LISTNAMES)" ] ; then if [ -r "$LISTNAMES" ] ; then
#echo wait SPECDIR from rpmbsh
#echo 1 $SPECDIR
[ -n "$SPECDIR" ] || SPECDIR=`dirname $LISTNAMES` [ -n "$SPECDIR" ] || SPECDIR=`dirname $LISTNAMES`
#echo 2 $SPECDIR
#pwd
fi fi
if is_gear $SPECDIR ; then if is_gear $SPECDIR ; then
# needed corrent user.name/user.email for get GPG id # needed corrent user.name/user.email for get GPG id
pushd $SPECDIR pushd $SPECDIR
$GEARCTAG --force $GEARCTAG --force
popd popd >/dev/null
# git push ? # git push ?
fi fi
} }
if [ -n "$SIGN" ]; then if [ -n "$SIGN" ]; then
release_check $LISTBUILT release_check $LISTBUILT
# workaround about spaces in LISTBUILT
if [ -r "$(echo $LISTBUILT)" ] ; then cd $RPMDIR/SRPMS
if [ -r "$LISTBUILT" ] ; then
echo if one spec, check gear echo if one spec, check gear
check_gear check_gear_and_tag $SPECDIR
fi fi
echog "Will try to sign follow packages with GPG: \$LISTBUILT" echog "Will try to sign follow packages with GPG: \$LISTBUILT"
cd $RPMDIR/SRPMS
# 1. only rpm command has --addsign 2. do 3 retries # 1. only rpm command has --addsign 2. do 3 retries
rpm --addsign $LISTBUILT || rpm --addsign $LISTBUILT || rpm --addsign $LISTBUILT rpm --addsign $LISTBUILT || rpm --addsign $LISTBUILT || rpm --addsign $LISTBUILT
RET=$? RET=$?
############################################ ############################################
echog "Changing permissions..." echog "Changing permissions..."
chmod 644 -- $LISTBUILT || fatal "can't chmod" chmod 644 -- $LISTBUILT || fatal "can't chmod"
......
...@@ -73,13 +73,8 @@ add_changelog_helper "- new version" $LISTNAMES ...@@ -73,13 +73,8 @@ add_changelog_helper "- new version" $LISTNAMES
pack_src_rpm $(echo $LISTRPMARGS | sed -e "s|-[suUic]||g") pack_src_rpm $(echo $LISTRPMARGS | sed -e "s|-[suUic]||g")
# Hack to pass SPECDIR to rpmbs # Hack to pass SPECDIR to rpmbs
# workaround about spaces in LISTNAMES if [ -r "$LISTNAMES" ] ; then
if [ -r "$(echo $LISTNAMES)" ] ; then
export SPECDIR=`dirname $LISTNAMES` export SPECDIR=`dirname $LISTNAMES`
#echo 0 $SPECDIR
if [ "$SPECDIR" = "." ] ; then
SPECDIR=$(pwd)
fi
fi fi
if [ -n "$REMOTEBUILD" ] ; then if [ -n "$REMOTEBUILD" ] ; 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