From 2cfa239220a4e34a4089643592fa0f0639a4928a69f656b860b44bce70e065da Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 27 Apr 2023 22:00:35 +0000 Subject: [PATCH] Accepting request 1079568 from home:dirkmueller:Factory - update to 4.6.1: * Race condition which can cause corruption of the "fragment table" fixed. This is a regression introduced in August 2022, and it has been seen when tailend packing is used (-tailends option). * Fix build failure when the tools are being built without extended attribute (XATTRs) support. * Fix XATTR error message when an unrecognised prefix is found * Fix incorrect free of pointer when an unrecognised XATTR prefix is found. * Major improvements in extended attribute handling, pseudo file handling, and miscellaneous new options and improvements * Extended attribute handling improved in Mksquashfs and Sqfstar * New Pseudo file xattr definition to add extended attributes to files. * New xattrs-add Action to add extended attributes to files * Extended attribute handling improved in Unsquashfs * Other major improvements * Unsquashfs can now output Pseudo files to standard out. * Mksquashfs can now input Pseudo files from standard in. * Squashfs filesystems can now be converted (different block size compression etc) without unpacking to an intermediate filesystem or mounting, by piping the output of Unsquashfs to Mksquashfs. * Pseudo files are now supported by Sqfstar. * "Non-anchored" excludes are now supported by Unsquashfs. OBS-URL: https://build.opensuse.org/request/show/1079568 OBS-URL: https://build.opensuse.org/package/show/filesystems/squashfs?expand=0&rev=56 --- 4.5.1.tar.gz | 3 --- 4.6.1.tar.gz | 3 +++ squashfs-64k.patch | 41 ++++++++++++++++++++++++++++------------- squashfs-thread-limit | 11 ++++++----- squashfs.changes | 32 ++++++++++++++++++++++++++++++++ squashfs.spec | 10 ++++++---- 6 files changed, 75 insertions(+), 25 deletions(-) delete mode 100644 4.5.1.tar.gz create mode 100644 4.6.1.tar.gz diff --git a/4.5.1.tar.gz b/4.5.1.tar.gz deleted file mode 100644 index d109a6b..0000000 --- a/4.5.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:277b6e7f75a4a57f72191295ae62766a10d627a4f5e5f19eadfbc861378deea7 -size 270112 diff --git a/4.6.1.tar.gz b/4.6.1.tar.gz new file mode 100644 index 0000000..026a2ea --- /dev/null +++ b/4.6.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94201754b36121a9f022a190c75f718441df15402df32c2b520ca331a107511c +size 286848 diff --git a/squashfs-64k.patch b/squashfs-64k.patch index 770218a..92842d0 100644 --- a/squashfs-64k.patch +++ b/squashfs-64k.patch @@ -1,26 +1,26 @@ -Index: squashfs-tools-4.5.1/squashfs-tools/mksquashfs.c +Index: squashfs-tools-4.6.1/squashfs-tools/mksquashfs.c =================================================================== ---- squashfs-tools-4.5.1.orig/squashfs-tools/mksquashfs.c -+++ squashfs-tools-4.5.1/squashfs-tools/mksquashfs.c -@@ -6079,7 +6079,7 @@ static void print_options(FILE *stream, - fprintf(stream, "\t\t\tOptionally a suffix of K, M or G can be given to "); - fprintf(stream, "specify\n\t\t\tKbytes, Mbytes or Gbytes respectively\n"); +--- squashfs-tools-4.6.1.orig/squashfs-tools/mksquashfs.c ++++ squashfs-tools-4.6.1/squashfs-tools/mksquashfs.c +@@ -6378,7 +6378,7 @@ static void print_options(FILE *stream, + fprintf(stream, "file on\n\t\t\tencountering them. This option makes "); + fprintf(stream, "Mksquashfs ignore\n\t\t\tthe zero filled blocks\n"); fprintf(stream, "\nExpert options (these may make the filesystem unmountable):\n"); - fprintf(stream, "-nopad\t\t\tdo not pad filesystem to a multiple of 4K\n"); + fprintf(stream, "-nopad\t\t\tdo not pad filesystem to a multiple of 64K\n"); - fprintf(stream, "-offset \tSkip bytes at the beginning of "); + fprintf(stream, "-offset \tskip bytes at the beginning of "); fprintf(stream, "FILESYSTEM.\n\t\t\tOptionally a suffix of K, M or G can be given "); fprintf(stream, "to specify\n\t\t\tKbytes, Mbytes or Gbytes respectively.\n"); -@@ -6210,7 +6210,7 @@ static void print_sqfstar_options(FILE * - fprintf(stream, "\t\t\tOptionally a suffix of K, M or G can be given to "); - fprintf(stream, "specify\n\t\t\tKbytes, Mbytes or Gbytes respectively\n"); +@@ -6606,7 +6606,7 @@ static void print_sqfstar_options(FILE * + fprintf(stream, "memory for caches. Default 25%%\n"); + fprintf(stream, "-mem-default\t\tprint default memory usage in Mbytes\n"); fprintf(stream, "\nExpert options (these may make the filesystem unmountable):\n"); - fprintf(stream, "-nopad\t\t\tdo not pad filesystem to a multiple of 4K\n"); + fprintf(stream, "-nopad\t\t\tdo not pad filesystem to a multiple of 64K\n"); - fprintf(stream, "-offset \tSkip bytes at the beginning of "); + fprintf(stream, "-offset \tskip bytes at the beginning of "); fprintf(stream, "FILESYSTEM.\n\t\t\tOptionally a suffix of K, M or G can be given "); fprintf(stream, "to specify\n\t\t\tKbytes, Mbytes or Gbytes respectively.\n"); -@@ -6958,9 +6958,9 @@ print_sqfstar_compressor_options: +@@ -7605,9 +7605,9 @@ print_sqfstar_compressor_options: set_progressbar_state(FALSE); write_filesystem_tables(&sBlk); @@ -32,4 +32,19 @@ Index: squashfs-tools-4.5.1/squashfs-tools/mksquashfs.c + write_destination(fd, bytes, 65536 - i, temp); } - close(fd); + res = close(fd); +@@ -8877,10 +8877,10 @@ print_compressor_options: + + set_progressbar_state(FALSE); + write_filesystem_tables(&sBlk); +- +- if(!nopad && (i = bytes & (4096 - 1))) { +- char temp[4096] = {0}; +- write_destination(fd, bytes, 4096 - i, temp); ++ ++ if(!nopad && (i = bytes & (65536 - 1))) { ++ char temp[65536] = {0}; ++ write_destination(fd, bytes, 65536 - i, temp); + } + + res = close(fd); diff --git a/squashfs-thread-limit b/squashfs-thread-limit index 7939033..e1c51fb 100644 --- a/squashfs-thread-limit +++ b/squashfs-thread-limit @@ -1,8 +1,9 @@ -diff -dupr squashfs4.4_orig/squashfs-tools/mksquashfs.c squashfs4.4/squashfs-tools/mksquashfs.c ---- squashfs4.4_orig/squashfs-tools/mksquashfs.c 2019-10-21 15:36:52.002369471 +0200 -+++ squashfs4.4/squashfs-tools/mksquashfs.c 2019-10-21 15:37:13.402549491 +0200 -@@ -4384,6 +4384,15 @@ void initialise_threads(int readq, int f - processors = sysconf(_SC_NPROCESSORS_ONLN); +Index: squashfs-tools-4.6.1/squashfs-tools/mksquashfs.c +=================================================================== +--- squashfs-tools-4.6.1.orig/squashfs-tools/mksquashfs.c ++++ squashfs-tools-4.6.1/squashfs-tools/mksquashfs.c +@@ -5276,6 +5276,15 @@ static void initialise_threads(int readq + } #endif } + /* Every frag_thrd will: diff --git a/squashfs.changes b/squashfs.changes index d52346e..7804d46 100644 --- a/squashfs.changes +++ b/squashfs.changes @@ -1,3 +1,35 @@ +------------------------------------------------------------------- +Sat Apr 15 09:55:32 UTC 2023 - Dirk Müller + +- update to 4.6.1: + * Race condition which can cause corruption of the "fragment + table" fixed. This is a regression introduced in August 2022, + and it has been seen when tailend packing is used (-tailends option). + * Fix build failure when the tools are being built without + extended attribute (XATTRs) support. + * Fix XATTR error message when an unrecognised prefix is + found + * Fix incorrect free of pointer when an unrecognised XATTR + prefix is found. + * Major improvements in extended attribute handling, + pseudo file handling, and miscellaneous new options and + improvements + * Extended attribute handling improved in Mksquashfs and + Sqfstar + * New Pseudo file xattr definition to add extended + attributes to files. + * New xattrs-add Action to add extended attributes to files + * Extended attribute handling improved in Unsquashfs + * Other major improvements + * Unsquashfs can now output Pseudo files to standard out. + * Mksquashfs can now input Pseudo files from standard in. + * Squashfs filesystems can now be converted (different + block size compression etc) without unpacking to an + intermediate filesystem or mounting, by piping the output of + Unsquashfs to Mksquashfs. + * Pseudo files are now supported by Sqfstar. + * "Non-anchored" excludes are now supported by Unsquashfs. + ------------------------------------------------------------------- Fri Oct 14 12:33:23 UTC 2022 - Torsten Duwe diff --git a/squashfs.spec b/squashfs.spec index 86b274c..f650dab 100644 --- a/squashfs.spec +++ b/squashfs.spec @@ -1,7 +1,7 @@ # # spec file for package squashfs # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: squashfs -Version: 4.5.1 +Version: 4.6.1 Release: 0 Summary: A Read-Only File System with Efficient Compression License: GPL-2.0-or-later @@ -60,8 +60,10 @@ make -C squashfs-tools install \ %files %license COPYING -%doc README-%{version} ACKNOWLEDGEMENTS CHANGES USAGE -%{_bindir}/* +%doc README-%{version} ACKNOWLEDGEMENTS CHANGES USAGE-4.6 +%{_bindir}/sqfs* +%{_bindir}/mksquashfs +%{_bindir}/unsquashfs %{_mandir}/man1/* %changelog