diff --git a/webbuild/html/styles/webbuild.css b/webbuild/html/styles/webbuild.css index ebef9fd..9b20d49 100644 --- a/webbuild/html/styles/webbuild.css +++ b/webbuild/html/styles/webbuild.css @@ -113,6 +113,46 @@ input[type="checkbox"] { z-index:20; } +.windowcontainer { + text-align:center; + position:fixed; + z-index:10 !important; + height:100%; + width:100%; + left:0; + top:0; +} + +.windowopaquebackground { + text-align:center; + position:fixed; + z-index:10 !important; + height:100%; + width:100%; + left:0; + top:0; + background-color:black; + filter: alpha(opacity=75); + -khtml-opacity:0.75; + -webkit-opacity:0.75; + -moz-opacity:0.75; + opacity:0.75; +} + +.windowbox { + display:inline-block; + position:relative; + font-size:10pt; + padding:5px; + margin:100px; + margin-right:auto; + margin-left:auto; + width:auto; + background-color:white; + border:2px solid #2b6600; + z-index:15; +} + .multiselect { font-size:8pt; border:0px; diff --git a/webbuild/webbuild-cgi b/webbuild/webbuild-cgi index 0fbb718..5e98bb9 100755 --- a/webbuild/webbuild-cgi +++ b/webbuild/webbuild-cgi @@ -466,6 +466,53 @@ if [ "$REQUEST" = "environmentsearch" ]; then exit fi +# install rpms window +if [ "$REQUEST" = "rpmmanager" ]; then + environment_descr=`print_environment_descr $i` + echo -n "
" + echo -n "
" + echo -n "RPM manager for $environment_descr environment
" + echo -n "
" + echo -n "
" + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "ls -t ../RPMS/${AUTOPORT_ARCH[$ENVIRONMENT]}/*.${AUTOPORT_ARCH[$ENVIRONMENT]}.rpm ../RPMS/noarch/*.noarch.rpm 2>/dev/null" | \ + while read f; do + pkgname=`basename $f` + echo -n "" + done + echo -n "
" + echo -n "
" + + if [ "$USER_CANINSTALL" ]; then + # force rpm install/upgrade operation + echo -n "  " + # rpm manager install packages + echo -n ""`\"+p+" + echo -n "\"`cgi_encodevar " in $environment_descr environment?"`\"" + echo -n ");>  " + # rpm manager upgrade packages + echo -n ""`\"+p+" + echo -n "\"`cgi_encodevar " in $environment_descr environment?"`\"" + echo -n ");>" + fi + + echo -n "
CLOSE
" + echo "]]>
" + exit +fi + # set current user environment if not passed if [ ! "$ENVIRONMENT" ]; then for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do @@ -1870,6 +1917,36 @@ case $REQUEST in RET=$? [ $RET -eq 0 ] && RET=-1 ;; + "rpmmanagerinstall"|"rpmmanagerupgrade") if [ "$USER_CANINSTALL" ]; then + [ "$RPMMANAGERFORCE" = "true" ] && rpmforceadd="--force" + echo -n "" + for f in $RPMMANAGERPACKAGES; do + if [ "$f/.${AUTOPORT_ARCH[$ENVIRONMENT]}." != "$f" ]; then + installpackages="$installpackages ../RPMS/${AUTOPORT_ARCH[$ENVIRONMENT]}/$f" + elif [ "$f/.noarch." != "$f" ]; then + installpackages="$installpackages ../RPMS/noarch/$f" + else + echo "ERROR: invalid package $f;aborting." + break + fi + done + if [ "$installpackages" ]; then + if [ "$REQUEST" = "rpmmanagerinstall" ]; then + echo "Installing packages: $RPMMANAGERPACKAGES
" + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "sudo rpm -i $installpackages $rpmforceadd" + else + echo "Upgrading packages: $RPMMANAGERPACKAGES
" + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "sudo rpm -U $installpackages $rpmforceadd" + fi + RET=$? + else + echo "ERROR: no packages to install." + RET=1 + fi + else + echo "ERROR: install capability disabled for user." + RET=1 + fi ;; *) RET=0 ;; esac diff --git a/webbuild/webbuild-functions-private b/webbuild/webbuild-functions-private index 26c4188..d649aa3 100644 --- a/webbuild/webbuild-functions-private +++ b/webbuild/webbuild-functions-private @@ -107,7 +107,7 @@ function showEnvironmentPanel() { local binutils_ver=`echo $toolchain_output | sed "s|.*GNU \(.*\) (GNU Binutils.*)\(.*\)|\1 \2|"` echo "Toolchain: gcc $gcc_ver, $binutils_ver" - # smart upgrade + # system upgrade echo -n "
" + # rpm manager + echo -n "" + # environment search echo -n "
Provides: