Compare commits
62 Commits
Author | SHA1 | Date | |
---|---|---|---|
4cee459385 | |||
f47b80b1cc | |||
092e90e004 | |||
e53a62198a | |||
68bacbc599 | |||
681b2e5ec7 | |||
a6d6fd03e4 | |||
c3cbf7c0e8 | |||
ced497545e | |||
ee1a94af6f | |||
2c09744bbd | |||
7d21e2fa60 | |||
7e78d60c90 | |||
537b80a4c4 | |||
db8fa88b9b | |||
f93a093134 | |||
a49c4ec447 | |||
1c8a7cbbdf | |||
73f032afda | |||
8b9ee4a7b2 | |||
c3c5a9009e | |||
4fba9537b5 | |||
a191ef0eb3 | |||
5f2e54f58a | |||
90a0d85269 | |||
6e6d92d5a2 | |||
8f2eb49563 | |||
4ee59fdbd2 | |||
d1493a2edf | |||
c6db4b05c9 | |||
3f8d3fb9b2 | |||
77ecc7566d | |||
aca1323856 | |||
a6b14a1aa9 | |||
2e6f2dd33e | |||
fe8a60addd | |||
ef649ef1c4 | |||
a044057f9f | |||
8623f8bfd8 | |||
f47f80416d | |||
177629094c | |||
f5a01c61a6 | |||
f492d02d7d | |||
367e2f7dee | |||
144f1b0eb6 | |||
faa153d41e | |||
d435051d50 | |||
9afdb96444 | |||
eaf4e0220c | |||
3b032d1d8c | |||
6032d80cdb | |||
66ce879682 | |||
3b15ee14b7 | |||
949a4c35df | |||
d77d29fd37 | |||
4d8a804eee | |||
60f8e3cff0 | |||
73791f2c58 | |||
8aaf239342 | |||
9ab37c25c2 | |||
491357aebb | |||
bf3085f435 |
7
Makefile
7
Makefile
@ -17,7 +17,7 @@ mandir = ${prefix}/usr/share/man
|
||||
sysconfigdir= ${sysconfdir}/sysconfig
|
||||
configdir = ${sysconfdir}/autodist
|
||||
localstatedir= /var
|
||||
piddir= ${localstatedir}/run/autodist
|
||||
piddir= /run/autodist
|
||||
cgidir = ${localstatedir}/www/cgi-bin
|
||||
htmldir = ${localstatedir}/www/html
|
||||
|
||||
@ -62,9 +62,9 @@ install-dirs:
|
||||
@$(INSTALL_DIR) $(DESTDIR)$(pck_logdir)/install/{ok,failed}
|
||||
@$(INSTALL_DIR) $(DESTDIR)$(pck_logdir)/send/{ok,failed}
|
||||
@$(INSTALL_DIR) $(DESTDIR)$(pck_statedir)/RPM/{SPECS,SRPMS,BUILD,SOURCES,RPMS/{noarch,i586,ppc,x86_64,arm}}
|
||||
@$(INSTALL_DIR) $(DESTDIR)$(piddir)
|
||||
@$(INSTALL_DIR) $(DESTDIR)$(libexecdir)
|
||||
@$(INSTALL_DIR) $(DESTDIR)$(localstatedir)/webbuild/{cache,home,notes,tmp,users}
|
||||
@$(INSTALL_DIR) $(DESTDIR)$(localstatedir)/webbuild/{cache,home,notes,tmp,users,uploads}
|
||||
@$(INSTALL_DIR) $(DESTDIR)$(prefix)/lib/tmpfiles.d/
|
||||
|
||||
install-programs:
|
||||
@$(INSTALL_SCRIPT) autodist $(DESTDIR)$(bindir)/autodist
|
||||
@ -101,6 +101,7 @@ install-data:
|
||||
@$(INSTALL_DATA) autospec-conf $(DESTDIR)$(pck_statedir)/.autospec
|
||||
@$(INSTALL_DATA) autodist-bashrc $(DESTDIR)$(pck_statedir)/.bashrc
|
||||
@$(INSTALL_DATA) autodist-bash_profile $(DESTDIR)$(pck_statedir)/.bash_profile
|
||||
@$(INSTALL_DATA) autodist-tmpfilesd $(DESTDIR)$(prefix)/lib/tmpfiles.d/autodist.conf
|
||||
@touch $(DESTDIR)$(pck_statedir)/template/autoupdate/auto.success
|
||||
@touch $(DESTDIR)$(pck_statedir)/template/autoupdate/auto.skip
|
||||
|
||||
|
40
autodist
40
autodist
@ -1,18 +1,18 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Autodist -- batch build tool for RPM based distributions
|
||||
# Copyright (C) 2006-2014 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# Copyright (C) 2006-2016 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
#
|
||||
# Released under the terms of the GNU GPL release 3 license
|
||||
#
|
||||
VERSION=0.9.18
|
||||
me=(${0##*/} $VERSION "Sat Aug 20 2010")
|
||||
VERSION=1.0.0
|
||||
me=(${0##*/} $VERSION "Tue Jan 26 2016")
|
||||
exec 3>`readlink /proc/self/fd/0`
|
||||
|
||||
function usage() {
|
||||
echo "\
|
||||
${me[0]} ${me[1]}
|
||||
"$"Copyright (C) 2006-2014 Silvan Calarco <silvan.calarco@mambasoft.it>""
|
||||
"$"Copyright (C) 2006-2016 Silvan Calarco <silvan.calarco@mambasoft.it>""
|
||||
"$"Released under the terms of the GNU GPL v3 license"
|
||||
echo "
|
||||
"$"Batch build tool for bulding a whole distribution and much more.""
|
||||
@ -40,13 +40,15 @@ ${me[0]} ${me[1]}
|
||||
-v,--verbose "$"Be verbose""
|
||||
--force "$"Pass force parameter to autospec""
|
||||
--repository "$"Pass given repository as base for operations""
|
||||
--repository-strict "$"Only prepare packages from base repository specified with --repository""
|
||||
--server num "$"Pass given server number to autospec for send operation""
|
||||
--severity num "$"Error handling level:
|
||||
0: don't stop (default)
|
||||
1: skip current job on error
|
||||
0: don't stop
|
||||
1: skip current job on error (default)
|
||||
2: abort on error""
|
||||
--arch "$"Build packages for specified target architecture""
|
||||
--user user "$"Pass calling user name for Webbuild social messages""
|
||||
--rebuild-srpms "$"Rebuild SRPMs when sending""
|
||||
|
||||
job "$"Job specification in the form pkg#version, job#version, job/pkg#version, examples:
|
||||
glibc#2.11.1
|
||||
@ -94,7 +96,7 @@ CONFIGFILE=$SYSCONFDIR/config
|
||||
SCRIPT_UPDATE_SPECFILE=$SCRIPTDIR/update-specfile
|
||||
SCRIPT_UPDATE_SPECFILE_CUSTOM=$SCRIPTDIR/update-specfile-custom
|
||||
AUTOSPEC_CMD="/usr/bin/autospec"
|
||||
PIDFILE="/var/run/autodist/autodist.pid"
|
||||
PIDFILE="/run/autodist/autodist.pid"
|
||||
|
||||
# Configuration defaults normally overriden in configuration file
|
||||
AUTOBUILD_MAXNUM=50
|
||||
@ -169,6 +171,9 @@ for ((i=1; i<=$#; i++)); do
|
||||
}
|
||||
AUTODIST_REPOSITORY="${!i}"
|
||||
;;
|
||||
--repository-strict)
|
||||
REPOSITORY_STRICT=1
|
||||
;;
|
||||
--severity) let i+=1
|
||||
[ "${!i}" ] || {
|
||||
echo "Error: --severity parameter not given, aborting."
|
||||
@ -190,6 +195,9 @@ for ((i=1; i<=$#; i++)); do
|
||||
}
|
||||
WEBBUILD_USER_CMDLINE="${!i}"
|
||||
;;
|
||||
--rebuild-srpms)
|
||||
REBUILD_SRPMS=1
|
||||
;;
|
||||
-*) if [ "${!i}" = "--" ]; then
|
||||
AUTOSPEC_ARGS_MODE=1
|
||||
SCRIPT_ARGS_MODE=
|
||||
@ -627,6 +635,15 @@ function launch_pkgs_loop() {
|
||||
if [ "$PKGLINE" ]; then
|
||||
set -- $PKGLINE
|
||||
[[ $4 =~ "^[0-9]+$" ]] && REPNAME=${AUTODIST_REPOSITORIES[$4]} || REPNAME="$4"
|
||||
if [ "$REPNAME" != "$AUTODIST_REPOSITORY" -a "$REPOSITORY_STRICT" ]; then
|
||||
case $SEVERITY in
|
||||
0) echo "!! Warning: package comes from $REPNAME instead of $AUTODIST_REPOSITORY" ;;
|
||||
1) echo "!! Error: package comes from $REPNAME instead of $AUTODIST_REPOSITORY; skipping $pkg package."
|
||||
continue ;;
|
||||
*) echo "!! Error: package comes from $REPNAME instead of $AUTODIST_REPOSITORY; aborting."
|
||||
exit 1 ;;
|
||||
esac
|
||||
fi
|
||||
if [ "$REPNAME" ]; then
|
||||
command_opts="$command_opts --server ${REPNAME}"
|
||||
else
|
||||
@ -672,6 +689,8 @@ function launch_pkgs_loop() {
|
||||
fi
|
||||
fi
|
||||
command_opts="-a5:6" ;;
|
||||
buildsrpm)
|
||||
command_opts="-a5:6 --norpm" ;;
|
||||
buildinstall)
|
||||
# skip package in job if up to date
|
||||
if [ "$PKGLINE" -a "$BUILDSLINE" ]; then
|
||||
@ -1345,7 +1364,12 @@ for JOB_NUM in `seq 1 ${#JOBNAME[*]}`; do
|
||||
}
|
||||
# avoid calling autospec with --nosrpm --norpm (not working as expected and not useful)
|
||||
if [ "${AUTOSPEC_ARGS/--nosrpm}" = "$AUTOSPEC_ARGS" ]; then
|
||||
echo "== sending source rpms"
|
||||
if [ $REBUILD_SRPMS ]; then
|
||||
echo "== rebuilding and sending source rpms"
|
||||
launch_pkgs_loop buildsrpm "$AUTOSPEC_ARGS --norpm"
|
||||
else
|
||||
echo "== sending source rpms"
|
||||
fi
|
||||
launch_pkgs_loop send "$AUTOSPEC_ARGS --norpm $SEND_SERVER_CMD"
|
||||
if [ $? -gt 0 ]; then
|
||||
case $SEVERITY in
|
||||
|
20
autodist-cgi
20
autodist-cgi
@ -120,7 +120,7 @@ for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do
|
||||
AUTODISTSTATEFILE="$AUTOPORTLOGDIR/autoport-$r-current"
|
||||
elif [ "${AUTOPORT_NATIVE[$i]}" ]; then
|
||||
LOGFILE="/var/autodist/log/autoport-native-$r-${AUTOPORT_ARCH[$i]}.log"
|
||||
LASTLOGFILE="/var/autodist/log/log/autoport-native-$r-${AUTOPORT_ARCH[$i]}-last.log"
|
||||
LASTLOGFILE="/var/autodist/log/autoport-native-$r-${AUTOPORT_ARCH[$i]}-last.log"
|
||||
AUTODISTLOGFILE="$AUTOPORTLOGDIR/${AUTOPORT_ARCH[$i]}/$r-current.log"
|
||||
AUTODISTSTATEFILE="$AUTOPORTLOGDIR/autoport-$r-current"
|
||||
elif [ "${AUTOPORT_CROSS[$i]}" ]; then
|
||||
@ -164,7 +164,7 @@ _EOF
|
||||
if [ "${SHOWLOG/\/ok\/}" != "${SHOWLOG}" -o "${SHOWLOG/\failed\/}" != "${SHOWLOG}" ]; then
|
||||
SHOWLOGPKG=${SHOWLOG/*\/}
|
||||
[ "${SHOWLOGPKG}" ] || continue
|
||||
echo "<table style=\"color:black\"><tr><td colspan=3>Last ${SHOWLOGPKG} logs:</td>"
|
||||
echo "<table style=\"color:black;width:auto;\"><tr><td colspan=3>Last ${SHOWLOGPKG} logs:</td>"
|
||||
for t in prepare update build install send; do
|
||||
echo -n "<tr><td>$t:</td><td>"
|
||||
[ -e ${BUILDLOGDIR}${t}/ok/${SHOWLOGPKG} ] && echo -n "<td><a style=\"color:green;text-decoration:none\" target=_autodist href=\"?NUM=$i&REP=$RNUM$HOST_ADD&SHOWLOG=${t}/ok/${SHOWLOGPKG}\">OK</a></td>" || echo "<td></td>"
|
||||
@ -192,7 +192,7 @@ _EOF
|
||||
fi
|
||||
[ "${AUTOPORT_UPDATE[$i]}" ] && break
|
||||
elif [ ! "$SHOWLOG" ]; then
|
||||
RELOADTIME=60000
|
||||
RELOADTIME=600000
|
||||
[[ "$NUM" && "$NUM" != "$i" ]] && continue
|
||||
[[ "$HOST" = "$AS_HOST" ]] || continue
|
||||
if [ "${AUTOPORT_UPDATE[$i]}" ]; then
|
||||
@ -218,7 +218,7 @@ _EOF
|
||||
<div class=downloadbox align=center>
|
||||
<div align=left style="background-color: white; height: 250px; width: 850px; overflow: auto; font-size: 8pt; border:1px solid #2b6600; margin: 4px; padding:4; background-color: #e0f2d0;">
|
||||
_EOF
|
||||
echo -n "<pre style='margin:1px'>"
|
||||
echo -n "<pre style='margin:1px;word-wrap:normal;white-space:pre;'>"
|
||||
unset BUILDNOWIDX BUILDLOG BUILDNOW BUILDNOWSTATUS SCHEDULED STARTTIME AUTODIST_PID ENDTIME
|
||||
if [ "${AUTOPORT_UPDATE[$i]}" ]; then
|
||||
BUILDNOWIDX=0
|
||||
@ -358,10 +358,14 @@ done
|
||||
# only root host (0) calls other hosts
|
||||
if [ "$AS_HOST" = "0" -a ! "$SHOWLOG" ]; then
|
||||
for h in `seq 1 ${#AUTOPORT_CGI_HOST[*]}`; do
|
||||
if [ "$NUM" -a "$HOST" = "$h" ]; then
|
||||
curl "${AUTOPORT_CGI_HOST[$h]}?AS_HOST=$h&LINES=$LINES&NUM=$NUM&REP=$RNUM&HOST=$HOST" 2>/dev/null
|
||||
elif [ ! "$NUM" ]; then
|
||||
curl "${AUTOPORT_CGI_HOST[$h]}?AS_HOST=$h&LINES=$LINES" 2>/dev/null
|
||||
WBHOSTURL=`echo ${AUTOPORT_CGI_HOST[$h]} | sed "s|^\(http[s]*://[^/]*\).*$|\1|"`
|
||||
if [ "$WBHOSTURL" ]; then
|
||||
curl -m1 -s -I ${WBHOSTURL} >/dev/null || continue
|
||||
if [ "$NUM" -a "$HOST" = "$h" ]; then
|
||||
curl "${AUTOPORT_CGI_HOST[$h]}?AS_HOST=$h&LINES=$LINES&NUM=$NUM&REP=$RNUM&HOST=$HOST" 2>/dev/null
|
||||
elif [ ! "$NUM" ]; then
|
||||
curl "${AUTOPORT_CGI_HOST[$h]}?AS_HOST=$h&LINES=$LINES" 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
@ -15,21 +15,22 @@ function usage() {
|
||||
echo "Copyright (c) 2007-2014 by Silvan Calarco"
|
||||
echo
|
||||
echo "Usage:"
|
||||
echo "$me list"
|
||||
echo "$me import REPOSITORY [PKGS ...] [-d REPOSITORY] [-s] [-y]"
|
||||
echo "$me release REPOSITORY [PKGS ...] [-d REPOSITORY] [-s] [-y]"
|
||||
echo "$me archive REPOSITORY PKGS ..."
|
||||
echo "$me restore REPOSITORY PKGS ..."
|
||||
echo "$me query REPOSITORY PKGS ..."
|
||||
echo "$me search [-i] [-r regexp] STRING"
|
||||
echo "$me verify REPOSITORY [PKGS ...]"
|
||||
echo "$me inspect REPOSITORY {PKGS ...} [-d REPOSITORY]"
|
||||
echo "$me setwarning REPOSITORY {PKG ...} -t \"TEXT\""
|
||||
echo "$me diff REPOSITORY [PKGS ...] [-d REPOSITORY]"
|
||||
echo "$me distromatic REPOSITORY"
|
||||
echo "$me install REPOSITORY [PKGS ...] [-f]"
|
||||
echo "$me import REPOSITORY [PKGS ...] [-d REPOSITORY] [-s] [-y]"
|
||||
echo "$me inspect REPOSITORY {PKGS ...} [-d REPOSITORY]"
|
||||
echo "$me list"
|
||||
echo "$me query REPOSITORY PKGS ..."
|
||||
echo "$me release REPOSITORY [PKGS ...] [-d REPOSITORY] [-s] [-y]"
|
||||
echo "$me restore REPOSITORY PKGS ..."
|
||||
echo "$me search [-i] [-r regexp] STRING"
|
||||
echo "$me setwarning REPOSITORY {PKG ...} -t \"TEXT\""
|
||||
echo "$me verify REPOSITORY [PKGS ...]"
|
||||
echo
|
||||
echo " -d use given repository as destination (default: devel)"
|
||||
echo " -f force import to destination repository"
|
||||
echo " -f force operation"
|
||||
echo " -r match repositories with given regexp"
|
||||
echo " -s simulate operations to see if it would work"
|
||||
echo " -t warning text"
|
||||
@ -152,6 +153,38 @@ function get_pkg_buildinfo() {
|
||||
return 0
|
||||
}
|
||||
|
||||
# get_pkg_info - uses distromatic generated build file to get packages information from the repository
|
||||
#
|
||||
# $1: repository name
|
||||
# $2: architecture
|
||||
# $3: pkg name
|
||||
function get_pkg_info() {
|
||||
|
||||
local pkg buildarch rep line
|
||||
|
||||
[ $1 ] && rep=$1 || exit 200
|
||||
[ $2 ] && buildarch=$2 || exit 200
|
||||
[ $3 ] && pkg=$3 || exit 200
|
||||
|
||||
[ -e ${PKGLIST}.$buildarch ] || {
|
||||
echo "ERROR: get_pkg_info: file ${PKGLIST}.$buildarch missing; aborting."
|
||||
exit 1
|
||||
}
|
||||
|
||||
line=`grep "^$pkg " ${PKGLIST}.$buildarch 2>/dev/null | tail -n1`
|
||||
set -- $line
|
||||
pkg_name=$1
|
||||
pkg_version=$2
|
||||
pkg_size=$3
|
||||
pkg_unknown=$4
|
||||
pkg_repository=$5
|
||||
pkg_unknown2=$6
|
||||
pkg_release=$7
|
||||
pkg_arch=$buildarch
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
function import_file() {
|
||||
[ $1 ] || exit 200
|
||||
|
||||
@ -638,7 +671,7 @@ while [ "$1" ]; do
|
||||
*)
|
||||
if [ "$command" ]; then
|
||||
case "$command" in
|
||||
"import"|"release"|"query"|"verify"|"archive"|"restore"|"diff"|"inspect"|"setwarning"|"distromatic")
|
||||
"import"|"release"|"query"|"verify"|"archive"|"restore"|"diff"|"inspect"|"install"|"setwarning"|"distromatic")
|
||||
[ "$origrepository" ] &&
|
||||
packages="$packages $1" ||
|
||||
origrepository=$1
|
||||
@ -657,7 +690,7 @@ while [ "$1" ]; do
|
||||
esac
|
||||
else
|
||||
case "$1" in
|
||||
"import"|"release"|"query"|"verify"|"archive"|"restore"|"list"|"diff"|"inspect"|"setwarning"|"distromatic"|"search") command=$1 ;;
|
||||
"import"|"release"|"query"|"verify"|"archive"|"restore"|"list"|"diff"|"inspect"|"install"|"setwarning"|"distromatic"|"search") command=$1 ;;
|
||||
*)
|
||||
usage
|
||||
echo "Errror: $1 is not a valid command; aborting."
|
||||
@ -711,6 +744,7 @@ done
|
||||
|
||||
[ "$origrepository" ] || { usage; exit 200; }
|
||||
SRCPKGLIST="${LOCAL_REPS_BASE_DIR}/$origrepository/srcpkglist"
|
||||
PKGLIST="${LOCAL_REPS_BASE_DIR}/$origrepository/pkglist"
|
||||
|
||||
[ "$DEST_MODE" ] || { echo "ERROR: $destrepository is not a valid repository; aborting." >&2; exit 200; }
|
||||
[ "$ORIG_MODE" ] || { echo "ERROR: $origrepository is not a valid repository; aborting." >&2; exit 200; }
|
||||
@ -896,6 +930,60 @@ SRCPKGLIST="${LOCAL_REPS_BASE_DIR}/$origrepository/srcpkglist"
|
||||
exit 0;
|
||||
}
|
||||
|
||||
[ "$command" = "install" ] && {
|
||||
[ "$packages" ] || { usage; exit 1; }
|
||||
myarch=`uname -p`
|
||||
if [ "$myarch" = "*686" -o "$myarch" = "athlon" -o "$myarch" = "pentium*" ]; then
|
||||
myarch="i586"
|
||||
fi
|
||||
for i in $packages; do
|
||||
pkg=$i
|
||||
pkgarch=
|
||||
if [ "${i/.*}" != "${i}" ]; then
|
||||
pkg=${i/.*}
|
||||
pkgarch=${i/*.}
|
||||
fi
|
||||
if [ "$pkgarch" -a "$pkgarch" != "$myarch" ]; then
|
||||
get_pkg_info $origrepository $pkgarch $pkg
|
||||
[ "$pkg_name" ] || {
|
||||
echo "WARNING: $pkg not found in $origrepository for arch $pkgarch; skipping."
|
||||
continue
|
||||
}
|
||||
else
|
||||
get_pkg_info $origrepository $myarch $pkg
|
||||
[ "$pkg_name" ] || {
|
||||
echo "WARNING: $pkg not found in $origrepository for arch $myarch; skipping."
|
||||
continue
|
||||
}
|
||||
fi
|
||||
pkg_file=${pkg_name}-${pkg_version}-${pkg_release}.$pkg_arch.rpm
|
||||
pkg_path=${LOCAL_REPS_BASE_DIR}/$pkg_repository/RPMS.$pkg_arch/${pkg_file}
|
||||
[ -r $pkg_path ] || {
|
||||
echo "WARNING: file $pkg_path should exist but doesn't; skipping."
|
||||
continue
|
||||
}
|
||||
echo "Installing $pkg_file..."
|
||||
if [ "$force" = "1" ]; then
|
||||
rpm -i $pkg_path --force
|
||||
rpmret=$?
|
||||
[ $rpmret -gt 0 ] && echo "WARNING: rpm returned $rpmret"
|
||||
if [ "$pkg_arch" != "$myarch" ]; then
|
||||
pkg_file=${pkg_name}-${pkg_version}-${pkg_release}.$myarch.rpm
|
||||
pkg_path=${LOCAL_REPS_BASE_DIR}/$pkg_repository/RPMS.$myarch/${pkg_file}
|
||||
echo "Other arch installation forced; reinstalling native arch package after..."
|
||||
rpm -i $pkg_path --force
|
||||
rpmret=$?
|
||||
[ $rpmret -gt 0 ] && echo "WARNING: rpm returned $rpmret"
|
||||
fi
|
||||
else
|
||||
rpm -i $pkg_path
|
||||
rpmret=$?
|
||||
[ $rpmret -gt 0 ] && echo "WARNING: rpm returned $rpmret"
|
||||
fi
|
||||
done
|
||||
exit 0;
|
||||
}
|
||||
|
||||
[ "$command" = "distromatic" ] && {
|
||||
[ -r $SRCPKGLIST ] || {
|
||||
echo "ERROR: srcpkglist file missing for $origrepository repository; aborting." >&2
|
||||
|
1
autodist-tmpfilesd
Normal file
1
autodist-tmpfilesd
Normal file
@ -0,0 +1 @@
|
||||
d /run/autodist 775 autodist packager
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# autodist upstream updates - find upstream packages updates from different internet resources
|
||||
# Copyright (c) 2004-2014 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# Copyright (c) 2004-2016 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
#
|
||||
|
||||
#[ -r /etc/sysconfig/openmamba-central ] || {
|
||||
@ -88,7 +88,7 @@ function version_compare()
|
||||
function version_find_bigger()
|
||||
{
|
||||
local VER1 VER2 FPOS CUTVER1 CUTVER2
|
||||
|
||||
|
||||
VER1=$1
|
||||
VER2=$2
|
||||
FPOS=1
|
||||
@ -157,6 +157,7 @@ CONFIG_DIR=$CACHE_DIR
|
||||
UPDATES_DB=$CACHE_DIR/upstream-updates
|
||||
ALIASES_DB=$CACHE_DIR/aliases
|
||||
MANUALVER_DB=$CACHE_DIR/manualver
|
||||
BLACKLIST_DB_PREFIX=$CACHE_DIR/blacklist.
|
||||
|
||||
[ -s $PKGLIST_FILE ] || {
|
||||
echo "Error: file $PKGLIST_FILE is missing or empty; aborting." >&2
|
||||
@ -180,9 +181,12 @@ parse_arch_linux() {
|
||||
while read line; do
|
||||
line=`echo $line | sed "s|.*href=\"\([^\"]*\)\">.*|\1|"`
|
||||
pkg=`echo $line | sed "s|\(.*\)-[^-]*-[^-]*-[^-]*|\1|"`
|
||||
ver=`echo $line | sed "s|.*-\([^-]*\)-[^-]*-[^-]*|\1|;s|.*%3a||"`
|
||||
ver=`echo $line | sed "s|.*-\([^-]*\)-[^-]*-[^-]*|\1|;s|.*%3a||i;s|%2b.*||i"`
|
||||
alias=`grep "^$pkg " $ALIASES_DB`
|
||||
|
||||
# Skip blackisted
|
||||
if [ -e ${BLACKLIST_DB_PREFIX}arch ]; then
|
||||
grep -q "^$pkg$" ${BLACKLIST_DB_PREFIX}arch && continue
|
||||
fi
|
||||
[ "$alias" ] || alias=`grep "^lib$pkg " $ALIASES_DB`
|
||||
[ "$alias" ] && pkgalias=${alias/* /} || pkgalias=$pkg
|
||||
line=`grep -i "^$pkgalias:" $buildstmp || grep -i "^lib$pkgalias:" $buildstmp || grep -i " $pkgalias[^-_A-Za-z0-9]" $buildstmp`
|
||||
@ -206,6 +210,9 @@ parse_xorg() {
|
||||
if [ "$line" ]; then
|
||||
ver=`echo $line | sed "s|.*-||"`
|
||||
pkg="${line/-$ver}"
|
||||
if [ -e ${BLACKLIST_DB_PREFIX}xorg ]; then
|
||||
grep -q "^$pkg$" ${BLACKLIST_DB_PREFIX}xorg && continue
|
||||
fi
|
||||
alias=`grep "^$pkg " $ALIASES_DB`
|
||||
if [ ! "$alias" -a "${pkg:0:5}" == "xf86-" ]; then
|
||||
alias="$pkg xorg-drv-${pkg/xf86-}"
|
||||
@ -228,14 +235,17 @@ parse_gnome() {
|
||||
IFS=":"
|
||||
set -- $line
|
||||
pkg="$2"
|
||||
if [ -e ${BLACKLIST_DB_PREFIX}gnome ]; then
|
||||
grep -q "^$pkg$" ${BLACKLIST_DB_PREFIX}gnome && continue
|
||||
fi
|
||||
ver="$3"
|
||||
alias=`grep "^$pkg " $ALIASES_DB`
|
||||
[ "$alias" ] || alias=`grep "^lib$pkg " $ALIASES_DB`
|
||||
if [ "$pkg" -a "$ver" ]; then
|
||||
ver1=$(echo $ver | cut -d. -f1)
|
||||
ver2=$(echo $ver | cut -d. -f2)
|
||||
if [ $ver1 -ge 2 -a $ver1 -le 4 -a "$ver2" -a $(($ver2 % 2)) -ne 0 ]; then
|
||||
# skip unstable 2.x and 3.x versions with odd numbers
|
||||
if [ "$ver2" -a $(($ver2 % 2)) -ne 0 ]; then
|
||||
# skip unstable versions with odd numbers
|
||||
continue
|
||||
else
|
||||
echo "$pkg $ver $SOURCEURL ${alias/* /}" >> $tmpfile
|
||||
@ -249,7 +259,7 @@ parse_gnome() {
|
||||
parse_distromatic() {
|
||||
# parse distrowatch.com packages list
|
||||
[ "$quiet" ] || echo "Parsing Distrowatch packages list..." >&2
|
||||
SOURCEURL="http://distrowatch.com/packages.php"
|
||||
SOURCEURL="http://distrowatch.gds.tuwien.ac.at/packages.php"
|
||||
lynx -width 300 -dump $SOURCEURL |
|
||||
while read line; do
|
||||
[ "`echo $line | grep "Package Version Note"`" ] && start_print=1
|
||||
|
@ -188,7 +188,7 @@ for p in ${allpkgs}; do
|
||||
done
|
||||
|
||||
[ "$pkg_name" ] || {
|
||||
echo "$p: not present in $DEST_REPOSITORY; skipping."
|
||||
[ "$VERBOSE" ] && echo "$p: not present in $DEST_REPOSITORY; skipping."
|
||||
continue
|
||||
}
|
||||
|
||||
@ -205,7 +205,7 @@ for p in ${allpkgs}; do
|
||||
done
|
||||
|
||||
[ "$pkg_name" ] || {
|
||||
echo "$p: not present in $SOURCE_REPOSITORY; skipping."
|
||||
[ "$VERBOSE" ] && echo "$p: not present in $SOURCE_REPOSITORY; skipping."
|
||||
continue
|
||||
}
|
||||
|
||||
@ -245,6 +245,10 @@ for p in ${allpkgs}; do
|
||||
# e.g. SVER=0.11.2 -> VER=0.11.2.3
|
||||
update_type="minor"
|
||||
else
|
||||
if [[ 64#${VER[i-1]} -gt 64#89 && 64#${SVER[i-1]} -lt 64#80 ]]; then
|
||||
[ "$VERBOSE" ] && echo "$p: dubious beta upgrade from ${SVER[i-1]} to ${VER[i-1]}; skipping."
|
||||
continue
|
||||
fi
|
||||
echo "$p: UNEXPECTED CASE - CHECK CODE; skipping."
|
||||
continue
|
||||
fi
|
||||
|
33
autoport
33
autoport
@ -4,7 +4,7 @@
|
||||
#
|
||||
# Released under the terms of the GNU GPL release 3 license
|
||||
#
|
||||
VERSION=0.9.18
|
||||
VERSION=1.0.0
|
||||
|
||||
BASE_ARCH=i586
|
||||
BASE_REPOSITORY=devel
|
||||
@ -17,7 +17,7 @@ me=(${0##*/} $VERSION "Sat Mar 20 2011")
|
||||
function usage() {
|
||||
echo "\
|
||||
${me[0]} ${me[1]}
|
||||
"$"Copyright (C) 2011-2014 Silvan Calarco <silvan.calarco@mambasoft.it>""
|
||||
"$"Copyright (C) 2011-2016 Silvan Calarco <silvan.calarco@mambasoft.it>""
|
||||
"$"Released under the terms of the GNU GPL v3 license"
|
||||
echo "
|
||||
"$"Batch port and cross-build tool based on autodist.""
|
||||
@ -241,12 +241,16 @@ function find_requirements() {
|
||||
fetch_repfiles() {
|
||||
local u
|
||||
|
||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist"
|
||||
curl -f -L -s ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist -o $DATADIR/$PORT_REPOSITORY/srcpkglist ||
|
||||
echo "Warning: unable to fetch ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist"
|
||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching $PORT_REPOSITORY_DISTROMATIC_URL/sources-$BASE_ARCH"
|
||||
curl -f -L -s $PORT_REPOSITORY_DISTROMATIC_URL/sources-$BASE_ARCH -o $DATADIR/$PORT_REPOSITORY/sources-$BASE_ARCH ||
|
||||
echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/sources-$BASE_ARCH"
|
||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching $PORT_REPOSITORY_DISTROMATIC_URL/sources-$TARGET_ARCH"
|
||||
curl -f -L -s $PORT_REPOSITORY_DISTROMATIC_URL/sources-$TARGET_ARCH -o $DATADIR/$PORT_REPOSITORY/sources-$TARGET_ARCH ||
|
||||
echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/sources-$TARGET_ARCH"
|
||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching $PORT_REPOSITORY_DISTROMATIC_URL/builds-$TARGET_ARCH.sh"
|
||||
curl -f -L -s $PORT_REPOSITORY_DISTROMATIC_URL/builds-$TARGET_ARCH.sh -o $DATADIR/$PORT_REPOSITORY/builds-$TARGET_ARCH.sh ||
|
||||
echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/builds-$TARGET_ARCH.sh"
|
||||
for u in ${AUTOPORT_UNSTAGE_ARCHS}; do
|
||||
@ -255,6 +259,7 @@ fetch_repfiles() {
|
||||
return
|
||||
}
|
||||
done
|
||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching ${REPS_BASE_URL}/${PORT_REPOSITORY/-*}/unstage.$TARGET_ARCH"
|
||||
curl -f -L -s ${REPS_BASE_URL}/${PORT_REPOSITORY/-*}/unstage.$TARGET_ARCH -o $DATADIR/$PORT_REPOSITORY/unstage.$TARGET_ARCH ||
|
||||
echo "Warning: unable to fetch ${REPS_BASE_URL}/${PORT_REPOSITORY/-*}/unstage.$TARGET_ARCH"
|
||||
}
|
||||
@ -436,12 +441,11 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
fi
|
||||
done
|
||||
echo "Packages to rebuild: ${JOB[*]}"
|
||||
else
|
||||
echo "Packages to port: ${needport_list[*]}"
|
||||
for p in ${needport_list[*]}; do
|
||||
JOB=(${JOB[*]} $p)
|
||||
done
|
||||
fi
|
||||
echo "Packages to port: ${needport_list[*]}"
|
||||
for p in ${needport_list[*]}; do
|
||||
JOB=(${JOB[*]} $p)
|
||||
done
|
||||
|
||||
[ -e $DATADIR/autoport-$PORT_REPOSITORY-current ] && \
|
||||
mv $DATADIR/autoport-$PORT_REPOSITORY-current $DATADIR/autoport-$PORT_REPOSITORY-last
|
||||
@ -538,10 +542,14 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
done
|
||||
[ ! "$DONT_PREPARE_THIS" -a ! "`grep ^$JOB_CURRENT\$ $DATAARCHDIR/preparedjobs`" ] && {
|
||||
echo -n "prepare"
|
||||
if [ ! "$REBUILD_DEPENDANT_MODE" -a "$step" = "1" ]; then
|
||||
REPOSITORY_STRICT_ADD="--repository-strict"
|
||||
else
|
||||
REPOSITORY_STRICT_ADD=""
|
||||
fi
|
||||
[ "$VERBOSE_MODE" ] && echo "
|
||||
%% COMMAND: LANG=C LC_ALL=C autodist -p ${JOB_CURRENT} --server $PORT_REPOSITORY --repository $PORT_REPOSITORY --severity 2 -- $STAGEOPTS"
|
||||
LANG=C LC_ALL=C autodist -p ${JOB_CURRENT} --server $PORT_REPOSITORY --repository $PORT_REPOSITORY --severity 2 -- $STAGEOPTS &>$tmpfile
|
||||
cat $tmpfile >> $logfile
|
||||
%% COMMAND: LANG=C LC_ALL=C autodist -p ${JOB_CURRENT} --server $PORT_REPOSITORY --repository $PORT_REPOSITORY $REPOSITORY_STRICT_ADD --severity 2 -- $STAGEOPTS"
|
||||
LANG=C LC_ALL=C autodist -p ${JOB_CURRENT} --server $PORT_REPOSITORY --repository $PORT_REPOSITORY $REPOSITORY_STRICT_ADD --severity 2 -- $STAGEOPTS &>$tmpfile
|
||||
[ $? -gt 0 ] && {
|
||||
RES=`find_source_by_provide $PORT_REPOSITORY $JOB_CURRENT`
|
||||
for j in ${RES}; do
|
||||
@ -601,10 +609,11 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
echo "(FAILED) [can't get repository information for this package]"
|
||||
continue
|
||||
}
|
||||
src_release_num=`echo $src_release | sed "s|\([0-9.]*\).*|\1|"`
|
||||
[ "$VERBOSE_MODE" ] && echo "
|
||||
%% COMMAND: LANG=C LC_ALL=C autospec -u ${JOB_CURRENT} -a4 --rebuild --changelog \"$REBUILD_MILESTONE milestone rebuild\""
|
||||
%% COMMAND: LANG=C LC_ALL=C autospec -u ${JOB_CURRENT} -a4 --changelog \"$REBUILD_MILESTONE milestone rebuild\" $src_version $src_release_num${REBUILD_MILESTONE}"
|
||||
# FIXME: should be implemented in autodist
|
||||
LANG=C LC_ALL=C autospec -u ${JOB_CURRENT} -a4 --rebuild --changelog "$REBUILD_MILESTONE milestone rebuild" &>$tmpfile
|
||||
LANG=C LC_ALL=C autospec -u ${JOB_CURRENT} -a4 --changelog "$REBUILD_MILESTONE milestone rebuild" $src_version $src_release_num${REBUILD_MILESTONE} &>$tmpfile
|
||||
[ $? -gt 0 ] && {
|
||||
if [ "$VERBOSE_MODE" ]; then
|
||||
echo
|
||||
|
@ -1,7 +1,8 @@
|
||||
# Global configuration file for autodist
|
||||
#
|
||||
AUTODIST_ARCHS=(i586 x86_64 arm)
|
||||
REPS_BASE_URL=http://www.openmamba.org/pub/openmamba
|
||||
SITE_BASE_URL=http://www.openmamba.org
|
||||
REPS_BASE_URL=${SITE_BASE_URL}/pub/openmamba
|
||||
LOCAL_REPS_BASE_DIR=/var/ftp/pub/openmamba
|
||||
SEND_SERVER=devel-autodist
|
||||
#WEBBUILD_URL=http://localhost/cgi-bin/webbuild
|
||||
|
@ -58,7 +58,11 @@ sed -i "s|^Vendor:.*|Vendor: openmamba|;
|
||||
s|^PreReq:[[:space:]]*/sbin/install-info|Requires(post):%{__install_info}|;
|
||||
s|^PreReq:[[:space:]]*%{__install_info}|Requires(post):%{__install_info}|;
|
||||
s|^PreReq:[[:space:]]*|Requires(pre): |;
|
||||
s|http://.*.dl\.sourceforge\.net/|http://downloads.sourceforge.net/|" $SPECFILE
|
||||
s|^\(Requires:[[:space:]]*kde-workspace\)$|#\1|;
|
||||
s|http://.*.dl\.sourceforge\.net/|http://downloads.sourceforge.net/|;
|
||||
s|http://ftp.kde.org/stable/|http://download.kde.org/stable/|;
|
||||
s|ftp://ftp.kde.org/pub/kde/|http://download.kde.org/|;
|
||||
s|http://download.kde.org/stable/%{version}|http://download.kde.org/stable/applications/%{version}|" $SPECFILE
|
||||
#sed -i "s|^\(Source.*:[[:space:]]*ftp://ftp.kde.org/pub/kde/stable/.*.tar.\)bz2|\1xz|" $SPECFILE
|
||||
|
||||
if [ $BUILDREQNUM -gt 0 ]; then
|
||||
|
@ -1,33 +1,48 @@
|
||||
#!/bin/bash
|
||||
[ -e /etc/autodist/config ] && . /etc/autodist/config
|
||||
[ -e /etc/sysconfig/autoport ] && . /etc/sysconfig/autoport
|
||||
|
||||
RPMS_CTIME_OLD="+14"
|
||||
BUILD_CTIME_OLD="+14"
|
||||
SOURCES_CTIME_OLD="+40"
|
||||
SOURCES_PATH_CTIME_OLD="+730"
|
||||
SRPMS_CTIME_OLD="+14"
|
||||
TMP_CTIME_OLD="+2"
|
||||
|
||||
function clean() {
|
||||
dir=$1
|
||||
arch=$2
|
||||
find $dir/RPM/RPMS/$arch/ -maxdepth 1 -ctime +21 -exec rm -rf {} \;
|
||||
find $dir/RPM/RPMS/noarch/ -maxdepth 1 -ctime +21 -exec rm -rf {} \;
|
||||
find $dir/RPM/BUILD/ -maxdepth 1 -ctime +21 -exec rm -rf {} \;
|
||||
find $dir/RPM/SOURCES/ -maxdepth 1 -ctime +120 -a ! -name "*.patch" -exec rm -rf {} \;
|
||||
find $dir/RPM/SRPMS/ -maxdepth 1 -ctime +48 -exec rm -rf {} \;
|
||||
[ "$VERBOSE" ] && echo "Cleaning from base directory $dir..."
|
||||
[ -e $dir/ ] && find $dir/ -mindepth 1 -maxdepth 1 -name "pipe\:\[*" -exec rm -f {} \;
|
||||
[ -e $dir/RPM/SPECS/ ] && find $dir/RPM/SPECS/ -mindepth 1 -maxdepth 1 -type f -not -name "*.spec*" -exec rm -f {} \;
|
||||
for arch in ${AUTODIST_ARCHS[*]}; do
|
||||
[ -e $dir/RPM/RPMS/$arch/ ] && find $dir/RPM/RPMS/$arch/ -mindepth 1 -maxdepth 1 -type f -mtime ${RPMS_CTIME_OLD} -exec rm -f {} \;
|
||||
done
|
||||
[ -e $dir/RPM/RPMS/noarch/ ] && find $dir/RPM/RPMS/noarch/ -mindepth 1 -maxdepth 1 -type f -mtime ${RPMS_CTIME_OLD} -exec rm -f {} \;
|
||||
[ -e $dir/RPM/BUILD/ ] && find $dir/RPM/BUILD/ -mindepth 1 -maxdepth 1 -type d -ctime ${BUILD_CTIME_OLD} -exec rm -rf {} \;
|
||||
[ -e $dir/RPM/SOURCES/ ] && {
|
||||
find $dir/RPM/SOURCES/ -mindepth 1 -maxdepth 1 -type f -ctime ${SOURCES_CTIME_OLD} -a ! -name "*.patch" -exec rm -rf {} \;
|
||||
find $dir/RPM/SOURCES/ -mindepth 1 -maxdepth 1 -type f -ctime ${SOURCES_PATH_CTIME_OLD} -a -name "*.patch" -exec rm -rf {} \;
|
||||
}
|
||||
[ -e $dir/RPM/SRPMS/ ] && find $dir/RPM/SRPMS/ -mindepth 1 -maxdepth 1 -type f -mtime ${SRPMS_CTIME_OLD} -exec rm -f {} \;
|
||||
}
|
||||
|
||||
for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do
|
||||
if [ "${AUTOPORT_CHROOT[$i]}" ]; then
|
||||
a=${AUTOPORT_CHROOT[$i]}
|
||||
clean /var/autoport/$a/usr/src ${AUTOPORT_ARCH[$i]}
|
||||
[ -e /var/autoport/$a/var/autodist/RPM/RPMS/$arch ] && \
|
||||
clean /var/autoport/$a/var/autodist ${AUTOPORT_ARCH[$i]}
|
||||
clean /var/autoport/$a/usr/src
|
||||
[ -e /var/autoport/$a/var/autodist/RPM/RPMS/ ] && \
|
||||
clean /var/autoport/$a/var/autodist
|
||||
[ -e /var/autoport/$a/var/tmp/autodist ] && \
|
||||
find /var/autoport/$a/var/tmp/autodist/ -maxdepth 1 -ctime +25 -exec rm -rf {} \;
|
||||
find /var/autoport/$a/tmp/ -maxdepth 1 -ctime +25 -exec rm -rf {} \;
|
||||
find /var/autoport/$a/var/tmp/autodist/ -mindepth 1 -maxdepth 1 -type f -mtime ${TMP_CTIME_OLD} -exec rm -rf {} \;
|
||||
find /var/autoport/$a/tmp/ -mindepth 1 -maxdepth 1 -type f -mtime ${TMP_CTIME_OLD} -exec rm -rf {} \;
|
||||
elif [ "${AUTOPORT_UPDATE[$i]}" ]; then
|
||||
clean /var/autodist ${AUTOPORT_ARCH[$i]}
|
||||
find /var/autodist-tmp/ -maxdepth 1 -ctime +25 -exec rm -rf {} \;
|
||||
clean /var/autodist
|
||||
find /var/autodist-tmp/ -mindepth 1 -maxdepth 1 -type f -mtime ${TMP_CTIME_OLD} -exec rm -rf {} \;
|
||||
elif [ "${AUTOPORT_NATIVE[$i]}" -a "${AUTOPORT_CHROOT_USER[$i]}" ]; then
|
||||
WORKINGHOME=`getent passwd ${AUTOPORT_CHROOT_USER[$i]} | cut -d: -f6`
|
||||
if [ -e $WORKINGHOME ]; then
|
||||
clean $WORKINGHOME ${AUTOPORT_ARCH[$i]}
|
||||
clean $WORKINGHOME
|
||||
fi
|
||||
find /var/autodist-tmp/ -maxdepth 1 -ctime +25 -exec rm -rf {} \;
|
||||
find /var/autodist-tmp/ -mindepth 1 -maxdepth 1 -type f -mtime ${TMP_CTIME_OLD} -exec rm -rf {} \;
|
||||
fi
|
||||
done
|
||||
|
@ -1,13 +1,16 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# autodist autoupdate hourly cron script
|
||||
# (c) 2008-2013 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# (c) 2008-2014 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
#
|
||||
. /etc/autodist/config
|
||||
. /etc/sysconfig/autoport
|
||||
|
||||
ME=`basename $0`
|
||||
|
||||
# Disable icecc
|
||||
export PATH=/usr/bin:$PATH
|
||||
|
||||
# FIXME: parametrize automaint call
|
||||
if [ ! "$AUTOPORT_UPDATE_NO_AUTOMAINT" ]; then
|
||||
automaint -s devel-autodist -d devel -p devel-makedist
|
||||
@ -18,7 +21,7 @@ fi
|
||||
exit 0
|
||||
}
|
||||
|
||||
PIDFILE=/var/run/autodist/autodist.pid
|
||||
PIDFILE=/run/autodist/autodist.pid
|
||||
HOUR=`date +%H`
|
||||
[ "`uname -m`" = "x86_64" ] && HOST_IS_X86_64=1
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# openmamba-autobuild-autoport daily cron script
|
||||
# (c) 2008-2012 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# (c) 2008-2014 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
#
|
||||
#. /etc/sysconfig/openmamba-central
|
||||
. /etc/sysconfig/autoport
|
||||
@ -14,7 +14,7 @@ ME=`basename $0`
|
||||
exit 0
|
||||
}
|
||||
|
||||
PIDFILE=/var/run/autodist/autoport.pid
|
||||
PIDFILE=/run/autodist/autoport.pid
|
||||
HOUR=`date +%H`
|
||||
[ "`uname -m`" = "x86_64" ] && HOST_IS_X86_64=1
|
||||
|
||||
@ -31,6 +31,8 @@ function pid_check() {
|
||||
|
||||
pid_check
|
||||
|
||||
NATIVE_UPGRADED=
|
||||
|
||||
for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do
|
||||
for r in ${AUTOPORT_REPOSITORIES[$i]}; do
|
||||
[ "${AUTOPORT_ARCH[$i]}" ] || continue
|
||||
@ -55,10 +57,13 @@ for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do
|
||||
|
||||
if [ "${AUTOPORT_NATIVE[$i]}" ]; then
|
||||
a=${AUTOPORT_ARCH[$i]}
|
||||
[[ "`/usr/bin/tty`" != "not a tty" ]] && echo "Updating packages in $a native environment"
|
||||
echo "= Updating packages in $a native environment..." >> $LOGFILE
|
||||
LANG=C smart update > /dev/null
|
||||
LANG=C smart upgrade -y >> $LOGFILE
|
||||
if [ ! "$NATIVE_UPGRADED" ]; then
|
||||
[[ "`/usr/bin/tty`" != "not a tty" ]] && echo "Updating packages in $a native environment"
|
||||
echo "= Updating packages in $a native environment..." >> $LOGFILE
|
||||
LANG=C smart update > /dev/null
|
||||
LANG=C smart upgrade -y >> $LOGFILE
|
||||
NATIVE_UPGRADED=1
|
||||
fi
|
||||
echo "= Working on $r($a) in native mode" >> $LOGFILE
|
||||
su -l ${AUTOPORT_CHROOT_USER[$i]} -c "$CMD_PREFIX autoport -b -r $r" >> $LOGFILE
|
||||
AUTODIST_HOME=`getent passwd ${AUTOPORT_CHROOT_USER[$i]} | cut -d: -f6`
|
||||
|
@ -14,7 +14,7 @@ ME=`basename $0`
|
||||
exit 0
|
||||
}
|
||||
|
||||
PIDFILE=/var/run/autodist/autoport.pid
|
||||
PIDFILE=/run/autodist/autoport.pid
|
||||
HOUR=`date +%H`
|
||||
[ "`uname -m`" = "x86_64" ] && HOST_IS_X86_64=1
|
||||
|
||||
|
@ -21,6 +21,7 @@ var reloadtime = 0;
|
||||
|
||||
function ajax_getvalues() {
|
||||
var url = window.location.protocol+"//"+window.location.hostname+"/cgi-bin/autodist?FORMAT=xml&"+window.location.href.replace(/.*\?/,"");
|
||||
var xmlhttp;
|
||||
if (window.XMLHttpRequest)
|
||||
xmlhttp = new XMLHttpRequest();
|
||||
else if (window.ActiveXObject)
|
||||
|
BIN
webbuild/html/images/refresh.png
Normal file
BIN
webbuild/html/images/refresh.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 335 B |
78
webbuild/html/styles/webbuild-post.css
Normal file
78
webbuild/html/styles/webbuild-post.css
Normal file
@ -0,0 +1,78 @@
|
||||
webbuild.a { }
|
||||
pre {
|
||||
background: none;
|
||||
border:0;
|
||||
padding:0;
|
||||
margin:0;
|
||||
-webkit-box-shadow:none;
|
||||
box-shadow:none;
|
||||
font-family: monospace;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
form { margin:0; }
|
||||
a.webbuild:link { color:#0b0600; text-decoration: none; }
|
||||
a.webbuild:visited { color:#0b0600; text-decoration: none; }
|
||||
a.webbuild:active { color:#0b0600; text-decoration: none; }
|
||||
a.webbuild:hover { text-decoration: underline; }
|
||||
hr { margin:0; color:black; background: #aaaaaa; }
|
||||
label { white-space:nowrap; text-decoration:none; font-weight:initial; }
|
||||
|
||||
.webbuild input {
|
||||
font-size: 8pt;
|
||||
font-family:liberationsans,freesans,Arial,Verdana,Helvetica,sans-serif;
|
||||
padding: 1px;
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
select {
|
||||
font-size: 8pt;
|
||||
font-family:liberationsans,freesans,Arial,Verdana,Helvetica,sans-serif;
|
||||
padding: 0;
|
||||
margin: 1px;
|
||||
max-width: 98%;
|
||||
background-color: buttonface;
|
||||
}
|
||||
|
||||
input[type="text"] {
|
||||
font-family:liberationsans,freesans,Arial,Verdana,Helvetica,sans-serif;
|
||||
padding: 1px;
|
||||
margin: 1px;
|
||||
border: 1px solid #AAAAAA;
|
||||
}
|
||||
|
||||
input[type="button"] {
|
||||
font-family:liberationsans,freesans,Arial,Verdana,Helvetica,sans-serif;
|
||||
font-size: 8pt;
|
||||
font-weight: 400;
|
||||
margin: 1px;
|
||||
border: 1px solid #AAAAAA;
|
||||
white-space:nowrap;
|
||||
line-height: 1.1em;
|
||||
}
|
||||
|
||||
input[type="button"]::-moz-focus-inner { padding: 0; border: 0; }
|
||||
|
||||
input[type="button"]:hover {
|
||||
border: 1px solid #666666;
|
||||
}
|
||||
input[type="radio"] {
|
||||
font-family:liberationsans,freesans,Arial,Verdana,Helvetica,sans-serif;
|
||||
font-size: 7pt;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
input[type="checkbox"] {
|
||||
font-family:liberationsans,freesans,Arial,Verdana,Helvetica,sans-serif;
|
||||
vertical-align:middle;
|
||||
-ms-transform: scale(0.9);
|
||||
-moz-transform: scale(0.9);
|
||||
-webkit-transform: scale(0.9);
|
||||
-o-trasnform: scale(0.9);
|
||||
padding: 1px;
|
||||
margin: 1px;
|
||||
}
|
13
webbuild/html/styles/webbuild-standalone.css
Normal file
13
webbuild/html/styles/webbuild-standalone.css
Normal file
@ -0,0 +1,13 @@
|
||||
body { font-size: 9pt; font-family: liberationsans, freesans, arial, verdana, sans-serif; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); }
|
||||
table { font-size: 9pt; font-family: liberationsans, freesans, arial, verdana, sans-serif; background-color: rgb(255, 255, 255); }
|
||||
img { border: 0; margin: 0px; vertical-align:middle; }
|
||||
h1 { font-size: 13pt; font-weight: bold; }
|
||||
h2 { font-size: 11pt; font-weight: bold; }
|
||||
h3 { font-size: 10pt; font-weight: bold; margin-top: 20px; margin-bottom: 2px; }
|
||||
h4 { margin:5; margin-right: 10; font-size: 9pt; font-weight: normal; }
|
||||
hr { margin:0; color:white; }
|
||||
a { }
|
||||
a:link { color:#2b6600; text-decoration: none; }
|
||||
a:visited { color:#2b6600; text-decoration: none; }
|
||||
a:active { color:#2b6600; text-decoration: none; }
|
||||
a:hover { text-decoration: underline; }
|
@ -1,75 +1,18 @@
|
||||
body { font-size: 9pt; font-family: liberationsans, freesans, arial, verdana, sans-serif; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); }
|
||||
table { font-size: 9pt; font-family: liberationsans, freesans, arial, verdana, sans-serif; background-color: rgb(255, 255, 255); }
|
||||
img { border: 0; margin: 0px; vertical-align:middle; }
|
||||
h1 { font-size: 13pt; font-weight: bold; }
|
||||
h2 { font-size: 11pt; font-weight: bold; }
|
||||
h3 { font-size: 10pt; font-weight: bold; margin-top: 20px; margin-bottom: 2px; }
|
||||
h4 { margin:5; margin-right: 10; font-size: 9pt; font-weight: normal; }
|
||||
hr { margin:0; color:white; }
|
||||
a { }
|
||||
a:link { color:#2b6600; text-decoration: none; }
|
||||
a:visited { color:#2b6600; text-decoration: none; }
|
||||
a:active { color:#2b6600; text-decoration: none; }
|
||||
a:hover { text-decoration: underline; }
|
||||
|
||||
label {
|
||||
white-space:nowrap;
|
||||
}
|
||||
|
||||
input {
|
||||
font-size: 8pt;
|
||||
font-family:liberationsans,freesans,Arial,Verdana,Helvetica,sans-serif;
|
||||
padding: 0;
|
||||
margin: 1px;
|
||||
}
|
||||
select {
|
||||
font-size: 8pt;
|
||||
font-family:liberationsans,freesans,Arial,Verdana,Helvetica,sans-serif;
|
||||
padding: 0;
|
||||
margin: 1px;
|
||||
height: 18px;
|
||||
}
|
||||
input[type="text"] {
|
||||
padding: 0px;
|
||||
margin: 1px;
|
||||
height: 1.40em;
|
||||
border: 1px solid #AAAAAA;
|
||||
}
|
||||
|
||||
input[type="button"] {
|
||||
margin: 1px;
|
||||
white-space:nowrap;
|
||||
height: 18px;
|
||||
}
|
||||
input[type="radio"] {
|
||||
font-size: 7pt;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
input[type="checkbox"] {
|
||||
vertical-align:middle;
|
||||
-ms-transform: scale(0.9);
|
||||
-moz-transform: scale(0.9);
|
||||
-webkit-transform: scale(0.9);
|
||||
-o-trasnform: scale(0.9);
|
||||
padding: 1px;
|
||||
margin: 1px;
|
||||
}
|
||||
.boldbutton {
|
||||
font-weight: bold;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
.redbutton {
|
||||
color: red;
|
||||
color: red !important;
|
||||
}
|
||||
.redbutton[disabled] {
|
||||
color: lightgray;
|
||||
color: lightgray !important;
|
||||
}
|
||||
.redboldbutton {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
color: red !important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
.redboldbutton[disabled] {
|
||||
color: lightgray;
|
||||
color: lightgray !important;
|
||||
}
|
||||
.screencontainer {
|
||||
text-align:center;
|
||||
@ -83,8 +26,8 @@ input[type="checkbox"] {
|
||||
|
||||
.opaquebackground {
|
||||
text-align:center;
|
||||
position:fixed;
|
||||
z-index:15 !important;
|
||||
position: fixed;
|
||||
height:100%;
|
||||
width:100%;
|
||||
left:0;
|
||||
@ -166,77 +109,166 @@ input[type="checkbox"] {
|
||||
.multiselect label {
|
||||
display:block;
|
||||
white-space:nowrap;
|
||||
font-weight:400;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.socialbox {
|
||||
.webbuildtopright {
|
||||
float:right;
|
||||
font-size:8pt;
|
||||
border:0px;
|
||||
padding:0px;
|
||||
height:130px;
|
||||
line-height: 100%;
|
||||
border:1px solid #2b6600;
|
||||
}
|
||||
|
||||
.searchbox {
|
||||
position:relative;
|
||||
display:block;
|
||||
float:left;
|
||||
width:215px;
|
||||
align:center;
|
||||
left:660px;
|
||||
top:-25px;
|
||||
// height:21px;
|
||||
font-size:8pt;
|
||||
border:1px solid #2b6600;
|
||||
// margin:4px;
|
||||
padding:2px;
|
||||
background-color: #e0f2d0;
|
||||
}
|
||||
.chatpanel {
|
||||
float:left;
|
||||
width:215px;
|
||||
align:center;
|
||||
}
|
||||
.webbuild {
|
||||
font-size: 8pt;
|
||||
}
|
||||
.webbuild td {
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
.editor {
|
||||
width:690px;
|
||||
height:300px;
|
||||
border:1px solid #cccccc;
|
||||
padding:0px;
|
||||
font-family: liberationsans, freesans, arial, verdana, sans-serif;
|
||||
line-height: 1.3em;
|
||||
color: #000000;
|
||||
margin:0px;
|
||||
font-family:'Courier New', Courier, 'Nimbus Mono L', monospace;
|
||||
font-size:8pt;
|
||||
}
|
||||
.webbuild td { font-size: 8pt; border:0; }
|
||||
}
|
||||
.webbuild table { font-size: 9pt; font-family: liberationsans, freesans, arial, verdana, sans-serif; background-color: rgb(255, 255, 255); }
|
||||
.webbuild img { border: 0; margin: 0px; vertical-align:middle; }
|
||||
.webbuild h1 { font-size: 13pt; font-weight: bold; }
|
||||
.webbuild h2 { font-size: 11pt; font-weight: bold; }
|
||||
.webbuild h3 { font-size: 10pt; font-weight: bold; margin-top: 20px; margin-bottom: 2px; }
|
||||
.webbuild h4 { margin:5; margin-right: 10; font-size: 9pt; font-weight: normal; }*/
|
||||
.webbuild hr { margin:0; color:white; }
|
||||
.webbuild div { margin-bottom:1px; padding-bottom:1px; }
|
||||
|
||||
.maintainer {
|
||||
width:684px;
|
||||
height:300px;
|
||||
overflow:auto;
|
||||
font-size:7pt;
|
||||
border:1px solid #2b6600;
|
||||
.webbuildcontainer {
|
||||
max-width:920px;
|
||||
height:auto;
|
||||
}
|
||||
.webbuildwrapleft {
|
||||
float:left;
|
||||
width:100%;
|
||||
margin-right:-210px;
|
||||
}
|
||||
.webbuildleft {
|
||||
margin-right:210px !important;
|
||||
padding:0;
|
||||
margin:0;
|
||||
background-color:white;
|
||||
}
|
||||
|
||||
.socialbox {
|
||||
.webbuildright {
|
||||
float:right;
|
||||
font-size:8pt;
|
||||
padding:0px;
|
||||
height:130px;
|
||||
line-height: 100%;
|
||||
border:1px solid #2b6600;
|
||||
width:202px;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
.processes {
|
||||
float:left;
|
||||
@media screen and (min-width: 901px) {
|
||||
.webbuildright {
|
||||
width:202px;
|
||||
}
|
||||
.socialbox {
|
||||
width:200px;
|
||||
}
|
||||
}
|
||||
.operationpanelinfo {
|
||||
margin-top:137px;
|
||||
border:1px solid #2b6600;
|
||||
background-color:#E0F2D0;
|
||||
padding:1px;
|
||||
}
|
||||
.operationpanelsend {
|
||||
margin-top:5px;
|
||||
border:1px solid #2b6600;
|
||||
background-color:#E0F2D0;
|
||||
padding:1px;
|
||||
}
|
||||
.operationpanelautodist {
|
||||
margin-top:5px;
|
||||
border:1px solid #2b6600;
|
||||
background-color:#FFFFDE;
|
||||
padding:1px;
|
||||
}
|
||||
.operationpanelpatches {
|
||||
margin-top:5px;
|
||||
border:1px solid #2b6600;
|
||||
background-color:#E0F2D0;
|
||||
padding:1px;
|
||||
}
|
||||
.operationpanelupload {
|
||||
margin-top:5px;
|
||||
border:1px solid #2b6600;
|
||||
background-color:#FFFFFF;
|
||||
padding:1px;
|
||||
}
|
||||
.operationpanelpackageinfo {
|
||||
margin-top:5px;
|
||||
border:1px solid #2b6600;
|
||||
background-color:#A7DEDE;
|
||||
padding:1px;
|
||||
}
|
||||
.operationpanelgenericinfo {
|
||||
margin-top:5px;
|
||||
border:1px solid #2b6600;
|
||||
background-color:#A7DEDE;
|
||||
padding:1px;
|
||||
}
|
||||
.operationpanelhost {
|
||||
margin-top:5px;
|
||||
border:1px solid #2b6600;
|
||||
background-color:#FFFFFF;
|
||||
padding:1px;
|
||||
}
|
||||
.operationpaneloperations {
|
||||
margin-top:5px;
|
||||
border:1px solid #2b6600;
|
||||
background-color:#FFFFDE;
|
||||
padding:1px;
|
||||
}
|
||||
.operationpaneloperations > textarea {
|
||||
padding:0;
|
||||
}
|
||||
.webbuildprocesses {
|
||||
font-size:7pt;
|
||||
padding:0px;
|
||||
height:130px;
|
||||
line-height: 130%;
|
||||
margin-bottom: 2px;
|
||||
border:1px solid #2b6600;
|
||||
width:100%;
|
||||
margin:0;
|
||||
// display:table-cell;
|
||||
background-color:#E0F2D0;
|
||||
padding:1px;
|
||||
}
|
||||
.processes {
|
||||
width:100%;
|
||||
}
|
||||
.editor {
|
||||
float:left;
|
||||
width:100%;
|
||||
height:300px;
|
||||
border:1px solid #cccccc;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
font-family:monospace;
|
||||
font-size:8pt;
|
||||
}
|
||||
.maintainer {
|
||||
float:left;
|
||||
width:100%;
|
||||
height:300px;
|
||||
overflow:auto;
|
||||
font-size:7pt;
|
||||
border:1px solid #2b6600;
|
||||
padding:1px;
|
||||
margin:0;
|
||||
background-color:white;
|
||||
float:left;
|
||||
}
|
||||
|
||||
.notes {
|
||||
@ -250,13 +282,14 @@ input[type="checkbox"] {
|
||||
}
|
||||
|
||||
.output {
|
||||
width:680px;
|
||||
width:100%;
|
||||
height:300px;
|
||||
overflow:auto;
|
||||
overflow-x:hidden;
|
||||
word-wrap: break-word;
|
||||
font-family:'Courier New', Courier, 'Nimbus Mono L', monospace;
|
||||
font-family:monospace;
|
||||
font-size:8pt;
|
||||
font-weight:400;
|
||||
border:1px solid #2b6600;
|
||||
padding:2px;
|
||||
margin:0;
|
||||
@ -264,27 +297,71 @@ input[type="checkbox"] {
|
||||
color:white;
|
||||
}
|
||||
|
||||
.output a:link {
|
||||
text-decoration: underline;
|
||||
color:white;
|
||||
}
|
||||
|
||||
.output a,
|
||||
.output a:link,
|
||||
.output a:visited {
|
||||
text-decoration: underline;
|
||||
color:white;
|
||||
}
|
||||
|
||||
.output p {
|
||||
background-color:gray;
|
||||
color:white;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 900px) {
|
||||
.webbuildright,
|
||||
.webbuildleft,
|
||||
.operationpanelinfo,
|
||||
.operationpanelsend,
|
||||
.operationpanelautodist {
|
||||
width:100%;
|
||||
}
|
||||
.socialbox {
|
||||
float: none !important;
|
||||
}
|
||||
span#socialbox > span > div > div > img,
|
||||
span#socialbox > span > div > div:first-child {
|
||||
height:12px !important;
|
||||
width:12px !important;
|
||||
}
|
||||
span#socialbox > span > div > div:nth-child(2),
|
||||
span#socialbox > span > div > div:nth-child(3) {
|
||||
margin-left: 12px !important;
|
||||
}
|
||||
.operationpanelinfo {
|
||||
margin-top:5px !important;
|
||||
}
|
||||
.webbuildtopright,
|
||||
.webbuildtopleft {
|
||||
margin-top:5px;
|
||||
width:100%;
|
||||
}
|
||||
.chatpanel {
|
||||
margin-left:10px;
|
||||
}
|
||||
select,
|
||||
input {
|
||||
margin:3px !important;
|
||||
}
|
||||
|
||||
}
|
||||
@media screen and (max-width: 370px) {
|
||||
.webbuildright,
|
||||
.webbuildleft {
|
||||
width:100%;
|
||||
}
|
||||
}
|
||||
|
||||
.matrix {
|
||||
width:100%;
|
||||
height:100%;
|
||||
height:97%;
|
||||
word-wrap: break-word;
|
||||
overflow:auto;
|
||||
font-size:7pt;
|
||||
// border:1px solid #2b6600;
|
||||
padding-right:-2px;
|
||||
padding-bottom:-2px;
|
||||
margin-left:2px;
|
||||
margin-bottom:2px;
|
||||
padding:0px;
|
||||
top:5px;
|
||||
left:5px;
|
||||
// background-color:#e0f2d0;
|
||||
/* -moz-column-count: 2;
|
||||
-moz-column-gap: 1.5em;
|
||||
@ -316,9 +393,11 @@ input[type="checkbox"] {
|
||||
}
|
||||
|
||||
.scroll-pane {
|
||||
/* socialbox */
|
||||
background-color: #e0f2d0;
|
||||
height:130px;
|
||||
width:200px;
|
||||
min-width:200px;
|
||||
width:100%;
|
||||
overflow:auto;
|
||||
float:right;
|
||||
}
|
||||
@ -337,11 +416,11 @@ input[type="checkbox"] {
|
||||
}
|
||||
|
||||
.scroll-pane3 {
|
||||
/* processes */
|
||||
background-color: #e0f2d0;
|
||||
height:130px;
|
||||
width:685px;
|
||||
width:auto;
|
||||
overflow:auto;
|
||||
float:right;
|
||||
}
|
||||
|
||||
.scroll-pane3-h {
|
||||
@ -357,3 +436,17 @@ input[type="checkbox"] {
|
||||
overflow:auto;
|
||||
}
|
||||
|
||||
/* socialbox */
|
||||
.socialbox {
|
||||
float:right;
|
||||
font-size:8pt;
|
||||
//border:0;
|
||||
//margin:0;
|
||||
//padding:0;
|
||||
height:130px;
|
||||
line-height: 100%;
|
||||
border:1px solid #2b6600;
|
||||
}
|
||||
.socialbox div { margin-bottom:1px; }
|
||||
.socialbox hr { margin:0; color:#FFF; }
|
||||
.downloadbox table { font-size: 9pt; border:1px solid #2b6600; margin: 4px; padding:4; background-color: #e0f2d0; }
|
||||
|
@ -1,6 +1,7 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html><head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/images/webbuild.ico" />
|
||||
<!-- styles needed by jScrollPane -->
|
||||
@ -11,6 +12,7 @@
|
||||
<script type="text/javascript" src="/scripts/jquery.mousewheel.js"></script>
|
||||
<!-- the jScrollPane script -->
|
||||
<script type="text/javascript" src="/scripts/jquery.jscrollpane.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/styles/webbuild-standalone.css">
|
||||
<link rel="stylesheet" type="text/css" href="/styles/webbuild.css">
|
||||
<script type="text/javascript" src="/scripts/socialbox.js"></script>
|
||||
<script>
|
||||
@ -92,6 +94,7 @@ function editorChanged() {
|
||||
|
||||
function ajax_getvalues(request,confirm) {
|
||||
var url = "/cgi-bin/webbuild"
|
||||
var xmlhttp;
|
||||
|
||||
if (!user) {
|
||||
user=getCookie("webbuild-user");
|
||||
@ -258,39 +261,33 @@ function ajaxFileUpload(request)
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<link rel="stylesheet" type="text/css" href="/styles/webbuild-post.css">
|
||||
|
||||
</head><body>
|
||||
<table width="100%">
|
||||
<tr><td>
|
||||
<span class=webbuild>
|
||||
<div id=container style="position:relative;width:894px;height:auto;top:0;left:0;margin-left:auto;margin-right:auto;">
|
||||
<div class="webbuildcontainer">
|
||||
<form id=webbuildform name=webbuild method=post action="javascript:">
|
||||
<img src="/images/webbuild.png" alt="build automatici">
|
||||
<b>- Webbuild - Interfaccia Web per lo sviluppo di openmamba</b>
|
||||
|
||||
<span id="searchbox"></span>
|
||||
|
||||
|
||||
|
||||
<div style="position:relative;top:-30px;left:0;width:100%;height:100%;">
|
||||
<div id="searchbox"></div>
|
||||
<div class="chatpanel"><span id="chatpanel"></span></div>
|
||||
<div id="noajax_msg"><p>Il supporto per AJAX non è abilitato nel tuo browser. L'aggiornamento live non sarà disponibile, premi Ricarica per aggiornare la pagina.</p></div>
|
||||
<span id="status">Caricamento in corso, attendere...</span>
|
||||
<span id="topcontrols"></span><span id="environments"></span><span id="specedit"></span>
|
||||
<br><span id="repositories"></span>
|
||||
<span id="repositories"></span>
|
||||
<span id="packages"></span>
|
||||
<span id="operations"></span>
|
||||
<br><span id="speccreate"></span>
|
||||
<hr>
|
||||
<div style="position:relative;float:left;width:686px;padding:0;margin:1px;">
|
||||
<div class="processes"><div class="scroll-pane3"><span id="processes"></span></div></div><br>
|
||||
<span id="speccreate"></span>
|
||||
<div class="webbuildleft">
|
||||
<div class="webbuildprocesses"><div class="scroll-pane3"><span id="processes"></span></div></div>
|
||||
<div><span id="editor"></span></div>
|
||||
<span id="editcontrols"></span>
|
||||
<span id="showlogcontrols"></span>
|
||||
<span id="output"></span>
|
||||
</div>
|
||||
<div style="position:relative;float:right;width:200px;padding:0;margin:1px;">
|
||||
<div class="webbuildright">
|
||||
<div class="socialbox"><div class="scroll-pane"><span id="socialbox"></span></div></div>
|
||||
<span id="operationpanel" style="margin:0;"></span>
|
||||
<span id="chatpanel"></span>
|
||||
<span id="operationpanel"></span>
|
||||
</div>
|
||||
<div style="clear:both"></div>
|
||||
<span id="window"></span>
|
||||
@ -304,6 +301,4 @@ ajax_getvalues_refresh("",user,user_email,encodeURIComponent(secret));
|
||||
//setInterval("ajax_getvalues_refresh(\"\",user,user_email,encodeURIComponent(secret))",0);
|
||||
</script>
|
||||
<br><br><br><br><br><br>
|
||||
</td></tr>
|
||||
</table>
|
||||
</body></html>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -259,6 +259,7 @@ class PasswordHash {
|
||||
}
|
||||
|
||||
$wp_hasher = new PasswordHash(8, TRUE);
|
||||
echo $wp_hasher->HashPassword($argv[1]);
|
||||
if ($wp_hasher->CheckPassword($argv[1], $argv[2]) == "1")
|
||||
exit(0);
|
||||
else
|
||||
|
@ -27,15 +27,21 @@ function set_user_state_var() {
|
||||
|
||||
function social_log() {
|
||||
local line=$1
|
||||
local SPRIVACY=0
|
||||
|
||||
[ "$line" ] || return
|
||||
|
||||
if [ ! "$STATE_FAKEUSER" ]; then
|
||||
STATE_SOCIALLOG_ID=0
|
||||
. $WEBBUILD_STATEDIR/users/webbuild.state
|
||||
STATE_SOCIALLOG_ID=$(($STATE_SOCIALLOG_ID + 1))
|
||||
set_user_state_var STATE_SOCIALLOG_ID $STATE_SOCIALLOG_ID webbuild
|
||||
echo "SID=$STATE_SOCIALLOG_ID SPRIVACY=$STATE_PRIVACYMODE $line" >> $WEBBUILD_STATEDIR/social_log
|
||||
|
||||
[ -e $WEBBUILD_STATEDIR/webbuild.db ] || \
|
||||
sqlite3 $WEBBUILD_STATEDIR/webbuild.db \
|
||||
"CREATE TABLE social_log(id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, privacy BOOLEAN, user CHAR(40), type CHAR(40), target CHAR(40), email CHAR(80), text TEXT, time datetime default current_timestamp);"
|
||||
|
||||
eval "$line"
|
||||
[ "$STATE_PRIVACYMODE" ] && $SPRIVACY=1
|
||||
sqlite3 $WEBBUILD_STATEDIR/webbuild.db \
|
||||
"INSERT into social_log (privacy, user, type, target, email, text) \
|
||||
values ($SPRIVACY,'$SUSER','$STYPE','$STARGET','$SEMAIL','$STEXT');"
|
||||
|
||||
# Note: checking that URL does not point here again to avoid recursive requests
|
||||
if [ "$WEBBUILD_URL" -a "${WEBBUILD_URL/\/localhost\//}" = "$WEBBUILD_URL" ]; then
|
||||
@ -168,7 +174,7 @@ function cgi_getvars()
|
||||
p=`echo $q | sed "s|&.*||"`
|
||||
q=`echo $q | sed "s|[^&]*&||"`
|
||||
k="${p%%=*}" # get the key (variable name) from it
|
||||
[ "$k" = "REMOTE_ADDR" -o "$k" = "REMOTE_HOST" -o "$k" = "REMOTE_PORT" -o "$k" = "REMOTE_USER" ] && continue
|
||||
[ ! "$k" -o "$k" = "REMOTE_ADDR" -o "$k" = "REMOTE_HOST" -o "$k" = "REMOTE_PORT" -o "$k" = "REMOTE_USER" ] && continue
|
||||
v="${p#*=}" # get the value from it
|
||||
# decode and evaluate var if requested
|
||||
if [ "$k" != "SPECTEXT" ]; then
|
||||
@ -179,6 +185,20 @@ function cgi_getvars()
|
||||
return
|
||||
}
|
||||
|
||||
function var2html()
|
||||
{
|
||||
eval r=\$$1
|
||||
r="${r//\&/&}"
|
||||
r="${r//\</<}"
|
||||
r="${r//\\\n/<br>}"
|
||||
r="${r//\\/\}"
|
||||
r="${r//\"/"}"
|
||||
r="${r//\$/$}"
|
||||
r="${r//\`/`}"
|
||||
r="${r//\*/*}"
|
||||
echo "${r}"
|
||||
}
|
||||
|
||||
function kill_tree() {
|
||||
local killpid=$1
|
||||
|
||||
@ -239,22 +259,26 @@ function parse_patch_output() {
|
||||
}
|
||||
|
||||
function parse_build_output() {
|
||||
#s|\(.\{10000\}\).*|\1 [CUT - LONG LINE]|;
|
||||
sed "s|\r.*||;
|
||||
s|\(.\{10000\}\).*|\1 [CUT - LONG LINE]|;s|\\\|\\\\\\\|g;s|<|\<|g;s|[[:cntrl:]]\[[0-9;]*m||g;
|
||||
s|\\\|\\\\\\\|g;s|<|\<|g;
|
||||
s|[[:cntrl:]]\[[0-9;]*m||g;
|
||||
s|<font|<font|g;
|
||||
s|</font|</font|g;
|
||||
s|^\([\+#] .*\)|<font style=\"color:cyan\">\1</font>|;
|
||||
s|\(ftp[s]*://[[:alnum:]+\,:&?/_.=~%#-]*\)|<a href=\1 target=new>\1</a>|;
|
||||
s|\(http[s]*://[[:alnum:]+\,:&?/_.=~%#-]*\)|<a href=\1 target=new>\1</a>|;
|
||||
s|\(.*\)\(error[^0-9A-Za-z]*:[[:space:]]*.*\)|<font style=\"background-color:red;color:white\">\1<a %SRCURL%\2%SRCURLEND%>\2</a></font>|i;
|
||||
s|\(.*\)\(error[^0-9A-Za-z]*:[[:space:]]*.*\)|<font style=\"background-color:darkred;color:white\">\1<a %SRCURL%\2%SRCURLEND%>\2</a></font>|i;
|
||||
s|^\(== =.*\)|<font style=\"background-color:green;color:white\">\1</font>|;
|
||||
s|^[[:cntrl:]]*\([!%?=][!%!=>] .*\)|<font style=\"color:gold\">\1</font>|;
|
||||
s|[[:cntrl:]]||g;" | google_search $1
|
||||
}
|
||||
|
||||
function parse_generic_output() {
|
||||
# s|\(.\{10000\}\).*|\1 [CUT - LONG LINE]|;
|
||||
sed "s|\r.*||;
|
||||
s|\(.\{10000\}\).*|\1 [CUT - LONG LINE]|;s|<|\<|g;s|[[:cntrl:]]\[[0-9;]*m||g;
|
||||
s|<|\<|g;
|
||||
s|[[:cntrl:]]\[[0-9;]*m||g;
|
||||
s|<font|<font|g;
|
||||
s|</font|</font|g;
|
||||
s|^\([\+#] .*\)|<font style=\"color:cyan\">\1</font>|;
|
||||
@ -264,13 +288,12 @@ function parse_generic_output() {
|
||||
|
||||
function google_search() {
|
||||
while read line; do
|
||||
local SEARCH_STRING=`echo "$line" | sed "s|.*%SRCURL%\(.*\)%SRCURLEND%.*|\1|"`
|
||||
if [ "$SEARCH_STRING" = "$line" ]; then
|
||||
if [ "${line/\%SRCURL\%}" == "${line}" ]; then
|
||||
echo "$line"
|
||||
else
|
||||
SEARCH_STRING=`echo $SEARCH_STRING | sed "s|\<|<|"`
|
||||
local SEARCH_STRING=`echo "$line" | sed "s|.*%SRCURL%\(.*\)%SRCURLEND%.*|\1|;s|\<|<|"`
|
||||
local SEARCH_STRING_ENCODED=`cgi_encodevar "$1 $SEARCH_STRING"`
|
||||
echo "$line" | sed "s|%SRCURL%.*%SRCURLEND%|href=\"http://www.google.com/search?q=$SEARCH_STRING_ENCODED\" target=_new title=\"Search this error on the Web\"|g"
|
||||
echo "$line" | sed "s|%SRCURL%.*%SRCURLEND%|href=\"https://www.google.com/search?q=$SEARCH_STRING_ENCODED\" target=_new title=\"Search this error on the Web\"|g"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
@ -56,10 +56,10 @@ function showlog() {
|
||||
echo -n "<pre>"
|
||||
if [ "$LOGTYPE" = "processtail" ]; then
|
||||
echo -n "<!-- SCROLL -->"
|
||||
tail -n +0 -f $f --pid $PROCESSPID | stdbuf -oL sed "s|<|\<|g"
|
||||
tail -n +0 -f $f --pid $PROCESSPID | stdbuf -oL sed "s|<\([/]pre>\)|\<\1|g"
|
||||
echo -n "<!-- ENDSCROLL -->"
|
||||
else
|
||||
if [ $LOGFILESIZE -lt 524288 ]; then
|
||||
if [ $LOGFILESIZE -lt 12097152 ]; then
|
||||
if [ -r $f ]; then
|
||||
cat $f | parse_build_output $PACKAGE
|
||||
else
|
||||
@ -67,13 +67,13 @@ function showlog() {
|
||||
fi
|
||||
else
|
||||
if [ -r $f ]; then
|
||||
head -c 262144 $f | parse_build_output $PACKAGE
|
||||
head -c 1048576 $f | parse_build_output $PACKAGE
|
||||
echo "<br><font style=\"background-color:yellow;color:black\"><------ CUT (long file) -------></font>"
|
||||
tail -c 262144 $f | parse_build_output $PACKAGE
|
||||
tail -c 1048576 $f | parse_build_output $PACKAGE
|
||||
else
|
||||
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "head -c 262144 $f" | parse_build_output $PACKAGE
|
||||
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "head -c 1048576 $f" | parse_build_output $PACKAGE
|
||||
echo "<br><font style=\"background-color:yellow;color:black\"><------ CUT (long file) -------></font>"
|
||||
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "tail -c 262144 $f" | parse_build_output $PACKAGE
|
||||
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "tail -c 1048576 $f" | parse_build_output $PACKAGE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@ -84,7 +84,7 @@ function showlog() {
|
||||
|
||||
function showEnvironmentPanel() {
|
||||
|
||||
echo -n "Build host: <b>`hostname`</b><br>"
|
||||
echo -n "Host: <b>`hostname`</b><br>"
|
||||
echo -n "Environment: <b>"
|
||||
if [ "${AUTOPORT_CHROOT_USER[$ENVIRONMENT]}" ]; then
|
||||
echo -n "${AUTOPORT_CHROOT_USER[$ENVIRONMENT]} - "
|
||||
@ -108,33 +108,18 @@ function showEnvironmentPanel() {
|
||||
|
||||
# toolchain
|
||||
echo -n "<br>"
|
||||
local toolchain_output=`LANGUAGE=C $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "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"
|
||||
|
||||
# system upgrade
|
||||
echo -n "<br><input type=button id=smartupgrade value=\"system upgrade\" onclick="
|
||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||
echo -n "REQUEST=smartupgrade\""
|
||||
echo -n ",\"`cgi_encodevar "Upgrade current environment to latest updates now?"`\"); class=redbutton>"
|
||||
|
||||
## run ldconfig
|
||||
#echo -n "<input type=button id=runldconfig value=\"run ldconfig\" onclick="
|
||||
#echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||
#echo -n "REQUEST=runldconfig\");>"
|
||||
|
||||
# rpm manager
|
||||
echo -n "<input type=button id=rpmmanager value=\"RPM manager\" onclick="
|
||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||
echo -n "REQUEST=rpmmanager\");>"
|
||||
|
||||
# environment search
|
||||
echo -n "<br><div style=\"white-space:nowrap;width:100%;\">Provides:<input type=text style=\"width:75%;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 "onkeypress=if(checkEnter(event))ajax_getvalues(\""
|
||||
echo -n "ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||
echo -n "REQUEST=environmentsearch&ENVSEARCHTEXT=\"+encodeURIComponent(getElementById('environmentsearch').value));></div>"
|
||||
if [ ! -e $WEBBUILD_STATEDIR/cache/environment-$ENVIRONMENT-data -o \
|
||||
"`find $WEBBUILD_STATEDIR/cache/environment-$ENVIRONMENT-data -mmin +5`" ]; then
|
||||
local toolchain_output=`LANGUAGE=C $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "gcc --version | head -n1; LANGUAGE=C clang -v | 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|"`
|
||||
local clang_ver=`echo $toolchain_output | sed "s|.*clang version \([0-9.]*\) .*|\1|"`
|
||||
local toolchain_text="gcc $gcc_ver, clang $clang_ver, $binutils_ver"
|
||||
echo "$toolchain_text" > $WEBBUILD_STATEDIR/cache/environment-$ENVIRONMENT-data
|
||||
else
|
||||
local toolchain_text=`cat $WEBBUILD_STATEDIR/cache/environment-$ENVIRONMENT-data`
|
||||
fi
|
||||
echo "Toolchain: $toolchain_text"
|
||||
|
||||
}
|
||||
|
||||
@ -154,6 +139,21 @@ function print_showlogcontrols() {
|
||||
echo -n "REQUEST=showlog&LOGTYPE=send&LOGSTATUSOK=\"+document.all.logstatusOK.checked);> with status: "
|
||||
echo -n "OK <input id=\"logstatusOK\" type=\"radio\" name=\"logstatus\" value=\"OK\"> "
|
||||
echo -n "FAILED <input type=\"radio\" name=\"logstatus\" value=\"FAILED\" checked=\"checked\">"
|
||||
# console cmd
|
||||
echo -n "<hr><b>Command:</b> "
|
||||
echo -n " ["
|
||||
if [ "${AUTOPORT_CHROOT_USER[$ENVIRONMENT]}" ]; then
|
||||
echo -n "${AUTOPORT_CHROOT_USER[$ENVIRONMENT]}@"
|
||||
else
|
||||
echo -n "autodist@"
|
||||
fi
|
||||
echo -n "`hostname -s` ${SPECVAR_BUILDDIR}]\$ <input type=text id=consolecmd value=\"\" size=\"40\"> "
|
||||
echo -n "<input type=button id=consolecmdbutton value=\"submit\" onclick="
|
||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||
echo -n "REQUEST=consolecmd&CONSOLECMD=\"+getElementById('consolecmd').value+\"&"
|
||||
echo -n "RPMFORCE=\"+getElementById('rpmforce').checked+\"&"
|
||||
echo -n "DEBUG=\"+getElementById('debug').checked+\"&"
|
||||
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue()));>"
|
||||
# close tag
|
||||
echo -n "]]></showlogcontrols>"
|
||||
}
|
||||
@ -163,7 +163,7 @@ function print_editorcontrols() {
|
||||
|
||||
echo -n "<editcontrols><![CDATA["
|
||||
# specfile save
|
||||
echo -n "<div style=\"width:100%;overflow:hidden;\"><span style=\"float:left\">"
|
||||
echo -n "<div style=\"width:100%;overflow:hidden;\"><span style=\"width:100%;display:block\">"
|
||||
echo -n "<input type=button id=savebutton value=\"save\" onclick="
|
||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||
echo -n "REQUEST=savespec&SENDREPOSITORY=$SENDREPOSITORY&SPECTEXT=\"+encodeURIComponent(editor.getValue()));"
|
||||
@ -178,22 +178,71 @@ function print_editorcontrols() {
|
||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||
echo -n "REQUEST=deletespec\",\"`cgi_encodevar "Really delete <b>$PACKAGE.spec</b>?"`\")>"
|
||||
# specfile rename
|
||||
echo -n "<input type=button id=updatespecbutton value=\"rename to:\" onclick="
|
||||
echo -n "<input type=button id=updatespecbutton value=\"rename:\" onclick="
|
||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&RENAMESPECFROM=$PACKAGE&"
|
||||
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue())+\"&"
|
||||
echo -n "REQUEST=renamespec&PACKAGE=\"+encodeURIComponent(getElementById('specnewname').value));>"
|
||||
echo -n "<input type=text id=specnewname value=\"\" size=12>.spec"
|
||||
# add a note
|
||||
echo -n "<label>"
|
||||
echo -n "<input type=button id=addpkgnote value=\"add a note:\" onclick="
|
||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||
echo -n "<input type=text id=specnewname value=\"\" size=6>"
|
||||
# unpack
|
||||
echo -n "<input type=button value=\"prepare\" onclick="
|
||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=rpmprepare&"
|
||||
echo -n "RPMBUILDARCH=\"+getSelectedValueById('rpmbuildarch')+\"&"
|
||||
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue()));>"
|
||||
# build
|
||||
echo -n "<input type=button value=\"build\" onclick="
|
||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=rpmbuild&"
|
||||
echo -n "RPMBUILDARCH=\"+getSelectedValueById('rpmbuildarch')+\"&"
|
||||
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue())+\"&RPMFORCE=\"+getElementById('rpmforce').checked); class=boldbutton>"
|
||||
# unpackaged files
|
||||
echo -n "<input type=button value=\"unpackaged list\" onclick="
|
||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=autospeclistcheck&"
|
||||
echo -n "RPMBUILDARCH=\"+getSelectedValueById('rpmbuildarch')+\"&"
|
||||
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue()));>"
|
||||
# build requirements
|
||||
echo -n "<input type=button value=\"build reqs\" onclick="
|
||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=autospecbuildreq\");>"
|
||||
# rpm install
|
||||
[ ! "$USER_CANINSTALL" ] && DISABLED="disabled=disabled"
|
||||
echo -n "<input type=button id=rpminstallbutton value=\"install\" onclick="
|
||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=rpminstall&"
|
||||
echo -n "RPMFORCE=\"+getElementById('rpmforce').checked"
|
||||
echo -n ",\"`cgi_encodevar "Install <b>$PACKAGE</b> in current environment?"`\""
|
||||
echo -n "); class=redbutton $DISABLED>"
|
||||
# rpm send
|
||||
if [ "$SPECVAR_CHECK_NOAUTOBUILDREQ" ]; then
|
||||
HREFADD="disabled=disabled title=\"WARNING: fix specfile build requirements before you can send the package\""
|
||||
else
|
||||
HREFADD=
|
||||
fi
|
||||
echo -n "<input type=button id=sendpackagebutton value=\"send\" onclick="
|
||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=sendpackage&"
|
||||
echo -n "SENDRECREATESRPM=\"+getElementById('sendrecreatesrpm').checked+\"&"
|
||||
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue())+\"&"
|
||||
echo -n "REQUEST=addpkgnote&PKGNOTE=\"+encodeURIComponent(getElementById('pkgnote').value));></label></span>"
|
||||
echo -n "<span style=\"display:block;overflow:hidden;padding-right:5px;\">"
|
||||
echo -n "<input type=text id=pkgnote value=\"\" style=\"width:100%\">"
|
||||
echo -n "</span></div>"
|
||||
echo -n "AUTODISTARCH=\"+getSelectedValueById('rpmbuildarch')+\"&"
|
||||
echo -n "SENDREPOSITORY=\"+getSelectedValueById('sendrepository')"
|
||||
echo -n ",\"`cgi_encodevar "Send <b>$PACKAGE</b> built packages to <b>"`\"+getSelectedValueById('sendrepository')+"
|
||||
echo -n "\"`cgi_encodevar "</b>?<br><br><font color=goldenrod>HINT: does summary look short and good?</font><br><b>${SPECVAR_Name[0]} - ${SPECVAR_Summary[0]}.</b>"`\""
|
||||
echo -n "); class=redbutton $HREFADD>"
|
||||
# recreate and send SRPM
|
||||
if [ "$SPECVAR_CHECK_NOAUTOBUILDREQ" ]; then
|
||||
HREFADD="disabled=disabled title=\"WARNING: fix specfile build requirements before you can send the package\""
|
||||
else
|
||||
HREFADD=
|
||||
fi
|
||||
echo -n "<input type=button id=sendsourcebutton value=\"send SRPM\" onclick="
|
||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=sendsource&"
|
||||
echo -n "RPMFORCE=\"+getElementById('rpmforce').checked+\"&"
|
||||
echo -n "SENDRECREATESRPM=\"+getElementById('sendrecreatesrpm').checked+\"&"
|
||||
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue())+\"&"
|
||||
echo -n "SENDREPOSITORY=\"+getSelectedValueById('sendrepository')"
|
||||
echo -n ",\"`cgi_encodevar "Send <b>$PACKAGE</b> source package only to <b>"`\"+getSelectedValueById('sendrepository')+"
|
||||
echo -n "\"`cgi_encodevar "</b>?<br><br>WARNING: use this to refresh the SRPM of a package which already exists with same release in repository"`\""
|
||||
echo -n "); class=redbutton $HREFADD>"
|
||||
# recreate SRPM before sending checkbox
|
||||
echo -n "<label style=\"color:red;padding:0;\"><input type=checkbox id=\"sendrecreatesrpm\" value=\"force\">recreate SRPM</label>"
|
||||
|
||||
# specfile update
|
||||
echo -n "<div style=\"width:100%;overflow:hidden;\"><span style=\"float:left\">"
|
||||
echo -n "<div style=\"width:100%;overflow:hidden;\"><span style=\"display:flex\">"
|
||||
echo -n "<input type=button id=updatespecbutton value=\"update\" onclick="
|
||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
|
||||
echo -n "REQUEST=updatespec&UPDATESPECVERSION=\"+getElementById('updatespecversion').value+\"&"
|
||||
@ -201,12 +250,10 @@ function print_editorcontrols() {
|
||||
echo -n "DEBUG=\"+getElementById('debug').checked+\"&"
|
||||
echo -n "REBUILDSPECCHANGELOG=\"+encodeURIComponent(getElementById('rebuildspecchangelog').value)+\"&"
|
||||
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue()));>"
|
||||
echo -n " (automatic or specify new version:<input type=text id=updatespecversion value=\"\" size=\"10\">"
|
||||
echo -n " or new release changelog:"
|
||||
echo -n "</span><span style=\"display:block;float:right\">)</span>"
|
||||
echo -n "<span style=\"display:block;overflow:hidden;padding-right:5px;\">"
|
||||
echo -n "<input type=text id=rebuildspecchangelog value=\"$REBUILDSPECCHANGELOG\" style=\"width:100%\">"
|
||||
echo -n "</span></div>"
|
||||
echo -n " <label>to new version:</label><input type=text id=updatespecversion value=\"\" size=\"10\">"
|
||||
echo -n " <label>or to new release with changelog:</label>"
|
||||
echo -n "<input style=\"flex:1\" type=text id=rebuildspecchangelog value=\"$REBUILDSPECCHANGELOG\">"
|
||||
echo -n "</div>"
|
||||
# close tag
|
||||
echo -n "]]></editcontrols>"
|
||||
|
||||
@ -220,14 +267,14 @@ function show_docs() {
|
||||
done
|
||||
echo -n "<br>"
|
||||
for f in $@; do
|
||||
echo -n "<a name=logfile-$f><p style=\"background-color:gray\"><b>File $f:</b></a><pre>"
|
||||
echo -n "<a name=logfile-$f></a><p><b>File $f:</b><pre>"
|
||||
ftype="`$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cd $SPECVAR_RPMBUILDDIR/$SPECVAR_BUILDDIR && file $f"`"
|
||||
if [ "${ftype/text}" = "${ftype}" ]; then
|
||||
echo "<p>Binary file; skipping."
|
||||
continue
|
||||
fi
|
||||
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE \
|
||||
"cd $SPECVAR_RPMBUILDDIR/$SPECVAR_BUILDDIR && head -c 10240 $f | sed \"s|<|\<|g;s|[[:cntrl:]]\[[0-9;]*m||g\"" | parse_generic_output
|
||||
"cd $SPECVAR_RPMBUILDDIR/$SPECVAR_BUILDDIR && head -c 10240 $f | strings | sed \"s|<|\<|g;s|[[:cntrl:]]\[[0-9;]*m||g\"" | parse_generic_output
|
||||
RET=$?
|
||||
echo -n "</pre>"
|
||||
done
|
||||
@ -241,7 +288,6 @@ function download_file() {
|
||||
local f
|
||||
|
||||
for f in $download_files; do
|
||||
echo $f >> /tmp/down
|
||||
echo -e "Content-Type: application/octet-stream"
|
||||
echo -e "Content-Disposition: attachment; filename=\"${f/*\/}\"\n"
|
||||
if [ "$download_environment" ]; then
|
||||
@ -250,7 +296,7 @@ echo $f >> /tmp/down
|
||||
cat $f 2>/dev/null
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
RET=$?
|
||||
return $RET
|
||||
}
|
||||
@ -276,6 +322,12 @@ function resolve_rpmmanagerdir() {
|
||||
RPMSNOARCH) rpmmanagerdir=../RPMS/noarch
|
||||
rpmmanagermask="*.noarch.rpm"
|
||||
rpmmanagermode=environment ;;
|
||||
RPMS_arm) rpmmanagerdir=../RPMS/arm
|
||||
rpmmanagermask="*.arm.rpm"
|
||||
rpmmanagermode=environment ;;
|
||||
RPMS_i586) rpmmanagerdir=../RPMS/i586
|
||||
rpmmanagermask="*.i586.rpm"
|
||||
rpmmanagermode=environment ;;
|
||||
*) rpmmanagerdir=../RPMS/$RPMMANAGERARCH
|
||||
rpmmanagermask="*.$RPMMANAGERARCH.rpm"
|
||||
rpmmanagermode=environment ;;
|
||||
|
Reference in New Issue
Block a user