Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to devel-stage-root sorcery by David Brown (d35a27f88e78305fe82d703fc2baf38bfb232bcd)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: David Brown <scm AT mail.sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to devel-stage-root sorcery by David Brown (d35a27f88e78305fe82d703fc2baf38bfb232bcd)
  • Date: Sat, 25 Nov 2006 18:21:37 -0600

GIT changes to devel-stage-root sorcery by David Brown <dmlb2000 AT gmail.com>:

ChangeLog | 28 ++++++++++++++
etc/sorcery/compile_config | 1
usr/sbin/cabal | 73
+++++++++++++++++++++++++------------
usr/sbin/cleanse | 11 ++++-
usr/sbin/scribe | 21 ++++++----
var/lib/sorcery/build/run_compiler | 1
var/lib/sorcery/modules/libdepends | 5 ++
var/lib/sorcery/modules/libinitd | 2 -
var/lib/sorcery/modules/libmisc | 9 +++-
var/lib/sorcery/modules/libsummon | 6 +--
10 files changed, 116 insertions(+), 41 deletions(-)

New commits:
commit 324c74374b191aaa55a964235e23b363c5d341a7
Author: David Brown <dmlb2000 AT gmail.com>
Commit: David Brown <dmlb2000 AT gmail.com>

made distcc use source directory instead of modifying users distcc dir in
home dir

commit 3fd314ae8551875f02a13552ff1e434050856066
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

fix bug 12387

commit 14d235bdee304e0c66c12ba8ea3536b219b60c9e
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

fix bug 11865, ignore stored sub_depends if the requester has been
processed already.

commit ecfef0519ca9520d73b32cce50e08edda4e6e5ad
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

fix typo

commit ca60efe21b9b0f5d87c22f145c5380b312517bed
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

fix bug 13250

commit 43ede0f2c487217f17a482e5e2181454e2b5cd2a
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

fix bug 13246

commit ee6ba6d4e2c4d2e936cccac440c75483a36cadb8
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

fix bug 12958, improper use of install_root

commit ad8272b4d8dc368eff35b825ab9c184587c15f41
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

fix bug 13254

commit 27b2658b7afb3ee65cc8daeb417013cb32d161e4
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

fix bug 11708

commit 0e543c1622d437d7072e7cc2e0a749792ccc8d27
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

Re-arrange changelog entry

commit 4c9826286dfe566e108d242abe6bf1aa64213f5c
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

fix bug 13228, add locking in persistent_save and persistent_load

diff --git a/ChangeLog b/ChangeLog
index 32cefc2..2e7858e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2006-11-25 Andrew Stitt <astitt AT sourcemage.org>
+ * scribe: check for tar failure from unpacking, fixes bug 12387
+
+2006-11-25 Andrew Stitt <astitt AT sourcemage.org>
+ * libdepends: fix bug 11865, ignore stored sub-depends if the
+ requesting spell has already been processed.
+
+2006-11-25 Andrew Stitt <astitt AT sourcemage.org>
+ * cleanse: add runtime/suggest support to prune, bug 13250
+
+2006-11-25 Andrew Stitt <astitt AT sourcemage.org>
+ * cleanse: add runtime/suggest support to delint, bug 13246
+
+2006-11-25 Andrew Stitt <astitt AT sourcemage.org>
+ * libinitd: fix bug 12958, improper use of INSTALL_ROOT.
+
+2006-11-25 Andrew Stitt <astitt AT sourcemage.org>
+ * libsummon: fix bug with file verification by using file -bi
+ to get cleaner mime-like file-type descriptions. Bug 13254,
+ patch from Jaka Kranjc.
+
+2006-11-25 Andrew Stitt <astitt AT sourcemage.org>
+ * cabal: apply patch from Dave Josephsen, bug 11708
+
+2006-11-25 Andrew Stitt <astitt AT sourcemage.org>
+ * libmisc: lock the persistent file on load and save it with
+ a transaction to prevent corruption from ctrl-c. Bug 13228
+
2006-11-17 Andrew Stitt <astitt AT sourcemage.org>
* libtrack, libapi: add a routine to record modified config files,
this is an alternative to running install_config_files
diff --git a/etc/sorcery/compile_config b/etc/sorcery/compile_config
index d9b5785..9643e71 100644
--- a/etc/sorcery/compile_config
+++ b/etc/sorcery/compile_config
@@ -3,6 +3,7 @@
CCACHE=${CCACHE:-off}
CCACHE_DIR=${CCACHE_DIR:-/var/cache/compiler}
DISTCC_HOSTS=${DISTCC_HOSTS:-""}
+ DISTCC_DIR=${DISTCC_DIR:-"$SOURCE_DIRECTORY/.distcc"}
JOBS_PER_HOST=${JOBS_PER_HOST:-0}
MAKE_NJOBS=${MAKE_NJOBS:-1}
RUN_COMPILER_DIR=/var/lib/sorcery/build
diff --git a/usr/sbin/cabal b/usr/sbin/cabal
index 02d15de..9718b8f 100755
--- a/usr/sbin/cabal
+++ b/usr/sbin/cabal
@@ -17,21 +17,21 @@ function read_cabal_names() {

mkdir -p $CABAL_DIRECTORY

- [ -f $CABAL_NAMES ] || return
+ [ -f $CABAL_NAMES ] || return
+

- eval `awk '{ print "CABAL[" NR-1 "]=\"" $0 "\""; }' "$CABAL_NAMES"`
+ eval `awk '{ print "CABALS[" NR-1 "]=\"" $0 "\""; }' "$CABAL_NAMES"`

}

