Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to devel-sobukus-protection sorcery by Thomas Orgis (c1b6f599c2b42f58fe8b097c48749577e9cb8f46)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Thomas Orgis <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to devel-sobukus-protection sorcery by Thomas Orgis (c1b6f599c2b42f58fe8b097c48749577e9cb8f46)
  • Date: Wed, 8 Apr 2020 14:59:50 +0000

GIT changes to devel-sobukus-protection sorcery by Thomas Orgis
<sobukus AT sourcemage.org>:

var/lib/sorcery/modules/libcast | 26 ++++++++++++--------------
var/lib/sorcery/modules/libmisc | 26 +++++++++++++-------------
var/lib/sorcery/modules/libstage | 10 +++-------
var/lib/sorcery/modules/libtrack | 6 ++++--
var/lib/sorcery/protected | 1 +
5 files changed, 33 insertions(+), 36 deletions(-)

New commits:
commit c1b6f599c2b42f58fe8b097c48749577e9cb8f46
Author: Thomas Orgis <sobukus AT sourcemage.org>
Commit: Thomas Orgis <sobukus AT sourcemage.org>

Revert "libmisc: Implement one-shot specfile selection"

This reverts commit 615b00c28da7e62b0b31098b0229b0f9a04de0d2.

This broke things by not setting specdir appropriately, causing
later attempts to fix that. Those attempts break for differing
arch selections as they are not all in the same path depth.

We shall never guess specdir after the fact. Use the values
we know!

commit a5d1bb0683e568061a9af50ff23fe8db425b0568
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Thomas Orgis <sobukus AT sourcemage.org>

libtrack: Add fallback for non-functional cache archive compressor

commit 43bf052c473402d970922a67d074990fbce4ffa5
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Thomas Orgis <sobukus AT sourcemage.org>

libcast: Add fallback for non-functional log compressor

commit 2b83558ac19f96b7d6409092ca82b22578b38c96
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Thomas Orgis <sobukus AT sourcemage.org>

protected: Add libiconv; needed on non-glibc systems

commit bfc75b1d902f9d81782ca4151492e054a2539d9f
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Thomas Orgis <sobukus AT sourcemage.org>

libstage: Remove target files before copying

Fixes a failure mode where it replaces a symlink target instead of the
symlink itself.

Fixes: https://bugs.sourcemage.org/show_bug.cgi?id=16104

commit 3e5350b0cd4572dcdc468abd4d5efb0ea7205da1
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Thomas Orgis <sobukus AT sourcemage.org>

libmisc: real_get_safe_locale: Assume C.UTF-8 works on non-glibc systems

commit d46f45a60ef18877e90e04ceae2ed45f5fd0f4f0
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Thomas Orgis <sobukus AT sourcemage.org>

libstage: transfer_staged_spell: Simplify making of hlist path

commit a1960c5ddb628068e94a6ecee4270ce68524bca6
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Thomas Orgis <sobukus AT sourcemage.org>

libstage: Fix typo in synopsis

