webbuild: added maintainer mode; URI-encode package names to fix packages with '+' characters; other fixes
This commit is contained in:
parent
c1ed68dd78
commit
dd53d60b85
@ -11,6 +11,23 @@ LOG=/var/autodist/webbuild/access_log
|
|||||||
DEFAULT_ENVIRONMENT=0
|
DEFAULT_ENVIRONMENT=0
|
||||||
[ "`uname -m`" = "x86_64" ] && HOST_IS_X86_64=1
|
[ "`uname -m`" = "x86_64" ] && HOST_IS_X86_64=1
|
||||||
|
|
||||||
|
function cgi_encodevar() {
|
||||||
|
local string="${1}"
|
||||||
|
local strlen=${#string}
|
||||||
|
local encoded=""
|
||||||
|
|
||||||
|
for (( pos=0 ; pos<strlen ; pos++ )); do
|
||||||
|
c=${string:$pos:1}
|
||||||
|
case "$c" in
|
||||||
|
[-_.~a-zA-Z0-9] ) o="${c}" ;;
|
||||||
|
* ) printf -v o '%%%02x' "'$c"
|
||||||
|
esac
|
||||||
|
encoded+="${o}"
|
||||||
|
done
|
||||||
|
echo "${encoded}" # You can either set a return variable (FASTER)
|
||||||
|
REPLY="${encoded}" #+or echo the result (EASIER)... or both... :p
|
||||||
|
}
|
||||||
|
|
||||||
#This code for getting code from post data is from http://oinkzwurgl.org/bash_cgi and
|
#This code for getting code from post data is from http://oinkzwurgl.org/bash_cgi and
|
||||||
#was written by Phillippe Kehi <phkehi@gmx.net> and flipflip industries
|
#was written by Phillippe Kehi <phkehi@gmx.net> and flipflip industries
|
||||||
|
|
||||||
@ -103,6 +120,10 @@ function cgi_getvars()
|
|||||||
|
|
||||||
# register all GET and POST variables
|
# register all GET and POST variables
|
||||||
cgi_getvars BOTH ALL
|
cgi_getvars BOTH ALL
|
||||||
|
|
||||||
|
#[ "$PACKAGE" ] && PACKAGEENCODED=`cgi_encodevar "$PACKAGE"` || PACKAGEENCODED=
|
||||||
|
[ "$PACKAGE" ] && PACKAGEENCODED=`cgi_encodevar "$PACKAGE"` || PACKAGEENCODED=
|
||||||
|
|
||||||
#cgi_getvars POST
|
#cgi_getvars POST
|
||||||
if [ "$REQUEST" != "refresh" ]; then
|
if [ "$REQUEST" != "refresh" ]; then
|
||||||
# echo "`date` - $QUERY_STRING_POST" >> $LOG
|
# echo "`date` - $QUERY_STRING_POST" >> $LOG
|
||||||
@ -162,7 +183,7 @@ if [ "$SECRET" -a "$USER" ]; then
|
|||||||
# no "$USER_SECRET" set; require password
|
# no "$USER_SECRET" set; require password
|
||||||
echo -n "<output><![CDATA[Please enter your password: <input type=password id=password>"
|
echo -n "<output><![CDATA[Please enter your password: <input type=password id=password>"
|
||||||
echo -n " <input type=button value=\"Submit\" onClick=javascript:"
|
echo -n " <input type=button value=\"Submit\" onClick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "REQUEST=password&PASSWORD=\"+encodeURIComponent(getElementById('password').value));>"
|
echo -n "REQUEST=password&PASSWORD=\"+encodeURIComponent(getElementById('password').value));>"
|
||||||
echo -n "]]></output>"
|
echo -n "]]></output>"
|
||||||
echo -n "<environments> </environments>"
|
echo -n "<environments> </environments>"
|
||||||
@ -315,10 +336,11 @@ fi
|
|||||||
[ "$PACKAGE" -a ! "$REQUEST" ] && REQUEST=edit
|
[ "$PACKAGE" -a ! "$REQUEST" ] && REQUEST=edit
|
||||||
|
|
||||||
# SPECFILES select
|
# SPECFILES select
|
||||||
if [ "$ENVIRONMENT" ]; then
|
if [ "$ENVIRONMENT" -a "$MAINTAINERMODE" != "true" ]; then
|
||||||
echo -n "<specedit><![CDATA["
|
echo -n "<specedit><![CDATA["
|
||||||
echo -n " Edit:<select id=specfile "
|
echo -n " Edit:<select id=specfile "
|
||||||
echo -n "onchange=javascript:ajax_getvalues(\"REQUEST=edit&ENVIRONMENT=$ENVIRONMENT&PACKAGE=\"+this.value+\"&REQUEST=changespec\");>"
|
echo -n "onchange=javascript:ajax_getvalues(\"REQUEST=edit&ENVIRONMENT=$ENVIRONMENT&"
|
||||||
|
echo -n "PACKAGE=\"+encodeURIComponent(this.value)+\"&REQUEST=changespec\");>"
|
||||||
echo -n "<option value=\"\">-- Select a .spec file --</option>"
|
echo -n "<option value=\"\">-- Select a .spec file --</option>"
|
||||||
for f in `$SUDO_WRAPPER $ENVIRONMENT "" "ls *.spec"`; do
|
for f in `$SUDO_WRAPPER $ENVIRONMENT "" "ls *.spec"`; do
|
||||||
specname=${f/.*}
|
specname=${f/.*}
|
||||||
@ -326,6 +348,8 @@ if [ "$ENVIRONMENT" ]; then
|
|||||||
echo -n "<option value=\"$specname\" $SELECTED>${specname}.spec</option>"
|
echo -n "<option value=\"$specname\" $SELECTED>${specname}.spec</option>"
|
||||||
done
|
done
|
||||||
echo -n "</select>]]></specedit>"
|
echo -n "</select>]]></specedit>"
|
||||||
|
elif [ "$MAINTAINERMODE" = "true" ]; then
|
||||||
|
echo -n "<specedit> </specedit>"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# clean output when changing environment
|
# clean output when changing environment
|
||||||
@ -339,7 +363,7 @@ fi
|
|||||||
if [ ! "$REPSEARCHTEXT" ]; then
|
if [ ! "$REPSEARCHTEXT" ]; then
|
||||||
echo -n "<searchbox><![CDATA["
|
echo -n "<searchbox><![CDATA["
|
||||||
echo -n "<div class=searchbox><input type=button id=repsearchbutton value=\"Search repositories:\" onclick=javascript:ajax_getvalues(\""
|
echo -n "<div class=searchbox><input type=button id=repsearchbutton value=\"Search repositories:\" onclick=javascript:ajax_getvalues(\""
|
||||||
echo -n "ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&"
|
echo -n "ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "REQUEST=repsearch&REPSEARCHTEXT=\"+encodeURIComponent(getElementById('repsearchtext').value));>"
|
echo -n "REQUEST=repsearch&REPSEARCHTEXT=\"+encodeURIComponent(getElementById('repsearchtext').value));>"
|
||||||
if [ "$PACKAGE" ]; then
|
if [ "$PACKAGE" ]; then
|
||||||
echo -n "<input type=text id=repsearchtext value=\"${PACKAGE}-\" size=\"15\">"
|
echo -n "<input type=text id=repsearchtext value=\"${PACKAGE}-\" size=\"15\">"
|
||||||
@ -356,7 +380,7 @@ if [ ! "$REPOSITORY" ]; then
|
|||||||
if [ "$USER_CANIMPORT" ]; then
|
if [ "$USER_CANIMPORT" ]; then
|
||||||
echo -n "&MAINTAINERMODE=\"+getElementById('maintain').checked+\""
|
echo -n "&MAINTAINERMODE=\"+getElementById('maintain').checked+\""
|
||||||
fi
|
fi
|
||||||
echo -n "&PACKAGE=$PACKAGE&REQUEST=changerepository\");>"
|
echo -n "&PACKAGE=$PACKAGEENCODED&REQUEST=changerepository\");>"
|
||||||
echo -n "<option value=\"\">-- Select a repository --</option>"
|
echo -n "<option value=\"\">-- Select a repository --</option>"
|
||||||
for f in `$SUDO_WRAPPER local "" "/usr/sbin/openmamba-repository list"`; do
|
for f in `$SUDO_WRAPPER local "" "/usr/sbin/openmamba-repository list"`; do
|
||||||
repname=`basename $f`
|
repname=`basename $f`
|
||||||
@ -369,7 +393,7 @@ if [ ! "$REPOSITORY" ]; then
|
|||||||
echo -n "onclick=javascript:i=getElementById('repository').selectedIndex;"
|
echo -n "onclick=javascript:i=getElementById('repository').selectedIndex;"
|
||||||
echo -n "ajax_getvalues(\"REPOSITORY=\"+getElementById('repository').options[i].text+\""
|
echo -n "ajax_getvalues(\"REPOSITORY=\"+getElementById('repository').options[i].text+\""
|
||||||
echo -n "&MAINTAINERMODE=\"+getElementById('maintain').checked+\""
|
echo -n "&MAINTAINERMODE=\"+getElementById('maintain').checked+\""
|
||||||
echo -n "&PACKAGE=$PACKAGE&ENVIRONMENT=$ENVIRONMENT\");>maintainer mode "
|
echo -n "&PACKAGE=$PACKAGEENCODED&ENVIRONMENT=$ENVIRONMENT\");>maintainer mode "
|
||||||
fi
|
fi
|
||||||
echo -n "]]></repositories>"
|
echo -n "]]></repositories>"
|
||||||
echo -n "<packages> </packages>"
|
echo -n "<packages> </packages>"
|
||||||
@ -381,8 +405,9 @@ if [ "$REPOSITORY" -a "$REQUEST" = "changerepository" ]; then
|
|||||||
echo -n "<packages><![CDATA["
|
echo -n "<packages><![CDATA["
|
||||||
echo -n "<select id=package "
|
echo -n "<select id=package "
|
||||||
echo -n "onchange=javascript:i=getElementById('repository').selectedIndex;ajax_getvalues(\"REQUEST=changesrpm&"
|
echo -n "onchange=javascript:i=getElementById('repository').selectedIndex;ajax_getvalues(\"REQUEST=changesrpm&"
|
||||||
echo -n "ENVIRONMENT=$ENVIRONMENT&MAINTAINERMODE=\"+getElementById('maintain').checked+\"&PACKAGE=\"+this.value+\""
|
echo -n "ENVIRONMENT=$ENVIRONMENT&MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
||||||
echo -n "&REPOSITORY=\"+getElementById('repository').options[i].text);>"
|
echo -n "PACKAGE=\"+encodeURIComponent(this.value)+\"&"
|
||||||
|
echo -n "REPOSITORY=\"+getElementById('repository').options[i].text);>"
|
||||||
echo "<option value=\"\">-- Select a SRPM package --</option>"
|
echo "<option value=\"\">-- Select a SRPM package --</option>"
|
||||||
for f in $local_ftp/$REPOSITORY/SRPMS.base/*.src.rpm; do
|
for f in $local_ftp/$REPOSITORY/SRPMS.base/*.src.rpm; do
|
||||||
[ -r $f ] || continue
|
[ -r $f ] || continue
|
||||||
@ -418,7 +443,7 @@ if [ ! "$REQUEST" ]; then
|
|||||||
echo -n " version:<input type=text id=speccreateversion value=\"\" size=\"6\">"
|
echo -n " version:<input type=text id=speccreateversion value=\"\" size=\"6\">"
|
||||||
echo -n "<input type=button id=speccreatebutton value=\"Create .spec\" onclick=javascript:ajax_getvalues(\""
|
echo -n "<input type=button id=speccreatebutton value=\"Create .spec\" onclick=javascript:ajax_getvalues(\""
|
||||||
echo -n "REQUEST=speccreate&ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&"
|
echo -n "REQUEST=speccreate&ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&"
|
||||||
echo -n "PACKAGE=\"+getElementById('speccreatename').value+\"&"
|
echo -n "PACKAGE=\"+encodeURIComponent(getElementById('speccreatename').value)+\"&"
|
||||||
echo -n "SPECCREATETYPE=\"+getElementById('speccreatetype').value+\"&"
|
echo -n "SPECCREATETYPE=\"+getElementById('speccreatetype').value+\"&"
|
||||||
echo -n "SPECCREATEVERSION=\"+getElementById('speccreateversion').value+\"&"
|
echo -n "SPECCREATEVERSION=\"+getElementById('speccreateversion').value+\"&"
|
||||||
echo -n "SPECCREATEURL=\"+encodeURIComponent(getElementById('speccreateurl').value));>"
|
echo -n "SPECCREATEURL=\"+encodeURIComponent(getElementById('speccreateurl').value));>"
|
||||||
@ -432,7 +457,8 @@ if [ "$REQUEST" = "changesrpm" ]; then
|
|||||||
echo -n "<input type=button name=prepare value=\"prepare\" "
|
echo -n "<input type=button name=prepare value=\"prepare\" "
|
||||||
echo -n "onclick=javascript:i=getElementById('repository').selectedIndex;j=getElementById('package').selectedIndex;"
|
echo -n "onclick=javascript:i=getElementById('repository').selectedIndex;j=getElementById('package').selectedIndex;"
|
||||||
echo -n "ajax_getvalues(\"REQUEST=prepare&REPOSITORY=\"+getElementById('repository').options[i].value+\""
|
echo -n "ajax_getvalues(\"REQUEST=prepare&REPOSITORY=\"+getElementById('repository').options[i].value+\""
|
||||||
echo -n "&ENVIRONMENT=$ENVIRONMENT&MAINTAINERMODE=\"+getElementById('maintain').checked+\"&PACKAGE=\"+getElementById('package').options[j].value);>"
|
echo -n "&ENVIRONMENT=$ENVIRONMENT&MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
||||||
|
echo -n "PACKAGE=\"+encodeURIComponent(getElementById('package').options[j].value));>"
|
||||||
fi
|
fi
|
||||||
echo "]]></operations>"
|
echo "]]></operations>"
|
||||||
REQUEST="edit"
|
REQUEST="edit"
|
||||||
@ -511,15 +537,17 @@ if [ "$REQUEST" = "prepare" -o "$REQUEST" = "updatespec" -o "$REQUEST" = "speccr
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$REPOSITORY" != "" -a "$MAINTAINERMODE" = "true" ]; then
|
if [ "$REPOSITORY" != "" -a "$MAINTAINERMODE" = "true" ]; then
|
||||||
echo -n "<editcontrols> </editcontrols>"
|
if [ ! "$REQUEST" -o "$REQUEST" = "changesrpm" ]; then
|
||||||
echo -n "<editor><![CDATA["
|
echo -n "<editcontrols> </editcontrols>"
|
||||||
echo -n "<div class=maintainer>"
|
echo -n "<editor><![CDATA["
|
||||||
echo -n "<b>Recent packages in $REPOSITORY:</b><br>"
|
echo -n "<div class=maintainer>"
|
||||||
cat $local_ftp/distromatic/$REPOSITORY/_recent.inc
|
echo -n "<b>Recent packages in $REPOSITORY:</b><br>"
|
||||||
echo -n "<br><b>Log:</b><br><pre>"
|
cat $local_ftp/distromatic/$REPOSITORY/_recent.inc
|
||||||
cat $local_ftp/$REPOSITORY/distromatic.log
|
echo -n "<br><b>Log:</b><br><pre>"
|
||||||
echo -n "</pre></div>"
|
cat $local_ftp/$REPOSITORY/distromatic.log
|
||||||
echo -n "]]></editor>"
|
echo -n "</pre></div>"
|
||||||
|
echo -n "]]></editor>"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$REQUEST" = "edit" -o "$REQUEST" = "reloadspec" ]; then
|
if [ "$REQUEST" = "edit" -o "$REQUEST" = "reloadspec" ]; then
|
||||||
@ -533,13 +561,9 @@ if [ "$REQUEST" = "edit" -o "$REQUEST" = "reloadspec" ]; then
|
|||||||
fi
|
fi
|
||||||
echo -n "<editcontrols><![CDATA[Current <b>$PACKAGE.spec</b> in build environment: "
|
echo -n "<editcontrols><![CDATA[Current <b>$PACKAGE.spec</b> in build environment: "
|
||||||
echo -n "new version (empty=autodetect):<input type=text id=updatespecversion value=\"\" size=\"12\">"
|
echo -n "new version (empty=autodetect):<input type=text id=updatespecversion value=\"\" size=\"12\">"
|
||||||
# echo -n " <input type=button id=rebuildspecbutton value=\"new release\" onclick=javascript:"
|
|
||||||
# echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&"
|
|
||||||
# echo -n "REQUEST=rebuildspec&REBUILDSPECCHANGELOG=\"+getElementById('rebuildspecchangelog').value+\"&"
|
|
||||||
# echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue())); class=redbutton>"
|
|
||||||
echo -n "or new release changelog:<input type=text id=rebuildspecchangelog value=\"$REBUILDSPECCHANGELOG\" size=\"30\">"
|
echo -n "or new release changelog:<input type=text id=rebuildspecchangelog value=\"$REBUILDSPECCHANGELOG\" size=\"30\">"
|
||||||
echo -n "<input type=button id=updatespecbutton value=\"update .spec\" onclick=javascript:"
|
echo -n "<input type=button id=updatespecbutton value=\"update .spec\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&"
|
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 "REBUILDSPECCHANGELOG=\"+encodeURIComponent(getElementById('rebuildspecchangelog').value)+\"&"
|
echo -n "REBUILDSPECCHANGELOG=\"+encodeURIComponent(getElementById('rebuildspecchangelog').value)+\"&"
|
||||||
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue()));>"
|
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue()));>"
|
||||||
@ -549,15 +573,15 @@ if [ "$REQUEST" = "edit" -o "$REQUEST" = "reloadspec" ]; then
|
|||||||
$SUDO_WRAPPER $ENVIRONMENT $PACKAGE "cat $PACKAGE.spec"
|
$SUDO_WRAPPER $ENVIRONMENT $PACKAGE "cat $PACKAGE.spec"
|
||||||
echo -n "</textarea>"
|
echo -n "</textarea>"
|
||||||
echo -n "<input type=button id=savebutton value=\"save\" onclick=javascript:"
|
echo -n "<input type=button id=savebutton value=\"save\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "REQUEST=savespec&SPECTEXT=\"+encodeURIComponent(editor.getValue()));"
|
echo -n "REQUEST=savespec&SPECTEXT=\"+encodeURIComponent(editor.getValue()));"
|
||||||
echo -n "this.disabled=true; disabled=disabled class=redbutton>"
|
echo -n "this.disabled=true; disabled=disabled class=redbutton>"
|
||||||
echo -n "<input type=button id=updatespecbutton value=\"reload\" onclick=javascript:"
|
echo -n "<input type=button id=updatespecbutton value=\"reload\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "REQUEST=reloadspec\");>"
|
echo -n "REQUEST=reloadspec\");>"
|
||||||
echo -n "<input type=button id=updatespecbutton value=\"rename to:\" onclick=javascript:"
|
echo -n "<input type=button id=updatespecbutton value=\"rename to:\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&RENAMESPECFROM=$PACKAGE&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&RENAMESPECFROM=$PACKAGE&"
|
||||||
echo -n "REQUEST=renamespec&PACKAGE=\"+getElementById('specnewname').value);>"
|
echo -n "REQUEST=renamespec&PACKAGE=\"+encodeURIComponent(getElementById('specnewname').value));>"
|
||||||
echo -n "<input type=text id=specnewname value=\"\" size=\"10\">.spec"
|
echo -n "<input type=text id=specnewname value=\"\" size=\"10\">.spec"
|
||||||
echo -n "]]></editor>"
|
echo -n "]]></editor>"
|
||||||
fi
|
fi
|
||||||
@ -568,56 +592,65 @@ if [ "$REQUEST" = "edit" -o "$REQUEST" = "reloadspec" ]; then
|
|||||||
echo -n "<b>Last logs:</b> "
|
echo -n "<b>Last logs:</b> "
|
||||||
echo -n "OK <input id=\"logstatusOK\" type=\"radio\" name=\"logstatus\" value=\"OK\"> "
|
echo -n "OK <input id=\"logstatusOK\" type=\"radio\" name=\"logstatus\" value=\"OK\"> "
|
||||||
echo -n "FAILED<input type=\"radio\" name=\"logstatus\" value=\"FAILED\" checked=\"checked\"><br>"
|
echo -n "FAILED<input type=\"radio\" name=\"logstatus\" value=\"FAILED\" checked=\"checked\"><br>"
|
||||||
echo -n "<input type=button value=\"prepare\" onclick=javascript:ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&PACKAGE=$PACKAGE&"
|
echo -n "<input type=button value=\"prepare\" onclick=javascript:ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "REQUEST=showlog&LOGTYPE=prepare&LOGSTATUSOK=\"+document.all.logstatusOK.checked);>"
|
echo -n "REQUEST=showlog&LOGTYPE=prepare&LOGSTATUSOK=\"+document.all.logstatusOK.checked);>"
|
||||||
echo -n "<input type=button value=\"update\" onclick=javascript:ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&PACKAGE=$PACKAGE&"
|
echo -n "<input type=button value=\"update\" onclick=javascript:ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "REQUEST=showlog&LOGTYPE=update&LOGSTATUSOK=\"+document.all.logstatusOK.checked);>"
|
echo -n "REQUEST=showlog&LOGTYPE=update&LOGSTATUSOK=\"+document.all.logstatusOK.checked);>"
|
||||||
echo -n "<input type=button value=\"build\" onclick=javascript:ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&PACKAGE=$PACKAGE&"
|
echo -n "<input type=button value=\"build\" onclick=javascript:ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "REQUEST=showlog&LOGTYPE=build&LOGSTATUSOK=\"+document.all.logstatusOK.checked);>"
|
echo -n "REQUEST=showlog&LOGTYPE=build&LOGSTATUSOK=\"+document.all.logstatusOK.checked);>"
|
||||||
echo -n "<input type=button value=\"install\" onclick=javascript:ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&PACKAGE=$PACKAGE&"
|
echo -n "<input type=button value=\"install\" onclick=javascript:ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "REQUEST=showlog&LOGTYPE=install&LOGSTATUSOK=\"+document.all.logstatusOK.checked);>"
|
echo -n "REQUEST=showlog&LOGTYPE=install&LOGSTATUSOK=\"+document.all.logstatusOK.checked);>"
|
||||||
if [ "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then
|
if [ "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then
|
||||||
echo -n "<hr><b>Scheduled builds:</b><br>"
|
echo -n "<hr><b>Scheduled builds:</b><br>"
|
||||||
echo -n "<input type=button value=\"show\" onclick=javascript:ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&PACKAGE=$PACKAGE&"
|
echo -n "<input type=button value=\"show\" onclick=javascript:ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "REQUEST=showscheduled\");>"
|
echo -n "REQUEST=showscheduled\");>"
|
||||||
echo -n "<input type=button value=\"unschedule\" onclick=javascript:ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&PACKAGE=$PACKAGE&"
|
echo -n "<input type=button value=\"unschedule\" onclick=javascript:ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "REQUEST=unschedule\"); class=redbutton>"
|
echo -n "REQUEST=unschedule\"); class=redbutton>"
|
||||||
echo -n "<input type=button value=\"skip\" onclick=javascript:ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&PACKAGE=$PACKAGE&"
|
echo -n "<input type=button value=\"skip\" onclick=javascript:ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "REQUEST=skip\"); class=redbutton>"
|
echo -n "REQUEST=skip\"); class=redbutton>"
|
||||||
fi
|
fi
|
||||||
echo -n "<hr>"
|
echo -n "<hr>"
|
||||||
fi
|
fi
|
||||||
|
echo -n "Package: <b>$PACKAGE</b><br>"
|
||||||
echo -n "<b>RPM packaging commands:</b><br>"
|
echo -n "<b>RPM packaging commands:</b><br>"
|
||||||
|
# check for updates
|
||||||
echo -n "<input type=button value=\"check for updates\" onclick=javascript:"
|
echo -n "<input type=button value=\"check for updates\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&REQUEST=autospecupdatescheck\");>"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=autospecupdatescheck\");>"
|
||||||
|
# unpack
|
||||||
echo -n "<input type=button value=\"unpack\" onclick=javascript:"
|
echo -n "<input type=button value=\"unpack\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&REQUEST=rpmprepare&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=rpmprepare&"
|
||||||
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue()));>"
|
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue()));>"
|
||||||
|
# build
|
||||||
echo -n "<input type=button value=\"build\" onclick=javascript:"
|
echo -n "<input type=button value=\"build\" onclick=javascript:"
|
||||||
echo -n "i=getElementById('rpmbuildarch').selectedIndex;"
|
echo -n "i=getElementById('rpmbuildarch').selectedIndex;"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&REQUEST=rpmbuild&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=rpmbuild&"
|
||||||
echo -n "RPMBUILDARCH=\"+getElementById('rpmbuildarch').options[i].value+\"&"
|
echo -n "RPMBUILDARCH=\"+getElementById('rpmbuildarch').options[i].value+\"&"
|
||||||
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue())+\"&RPMFORCE=\"+getElementById('rpmforce').checked); class=boldbutton>"
|
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue())+\"&RPMFORCE=\"+getElementById('rpmforce').checked); class=boldbutton>"
|
||||||
|
# buildroot files
|
||||||
echo -n "<input type=button value=\"buildroot files\" onclick=javascript:"
|
echo -n "<input type=button value=\"buildroot files\" onclick=javascript:"
|
||||||
echo -n "i=getElementById('rpmbuildarch').selectedIndex;"
|
echo -n "i=getElementById('rpmbuildarch').selectedIndex;"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&REQUEST=buildrootfiles\");>"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=buildrootfiles\");>"
|
||||||
|
# unpackaged files
|
||||||
echo -n "<input type=button value=\"unpackaged files\" onclick=javascript:"
|
echo -n "<input type=button value=\"unpackaged files\" onclick=javascript:"
|
||||||
echo -n "i=getElementById('rpmbuildarch').selectedIndex;"
|
echo -n "i=getElementById('rpmbuildarch').selectedIndex;"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&REQUEST=autospeclistcheck&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=autospeclistcheck&"
|
||||||
echo -n "RPMBUILDARCH=\"+getElementById('rpmbuildarch').options[i].value+\"&"
|
echo -n "RPMBUILDARCH=\"+getElementById('rpmbuildarch').options[i].value+\"&"
|
||||||
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue()));>"
|
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue()));>"
|
||||||
|
# build requirements
|
||||||
echo -n "<input type=button value=\"build requirements\" onclick=javascript:"
|
echo -n "<input type=button value=\"build requirements\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&REQUEST=autospecbuildreq\");>"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=autospecbuildreq\");>"
|
||||||
echo -n "<input type=button value=\"rebuild SRPM\" onclick=javascript:"
|
# recreate SRPM
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&REQUEST=srpmbuild&"
|
echo -n "<input type=button value=\"recreate SRPM\" onclick=javascript:"
|
||||||
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=srpmbuild&"
|
||||||
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue())+\"&RPMFORCE=\"+getElementById('rpmforce').checked);>"
|
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue())+\"&RPMFORCE=\"+getElementById('rpmforce').checked);>"
|
||||||
|
# rpm checks
|
||||||
echo -n "<input type=button id=rpmchecks value=\"checks\" onclick=javascript:"
|
echo -n "<input type=button id=rpmchecks value=\"checks\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&REQUEST=rpmchecks\");>"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=rpmchecks\");>"
|
||||||
echo -n "<input type=button id=rpmsimulateinstallbutton value=\"simulate install\" onclick=javascript:"
|
echo -n "<input type=button id=rpmsimulateinstallbutton value=\"simulate install\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&REQUEST=rpmsimulateinstall\");>"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=rpmsimulateinstall\");>"
|
||||||
[ ! "$USER_CANINSTALL" ] && DISABLED="disabled=disabled"
|
[ ! "$USER_CANINSTALL" ] && DISABLED="disabled=disabled"
|
||||||
echo -n "<input type=button id=rpminstallbutton value=\"install\" onclick=javascript:"
|
echo -n "<input type=button id=rpminstallbutton value=\"install\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&REQUEST=rpminstall&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=rpminstall&"
|
||||||
echo -n "RPMFORCE=\"+getElementById('rpmforce').checked); class=redbutton $DISABLED>"
|
echo -n "RPMFORCE=\"+getElementById('rpmforce').checked); class=redbutton $DISABLED>"
|
||||||
echo -n "<br>target arch:<select id=rpmbuildarch>"
|
echo -n "<br>target arch:<select id=rpmbuildarch>"
|
||||||
for f in i586 arm x86_64 ppc; do
|
for f in i586 arm x86_64 ppc; do
|
||||||
@ -631,7 +664,7 @@ if [ "$REQUEST" = "edit" -o "$REQUEST" = "reloadspec" ]; then
|
|||||||
echo -n "<label style=\"vertical-align:middle;\"><input type=checkbox id=\"rpmforce\" value=\"force\">force</label>"
|
echo -n "<label style=\"vertical-align:middle;\"><input type=checkbox id=\"rpmforce\" value=\"force\">force</label>"
|
||||||
echo -n "<hr><b>Add patches:</b>"
|
echo -n "<hr><b>Add patches:</b>"
|
||||||
echo -n "<input type=button id=addpatchbutton value=\"submit\" onclick=javascript:ajax_getvalues(\""
|
echo -n "<input type=button id=addpatchbutton value=\"submit\" onclick=javascript:ajax_getvalues(\""
|
||||||
echo -n "REQUEST=addpatch&ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&"
|
echo -n "REQUEST=addpatch&ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "ADDPATCHURL=\"+encodeURIComponent(getElementById('addpatchurl').value)+\"&"
|
echo -n "ADDPATCHURL=\"+encodeURIComponent(getElementById('addpatchurl').value)+\"&"
|
||||||
echo -n "ADDPATCHNAME=\"+encodeURIComponent(getElementById('addpatchname').value));><br>"
|
echo -n "ADDPATCHNAME=\"+encodeURIComponent(getElementById('addpatchname').value));><br>"
|
||||||
echo -n "URL:<input type=text id=addpatchurl value=\"\" size=\"28\">"
|
echo -n "URL:<input type=text id=addpatchurl value=\"\" size=\"28\">"
|
||||||
@ -653,24 +686,24 @@ if [ "$REQUEST" = "edit" -o "$REQUEST" = "reloadspec" ]; then
|
|||||||
echo -n "<option value=\"$repname\" $SELECTED>$repname</option>"
|
echo -n "<option value=\"$repname\" $SELECTED>$repname</option>"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo -n "</select>"
|
echo -n "</select><br>"
|
||||||
echo -n "<br><input type=button id=sendpackagebutton value=\"send\" onclick=javascript:"
|
# send
|
||||||
|
echo -n "<input type=button id=sendpackagebutton value=\"send\" onclick=javascript:"
|
||||||
echo -n "i=getElementById('sendrepository').selectedIndex;"
|
echo -n "i=getElementById('sendrepository').selectedIndex;"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&REQUEST=sendpackage&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=sendpackage&"
|
||||||
echo -n "SENDREPOSITORY=\"+getElementById('sendrepository').options[i].value); class=redbutton>"
|
echo -n "SENDREPOSITORY=\"+getElementById('sendrepository').options[i].value); class=redbutton>"
|
||||||
# echo -n "<input type=button id=updatesourcebutton value=\"recreate SRPM\" onclick=javascript:"
|
# recreate and send SRPM
|
||||||
# echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&"
|
echo -n "<input type=button id=sendsourcebutton value=\"recreate and send SRPM\" onclick=javascript:"
|
||||||
# echo -n "REQUEST=updatesource&SPECTEXT=\"+encodeURIComponent(editor.getValue()));getElementById('sendsourcebutton').disabled=false;>"
|
echo -n "i=getElementById('sendrepository').selectedIndex;"
|
||||||
echo -n "<input type=button id=sendsourcebutton value=\"rebuild and send SRPM\" onclick=javascript:i=getElementById('sendrepository').selectedIndex;"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=sendsource&"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&REQUEST=sendsource&"
|
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue())+\"&"
|
||||||
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue())+\""
|
|
||||||
echo -n "SENDREPOSITORY=\"+getElementById('sendrepository').options[i].value); class=redbutton>"
|
echo -n "SENDREPOSITORY=\"+getElementById('sendrepository').options[i].value); class=redbutton>"
|
||||||
fi
|
fi
|
||||||
if [ "$USER_CANIMPORT" -a "$PACKAGE" ]; then
|
if [ "$USER_CANIMPORT" -a "$PACKAGE" ]; then
|
||||||
if [ "$MAINTAINERMODE" = "true" ]; then
|
if [ "$MAINTAINERMODE" = "true" ]; then
|
||||||
echo -n "<hr><b>Repository maintenance:</b><br>"
|
echo -n "<hr><b>Repository maintenance:</b><br>"
|
||||||
echo -n "Package: $PACKAGE<br>"
|
echo -n "Package: <b>$PACKAGE</b><br>"
|
||||||
echo -n "Source: $REPOSITORY<br>"
|
echo -n "Source: <b>$REPOSITORY</b><br>"
|
||||||
echo -n "Destination: "
|
echo -n "Destination: "
|
||||||
echo -n "<select id=repositoryimportto>"
|
echo -n "<select id=repositoryimportto>"
|
||||||
for f in ${AUTOPORT_IMPORT_REPOSITORIES[$ENVIRONMENT]}; do
|
for f in ${AUTOPORT_IMPORT_REPOSITORIES[$ENVIRONMENT]}; do
|
||||||
@ -685,14 +718,14 @@ if [ "$REQUEST" = "edit" -o "$REQUEST" = "reloadspec" ]; then
|
|||||||
if [ "$MAINTAINERMODE" != "true" ]; then
|
if [ "$MAINTAINERMODE" != "true" ]; then
|
||||||
echo -n "<input type=button value=\"archive\" onclick=javascript:"
|
echo -n "<input type=button value=\"archive\" onclick=javascript:"
|
||||||
echo -n "i=getElementById('sendrepository').selectedIndex;"
|
echo -n "i=getElementById('sendrepository').selectedIndex;"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
echo -n "MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
||||||
echo -n "SENDREPOSITORY=\"+getElementById('sendrepository').options[i].value+\"&"
|
echo -n "SENDREPOSITORY=\"+getElementById('sendrepository').options[i].value+\"&"
|
||||||
echo -n "REPOSITORYSIMULATE=\"+getElementById('repositorysimulate').checked+\"&"
|
echo -n "REPOSITORYSIMULATE=\"+getElementById('repositorysimulate').checked+\"&"
|
||||||
echo -n "REQUEST=repositoryarchive\"); class=redbutton>"
|
echo -n "REQUEST=repositoryarchive\"); class=redbutton>"
|
||||||
echo -n "<hr><input type=button value=\"import to:\" onclick=javascript:"
|
echo -n "<hr><input type=button value=\"import to:\" onclick=javascript:"
|
||||||
echo -n "i=getElementById('repositoryimportto').selectedIndex;j=getElementById('sendrepository').selectedIndex;"
|
echo -n "i=getElementById('repositoryimportto').selectedIndex;j=getElementById('sendrepository').selectedIndex;"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "REPOSITORYIMPORTTO=\"+getElementById('repositoryimportto').options[i].value+\"&"
|
echo -n "REPOSITORYIMPORTTO=\"+getElementById('repositoryimportto').options[i].value+\"&"
|
||||||
echo -n "REPOSITORYSIMULATE=\"+getElementById('repositorysimulate').checked+\"&"
|
echo -n "REPOSITORYSIMULATE=\"+getElementById('repositorysimulate').checked+\"&"
|
||||||
echo -n "SENDREPOSITORY=\"+getElementById('sendrepository').options[j].value+\"&"
|
echo -n "SENDREPOSITORY=\"+getElementById('sendrepository').options[j].value+\"&"
|
||||||
@ -710,7 +743,7 @@ if [ "$REQUEST" = "edit" -o "$REQUEST" = "reloadspec" ]; then
|
|||||||
# repository compare
|
# repository compare
|
||||||
echo -n "<input type=button value=\"compare\" onclick=javascript:"
|
echo -n "<input type=button value=\"compare\" onclick=javascript:"
|
||||||
echo -n "i=getElementById('repositoryimportto').selectedIndex;"
|
echo -n "i=getElementById('repositoryimportto').selectedIndex;"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
echo -n "MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
||||||
echo -n "REPOSITORYIMPORTTO=\"+getElementById('repositoryimportto').options[i].value+\"&"
|
echo -n "REPOSITORYIMPORTTO=\"+getElementById('repositoryimportto').options[i].value+\"&"
|
||||||
echo -n "REPOSITORYSIMULATE=\"+getElementById('repositorysimulate').checked+\"&"
|
echo -n "REPOSITORYSIMULATE=\"+getElementById('repositorysimulate').checked+\"&"
|
||||||
@ -718,7 +751,7 @@ if [ "$REQUEST" = "edit" -o "$REQUEST" = "reloadspec" ]; then
|
|||||||
# repository import
|
# repository import
|
||||||
echo -n "<input type=button value=\"import\" onclick=javascript:"
|
echo -n "<input type=button value=\"import\" onclick=javascript:"
|
||||||
echo -n "i=getElementById('repositoryimportto').selectedIndex;"
|
echo -n "i=getElementById('repositoryimportto').selectedIndex;"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
echo -n "MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
||||||
echo -n "REPOSITORYIMPORTTO=\"+getElementById('repositoryimportto').options[i].value+\"&"
|
echo -n "REPOSITORYIMPORTTO=\"+getElementById('repositoryimportto').options[i].value+\"&"
|
||||||
echo -n "REPOSITORYSIMULATE=\"+getElementById('repositorysimulate').checked+\"&"
|
echo -n "REPOSITORYSIMULATE=\"+getElementById('repositorysimulate').checked+\"&"
|
||||||
@ -726,14 +759,14 @@ if [ "$REQUEST" = "edit" -o "$REQUEST" = "reloadspec" ]; then
|
|||||||
# repository release
|
# repository release
|
||||||
echo -n "<input type=button value=\"release\" onclick=javascript:"
|
echo -n "<input type=button value=\"release\" onclick=javascript:"
|
||||||
echo -n "i=getElementById('repositoryimportto').selectedIndex;"
|
echo -n "i=getElementById('repositoryimportto').selectedIndex;"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
echo -n "MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
||||||
echo -n "REPOSITORYIMPORTTO=\"+getElementById('repositoryimportto').options[i].value+\"&"
|
echo -n "REPOSITORYIMPORTTO=\"+getElementById('repositoryimportto').options[i].value+\"&"
|
||||||
echo -n "REPOSITORYSIMULATE=\"+getElementById('repositorysimulate').checked+\"&"
|
echo -n "REPOSITORYSIMULATE=\"+getElementById('repositorysimulate').checked+\"&"
|
||||||
echo -n "SENDREPOSITORY=$REPOSITORY&REQUEST=repositoryrelease\"); class=redbutton>"
|
echo -n "SENDREPOSITORY=$REPOSITORY&REQUEST=repositoryrelease\"); class=redbutton>"
|
||||||
# repository archive
|
# repository archive
|
||||||
echo -n "<input type=button value=\"archive\" onclick=javascript:"
|
echo -n "<input type=button value=\"archive\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
echo -n "MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
||||||
echo -n "SENDREPOSITORY=$REPOSITORY&"
|
echo -n "SENDREPOSITORY=$REPOSITORY&"
|
||||||
echo -n "REPOSITORYSIMULATE=\"+getElementById('repositorysimulate').checked+\"&"
|
echo -n "REPOSITORYSIMULATE=\"+getElementById('repositorysimulate').checked+\"&"
|
||||||
@ -745,47 +778,41 @@ if [ "$REQUEST" = "edit" -o "$REQUEST" = "reloadspec" ]; then
|
|||||||
if [ ! "${AUTOPORT_DISABLE[$ENVIRONMENT]}" -a ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then
|
if [ ! "${AUTOPORT_DISABLE[$ENVIRONMENT]}" -a ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then
|
||||||
echo -n "<hr>Automatic port:<br>"
|
echo -n "<hr>Automatic port:<br>"
|
||||||
echo -n "<input type=button id=autoportnp value=\"port\" onclick=javascript:"
|
echo -n "<input type=button id=autoportnp value=\"port\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&REQUEST=autoportnp\"); class=boldbutton>"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=autoportnp\"); class=boldbutton>"
|
||||||
echo -n "<input type=button id=autoportlog value=\"log\" onclick=javascript:"
|
echo -n "<input type=button id=autoportlog value=\"log\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&REQUEST=autoportlog\");>"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=autoportlog\");>"
|
||||||
# echo -n "<br>Last logs: "
|
|
||||||
# echo -n "OK <input id=\"logstatusOK\" type=\"radio\" name=\"logstatus\" value=\"OK\"> "
|
|
||||||
# echo -n "FAILED<input type=\"radio\" name=\"logstatus\" value=\"FAILED\" checked=\"checked\"><br>"
|
|
||||||
# echo -n "<input type=button value=\"build\" onclick=javascript:ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&PACKAGE=$PACKAGE&"
|
|
||||||
# echo -n "REQUEST=showlog&LOGTYPE=build&LOGSTATUSOK=\"+document.all.logstatusOK.checked);>"
|
|
||||||
# echo -n "<input type=button value=\"install\" onclick=javascript:ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&PACKAGE=$PACKAGE&"
|
|
||||||
# echo -n "REQUEST=showlog&LOGTYPE=install&LOGSTATUSOK=\"+document.all.logstatusOK.checked);>"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then
|
if [ "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then
|
||||||
echo -n "<hr><b>Autodist:</b><br>"
|
echo -n "<hr><b>Autodist:</b><br>"
|
||||||
echo -n "Patch:<input type=button value=\"show\" onclick=javascript:"
|
echo -n "Patch:<input type=button value=\"show\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "REQUEST=showpatch\");>"
|
echo -n "REQUEST=showpatch\");>"
|
||||||
echo -n "<input type=button value=\"remove\" onclick=javascript:"
|
echo -n "<input type=button value=\"remove\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "REQUEST=removepatch\"); class=redbutton>"
|
echo -n "REQUEST=removepatch\"); class=redbutton>"
|
||||||
echo -n "<input type=button id=updatepatchbutton value=\"update\" onclick=javascript:"
|
echo -n "<input type=button id=updatepatchbutton value=\"update\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&"
|
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=updatepatch\"); class=redbutton>"
|
echo -n "REQUEST=updatepatch\"); class=redbutton>"
|
||||||
echo -n "<input type=button id=buildpatchbutton value=\"build\" onclick=javascript:"
|
echo -n "<input type=button id=buildpatchbutton value=\"build\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&"
|
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=buildpatch\"); class=redbutton>"
|
echo -n "REQUEST=buildpatch\"); class=redbutton>"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "<hr><b>Info:</b><br>"
|
echo -n "<hr><b>Info:</b><br>"
|
||||||
echo -n "<input type=button value=\"allowed groups\" onclick=javascript:"
|
echo -n "<input type=button value=\"allowed groups\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&REQUEST=allowedgroups\");>"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=allowedgroups\");>"
|
||||||
echo -n "<input type=button value=\"approved licenses\" onclick=javascript:"
|
echo -n "<input type=button value=\"approved licenses\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&REQUEST=approvedlicenses\");>"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=approvedlicenses\");>"
|
||||||
echo -n "<input type=button value=\"builddir files\" onclick=javascript:"
|
echo -n "<input type=button value=\"builddir files\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&REQUEST=builddirfiles\");>"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=builddirfiles\");>"
|
||||||
echo -n "<input type=button value=\"configure help\" onclick=javascript:"
|
echo -n "<input type=button value=\"configure help\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&REQUEST=configurehelp\");>"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=configurehelp\");>"
|
||||||
echo -n "<div style=\"nowrap;\"><input type=button id=sendsourcebutton value=\"macros:\" onclick=javascript:i=getElementById('macrosfile').selectedIndex;"
|
echo -n "<div style=\"nowrap;\"><input type=button value=\"macros:\" onclick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&REQUEST=showmacrosfile&"
|
echo -n "i=getElementById('macrosfile').selectedIndex;"
|
||||||
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=showmacrosfile&"
|
||||||
echo -n "MACROSFILE=\"+getElementById('macrosfile').options[i].value);>"
|
echo -n "MACROSFILE=\"+getElementById('macrosfile').options[i].value);>"
|
||||||
echo -n "<select id=macrosfile>"
|
echo -n "<select id=macrosfile>"
|
||||||
for f in $WORKINGROOT/etc/rpm/macros.*; do
|
for f in $WORKINGROOT/etc/rpm/macros.*; do
|
||||||
@ -798,7 +825,7 @@ if [ "$REQUEST" = "edit" -o "$REQUEST" = "reloadspec" ]; then
|
|||||||
echo -n "<hr><b>Broadcast message:</b><br>"
|
echo -n "<hr><b>Broadcast message:</b><br>"
|
||||||
echo -n "<input type=text id=broadcastmessage size=\"25\">"
|
echo -n "<input type=text id=broadcastmessage size=\"25\">"
|
||||||
echo -n "<input type=button value=\"send\" onClick=javascript:"
|
echo -n "<input type=button value=\"send\" onClick=javascript:"
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||||
echo -n "REQUEST=broadcastmessage&BROADCASTMESSAGE=\"+encodeURIComponent(getElementById('broadcastmessage').value));"
|
echo -n "REQUEST=broadcastmessage&BROADCASTMESSAGE=\"+encodeURIComponent(getElementById('broadcastmessage').value));"
|
||||||
echo -n "getElementById('broadcastmessage').value=\"\";>"
|
echo -n "getElementById('broadcastmessage').value=\"\";>"
|
||||||
|
|
||||||
@ -921,8 +948,13 @@ else
|
|||||||
echo "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"sent <b>$PACKAGE</b> to <b>$SENDREPOSITORY</b>\" STIME=`date +%s`" >> $STATEDIR/social_log
|
echo "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"sent <b>$PACKAGE</b> to <b>$SENDREPOSITORY</b>\" STIME=`date +%s`" >> $STATEDIR/social_log
|
||||||
fi ;;
|
fi ;;
|
||||||
"sendsource") [ "$RPMFORCE" = "true" ] && RPMFORCEADD="--force --nodeps"
|
"sendsource") [ "$RPMFORCE" = "true" ] && RPMFORCEADD="--force --nodeps"
|
||||||
$SUDO_WRAPPER $ENVIRONMENT $PACKAGE "rpmbuild -bs $PACKAGE.spec && autospec -u $PACKAGE -a10 --server $SENDREPOSITORY --norpm"
|
if [ "$SENDREPOSITORY" ]; then
|
||||||
RET=$? ;;
|
$SUDO_WRAPPER $ENVIRONMENT $PACKAGE "rpmbuild -bs $PACKAGE.spec $RPMFORCEADD && autospec -u $PACKAGE -a10 --server $SENDREPOSITORY --norpm"
|
||||||
|
RET=$?
|
||||||
|
else
|
||||||
|
echo "ERROR: send repository is not defined."
|
||||||
|
RET=255
|
||||||
|
fi ;;
|
||||||
"repositoryimport")
|
"repositoryimport")
|
||||||
[ "$REPOSITORYSIMULATE" = "true" -o ! "$USER_CANIMPORT" ] && SIMULATEADD="-s" || SIMULATEADD=
|
[ "$REPOSITORYSIMULATE" = "true" -o ! "$USER_CANIMPORT" ] && SIMULATEADD="-s" || SIMULATEADD=
|
||||||
$SUDO_WRAPPER local $PACKAGE "openmamba-repository import $SENDREPOSITORY $PACKAGE -d $REPOSITORYIMPORTTO $SIMULATEADD -y"
|
$SUDO_WRAPPER local $PACKAGE "openmamba-repository import $SENDREPOSITORY $PACKAGE -d $REPOSITORYIMPORTTO $SIMULATEADD -y"
|
||||||
|
Loading…
Reference in New Issue
Block a user