#--------------------
## Overwrite the cabal name file with new member names
-## @Note The loop can probably be done more intelegently, so a MAX_CABALS is
not necessary.
## @Globals CABAL_NAMES MAX_CABALS
#--------------------
function write_cabal_names() {

rm -f $CABAL_NAMES
- for (( COUNT=0; COUNT != MAX_CABALS; COUNT++ )); do
+ for (( COUNT=0; COUNT != ${#CABALS[@]}; COUNT++ )); do
echo "${CABALS[$COUNT]}" >> $CABAL_NAMES
done

@@ -45,9 +45,11 @@ function write_cabal_names() {
#---------------------
function print_cabal_names() {

- for (( COUNT = 0; COUNT != MAX_CABALS; COUNT++ )); do
- echo "${CABALS[$COUNT]}"
- done
+eval ${DIALOG} '--textbox ${CABAL_NAMES} 0 0'
+
+#for (( COUNT = 0; COUNT != MAX_CABALS; COUNT++ )); do
+# echo "${CABALS[$COUNT]}"
+#done

}

@@ -257,7 +259,7 @@ function cabal_name_menu() {
do

case $COMMAND in
- S) print_cabal_names | $PAGER ;;
+ S) print_cabal_names ;;
E) name_cabals ;;
esac

@@ -379,16 +381,16 @@ function cabal_admin_menu() {

function cabal_copy() {

- SOURCE_MESSAGE="Please enter source files and directories."
- DEST_MESSAGE="Please enter destination directory."
+ SOURCE_MESSAGE='"Please enter source files and directories."'
+ DEST_MESSAGE='"Please enter destination directory."'

mkdir -p $CABAL_OUTPUT || {
messasge "Failed to make CABAL_OUTPUT directory $CABAL_OUTPUT"
exit 1
}

- SOURCE=`eval $DIALOG --inputbox "$SOURCE_MESSAGE" 0 0` &&
- DESTINATION=`eval $DIALOG --inputbox "$DEST_MESSAGE" 0 0` &&
+ SOURCE=`eval $DIALOG --inputbox $SOURCE_MESSAGE 0 0` &&
+ DESTINATION=`eval $DIALOG --inputbox $DEST_MESSAGE 0 0` &&
CABAL=`select_cabal` &&
ORDER=`select_order` &&

@@ -430,16 +432,16 @@ function cabal_execute() {
case $ORDER in
C) cat $CABAL_DIRECTORY/$CABAL |
while read BOX; do
- ssh -i $CABAL_KEYS/$CABAL \
+ echo "execing box $BOX" && ssh -n -i $CABAL_KEYS/$CABAL \
root@${BOX} \
"$COMMAND" \
> $CABAL_OUTPUT/$BOX &
done
;;

- S) cat $CABAL_DIRECTORY/$CABAL |
+ S) cat $CABAL_DIRECTORY/$CABAL |
while read BOX; do
- ssh -i $CABAL_KEYS/$CABAL \
+ echo "execing box $BOX" && ssh -n -i $CABAL_KEYS/$CABAL \
root@${BOX} \
"$COMMAND"
done
@@ -447,7 +449,7 @@ function cabal_execute() {
;;
esac

- sleep 10
+ #sleep 10 <--not sure why that's there.. --dave

}

@@ -456,9 +458,10 @@ function cabal_output() {

if [ -d $CABAL_OUTPUT ]; then
for FILE in `ls $CABAL_OUTPUT`; do
- echo "$FILE Beginning Output"
+ echo "*------- $FILE Beginning Output -------*"
cat $CABAL_OUTPUT/$FILE
- echo "$FILE Ending Output"
+ echo "*------- $FILE Ending Output -------*"
+ echo
done
fi
}
@@ -491,7 +494,7 @@ copies"
case $COMMAND in
C) cabal_copy ;;
E) cabal_execute ;;
- S) cabal_output | $PAGER ;;
+ S) cabal_output | ${PAGER} ;;
esac

