Bug 162804

Summary: archivers/zoo can't modify archives under amd64 [Patch]
Product: Ports & Packages Reporter: carlj
Component: Individual Port(s)Assignee: Gabor Kovesdan <gabor>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description carlj 2011-11-24 03:00:25 UTC
	
Zoo can't modify any archives that already exist in an amd64 system.
Zoo can create the archive, but any change later generates the message:
    Zoo:  FATAL:  Archive header failed consistency check.
The zoo version is the one in 8.1-RELEASE (zoo-2.10.1_2).

Fix: The problem seems to be that it uses long calculations (64 bit), but then
compares with stored 32-bit values in the header, which will fail.  The
following patch seems to work, and is basically what I reported to Debian
several years ago (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=335114).
It is based on the already patched contents of the work directory in
/usr/ports/archivers/zoo.  I think it will still work with 32 bit systems, but
I don't have any to check with.

=-=-=-=-=-=-=-=-=-=-  snip diff -u patch below  -=-=-=-=-=-=-=-=-=-=
How-To-Repeat: 	
$ rm -f test.zoo
$ zoo -a test .profile          # test.zoo doesn't exist
Zoo:  .profile --  (38%) added
$ zoo -a test .profile          # test.zoo now exists
Zoo:  FATAL:  Archive header failed consistency check.
$ zoo -l test                   # this will work

Archive test.zoo:
Length    CF  Size Now  Date      Time
--------  --- --------  --------- --------
     813  38%      502  21 Oct 11 15:25:22-1   644 .profile
--------  --- --------  --------- --------
     813  38%      502     1 file
$ pkg_info -Ix zoo
zoo-2.10.1_2        Manipulate archives of files in compressed form
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2011-11-24 05:21:33 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gabor

Fix synopsis and assign.
Comment 2 Gabor Kovesdan freebsd_committer freebsd_triage 2011-12-22 13:12:37 UTC
State Changed
From-To: open->closed

Committed, thanks!
Comment 3 dfilter service freebsd_committer freebsd_triage 2011-12-22 13:12:48 UTC
gabor       2011-12-22 13:12:22 UTC

  FreeBSD ports repository

  Modified files:
    archivers/zoo        Makefile 
    archivers/zoo/files  patch-misc.c patch-zooext.c 
  Added files:
    archivers/zoo/files  patch-ar.h patch-bsd.c patch-makefile 
                         patch-misc2.c patch-nixtime.i 
                         patch-options.h patch-zooadd2.c 
                         patch-zoofns.h patch-zoolist.c 
  Removed files:
    archivers/zoo/files  patch-aa patch-ab 
  Log:
  - Patch zoo to work properly when modifying existing archives on 64-bit
    systems
  - Bump PORTREVISION
  
  PR:             ports/162804
  Submitted by:   Carl Johnson <carlj@peak.org>
  
  Revision  Changes    Path
  1.16      +1 -1      ports/archivers/zoo/Makefile
  1.5       +0 -232    ports/archivers/zoo/files/patch-aa (dead)
  1.3       +0 -68     ports/archivers/zoo/files/patch-ab (dead)
  1.1       +15 -0     ports/archivers/zoo/files/patch-ar.h (new)
  1.1       +46 -0     ports/archivers/zoo/files/patch-bsd.c (new)
  1.1       +41 -0     ports/archivers/zoo/files/patch-makefile (new)
  1.2       +14 -2     ports/archivers/zoo/files/patch-misc.c
  1.1       +17 -0     ports/archivers/zoo/files/patch-misc2.c (new)
  1.1       +12 -0     ports/archivers/zoo/files/patch-nixtime.i (new)
  1.1       +18 -0     ports/archivers/zoo/files/patch-options.h (new)
  1.1       +19 -0     ports/archivers/zoo/files/patch-zooadd2.c (new)
  1.2       +15 -3     ports/archivers/zoo/files/patch-zooext.c
  1.1       +14 -0     ports/archivers/zoo/files/patch-zoofns.h (new)
  1.1       +16 -0     ports/archivers/zoo/files/patch-zoolist.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 carlj 2012-03-08 23:45:03 UTC
FreeBSD-gnats-submit@FreeBSD.org writes:

> Thank you very much for your problem report.
> It has the internal identification `ports/162804'.
> The individual assigned to look at your
> report is: freebsd-ports-bugs. 
>
> You can access the state of your problem report at any time
> via this link:
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=162804
>
>>Category:       ports
>>Responsible:    freebsd-ports-bugs
>>Synopsis:       zoo can't modify archives under amd64 [Patch]
>>Arrival-Date:   Thu Nov 24 03:00:25 UTC 2011

I finally got around to looking into the patched version of
archivers/zoo and it still doesn't work for amd64.  The problem is that
the patches for only two of the 4 diffs I supplied were actually
included. The new version includes only the patches for misc.c and
zooext.c.  The patches for zoodel.c and zoopack.c were missed somehow.
-- 
Carl Johnson		carlj@peak.org
Comment 5 commit-hook freebsd_committer freebsd_triage 2020-07-01 10:27:20 UTC
A commit references this bug:

Author: danfe
Date: Wed Jul  1 10:27:07 UTC 2020
New revision: 540948
URL: https://svnweb.freebsd.org/changeset/ports/540948

Log:
  Really fix `archivers/zoo' on 64-bit machines.  When PR 162804 had been
  committed by gabor@ back in 2011, only two of the proposed four patches
  supplied were actually included; the patches for zoodel.c and zoopack.c
  were somehow missed.

  PR:	162804, 240982

Changes:
  head/archivers/zoo/Makefile
  head/archivers/zoo/files/patch-zoodel.c
  head/archivers/zoo/files/patch-zoopack.c