From 9d003905df78857db71e56caf6ff5adff500134a Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sun, 14 Mar 2021 11:51:42 +0100 Subject: [PATCH] autodist, webbuild-cgi: add -b to autospec command to update build requrements in specfiles; other fixes to webbuild-cgi --- autodist | 2 +- webbuild/webbuild-cgi | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/autodist b/autodist index 6335d3c..586df8e 100755 --- a/autodist +++ b/autodist @@ -688,7 +688,7 @@ function launch_pkgs_loop() { continue fi fi - command_opts="-a5:6" ;; + command_opts="-a5:6 -b" ;; buildsrpm) command_opts="-a5:6 --norpm" ;; buildinstall) diff --git a/webbuild/webbuild-cgi b/webbuild/webbuild-cgi index 7f7daa3..4de4988 100755 --- a/webbuild/webbuild-cgi +++ b/webbuild/webbuild-cgi @@ -424,7 +424,7 @@ if [ "$REQUEST" = "refresh" -o "$REQUEST" = "refreshjobs" ]; then CMDEMAIL=`grep "USER_EMAIL" $WEBBUILD_STATEDIR/users/$CMDUSER.conf|sed "s|USER_EMAIL=||"` if [ $RETCODE -eq 0 ]; then [ "$NOTIFIED" ] || \ - social_log "SUSER=$CMDUSER STYPE=job SEMAIL=$CMDEMAIL STEXT=\"''$cmdline'' succesfully completed!\" STIME=`date +%s`" >> /tmp/y + social_log "SUSER=$CMDUSER STYPE=job SEMAIL=$CMDEMAIL STEXT=\"''$cmdline'' succesfully completed!\" STIME=`date +%s`" # echo -n "OK" echo -n "\"OK\"" else @@ -479,7 +479,7 @@ if [ "$REQUEST" = "repsearch" ]; then echo -n "
Search results for \"$REPSEARCHTEXT\":
" # echo -n "
"
    REPSEARCHTEXT_FMT=`echo "${REPSEARCHTEXT}" | sed "s|[[:space:]]|+|g"`
-   curl -s "${WEBBUILD_DISTROQUERY_URL}?query=${REPSEARCHTEXT_FMT}&search_milestone2=true&search_milestone3=true&search_devel=true\
+   curl -L -s "${WEBBUILD_DISTROQUERY_URL}?query=${REPSEARCHTEXT_FMT}&search_milestone2=true&search_milestone3=true&search_devel=true\
 &search_i586=true&search_x86_64=true&search_arm=true&search_sources=true&query_compact=true&replyplain=true" | \
    sed "s| \(href=.\)/| \1${SITE_BASE_URL}/|g"
 #   $SUDO_WRAPPER 0 local "$USER" "" "autodist-repository search -i ${REPSEARCHTEXT/-/\-}" | \
