Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Ismael Luceno (c8e0144929030654a6ae28886c6c5e3a143b0194)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master sorcery by Ismael Luceno (c8e0144929030654a6ae28886c6c5e3a143b0194)
  • Date: Tue, 14 May 2019 00:27:18 +0000

GIT changes to master sorcery by Ismael Luceno <ismael AT sourcemage.org>:

var/lib/sorcery/modules/libunpack | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

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

libunpack: Use stdin only implicitly by tar

GNU tar expects the input to be block-aligned unless it knows it's
reading from a pipe, but unpackers may not flush the output at the
expected block size, which results in read errors.

When using the -f flag, detection is based on the filename being "-".

This bug was exposed by bzip2 compiled against musl.

diff --git a/var/lib/sorcery/modules/libunpack
b/var/lib/sorcery/modules/libunpack
index 3842703..c80905f 100755
--- a/var/lib/sorcery/modules/libunpack
+++ b/var/lib/sorcery/modules/libunpack
@@ -220,10 +220,10 @@ unpack_core() {
case "$2" in
bzip2|gzip|compress*|tar|XZ|xz|LZMA)
if real_list_find "$3" same-permissions; then
- tar -xf /dev/stdin 2> /dev/null
+ tar -x 2> /dev/null
else
- tar --no-same-owner --no-same-permissions -xf \
- /dev/stdin 2> /dev/null
+ tar --no-same-owner --no-same-permissions -x \
+ 2> /dev/null
fi || cat > /dev/null ;;
Zip) cat /dev/stdin >/dev/null #get rid of unused output
unzip -q "$1" ;;



  • [SM-Commit] GIT changes to master sorcery by Ismael Luceno (c8e0144929030654a6ae28886c6c5e3a143b0194), Ismael Luceno, 05/13/2019

Archive powered by MHonArc 2.6.24.

Top of Page