diff --git a/webbuild/webbuild-cgi b/webbuild/webbuild-cgi index 4b67cde..4b27fc2 100755 --- a/webbuild/webbuild-cgi +++ b/webbuild/webbuild-cgi @@ -1088,15 +1088,18 @@ if [ "$REQUEST" = "prepare" -o "$REQUEST" = "updatespec" -o "$REQUEST" = "speccr AUTODISTADD="$AUTODISTADD --rebuild -- --changelog \"${AUTODISTUPDATECHANGELOG}\"" fi autodistjobs= + if [ "$AUTODISTVERSION" ]; then + AUTODISTVER="\#$AUTODISTVERSION" + fi if [ "$AUTODISTPKGS" ]; then for p in $AUTODISTPKGS; do - autodistjobs="$autodistjobs $AUTODISTJOB/$p" + autodistjobs="$autodistjobs $AUTODISTJOB/$p${AUTODISTVER}" done else - autodistjobs="$AUTODISTJOB" + autodistjobs="$AUTODISTJOB${AUTODISTVER}" fi [ "$REPOSITORY" ] && REPOSITORYADD="--repository $REPOSITORY" || REPOSITORYADD="--repository ${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]}" - $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist -v -u $autodistjobs $REPOSITORYADD --arch $AUTODISTARCH --user $USER $AUTODISTADD" + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist -v -u $autodistjobs $REPOSITORYADD --arch $AUTODISTARCH --user $USER $AUTODISTADD -- --colors web" RET=$? ;; "addpkgnote") echo "`date +%s` $USER $ENVIRONMENT $PKGNOTE" >> $WEBBUILD_STATEDIR/notes/$PACKAGE.notes; RET=$? ;; @@ -1359,6 +1362,7 @@ if [ "$MAINTAINERMODE" != "true" ]; then echo -n "AUTODISTJOB=\"+getSelectedValueById('autodistjobs')+\"&" echo -n "AUTODISTPKGS=\"+encodeURIComponent(p)+\"&" echo -n "AUTODISTUPDATECHANGELOG=\"+encodeURIComponent(getElementById('autodistupdatechangelog').value)+\"&" + echo -n "AUTODISTVERSION=\"+getElementById('autodistversion').value+\"&" echo -n "ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=autodistupdate\");>" # autodist build echo -n ""`\"+getSelectedValueById('autodistjobs')+\"`cgi_encodevar " job to "`\"+" echo -n "getSelectedValueById('sendrepository')+\"`cgi_encodevar "?"`\"); class=redbutton $DISABLED>" - # autodist update changelog - echo -n "Rebuild changelog:
" - echo -n "" # autodist schedule - echo -n "
New version: " + echo -n ""`\"+getSelectedValueById('autodistjobs')+\"`cgi_encodevar " autodist job for automatic update?"`\"); class=boldbutton>" - echo -n "(version:)" + # autodist update changelog + echo -n "
Rebuild changelog:
" + echo -n "" # autodist show schedule echo -n "" @@ -1649,7 +1653,7 @@ case $REQUEST in "smartupgrade") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "export LANG=C;sudo smart update && sudo smart upgrade" RET=$? ;; - "runldconfig") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "/sbin/ldconfig" + "runldconfig") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "export LANG=C;sudo /sbin/ldconfig" RET=$? ;; "showpatch") $SUDO_WRAPPER binary $ENVIRONMENT "$USER" $PACKAGE "autodist-tool makepatch $PACKAGE"; RET=$? ;; @@ -1674,11 +1678,11 @@ case $REQUEST in social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"made an autodist build patch for $PACKAGE\" STIME=`date +%s`" fi ;; "showscheduled") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist-tool schedule"; RET=$? ;; - "schedule") if [ "$SCHEDULEVERSION" ]; then - $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist-tool schedule $AUTODISTJOB#$SCHEDULEVERSION" + "schedule") if [ "$AUTODISTVERSION" ]; then + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist-tool schedule $AUTODISTJOB#$AUTODISTVERSION" RET=$? if [ $RET -eq 0 ]; then - social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"scheduled autodist job $AUTODISTJOB for update to version $SCHEDULEVERSION\" STIME=`date +%s`" + social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"scheduled autodist job $AUTODISTJOB for update to version $AUTODISTVERSION\" STIME=`date +%s`" fi else $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist-tool schedule $AUTODISTJOB" @@ -1702,7 +1706,7 @@ case $REQUEST in else autodistjobs="$AUTODISTJOB" fi - $SUDO_WRAPPER background $ENVIRONMENT "$USER" "$PACKAGE" "autodist -v -b $autodistjobs --repository ${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]} --arch $AUTODISTARCH --user $USER $AUTODISTADD" &>/dev/null + $SUDO_WRAPPER background $ENVIRONMENT "$USER" "$PACKAGE" "autodist -v -b $autodistjobs --repository ${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]} --arch $AUTODISTARCH --user $USER $AUTODISTADD -- --colors web" &>/dev/null [ $? -ne 0 ] && RET=$? || { RET=-1 echo "Autodist build start. You may see the output in the Webbuild jobs box above." @@ -1718,7 +1722,7 @@ case $REQUEST in else autodistjobs="$AUTODISTJOB" fi - $SUDO_WRAPPER background $ENVIRONMENT "$USER" "$PACKAGE" "autodist -v -i $autodistjobs --repository ${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]} --arch $AUTODISTARCH --user $USER $AUTODISTADD" &>/dev/null + $SUDO_WRAPPER background $ENVIRONMENT "$USER" "$PACKAGE" "autodist -v -i $autodistjobs --repository ${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]} --arch $AUTODISTARCH --user $USER $AUTODISTADD -- --colors web" &>/dev/null [ $? -ne 0 ] && RET=$? || { RET=-1 echo "Autodist install start. You may see the output in the Webbuild jobs box above." @@ -1733,7 +1737,7 @@ case $REQUEST in else autodistjobs="$AUTODISTJOB" fi - $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist -v -s $autodistjobs --repository ${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]} --server $SENDREPOSITORY --arch $AUTODISTARCH --user $USER $AUTODISTADD" + $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`" ;; @@ -1780,7 +1784,9 @@ $RPMFORCEADD $PACKAGE.spec" RPMARCHADD="-A $RPMBUILDARCH --define \"cross_target_cpu=$RPMBUILDARCH\"" $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a5 --list-check --force $RPMARCHADD" RET=$? ;; - "autospecbuildreq") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a6" + "autospecbuildreq") + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "sudo /sbin/ldconfig" + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a6" RET=$? ;; "rpmchecks") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a8"; RET=$? ;; "rpmsimulateinstall") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a7"; RET=$? ;;