Skip to Content.
Sympa Menu

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

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 (10bb64245696e506ce9155a787c4a4def64ac9ca)
  • Date: Tue, 12 Dec 2023 22:19:00 +0000

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

Makefile | 2
etc/sorcery/version | 2
install | 2
usr/lib/sorcery/cmd/sightsee | 134
+++++++++++++++++++++++++++++++++
usr/sbin/delve | 42 ++++------
usr/sbin/sorcery | 17 ++--
var/lib/sorcery/build/run_compiler | 17 +---
var/lib/sorcery/modules/build_api/api2 | 6 -
var/lib/sorcery/modules/libdepengine | 13 +--
var/lib/sorcery/modules/libgrimoire | 9 --
var/lib/sorcery/modules/libmisc | 1
var/lib/sorcery/modules/libsorcery | 20 ++++
var/lib/sorcery/modules/libtrack | 18 +---
var/lib/sorcery/modules/libunpack | 3
14 files changed, 212 insertions(+), 74 deletions(-)

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

libdepengine: ignore pre_remove and post_remove failures for failure
detection

The loop prevention hack guessed wrongly that a pre_remove failure is
serious and hence caused lots of spells being dropped once e.g.
grep was cast, which has a PRE_REMOVE that returns non-zero (something we
could
investigate). Sorcery ignores that return value also for post_remove, but
the runtime mechanism still stores the failure reason.

Maybe we should ignore that failure reason log altogether. But I think I
had a reason including it.

We need to rewrite this all ...

This commit also makes the two messages different, adding 'subtly' for the
cases where the spell didn't outright fail but still has a reason
(conflicts
is one remaining case which we might want to settle) and listing the
found reasons. This mainly should aid debugging once we get rid of these
cases. Either there is a failure or not, please.

commit 6e5f1e1c38163323690f56c8379d4c5904d7c589
Author: Thomas Orgis <sobukus AT sourcemage.org>
Commit: Thomas Orgis <sobukus AT sourcemage.org>

resurrect: fix for symlink on /var/cache/sorcery

commit 80d53a2f46b2f848598059d22f12cde44be3c2d2
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

Revert "Implement logging by reusing file descriptors"

This reverts commit e9a142540638bf09792acc31fd8d715e3b59d962.

commit 43e2cd7fbc6cccdcba4411f0f2309948fec37da1
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

sightsee: Use CODEX_ROOT

commit 8d44d25f35cb44cb912f97c05c2f31dd7fa42f02
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

libgrimoire: Simplify setting size in mk_source_dir

commit e9a142540638bf09792acc31fd8d715e3b59d962
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

Implement logging by reusing file descriptors

Avoid opening files, references to /proc/self/fd/ may cause permission
issues when dropping privileges.

commit 9f94574265d5f457785beb22bd00e88823224453
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

delve: Fix CHROOT_CMD issue in the last commit

Fixes: 36d011541c3e ("delve: Refactor staged install setup")

commit 36d011541c3ed7f760836837206f7d2854cb8fd1
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

delve: Refactor staged install setup

commit 09ade572b5cdab33037c22a58332e0f9f24ef709
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

libtrack: Simplify unmounting of castfs

commit 8094b28e2ca62af9ffb1250c1822ba10f8fa2def
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

api2: Simplify $STAGED_INSTALL + $HOST check

commit d0e9a15bbc692554c6425ba8a51f3c01340459f3
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

Add support for icecream

commit b1af1023c73cbca4e3a9021bc81dc367b9fee08b
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

libtrack: Fix castfs detection

commit de280f2600c50d38442196bcfab9643f82b6f1ce
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

sightsee: Allow multiple matches per line

commit d1fc58124ff5edcb14295cd59b968833a5a1349f
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

Add lzip support

commit 5631eecaa3b330545f646092c5bf621d9150f893
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

sightsee: Make file name matching case-insensitive

commit d6dfa4253ea64c1b2d6836dbcd491fae68039653
Author: Pavel Vinogradov <vin.public AT gmail.com>
Commit: Ismael Luceno <ismael AT sourcemage.org>

sightsee: Add support for HTTP_DL_HANDLER and curl

commit e47ec5212bbbc3d271c679a88ac414c862fd6e56
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

sightsee: Fix parsing of SPELL

commit 2002433c05200ffc23dc1bcd48ffea425bf91a57
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

