Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 122849 - app-arch/zip - use flag "crypt" does no longer work as expected for version 2.31
Summary: app-arch/zip - use flag "crypt" does no longer work as expected for version 2.31
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-14 15:05 UTC by Roberto Teichmann
Modified: 2006-03-13 19:13 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
zip-2.31-without-useflag-crypt.patch (zip-2.31-without-useflag-crypt.patch,1.12 KB, patch)
2006-02-14 15:06 UTC, Roberto Teichmann
Details | Diff
zip-2.31-with-useflag-crypt.patch (zip-2.31-with-useflag-crypt.patch,1.50 KB, patch)
2006-02-14 15:08 UTC, Roberto Teichmann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roberto Teichmann 2006-02-14 15:05:32 UTC
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 Roberto Teichmann 2006-02-14 15:06:59 UTC
Created attachment 79805 [details, diff]
zip-2.31-without-useflag-crypt.patch

remove the "crypt" use flag
Comment 2 Roberto Teichmann 2006-02-14 15:08:00 UTC
Created attachment 79806 [details, diff]
zip-2.31-with-useflag-crypt.patch

or maybe use this to make the use flag work as expected
Comment 3 Marcelo Goes (RETIRED) gentoo-dev 2006-02-20 13:01:09 UTC
Whomever picks this up, the second solution is probably the best one (since we want to give this option to users).
Comment 4 SpanKY gentoo-dev 2006-03-13 19:13:47 UTC
thanks, 2.31-r1 includes your second patch