Bug 122849 - app-arch/zip - use flag "crypt" does no longer work as expected for version 2.31
Bug#: 122849 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: trivial Priority: P2
Resolution: FIXED Assigned To: maintainer-needed@gentoo.org Reported By: robteichmann@gmx.de
Component: Applications
URL: 
Summary: app-arch/zip - use flag "crypt" does no longer work as expected for version 2.31
Keywords:  
Status Whiteboard: 
Opened: 2006-02-14 15:05 0000
Description:   Opened: 2006-02-14 15:05 0000
US export restrictions for encryption/decryption have been relaxed, so unlike
version 2.3, version 2.31 of app-arch/zip enables crypt support by default. The
necessary files for encryption support are now part of the source tarball (as
mentioned in the files WHATSNEW and CHANGES). With previous versions, they were
distributed in a separate file and encryption support was not enabled by
default.

The current ebuild for version 2.31 has a "crypt" use flag, which does not work
as expected:

On the one hand, encryption support gets built into zip even when the flag is
not set. The expected behaviour would be that it's optional. On the other hand,
using the "crypt" flag overwrites the files crypt.c and crypt.h of the standard
zip source with slightly older versions of these two files (the diffs are
minimal, though). The ebuild shouldn't overwrite these files and use the ones
provided by the zip source tree.

By adding -DNO_CRYPT as a compilation option, encryption support can be
disabled (mentioned in the file INSTALL of the zip source tree).

---

Attached are two different patches to the ebuild, pick which way to solve the
problem you like better - consider applying only _one_ of them:

- The first version of the patch simply removes the "crypt" use flag. I prefer
this way since the difference between a zip binary with encryption support and
one without is only about 2 kb on my machine. Making it optional seems a bit
like overkill.

- The second version of the patch keeps the "crypt" use flag but compiles zip
with -DNO_CRYPT when not supplying the "crypt" flag, thus making it optional
and disabling encryption support as one would expect.

This patch also makes the following small changes (suggestions) to the current
ebuild:
- added manpage symlinks for zipcloak.1, zipnote.1 and zipsplit.1
- docs README.CR (encryption information) and proginfo/algorith.txt get
installed
- doc MANUAL doesn't get installed - it's only a pre-formatted version of zip.1
for users without groff
- zipcloak doesn't get installed when there is no encryption support. Without
encryption the binary is useless and only emits an error message (only applies
to the second version of the patch, obviously)

robteichmann

------- Comment #1 From Roberto Teichmann 2006-02-14 15:06:59 0000 -------
Created an attachment (id=79805) [details]
zip-2.31-without-useflag-crypt.patch

remove the "crypt" use flag

------- Comment #2 From Roberto Teichmann 2006-02-14 15:08:00 0000 -------
Created an attachment (id=79806) [details]
zip-2.31-with-useflag-crypt.patch

or maybe use this to make the use flag work as expected

------- Comment #3 From Marcelo Goes 2006-02-20 13:01:09 0000 -------
Whomever picks this up, the second solution is probably the best one (since we
want to give this option to users).

------- Comment #4 From SpanKY 2006-03-13 19:13:47 0000 -------
thanks, 2.31-r1 includes your second patch