"
+ echo -n "
"
echo -n "RPM manager for
$environment_descr environment
"
- echo -n "
"
+
+ # select rpm manager resource directory to display
+ echo "
"
+
+ # multiselect
+ echo -n "
"
+ echo -n "
"
echo -n "
"
echo -n "
"
@@ -491,6 +562,7 @@ if [ "$REQUEST" = "rpmmanager" ]; then
echo -n "p=getCheckedValuesByName('rpmmanagercheckbox');"
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&"
echo -n "RPMMANAGERPACKAGES=\"+encodeURIComponent(p)+\"&"
+ echo -n "RPMMANAGERPACKAGES=\"+encodeURIComponent(p)+\"&"
echo -n "RPMMANAGERFORCE=\"+getElementById('rpmmanagerforce').checked+\"&"
echo -n "REQUEST=rpmmanagerinstall\""
echo -n ",\"`cgi_encodevar "Install
"`\"+p+"
@@ -505,9 +577,10 @@ if [ "$REQUEST" = "rpmmanager" ]; then
echo -n "REQUEST=rpmmanagerupgrade\""
echo -n ",\"`cgi_encodevar "Upgrade "`\"+p+"
echo -n "\"`cgi_encodevar " in $environment_descr environment?"`\""
- echo -n ");>"
+ echo -n ");> "
fi
+ # rpm manager close link
echo -n "
CLOSE"
echo "]]>"
exit
@@ -719,7 +792,7 @@ else
[ "$STATE_AUTODISTCURRENT" = "1" ] && AUTOUPDATEFILE=$BUILDLOGDIR/autoupdate-current || AUTOUPDATEFILE=$BUILDLOGDIR/autoupdate-last
while read line; do
set -- $line
- if [ "$3" != "ok" ]; then
+ if [ "$3" != "ok" -a "$3" != "skipped" ]; then
if [ "$REQUEST" != "skip" ]; then
[ "$PACKAGE" = "$1" ] && SELECTED="selected=selected" || SELECTED=
else
@@ -787,17 +860,22 @@ if [ "$MAINTAINERMODE" = "true" -o ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then
#(getElementById('package').selectedIndex);>"
echo "
"
SRPMBUTTONDISABLED="disabled=disabled"
- if [ $local_ftp/$REPOSITORY/SRPMS.base -nt $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY ]; then
- ls $local_ftp/$REPOSITORY/SRPMS.base/*.src.rpm | sort -f > $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY
+ if [ -e $local_ftp/$REPOSITORY ]; then
+ if [ $local_ftp/$REPOSITORY/SRPMS.base -nt $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY ]; then
+ ls $local_ftp/$REPOSITORY/SRPMS.base/*.src.rpm | sort -f > $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY
+ fi
+ else
+ curl $REPS_BASE_URL/$REPOSITORY/SRPMS.base/ | grep .src.rpm | \
+ sed "s|.*\.src\.rpm\">\(.*\).*|\1|" | sort -f > $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY
fi
while read f; do
- [ -r $f ] || continue
+# [ -r $f ] || continue
pkgname=`basename $f`
- pkgname=${pkgname/.src.rpm}
+ pkgname=${pkgname%.src.rpm}
pkgrel=${pkgname/*-}
- pkgname=${pkgname/-$pkgrel}
+ pkgname=${pkgname%-$pkgrel}
pkgver=${pkgname/*-}
- pkgname=${pkgname/-$pkgver}
+ pkgname=${pkgname%-$pkgver}
if [ "$PACKAGE" = "$pkgname" ]; then
SELECTED="selected=\"selected\""
SRPMBUTTONDISABLED=
@@ -843,7 +921,7 @@ if [ "$MAINTAINERMODE" = "true" -o ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then
done
echo -n ""
echo -n " version:
"
- echo -n " branch:
"
+ echo -n " branch/tag:
"
echo -n "
$PACKAGE new package in
`print_environment_descr $ENVIRONMENT` environment\" STIME=`date +%s`"
- echo "
HINT: don't forget to add build requirements after successful build! Edit specfile and check recreate SRPM before sending the package."
+ # prepare
+ $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "rpmbuild -bp $PACKAGE.spec --nodeps"
+ RET=$?
+ if [ $RET -eq 0 ]; then
+ REQUEST_NEXT="showbuilddocs"
+ fi
+ #echo "
HINT: don't forget to add build requirements after successful build! Edit specfile and check recreate SRPM before sending the package."
}
else
echo "ERROR: both source archive URL and name are needed."
@@ -949,7 +1033,7 @@ if [ "$REQUEST" = "prepare" -o "$REQUEST" = "updatespec" -o "$REQUEST" = "speccr
autodistjobs="$AUTODISTJOB"
fi
[ "$REPOSITORY" ] && REPOSITORYADD="--repository $REPOSITORY" || REPOSITORYADD="--repository ${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]}"
- $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist -v -p $autodistjobs $REPOSITORYADD --arch $AUTODISTARCH $AUTODISTADD"
+ $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist -v -p $autodistjobs $REPOSITORYADD --arch $AUTODISTARCH --user $USER $AUTODISTADD"
RET=$?
;;
"autodistupdate") [ "$AUTODISTFORCE" = "true" ] && AUTODISTADD="--force" || AUTODISTADD=
@@ -966,7 +1050,7 @@ if [ "$REQUEST" = "prepare" -o "$REQUEST" = "updatespec" -o "$REQUEST" = "speccr
autodistjobs="$AUTODISTJOB"
fi
[ "$REPOSITORY" ] && REPOSITORYADD="--repository $REPOSITORY" || REPOSITORYADD="--repository ${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]}"
- $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist -v -u $autodistjobs $REPOSITORYADD --arch $AUTODISTARCH $AUTODISTADD"
+ $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist -v -u $autodistjobs $REPOSITORYADD --arch $AUTODISTARCH --user $USER $AUTODISTADD"
RET=$?
;;
"addpkgnote") echo "`date +%s` $USER $ENVIRONMENT $PKGNOTE" >> $WEBBUILD_STATEDIR/notes/$PACKAGE.notes; RET=$? ;;
@@ -1072,7 +1156,7 @@ if [ "$REQUEST" = "edit" -o "$REQUEST" = "reloadspec" -o "$REQUEST" = "switchmai
fi
fi
fi
- REQUEST=
+ REQUEST=$REQUEST_NEXT
fi
# operation panel
@@ -1289,7 +1373,8 @@ if [ "$MAINTAINERMODE" != "true" ]; then
echo -n "
$PACKAGE package in
"`\"+p+\"`cgi_encodevar " with current specfile changes?"`\"); class=redbutton>"
@@ -1304,7 +1389,7 @@ if [ "$MAINTAINERMODE" != "true" ]; then
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=autospecupdatescheck&"
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue()));>"
# unpack
- echo -n "
"
# build
@@ -1412,7 +1497,7 @@ if [ "$MAINTAINERMODE" != "true" ]; then
patchname=${f/*\/}
patchname=${patchname/.patch}
patchname=${patchname/$PACKAGE-}
- echo -n "
"
+ echo -n "
"
done
echo -n ""
# list build dir files
@@ -1473,7 +1558,7 @@ fi
echo -n "
Write a message to all developers:
"
-echo -n "