diff --git a/var/lib/sorcery/modules/libcast b/var/lib/sorcery/modules/libcast
index 75f3cc2..4590f84 100755
--- a/var/lib/sorcery/modules/libcast
+++ b/var/lib/sorcery/modules/libcast
@@ -679,25 +679,23 @@ acquire_cast_lock() {
## our compile log directory.
#---------------------------------------------------------------------
create_compile_log() {
- local tmp_log=$C_LOG.2
-
message "${MESSAGE_COLOR}Creating compile log" \
"${FILE_COLOR}$COMPILE_LOGS/$SPELL-$VERSION$EXTENSION" \
"${DEFAULT_COLOR}"
- if [[ "$STORE_CONF_LOG" == on ]] && test -e $SOURCE_DIRECTORY/config.log;
then
- echo "---config.log---" >> $C_LOG
- cat $SOURCE_DIRECTORY/config.log >> $C_LOG
- fi
-
- # remove any nplicated lines (happens due to all the redirection we do)
- uniq $C_LOG > $tmp_log
- mv $tmp_log $C_LOG
-
+ {
+ # remove any nplicated lines (happens due to all the redirection we do)
+ uniq "$C_LOG"
+ # append config.log
+ if [ on = "$STORE_CONF_LOG" ] && [ -e "$SOURCE_DIRECTORY"/config.log ];
then
+ echo '---config.log---'
+ cat "$SOURCE_DIRECTORY"/config.log
+ fi
+ } |
# install the compile log
- if [ -z "$EXTENSION" ]; then
- cp $C_LOG $COMPILE_LOGS/$SPELL-$VERSION
+ if [ -z "$EXTENSION" ] || ! "$COMPRESSBIN" </dev/null &>/dev/null; then
+ cat > "$COMPILE_LOGS/$SPELL-$VERSION"
else
- $COMPRESSBIN -c $C_LOG > "$COMPILE_LOGS/$SPELL-$VERSION$EXTENSION"
+ "$COMPRESSBIN" -c > "$COMPILE_LOGS/$SPELL-$VERSION$EXTENSION"
fi

# install the castfs log
diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index 1bde1d5..dd5952c 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -1179,7 +1179,7 @@ real_config_query_list() {
## The fallback C is always there.
#---------------------------------------------------------------------
real_get_safe_locale() {
- local sys_locales=$(locale -a)
+ local sys_locales=$(locale -a 2>/dev/null || echo C.UTF-8)
local check_locales=${1:-C.UTF-8 C.utf8 en_US.UTF-8 en_US.utf8}
for l in $check_locales
do
@@ -1478,22 +1478,22 @@ set_architecture() {
: ${arch:=${TARGET:-$ARCHITECTURE}}

# Find the specfile to use
- SPECFILE=$(find -L "${ARCH_SPECS[@]}" \( -name "$arch" -o -name null \) \
- -perm -400 -type f 2>/dev/null |
- awk '! /[/]null$/ { exit } END { print }')
- case "$SPECFILE" in
- */null)
- message "${PROBLEM_COLOR}Cannot find arch spec for $arch!"
- message "Reverting to null!"
- message "Please run sorcery afterwards and pick another
architecture!$DEFAULT_COLOR"
- echo
- sleep 2
- esac
+ for specdir in ${ARCH_SPECS[@]} ; do
+ SPECFILE=$(find -L ${specdir} -perm -400 -type f -name "$arch"
2>/dev/null | sed q)
+ [ $SPECFILE ] && break
+ done
+ if [[ ! $SPECFILE ]] ; then
+ message "${PROBLEM_COLOR}Cannot find arch spec for $arch!"
+ message "Reverting to null!"
+ message "Please run sorcery afterwards and pick another
architecture!$DEFAULT_COLOR"
+ echo
+ sleep 2
+ SPECFILE=$(find -L ${specdir} -perm -400 -type f -name "null"
2>/dev/null | sed q)
+ fi
debug "libmisc" "set_architecture: SPECFILE=$SPECFILE"

# turn the path into an array, but remove $specdir from the start first
unset SMGL_COMPAT_ARCHS
- specdir="${SPECFILE%/*/*/*}"
explode "${SPECFILE#$specdir/}" '/' SMGL_COMPAT_ARCHS

# Reverse the array so that the most specific arch is first
diff --git a/var/lib/sorcery/modules/libstage
b/var/lib/sorcery/modules/libstage
index 5985672..4212a82 100755
--- a/var/lib/sorcery/modules/libstage
+++ b/var/lib/sorcery/modules/libstage
@@ -1,6 +1,6 @@
#!/bin/bash
#---------------------------------------------------------------------
-## @Synopsis Functions for desling with the stage root and installing files
from the stage root
+## @Synopsis Functions for dealing with the stage root and installing files
from the stage root
## @Copyright Copyright (C) 2004 The Source Mage Team
<http://www.sourcemage.org>
## Functions for desling with the stage root and installing files from the
stage root
#---------------------------------------------------------------------
@@ -15,12 +15,7 @@ transfer_staged_spell()
stage_install_ordinary

# restore any hardlinks, since they were copied over normally
- local hlist
- if [[ -n $CAST_TMPDIR ]]; then
- hlist="$CAST_TMPDIR/hardlinks"
- else
- hlist="$TMP_DIR/hardlinks"
- fi
+ local hlist="${CAST_TMPDIR:-$TMP_DIR}/hardlinks"
if [[ -s $hlist ]]; then
local inode last_inode filename last_filename
sort "$hlist" |
@@ -153,6 +148,7 @@ stage_install_file()
fi
;;
*)
+ rm -f "${INSTALL_ROOT}/$FILE"
cp -fdp "$STAGE_DIRECTORY/TRANSL/$FILE" "${INSTALL_ROOT}/$FILE"
# we can't fix symlinks now, since the other file is often not on the
system yet
# doing it later in TRANSFER also avoids the search for matching inodes
diff --git a/var/lib/sorcery/modules/libtrack
b/var/lib/sorcery/modules/libtrack
index 3043116..60f1916 100755
--- a/var/lib/sorcery/modules/libtrack
+++ b/var/lib/sorcery/modules/libtrack
@@ -430,8 +430,10 @@ create_cache_archive() {

case "$COMPRESSBIN" in
gzip|bzip2|pbzip2|xz)
- $COMPRESSBIN -c $CACHE > $CACHE_COMP
- rm $CACHE
+ if "$COMPRESSBIN" -c </dev/null &>/dev/null; then
+ "$COMPRESSBIN" -c "$CACHE" > "$CACHE_COMP" &&
+ rm "$CACHE"
+ fi
;;
esac
}
diff --git a/var/lib/sorcery/protected b/var/lib/sorcery/protected
index d6c3d60..709e835 100755
--- a/var/lib/sorcery/protected
+++ b/var/lib/sorcery/protected
@@ -64,6 +64,7 @@
^/usr/bin/wget$
^/usr/lib/installwatch\.so$
^/usr/lib/libc\.so$
+^/usr/lib/libiconv\.so\.
^/usr/share/httpd
^/usr/share/httpsd
^/usr/share/info/dir$



  • [SM-Commit] GIT changes to devel-sobukus-protection sorcery by Thomas Orgis (c1b6f599c2b42f58fe8b097c48749577e9cb8f46), Thomas Orgis, 04/08/2020

Archive powered by MHonArc 2.6.24.

Top of Page