webbuild: update to current production version providing some fixes and new features
This commit is contained in:
parent
a0314b874b
commit
625c2b3ed2
@ -28,8 +28,15 @@ function socialbox_refresh_times() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var socialbox_interval = null;
|
||||||
|
var socialbox_reloadtime = 15000;
|
||||||
|
|
||||||
function ajax_getvalues_refresh(request,user,user_email,secret) {
|
function ajax_getvalues_refresh(request,user,user_email,secret) {
|
||||||
var fromid = 0;
|
var fromid = 0;
|
||||||
|
//alert("refresh");
|
||||||
|
if (socialbox_interval != null) {
|
||||||
|
clearInterval(socialbox_interval);
|
||||||
|
}
|
||||||
if (document.getElementsByName("social").length > 0) {
|
if (document.getElementsByName("social").length > 0) {
|
||||||
if (document.getElementsByName("social")[0].attributes[0].name == "sid") {
|
if (document.getElementsByName("social")[0].attributes[0].name == "sid") {
|
||||||
fromid = parseInt(document.getElementsByName("social")[0].attributes[0].value) + 1;
|
fromid = parseInt(document.getElementsByName("social")[0].attributes[0].value) + 1;
|
||||||
@ -68,8 +75,11 @@ function ajax_getvalues_refresh(request,user,user_email,secret) {
|
|||||||
$(function() { $('.scroll-pane').jScrollPane({scrollbarWidth:10}); });
|
$(function() { $('.scroll-pane').jScrollPane({scrollbarWidth:10}); });
|
||||||
// lastupdate = (+new Date());
|
// lastupdate = (+new Date());
|
||||||
socialbox_refresh_times();
|
socialbox_refresh_times();
|
||||||
|
//alert("refreshed_times");
|
||||||
}
|
}
|
||||||
|
|
||||||
xmlhttp1.open("POST", url, true);
|
xmlhttp1.open("POST", url, true);
|
||||||
xmlhttp1.setRequestHeader("Content-type","application/x-www-form-urlencoded");
|
xmlhttp1.setRequestHeader("Content-type","application/x-www-form-urlencoded");
|
||||||
xmlhttp1.send(request);
|
xmlhttp1.send(request);
|
||||||
|
socialbox_interval = setInterval("ajax_getvalues_refresh(\"\",\""+user+"\",\""+user_email+"\",\""+secret+"\")",socialbox_reloadtime);
|
||||||
}
|
}
|
||||||
|
@ -30,3 +30,17 @@ function checkEnter(event) {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function replaceHTML(el, html) {
|
||||||
|
var oldEl = typeof el === "string" ? document.getElementById(el) : el;
|
||||||
|
/*@cc_on // Pure innerHTML is slightly faster in IE
|
||||||
|
oldEl.innerHTML = html;
|
||||||
|
return oldEl;
|
||||||
|
@*/
|
||||||
|
var newEl = oldEl.cloneNode(false);
|
||||||
|
newEl.innerHTML = html;
|
||||||
|
oldEl.parentNode.replaceChild(newEl, oldEl);
|
||||||
|
/* Since we just removed the old element from the DOM, return a reference
|
||||||
|
to the new element, which can be used to restore variable references. */
|
||||||
|
return newEl;
|
||||||
|
};
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# webbuild cgi script
|
# webbuild cgi script
|
||||||
# Copyright (c) 2012 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
# Copyright (c) 2012-2013 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
#
|
#
|
||||||
. /etc/sysconfig/autoport
|
. /etc/sysconfig/autoport
|
||||||
. /usr/share/autodist/webbuild-functions
|
. /usr/share/autodist/webbuild-functions
|
||||||
@ -141,6 +141,13 @@ fi
|
|||||||
|
|
||||||
if [ "$USER" -a "$USER_ENABLED" ]; then
|
if [ "$USER" -a "$USER_ENABLED" ]; then
|
||||||
# set user state changes
|
# set user state changes
|
||||||
|
if [ "$AUTODISTCURRENT" != "" ]; then
|
||||||
|
if [ "$AUTODISTCURRENT" = "true" ]; then
|
||||||
|
set_user_state_var STATE_AUTODISTCURRENT 1
|
||||||
|
else
|
||||||
|
set_user_state_var STATE_AUTODISTCURRENT 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if [ "$ADVANCEDCONTROLSSWITCH" != "" ]; then
|
if [ "$ADVANCEDCONTROLSSWITCH" != "" ]; then
|
||||||
if [ "$ADVANCEDCONTROLSSWITCH" = "true" ]; then
|
if [ "$ADVANCEDCONTROLSSWITCH" = "true" ]; then
|
||||||
set_user_state_var STATE_ADVANCEDCONTROLS 1
|
set_user_state_var STATE_ADVANCEDCONTROLS 1
|
||||||
@ -314,6 +321,7 @@ if [ "$REQUEST" = "refresh" -o "$REQUEST" = "refreshjobs" ]; then
|
|||||||
# if [ -e /proc/$1 -o $5 -lt 256 ]; then
|
# if [ -e /proc/$1 -o $5 -lt 256 ]; then
|
||||||
numprocess=`expr $numprocess + 1`
|
numprocess=`expr $numprocess + 1`
|
||||||
cmdline=`echo $line | sed "s|$1 $2 $3 $4 $5 $RETCODE ||"`
|
cmdline=`echo $line | sed "s|$1 $2 $3 $4 $5 $RETCODE ||"`
|
||||||
|
cmdline=`echo $cmdline | sed "s| --colors web||"`
|
||||||
PACKAGE_ENCODED=`cgi_encodevar $4`
|
PACKAGE_ENCODED=`cgi_encodevar $4`
|
||||||
[ $numprocess -eq 1 ] && {
|
[ $numprocess -eq 1 ] && {
|
||||||
echo -n "<div align=left class=processes>"
|
echo -n "<div align=left class=processes>"
|
||||||
@ -404,12 +412,12 @@ if [ "$REQUEST" = "environmentsearch" ]; then
|
|||||||
echo -n "$WHAT_PROVIDES<br>"
|
echo -n "$WHAT_PROVIDES<br>"
|
||||||
if [ "${WHAT_PROVIDES:0:10}" != "no package" ]; then
|
if [ "${WHAT_PROVIDES:0:10}" != "no package" ]; then
|
||||||
for f in $WHAT_PROVIDES; do
|
for f in $WHAT_PROVIDES; do
|
||||||
echo -n "<font style=\"background-color:gray\">$f installed package info:</font><br>"
|
echo -n "<br><font style=\"background-color:gray\">$f installed package info:</font><br>"
|
||||||
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "rpm -qi $f"
|
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "rpm -qi $f"
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo -n "<font style=\"color:gold\">$f provides:</font><br>"
|
echo -n "<br><font style=\"color:gold\">$f provides:</font><br>"
|
||||||
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "rpm -q $f --provides"
|
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "rpm -q $f --provides"
|
||||||
echo -n "<font style=\"color:gold\">$f requirements:</font><br>"
|
echo -n "<br><font style=\"color:gold\">$f requirements:</font><br>"
|
||||||
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "rpm -q $f --requires"
|
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "rpm -q $f --requires"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -470,14 +478,14 @@ echo -n "<input type=button id=newsessionbutton value=\"New session\" onclick="
|
|||||||
echo -n "window.open(document.URL);>"
|
echo -n "window.open(document.URL);>"
|
||||||
# expert mode checkbox
|
# expert mode checkbox
|
||||||
[ "$STATE_ADVANCEDCONTROLS" ] && CHECKED="checked=checked" || CHECKED=
|
[ "$STATE_ADVANCEDCONTROLS" ] && CHECKED="checked=checked" || CHECKED=
|
||||||
echo -n " <span style=\"white-space:nowrap\">Expert:<input type=checkbox id=\"advancedcontrols\" value=\"force\" "
|
echo -n " <span style=\"white-space:nowrap\">Autodist:<input type=checkbox id=\"advancedcontrols\" "
|
||||||
echo -n "onclick=ajax_getvalues(\""
|
echo -n "onclick=ajax_getvalues(\""
|
||||||
echo -n "ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
echo -n "ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
echo -n "MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
||||||
echo -n "ADVANCEDCONTROLSSWITCH=\"+getElementById('advancedcontrols').checked); $CHECKED>"
|
echo -n "ADVANCEDCONTROLSSWITCH=\"+getElementById('advancedcontrols').checked); $CHECKED>"
|
||||||
# privacy mode checkbox
|
# privacy mode checkbox
|
||||||
[ "$STATE_PRIVACYMODE" ] && CHECKED="checked=checked" || CHECKED=
|
[ "$STATE_PRIVACYMODE" ] && CHECKED="checked=checked" || CHECKED=
|
||||||
echo -n " <span style=\"white-space:nowrap\">Privacy:<input type=checkbox id=\"privacymode\" value=\"force\" "
|
echo -n " <span style=\"white-space:nowrap\">Privacy:<input type=checkbox id=\"privacymode\" "
|
||||||
echo -n "onclick=ajax_getvalues(\""
|
echo -n "onclick=ajax_getvalues(\""
|
||||||
echo -n "ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
echo -n "ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "PRIVACYMODESWITCH=\"+getElementById('privacymode').checked); $CHECKED>"
|
echo -n "PRIVACYMODESWITCH=\"+getElementById('privacymode').checked); $CHECKED>"
|
||||||
@ -532,7 +540,7 @@ echo -n "]]></environments>"
|
|||||||
|
|
||||||
if [ "$MAINTAINERMODE" = "true" ]; then
|
if [ "$MAINTAINERMODE" = "true" ]; then
|
||||||
echo -n "<specedit> </specedit>"
|
echo -n "<specedit> </specedit>"
|
||||||
elif [ ! "$REQUEST" -o "$REQUEST" = "changeenvironment" -o "$REQUEST" = "switchmaintainermode" -o "$REQUEST" = "prepare" ]; then
|
elif [ ! "$REQUEST" -o "$REQUEST" = "changeenvironment" -o "$REQUEST" = "switchmaintainermode" -o "$REQUEST" = "prepare" -o "$REQUEST" = "reloadspec" ]; then
|
||||||
# SPECFILES select
|
# SPECFILES select
|
||||||
echo -n "<specedit><![CDATA["
|
echo -n "<specedit><![CDATA["
|
||||||
echo -n " Edit:<select id=specfile "
|
echo -n " Edit:<select id=specfile "
|
||||||
@ -609,18 +617,18 @@ else
|
|||||||
# autobuild edit previous
|
# autobuild edit previous
|
||||||
echo -n "<input type=button name=autobuildeditprev value=\" < \" onclick="
|
echo -n "<input type=button name=autobuildeditprev value=\" < \" onclick="
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&"
|
||||||
echo -n "AUTODISTCURRENT=\"+getElementById('autodistcurrentcheckbox').checked+\"&"
|
|
||||||
echo -n "PACKAGE=\"+encodeURIComponent(getSelectedValueById(\"autobuildedit\",-1).substring(0,getSelectedValueById(\"autobuildedit\",-1).indexOf(';')))+\"&"
|
echo -n "PACKAGE=\"+encodeURIComponent(getSelectedValueById(\"autobuildedit\",-1).substring(0,getSelectedValueById(\"autobuildedit\",-1).indexOf(';')))+\"&"
|
||||||
echo -n "LOGTYPE=\"+getSelectedValueById(\"autobuildedit\",-1).substring(getSelectedValueById(\"autobuildedit\",-1).indexOf(';')+1)+\"&REQUEST=autobuildedit\");>"
|
echo -n "LOGTYPE=\"+getSelectedValueById(\"autobuildedit\",-1).substring(getSelectedValueById(\"autobuildedit\",-1).indexOf(';')+1)+\"&LOGSTATUSOK=&"
|
||||||
|
echo -n "REQUEST=autobuildedit\");>"
|
||||||
# autobuild edit select
|
# autobuild edit select
|
||||||
echo -n "<select id=autobuildedit "
|
echo -n "<select id=autobuildedit "
|
||||||
echo -n "onchange=ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&"
|
echo -n "onchange=ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&"
|
||||||
echo -n "AUTODISTCURRENT=\"+getElementById('autodistcurrentcheckbox').checked+\"&"
|
|
||||||
echo -n "PACKAGE=\"+encodeURIComponent(this.value.substring(0,this.value.indexOf(';')))+\"&"
|
echo -n "PACKAGE=\"+encodeURIComponent(this.value.substring(0,this.value.indexOf(';')))+\"&"
|
||||||
echo -n "LOGTYPE=\"+this.value.substring(this.value.indexOf(';')+1)+\"&REQUEST=autobuildedit\");>"
|
echo -n "LOGTYPE=\"+this.value.substring(this.value.indexOf(';')+1)+\"&LOGSTATUSOK=&"
|
||||||
|
echo -n "REQUEST=autobuildedit\");>"
|
||||||
echo -n "<option value=\"\">-- Select a failed build to review --</option>"
|
echo -n "<option value=\"\">-- Select a failed build to review --</option>"
|
||||||
SELECTED=
|
SELECTED=
|
||||||
[ "$AUTODISTCURRENT" = "true" ] && AUTOUPDATEFILE=$BUILDLOGDIR/autoupdate-current || AUTOUPDATEFILE=$BUILDLOGDIR/autoupdate-last
|
[ "$STATE_AUTODISTCURRENT" = "1" ] && AUTOUPDATEFILE=$BUILDLOGDIR/autoupdate-current || AUTOUPDATEFILE=$BUILDLOGDIR/autoupdate-last
|
||||||
while read line; do
|
while read line; do
|
||||||
set -- $line
|
set -- $line
|
||||||
if [ "$3" = "failed" -a "$2" != "autoupdate" ]; then
|
if [ "$3" = "failed" -a "$2" != "autoupdate" ]; then
|
||||||
@ -644,11 +652,11 @@ else
|
|||||||
# autobuild edit next
|
# autobuild edit next
|
||||||
echo -n "<input type=button name=autobuildeditnext value=\" > \" onclick="
|
echo -n "<input type=button name=autobuildeditnext value=\" > \" onclick="
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&"
|
||||||
echo -n "AUTODISTCURRENT=\"+getElementById('autodistcurrentcheckbox').checked+\"&"
|
|
||||||
echo -n "PACKAGE=\"+encodeURIComponent(getSelectedValueById(\"autobuildedit\",1).substring(0,getSelectedValueById(\"autobuildedit\",1).indexOf(';')))+\"&"
|
echo -n "PACKAGE=\"+encodeURIComponent(getSelectedValueById(\"autobuildedit\",1).substring(0,getSelectedValueById(\"autobuildedit\",1).indexOf(';')))+\"&"
|
||||||
echo -n "LOGTYPE=\"+getSelectedValueById(\"autobuildedit\",1).substring(getSelectedValueById(\"autobuildedit\",1).indexOf(';')+1)+\"&REQUEST=autobuildedit\");>"
|
echo -n "LOGTYPE=\"+getSelectedValueById(\"autobuildedit\",1).substring(getSelectedValueById(\"autobuildedit\",1).indexOf(';')+1)+\"&LOGSTATUSOK=&"
|
||||||
|
echo -n "REQUEST=autobuildedit\");>"
|
||||||
# autodist current checkbox (in progress)
|
# autodist current checkbox (in progress)
|
||||||
[ "$AUTODISTCURRENT" = "true" ] && SELECTED="checked" || SELECTED=
|
[ "$STATE_AUTODISTCURRENT" = "1" ] && SELECTED="checked" || SELECTED=
|
||||||
echo -n "<label><input type=checkbox id=\"autodistcurrentcheckbox\" value=\"autodistcurrent\" $SELECTED onclick="
|
echo -n "<label><input type=checkbox id=\"autodistcurrentcheckbox\" value=\"autodistcurrent\" $SELECTED onclick="
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&"
|
||||||
echo -n "AUTODISTCURRENT=\"+getElementById('autodistcurrentcheckbox').checked+\"&"
|
echo -n "AUTODISTCURRENT=\"+getElementById('autodistcurrentcheckbox').checked+\"&"
|
||||||
@ -708,12 +716,18 @@ if [ "$MAINTAINERMODE" = "true" -o ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then
|
|||||||
echo -n "<operations><![CDATA["
|
echo -n "<operations><![CDATA["
|
||||||
echo -n "<input type=button name=prepare value=\"Unpack and edit\" id=preparebutton onclick="
|
echo -n "<input type=button name=prepare value=\"Unpack and edit\" id=preparebutton onclick="
|
||||||
echo -n "ajax_getvalues(\"REQUEST=prepare&REPOSITORY=\"+getSelectedValueById('repository')+\""
|
echo -n "ajax_getvalues(\"REQUEST=prepare&REPOSITORY=\"+getSelectedValueById('repository')+\""
|
||||||
echo -n "&ENVIRONMENT=$ENVIRONMENT&MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
echo -n "&ENVIRONMENT=$ENVIRONMENT&"
|
||||||
|
if [ "$USER_CANMAINTAIN" ]; then
|
||||||
|
echo -n "MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
||||||
|
fi
|
||||||
echo -n "PACKAGE=\"+encodeURIComponent(getSelectedValueById('package'))); $SRPMBUTTONDISABLED>"
|
echo -n "PACKAGE=\"+encodeURIComponent(getSelectedValueById('package'))); $SRPMBUTTONDISABLED>"
|
||||||
if [ "${AUTOPORT_CHROOT[$ENVIRONMENT]}" ]; then
|
if [ "${AUTOPORT_CHROOT[$ENVIRONMENT]}" ]; then
|
||||||
echo -n "<input type=button name=port value=\"Port\" id=portbutton onclick="
|
echo -n "<input type=button name=port value=\"Port\" id=portbutton onclick="
|
||||||
echo -n "ajax_getvalues(\"REQUEST=autoport&REPOSITORY=\"+getSelectedValueById('repository')+\""
|
echo -n "ajax_getvalues(\"REQUEST=autoport&REPOSITORY=\"+getSelectedValueById('repository')+\""
|
||||||
echo -n "&ENVIRONMENT=$ENVIRONMENT&MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
echo -n "&ENVIRONMENT=$ENVIRONMENT&"
|
||||||
|
if [ "$USER_CANMAINTAIN" ]; then
|
||||||
|
echo -n "MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
||||||
|
fi
|
||||||
echo -n "PACKAGE=\"+encodeURIComponent(getSelectedValueById('specfile'))+\"&"
|
echo -n "PACKAGE=\"+encodeURIComponent(getSelectedValueById('specfile'))+\"&"
|
||||||
echo -n "AUTOPORTPACKAGE=\"+encodeURIComponent(getSelectedValueById('package'))); $SRPMBUTTONDISABLED>"
|
echo -n "AUTOPORTPACKAGE=\"+encodeURIComponent(getSelectedValueById('package'))); $SRPMBUTTONDISABLED>"
|
||||||
fi
|
fi
|
||||||
@ -772,7 +786,7 @@ fi
|
|||||||
|
|
||||||
if [ "$REQUEST" = "edit" -o "$REQUEST" = "prepare" ]; then
|
if [ "$REQUEST" = "edit" -o "$REQUEST" = "prepare" ]; then
|
||||||
if [ ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then
|
if [ ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then
|
||||||
social_log "SUSER=$USER SEMAIL=$USER_EMAIL STARGET=developers STEXT=\"is working on <b>$PACKAGE</b>\" STIME=`date +%s`"
|
social_log "SUSER=$USER SEMAIL=$USER_EMAIL STARGET=developers STEXT=\"is working on <b>$PACKAGE</b> in <b>`print_environment_descr $ENVIRONMENT`</b> environment\" STIME=`date +%s`"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -786,10 +800,10 @@ if [ "$REQUEST" = "prepare" -o "$REQUEST" = "updatespec" -o "$REQUEST" = "speccr
|
|||||||
case $REQUEST in
|
case $REQUEST in
|
||||||
"prepare") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a1 --server $REPOSITORY"; RET=$? ;;
|
"prepare") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a1 --server $REPOSITORY"; RET=$? ;;
|
||||||
"updatespec") [ "$RPMFORCE" = "true" ] && RPMFORCEADD="--force-update"
|
"updatespec") [ "$RPMFORCE" = "true" ] && RPMFORCEADD="--force-update"
|
||||||
|
[ "$DEBUG" = "true" ] && RPMFORCEADD="$RPMFORCEADD --debug"
|
||||||
if [ "$UPDATESPECVERSION" -a "$REBUILDSPECCHANGELOG" ]; then
|
if [ "$UPDATESPECVERSION" -a "$REBUILDSPECCHANGELOG" ]; then
|
||||||
echo "ERROR: new version and changelog can't be specified together"
|
echo "ERROR: new version and changelog can't be specified together"
|
||||||
elif [ "$REBUILDSPECCHANGELOG" ]; then
|
elif [ "$REBUILDSPECCHANGELOG" ]; then
|
||||||
echo "$AUTOSPEC_CMD -u $PACKAGE -a4 $RPMFORCEADD --rebuild --changelog \"$REBUILDSPECCHANGELOG\""
|
|
||||||
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a4 $RPMFORCEADD --rebuild --changelog \"$REBUILDSPECCHANGELOG\""
|
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a4 $RPMFORCEADD --rebuild --changelog \"$REBUILDSPECCHANGELOG\""
|
||||||
elif [ "$UPDATESPECVERSION" ]; then
|
elif [ "$UPDATESPECVERSION" ]; then
|
||||||
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a3,4 $RPMFORCEADD $UPDATESPECVERSION"
|
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a3,4 $RPMFORCEADD $UPDATESPECVERSION"
|
||||||
@ -839,6 +853,10 @@ if [ "$REQUEST" = "prepare" -o "$REQUEST" = "updatespec" -o "$REQUEST" = "speccr
|
|||||||
RET=$?
|
RET=$?
|
||||||
;;
|
;;
|
||||||
"autodistupdate") [ "$AUTODISTFORCE" = "true" ] && AUTODISTADD="--force" || AUTODISTADD=
|
"autodistupdate") [ "$AUTODISTFORCE" = "true" ] && AUTODISTADD="--force" || AUTODISTADD=
|
||||||
|
[ "$DEBUG" = "true" ] && AUTODISTADD="$AUTODISTADD --debug" || AUTODISTADD=
|
||||||
|
if [ "$AUTODISTUPDATECHANGELOG" ]; then
|
||||||
|
AUTODISTADD="$AUTODISTADD --rebuild -- --changelog \"${AUTODISTUPDATECHANGELOG}\""
|
||||||
|
fi
|
||||||
autodistjobs=
|
autodistjobs=
|
||||||
if [ "$AUTODISTPKGS" ]; then
|
if [ "$AUTODISTPKGS" ]; then
|
||||||
for p in $AUTODISTPKGS; do
|
for p in $AUTODISTPKGS; do
|
||||||
@ -950,17 +968,24 @@ if [ "$MAINTAINERMODE" != "true" ]; then
|
|||||||
echo -n "<operationpanel><![CDATA["
|
echo -n "<operationpanel><![CDATA["
|
||||||
showEnvironmentPanel
|
showEnvironmentPanel
|
||||||
echo -n "<hr>"
|
echo -n "<hr>"
|
||||||
[ "$PACKAGE" ] && echo -n "Package: <b>$PACKAGE</b><br>Version: <b>${SPECVAR_Version[0]}-${SPECVAR_Release[0]}</b><br>"
|
[ "$PACKAGE" ] && {
|
||||||
|
echo -n "Package: <b>$PACKAGE</b><br>Version: <b>"
|
||||||
|
[ "${SPECVAR_Epoch[0]}" ] && echo -n "${SPECVAR_Epoch[0]}:" || echo -n "0:"
|
||||||
|
echo -n "${SPECVAR_Version[0]}-${SPECVAR_Release[0]}</b><br>"
|
||||||
|
}
|
||||||
echo -n "Target arch:<select id=rpmbuildarch>"
|
echo -n "Target arch:<select id=rpmbuildarch>"
|
||||||
for f in i586 arm x86_64 ppc; do
|
for f in i586 arm x86_64 ppc; do
|
||||||
SELECTED=
|
SELECTED=
|
||||||
if [ ! "$RPMBUILDARCH" -a "$f" = "${AUTOPORT_ARCH[$ENVIRONMENT]}" ]; then
|
if [ "$f" = "$RPMBUILDARCH" ]; then
|
||||||
|
SELECTED="selected=\"selected\"";
|
||||||
|
elif [ ! "$RPMBUILDARCH" -a "$f" = "${AUTOPORT_ARCH[$ENVIRONMENT]}" ]; then
|
||||||
SELECTED="selected=\"selected\"";
|
SELECTED="selected=\"selected\"";
|
||||||
fi
|
fi
|
||||||
echo -n "<option value=\"$f\" $SELECTED>$f</option>"
|
echo -n "<option value=\"$f\" $SELECTED>$f</option>"
|
||||||
done
|
done
|
||||||
echo -n "</select>"
|
echo -n "</select>"
|
||||||
echo -n "<label style=\"background-color:red;padding:1px;\"><input type=checkbox id=\"rpmforce\" value=\"force\">force </label>"
|
echo -n "<label style=\"background-color:red;padding:1px;\"><input type=checkbox id=\"rpmforce\" value=\"force\">force </label>"
|
||||||
|
echo -n "<label style=\"padding:1px;\"><input type=checkbox id=\"debug\" value=\"debug\">debug </label>"
|
||||||
# destination repository select
|
# destination repository select
|
||||||
echo -n "<br>Send to:"
|
echo -n "<br>Send to:"
|
||||||
echo -n "<select id=sendrepository>"
|
echo -n "<select id=sendrepository>"
|
||||||
@ -1029,7 +1054,8 @@ if [ "$MAINTAINERMODE" != "true" ]; then
|
|||||||
if [ "$AUTODISTJOB" -a "$AUTODISTJOB" = "$f" ]; then
|
if [ "$AUTODISTJOB" -a "$AUTODISTJOB" = "$f" ]; then
|
||||||
SELECTED="selected=\"selected\""
|
SELECTED="selected=\"selected\""
|
||||||
AUTODISTJOBSELECTED=1
|
AUTODISTJOBSELECTED=1
|
||||||
elif [ "$PACKAGE" = "$f" -a ! "$AUTODISTJOBSELECTED" ]; then
|
elif [ "$PACKAGE" = "$f" -a ! "$AUTODISTJOB" ]; then
|
||||||
|
# elif [ "$PACKAGE" = "$f" -a ! "$AUTODISTJOBSELECTED" -a "$REQUEST" != "autodistjobchange" ]; then
|
||||||
SELECTED="selected=\"selected\""
|
SELECTED="selected=\"selected\""
|
||||||
AUTODISTJOB=$f
|
AUTODISTJOB=$f
|
||||||
AUTODISTJOBSELECTED=1
|
AUTODISTJOBSELECTED=1
|
||||||
@ -1044,7 +1070,9 @@ if [ "$MAINTAINERMODE" != "true" ]; then
|
|||||||
fi
|
fi
|
||||||
echo -n "</select>"
|
echo -n "</select>"
|
||||||
if [ "$AUTODISTJOB" ]; then
|
if [ "$AUTODISTJOB" ]; then
|
||||||
echo -n "<br>Job packages:<div class=multiselect style=\"height:60px;\">"
|
echo -n "<br>Job packages:"
|
||||||
|
echo -n "<label><input type=checkbox name=autodistpkgsselectallcheckbox value=\"\" onclick=checkAllBoxes('autodistpkgscheckbox',this.checked);>select/unselect all</label>"
|
||||||
|
echo -n "<div class=multiselect style=\"height:60px;\">"
|
||||||
for p in `$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist --list-pkgs $AUTODISTJOB"`; do
|
for p in `$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist --list-pkgs $AUTODISTJOB"`; do
|
||||||
if [ "$AUTODISTPKGS" ]; then
|
if [ "$AUTODISTPKGS" ]; then
|
||||||
for i in $AUTODISTPKGS; do
|
for i in $AUTODISTPKGS; do
|
||||||
@ -1068,9 +1096,11 @@ if [ "$MAINTAINERMODE" != "true" ]; then
|
|||||||
echo -n "<input type=button value=\"update\" onclick="
|
echo -n "<input type=button value=\"update\" 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 "DEBUG=\"+getElementById('debug').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 "AUTODISTUPDATECHANGELOG=\"+encodeURIComponent(getElementById('autodistupdatechangelog').value)+\"&"
|
||||||
echo -n "ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=autodistupdate\");>"
|
echo -n "ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=autodistupdate\");>"
|
||||||
# autodist build
|
# autodist build
|
||||||
echo -n "<input type=button value=\"build\" onclick="
|
echo -n "<input type=button value=\"build\" onclick="
|
||||||
@ -1105,6 +1135,9 @@ if [ "$MAINTAINERMODE" != "true" ]; then
|
|||||||
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 $DISABLED>"
|
||||||
|
# autodist update changelog
|
||||||
|
echo -n "Rebuild changelog:"
|
||||||
|
echo -n "<input type=text id=autodistupdatechangelog style=\"width:95%\">"
|
||||||
# autodist schedule
|
# autodist schedule
|
||||||
echo -n "<br><input type=button value=\"schedule job\" onclick="
|
echo -n "<br><input type=button value=\"schedule job\" onclick="
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
@ -1114,17 +1147,14 @@ if [ "$MAINTAINERMODE" != "true" ]; then
|
|||||||
echo -n "(version:<input type=text id=scheduleversion value=\"\" size=\"6\">)"
|
echo -n "(version:<input type=text id=scheduleversion value=\"\" size=\"6\">)"
|
||||||
# autodist show schedule
|
# autodist show schedule
|
||||||
echo -n "<input type=button value=\"show schedule\" onclick=ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
echo -n "<input type=button value=\"show schedule\" onclick=ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "AUTODISTCURRENT=\"+getElementById('autodistcurrentcheckbox').checked+\"&"
|
|
||||||
echo -n "REQUEST=showscheduled\");>"
|
echo -n "REQUEST=showscheduled\");>"
|
||||||
# autodist unschedule
|
# autodist unschedule
|
||||||
echo -n "<input type=button value=\"unschedule\" onclick=ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
echo -n "<input type=button value=\"unschedule\" onclick=ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "AUTODISTJOB=\"+getSelectedValueById('autodistjobs')+\"&"
|
echo -n "AUTODISTJOB=\"+getSelectedValueById('autodistjobs')+\"&"
|
||||||
echo -n "AUTODISTCURRENT=\"+getElementById('autodistcurrentcheckbox').checked+\"&"
|
|
||||||
echo -n "REQUEST=unschedule\"); class=redbutton>"
|
echo -n "REQUEST=unschedule\"); class=redbutton>"
|
||||||
# autodist skip
|
# autodist skip
|
||||||
echo -n "<input type=button value=\"skip\" onclick=ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
echo -n "<input type=button value=\"skip\" onclick=ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "AUTODISTJOB=\"+getSelectedValueById('autodistjobs')+\"&"
|
echo -n "AUTODISTJOB=\"+getSelectedValueById('autodistjobs')+\"&"
|
||||||
echo -n "AUTODISTCURRENT=\"+getElementById('autodistcurrentcheckbox').checked+\"&"
|
|
||||||
echo -n "REQUEST=skip\""
|
echo -n "REQUEST=skip\""
|
||||||
echo -n ",\"`cgi_encodevar "Skip <b>"`\"+getSelectedValueById('autodistjobs')+\"`cgi_encodevar "</b> from being checked for automatic updates for a period?"`\""
|
echo -n ",\"`cgi_encodevar "Skip <b>"`\"+getSelectedValueById('autodistjobs')+\"`cgi_encodevar "</b> from being checked for automatic updates for a period?"`\""
|
||||||
echo -n "); class=redbutton><br>"
|
echo -n "); class=redbutton><br>"
|
||||||
@ -1240,7 +1270,7 @@ if [ "$MAINTAINERMODE" != "true" ]; then
|
|||||||
echo -n "ADDPATCHNAME=\"+encodeURIComponent(getElementById('addpatchname').value));>"
|
echo -n "ADDPATCHNAME=\"+encodeURIComponent(getElementById('addpatchname').value));>"
|
||||||
echo -n " <a href=\"http://pastebin.com\" target=_new>pastebin</a><br>"
|
echo -n " <a href=\"http://pastebin.com\" target=_new>pastebin</a><br>"
|
||||||
echo -n "URL:<input type=text id=addpatchurl value=\"\" size=\"28\">"
|
echo -n "URL:<input type=text id=addpatchurl value=\"\" size=\"28\">"
|
||||||
echo -n "<br>As: $PACKAGE-<input type=text id=addpatchname value=\"\" size=\"13\">.patch"
|
echo -n "<br>$PACKAGE-${SPECVAR_Version}-<input type=text id=addpatchname value=\"\" size=\"10\">.patch"
|
||||||
echo -n "</div><hr>"
|
echo -n "</div><hr>"
|
||||||
# info from package sources
|
# info from package sources
|
||||||
echo -n "<b>Info from package in the works:</b><br>"
|
echo -n "<b>Info from package in the works:</b><br>"
|
||||||
@ -1296,6 +1326,16 @@ if [ "$MAINTAINERMODE" != "true" ]; then
|
|||||||
# approved licenses
|
# approved licenses
|
||||||
echo -n "<input type=button value=\"approved licenses\" onclick="
|
echo -n "<input type=button value=\"approved licenses\" onclick="
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=approvedlicenses\");>"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=approvedlicenses\");>"
|
||||||
|
# templates
|
||||||
|
echo -n "<select id=autospectemplate onchange="
|
||||||
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=showautospectemplate&"
|
||||||
|
echo -n "AUTOSPECTEMPLATE=\"+getSelectedValueById('autospectemplate'));>"
|
||||||
|
echo -n "<option value=\"\">-- display a .spec template --</option>"
|
||||||
|
for f in $WORKINGROOT/usr/share/autospec/templates/*; do
|
||||||
|
autospectemplatename=`basename $f`
|
||||||
|
echo -n "<option value=\"$autospectemplatename\">$autospectemplatename</option>"
|
||||||
|
done
|
||||||
|
echo -n "</select></div>"
|
||||||
# macros
|
# macros
|
||||||
echo -n "<select id=macrosfile onchange="
|
echo -n "<select id=macrosfile onchange="
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=showmacrosfile&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=showmacrosfile&"
|
||||||
@ -1325,7 +1365,9 @@ echo -n "</textarea>"
|
|||||||
echo -n "]]></chatpanel>"
|
echo -n "]]></chatpanel>"
|
||||||
|
|
||||||
if [ "$REQUEST" != "" ]; then
|
if [ "$REQUEST" != "" ]; then
|
||||||
echo -n "<output><![CDATA[<hr><b>Console output ($REQUEST for $PACKAGE):</b>"
|
echo -n "<output><![CDATA[<hr><b>Console output ($REQUEST"
|
||||||
|
[ "$PACKAGE" ] && echo -n " for $PACKAGE"
|
||||||
|
echo -n "):</b>"
|
||||||
echo -n "<div align=left class=output "
|
echo -n "<div align=left class=output "
|
||||||
if [ "$REQUEST" = "rpmbuild" -o "$REQUEST" = "autoportnp" -o "$REQUEST" = "rpmprepare" \
|
if [ "$REQUEST" = "rpmbuild" -o "$REQUEST" = "autoportnp" -o "$REQUEST" = "rpmprepare" \
|
||||||
-o "$REQUEST" = "sendpackage" -o "$REQUEST" = "sendsource" -o "$REQUEST" = "autospeclistcheck" \
|
-o "$REQUEST" = "sendpackage" -o "$REQUEST" = "sendsource" -o "$REQUEST" = "autospeclistcheck" \
|
||||||
@ -1516,13 +1558,13 @@ case $REQUEST in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"addpatch") if [ "$ADDPATCHURL" -a "$ADDPATCHNAME" ]; then
|
"addpatch") if [ "$ADDPATCHURL" -a "$ADDPATCHNAME" ]; then
|
||||||
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "curl -skL \"$ADDPATCHURL\" -o ../SOURCES/$PACKAGE-$ADDPATCHNAME.patch"
|
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "curl -sSkL '$ADDPATCHURL' -o ../SOURCES/$PACKAGE-${SPECVAR_Version}-$ADDPATCHNAME.patch"
|
||||||
RET=$?
|
RET=$?
|
||||||
[ $RET -eq 0 ] && {
|
[ $RET -eq 0 ] && {
|
||||||
echo -n "Patch added with name <b>$PACKAGE-$ADDPATCHNAME.patch</b>."
|
echo -n "Patch added with name <b>$PACKAGE-${SPECVAR_Version}-$ADDPATCHNAME.patch</b>."
|
||||||
echo -n "<br><br><font color=gold>HINT: add the following lines to the .spec file in the appropriate sections (fix indexes if needed):</font><br>"
|
echo -n "<br><br><font color=gold>HINT: add the following lines to the .spec file in the appropriate sections (fix indexes if needed):</font><br>"
|
||||||
NEWPATCHNUM=`expr ${#SPECVAR_Patch[*]} + 1`
|
NEWPATCHNUM=`expr ${#SPECVAR_Patch[*]} + 1`
|
||||||
echo -ne "<br><pre>Patch$NEWPATCHNUM: $PACKAGE-$ADDPATCHNAME.patch\n\n%patch$NEWPATCHNUM -p1</pre>"
|
echo -ne "<br><pre>Patch$NEWPATCHNUM: $PACKAGE-${SPECVAR_Version}-$ADDPATCHNAME.patch\n\n%patch$NEWPATCHNUM -p1</pre>"
|
||||||
RET=-1
|
RET=-1
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1681,6 +1723,9 @@ case $REQUEST in
|
|||||||
"configurelog") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cd $SPECVAR_RPMBUILDDIR/$SPECVAR_BUILDDIR && cat config.log"
|
"configurelog") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cd $SPECVAR_RPMBUILDDIR/$SPECVAR_BUILDDIR && cat config.log"
|
||||||
RET=$?
|
RET=$?
|
||||||
[ $RET -eq 0 ] && RET=-1 ;;
|
[ $RET -eq 0 ] && RET=-1 ;;
|
||||||
|
"showautospectemplate") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cat /usr/share/autospec/templates/$AUTOSPECTEMPLATE"
|
||||||
|
RET=$?
|
||||||
|
[ $RET -eq 0 ] && RET=-1 ;;
|
||||||
"showmacrosfile") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cat /etc/rpm/macros.$MACROSFILE"
|
"showmacrosfile") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cat /etc/rpm/macros.$MACROSFILE"
|
||||||
RET=$?
|
RET=$?
|
||||||
[ $RET -eq 0 ] && RET=-1 ;;
|
[ $RET -eq 0 ] && RET=-1 ;;
|
||||||
@ -1860,10 +1905,14 @@ if [ "$MAINTAINERMODE" = "true" ]; then
|
|||||||
[ "$REPOSITORY" ] && echo -n "$REPOSITORY " || echo -n "no repository "
|
[ "$REPOSITORY" ] && echo -n "$REPOSITORY " || echo -n "no repository "
|
||||||
echo -n "(Maintainer mode)"
|
echo -n "(Maintainer mode)"
|
||||||
else
|
else
|
||||||
[ "$PACKAGE" ] && echo -n "$PACKAGE $SPECVAR_Version-$SPECVAR_Release " || echo -n "no package "
|
[ "$PACKAGE" ] && {
|
||||||
|
echo -n "$PACKAGE "
|
||||||
|
[ "${SPECVAR_Epoch[0]}" ] && echo -n "${SPECVAR_Epoch[0]}:"
|
||||||
|
echo -n "$SPECVAR_Version-$SPECVAR_Release " || echo -n "no package "
|
||||||
echo -n "("
|
echo -n "("
|
||||||
print_environment_descr $ENVIRONMENT
|
print_environment_descr $ENVIRONMENT
|
||||||
echo -n ")"
|
echo -n ")"
|
||||||
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n " :: openmamba webbuild</title>"
|
echo -n " :: openmamba webbuild</title>"
|
||||||
|
@ -53,7 +53,7 @@ function showlog() {
|
|||||||
tail -n +0 -f $f --pid $PROCESSPID | sed "s|<|\<|g"
|
tail -n +0 -f $f --pid $PROCESSPID | sed "s|<|\<|g"
|
||||||
echo -n "<!-- ENDSCROLL -->"
|
echo -n "<!-- ENDSCROLL -->"
|
||||||
else
|
else
|
||||||
if [ $LOGFILESIZE -lt 131072 ]; then
|
if [ $LOGFILESIZE -lt 524288 ]; then
|
||||||
if [ -r $f ]; then
|
if [ -r $f ]; then
|
||||||
cat $f | parse_build_output $PACKAGE
|
cat $f | parse_build_output $PACKAGE
|
||||||
else
|
else
|
||||||
@ -61,13 +61,13 @@ function showlog() {
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ -r $f ]; then
|
if [ -r $f ]; then
|
||||||
head -c 65535 $f | parse_build_output $PACKAGE
|
head -c 262144 $f | parse_build_output $PACKAGE
|
||||||
echo "<br><font style=\"background-color:yellow;color:black\"><------ CUT (long file) -------></font>"
|
echo "<br><font style=\"background-color:yellow;color:black\"><------ CUT (long file) -------></font>"
|
||||||
tail -c 65535 $f | parse_build_output $PACKAGE
|
tail -c 262144 $f | parse_build_output $PACKAGE
|
||||||
else
|
else
|
||||||
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "head -c 65535 $f" | parse_build_output $PACKAGE
|
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "head -c 262144 $f" | parse_build_output $PACKAGE
|
||||||
echo "<br><font style=\"background-color:yellow;color:black\"><------ CUT (long file) -------></font>"
|
echo "<br><font style=\"background-color:yellow;color:black\"><------ CUT (long file) -------></font>"
|
||||||
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "tail -c 65535 $f" | parse_build_output $PACKAGE
|
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "tail -c 262144 $f" | parse_build_output $PACKAGE
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -99,8 +99,15 @@ function showEnvironmentPanel() {
|
|||||||
|
|
||||||
#echo "<br>Base repository: <b>${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]}</b>"
|
#echo "<br>Base repository: <b>${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]}</b>"
|
||||||
|
|
||||||
|
# toolchain
|
||||||
|
echo -n "<br>"
|
||||||
|
local toolchain_output=`$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "LANGUAGE=C gcc --version | head -n1; LANGUAGE=C ld -v"`
|
||||||
|
local gcc_ver=`echo $toolchain_output | sed "s|.*(GCC) \([0-9.]*\) .*|\1|"`
|
||||||
|
local binutils_ver=`echo $toolchain_output | sed "s|.*GNU \(.*\) (GNU Binutils.*)\(.*\)|\1 \2|"`
|
||||||
|
echo "Toolchain: gcc $gcc_ver, $binutils_ver"
|
||||||
|
|
||||||
# smart upgrade
|
# smart upgrade
|
||||||
echo -n "<input type=button id=smartupgrade value=\"system upgrade\" onclick="
|
echo -n "<br><input type=button id=smartupgrade value=\"system upgrade\" onclick="
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "REQUEST=smartupgrade\""
|
echo -n "REQUEST=smartupgrade\""
|
||||||
echo -n ",\"`cgi_encodevar "Upgrade current environment to latest updates now?"`\"); class=redbutton>"
|
echo -n ",\"`cgi_encodevar "Upgrade current environment to latest updates now?"`\"); class=redbutton>"
|
||||||
@ -111,7 +118,7 @@ function showEnvironmentPanel() {
|
|||||||
#echo -n "REQUEST=runldconfig\");>"
|
#echo -n "REQUEST=runldconfig\");>"
|
||||||
|
|
||||||
# environment search
|
# environment search
|
||||||
echo -n "<br>Installed:<input type=text size=23 style=\"align:center;padding:0;margin:2px;\" id=environmentsearch value=\"Search package or provide...\" "
|
echo -n "<br>Provides:<input type=text size=23 style=\"align:center;padding:0;margin:2px;\" id=environmentsearch value=\"Search package or provide...\" "
|
||||||
echo -n "onfocus=\"if (this.value==this.defaultValue) this.value=''\" "
|
echo -n "onfocus=\"if (this.value==this.defaultValue) this.value=''\" "
|
||||||
echo -n "onkeypress=if(checkEnter(event))ajax_getvalues(\""
|
echo -n "onkeypress=if(checkEnter(event))ajax_getvalues(\""
|
||||||
echo -n "ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
echo -n "ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
@ -147,12 +154,13 @@ function print_editorcontrols() {
|
|||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue())+\"&"
|
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue())+\"&"
|
||||||
echo -n "REQUEST=addpkgnote&PKGNOTE=\"+encodeURIComponent(getElementById('pkgnote').value));>"
|
echo -n "REQUEST=addpkgnote&PKGNOTE=\"+encodeURIComponent(getElementById('pkgnote').value));>"
|
||||||
echo -n "<input type=text id=pkgnote value=\"\" size=\"55\">"
|
echo -n "<input type=text id=pkgnote value=\"\" size=\"50\">"
|
||||||
# specfile update
|
# specfile update
|
||||||
echo -n "<br><input type=button id=updatespecbutton value=\"update\" onclick="
|
echo -n "<br><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+\"&"
|
||||||
echo -n "RPMFORCE=\"+getElementById('rpmforce').checked+\"&"
|
echo -n "RPMFORCE=\"+getElementById('rpmforce').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 " (specify new version:<input type=text id=updatespecversion value=\"\" size=\"12\">"
|
echo -n " (specify new version:<input type=text id=updatespecversion value=\"\" size=\"12\">"
|
||||||
|
@ -114,9 +114,11 @@ cmdtmpfile=`mktemp --suffix=.webbuildcmd`
|
|||||||
[ "$PACKAGE" ] || PACKAGE=nopackage
|
[ "$PACKAGE" ] || PACKAGE=nopackage
|
||||||
if [ "$MODE" = "background" ]; then
|
if [ "$MODE" = "background" ]; then
|
||||||
if [ "$WORKINGHOME" ]; then
|
if [ "$WORKINGHOME" ]; then
|
||||||
|
[ "$DEBUG" ] && echo "=> . /etc/profile;cd $WORKINGHOME/RPM/SPECS;$SUCMDPREFIX \"$COMMAND\""
|
||||||
$SUCMDPREFIX ". /etc/profile;cd $WORKINGHOME/RPM/SPECS;$COMMAND;echo \"# WEBBUILD_EXITCODE=\$?\"" 2>&1 | tr -d '\f' > $cmdtmpfile &
|
$SUCMDPREFIX ". /etc/profile;cd $WORKINGHOME/RPM/SPECS;$COMMAND;echo \"# WEBBUILD_EXITCODE=\$?\"" 2>&1 | tr -d '\f' > $cmdtmpfile &
|
||||||
#sed "s|<|\<|g" |
|
#sed "s|<|\<|g" |
|
||||||
else
|
else
|
||||||
|
[ "$DEBUG" ] && echo "=> $SUCMDPREFIX \"$COMMAND\""
|
||||||
$SUCMDPREFIX "$COMMAND;echo \"# WEBBUILD_EXITCODE=\$?\"" 2>&1 | sed "s|<|\<|g" | tr -d '\f' > $cmdtmpfile &
|
$SUCMDPREFIX "$COMMAND;echo \"# WEBBUILD_EXITCODE=\$?\"" 2>&1 | sed "s|<|\<|g" | tr -d '\f' > $cmdtmpfile &
|
||||||
fi
|
fi
|
||||||
echo "$! $USER $ENVIRONMENT $PACKAGE $cmdtmpfile 256 $COMMAND" >> $WEBBUILD_STATEDIR/processes
|
echo "$! $USER $ENVIRONMENT $PACKAGE $cmdtmpfile 256 $COMMAND" >> $WEBBUILD_STATEDIR/processes
|
||||||
@ -128,9 +130,11 @@ else
|
|||||||
echo "$$ $USER $ENVIRONMENT $PACKAGE $cmdtmpfile 256 $COMMAND" >> $WEBBUILD_STATEDIR/processes
|
echo "$$ $USER $ENVIRONMENT $PACKAGE $cmdtmpfile 256 $COMMAND" >> $WEBBUILD_STATEDIR/processes
|
||||||
rettmpfile=`$SUCMDPREFIX "mktemp --suffix=.webbuildret"`
|
rettmpfile=`$SUCMDPREFIX "mktemp --suffix=.webbuildret"`
|
||||||
if [ "$WORKINGHOME" ]; then
|
if [ "$WORKINGHOME" ]; then
|
||||||
|
[ "$DEBUG" ] && echo "=> . /etc/profile;cd $WORKINGHOME/RPM/SPECS;$SUCMDPREFIX \"$COMMAND\""
|
||||||
$SUCMDPREFIX ". /etc/profile;cd $WORKINGHOME/RPM/SPECS;$COMMAND;echo \$? > $rettmpfile" 2>&1 | tr -d '\f' | tee $cmdtmpfile
|
$SUCMDPREFIX ". /etc/profile;cd $WORKINGHOME/RPM/SPECS;$COMMAND;echo \$? > $rettmpfile" 2>&1 | tr -d '\f' | tee $cmdtmpfile
|
||||||
# sed "s|<|\<|g" |
|
# sed "s|<|\<|g" |
|
||||||
else
|
else
|
||||||
|
[ "$DEBUG" ] && echo "=> $SUCMDPREFIX \"$COMMAND\""
|
||||||
$SUCMDPREFIX "$COMMAND;echo \$? > $rettmpfile" 2>&1 | tr -d '\f' | tee $cmdtmpfile
|
$SUCMDPREFIX "$COMMAND;echo \$? > $rettmpfile" 2>&1 | tr -d '\f' | tee $cmdtmpfile
|
||||||
# sed "s|<|\<|g" |
|
# sed "s|<|\<|g" |
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user