@@ -927,7 +927,7 @@ if [ "$MAINTAINERMODE" = "true" -o ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then
             ls --color=none $local_ftp/$REPOSITORY/SRPMS.base/ | grep ".src.rpm$" | sort -f > $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY
          fi
       else
-         curl -s $REPS_BASE_URL/$REPOSITORY/SRPMS.base/ | grep .src.rpm | \
+         curl -L -s $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
@@ -1065,7 +1065,7 @@ if [ "$REQUEST" = "prepare" -o "$REQUEST" = "updatespec" -o "$REQUEST" = "speccr
                     RET=$?
                     ;;
       "speccreate") if [ "$SPECCREATEURL" -a "$PACKAGE" ]; then
-                       FOUND_EXISTING=`curl -s "${WEBBUILD_DISTROQUERY_URL}?package=$PACKAGE&search_milestone2=true&search_milestone3=true&search_devel=true&search_sources=true&query_compact=true&replyplain=true&searchbox=false"`
+                       FOUND_EXISTING=`curl -L -s "${WEBBUILD_DISTROQUERY_URL}?package=$PACKAGE&search_milestone2=true&search_milestone3=true&search_devel=true&search_sources=true&query_compact=true&replyplain=true&searchbox=false"`
                        if [ "$FOUND_EXISTING" != "" ]; then
                           echo -n "
" echo "ERROR: package already exists, please update from appropriate version:" @@ -1196,8 +1196,8 @@ if [ "$MAINTAINERMODE" = "true" ]; then cat $local_ftp/$REPOSITORY/distromatic.log > $WEBBUILD_STATEDIR/cache/repository-distromaticlog-$REPOSITORY fi else - curl -s $REPS_BASE_URL/distromatic/$REPOSITORY/_recent.inc > $WEBBUILD_STATEDIR/cache/repository-recent-$REPOSITORY - curl -s $REPS_BASE_URL/$REPOSITORY/distromatic.log > $WEBBUILD_STATEDIR/cache/repository-distromaticlog-$REPOSITORY + curl -L -s $REPS_BASE_URL/distromatic/$REPOSITORY/_recent.inc > $WEBBUILD_STATEDIR/cache/repository-recent-$REPOSITORY + curl -L -s $REPS_BASE_URL/$REPOSITORY/distromatic.log > $WEBBUILD_STATEDIR/cache/repository-distromaticlog-$REPOSITORY fi cat $WEBBUILD_STATEDIR/cache/repository-recent-$REPOSITORY | sed "s|a \(href=.\)/|a target=new \1${SITE_BASE_URL}/|g" @@ -1802,7 +1802,7 @@ case $REQUEST in "rpmbuild") [ "$RPMFORCE" = "true" ] && RPMFORCEADD="--force-build" [ "$RPMBUILDARCH" -a "$RPMBUILDARCH" != "${AUTOPORT_ARCH[$ENVIRONMENT]}" ] && \ RPMARCHADD="-A $RPMBUILDARCH --define \"cross_target_cpu=$RPMBUILDARCH\"" - $SUDO_WRAPPER background $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a5,6 $RPMFORCEADD $RPMARCHADD" &>/dev/null + $SUDO_WRAPPER background $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a5,6 -b $RPMFORCEADD $RPMARCHADD" &>/dev/null # && echo \"Webbuild HINT: now you may want to click on 'build requirements', add build requirements in .spec file and then 'recreate SRPMS'\"" [ $? -ne 0 ] && RET=$? || { RET=-1 @@ -1823,7 +1823,7 @@ $RPMFORCEADD $PACKAGE.spec" RET=$? ;; "autospecbuildreq") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "sudo /sbin/ldconfig" - $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a6" + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a6 -b" 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=$? ;; @@ -2196,12 +2196,12 @@ if [ "$MAINTAINERMODE" = "true" ]; then elif [ "${REPOSITORY:0:10}" = "milestone3" ]; then IMPORT_REPOSITORIES=$AUTOPORT_MILESTONE3_IMPORT_REPOSITORIES else - IMPORT_REPOSITORIES="$AUTOPORT_DEVEL_IMPORT_REPOSITORIES devel-$USER $AUTOPORT_DEVEL_RELEASE_REPOSITORIES" + IMPORT_REPOSITORIES="$AUTOPORT_DEVEL_IMPORT_REPOSITORIES $AUTOPORT_DEVEL_RELEASE_REPOSITORIES" fi for f in $IMPORT_REPOSITORIES; do # [ "$f" = "$REPOSITORY" ] && continue if [ ! "$USER_ALLREPOSITORIES" ]; then - for u in $USER_CANMAINTAIN_REPOSITORIES devel-$USER; do + for u in $USER_CANMAINTAIN_REPOSITORIES; do [ "$u" = "$f" ] && echo -n "" # -a "$f" != "$REPOSITORY" done @@ -2231,7 +2231,7 @@ if [ "$MAINTAINERMODE" = "true" ]; then ls --color=none $local_ftp/$REPOSITORY/SRPMS.base/ | grep ".src.rpm$" | sort -f > $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY fi else - curl -s $REPS_BASE_URL/$REPOSITORY/SRPMS.base/ | grep .src.rpm | \ + curl -L -s $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