done
@@ -531,11 +534,37 @@ function cabal_menu() {

}

+function show_file() {
+
+ if [ -f $1 ]; then
+
+ if [ "`file -b $1 | cut -d ' ' -f1`" == "bzip2" ]; then
+ bzcat $1 | $PAGER
+ elif [ "`file -b $1 | cut -d ' ' -f1`" == "gzip" ]; then
+ gzip -cd $1 | $PAGER
+ else
+ eval $DIALOG '--textbox $1 0 0'
+ fi
+
+ else
+ eval $DIALOG '--msgbox "File not found." 0 0'
+ return 1
+ fi
+
+}
+
. /etc/sorcery/config
-DIALOG='$DIALOGPROG --backtitle "Sorcery Spell Management Utility" --stdout'
+
+if [ -n "${PAGER}" ]
+then
+ PAGER=`which less`
+fi
+
+DIALOG="${DIALOGPROG} --stdout"
+
cabal_menu

-#---------------------------------------------------------------------
+##---------------------------------------------------------------------
##=back
##
##=head1 LICENSE
@@ -554,4 +583,4 @@ cabal_menu
## along with this software; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
-#---------------------------------------------------------------------
+##---------------------------------------------------------------------
diff --git a/usr/sbin/cleanse b/usr/sbin/cleanse
index 6ba1b5a..8705d95 100755
--- a/usr/sbin/cleanse
+++ b/usr/sbin/cleanse
@@ -189,7 +189,7 @@ function delint()

message "Pass one (malformed depends lines)"
# This grep will pull out malformed lines from the depends file
- regex='^[^:]*:[^:]*:(on|off):(optional|required):'
+ regex='^[^:]*:[^:]*:(on|off):(optional|required|suggest|runtime):'
lines=$(grep -v -E "$regex" $DEPENDS_STATUS)
if [[ $lines ]] ; then
message "The following malformed lines were found"
@@ -359,22 +359,27 @@ function prune_depends()

# If the spell is optional, then the dependency can be removed and the
spell recast
# If it's required, then it can't be removed
- if [[ $3 == required ]] ; then
+ if [[ $3 == required ]] || [[ $3 == runtime ]]; then
options=( "Ignore" "Dispel $1" "Cast $2" "${options[@]}" )
elif [[ $3 == optional ]] ; then
options=( "Ignore" "Dispel $1" "Cast $2" "Recast $1 without $2"
"${options[@]}" )
+ elif [[ $3 == suggest ]] ; then
+ options=( "Ignore" "Dispel $1" "Cast $2" "Disable $2 in $1"
"${options[@]}" )
fi

#Get the user's choice of action
select_list choice "" "${options[@]}"
case ${choice} in
I*) message "Ignoring." ;;
- D*) echo $1 >> $TMP_DIR/prune.dispel ;;
+ Dispel*) echo $1 >> $TMP_DIR/prune.dispel ;;
C*) echo $2 >> $TMP_DIR/prune.cast ;;
R*) echo $1 >> $TMP_DIR/prune.cast
# Revise choice in the depends file
sed 's/^\('$1':'$2':\)on\(:optional:.*\)$/\1off\2/' $DEPENDS_STATUS
> $TMP_DIR/prune.1
mv $TMP_DIR/prune.1 $DEPENDS_STATUS
+ Disable*)
+ sed 's/^\('$1':'$2':\)on\(:suggest:.*\)$/\1off\2/' $DEPENDS_STATUS >
$TMP_DIR/prune.1
+ mv $TMP_DIR/prune.1 $DEPENDS_STATUS
;;
S*) sed 's/^\('$1':\)'$2'\(('$4'):.*\)$/\1'$provider'\2/'
$DEPENDS_STATUS > $TMP_DIR/prune.1
mv $TMP_DIR/prune.1 $DEPENDS_STATUS
diff --git a/usr/sbin/scribe b/usr/sbin/scribe
index 942a3f5..047d63a 100755
--- a/usr/sbin/scribe
+++ b/usr/sbin/scribe
@@ -74,16 +74,19 @@ function unpackage_grimoire_tarball() {
local tarball=$1
local grimoire=$2
local grim_name=$3
- #untar the new grimoire update and remove zip
- bzcat $tarball| tar -x 1>/dev/null 2>&1
- #check for a successful unzip
- if ! [ -d $grimoire ]; then
- #uh oh! bad unzip.
- message "ERROR: Grimoire tarball for $grim_name not" \
- "formatted correctly!."
+ #untar the new grimoire tarball
+ if tar -xjf $tarball 1>/dev/null 2>&1; then
+ # ensure the grimoire unpacked where it was expected to
+ if ! [ -d $grimoire ]; then
+ message "ERROR: Grimoire tarball for $grim_name not" \
+ "formatted correctly!."
+ return 1
+ fi
+ return 0
+ else
+ message "ERROR: Grimoire tarball for $grim_name did not unpack properly!"
return 1
- fi
- return 0
+ fi
}

