summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-arch/torrentzip')
-rw-r--r--app-arch/torrentzip/Manifest2
-rw-r--r--app-arch/torrentzip/files/torrentzip-1.2-checksum-detection.patch51
-rw-r--r--app-arch/torrentzip/metadata.xml17
-rw-r--r--app-arch/torrentzip/torrentzip-1.2-r1.ebuild28
-rw-r--r--app-arch/torrentzip/torrentzip-1.3.ebuild48
5 files changed, 139 insertions, 7 deletions
diff --git a/app-arch/torrentzip/Manifest b/app-arch/torrentzip/Manifest
index e33a18a286e3..08aa339c1310 100644
--- a/app-arch/torrentzip/Manifest
+++ b/app-arch/torrentzip/Manifest
@@ -1 +1,3 @@
DIST torrentzip-0.9.tar.gz 59007 BLAKE2B eb5d7d8d9026115367afd88ef0cf33d2eed600e6eaa773f039a713c76a48a39e12cb5a8ac6faf2937d3563c9270029543bdb6361d2f22a39e2341953872f589c SHA512 691cd25f501de3de16b5b15b2afadfc34b833c3e93208c2c3497674936580ad2c3532a02e02531b89974302eee7b36f7579a412718914b1b38044b78a39a4d4d
+DIST trrntzip-1.2.tar.gz 62707 BLAKE2B 289ddfe89b91c63b1a6902ea7a4055fa8e235e712d6ea911da2848cc8db15cbdf712967b9fcc1414513c1a18eef160108f5f7b03aefd8f8f18c4d04907a16c17 SHA512 90c853efde1d077c741206362bc14fe779627f1b20571246e99ed29980840e78c0377110431c59c35596a0d209e612f6fe77b385707eb4bdb1ea47bb797c9272
+DIST trrntzip-1.3.tar.gz 67297 BLAKE2B c77fd134cfd3ab30f46b66f4b3dd36b899ee6267b17100b1ad15bdf5c6beddaea94fe22d23f1a81de85522768d76401f0192d0deac2ff75edc816510c8069e2c SHA512 c21ed6ac4dacd652e2a67b700741d70dd9da699259bd299ca177c741111f92e70eef0b3ad2ced54b5635780cab2b4c46b3f9c258dfa18bdde24e2718c38339be
diff --git a/app-arch/torrentzip/files/torrentzip-1.2-checksum-detection.patch b/app-arch/torrentzip/files/torrentzip-1.2-checksum-detection.patch
new file mode 100644
index 000000000000..ac1ae14cbe03
--- /dev/null
+++ b/app-arch/torrentzip/files/torrentzip-1.2-checksum-detection.patch
@@ -0,0 +1,51 @@
+From 016915e16f32105590a6dc11a4adc988b2f8d9a9 Mon Sep 17 00:00:00 2001
+From: Alexander Miller <alex.miller@gmx.de>
+Date: Mon, 4 Mar 2024 19:26:21 +0100
+Subject: [PATCH] Fix broken detection of missing or wrong TORRENTZIPPED-...
+ comment
+
+The commit listed below introduces a regression where in MigrateZip(),
+variable rc would be clobbered when its value is still needed. That
+completely breaks handling of zips that should be re-zipped because
+of missing or out of date TORRENTZIPPED-... comment.
+
+Rewrite the offending code such that it no longer touches the variable.
+
+Fixes: cf11c900079e ("Check for more errors while reading zip entries")
+---
+ src/trrntzip.c | 20 ++++++++++++--------
+ 1 file changed, 12 insertions(+), 8 deletions(-)
+
+diff --git a/src/trrntzip.c b/src/trrntzip.c
+index e55d217..49f796e 100644
+--- a/src/trrntzip.c
++++ b/src/trrntzip.c
+@@ -379,16 +379,20 @@ int MigrateZip(const char *zip_path, const char *pDir, WORKSPACE *ws,
+
+ CHECK_DYNAMIC_STRING_ARRAY(ws->FileNameArray, ws->iElements);
+ // Get the filelist from the zip file in original order in ws->FileNameArray
+- rc = GetFileList(UnZipHandle, ws);
+- if (rc != TZ_OK) {
++ switch (GetFileList(UnZipHandle, ws)) {
++ case TZ_OK:
++ break;
++ case TZ_CRITICAL:
+ logprint3(stderr, mig->fProcessLog, ErrorLog(ws),
+- rc == TZ_CRITICAL
+- ? "Error allocating memory!\n"
+- : "Could not list contents of \"%s\". File is corrupted or "
+- "contains entries with bad names.\n",
+- szZipFileName);
++ "Error allocating memory!\n");
++ unzClose(UnZipHandle);
++ return TZ_CRITICAL;
++ default:
++ logprint3(stderr, mig->fProcessLog, ErrorLog(ws),
++ "Could not list contents of \"%s\". File is corrupted or "
++ "contains entries with bad names.\n", szZipFileName);
+ unzClose(UnZipHandle);
+- return rc;
++ return TZ_ERR;
+ }
+ CHECK_DYNAMIC_STRING_ARRAY(ws->FileNameArray, ws->iElements);
+
diff --git a/app-arch/torrentzip/metadata.xml b/app-arch/torrentzip/metadata.xml
index 8c0252f5120a..7f1fee17f0f1 100644
--- a/app-arch/torrentzip/metadata.xml
+++ b/app-arch/torrentzip/metadata.xml
@@ -1,22 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
+ <maintainer type="person" proxied="yes">
<email>alex.miller@gmx.de</email>
<name>Alexander Miller</name>
</maintainer>
- <maintainer type="project">
+ <maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
<longdescription>
- TorrentZip is a replacement for MameZip. The goal of the program is to
- use standard values when creating zips to create identical files over
- multiple systems. It has the ability to create a torrentzip format
- from a zip file.
+ Torrentzip converts zip archives to a standard format with some
+ pre-defined values, sorting the files, and using particular
+ compression settings so that running it on zip archives created
+ by other tools will always result in the same output. This helps
+ e.g. with sharing zip archives using BitTorrent (which is where
+ the name comes from).
</longdescription>
<upstream>
+ <remote-id type="github">0-wiz-0/trrntzip</remote-id>
<remote-id type="sourceforge">trrntzip</remote-id>
</upstream>
</pkgmetadata>
diff --git a/app-arch/torrentzip/torrentzip-1.2-r1.ebuild b/app-arch/torrentzip/torrentzip-1.2-r1.ebuild
new file mode 100644
index 000000000000..d526e0b88c10
--- /dev/null
+++ b/app-arch/torrentzip/torrentzip-1.2-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+MY_P="trrntzip-${PV}"
+DESCRIPTION="Create identical zip archives over multiple systems"
+HOMEPAGE="https://github.com/0-wiz-0/trrntzip"
+SRC_URI="https://github.com/0-wiz-0/trrntzip/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-2+ ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ sys-libs/zlib:=
+"
+DEPEND="
+ ${RDEPEND}
+"
+
+DOCS=(AUTHORS NEWS.md README.md)
+PATCHES=(
+ "${FILESDIR}/${P}-checksum-detection.patch"
+)
diff --git a/app-arch/torrentzip/torrentzip-1.3.ebuild b/app-arch/torrentzip/torrentzip-1.3.ebuild
new file mode 100644
index 000000000000..7a3ce63d28a3
--- /dev/null
+++ b/app-arch/torrentzip/torrentzip-1.3.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake python-any-r1
+
+MY_P="trrntzip-${PV}"
+DESCRIPTION="Create identical zip archives over multiple systems"
+HOMEPAGE="https://github.com/0-wiz-0/trrntzip"
+SRC_URI="https://github.com/0-wiz-0/trrntzip/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-2+ ZLIB"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ sys-libs/zlib:=
+"
+DEPEND="
+ ${RDEPEND}
+"
+BDEPEND="
+ test? (
+ ${RDEPEND}
+ ${PYTHON_DEPS}
+ >=dev-util/nihtest-1.5.0
+ )
+"
+
+DOCS=(AUTHORS NEWS.md README.md)
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_configure() {
+ if use test; then
+ local mycmakeargs=( -DPYTHONBIN="${EPYTHON}" )
+ else
+ local mycmakeargs=( -DRUN_REGRESS=NO )
+ fi
+ cmake_src_configure
+}