pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pixz: Update to 1.0.7



Module Name:	pkgsrc-wip
Committed By:	Ryo ONODERA <ryoon%NetBSD.org@localhost>
Pushed By:	ryoon
Date:		Tue Apr 13 12:05:00 2021 +0900
Changeset:	b864ca5c7a034025b5988e1ea6bbbe19e0517379

Modified Files:
	pixz/DESCR
	pixz/Makefile
	pixz/distinfo
Removed Files:
	pixz/patches/patch-Makefile
	pixz/patches/patch-pixz.h
	pixz/patches/patch-read.c
	pixz/patches/patch-write.c

Log Message:
pixz: Update to 1.0.7

* Convert to use released tarball from GitHub.
* Fix build.
* Update DESCR.
* Take MAINTAINERship.

Changelog:
1.7.0
    Allow building without manpage
    Allow building against musl
    Fix memory corruption error
    Fix decompressing large files on 32-bit systems
    Avoid unaligned memory access
    Fix warnings with recent compilers
    Use optimized endian swapping functions on macOS

1.0.6
    fixes large file support for listing

1.0.5
    add htole64 and le64toh on glibc < 2.9

1.0.4
    Include man page in release tarball, fixed #50

1.0.3
    complete autotools build, see README.md for build instructions, see #37
    large-file support for 32-bit systems, see #26
    creates output file with permissions of input file (if possible, i.e. not reading from stdin), see #15
    better error messages on incorrect input path
    list main differences between pixz and xz in README
    fix issue with extreme (-e) command line option parsing, see #12
    adds keep input (-k) command line option, see #14

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b864ca5c7a034025b5988e1ea6bbbe19e0517379

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 pixz/DESCR                  |   6 ++
 pixz/Makefile               |  23 +++---
 pixz/distinfo               |  12 ++--
 pixz/patches/patch-Makefile |  15 ----
 pixz/patches/patch-pixz.h   |  24 -------
 pixz/patches/patch-read.c   | 166 --------------------------------------------
 pixz/patches/patch-write.c  |  24 -------
 7 files changed, 22 insertions(+), 248 deletions(-)

diffs:
diff --git a/pixz/DESCR b/pixz/DESCR
index 9949fa26a2..83ad9d9994 100644
--- a/pixz/DESCR
+++ b/pixz/DESCR
@@ -1 +1,7 @@
 Pixz (pronounced 'pixie') is a parallel, indexing version of XZ.
+
+The existing XZ Utils provide great compression in the .xz file
+format, but they produce just one big block of compressed data.
+Pixz instead produces a collection of smaller blocks which makes
+random access to the original data possible. This is especially
+useful for large tarballs.
diff --git a/pixz/Makefile b/pixz/Makefile
index 99c7f789fd..4dfa328bfa 100644
--- a/pixz/Makefile
+++ b/pixz/Makefile
@@ -1,27 +1,28 @@
 # $NetBSD: Makefile,v 1.1 2015/06/20 19:27:51 ishit Exp $
 #
 
-DISTNAME=	pixz-1.0.2
+GITHUB_PROJECT=	pixz
+GITHUB_RELEASE=	v${PKGVERSION_NOREV}
+DISTNAME=	pixz-1.0.7
 CATEGORIES=	archivers
-MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=pixz/}
-EXTRACT_SUFX=	.tgz
+MASTER_SITES=	${MASTER_SITE_GITHUB:=vasi/}
 
-MAINTAINER=	ishit%users.sourceforge.net@localhost
+MAINTAINER=	ryoon%NetBSD.org@localhost
 HOMEPAGE=	https://github.com/vasi/pixz
 COMMENT=	Parallel, indexed xz compressor
 LICENSE=	2-clause-bsd
 
-USE_TOOLS+=	gmake
+GNU_CONFIGURE=	yes
+USE_TOOLS+=	pkg-config
 
-DEPENDS+=	xz>=5:../../archivers/xz
-BUILDLINK_API_DEPENDS.libarchive+=	libarchive>=2.8
+INSTALLATION_DIRS=	${PKGMANDIR}/man1
 
-INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1
+post-install:
+	${INSTALL_MAN} ${WRKSRC}/src/pixz.1 \
+		${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
 
-do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/pixz ${DESTDIR}${PREFIX}/bin
-	${INSTALL_MAN} ${WRKSRC}/pixz.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
 
 .include "../../archivers/libarchive/buildlink3.mk"
+.include "../../archivers/xz/buildlink3.mk"
 .include "../../mk/pthread.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/pixz/distinfo b/pixz/distinfo
index 2874416380..9be30981d8 100644
--- a/pixz/distinfo
+++ b/pixz/distinfo
@@ -1,10 +1,6 @@
 $NetBSD: distinfo,v 1.1 2015/06/20 19:27:51 ishit Exp $
 
-SHA1 (pixz-1.0.2.tgz) = 953b2b55504ba349f1e7e47bdfcd4165ba206827
-RMD160 (pixz-1.0.2.tgz) = e9aa82f0f72b786d5ea07e8d9bdd88f10ef30f06
-SHA512 (pixz-1.0.2.tgz) = ea3f37b725a0f08e87a6bc0af19522e92bb5b34fad49cfbfcc04e7054f4537cb09c8f3b56abda7f6d27ce64535b158a676a9e69f92141190840bd9ba255961f3
-Size (pixz-1.0.2.tgz) = 21425 bytes
-SHA1 (patch-Makefile) = 6361f414405719995b99f012855a789140d0941d
-SHA1 (patch-pixz.h) = 80f0c8e1b316249e94fd0716bb544d025001dceb
-SHA1 (patch-read.c) = 229209e6e83ba2bcc61117fd61359e500caaf474
-SHA1 (patch-write.c) = f6ded6d55e07e8de069e16789a7a177eb93d355b
+SHA1 (pixz-1.0.7.tar.gz) = 24c528c83444ae414249ff75c90c4517a1abd39c
+RMD160 (pixz-1.0.7.tar.gz) = 1825b9cc5ecd27dc328260a63099ac0809f9b9d9
+SHA512 (pixz-1.0.7.tar.gz) = 4811da538931620bf05499912c98a501c2c879f3086cd59c4c67b302ded3547a9d246e7fd01ad36512e361c6c4e206e23f2aaf028b25ad44b74b529547a7f5ab
+Size (pixz-1.0.7.tar.gz) = 165004 bytes
diff --git a/pixz/patches/patch-Makefile b/pixz/patches/patch-Makefile
deleted file mode 100644
index f0926b1a58..0000000000
--- a/pixz/patches/patch-Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-Makefile,v 1.1 2015/06/20 19:27:52 ishit Exp $
-
-fix complie error.
-
---- Makefile.orig	2013-01-09 04:25:03.000000000 +0000
-+++ Makefile
-@@ -12,7 +12,7 @@ MYCFLAGS = $(patsubst %,-I%/include,$(LI
- MYLDFLAGS = $(patsubst %,-L%/lib,$(LIBPREFIX)) $(OPT) -Wall
- 
- THREADS = -lpthread
--LIBADD = $(THREADS) -llzma -larchive
-+LIBADD = $(THREADS) -llzma -larchive -lm
- 
- CC = gcc
- COMPILE = $(CC) $(MYCFLAGS) $(CFLAGS) -c -o
diff --git a/pixz/patches/patch-pixz.h b/pixz/patches/patch-pixz.h
deleted file mode 100644
index 243209d18d..0000000000
--- a/pixz/patches/patch-pixz.h
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-pixz.h,v 1.1 2015/06/20 19:27:52 ishit Exp $
-
-fix "warning: 'archive_read_support_compression_none' is deprecated" from github.
-
---- pixz.h.orig	2013-01-09 04:25:03.000000000 +0000
-+++ pixz.h
-@@ -30,6 +30,17 @@
- #endif
- 
- 
-+#pragma mark LIBARCHIVE CHANGES
-+
-+#include <archive.h>
-+#if ARCHIVE_VERSION_NUMBER >= 3000000
-+	#define prevent_compression(a) archive_read_support_filter_none(a)
-+	#define finish_reading(a) archive_read_free(a)
-+#else
-+	#define prevent_compression(a) archive_read_support_compression_none(a)
-+	#define finish_reading(a) archive_read_finish(a)
-+#endif
-+
- #pragma mark OPERATIONS
- 
- void pixz_list(bool tar);
diff --git a/pixz/patches/patch-read.c b/pixz/patches/patch-read.c
deleted file mode 100644
index 48b6884509..0000000000
--- a/pixz/patches/patch-read.c
+++ /dev/null
@@ -1,166 +0,0 @@
-$NetBSD: patch-read.c,v 1.1 2015/06/20 19:27:52 ishit Exp $
-
-fix "warning: 'archive_read_support_compression_none' is deprecated" from github.
-
---- read.c.orig	2013-01-09 04:25:03.000000000 +0000
-+++ read.c
-@@ -77,8 +77,8 @@ static void rbuf_consume(size_t bytes);
- static void rbuf_dispatch(void);
- 
- static bool read_header(lzma_check *check);
--static bool read_block(bool force_stream, lzma_check check);
--static void read_streaming(lzma_block *block);
-+static bool read_block(bool force_stream, lzma_check check, off_t uoffset);
-+static void read_streaming(lzma_block *block, block_type sized, off_t uoffset);
- static void read_index(void);
- static void read_footer(void);
- 
-@@ -115,7 +115,7 @@ void pixz_read(bool verify, size_t nspec
-         off_t lastoff = 0;
-         
-         struct archive *ar = archive_read_new();
--        archive_read_support_compression_none(ar);
-+        prevent_compression(ar);
-         archive_read_support_format_tar(ar);
-         archive_read_open(ar, NULL, tar_ok, tar_read, tar_ok);
-         struct archive_entry *entry;
-@@ -150,7 +150,7 @@ void pixz_read(bool verify, size_t nspec
-             wlast = w;
-             w = w->next;
-         }
--		archive_read_finish(ar);
-+		finish_reading(ar);
-         if (w && w->name)
-             die("File %s missing in archive", w->name);
-         tar_write_last(); // write whatever's left
-@@ -178,11 +178,13 @@ void pixz_read(bool verify, size_t nspec
- 				tar = taste_tar(ib);
- 				start = false;
- 			}
--			if (ib->btype != BLOCK_SIZED)
-+			if (ib->btype == BLOCK_UNSIZED)
- 				all_sized = false;
- 			
--			if (!skipping)
--				fwrite(ib->output, ib->outsize, 1, gOutFile);
-+			if (!skipping) {
-+				if (fwrite(ib->output, ib->outsize, 1, gOutFile) != 1)
-+					die("Can't write block");
-+			}
-             queue_push(gPipelineStartQ, PIPELINE_ITEM, pi);
-         }
-     }
-@@ -361,7 +363,7 @@ static bool read_header(lzma_check *chec
- 	return true;
- }
- 
--static bool read_block(bool force_stream, lzma_check check) {
-+static bool read_block(bool force_stream, lzma_check check, off_t uoffset) {
-     lzma_filter filters[LZMA_FILTERS_MAX + 1];
-     lzma_block block = { .filters = filters, .check = check, .version = 0 };
- 	
-@@ -379,10 +381,9 @@ static bool read_block(bool force_stream
- 		die("Error decoding block header");
- 		
- 	size_t comp = block.compressed_size, outsize = block.uncompressed_size;
--	if (force_stream || comp == LZMA_VLI_UNKNOWN
--			|| outsize == LZMA_VLI_UNKNOWN
--			|| outsize > MAXSPLITSIZE) {
--		read_streaming(&block);
-+	bool sized = (comp != LZMA_VLI_UNKNOWN && outsize != LZMA_VLI_UNKNOWN);
-+    if (force_stream || !sized || outsize > MAXSPLITSIZE) {
-+		read_streaming(&block, sized ? BLOCK_SIZED : BLOCK_UNSIZED, uoffset);
- 	} else {
- 		block_capacity(gRbuf, 0, outsize);
- 		gRbuf->outsize = outsize;
-@@ -396,7 +397,7 @@ static bool read_block(bool force_stream
- 	return true;
- }
- 
--static void read_streaming(lzma_block *block) {
-+static void read_streaming(lzma_block *block, block_type sized, off_t uoffset) {
-     lzma_stream stream = LZMA_STREAM_INIT;
-     if (lzma_block_decoder(&stream, block) != LZMA_OK)
- 		die("Error initializing streaming block decode");
-@@ -415,12 +416,14 @@ static void read_streaming(lzma_block *b
- 		if (stream.avail_out == 0) {
- 			if (ib) {
- 				ib->outsize = ib->outcap;
-+                ib->uoffset = uoffset;
-+                uoffset += ib->outsize;
- 				pipeline_dispatch(pi, gPipelineMergeQ);
- 				first = false;
- 			}
- 			queue_pop(gPipelineStartQ, (void**)&pi);
- 			ib = (io_block_t*)pi->data;
--			ib->btype = (first ? BLOCK_UNSIZED : BLOCK_CONTINUATION);
-+			ib->btype = (first ? sized : BLOCK_CONTINUATION);
- 			block_capacity(ib, 0, STREAMSIZE);
- 			stream.next_out = ib->output;
- 			stream.avail_out = ib->outcap;
-@@ -484,7 +487,7 @@ static void read_thread_noindex(void) {
- 	lzma_check check = LZMA_CHECK_NONE;
- 	while (read_header(&check)) {
- 		empty = false;
--		while (read_block(false, check))
-+		while (read_block(false, check, 0))
- 			; // pass
- 		read_index();
- 		read_footer();
-@@ -519,13 +522,6 @@ static void read_thread(void) {
-         }
-         debug("read: want %llu", iter.block.number_in_file);
-         
--        // Get a block to work with
--        pipeline_item_t *pi;
--        queue_pop(gPipelineStartQ, (void**)&pi);
--        io_block_t *ib = (io_block_t*)(pi->data);
--		block_capacity(ib, iter.block.unpadded_size,
--			iter.block.uncompressed_size);
--        
-         // Seek if needed, and get the data
-         if (offset != boffset) {
-             fseeko(gInFile, boffset, SEEK_SET);
-@@ -535,8 +531,16 @@ static void read_thread(void) {
- 		if (iter.block.uncompressed_size > MAXSPLITSIZE) { // must stream
- 			if (gRbuf)
- 				rbuf_consume(gRbuf->insize); // clear
--			read_block(true, iter.stream.flags->check);
-+			read_block(true, iter.stream.flags->check,
-+                iter.block.uncompressed_file_offset);
- 		} else {
-+            // Get a block to work with
-+            pipeline_item_t *pi;
-+            queue_pop(gPipelineStartQ, (void**)&pi);
-+            io_block_t *ib = (io_block_t*)(pi->data);
-+            block_capacity(ib, iter.block.unpadded_size,
-+                iter.block.uncompressed_size);
-+            
- 	        ib->insize = fread(ib->input, 1, bsize, gInFile);
- 	        if (ib->insize < bsize)
- 	            die("Error reading block contents");
-@@ -616,7 +620,8 @@ static bool tar_next_block(void) {
- static void tar_write_last(void) {
-     if (gArItem) {
-         io_block_t *ib = (io_block_t*)(gArItem->data);
--        fwrite(ib->output + gArLastOffset, gArLastSize, 1, gOutFile);
-+        if (fwrite(ib->output + gArLastOffset, gArLastSize, 1, gOutFile) != 1)
-+			die("Can't write previous block");
-         gArLastSize = 0;
-     }
- }
-@@ -664,12 +669,12 @@ static ssize_t tar_read(struct archive *
- 
- static bool taste_tar(io_block_t *ib) {
-     struct archive *ar = archive_read_new();
--    archive_read_support_compression_none(ar);
-+    prevent_compression(ar);
-     archive_read_support_format_tar(ar);
-     archive_read_open_memory(ar, ib->output, ib->outsize);
-     struct archive_entry *entry;
-     bool ok = (archive_read_next_header(ar, &entry) == ARCHIVE_OK);
--	archive_read_finish(ar);
-+	finish_reading(ar);
- 	return ok;
- }
- 
diff --git a/pixz/patches/patch-write.c b/pixz/patches/patch-write.c
deleted file mode 100644
index 400944d511..0000000000
--- a/pixz/patches/patch-write.c
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-write.c,v 1.1 2015/06/20 19:27:52 ishit Exp $
-
-fix "warning: 'archive_read_support_compression_none' is deprecated" from github.
-
---- write.c.orig	2013-01-09 04:25:03.000000000 +0000
-+++ write.c
-@@ -135,7 +135,7 @@ static void read_thread() {
-     
-     if (gTar) {
- 		struct archive *ar = archive_read_new();
--	    archive_read_support_compression_none(ar);
-+	    prevent_compression(ar);
- 	    archive_read_support_format_tar(ar);
- 	    archive_read_support_format_raw(ar);
- 	    archive_read_open(ar, NULL, tar_ok, tar_read, tar_ok);
-@@ -159,7 +159,7 @@ static void read_thread() {
- 	    }
- 		if (archive_read_header_position(ar) == 0)
- 			gTar = false; // probably spuriously identified as tar
--    	archive_read_finish(ar);
-+    	finish_reading(ar);
- 	}
- 	if (!feof(gInFile)) {
- 		const void *dummy;


Home | Main Index | Thread Index | Old Index