I'm trying to build an RPM packaged version of Infozip zip
utilities with encryption support.

I've downloaded the source RPM from RedHat 6.2 for zip and unzip,
and I've downloaded the needed zcrypt28.zip package from Holland.

The contents of the zcrypt28.zip package when unzipped consists
of:

README.CR  WHERE  crypt.c  crypt.h  file_id.diz

Upon examining the unzip source, I've found that unzip includes
crypt.c and crypt.h 'dummy' files that tell where to get the
zcrypt28.zip package from.  It is apparent that in order to build
this properly, I need to include the zcrypt source in the RPM
package as well, and it needs to be unzipped into the BUILD
directory immediately after the unzip source is unpacked.  The
zcrypt files should overwrite the existing files in the unzip
source, and thus when unzip gets built it should include
encryption support.

I haven't created .spec files in quite a while and I'm quite
rusty as to how to accomplish all of the above.  Here is the
relevant portions of the .spec file.  What should I add to it in
order to have the zcrypt sources unzipped prior to building?

I've tried adding "unzip zcrypt28.zip" to the %prep section,
but I get an error that it can't find the source.  I added a
second Source: line with the proper URL to the file I downloaded,
and when I build I get:

4 root@asdf:/usr/src/redhat/SPECS# rpm -ba unzip.spec
Executing: %prep
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd /usr/src/redhat/BUILD
+ rm -rf unzip-5.40
+ /bin/gzip -dc /usr/src/redhat/SOURCES/zcrypt28.zip
+ tar -xf -
tar: Hmm, this doesn't look like a tar archive
tar: Skipping to next file header
gzip: /usr/src/redhat/SOURCES/zcrypt28.zip has more than one
entry--rest ignoredtar: Archive - EOF not on block boundary
tar: Error is not recoverable: exiting now
Bad exit status from /var/tmp/rpm-tmp.41029 (%prep)


Obviously, it looks like RPM won't call unzip properly to unzip
ZIP files.  It tries to use tar and gzip.  No go.  I tried
telling it to use unzip by adding the following to the %prep
section:

unzip zcrypt28.zip

However, now I get:

4 root@asdf:/usr/src/redhat/SPECS# rpm -ba unzip.spec
Executing: %prep
+ umask 022
+ cd /usr/src/redhat/BUILD
+ unzip zcrypt28.zip
unzip:  cannot find zcrypt28.zip, zcrypt28.zip.zip or
zcrypt28.zip.ZIP.
Bad exit status from /var/tmp/rpm-tmp.47041 (%prep)


What do I need to do to the .spec to get the job done?
The original spec file is below (the relevant portion).

Thanks in advance.
TTYL


Summary: A utility for unpacking zip files.
Name: unzip
Version: 5.40
Release: 2
Copyright: distributable
Group: Applications/Archiving
Source: ftp://ftp.uu.net/pub/archiving/zip/src/unzip540.tar.gz
BuildRoot: /var/tmp/unzip-root

%description
The unzip utility is used to list, test, or extract files from a zip
archive.  Zip archives are commonly found on MS-DOS systems.  The zip
utility, included in the zip package, creates zip archives.  Zip and
unzip are both compatible with archives created by PKWARE(R)'s PKZIP
for MS-DOS, but the programs' options and default behaviors do differ
in some respects.

Install the unzip package if you need to list, test or extract files from
a zip archive.

%prep
%setup -q
ln -s unix/Makefile Makefile

%build
%ifarch i386
make linux
%else
make linux_noasm
%endif




-- 
Mike A. Harris                                     Linux advocate     
Computer Consultant                                  GNU advocate  
Capslock Consulting                          Open Source advocate

... Our continuing mission: To seek out knowledge of C, to explore
strange UNIX commands, and to boldly code where no one has man page 4.



_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

Reply via email to