public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-arch/patool/, app-arch/patool/files/
@ 2025-02-10  3:11 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2025-02-10  3:11 UTC (permalink / raw
  To: gentoo-commits

commit:     49035070d1fd900695d8b0407e94cd9075aa6e75
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Sun Jan 19 17:33:16 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 10 03:10:44 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49035070

app-arch/patool: add 3.1.0

Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-arch/patool/Manifest                           |   1 +
 .../files/patool-3.1.0-fix-file-5.46-compat.patch  | 189 +++++++++++++++++++++
 app-arch/patool/patool-3.1.0.ebuild                | 132 ++++++++++++++
 3 files changed, 322 insertions(+)

diff --git a/app-arch/patool/Manifest b/app-arch/patool/Manifest
index 1385f5e8b188..1bf1c6345a14 100644
--- a/app-arch/patool/Manifest
+++ b/app-arch/patool/Manifest
@@ -1,2 +1,3 @@
 DIST patool-2.4.0.tar.gz 1996705 BLAKE2B b84fd4c469741de76ceeee90974cec71ba5bc123d31f6a1dd60cf3c336dcfd7da1def7fec2bbec27ce181d97c5dff96f15c1d4714b722718a1439749f7cee077 SHA512 bf6d680613fb996b3c0b12075a85acec1edd468b8cb58cafd233b31847a2b9c490d21c6d906e737218ca68f08d1cdce4a18a3e57e353a970be58da4e2ff0d794
 DIST patool-3.0.3.tar.gz 2003565 BLAKE2B 988b918f52c5f050c78fdd16351d95c2c23351e8e5e92c884e3ab32f9d0cfc33140db96ce309bb3e465c1a51fbade0c530cbfef3f222dcf89f26d4d35d67bf88 SHA512 c81d13f0183432ba4f3b98951b4f5716a95396eec063b09435c0e3cdf88734107e8a8b647ff6ffe84ea808cc12882b823f95b4edf871874913ca127597fe7348
+DIST patool-3.1.0.tar.gz 2006989 BLAKE2B b264c125e7454d677084a17b7e27daab437057750bce7646b451cd3e33b718e8c720ac64a1c05c8b55b4918ca89455698e7829ce5bd1fe0f951c8e2300fe3d73 SHA512 75912a5545f52226e07fe1f34b3c8c9af48e1b2f21da96380e41c0c397cf79a774d041f1d29b643d645f6d5213f0e66b07a26018e1286f7b2760c7bd8a1f6ec9

diff --git a/app-arch/patool/files/patool-3.1.0-fix-file-5.46-compat.patch b/app-arch/patool/files/patool-3.1.0-fix-file-5.46-compat.patch
new file mode 100644
index 000000000000..6d9aeec17639
--- /dev/null
+++ b/app-arch/patool/files/patool-3.1.0-fix-file-5.46-compat.patch
@@ -0,0 +1,189 @@
+https://github.com/wummel/patool/pull/173
+
+Used the above PR but removed changes that aren't 100% required.
+
+From d10324eac4429ff3d7d38ad24a19210699229e07 Mon Sep 17 00:00:00 2001
+From: Alfred Wingate <parona@protonmail.com>
+Date: Wed, 11 Dec 2024 06:34:36 +0200
+Subject: [PATCH 1/4] Use application/gzip as the preferred mimetype for gzip
+
+Signed-off-by: Alfred Wingate <parona@protonmail.com>
+--- a/patoolib/__init__.py
++++ b/patoolib/__init__.py
+@@ -127,7 +127,6 @@
+     'application/x-cpio': 'cpio',
+     'application/x-debian-package': 'deb',
+     'application/x-dms': 'dms',
+-    'application/x-gzip': 'gzip',
+     'application/x-iso9660-image': 'iso',
+     'application/x-lz4': 'lz4',
+     'application/x-lzop': 'lzop',
+--- a/patoolib/mime.py
++++ b/patoolib/mime.py
+@@ -135,9 +135,11 @@ def guess_mime(filename: str) -> tuple[str | None, str | None]:
+ Mime2Encoding: dict[str, str] = dict(
+     [(_val, _key) for _key, _val in Encoding2Mime.items()]
+ )
+-# libmagic before version 5.14 identified .gz files as application/x-gzip
+-Mime2Encoding['application/x-gzip'] = 'gzip'
+ 
++LegacyMimeType: dict[str, str] = {
++    # libmagic before version 5.14 identified .gz files as application/x-gzip
++    'application/x-gzip': "application/gzip",
++}
+ 
+ def guess_mime_mimedb(filename: str) -> tuple[str | None, str | None]:
+     """Guess MIME type from given filename.
+@@ -192,6 +194,10 @@ def guess_mime_file(filename: str) -> tuple[str | None, str | None]:
+         except (OSError, subprocess.CalledProcessError) as err:
+             log_warning(f"error executing {cmd}: {err}")
+             mime2 = None
++
++        if mime2 in LegacyMimeType:
++            mime2 = LegacyMimeType[mime2]
++
+         # Some file(1) implementations return an empty or unknown mime type
+         # when the uncompressor program is not installed, other
+         # implementation return the original file type.
+@@ -227,6 +233,10 @@ def guess_mime_file_mime(
+     except OSError as err:
+         # ignore errors, as file(1) is only a fallback
+         log_warning(f"error executing {cmd}: {err}")
++
++    if mime in LegacyMimeType:
++        mime = LegacyMimeType[mime]
++
+     if mime not in ArchiveMimetypes:
+         mime, encoding = None, None
+     return mime, encoding
+@@ -253,7 +263,7 @@ def get_file_mime_encoding(parts: Sequence[str]) -> str | None:
+     "cpio archive": "application/x-cpio",
+     "ASCII cpio archive": "application/x-cpio",
+     "Debian binary package": "application/x-debian-package",
+-    "gzip compressed data": "application/x-gzip",
++    "gzip compressed data": "application/gzip",
+     "LZMA compressed data": "application/x-lzma",
+     "LRZIP compressed data": "application/x-lrzip",
+     "lzop compressed data": "application/x-lzop",
+--- a/tests/test_mime.py
++++ b/tests/test_mime.py
+@@ -81,8 +81,8 @@ def test_mime_file(self):
+         self.mime_test_file("t.cpio.foo", "application/x-cpio")
+         self.mime_test_file("t.deb", "application/x-debian-package")
+         self.mime_test_file("t.deb.foo", "application/x-debian-package")
+-        self.mime_test_file("t.txt.gz", ("application/gzip", "application/x-gzip"))
+-        self.mime_test_file("t.txt.gz.foo", ("application/gzip", "application/x-gzip"))
++        self.mime_test_file("t.txt.gz", "application/gzip")
++        self.mime_test_file("t.txt.gz.foo", "application/gzip")
+         self.mime_test_file("t.jar", "application/zip")
+         self.mime_test_file("t.jar.foo", "application/zip")
+         self.mime_test_file("t.txt.lzma", "application/x-lzma")
+
+From e7501d1c7805696ff5b2ecc779f7a56ab2425c3f Mon Sep 17 00:00:00 2001
+From: Alfred Wingate <parona@protonmail.com>
+Date: Wed, 11 Dec 2024 06:37:54 +0200
+Subject: [PATCH 2/4] Change rar mime type to application/vnd.rar
+
+https://github.com/file/file/commit/d46a1f3dbbf58eb510c1779b8bdcc59d5ee24ab9
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1068700
+
+Signed-off-by: Alfred Wingate <parona@protonmail.com>
+--- a/patoolib/__init__.py
++++ b/patoolib/__init__.py
+@@ -136,7 +136,6 @@
+     'application/x-lrzip': 'lrzip',
+     'application/x-lzh': 'lzh',
+     'application/x-ms-wim': 'wim',
+-    'application/x-rar': 'rar',
+     'application/x-redhat-package-manager': 'rpm',
+     'application/x-rpm': 'rpm',
+     'application/x-rzip': 'rzip',
+@@ -147,6 +146,7 @@
+     'application/x-xz': 'xz',
+     'application/x-zip-compressed': 'zip',
+     'application/x-zoo': 'zoo',
++    'application/vnd.rar': 'rar',
+     'application/zip': 'zip',
+     'application/zpaq': 'zpaq',
+     "application/zstd": "zstd",
+--- a/patoolib/mime.py
++++ b/patoolib/mime.py
+@@ -54,8 +54,8 @@ def add_mimedb_data(mimedb: mimetypes.MimeTypes) -> None:
+     add_mimetype(mimedb, 'application/x-lzma', '.lzma')
+     add_mimetype(mimedb, 'application/x-xz', '.xz')
+     add_mimetype(mimedb, 'application/java-archive', '.jar')
+-    add_mimetype(mimedb, 'application/x-rar', '.rar')
+-    add_mimetype(mimedb, 'application/x-rar', '.cbr')
++    add_mimetype(mimedb, 'application/vnd.rar', '.rar')
++    add_mimetype(mimedb, 'application/vnd.rar', '.cbr')
+     add_mimetype(mimedb, 'application/x-7z-compressed', '.7z')
+     add_mimetype(mimedb, 'application/x-7z-compressed', '.cb7')
+     add_mimetype(mimedb, 'application/x-cab', '.cab')
+@@ -139,8 +139,11 @@ def guess_mime(filename: str) -> tuple[str | None, str | None]:
+ LegacyMimeType: dict[str, str] = {
+     # libmagic before version 5.14 identified .gz files as application/x-gzip
+     'application/x-gzip': "application/gzip",
++    # libmagic before version 5.46 identified .rar files as application/x-rar
++    'application/x-rar': "application/vnd.rar",
+ }
+ 
++
+ def guess_mime_mimedb(filename: str) -> tuple[str | None, str | None]:
+     """Guess MIME type from given filename.
+     @return: tuple (mime, encoding)
+@@ -268,7 +271,7 @@ def get_file_mime_encoding(parts: Sequence[str]) -> str | None:
+     "LRZIP compressed data": "application/x-lrzip",
+     "lzop compressed data": "application/x-lzop",
+     "Microsoft Cabinet archive data": "application/vnd.ms-cab-compressed",
+-    "RAR archive data": "application/x-rar",
++    "RAR archive data": "application/vnd.rar",
+     "RPM ": "application/x-redhat-package-manager",
+     "POSIX tar archive": "application/x-tar",
+     "xz compressed data": "application/x-xz",
+--- a/tests/test_mime.py
++++ b/tests/test_mime.py
+@@ -91,10 +91,10 @@ def test_mime_file(self):
+         self.mime_test_file("t.txt.lz.foo", "application/x-lzip")
+         self.mime_test_file("t.txt.lzo", "application/x-lzop")
+         self.mime_test_file("t.txt.lzo.foo", "application/x-lzop")
+-        self.mime_test_file("t.rar", "application/x-rar")
+-        self.mime_test_file("t.rar.foo", "application/x-rar")
+-        self.mime_test_file("t.cbr", "application/x-rar")
+-        self.mime_test_file("t.cbr.foo", "application/x-rar")
++        self.mime_test_file("t.rar", "application/vnd.rar")
++        self.mime_test_file("t.rar.foo", "application/vnd.rar")
++        self.mime_test_file("t.cbr", "application/vnd.rar")
++        self.mime_test_file("t.cbr.foo", "application/vnd.rar")
+         self.mime_test_file("t.rpm", "application/x-rpm")
+         self.mime_test_file("t.rpm.foo", "application/x-rpm")
+         self.mime_test_file("t.tar", "application/x-tar")
+@@ -197,8 +197,8 @@ def test_nested_gzip(self):
+         """Test mime detection of archives with double compression"""
+         # We won't extract this with rar, as it doesn't support archives wrapped in gzip
+         # compression, but we will recognize the archive as a gzip-wrapped rar-file
+-        self.mime_test_file("t.rar.gz", "application/x-rar", "gzip")
+-        self.mime_test_file("t.rar.gz.foo", "application/x-rar", "gzip")
++        self.mime_test_file("t.rar.gz", "application/vnd.rar", "gzip")
++        self.mime_test_file("t.rar.gz.foo", "application/vnd.rar", "gzip")
+ 
+     @needs_program('file')
+     @needs_program('gzip')
+@@ -237,7 +237,7 @@ def test_mime_mimedb(self):
+         self.mime_test_mimedb("t .bz2", "application/x-bzip2")
+         self.mime_test_mimedb("t .bz3", "application/x-bzip3")
+         self.mime_test_mimedb("t.cab", "application/x-cab")
+-        self.mime_test_mimedb("t.cbr", ("application/rar", "application/x-rar"))
++        self.mime_test_mimedb("t.cbr", ("application/rar", "application/vnd.rar"))
+         self.mime_test_mimedb("t.cpio", "application/x-cpio")
+         self.mime_test_mimedb("t.deb", "application/x-debian-package")
+         self.mime_test_mimedb("t.gz", "application/gzip")
+@@ -247,7 +247,7 @@ def test_mime_mimedb(self):
+         self.mime_test_mimedb("t.txt.lz", "application/x-lzip")
+         self.mime_test_mimedb("t.txt.lz4", "application/x-lz4")
+         self.mime_test_mimedb("t.lzo", "application/x-lzop")
+-        self.mime_test_mimedb("t.rar", ("application/rar", "application/x-rar"))
++        self.mime_test_mimedb("t.rar", ("application/rar", "application/vnd.rar"))
+         self.mime_test_mimedb(
+             "t.rpm", ("application/x-redhat-package-manager", "application/x-rpm")
+         )
+

diff --git a/app-arch/patool/patool-3.1.0.ebuild b/app-arch/patool/patool-3.1.0.ebuild
new file mode 100644
index 000000000000..19470cd52d22
--- /dev/null
+++ b/app-arch/patool/patool-3.1.0.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Portable archive file manager"
+HOMEPAGE="https://wummel.github.io/patool/"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+BDEPEND="
+	test? (
+		app-arch/arj
+		app-arch/bzip2
+		app-arch/bzip3
+		app-arch/cabextract
+		app-alternatives/cpio
+		app-arch/dpkg
+		app-arch/gzip
+		app-arch/lbzip2
+		app-arch/lcab
+		app-arch/lha
+		app-arch/libarchive
+		app-arch/lz4
+		app-arch/lzip
+		app-arch/lzop
+		app-arch/ncompress
+		app-arch/p7zip[rar]
+		app-arch/pbzip2
+		app-arch/pdlzip
+		app-arch/pigz
+		app-arch/plzip
+		app-arch/rpm
+		app-arch/rzip
+		app-arch/sharutils
+		app-arch/tar
+		app-arch/unace
+		app-arch/unadf
+		app-arch/unzip
+		app-arch/xdms
+		app-arch/xz-utils
+		app-arch/zip
+		app-arch/zopfli
+		app-arch/zpaq
+		app-arch/zstd
+		app-cdr/cdrtools
+		dev-libs/chmlib
+		media-libs/flac
+		media-sound/shorten
+		sys-apps/diffutils
+		sys-apps/file
+		sys-apps/grep
+		!elibc_musl? ( app-arch/rar )
+		!x86? (
+			app-arch/clzip
+			app-arch/lrzip
+			app-arch/unar
+		)
+	)
+"
+# Test dependencies which are packaged but can't be tested for various reasons.
+# app-arch/arc
+# app-arch/zoo
+# media-sound/mac
+
+# app-arch/rar is masked on musl
+# app-arch/clzip is unkeyworded on x86
+# app-arch/lrzip bug #916317 on x86
+# app-arch/unar is unkeyworded on x86
+
+# Unpackaged testable dependencies
+# archmage
+# genisoimage
+# lhasa
+# nomarch
+# pdzip2
+# py_{bz2,echo,gzip,tarfile,zipfile}
+# rpm2cpio
+# rzip
+# star
+# unalz
+# uncompress.real
+# 7zz ( app-arch/7zip:guru )
+
+distutils_enable_tests pytest
+
+PATCHES=(
+	"${FILESDIR}"/patool-3.1.0-fix-file-5.46-compat.patch
+)
+
+src_install() {
+	distutils-r1_src_install
+
+	einstalldocs
+	doman doc/patool.1
+}
+
+python_test() {
+	local EPYTEST_IGNORE=(
+		# zoo emits a non-zero exit status on a possibly false consistency check
+		# Zoo:  WARNING:  Archive header failed consistency check.
+		"tests/archives/test_zoo.py"
+		# Doesn't accept long arguments, such as those that files in ${S} would have.
+		# Too long argument: /var/tmp/portage/app-arch/patool-1.12_p20230424/work/patool-ab64562c8cdac34dfd69fcb6e30c8c0014282d11/tests/data/p.arc.foo
+		"tests/archives/test_arc.py"
+		# Error: 1002 (invalid input file)
+		"tests/archives/test_mac.py"
+	)
+
+	if use elibc_musl; then
+		EPYTEST_IGNORE+=(
+			"tests/archives/test_rar.py"
+		)
+	fi
+
+	if use x86; then
+		EPYTEST_IGNORE+=(
+			"tests/archives/test_clzip.py"
+			# bug #916317
+			"tests/archives/test_lrzip.py::TestLrzip::test_lrzip"
+		)
+	fi
+
+	epytest
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-arch/patool/, app-arch/patool/files/
@ 2023-09-24 22:08 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2023-09-24 22:08 UTC (permalink / raw
  To: gentoo-commits

commit:     12919888891b53765d58cbe9b3aede62a4687175
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Thu Sep  7 00:23:12 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 24 22:07:28 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12919888

app-arch/patool: add 1.12_p20230424

Closes: https://bugs.gentoo.org/795528
Closes: https://bugs.gentoo.org/909864
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32661
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-arch/patool/Manifest                           |   1 +
 ...atool-1.12_p20230424-disable-file-sandbox.patch |  28 +++++
 ...p20230424-map-vnd.android.package-archive.patch |  30 +++++
 app-arch/patool/patool-1.12_p20230424.ebuild       | 126 +++++++++++++++++++++
 4 files changed, 185 insertions(+)

diff --git a/app-arch/patool/Manifest b/app-arch/patool/Manifest
index cdc0a89ce575..a4da6050d14d 100644
--- a/app-arch/patool/Manifest
+++ b/app-arch/patool/Manifest
@@ -1 +1,2 @@
 DIST patool-1.12.tar.gz 69146 BLAKE2B e97f64b4ba41860c1f7e506f63f249adeb02974b71bf83eb1673ae1fd93b8f9b698818cb57f961b3d3a5d4e445c5e7a3a349db54e1eb11a8fc165ad07722ace9 SHA512 b8c67526ce79448de703b03ca9b363c0e04cfe56bfc6168bcb96202f95022b6bbcaa92be86a85ee9608070206acd09382b0dfd08a2f805c5e8e5683c7c3f18cc
+DIST patool-1.12_p20230424.gh.tar.gz 1990425 BLAKE2B dd0ae58fd26ef1849c26cb681839536b0499d666faf48cb7028adc12840055d72e70a85db99c615c79b076671f16e1371ee5ddbb24228248cd3c1b0daf2dc496 SHA512 c2974bad22ab57aca3aab32e51aeac0c2a2aa3ffee41241d3220151206b8a5d709ec72ea1b4a73a218c03b9fad64297ecd2ab44cc20da5f4d0e4a3ecd5589d43

diff --git a/app-arch/patool/files/patool-1.12_p20230424-disable-file-sandbox.patch b/app-arch/patool/files/patool-1.12_p20230424-disable-file-sandbox.patch
new file mode 100644
index 000000000000..daf48adef41a
--- /dev/null
+++ b/app-arch/patool/files/patool-1.12_p20230424-disable-file-sandbox.patch
@@ -0,0 +1,28 @@
+https://github.com/wummel/patool/pull/131
+https://github.com/wummel/patool/issues/75
+
+From abe06b7d8fbcd177d44f8eb8e3ac195badc70d25 Mon Sep 17 00:00:00 2001
+From: Alfred Wingate <parona@protonmail.com>
+Date: Thu, 7 Sep 2023 01:12:26 +0300
+Subject: [PATCH] Disable sandbox for file(1) to allow correct output for
+ compressed tar's
+
+* Otherwise file(1) will refuse with
+  "Fork-is-required-to-uncompress--but-disabled"
+
+Closes: https://github.com/wummel/patool/issues/75
+Signed-off-by: Alfred Wingate <parona@protonmail.com>
+--- a/patoolib/util.py
++++ b/patoolib/util.py
+@@ -240,7 +240,7 @@ def guess_mime_file (filename):
+                 encoding = None
+     if mime in Mime2Encoding:
+         # try to look inside compressed archives
+-        cmd = [file_prog, "--brief", "--mime", "--uncompress", filename]
++        cmd = [file_prog, "--brief", "--mime", "--uncompress", "--no-sandbox", filename]
+         try:
+             outparts = backtick(cmd).strip().split(";")
+             mime2 = outparts[0].split(" ", 1)[0]
+-- 
+2.42.0
+

diff --git a/app-arch/patool/files/patool-1.12_p20230424-map-vnd.android.package-archive.patch b/app-arch/patool/files/patool-1.12_p20230424-map-vnd.android.package-archive.patch
new file mode 100644
index 000000000000..a525ff2d0e46
--- /dev/null
+++ b/app-arch/patool/files/patool-1.12_p20230424-map-vnd.android.package-archive.patch
@@ -0,0 +1,30 @@
+https://github.com/wummel/patool/pull/130
+
+From e8a1eea1d273b278a1b6f5029d2e21cb18bc9ffd Mon Sep 17 00:00:00 2001
+From: Theodore Ni <3806110+tjni@users.noreply.github.com>
+Date: Sat, 26 Aug 2023 23:42:15 -0700
+Subject: [PATCH] Map application/vnd.android.package-archive to zip
+
+This was added to file 5.45 in https://github.com/file/file/commit/b29519e7dc572d85f757314d3bfc7461ceb7709c
+and the test .apk file is sometimes detected with that mime type.
+--- a/patoolib/__init__.py
++++ b/patoolib/__init__.py
+@@ -84,6 +84,7 @@
+     'application/x-xz': 'xz',
+     'application/x-zip-compressed': 'zip',
+     'application/x-zoo': 'zoo',
++    'application/vnd.android.package-archive': 'zip',
+     'application/zip': 'zip',
+     'application/zpaq': 'zpaq',
+     "application/zstd": "zstd",
+--- a/tests/test_mime.py
++++ b/tests/test_mime.py
+@@ -137,7 +137,7 @@ def test_mime_file (self):
+         self.mime_test_file("t.chm.foo", "application/x-chm")
+         self.mime_test_file("t.iso", "application/x-iso9660-image")
+         self.mime_test_file("t.epub", "application/zip")
+-        self.mime_test_file("t.apk", ("application/zip", "application/java-archive", "application/jar"))
++        self.mime_test_file("t.apk", ("application/zip", "application/java-archive", "application/jar", "application/vnd.android.package-archive"))
+         self.mime_test_file("t.zpaq", "application/zpaq")
+         self.mime_test_file("t.zpaq.foo", "application/zpaq")
+ 

diff --git a/app-arch/patool/patool-1.12_p20230424.ebuild b/app-arch/patool/patool-1.12_p20230424.ebuild
new file mode 100644
index 000000000000..d18bd326dd15
--- /dev/null
+++ b/app-arch/patool/patool-1.12_p20230424.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1
+
+DESCRIPTION="Portable archive file manager"
+HOMEPAGE="https://wummel.github.io/patool/"
+COMMIT="ab64562c8cdac34dfd69fcb6e30c8c0014282d11"
+SRC_URI="https://github.com/wummel/patool/archive/${COMMIT}.tar.gz -> ${P}.gh.tar.gz"
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+BDEPEND="
+	test? (
+		app-arch/arj
+		app-arch/bzip2
+		app-arch/cabextract
+		app-arch/cpio
+		app-arch/dpkg
+		app-arch/gzip
+		app-arch/lbzip2
+		app-arch/lcab
+		app-arch/lha
+		app-arch/libarchive
+		app-arch/lrzip
+		app-arch/lzip
+		app-arch/lzop
+		app-arch/ncompress
+		app-arch/p7zip[rar]
+		app-arch/pbzip2
+		app-arch/pdlzip
+		app-arch/pigz
+		app-arch/rpm
+		app-arch/sharutils
+		app-arch/tar
+		app-arch/unace
+		app-arch/unadf
+		app-arch/unzip
+		app-arch/xdms
+		app-arch/xz-utils
+		app-arch/zip
+		app-arch/zpaq
+		app-arch/zstd
+		app-cdr/cdrtools
+		dev-libs/chmlib
+		media-libs/flac
+		media-sound/shorten
+		sys-apps/diffutils
+		sys-apps/file
+		sys-apps/grep
+		!elibc_musl? ( app-arch/rar )
+		!x86? ( app-arch/clzip )
+	)
+"
+# Test dependencies which are packaged but can't be tested for various reasons.
+# app-arch/arc
+# app-arch/zoo
+# app-arch/zopfli
+# media-sound/mac
+
+# app-arch/rar is masked on musl
+# app-arch/clzip is unkeyworded on x86
+
+# Unpackaged testable dependencies
+# archmage
+# genisoimage
+# lhasa
+# nomarch
+# pdzip2
+# py_{bz2,echo,gzip,tarfile,zipfile}
+# rpm2cpio
+# rzip
+# star
+# unalz
+# uncompress.real
+
+PATCHES=(
+	"${FILESDIR}/patool-1.12_p20230424-disable-file-sandbox.patch"
+	"${FILESDIR}/patool-1.12_p20230424-map-vnd.android.package-archive.patch"
+)
+
+distutils_enable_tests pytest
+
+src_install() {
+	distutils-r1_src_install
+
+	newdoc doc/README.txt README.md
+	doman doc/patool.1
+}
+
+python_test() {
+	local EPYTEST_IGNORE=(
+		# zoo emits a non-zero exit status on a possibly false consistency check
+		# Zoo:  WARNING:  Archive header failed consistency check.
+		"tests/archives/test_zoo.py"
+		# Doesn't accept long arguments, such as those that files in ${S} would have.
+		# Too long argument: /var/tmp/portage/app-arch/patool-1.12_p20230424/work/patool-ab64562c8cdac34dfd69fcb6e30c8c0014282d11/tests/data/p.arc.foo
+		"tests/archives/test_arc.py"
+		# Error: 1002 (invalid input file)
+		"tests/archives/test_mac.py"
+		# AttributeError: module 'patoolib.programs.zopfli' has no attribute 'extract_gzip'
+		"tests/archives/test_zopfli.py"
+	)
+
+	if use elibc_musl; then
+		EPYTEST_IGNORE+=(
+			"tests/archives/test_rar.py"
+		)
+	fi
+
+	if use x86; then
+		EPYTEST_IGNORE+=(
+			"tests/archives/test_clzip.py"
+		)
+	fi
+
+	epytest
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-02-10  3:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-10  3:11 [gentoo-commits] repo/gentoo:master commit in: app-arch/patool/, app-arch/patool/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2023-09-24 22:08 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox