Adding a file to a zoo archive returns a fatal error on amd64
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zoo (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Under Ubuntu 10.04.3 LTS trying to add a file to an existing zoo archive results in a fatal error. The bug is very easy to reproduce, just create a zoo archive and then try to add a file to it:
zapman@
Zoo: test.txt -- (28%) added
zapman@
Zoo: FATAL: Archive header failed consistency check.
The zoo package version was 2.10-21 but the same also happened with 2.10-23 which I grabbed from Launchpad. I also burnt a 32bit CD of 10.04.3 to test the package and everything worked fine, so this problem seems specific to the amd64 architecture. IIRC no other archiver has a generations feature like zoo, and this bug prevents me from using it.
Interestingly, a similar - if not identical - bug was filed on Debian years ago, a patch was provided and the issue was marked as fixed; but after burning debian-
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: zoo 2.10-21
ProcVersionSign
Uname: Linux 2.6.32-35-generic x86_64
Architecture: amd64
CheckboxSubmission: 3b8b1e94677feb8
CheckboxSystem: 4ed15c40009aa6f
Date: Sun Nov 20 16:22:34 2011
ProcEnviron:
LANGUAGE=
LANG=en_AU.utf8
SHELL=/bin/bash
SourcePackage: zoo
Changed in zoo (Ubuntu): | |
status: | Fix Committed → Fix Released |
I sent a message to Carl Johnson who had provided the patch for Debian and he kindly replied with the solution. Should you need to contact him you can find the e-mail I used to contact him on the Debian bug report. His message follows:
"I finally think I found the problem. Could you please foreward some or
all of this to Ubuntu since I don't use it? Ubuntu should in turn send
this upstream to Debian. I haven't used zoo in years, so that is why I
hadn't already stumbled upon this.
It appears that Debian reformatted the patches and introduced a typo in
one part of my patch. The relevant part of the patch to _misc.c_ is
below:
+#ifdef LONG64 header- >zoo_start = header->zoo_minus) != 0)
+ if ((int)(
+#else
if ((header->zoo_start + header->zoo_minus) != 0L)
+#endif
Notice the '=' in the ifdef case and '+' in the else case? If the '='
is changed to '+' in the first part it will then work. The other files
are all patched correctly, so this is the only change.
It appears that my original patch can be simplified somewhat, if anybody www.freebsd. org/cgi/ query-pr. cgi?pr= 162804. That patch will
wants to go to the trouble. I used '#ifdef LONG64', but cpp has a
built-in define of '__LP64__' (or '_LP64') that already specifies that
information. If that can be used, then the 'LONG64' define and
therefore the 'linux64' makefile target can be removed. I don't have a
32 bit machine to test this on, so I am not certain that there won't be
any problems. I just submitted a patch using this to FreeBSD at
http://
probably not be directly usable, since other patches probably change the
line numbers.
I hope this helps."