Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (24e9e3d9e230efb021c291b7ddfc56369af7119a)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Jaka Kranjc <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (24e9e3d9e230efb021c291b7ddfc56369af7119a)
  • Date: Sat, 2 Feb 2008 12:29:23 -0600

GIT changes to master sorcery by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:

ChangeLog | 4 ++++
usr/sbin/gaze | 2 +-
var/lib/sorcery/modules/libgpg | 2 +-
var/lib/sorcery/modules/libgrimoire | 2 +-
var/lib/sorcery/modules/libstate | 4 ++--
var/lib/sorcery/modules/libunpack | 11 +++++++++--
6 files changed, 18 insertions(+), 7 deletions(-)

New commits:
commit 24e9e3d9e230efb021c291b7ddfc56369af7119a
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

gaze, libstate, libgrimoire: discard awk warnings

commit c077ab066836492ff1294441e8c7a54ff3c653ad
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

libgpg, libunpack: added multisign support #13815

diff --git a/ChangeLog b/ChangeLog
index d6cf0b9..ce4f74c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-02-02 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libgpg, libunpack: added multisign support #13815
+ * gaze, libstate, libgrimoire: discard awk warnings
+
2008-02-01 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libcodex: bail out of codex_check_cache if the grimoire dir is not
listable (executable) #13508
diff --git a/usr/sbin/gaze b/usr/sbin/gaze
index 63e342f..8d59ccd 100755
--- a/usr/sbin/gaze
+++ b/usr/sbin/gaze
@@ -662,7 +662,7 @@ function real_name_search() {
print "'"$pattern"' -> ", $1
}
}
- ' "$grimoire/$SPELL_INDEX_FILE"
+ ' "$grimoire/$SPELL_INDEX_FILE" 2>/dev/null
done
done
}
diff --git a/var/lib/sorcery/modules/libgpg b/var/lib/sorcery/modules/libgpg
index 1e9138e..8a73ba0 100755
--- a/var/lib/sorcery/modules/libgpg
+++ b/var/lib/sorcery/modules/libgpg
@@ -65,7 +65,7 @@ function gpg_verify_signature() { # $1 sig $2 file $3
pubring $4 algo var
cat $output
return $rc
fi
- algo=$(grep 'digest algorithm' $output | awk '{ print $NF }' | tr A-Z
a-z)
+ algo=$(awk '/digest algorithm/ { print tolower($NF) }' $output | sort -u)
rm $output &>/dev/null
fi
[ ! -z "$4" ] && eval "$4=\"$algo\""
diff --git a/var/lib/sorcery/modules/libgrimoire
b/var/lib/sorcery/modules/libgrimoire
index a637238..968527a 100755
--- a/var/lib/sorcery/modules/libgrimoire
+++ b/var/lib/sorcery/modules/libgrimoire
@@ -204,7 +204,7 @@ function real_installed_version() {
##
#---------------------------------------------------------------------
function private_installed_version() {
- awk -F: -v spell="$1" '{ if(spell == $1) {print $4; exit}}' $SPELL_STATUS
+ awk -F: -v spell="$1" '{ if(spell == $1) {print $4; exit}}' $SPELL_STATUS
2>/dev/null
}

#---------------------------------------------------------------------
diff --git a/var/lib/sorcery/modules/libstate
b/var/lib/sorcery/modules/libstate
index d102adf..cbcc5c8 100755
--- a/var/lib/sorcery/modules/libstate
+++ b/var/lib/sorcery/modules/libstate
@@ -625,10 +625,10 @@ function query_spell_status()
if [[ -z $3 ]]; then
[[ -z $2 ]] && return 0
return_var="$2"
- __status=$(awk -F: -v spell="$1" '{ if (spell == $1) status=$3 }
END{print status}' "$SPELL_STATUS")
+ __status=$(awk -F: -v spell="$1" '{ if (spell == $1) status=$3 }
END{print status}' "$SPELL_STATUS" 2>/dev/null)
else
return_var="$3"
- __status=$(awk -F: -v spell="$1" -v version="$2" '{ if (spell == $1 &&
version == $4) status=$3 } END{print status}' "$SPELL_STATUS")
+ __status=$(awk -F: -v spell="$1" -v version="$2" '{ if (spell == $1 &&
version == $4) status=$3 } END{print status}' "$SPELL_STATUS" 2>/dev/null)
fi
unlock_file "$SPELL_STATUS"

diff --git a/var/lib/sorcery/modules/libunpack
b/var/lib/sorcery/modules/libunpack
index 073137e..48b872c 100755
--- a/var/lib/sorcery/modules/libunpack
+++ b/var/lib/sorcery/modules/libunpack
@@ -399,7 +399,13 @@ function unpack_gpg() {
rc="$?"
case "$rc" in
0)
- if is_allowed_hash $GPGALGO_USED $GPGLEVEL ; then rc=0 ; else rc=1 ; fi
+ local algo
+ for algo in $GPGALGO_USED; do
+ if is_allowed_hash "$algo" "$GPGLEVEL"; then
+ rc=0
+ break
+ fi
+ done
;;
3) message_file="Signature" ;;
4) message_file="Source" ;;
@@ -468,7 +474,8 @@ function unpack_hash() {
"$HASH != $HASHSUM !${DEFAULT_COLOR}" &&
hash_user_query 1 "$SPELL" spell || return 1
else
- if is_allowed_hash ${ALGORITHM} ${HLEVEL} ; then rc=0 ; else rc=1 ; fi
+ is_allowed_hash "$ALGORITHM" "$HLEVEL"
+ rc=$?
hash_user_query $rc "$SPELL" spell || return 1
fi
else




Archive powered by MHonArc 2.6.24.

Top of Page