webbuild: support for different archs in downloads and some fixes
This commit is contained in:
parent
ee1a94af6f
commit
ced497545e
@ -527,9 +527,17 @@ if [ "$REQUEST" = "rpmmanager" ]; then
|
|||||||
echo -n "<option value=\"RPMS\" $SELECTED>Local *.${AUTOPORT_ARCH[$ENVIRONMENT]}.rpm</option>"
|
echo -n "<option value=\"RPMS\" $SELECTED>Local *.${AUTOPORT_ARCH[$ENVIRONMENT]}.rpm</option>"
|
||||||
[ "$RPMMANAGERDIR" = "RPMSNOARCH" ] && SELECTED="selected=selected" || SELECTED=
|
[ "$RPMMANAGERDIR" = "RPMSNOARCH" ] && SELECTED="selected=selected" || SELECTED=
|
||||||
echo -n "<option value=\"RPMSNOARCH\" $SELECTED>Local *.noarch.rpm</option>"
|
echo -n "<option value=\"RPMSNOARCH\" $SELECTED>Local *.noarch.rpm</option>"
|
||||||
|
if [ "${AUTOPORT_ARCH[$ENVIRONMENT]}" == "x86_64" ]; then
|
||||||
|
[ "$RPMMANAGERDIR" = "RPMS_i586" ] && SELECTED="selected=selected" || SELECTED=
|
||||||
|
echo -n "<option value=\"RPMS_i586\" $SELECTED>Local *.i586.rpm</option>"
|
||||||
|
fi
|
||||||
|
if [ "${AUTOPORT_ARCH[$ENVIRONMENT]}" == "x86_64" -o "${AUTOPORT_ARCH[$ENVIRONMENT]}" == "i586" ]; then
|
||||||
|
[ "$RPMMANAGERDIR" = "RPMS_arm" ] && SELECTED="selected=selected" || SELECTED=
|
||||||
|
echo -n "<option value=\"RPMS_arm\" $SELECTED>Local *.arm.rpm</option>"
|
||||||
|
fi
|
||||||
[ "$RPMMANAGERDIR" = "SRPMS" ] && SELECTED="selected=selected" || SELECTED=
|
[ "$RPMMANAGERDIR" = "SRPMS" ] && SELECTED="selected=selected" || SELECTED=
|
||||||
echo -n "<option value=\"SRPMS\" $SELECTED>Local *.src.rpm</option>"
|
echo -n "<option value=\"SRPMS\" $SELECTED>Local *.src.rpm</option>"
|
||||||
if [ -e $local_ftp/$REPOSITORY ]; then
|
if [ "$REPOSITORY" -a -e $local_ftp/$REPOSITORY ]; then
|
||||||
[ "$RPMMANAGERDIR" = "REP_RPMS" ] && SELECTED="selected=selected" || SELECTED=
|
[ "$RPMMANAGERDIR" = "REP_RPMS" ] && SELECTED="selected=selected" || SELECTED=
|
||||||
echo -n "<option value=\"REP_RPMS\" $SELECTED>$REPOSITORY *.${AUTOPORT_ARCH[$ENVIRONMENT]}.rpm</option>"
|
echo -n "<option value=\"REP_RPMS\" $SELECTED>$REPOSITORY *.${AUTOPORT_ARCH[$ENVIRONMENT]}.rpm</option>"
|
||||||
[ "$RPMMANAGERDIR" = "REP_RPMSNOARCH" ] && SELECTED="selected=selected" || SELECTED=
|
[ "$RPMMANAGERDIR" = "REP_RPMSNOARCH" ] && SELECTED="selected=selected" || SELECTED=
|
||||||
@ -1421,17 +1429,22 @@ if [ "$MAINTAINERMODE" != "true" ]; then
|
|||||||
echo -n "`cgi_encodevar "</b> job in current environment?"`\""
|
echo -n "`cgi_encodevar "</b> job in current environment?"`\""
|
||||||
echo -n "); class=redbutton $DISABLED>"
|
echo -n "); class=redbutton $DISABLED>"
|
||||||
# autodist send
|
# 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 "<input type=button value=\"send\" onclick="
|
echo -n "<input type=button value=\"send\" onclick="
|
||||||
echo -n "p=getCheckedValuesByName('autodistpkgscheckbox');ajax_getvalues(\""
|
echo -n "p=getCheckedValuesByName('autodistpkgscheckbox');ajax_getvalues(\""
|
||||||
echo -n "AUTODISTFORCE=\"+getElementById('rpmforce').checked+\"&"
|
echo -n "AUTODISTFORCE=\"+getElementById('rpmforce').checked+\"&"
|
||||||
echo -n "AUTODISTARCH=\"+getSelectedValueById('rpmbuildarch')+\"&"
|
echo -n "AUTODISTARCH=\"+getSelectedValueById('rpmbuildarch')+\"&"
|
||||||
echo -n "AUTODISTJOB=\"+getSelectedValueById('autodistjobs')+\"&"
|
echo -n "AUTODISTJOB=\"+getSelectedValueById('autodistjobs')+\"&"
|
||||||
echo -n "AUTODISTPKGS=\"+encodeURIComponent(p)+\"&"
|
echo -n "AUTODISTPKGS=\"+encodeURIComponent(p)+\"&"
|
||||||
|
echo -n "SENDRECREATESRPM=true&"
|
||||||
echo -n "SENDREPOSITORY=\"+getSelectedValueById('sendrepository')+\"&"
|
echo -n "SENDREPOSITORY=\"+getSelectedValueById('sendrepository')+\"&"
|
||||||
echo -n "ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=autodistsend\""
|
echo -n "ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=autodistsend\""
|
||||||
echo -n ",\"`cgi_encodevar "Send selected packages for <b>"`\"+getSelectedValueById('autodistjobs')+\"`cgi_encodevar "</b> job to <b>"`\"+"
|
echo -n ",\"`cgi_encodevar "Send selected packages for <b>"`\"+getSelectedValueById('autodistjobs')+\"`cgi_encodevar "</b> job to <b>"`\"+"
|
||||||
echo -n "getSelectedValueById('sendrepository')+\"`cgi_encodevar "</b>?"`\"); class=redbutton $DISABLED>"
|
echo -n "getSelectedValueById('sendrepository')+\"`cgi_encodevar "</b>?"`\"); class=redbutton $HREFADD>"
|
||||||
# autodist schedule
|
# autodist schedule
|
||||||
echo -n "<br>New version:<input type=text id=autodistversion value=\"\" style=\"width:20%\"> "
|
echo -n "<br>New version:<input type=text id=autodistversion value=\"\" style=\"width:20%\"> "
|
||||||
echo -n "<input type=button value=\"schedule job\" onclick="
|
echo -n "<input type=button value=\"schedule job\" onclick="
|
||||||
@ -1736,16 +1749,26 @@ case $REQUEST in
|
|||||||
;;
|
;;
|
||||||
"autodistsend") [ "$AUTODISTFORCE" = "true" ] && AUTODISTADD="--force" || AUTODISTADD=
|
"autodistsend") [ "$AUTODISTFORCE" = "true" ] && AUTODISTADD="--force" || AUTODISTADD=
|
||||||
autodistjobs=
|
autodistjobs=
|
||||||
|
RET=0
|
||||||
if [ "$AUTODISTPKGS" ]; then
|
if [ "$AUTODISTPKGS" ]; then
|
||||||
for p in $AUTODISTPKGS; do
|
for p in $AUTODISTPKGS; do
|
||||||
autodistjobs="$autodistjobs $AUTODISTJOB/$p"
|
autodistjobs="$autodistjobs $AUTODISTJOB/$p"
|
||||||
|
if [ "$SENDRECREATESRPM" = "true" ]; then
|
||||||
|
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "$p" "rpmbuild -bs \
|
||||||
|
--define=\"_topdir $SPECVAR_WORKINGHOME/RPM\" \
|
||||||
|
$p.spec $RPMFORCEADD"
|
||||||
|
RET=$?
|
||||||
|
[ $RET -eq 0 ] || break
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
autodistjobs="$AUTODISTJOB"
|
autodistjobs="$AUTODISTJOB"
|
||||||
fi
|
fi
|
||||||
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist -v -s $autodistjobs --repository ${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]} --server $SENDREPOSITORY --arch $AUTODISTARCH --user $USER $AUTODISTADD -- --colors web"
|
if [ $RET -eq 0 ]; then
|
||||||
RET=$?
|
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist -v -s $autodistjobs --repository ${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]} --server $SENDREPOSITORY --arch $AUTODISTARCH --user $USER $AUTODISTADD -- --colors web"
|
||||||
[ $RET -eq 0 ] && social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"sent <b>$AUTODISTPKGS $SPECVAR_Version-$SPECVAR_Release</b> from <i>`print_environment_descr $ENVIRONMENT`</i> to <b>$SENDREPOSITORY</b>\" STIME=`date +%s`"
|
RET=$?
|
||||||
|
[ $RET -eq 0 ] && social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"sent <b>$AUTODISTPKGS $SPECVAR_Version-$SPECVAR_Release</b> from <i>`print_environment_descr $ENVIRONMENT`</i> to <b>$SENDREPOSITORY</b>\" STIME=`date +%s`"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
"autoport") if [ "$AUTOPORTPACKAGE" ]; then
|
"autoport") if [ "$AUTOPORTPACKAGE" ]; then
|
||||||
if [ "$AUTOPORTRELEASEREPOSITORY" ]; then
|
if [ "$AUTOPORTRELEASEREPOSITORY" ]; then
|
||||||
@ -2060,12 +2083,11 @@ $PACKAGE.spec $RPMFORCEADD && $AUTOSPEC_CMD -u $PACKAGE -a10 --server $SENDREPOS
|
|||||||
"consolecmd") if [ ! "$SPECVAR_BUILDDIR" ]; then
|
"consolecmd") if [ ! "$SPECVAR_BUILDDIR" ]; then
|
||||||
echo "ERROR: BUILDDIR is undefined"
|
echo "ERROR: BUILDDIR is undefined"
|
||||||
RET=1
|
RET=1
|
||||||
else
|
else
|
||||||
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cd $SPECVAR_RPMBUILDDIR/$SPECVAR_BUILDDIR && bash -c '$CONSOLECMD'"
|
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cd $SPECVAR_RPMBUILDDIR/$SPECVAR_BUILDDIR && bash -c '$CONSOLECMD'"
|
||||||
RET=$?
|
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"
|
"configurehelp") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cd $SPECVAR_RPMBUILDDIR/$SPECVAR_BUILDDIR && ./configure --help || ./waf configure --help"
|
||||||
RET=$?
|
RET=$?
|
||||||
[ $RET -eq 0 ] && RET=-1 ;;
|
[ $RET -eq 0 ] && RET=-1 ;;
|
||||||
|
@ -163,7 +163,7 @@ function print_editorcontrols() {
|
|||||||
|
|
||||||
echo -n "<editcontrols><![CDATA["
|
echo -n "<editcontrols><![CDATA["
|
||||||
# specfile save
|
# specfile save
|
||||||
echo -n "<div style=\"width:100%;overflow:hidden;\"><span style=\"float:left\">"
|
echo -n "<div style=\"width:100%;overflow:hidden;\"><span style=\"width:100%;display:block\">"
|
||||||
echo -n "<input type=button id=savebutton value=\"save\" onclick="
|
echo -n "<input type=button id=savebutton value=\"save\" onclick="
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "REQUEST=savespec&SENDREPOSITORY=$SENDREPOSITORY&SPECTEXT=\"+encodeURIComponent(editor.getValue()));"
|
echo -n "REQUEST=savespec&SENDREPOSITORY=$SENDREPOSITORY&SPECTEXT=\"+encodeURIComponent(editor.getValue()));"
|
||||||
@ -242,7 +242,7 @@ function print_editorcontrols() {
|
|||||||
echo -n "<label style=\"color:red;padding:0;\"><input type=checkbox id=\"sendrecreatesrpm\" value=\"force\">recreate SRPM</label>"
|
echo -n "<label style=\"color:red;padding:0;\"><input type=checkbox id=\"sendrecreatesrpm\" value=\"force\">recreate SRPM</label>"
|
||||||
|
|
||||||
# specfile update
|
# specfile update
|
||||||
echo -n "<div style=\"width:100%;overflow:hidden;\"><span style=\"float:left\">"
|
echo -n "<div style=\"width:100%;overflow:hidden;\"><span style=\"display:flex\">"
|
||||||
echo -n "<input type=button id=updatespecbutton value=\"update\" onclick="
|
echo -n "<input type=button id=updatespecbutton value=\"update\" onclick="
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "REQUEST=updatespec&UPDATESPECVERSION=\"+getElementById('updatespecversion').value+\"&"
|
echo -n "REQUEST=updatespec&UPDATESPECVERSION=\"+getElementById('updatespecversion').value+\"&"
|
||||||
@ -250,12 +250,10 @@ function print_editorcontrols() {
|
|||||||
echo -n "DEBUG=\"+getElementById('debug').checked+\"&"
|
echo -n "DEBUG=\"+getElementById('debug').checked+\"&"
|
||||||
echo -n "REBUILDSPECCHANGELOG=\"+encodeURIComponent(getElementById('rebuildspecchangelog').value)+\"&"
|
echo -n "REBUILDSPECCHANGELOG=\"+encodeURIComponent(getElementById('rebuildspecchangelog').value)+\"&"
|
||||||
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue()));>"
|
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue()));>"
|
||||||
echo -n " (automatic or specify new version:<input type=text id=updatespecversion value=\"\" size=\"10\">"
|
echo -n " <label>to new version:</label><input type=text id=updatespecversion value=\"\" size=\"10\">"
|
||||||
echo -n " or new release changelog:"
|
echo -n " <label>or to new release with changelog:</label>"
|
||||||
echo -n "</span><span style=\"display:block;float:right\">)</span>"
|
echo -n "<input style=\"flex:1\" type=text id=rebuildspecchangelog value=\"$REBUILDSPECCHANGELOG\">"
|
||||||
echo -n "<span style=\"display:block;overflow:hidden;padding-right:5px;\">"
|
echo -n "</div>"
|
||||||
echo -n "<input type=text id=rebuildspecchangelog value=\"$REBUILDSPECCHANGELOG\" style=\"width:100%\">"
|
|
||||||
echo -n "</span></div>"
|
|
||||||
# close tag
|
# close tag
|
||||||
echo -n "]]></editcontrols>"
|
echo -n "]]></editcontrols>"
|
||||||
|
|
||||||
@ -324,6 +322,12 @@ function resolve_rpmmanagerdir() {
|
|||||||
RPMSNOARCH) rpmmanagerdir=../RPMS/noarch
|
RPMSNOARCH) rpmmanagerdir=../RPMS/noarch
|
||||||
rpmmanagermask="*.noarch.rpm"
|
rpmmanagermask="*.noarch.rpm"
|
||||||
rpmmanagermode=environment ;;
|
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
|
*) rpmmanagerdir=../RPMS/$RPMMANAGERARCH
|
||||||
rpmmanagermask="*.$RPMMANAGERARCH.rpm"
|
rpmmanagermask="*.$RPMMANAGERARCH.rpm"
|
||||||
rpmmanagermode=environment ;;
|
rpmmanagermode=environment ;;
|
||||||
|
Loading…
Reference in New Issue
Block a user