From 2d4552cab62966128f418dd4ad9060f3ad24c60f Mon Sep 17 00:00:00 2001 From: naddy Date: Mon, 16 Jan 2023 22:30:55 +0000 Subject: [PATCH] archivers/xz: update to 5.4.1 Significant changes: * threaded .xz decompressor * decompression support for the .lz (lzip) file format * upstream pledge(2) sandboxing Also use the package description provided by upstream. --- archivers/xz/Makefile | 6 ++--- archivers/xz/distinfo | 4 ++-- archivers/xz/patches/patch-config_h_in | 6 ++--- archivers/xz/patches/patch-src_xz_main_c | 28 ------------------------ archivers/xz/pkg/DESCR | 14 +++++------- 5 files changed, 14 insertions(+), 44 deletions(-) delete mode 100644 archivers/xz/patches/patch-src_xz_main_c diff --git a/archivers/xz/Makefile b/archivers/xz/Makefile index 172f245012d..30703eb825a 100644 --- a/archivers/xz/Makefile +++ b/archivers/xz/Makefile @@ -1,7 +1,7 @@ -COMMENT= LZMA compression and decompression tools +COMMENT= library and tools for XZ and LZMA compressed files -DISTNAME= xz-5.2.9 -SHARED_LIBS= lzma 2.1 # 7.9 +DISTNAME= xz-5.4.1 +SHARED_LIBS= lzma 2.2 # 9.1 CATEGORIES= archivers DPB_PROPERTIES= parallel diff --git a/archivers/xz/distinfo b/archivers/xz/distinfo index 842648d8a97..de34e4722d5 100644 --- a/archivers/xz/distinfo +++ b/archivers/xz/distinfo @@ -1,2 +1,2 @@ -SHA256 (xz-5.2.9.tar.gz) = 6YLqMbgVQ9fuK2+jTCrRF2DhxQxvRHWt2LoPLwBfB7Q= -SIZE (xz-5.2.9.tar.gz) = 2122988 +SHA256 (xz-5.4.1.tar.gz) = 5LD4FYLvoVXM8nu4gnUlSkKdRJaOSI/JS4BvKmHNPiI= +SIZE (xz-5.4.1.tar.gz) = 2528617 diff --git a/archivers/xz/patches/patch-config_h_in b/archivers/xz/patches/patch-config_h_in index 55261e08d5e..6061c7f3c22 100644 --- a/archivers/xz/patches/patch-config_h_in +++ b/archivers/xz/patches/patch-config_h_in @@ -1,10 +1,10 @@ Index: config.h.in --- config.h.in.orig +++ config.h.in -@@ -388,7 +388,11 @@ +@@ -409,7 +409,11 @@ - /* Define to 1 if the system supports fast unaligned access to 16-bit and - 32-bit integers. */ + /* Define to 1 if the system supports fast unaligned access to 16-bit, 32-bit, + and 64-bit integers. */ -#undef TUKLIB_FAST_UNALIGNED_ACCESS +#include +#if !defined(__STRICT_ALIGNMENT) diff --git a/archivers/xz/patches/patch-src_xz_main_c b/archivers/xz/patches/patch-src_xz_main_c deleted file mode 100644 index a1f98d6c8c2..00000000000 --- a/archivers/xz/patches/patch-src_xz_main_c +++ /dev/null @@ -1,28 +0,0 @@ ---- src/xz/main.c.orig Tue Sep 29 12:57:36 2015 -+++ src/xz/main.c Fri Aug 12 22:49:04 2016 -@@ -163,12 +163,25 @@ main(int argc, char **argv) - // on the command line, thus this must be done before args_parse(). - hardware_init(); - -+ if (pledge("stdio rpath wpath cpath fattr proc", NULL) == -1) -+ message_fatal(_("pledge")); -+ - // Parse the command line arguments and get an array of filenames. - // This doesn't return if something is wrong with the command line - // arguments. If there are no arguments, one filename ("-") is still - // returned to indicate stdin. - args_info args; - args_parse(&args, argc, argv); -+ -+ // No files on the command line and no --files. -+ if ((args.arg_count == 1 && strcmp(args.arg_names[0], "-") == 0) && -+ args.files_name == NULL) { -+ if (pledge("stdio proc", NULL) == -1) -+ message_fatal(_("pledge")); -+ } else if (opt_stdout || opt_mode == MODE_LIST) { -+ if (pledge("stdio rpath proc", NULL) == -1) -+ message_fatal(_("pledge")); -+ } - - if (opt_mode != MODE_LIST && opt_robot) - message_fatal(_("Compression and decompression with --robot " diff --git a/archivers/xz/pkg/DESCR b/archivers/xz/pkg/DESCR index b11f299a718..88b368b7f1a 100644 --- a/archivers/xz/pkg/DESCR +++ b/archivers/xz/pkg/DESCR @@ -1,8 +1,6 @@ -LZMA is a general-purpose compression algorithm designed by Igor -Pavlov as part of 7-Zip. It provides high compression ratio while -keeping the decompression speed fast. - -XZ Utils are an attempt to make LZMA compression easy to use on -free (as in freedom) operating systems. This is achieved by providing -tools and libraries which are similar to use than the equivalents -of the most popular existing compression algorithms. +XZ Utils provide a general purpose data compression library and +command line tools. The native file format is the .xz format, but +also the legacy .lzma format is supported. The .xz format supports +multiple compression algorithms, of which LZMA2 is currently the +primary algorithm. With typical files, XZ Utils create about 30 % +smaller files than gzip.