sightsee: Take spell name from SPELL variable

commit e4ca8746c57284e436589883ab58a04e83f06870
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

sightsee: Fix skipping of spells without Watch line

commit 2a34759a575e8fc0a2286a43fbf4ad02eb1ab7fb
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

sightsee: Add matching of source RPMs to the default regex

commit a1de57e4dbb3909db024a986e775d04710baed8c
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

sightsee: Fix parsing of VERSION variable

commit fead07cdbf8c7d5c67187373b962222d0ec45394
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

sightsee: Add debug mode

commit a1c700b0686c8bf152679944ec13428ca4c7bec1
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

sightsee: Provide a default regex

commit 0330ceaa3794a4538ed1417e83d96a6d531d781a
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

sightsee: Print a warning if no release was extracted

commit dbd0c00982f1cd1215c18f2e51db35e2ac68bf00
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

sightsee: Fix syntax error

commit 0fa97cfb367df44e145122411898e4876fb605f1
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

sightsee: Allow for spaces in the regex

commit bad15943017418d8e61772bc34269eae61ec4e04
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

sightsee: Make test mode show all unique matches

commit 4f36610e9dc99c6f2c8a982d7e918f8e1ea5e57e
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

sightsee: Improve parsing

Make so that the Watch line can come in any order; it was confusing before
because it needed to happen after VERSION was defined.

commit 248845a2ae31599b87a3a736163e0c683d4aa0b7
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

sightsee: Add test mode

commit a6e53e505363e1e02cc33831c56c5ebd54f1cb0d
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

Implement sorcery sightsee command

commit bd9e97e075b8875b3306d38fd1d5e549da6f969f
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

Implement support for external commands

Executable binaries added to /usr/lib/sorcery/cmd/ will be used as
sub-commands for Sorcery.

The sub-commands must implement the --help argument.

commit c0fc1f23504c972d1e38db195a52614fbc7fbeb4
Author: Remko van der Vossen <wich AT sourcemage.org>
Commit: Remko van der Vossen <wich AT sourcemage.org>

Set corrcet branch & version for release

diff --git a/Makefile b/Makefile
index d9c6fa4..c1bc950 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ AWK ?= awk
help:
@${AWK} 'sub(/^#HELP: ?/, "")' ${.MAKE.MAKEFILES}

-BRANCH = stable
+BRANCH = devel
release = sorcery-$(BRANCH).tar.bz2

ts-scm = .git/refs/heads/master
diff --git a/etc/sorcery/version b/etc/sorcery/version
index 5dbf14a..3204c3c 100644
--- a/etc/sorcery/version
+++ b/etc/sorcery/version
@@ -1 +1 @@
-20111014
+20221117
diff --git a/install b/install
index 526a858..3012f6e 100755
--- a/install
+++ b/install
@@ -27,7 +27,7 @@ echo /etc/sorcery/install.log > $SORCERY_INSTALL_LOG

