NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-powerpc/40658: Par2 (all versions) does not repair corrupt files correctly on Macppc/Powerpc machines
>Number: 40658
>Category: port-powerpc
>Synopsis: Par2 (all versions) does not repair corrupt files correctly on
>Macppc/Powerpc machines
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: port-powerpc-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Feb 16 05:30:00 +0000 2009
>Originator: Nick Coleman
>Release: 4.00
>Organization:
none
>Environment:
NetBSD mac.nick 4.0 NetBSD 4.0 (nick) #4: Sat Oct 18 23:00:39 WST 2008
root@mac:/usr/src/sys/arch/macppc/compile/nick macppc
>Description:
The purpose of this application is create par2 and part??+??.par2 files for
verification and repair of multi-file archives (typically rar files). Later,
it is used to verify and repair damaged archives by using Reed-Solomon
techniques in a similar way to network packet repair.
The Par2 application does not work correctly on macppc/powerpc *nix machines
and is a known general problem for macs whether BSD or Linux (according my
impressions gained while googling).
The repair function completes without error, but does not actually repair the
corrupt file. The verification function completes successfully. I have not
tried the create function and cannot report on it.
I downloaded both 0.3 and 0.4 (latest) source and compiled them myself. Both
versions exhibit this behaviour. In NetBSD packages, both pkg and pkgsrc
(/archivers/par2-0.4/) packages exhibit this behaviour. Using pkgsrc, the
package compiles successfully without error, but displays this behaviour.
>How-To-Repeat:
Try to repair a damaged archive. The repair will examine the archive, report
correctly that it can be repaired (if it can), but not actually perform the
repair.
Create a multi-file archive of files using rar, split across several rar files.
Use par2 to create a par2 file and several part??+??.par2 recovery files.
Somehow(?) contrive to corrupt one of the archive's files. Attempt to repair
the corruption using 'par2 repair'. It will verify the files and report an
error in one of them, it will load the part??+??.par2 files and run through the
rar'ed files and report they can be successfully repaired. However, it will
never actually perform the repair, leaving the archive still damaged. The
correct action would be to automatically repair the damage.
>Fix:
I came across a thread, see post near bottom by Dominik:
<http://bugs.gentoo.org/show_bug.cgi?id=137092>
and he details two fixes he found on the Fedora bug tracker:
<http://bugs.gentoo.org/attachment.cgi?id=91276&action=view>
I added the the patches (there are two patches in the listed attachment link
above) to pkgsrc/archives/par2/patch, ran 'make', and tested the application on
a corrupt rar archive I had. The application successfully repaired the corrupt
file and the unrar succeeded where previously it had failed a CRC check.
I cannot claim credit for the patches, but suggest they be added to the
mac/powerpc ports.
Thanks.
Home |
Main Index |
Thread Index |
Old Index