#---------------------------------------------------------------------
diff --git a/var/lib/sorcery/build/run_compiler
b/var/lib/sorcery/build/run_compiler
index 425aeaa..9733720 100644
--- a/var/lib/sorcery/build/run_compiler
+++ b/var/lib/sorcery/build/run_compiler
@@ -26,6 +26,7 @@ if [[ $USE_DISTCC != off ]] &&
DISTCC=/usr/bin/distcc

export DISTCC_HOSTS
+ export DISTCC_DIR
export DISTCC_VERBOSE=0
export DISTCC_LOG=/dev/null
else
diff --git a/var/lib/sorcery/modules/libdepends
b/var/lib/sorcery/modules/libdepends
index 470a8e0..a1cb2e9 100755
--- a/var/lib/sorcery/modules/libdepends
+++ b/var/lib/sorcery/modules/libdepends
@@ -184,6 +184,10 @@ function run_our_sub_depends() {
sub_dependee=${tmp#*:};
sub_depends=${triple##*:}

+ # if the requester has been processed skip any sub-depends its
+ # previous instance requested, bug 11865
+ [[ $(hash_get "depends_looked_at" "$requester") == done ]] && continue
+
process_sub_depends "$requester" "$sub_dependee" "$sub_depends" ||
return 1
done

@@ -1519,7 +1523,6 @@ function depends_message() {
message ""
}

-
#########################BEGIN OTHER STUFF############################

#---------------------------------------------------------------------
diff --git a/var/lib/sorcery/modules/libinitd
b/var/lib/sorcery/modules/libinitd
index 6671991..e3fdbce 100755
--- a/var/lib/sorcery/modules/libinitd
+++ b/var/lib/sorcery/modules/libinitd
@@ -216,7 +216,7 @@ function init_install()
. ${INSTALL_ROOT}/etc/sysconfig/init

# /etc/sysconfig/init might not exist yet so we define this in case
- RUNLEVELS_DIR="${RUNLEVELS_DIR:-$INSTALL_ROOT/etc/init.d/runlevels}"
+ RUNLEVELS_DIR=${INSTALL_ROOT}${RUNLEVELS_DIR:-/etc/init.d/runlevels}

local runlevel_dir="$RUNLEVELS_DIR/%$script_runlevel"

diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index 37c7064..a43f9c0 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -702,11 +702,13 @@ function real_persistent_remove () {
function real_persistent_load () {
local PERSISTENT_LOADING=yes
local PERSISTENT_FILE=${1:-$SPELL_CONFIG.p}
+ lock_file "$PERSISTENT_FILE"
if [ -f "$PERSISTENT_FILE" ]; then
. "$PERSISTENT_FILE"
local line
persistent_add `while read line; do echo ${line%%=*}; done <
"$PERSISTENT_FILE"`
fi
+ unlock_file "$PERSISTENT_FILE"
}


@@ -719,12 +721,15 @@ function real_persistent_load () {
function real_persistent_save () {
local VAR
local TMP
- > "$SPELL_CONFIG.p"
+ local file=$SPELL_CONFIG.p
+ local tfile=$(lock_start_transaction $file)
+ > "$tfile"
for VAR in $PERSISTENT_VARIABLES; do
config_get_option $VAR TMP
- echo "$VAR=\"$TMP\"" >> "$SPELL_CONFIG.p"
+ echo "$VAR=\"$TMP\"" >> "$tfile"
unset "$VAR"
done
+ lock_commit_transaction "$file"
unset PERSISTENT_VARIABLES
}

diff --git a/var/lib/sorcery/modules/libsummon
b/var/lib/sorcery/modules/libsummon
index b8d9eb7..0ba7356 100755
--- a/var/lib/sorcery/modules/libsummon
+++ b/var/lib/sorcery/modules/libsummon
@@ -427,9 +427,9 @@ function source_sanity() {
if [[ "$1" != "${1%.tar.bz2}" ]] ||
[[ "$1" != "${1%.tar.gz}" ]] ||
[[ "$1" != "${1%.tgz}" ]]; then
- local _type=$(file "$1")
- if echo $_type | grep -iq HTML ||
- echo $_type | grep -iq ascii ; then
+ local _type=$(file -bi "$1")
+ if echo $_type | grep -iq text/html ||
+ echo $_type | grep -iq text/plain ; then
upvar "$2" "$_type"
return 1
fi



  • [SM-Commit] GIT changes to devel-stage-root sorcery by David Brown (d35a27f88e78305fe82d703fc2baf38bfb232bcd), David Brown, 11/25/2006

Archive powered by MHonArc 2.6.24.

Top of Page