echo "Installing scripts and libraries"
# Install the executables
-install__find_non_volatile etc usr/sbin var/lib |
+install__find_non_volatile etc usr/sbin var/lib usr/lib |
while read src; do
dst="$INSTALL_ROOT/$src" &&
install -o 0 -g 0 -m 755 -p -D "$src" "$dst" &&
diff --git a/usr/lib/sorcery/cmd/sightsee b/usr/lib/sorcery/cmd/sightsee
new file mode 100755
index 0000000..8c6275f
--- /dev/null
+++ b/usr/lib/sorcery/cmd/sightsee
@@ -0,0 +1,134 @@
+#!/bin/sh
+. /etc/sorcery/local/config
+. /etc/sorcery/roots
+unset debug verbose paths
+
+upstream_rel_get() {
+ [ -z "$debug" ] || >&2 echo "D: Visiting $1"
+ case "$HTTP_DL_HANDLER" in
+ (curl) curl -s "$1" ;;
+ (*) wget -q -O- "$1" ;;
+ esac | gawk -vdebug="$debug" -vfname="$2" '
+ {
+ while (match(tolower($0), fname, V)) {
+ if (debug) {
+ printf "D: matched `%s`\n", \
+ substr($0, RSTART, RLENGTH) \
+ >"/dev/stderr"
+ }
+ print V[1 in V]
+ $0 = substr($0, RSTART + RLENGTH)
+ }
+ }
+ ' | sort -urV
+}
+
+# Process options
+while
+ case "$1" in
+ (--test)
+ shift
+ upstream_rel_get "$@"
+ exit
+ ;;
+ (--codex)
+ CODEX_ROOT="$2"
+ shift 2
+ ;;
+ (--debug)
+ debug=1
+ shift
+ ;;
+ (-v|--verbose)
+ verbose=1
+ shift
+ ;;
+ (-h|--help)
+ cat <<"!"
+
+sightsee [spell...] Find upstream software releases. Takes paths or spell
+ names.
+!
+ exit 0
+ ;;
+ (*) false ;;
+ esac
+do :
+done
+
+if [ $# = 0 ]; then
+ paths="$CODEX_ROOT"
+else
+ for i in "$@"; do
+ case "$i" in
+ (*/*) ;;
+ (*)
+ if ! [ -d "$i" ]; then
+ j=$(find "$CODEX_ROOT" -maxdepth 3 -name "$i" -type d -print -quit)
+ [ -d "$j" ] && i="$j"
+ fi
+ ;;
+ esac
+ paths+=("$i")
+ done
+fi
+
+find "${paths[@]}" -name DETAILS -exec awk -vdebug="$debug" '
+ END { print_spell() }
+ FNR==1 {
+ if (spell != "") print_spell()
+ }
+ /^ *SPELL=/ {
+ spell = $0
+ sub(/^[^=]+=["'\'']?/, "", spell)
+ sub(/["'\'']$/, "", spell)
+ next
+ }
+ /^ *VERSION=/ {
+ version = $0
+ sub(/[\t ]*[;#].*/, "", version)
+ sub(/.*=["'\'']?/, "", version)
+ sub(/["'\'']$/, "", version)
+ if (watch_url != "") nextfile
+ }
+ /^# *Watch:/ {
+ sub(/^[^:]+: */, "")
+ watch_url = $1
+ sub(/^[^ ]+ */, "")
+ watch_regex = $0
+ if (version != "") nextfile
+ }
+ function print_spell() {
+ if (watch_url == "") {
+ printf "W: %s: %s\n", spell, \
+ "Upstream releases page not specified" \
+ >"/dev/stderr"
+ } else {
+ if (!watch_regex)
+ watch_regex = spell \
+
"[-_](R?[-_.+~0-9]+(([a-z]|rc|alpha|beta)[0-9]*)?)" \
+ "([-.]src|[-.]source)?" \
+
"[.](tar|zip|t[bgx]z|7z|sha?r|cpio|rpm|deb|[ot]tf)"
+ if (debug)
+ printf "D: regex `%s`\n", watch_regex
>"/dev/stderr"
+ print spell, version, watch_url, watch_regex
+ }
+ version = watch_url = spell = ""
+ }
+ ' {} + |
+while read spell cur_rel url regex; do
+ if [ -n "$debug" ]; then
+ >&2 echo "D: current_release for $spell: $cur_rel"
+ fi
+ latest_rel=$(upstream_rel_get "$url" "$regex" | sed q) || continue
+ if [ -z "$latest_rel" ]; then
+ >&2 echo "W: $spell has no published releases, review the URL"
+ elif [ "x$latest_rel" != "x$cur_rel" ]; then
+ if [ -n "$debug" ]; then
+ >&2 echo "D: latest release for $spell: $latest_rel"
+ fi
+ echo "$spell $latest_rel"
+ elif [ -n "$verbose" ] || [ -n "$debug" ]; then
+ >&2 echo "I: $spell is up to date"
+ fi
+done
diff --git a/usr/sbin/delve b/usr/sbin/delve
index 7ecbc80..1c1360a 100755
--- a/usr/sbin/delve
+++ b/usr/sbin/delve
@@ -169,24 +169,27 @@ delve_pre_install() {
> >(tee -a $C_LOG > $VOYEUR_STDOUT)
}

+delve_staged_install_setup() {
+ case "$STAGED_INSTALL:$CHROOT_CHECK" in
+ (off:*) invoke_installwatch ;;
+ (*:)
+ if [ "x$1" = x--prepare ]; then
+ prepare_stage_root
+ fi &&
+ invoke_stage_root &&
+ export CHROOT_CHECK=true &&
+ CHROOT_CMD="chroot $STAGE_DIRECTORY/MOUNT"
+ ;&
+ (*:true) INSTALL_ROOT="" ;;
+ esac
+}
+
delve_install() {
debug "delve" "Running $FUNCNAME"

delve_is_valid_step INSTALL 2 || return 1
delve_log_helper
- if [[ "$STAGED_INSTALL" != "off" ]]
- then
- if [[ -z "$CHROOT_CHECK" ]]
- then
- prepare_stage_root &&
- invoke_stage_root &&
- export CHROOT_CHECK="true"
- CHROOT_CMD="chroot ${STAGE_DIRECTORY}/MOUNT"
- fi
- INSTALL_ROOT=""
- else
- invoke_installwatch
- fi
+ delve_staged_install_setup --prepare
(
if [[ -z "$CHROOT_CMD" ]]
then
@@ -210,18 +213,7 @@ delve_install_extras() {

delve_is_valid_step INSTALL_EXTRAS 2 || return 1
delve_log_helper
- if [[ "$STAGED_INSTALL" != "off" ]]
- then
- if [[ -z "$CHROOT_CHECK" ]]
- then
- invoke_stage_root &&
- export CHROOT_CHECK="true"
- CHROOT_CMD="chroot ${STAGE_DIRECTORY}/MOUNT"
- fi
- INSTALL_ROOT=""
- else
- invoke_installwatch
- fi
+ delve_staged_install_setup
(
if [[ -z "$CHROOT_CMD" ]]
then
diff --git a/usr/sbin/sorcery b/usr/sbin/sorcery
index 5823a4c..e8a02d5 100755
--- a/usr/sbin/sorcery
+++ b/usr/sbin/sorcery
@@ -32,6 +32,8 @@ Usage: sorcery [parameters]

Optional Parameters:

+-v | --version Print the sorcery version
+
-h | --help | help Display this help screen

-s | system-update Perform a system update (updates sorcery, grimoire,
@@ -80,13 +82,11 @@ default add spell PROVIDER on/off "Spell" is the
provider for

default remove [spell|""] [spell|PROVIDER|""] Remove entry from defaults
default search [spell|""] [spell|PROVIDER|""] [on|off] Search defaults
-
--v | --version Print the sorcery version
-
EOF
-
- exit 1
#' <-- fix for syntax highlighting in nedit
+ find /usr/lib/sorcery/cmd -mindepth 1 -maxdepth 1 -perm /333 -type f \
+ -exec {} --help \;
+ exit 1
}

mirror_list() {
@@ -1996,6 +1996,13 @@ main() {

}

+# Externally-implemented subcommands take priority
+if [ -f /usr/lib/sorcery/cmd/"$1" ]; then
+ cmd="$1"
+ shift
+ exec /usr/lib/sorcery/cmd/"$cmd" "$@"
+fi
+
. /etc/sorcery/config
verify_parameters "$@"

diff --git a/var/lib/sorcery/build/run_compiler
b/var/lib/sorcery/build/run_compiler
index 8cfe154..9e230b3 100644
--- a/var/lib/sorcery/build/run_compiler
+++ b/var/lib/sorcery/build/run_compiler
@@ -19,20 +19,19 @@

. /etc/sorcery/compile_config

+DISTCC=
if [[ $USE_DISTCC != off ]] &&
- [[ "$DISTCC_HOSTS" ]] &&
- test -x /usr/bin/distcc ; then
-
- DISTCC=/usr/bin/distcc
-
+ [[ "$DISTCC_HOSTS" ]]; then
+ if [ -x /usr/bin/icecc ]; then
+ DISTCC=/usr/bin/icecc
+ elif [ -x /usr/bin/distcc ]; then
+ DISTCC=/usr/bin/distcc
+ fi
export DISTCC_HOSTS
export DISTCC_DIR
export DISTCC_VERBOSE=0
export DISTCC_LOG=/dev/null
-
- test -d "$DISTCC_DIR/" || mkdir -p "$DISTCC_DIR"
-else
- DISTCC=""
+ mkdir -p "$DISTCC_DIR"
fi

if [ "$CCACHE" = "on" ] && [ -x /usr/bin/ccache ] ; then
diff --git a/var/lib/sorcery/modules/build_api/api2
b/var/lib/sorcery/modules/build_api/api2
index a2212a4..abfceea 100755
--- a/var/lib/sorcery/modules/build_api/api2
+++ b/var/lib/sorcery/modules/build_api/api2
@@ -372,11 +372,11 @@ real_default_sorcery_install_extras() {
install_desktop_files
gather_docs
init_post_install
- [[ $STAGED_INSTALL == off ]] &&
- case "$HOST" in *-gnu) ldconfig;; esac
+ case "$STAGED_INSTALL:$HOST" in
+ (off:*-gnu) ldconfig ;;
+ esac
# release_saved_libraries
cd /
-
}

real_default_sorcery_transfer() {
diff --git a/var/lib/sorcery/modules/libdepengine
b/var/lib/sorcery/modules/libdepengine
index 486fb63..70b3832 100755
--- a/var/lib/sorcery/modules/libdepengine
+++ b/var/lib/sorcery/modules/libdepengine
@@ -135,19 +135,22 @@ depengine_cast_engine() {
rc=$?
fi

+ # pre_sub_depends failure is non-fatal, just means re-cast
+ # Also, pre_remove and post_remove return values are ignored, anyway.
+ local fail_reasons=$(grep -s "^$spell "
"$CAST_BACKUPDIR/failure_reason_log" \
+ | cut -f 2 -d ' ' \
+ | grep -v -e '(pre_sub_depends)' -e '(pre_remove)' -e '(post_remove)')
# 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"
+ " failed to cast. Remembering that.
${fail_reasons}$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
+ elif [[ -n $fail_reasons ]]; then
message "${MESSAGE_COLOR}The spell ${SPELL_COLOR}$spell$MESSAGE_COLOR" \
- " failed before cast. Remembering that.$DEFAULT_COLOR"
+ " subtly failed before cast. Remembering that.
${fail_reasons}$DEFAULT_COLOR"
rc=1
fi

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

local SIZE=$2
- # 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 "$sizepar"nr_inodes=1m -t tmpfs tmpfs $NEW_DIR
+ mount -o "${SIZE:+size=$SIZE,}"nr_inodes=1m -t tmpfs tmpfs "$NEW_DIR"
fi
fi

diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index cbc09cd..c4ba9c6 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -1736,6 +1736,7 @@ show_file() {
fi ;;
x-bzip2) bzcat "$file" | $PAGER ;;
x-gzip) gzip -cd "$file" | $PAGER ;;
+ x-lzip) lzip -cd "$file" | $PAGER ;;
x-xz|x-lzma) xz -cd "$file" | $PAGER ;;
x-7z-compressed) 7z -d "$file" | $PAGER ;;
# This is needed as long as there is stable grimoire with
diff --git a/var/lib/sorcery/modules/libsorcery
b/var/lib/sorcery/modules/libsorcery
index fc5ef96..30be820 100755
--- a/var/lib/sorcery/modules/libsorcery
+++ b/var/lib/sorcery/modules/libsorcery
@@ -1107,8 +1107,10 @@ invoke_build_dir() {

USE_DISTCC=off
if [[ $DISABLE_DISTCC != yes ]] ; then
- if test -n "$DISTCC_HOSTS" && spell_ok distcc ; then
- USE_DISTCC=on
+ if test -n "$DISTCC_HOSTS"; then
+ if spell_ok icecream || spell_ok distcc; then
+ USE_DISTCC=on
+ fi
fi
fi

@@ -1144,6 +1146,7 @@ set_compression_type() {
local B_HELP="bzip2 compression (slow, small files)"
local P_HELP="parallel bzip2 compression (slow unless on SMP, small files)"
local X_HELP="xz compression (slow compress, fast decompress, smallest
files)"
+ local L_HELP="lzip compresison (slow compress, fast decompress, smallest
files)"
local G_HELP="gzip compression (fast, larger files)"
local T_HELP="no compression/tar (fastest, largest files)"

@@ -1159,6 +1162,7 @@ set_compression_type() {
"B" "bzip2 compression" "$B_HELP" \
"P" "pbzip2 compression (parallel bzip2)"
"$P_HELP" \
"X" "xz compression" "$X_HELP" \
+ "L" "lzip compression" "$L_HELP" \
"G" "gzip compression" "$G_HELP" \
"T" "no compression/tar" "$T_HELP"')

@@ -1191,6 +1195,16 @@ set_compression_type() {
modify_local_config "COMPRESSBIN" "xz" &&
COMPRESSBIN="xz" &&
modify_local_config "EXTENSION" ".xz" ;;
+ L)
+ if ! spell_ok lzip; then
+ clear_line
+ message "lzip is not installed on this system! Running cast
...\n"
+ sleep 2
+ cast lzip
+ fi &&
+ modify_local_config "COMPRESSBIN" "lzip" &&
+ COMPRESSBIN="lzip" &&
+ modify_local_config "EXTENSION" ".lz" ;;
G)
modify_local_config "COMPRESSBIN" "gzip" &&
COMPRESSBIN="gzip" &&
@@ -1214,7 +1228,7 @@ set_compression_type() {
##
#---------------------------------------------------------------------
filename_indicates_compression() {
- grep -qE "^.*\.(gz|tgz|bz2|zip|Z|rpm|xz|7z|lzma)$" <<< "$1"
+ grep -qE "^.*\.(gz|tgz|bz2|zip|Z|rpm|lz|xz|7z|lzma)$" <<< "$1"
}

#---------------------------------------------------------------------
diff --git a/var/lib/sorcery/modules/libtrack
b/var/lib/sorcery/modules/libtrack
index 60f1916..641e250 100755
--- a/var/lib/sorcery/modules/libtrack
+++ b/var/lib/sorcery/modules/libtrack
@@ -124,11 +124,7 @@ real_devoke_stage_root()
{
unset CASTFS_LOGFILE
unset CASTFS_DBGLVL
- for dir in /dev/pts /dev /proc /sys
- do
- umount -l "${STAGE_DIRECTORY}/MOUNT$dir"
- done &&
- umount -l "${STAGE_DIRECTORY}/MOUNT"
+ umount -l "${STAGE_DIRECTORY}/MOUNT"{/dev/pts,/dev,/proc,/sys,}
}

#---------------------------------------------------------------------
@@ -178,12 +174,10 @@ real_devoke_installwatch() {

is_castfs_installed()
{
- if type castfs >/dev/null 2>&1 &&
- (
- modprobe fuse > /dev/null 2>&1 ||
- grep -q '^nodev[\t\v\f\r ]*fuse$' /proc/filesystems
- ) &&
- [ -c /dev/fuse ]
+ modprobe fuse >/dev/null 2>&1
+ if [ -c /dev/fuse ] &&
+ grep -q '^nodev fuse$' /proc/filesystems &&
+ type castfs >/dev/null 2>&1
then
message "${MESSAGE_COLOR}Staging enabled${DEFAULT_COLOR}"
return 0
@@ -429,7 +423,7 @@ create_cache_archive() {
rm $TMP_DATA $TMP_MDATA

case "$COMPRESSBIN" in
- gzip|bzip2|pbzip2|xz)
+ gzip|bzip2|pbzip2|xz|lzip)
if "$COMPRESSBIN" -c </dev/null &>/dev/null; then
"$COMPRESSBIN" -c "$CACHE" > "$CACHE_COMP" &&
rm "$CACHE"
diff --git a/var/lib/sorcery/modules/libunpack
b/var/lib/sorcery/modules/libunpack
index 061a325..b54813e 100755
--- a/var/lib/sorcery/modules/libunpack
+++ b/var/lib/sorcery/modules/libunpack
@@ -196,6 +196,7 @@ uncompress_core() {
tar) cat "$1" ;;
xz|XZ) xz -cdf "$1" ;;
LZMA) xz -cdf "$1" ;;
+ lzip) lzip -cdf "$1" ;;
7-zip) cat "$1" ;; # 7z supports stdout, but it unpacks at the
same time
*) cat "$1" ;;
esac
@@ -234,7 +235,7 @@ unpack_core() {
debug "libgrimoire" "unpack_core - $*"

case "$2" in
- bzip2|gzip|compress*|tar|XZ|xz|LZMA)
+ bzip2|gzip|compress*|lzip|tar|XZ|xz|LZMA)
untar 2>/dev/null || cat > /dev/null ;;
Zip) cat /dev/stdin >/dev/null #get rid of unused output
unzip -q "$1" ;;



  • [SM-Commit] GIT changes to devel-sobukus-protection sorcery by Thomas Orgis (10bb64245696e506ce9155a787c4a4def64ac9ca), Thomas Orgis, 12/12/2023

Archive powered by MHonArc 2.6.24.

Top of Page