Skip to Content.
Sympa Menu

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

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 (01d9f2b0d3320fd590379f88aef4d120d5271dce)
  • Date: Fri, 26 Feb 2021 09:33:49 +0000

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

ChangeLog | 8 ++++++++
var/lib/sorcery/modules/libdepengine | 10 ++++++++++
var/lib/sorcery/modules/libgrimoire | 12 ++++++++++--
var/lib/sorcery/protected | 1 +
4 files changed, 29 insertions(+), 2 deletions(-)

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

protected: also /bin/login, got bitten by failed shadow install

commit 2ccd271d1b324430b8495ad9adb33651f3a62868
Author: Thomas Orgis <sobukus AT sourcemage.org>
Commit: Thomas Orgis <sobukus AT sourcemage.org>

libdepengine: more avoidance of casts after failures

commit 8c49f166ac9a8daa5910922881217e06337366b2
Author: Thomas Orgis <sobukus AT sourcemage.org>
Commit: Thomas Orgis <sobukus AT sourcemage.org>

libgrimoire: half of RAM as default size of TMPFS source directories

diff --git a/ChangeLog b/ChangeLog
index 5f4207c..40bf8b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2020-10-01 Thomas Orgis <sobukus AT sourcemage.org>
+ * protected: add /bin/login (!!)
+
+2020-09-30 Thomas Orgis <sobukus AT sourcemage.org>
+ * libgrimoire: default to default size of tmpfs (half of RAM)
+ * libdepengine: avoid cast of spells whose dependencies failed,
+ also before the actual cast phase
+
2020-09-19 Thomas Orgis <sobukus AT sourcemage.org>
* protected: added readline, ncurses, isl, icu (bug 16112)
* protected: also added guile libs, in case you make make
diff --git a/var/lib/sorcery/modules/libdepengine
b/var/lib/sorcery/modules/libdepengine
index 02e9b32..486fb63 100755
--- a/var/lib/sorcery/modules/libdepengine
+++ b/var/lib/sorcery/modules/libdepengine
@@ -135,10 +135,20 @@ depengine_cast_engine() {
rc=$?
fi

+ # Crude hacks to avoid casting spells whose dependencies failed.
+ # Since sorcery does not properly keep track of spell state with
+ # its multiple passes, some grepping in files that store failures
+ # does the trick.
if grep -qs "^$spell$" "$FAILED_LIST"; then
message "${MESSAGE_COLOR}The spell ${SPELL_COLOR}$spell$MESSAGE_COLOR" \
" failed to cast. Remembering that.$DEFAULT_COLOR"
rc=1
+ # pre_sub_depends failure is non-fatal, just means re-cast
+ elif grep -s "^$spell " "$CAST_BACKUPDIR/failure_reason_log" \
+ | grep -q -v pre_sub_depends; then
+ message "${MESSAGE_COLOR}The spell ${SPELL_COLOR}$spell$MESSAGE_COLOR" \
+ " failed before cast. Remembering that.$DEFAULT_COLOR"
+ rc=1
fi

dpgn_set_spell_color $spell brown
diff --git a/var/lib/sorcery/modules/libgrimoire
b/var/lib/sorcery/modules/libgrimoire
index bc69995..7389b54 100755
--- a/var/lib/sorcery/modules/libgrimoire
+++ b/var/lib/sorcery/modules/libgrimoire
@@ -39,14 +39,22 @@ real_mk_source_dir() {
local NEW_DIR=${NEW_DIR:=$SOURCE_DIRECTORY}

local SIZE=$2
- local SIZE=${SIZE:=2g}
+ # See bug 15946. Even simpler approach: Just specify no size, wich
+ # also defaults to half of RAM in Linux.
+ # TODO: Use given size to decide for TMPFS or not, early bail out
+ # if not enough disk.
+ local sizepar
+ if [[ -n "$SIZE" ]]; then
+ sizepar="size=$SIZE,"
+ fi
+ # Could also think about inode count being necessary.

if [ -n "$NEW_DIR" ]; then

rm_source_dir $NEW_DIR
mkdir -p $NEW_DIR &&
if [[ $TMPFS == on ]]; then
- mount -o size=$SIZE,nr_inodes=1m -t tmpfs tmpfs $NEW_DIR
+ mount -o "$sizepar"nr_inodes=1m -t tmpfs tmpfs $NEW_DIR
fi
fi

diff --git a/var/lib/sorcery/protected b/var/lib/sorcery/protected
index 2c8309d..56dbe57 100755
--- a/var/lib/sorcery/protected
+++ b/var/lib/sorcery/protected
@@ -3,6 +3,7 @@
^/bin/mawk$
^/bin/sed$
^/bin/bash$
+^/bin/login$
^/bin/cat$
^/bin/cp$
^/bin/date$



  • [SM-Commit] GIT changes to devel-sobukus-protection sorcery by Thomas Orgis (01d9f2b0d3320fd590379f88aef4d120d5271dce), Thomas Orgis, 02/26/2021

Archive powered by MHonArc 2.6.24.

Top of Page