Skip to Content.
Sympa Menu

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

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 (00e2e67b9ba68721dc8ddfb789b71d65a855462b)
  • Date: Wed, 19 Aug 2020 10:02:12 +0000

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

ChangeLog | 4 ++++
usr/sbin/sorcery | 2 +-
var/lib/sorcery/modules/libmisc | 18 ++++++++++++------
var/lib/sorcery/modules/libresurrect | 7 ++++---
var/lib/sorcery/modules/libsorcery | 2 +-
var/lib/sorcery/protected | 1 +
6 files changed, 23 insertions(+), 11 deletions(-)

New commits:
commit fc25c3a4a8bc4fe977d3e463f7b52e6551dbdf9c
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

libsorcery: Remove -DPIC from prelink option

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

protected: Add libintl; needed on non-glibc systems

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

libresurrect: Fix warnings due to non-existing conflicts file

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

libmisc: Re-implement one-shot specfile selection

This version fixes the composition of SMGL_COMPAT_ARCHS.

Reverts: 112632ce607b ("Revert "libmisc: Implement one-shot specfile
selection"")
Fixes: 615b00c28da7 ("libmisc: Implement one-shot specfile selection")

commit 112632ce607b3744b607deb21ac0ea3267c8ded5
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 25e8e8f824f49cb3aa549da46cc53a90b02920e9
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

libtrack: Add fallback for non-functional cache archive compressor

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

libcast: Add fallback for non-functional log compressor

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

protected: Add libiconv; needed on non-glibc systems

commit 33f1a9f7ada5e5e03e1c3ecb85406da312861d66
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael 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 5521832f191589932768ae294c67d3ca0387943a
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

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

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

libstage: transfer_staged_spell: Simplify making of hlist path

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

libstage: Fix typo in synopsis

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

libmisc: introduce get_safe_locale and use it in cast, libgpg

This makes sorcery not blindly assume that C.UTF-8 is a valid
locale, which it is not on ancient systems (meaning: stable
Source Mage). Now, a list of preferred UTF-8 locales is matched
against $(locale -a) to avoid the annoying stream of errors.

diff --git a/ChangeLog b/ChangeLog
index f3bf4a3..003a8e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2020-08-05 Ismael Luceno <ismael AT sourcemage.org>
+ * protected: Added libintl
+ * libsorcery: Removed -DPIC from prelink optimization option
+
2019-10-03 Ismael Luceno <ismael AT sourcemage.org>
* Makefile: Made help target portable

diff --git a/usr/sbin/sorcery b/usr/sbin/sorcery
index 595de69..5823a4c 100755
--- a/usr/sbin/sorcery
+++ b/usr/sbin/sorcery
@@ -750,7 +750,7 @@ optimization_menu(){
local OPT_TITLE="Optimization Menu"
local OPT_HELP="Please select optimizations"

- local PRELINK_HELP="Speed up loading applications by pre-linking
libraries (CFLAGS=-DPIC -fPIC)"
+ local PRELINK_HELP="Speed up loading applications by pre-linking
libraries (CFLAGS=-fPIC)"
local RISKY_HELP="Optimize by violating ANSI/IEEE (unsafe)
(CFLAGS=-ffast-math -funroll-loops)"
local SPEEDY_HELP="Optimize generated code, conflicts with 'tiny'
(CFLAGS=$FAST)"
local STRIP_HELP="Remove all symbol table and relocation (debugging)
information (LDFLAGS=-s)"
diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index dd5952c..b7116a0 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -1492,14 +1492,20 @@ set_architecture() {
fi
debug "libmisc" "set_architecture: SPECFILE=$SPECFILE"

- # turn the path into an array, but remove $specdir from the start first
- unset SMGL_COMPAT_ARCHS
- explode "${SPECFILE#$specdir/}" '/' SMGL_COMPAT_ARCHS
+ # turn the path into an array, removing the spec dir prefix
+ SMGL_COMPAT_ARCHS=($(awk -F/ -vdirs="^${ARCH_SPECS[*]}/" -vf="$SPECFILE" '
+ BEGIN {
+ sub(/[/]* +/, "/|^", dirs) # convert to regex
+ match(f, dirs)
+ f = substr(f, RLENGTH) # remove prefix
+ gsub(/[/]+/, " ", f) # split
+ print f
+ }'))
+ debug "libmisc" "set_architecture:
SMGL_COMPAT_ARCHS[${#SMGL_COMPAT_ARCHS[@]}]=(${SMGL_COMPAT_ARCHS[*]})"

# Reverse the array so that the most specific arch is first
- ARCHITECTURE=(
- $(for i in "${SMGL_COMPAT_ARCHS[@]}"; do echo "$i"; done | tac)
- )
+ ARCHITECTURE=($(awk 'BEGIN { while (--ARGC > 0) print ARGV[ARGC] }' \
+ "${SMGL_COMPAT_ARCHS[@]}"))

# Guess libc ABI; archspecs default to "gnu"
if [ -z "$HOST_LIBC" ]; then
diff --git a/var/lib/sorcery/modules/libresurrect
b/var/lib/sorcery/modules/libresurrect
index 984f707..60c7fe4 100755
--- a/var/lib/sorcery/modules/libresurrect
+++ b/var/lib/sorcery/modules/libresurrect
@@ -286,10 +286,11 @@ resurrect_spell() { (
local tmp="$SCRIPT_DIRECTORY"
SCRIPT_DIRECTORY=$(codex_find_spell_by_name $SPELL)
query_conflicts $SPELL "$conflicts"
- if [[ $? == 0 ]] && dispel_conflicts $SPELL "$conflicts"; then
- sed -i "/^$SPELL /d" "$conflicts"
- else
+ local rc=$?
+ if [ -f "$conflicts" ]; then
sed -i "/^$SPELL /d" "$conflicts"
+ fi
+ if [ 0 != "$rc" ] || ! dispel_conflicts "$SPELL" "$conflicts"; then
resurrect_fail
return 1
fi
diff --git a/var/lib/sorcery/modules/libsorcery
b/var/lib/sorcery/modules/libsorcery
index bb31494..06233ee 100755
--- a/var/lib/sorcery/modules/libsorcery
+++ b/var/lib/sorcery/modules/libsorcery
@@ -638,7 +638,7 @@ optimize() {
for PARAM in $OPTIMIZATIONS; do
case $PARAM in
prelink)
- CFLAGS="$CFLAGS -DPIC -fPIC"
+ CFLAGS="$CFLAGS -fPIC"
PRELINK="on"
;;

diff --git a/var/lib/sorcery/protected b/var/lib/sorcery/protected
index 709e835..11704bf 100755
--- a/var/lib/sorcery/protected
+++ b/var/lib/sorcery/protected
@@ -53,6 +53,7 @@
^/lib/ld-linux\.so\.2$
^/lib/ld-musl-
^/lib/libblkid\.so\.
+^/lib/libintl\.so\.
^/usr/X11R6/lib/X11/app-defaults
^/usr/bin/as$
^/usr/bin/ld$



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

Archive powered by MHonArc 2.6.24.

Top of Page