Commit graph

7 commits

Author SHA1 Message Date
adam
22040b0f0b py-rarfile: updated to 4.0
rarfile v4.0

Main goals are:

Increased zipfile-compatibility, thus also achieving smaller difference between RAR3 and RAR5 archives.
Implement RarFile.extract on top of RarFile.open instead using unrar x directly, thus making maintenance of alternative backends more manageable. Negative aspect of that is that there are features that internal extract code does not support - hard links, NTFS streams and junctions.

Breaking changes:

Directory names will have "/" appended.
RarFile.extract operates only on single entry, so when used on directory it will create directory but not extract files under it.
RarFile.extract/RarFile.extractall/RarFile.testrar will not launch special unrar command line, instead they are implemented on top of RarFile.open.
Keyword args in top-level APIs were renamed to match zipfile:
RarFile(rarfile) -> RarFile(file)
RarFile.setpassword(password) -> .setpassword(pwd)
RarFile.getinfo(fname) -> .getinfo(name)
RarFile.open(fname, mode, psw) -> .open(name, mode, pwd)
RarFile.read(fname, psw) -> .read(name, pwd)
PATH_SEP cannot be changed from "/".

New features:

RarFile.extract will return final sanitized filename for target file.
RarInfo.is_dir is now preferred spelling of isdir(). Old method kept as alias.
New RarInfo.is_file and RarInfo.is_symlink methods. Only one of ~RarInfo.is_file, ~RarInfo.is_dir or ~RarInfo.is_symlink can be True.
RarFile.printdir has file argument for output.
RarFile.__iter__ loops over RarInfo entries.
RAR3: throw NeedFirstVolume exception with current volume number, like RAR5 does.
Nanosecond timestamp support. Visible as nsdatetime instance.
Minimal CLI when run as script: python3 -m rarfile
Skip old file versions in versioned archive.

Cleanups:

Use PBKDF2 implementation from hashlib.
Improve test coverage.
2022-10-14 11:48:48 +00:00
wiz
8a9cb53cf6 *: bump PKGREVISION for egg.mk users
They now have a tool dependency on py-setuptools instead of a DEPENDS
2022-01-04 20:52:30 +00:00
nia
d854b0160a archivers: Replace RMD160 checksums with BLAKE2s checksums
All checksums have been double-checked against existing RMD160 and SHA512
hashes.
2021-10-26 09:57:04 +00:00
nia
5b593563e1 archivers: Remove SHA1 distfiles hashes 2021-10-07 13:05:55 +00:00
adam
1021f0f09f py-rarfile: updated to 3.3
rarfile v3.3

Fixes:
Add the .sfx test files to MANIFEST.in for inclusion in pypi tarball.
Add all files in git to tarball.


rarfile v3.2

New features:
Support unar as decompression backend. It has much better support for RAR features than bsdtar.
Support SFX archives - archive header is searched in first 2MB of the file.
Add HACK_TMP_DIR option, to force temp files into specific directory.

Fixes:
Always use "/" for path separator in command-line, gives better results on Windows.

Cleanups:
Drop module-level options from docs, they create confusion.
Drop support for Python 2 and 3.5 and earlier. Python 2 is dead and requiring Python 3.6 gives blake2s, stdlib that supports pathlib, and ordered dict without compat hacks.
Replace PyCrypto with PyCryptodome in tests.
Use Github Actions for CI.
2020-07-29 12:10:46 +00:00
adam
9e92903a6b py-rarfile: updated to 3.1
Version 3.1:

This will be last version with support for Python 2.x

New feature:
Accept pathlib objects as filenames.
Accept bytes filenames in Python 3

Fixes:
Use bug-compatible SHA1 for longer passwords (> 28 chars) in RAR3 encrypted headers.
Return true/false from _check_unrar_tool
Include all test files in archive
Include volume number in NeedFirstVolume exception if available (rar5).

Cleanups:
Convert tests to pytest.
2019-09-16 08:56:17 +00:00
leot
e280a5bcef Import py-rarfile-3.0 as archivers/py-rarfile
This is Python module for RAR archive reading. The interface is made as zipfile
like as possible. Licensed under ISC license.

Features:

 * Supports both RAR3 and RAR5 format archives.
 * Supports multi volume archives.
 * Supports Unicode filenames.
 * Supports password-protected archives.
 * Supports archive and file comments.
 * Archive parsing and non-compressed files are handled in pure Python code.
 * Compressed files are extracted by executing external tool: either unrar from
   RARLAB or bsdtar from libarchive.
 * Works with both Python 2.7 and 3.x.
2017-04-14 14:01:02 +00:00