summaryrefslogtreecommitdiff
path: root/app-arch/pigz
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-08 00:14:55 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-08 00:14:55 +0000
commite3a48e635527f3e2d2254e9631f7a5758df9c3fb (patch)
tree7efda32bb4a58c3099db3e763ccaf7cc08e75a50 /app-arch/pigz
parent7a027cd18c60d9abad83a60c98ccf27db26be067 (diff)
gentoo auto-resync : 08:01:2023 - 00:14:55
Diffstat (limited to 'app-arch/pigz')
-rw-r--r--app-arch/pigz/Manifest2
-rw-r--r--app-arch/pigz/files/pigz-2.7-memcpy-ub.patch26
-rw-r--r--app-arch/pigz/pigz-2.7-r1.ebuild38
3 files changed, 66 insertions, 0 deletions
diff --git a/app-arch/pigz/Manifest b/app-arch/pigz/Manifest
index 680304a9622f..b443227ffb8a 100644
--- a/app-arch/pigz/Manifest
+++ b/app-arch/pigz/Manifest
@@ -1,3 +1,5 @@
+AUX pigz-2.7-memcpy-ub.patch 863 BLAKE2B 33cb4879445cb296031b7579a358a8188e7d856506911c0a02cdc93b542feda0e617b53b566b005ed544ef2c4b14bf347a3bacd3822af61fa281a9e3ca369cc3 SHA512 4edb365718e6649264388e6f60be7867ae240f096f828ff3cf0ec355dcf93ca65c54453525e2103f71b8a16673d0e7908fb7f917316d3cde47113eab7eccc420
DIST pigz-2.7.tar.gz 108102 BLAKE2B d391522fd6f8eb6918d671fb1c9517034941f3ae8e05ffcd7bece141e6dae110cde1560bad02bd2bcca2f868cdba2a8a16b5606ad6637d40d5ced5ec9bfffcc8 SHA512 9f9f61de4a0307fc057dc4e31a98bd8d706d9e709ecde0be02a871534fddf6a1fe1321158aa72708603aaaece43f83d2423b127f7689b6219b23aea4f989e8f5
+EBUILD pigz-2.7-r1.ebuild 934 BLAKE2B 13222b5619d778eb78fc9a650707ad09a83238a81ee693a885b5afe5c7b59a54f220667420c03bfae12e191421481577cce50b02dbe452bdfd5cbf2d7102c06e SHA512 e2074cc806565850aa22e249bc3e192f2c7054d2f28b1847015b4c0b1c009c0e6c55226c144e87012d686390562f4544beb6ef577fa889f1d63c0a6b2bf061ef
EBUILD pigz-2.7.ebuild 877 BLAKE2B 6abf1e5602039f5ab0e2759d6f7279b8a55ba92458a30f03388aa307becbbb431a562699e035a8db3863cc5f6af029e0d66fc037ad9f4e1de17f70987ebbca15 SHA512 c91c8eb9ae2fe111ceaf44225ca54503ee039ae9056ff1a187e211f861311ec073f4a9d688af51211903c8ac43959c4b51430441267dfd1d25aeae382738babf
MISC metadata.xml 623 BLAKE2B d072cc2f7d8e182752cc3c4ae118ec674782f2e0cb08c4ca6b2d4d56a6e4621a837143bf782ae0f65af418f0a90c01f24b5603bfe7f75d0221be68f9d193d34f SHA512 3a7fdb19cf75dd27f1c7a30707ee23d8e4c300f5fa419820e7aaf9b75aa9c09add1dcc488e0241a75552cc91a45a37e8603285da7c631d1c7860a18c28929859
diff --git a/app-arch/pigz/files/pigz-2.7-memcpy-ub.patch b/app-arch/pigz/files/pigz-2.7-memcpy-ub.patch
new file mode 100644
index 000000000000..db53660748b4
--- /dev/null
+++ b/app-arch/pigz/files/pigz-2.7-memcpy-ub.patch
@@ -0,0 +1,26 @@
+https://github.com/madler/pigz/commit/e1ed230a1599a3cb64c8f5c003cced60e10e3314
+https://github.com/madler/pigz/issues/107
+
+From e1ed230a1599a3cb64c8f5c003cced60e10e3314 Mon Sep 17 00:00:00 2001
+From: Mark Adler <madler@alumni.caltech.edu>
+Date: Sat, 31 Dec 2022 21:28:26 -0800
+Subject: [PATCH] Avoid calling memcpy() with a NULL pointer.
+
+This is not permitted by the C99 standard even when the length is
+zero. Go figure.
+--- a/pigz.c
++++ b/pigz.c
+@@ -3414,8 +3414,10 @@ local int outb(void *desc, unsigned char *buf, unsigned len) {
+
+ // copy the output and alert the worker bees
+ out_len = len;
+- g.out_tot += len;
+- memcpy(out_copy, buf, len);
++ if (len) {
++ g.out_tot += len;
++ memcpy(out_copy, buf, len);
++ }
+ twist(outb_write_more, TO, 1);
+ twist(outb_check_more, TO, 1);
+
+
diff --git a/app-arch/pigz/pigz-2.7-r1.ebuild b/app-arch/pigz/pigz-2.7-r1.ebuild
new file mode 100644
index 000000000000..f0a9d1f4540f
--- /dev/null
+++ b/app-arch/pigz/pigz-2.7-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="A parallel implementation of gzip"
+HOMEPAGE="https://www.zlib.net/pigz/"
+SRC_URI="https://www.zlib.net/pigz/${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~ppc-macos ~sparc64-solaris"
+IUSE="static test"
+RESTRICT="!test? ( test )"
+
+LIB_DEPEND="sys-libs/zlib[static-libs(+)]"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ test? ( app-arch/ncompress )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-memcpy-ub.patch
+)
+
+src_compile() {
+ use static && append-ldflags -static
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}
+ dosym ${PN} /usr/bin/un${PN}
+ dodoc README
+ doman ${PN}.1
+}