diff --git a/webbuild/webbuild-cgi b/webbuild/webbuild-cgi index 9b6e777..01a0326 100755 --- a/webbuild/webbuild-cgi +++ b/webbuild/webbuild-cgi @@ -527,9 +527,17 @@ if [ "$REQUEST" = "rpmmanager" ]; then echo -n "" [ "$RPMMANAGERDIR" = "RPMSNOARCH" ] && SELECTED="selected=selected" || SELECTED= echo -n "" + if [ "${AUTOPORT_ARCH[$ENVIRONMENT]}" == "x86_64" ]; then + [ "$RPMMANAGERDIR" = "RPMS_i586" ] && SELECTED="selected=selected" || SELECTED= + echo -n "" + fi + if [ "${AUTOPORT_ARCH[$ENVIRONMENT]}" == "x86_64" -o "${AUTOPORT_ARCH[$ENVIRONMENT]}" == "i586" ]; then + [ "$RPMMANAGERDIR" = "RPMS_arm" ] && SELECTED="selected=selected" || SELECTED= + echo -n "" + fi [ "$RPMMANAGERDIR" = "SRPMS" ] && SELECTED="selected=selected" || SELECTED= echo -n "" - if [ -e $local_ftp/$REPOSITORY ]; then + if [ "$REPOSITORY" -a -e $local_ftp/$REPOSITORY ]; then [ "$RPMMANAGERDIR" = "REP_RPMS" ] && SELECTED="selected=selected" || SELECTED= echo -n "" [ "$RPMMANAGERDIR" = "REP_RPMSNOARCH" ] && SELECTED="selected=selected" || SELECTED= @@ -1421,17 +1429,22 @@ if [ "$MAINTAINERMODE" != "true" ]; then echo -n "`cgi_encodevar " job in current environment?"`\"" echo -n "); class=redbutton $DISABLED>" # autodist send - [ ! "$USER_ALLREPOSITORIES" ] && DISABLED="disabled=disabled" || DISABLED= + if [ "$SPECVAR_CHECK_NOAUTOBUILDREQ" ]; then + HREFADD="disabled=disabled title=\"WARNING: fix specfile build requirements before you can send the package\"" + else + HREFADD= + fi echo -n ""`\"+getSelectedValueById('autodistjobs')+\"`cgi_encodevar " job to "`\"+" - echo -n "getSelectedValueById('sendrepository')+\"`cgi_encodevar "?"`\"); class=redbutton $DISABLED>" + echo -n "getSelectedValueById('sendrepository')+\"`cgi_encodevar "?"`\"); class=redbutton $HREFADD>" # autodist schedule echo -n "
New version: " echo -n "$AUTODISTPKGS $SPECVAR_Version-$SPECVAR_Release from `print_environment_descr $ENVIRONMENT` to $SENDREPOSITORY\" STIME=`date +%s`" + if [ $RET -eq 0 ]; then + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist -v -s $autodistjobs --repository ${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]} --server $SENDREPOSITORY --arch $AUTODISTARCH --user $USER $AUTODISTADD -- --colors web" + RET=$? + [ $RET -eq 0 ] && social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"sent $AUTODISTPKGS $SPECVAR_Version-$SPECVAR_Release from `print_environment_descr $ENVIRONMENT` to $SENDREPOSITORY\" STIME=`date +%s`" + fi ;; "autoport") if [ "$AUTOPORTPACKAGE" ]; then if [ "$AUTOPORTRELEASEREPOSITORY" ]; then @@ -2060,12 +2083,11 @@ $PACKAGE.spec $RPMFORCEADD && $AUTOSPEC_CMD -u $PACKAGE -a10 --server $SENDREPOS "consolecmd") if [ ! "$SPECVAR_BUILDDIR" ]; then echo "ERROR: BUILDDIR is undefined" RET=1 - else + else $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cd $SPECVAR_RPMBUILDDIR/$SPECVAR_BUILDDIR && bash -c '$CONSOLECMD'" RET=$? - [ $RET -eq 0 ] && RET=-1 - fi - ;; + fi + ;; "configurehelp") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cd $SPECVAR_RPMBUILDDIR/$SPECVAR_BUILDDIR && ./configure --help || ./waf configure --help" RET=$? [ $RET -eq 0 ] && RET=-1 ;; diff --git a/webbuild/webbuild-functions-private b/webbuild/webbuild-functions-private index 50dfa40..cf77eb8 100644 --- a/webbuild/webbuild-functions-private +++ b/webbuild/webbuild-functions-private @@ -163,7 +163,7 @@ function print_editorcontrols() { echo -n "" + echo -n "
" echo -n "recreate SRPM" # specfile update - echo -n "
" + echo -n "
" echo -n "" - echo -n " (automatic or specify new version:" - echo -n " or new release changelog:" - echo -n ")" - echo -n "" - echo -n "" - echo -n "
" + echo -n " " + echo -n " " + echo -n "" + echo -n "
" # close tag echo -n "]]>" @@ -324,6 +322,12 @@ function resolve_rpmmanagerdir() { RPMSNOARCH) rpmmanagerdir=../RPMS/noarch rpmmanagermask="*.noarch.rpm" rpmmanagermode=environment ;; + RPMS_arm) rpmmanagerdir=../RPMS/arm + rpmmanagermask="*.arm.rpm" + rpmmanagermode=environment ;; + RPMS_i586) rpmmanagerdir=../RPMS/i586 + rpmmanagermask="*.i586.rpm" + rpmmanagermode=environment ;; *) rpmmanagerdir=../RPMS/$RPMMANAGERARCH rpmmanagermask="*.$RPMMANAGERARCH.rpm" rpmmanagermode=environment ;;