rpms/unzip/devel unzip-6.0-bzip2-configure.patch, NONE, 1.1 unzip-6.0-close.patch, NONE, 1.1 unzip-6.0-exec-shield.patch, NONE, 1.1 .cvsignore, 1.6, 1.7 sources, 1.6, 1.7 unzip.spec, 1.41, 1.42 unzip-5.51-link-segv.patch, 1.2, NONE unzip-5.51-link-segv2.patch, 1.1, NONE unzip-5.52-249057.patch, 1.1, NONE unzip-5.52-4GB3.patch, 1.1, NONE unzip-5.52-4GB_types.patch, 1.1, NONE unzip-5.52-cve-2008-0888.patch, 1.1, NONE unzip-5.52-long-filename.patch, 1.1, NONE unzip-5.52-makefile.patch, 1.1, NONE unzip-5.52-near-4GB.patch, 1.2, NONE unzip-5.52-near-4GB2.patch, 1.1, NONE unzip-5.52-open.patch, 1.1, NONE unzip-5.52-toctou.patch, 1.1, NONE unzip542-rpmoptflags.patch, 1.1, NONE
Karel Klíč
kklic at fedoraproject.org
Thu Nov 19 08:27:29 UTC 2009
Author: kklic
Update of /cvs/extras/rpms/unzip/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12992
Modified Files:
.cvsignore sources unzip.spec
Added Files:
unzip-6.0-bzip2-configure.patch unzip-6.0-close.patch
unzip-6.0-exec-shield.patch
Removed Files:
unzip-5.51-link-segv.patch unzip-5.51-link-segv2.patch
unzip-5.52-249057.patch unzip-5.52-4GB3.patch
unzip-5.52-4GB_types.patch unzip-5.52-cve-2008-0888.patch
unzip-5.52-long-filename.patch unzip-5.52-makefile.patch
unzip-5.52-near-4GB.patch unzip-5.52-near-4GB2.patch
unzip-5.52-open.patch unzip-5.52-toctou.patch
unzip542-rpmoptflags.patch
Log Message:
new upstream release 6.0
unzip-6.0-bzip2-configure.patch:
configure | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
--- NEW FILE unzip-6.0-bzip2-configure.patch ---
diff -up unzip60/unix/configure.bzip2-configure unzip60/unix/configure
--- unzip60/unix/configure.bzip2-configure 2009-04-16 21:25:12.000000000 +0200
+++ unzip60/unix/configure 2009-11-18 11:22:14.598389194 +0100
@@ -640,7 +640,24 @@ else
D_USE_BZ2="-DUSE_BZIP2"
L_BZ2="${BZLF} -lbz2"
else
- echo "-- bzip2 sources not found - no bzip2 support"
+ echo " Check if OS already has bzip2 library installed"
+ cat > conftest.c << _EOF_
+#include "bzlib.h"
+int main()
+{
+ bz_stream strm;
+ BZ2_bzCompressEnd(&strm);
+ return 0;
+}
+_EOF_
+ $CC $CFLAGS -o conftest conftest.c -lbz2 > /dev/null 2>/dev/null
+ if test $? -eq 0; then
+ echo "-- OS supports bzip2 - linking in bzip2"
+ D_USE_BZ2="-DBZIP2_SUPPORT"
+ L_BZ2="${BZLF} -lbz2"
+ else
+ echo "-- Either bzlib.h or libbz2.a not found - no bzip2"
+ fi
fi
fi
unzip-6.0-close.patch:
extract.c | 9 +++------
unix/unix.c | 57 +++++++++++++++++++++++++++++++++++++++++++++------------
unzpriv.h | 2 +-
3 files changed, 49 insertions(+), 19 deletions(-)
--- NEW FILE unzip-6.0-close.patch ---
diff -up unzip60/extract.c.close unzip60/extract.c
--- unzip60/extract.c.close 2009-03-14 02:32:52.000000000 +0100
+++ unzip60/extract.c 2009-11-19 08:17:23.481263496 +0100
@@ -1924,24 +1924,21 @@ static int extract_or_test_member(__G)
#ifdef VMS /* VMS: required even for stdout! (final flush) */
if (!uO.tflag) /* don't close NULL file */
- close_outfile(__G);
+ error = close_outfile(__G);
#else
#ifdef DLL
if (!uO.tflag && (!uO.cflag || G.redirect_data)) {
if (G.redirect_data)
FINISH_REDIRECT();
else
- close_outfile(__G);
+ error = close_outfile(__G);
}
#else
if (!uO.tflag && !uO.cflag) /* don't close NULL file or stdout */
- close_outfile(__G);
+ error = close_outfile(__G);
#endif
#endif /* VMS */
- /* GRR: CONVERT close_outfile() TO NON-VOID: CHECK FOR ERRORS! */
-
-
if (G.disk_full) { /* set by flush() */
if (G.disk_full > 1) {
#if (defined(DELETE_IF_FULL) && defined(HAVE_UNLINK))
diff -up unzip60/unix/unix.c.close unzip60/unix/unix.c
--- unzip60/unix/unix.c.close 2009-01-24 00:31:26.000000000 +0100
+++ unzip60/unix/unix.c 2009-11-19 08:33:25.568389171 +0100
@@ -1096,10 +1096,41 @@ static int get_extattribs(__G__ pzt, z_u
#ifndef MTS
/****************************/
+/* Function CloseError() */
+/***************************/
+
+int CloseError(__G)
+ __GDEF
+{
+ int errval = PK_OK;
+
+ if (fclose(G.outfile) < 0) {
+ switch (errno) {
+ case ENOSPC:
+ /* Do we need this on fileio.c? */
+ Info(slide, 0x4a1, ((char *)slide, "%s: write error (disk full?). Continue? (y/n/^C) ",
+ FnFilter1(G.filename)));
+ fgets(G.answerbuf, 9, stdin);
+ if (*G.answerbuf == 'y') /* stop writing to this file */
+ G.disk_full = 1; /* pass to next */
+ else
+ G.disk_full = 2; /* no: exit program */
+
+ errval = PK_DISK;
+ break;
+
+ default:
+ errval = PK_WARN;
+ }
+ }
+ return errval;
+} /* End of CloseError() */
+
+/****************************/
/* Function close_outfile() */
/****************************/
-void close_outfile(__G) /* GRR: change to return PK-style warning level */
+int close_outfile(__G)
__GDEF
{
union {
@@ -1108,6 +1139,7 @@ void close_outfile(__G) /* GRR: chang
} zt;
ulg z_uidgid[2];
int have_uidgid_flg;
+ int errval = PK_OK;
have_uidgid_flg = get_extattribs(__G__ &(zt.t3), z_uidgid);
@@ -1141,16 +1173,16 @@ void close_outfile(__G) /* GRR: chang
Info(slide, 0x201, ((char *)slide,
"warning: symbolic link (%s) failed: mem alloc overflow\n",
FnFilter1(G.filename)));
- fclose(G.outfile);
- return;
+ errval = CloseError(G.outfile, G.filename);
+ return errval ? errval : PK_WARN;
}
if ((slnk_entry = (slinkentry *)malloc(slnk_entrysize)) == NULL) {
Info(slide, 0x201, ((char *)slide,
"warning: symbolic link (%s) failed: no mem\n",
FnFilter1(G.filename)));
- fclose(G.outfile);
- return;
+ errval = CloseError(G.outfile, G.filename);
+ return errval ? errval : PK_WARN;
}
slnk_entry->next = NULL;
slnk_entry->targetlen = ucsize;
@@ -1174,10 +1206,10 @@ void close_outfile(__G) /* GRR: chang
"warning: symbolic link (%s) failed\n",
FnFilter1(G.filename)));
free(slnk_entry);
- fclose(G.outfile);
- return;
+ errval = CloseError(G.outfile, G.filename);
+ return errval ? errval : PK_WARN;
}
- fclose(G.outfile); /* close "link" file for good... */
+ errval = CloseError(G.outfile, G.filename); /* close "link" file for good... */
slnk_entry->target[ucsize] = '\0';
if (QCOND2)
Info(slide, 0, ((char *)slide, "-> %s ",
@@ -1188,7 +1220,7 @@ void close_outfile(__G) /* GRR: chang
else
G.slink_head = slnk_entry;
G.slink_last = slnk_entry;
- return;
+ return errval;
}
#endif /* SYMLINKS */
@@ -1201,7 +1233,7 @@ void close_outfile(__G) /* GRR: chang
#endif
#if (defined(NO_FCHOWN))
- fclose(G.outfile);
+ errval = CloseError(G.outfile, G.filename);
#endif
/* if -X option was specified and we have UID/GID info, restore it */
@@ -1227,7 +1259,7 @@ void close_outfile(__G) /* GRR: chang
}
#if (!defined(NO_FCHOWN) && defined(NO_FCHMOD))
- fclose(G.outfile);
+ errval = CloseError(G.outfile, G.filename);
#endif
#if (!defined(NO_FCHOWN) && !defined(NO_FCHMOD))
@@ -1239,7 +1271,7 @@ void close_outfile(__G) /* GRR: chang
if (fchmod(fileno(G.outfile), filtattr(__G__ G.pInfo->file_attr)))
perror("fchmod (file attributes) error");
- fclose(G.outfile);
+ errval = CloseError(G.outfile, G.filename);
#endif /* !NO_FCHOWN && !NO_FCHMOD */
/* skip restoring time stamps on user's request */
@@ -1267,6 +1299,7 @@ void close_outfile(__G) /* GRR: chang
#endif
#endif /* NO_FCHOWN || NO_FCHMOD */
+ return errval;
} /* end function close_outfile() */
#endif /* !MTS */
diff -up unzip60/unzpriv.h.close unzip60/unzpriv.h
--- unzip60/unzpriv.h.close 2009-04-20 01:59:26.000000000 +0200
+++ unzip60/unzpriv.h 2009-11-19 08:19:08.610388618 +0100
@@ -2604,7 +2604,7 @@ char *GetLoadPath OF((__GPRO));
int SetFileSize OF((FILE *file, zusz_t filesize)); /* local */
#endif
#ifndef MTS /* macro in MTS */
- void close_outfile OF((__GPRO)); /* local */
+ int close_outfile OF((__GPRO)); /* local */
#endif
#ifdef SET_SYMLINK_ATTRIBS
int set_symlnk_attribs OF((__GPRO__ slinkentry *slnk_entry)); /* local */
unzip-6.0-exec-shield.patch:
crc_i386.S | 3 +++
1 file changed, 3 insertions(+)
--- NEW FILE unzip-6.0-exec-shield.patch ---
diff -up unzip60/crc_i386.S.exec-shield unzip60/crc_i386.S
--- unzip60/crc_i386.S.exec-shield 2007-01-07 06:02:58.000000000 +0100
+++ unzip60/crc_i386.S 2009-11-18 11:16:39.630389312 +0100
@@ -302,3 +302,6 @@ _crc32: /* ulg c
#endif /* i386 || _i386 || _I386 || __i386 */
#endif /* !USE_ZLIB && !CRC_TABLE_ONLY */
+
+.section .note.GNU-stack, "", @progbits
+.previous
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/unzip/devel/.cvsignore,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- .cvsignore 22 Dec 2005 13:58:12 -0000 1.6
+++ .cvsignore 19 Nov 2009 08:27:26 -0000 1.7
@@ -1 +1 @@
-unzip552.tar.gz
+unzip60.tar.gz
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/unzip/devel/sources,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- sources 22 Dec 2005 13:58:12 -0000 1.6
+++ sources 19 Nov 2009 08:27:26 -0000 1.7
@@ -1 +1 @@
-9d23919999d6eac9217d1f41472034a9 unzip552.tar.gz
+62b490407489521db863b523a7f86375 unzip60.tar.gz
Index: unzip.spec
===================================================================
RCS file: /cvs/extras/rpms/unzip/devel/unzip.spec,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -p -r1.41 -r1.42
--- unzip.spec 27 Jul 2009 06:35:38 -0000 1.41
+++ unzip.spec 19 Nov 2009 08:27:27 -0000 1.42
@@ -1,25 +1,21 @@
Summary: A utility for unpacking zip files
Name: unzip
-Version: 5.52
-Release: 11%{?dist}
+Version: 6.0
+Release: 1%{?dist}
License: BSD
Group: Applications/Archiving
-Source: ftp://ftp.info-zip.org/pub/infozip/src/unzip552.tar.gz
-Patch0: unzip542-rpmoptflags.patch
-Patch2: unzip-5.51-link-segv.patch
-Patch3: unzip-5.51-link-segv2.patch
-Patch6: unzip-5.52-toctou.patch
-Patch7: unzip-5.52-near-4GB.patch
-Patch8: unzip-5.52-near-4GB2.patch
-Patch9: unzip-5.52-long-filename.patch
-Patch10: unzip-5.52-makefile.patch
-Patch11: unzip-5.52-open.patch
-Patch12: unzip-5.52-4GB3.patch
-Patch13: unzip-5.52-4GB_types.patch
-Patch14: unzip-5.52-249057.patch
-Patch15: unzip-5.52-cve-2008-0888.patch
-URL: http://www.info-zip.org/pub/infozip/UnZip.html
+Source: http://downloads.sourceforge.net/infozip/unzip60.tar.gz
+
+# Not sent to upstream.
+Patch1: unzip-6.0-bzip2-configure.patch
+# Upstream plans to do this in zip (hopefully also in unzip).
+Patch2: unzip-6.0-exec-shield.patch
+# Upstream plans to do similar thing.
+Patch3: unzip-6.0-close.patch
+
+URL: http://www.info-zip.org/UnZip.html
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: bzip2-devel
%description
The unzip utility is used to list, test, or extract files from a zip
@@ -33,29 +29,17 @@ Install the unzip package if you need to
a zip archive.
%prep
-%setup -q
-%patch0 -p1 -b .rpmo
-%patch2 -p1 -b .link-segv
-%patch3 -p1 -b .morn
-%patch6 -p1 -b .toctou
-%patch7 -p1 -b .4GB
-%patch8 -p1 -b .4GB2
-%patch9 -p1 -b .lfn
-%patch10 -p1 -b .make
-%patch11 -p1 -b .open
-%patch12 -p1 -b .4GB3
-%patch13 -p1 -b .4BG4
-%patch14 -p1 -b .err
-%patch15 -p1 -b .cve-2008-0888
-ln -s unix/Makefile Makefile
+%setup -q -n unzip60
+%patch1 -p1 -b .bzip2-configure
+%patch2 -p1 -b .exec-shield
+%patch3 -p1 -b .close
%build
-make CFLAGS="-D_LARGEFILE64_SOURCE" linux_noasm LF2="" %{?_smp_mflags}
+make -f unix/Makefile "CF_NOOPT=-I. -DUNIX $RPM_OPT_FLAGS" generic_gcc %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
-
-make prefix=$RPM_BUILD_ROOT%{_prefix} MANDIR=$RPM_BUILD_ROOT/%{_mandir}/man1 INSTALL="cp -p" install LF2=""
+make -f unix/Makefile prefix=$RPM_BUILD_ROOT%{_prefix} MANDIR=$RPM_BUILD_ROOT/%{_mandir}/man1 INSTALL="cp -p" install LF2=""
%clean
rm -rf $RPM_BUILD_ROOT
@@ -67,6 +51,30 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/*/*
%changelog
+* Mon Nov 16 2009 Karel Klic <kklic at redhat.com> - 6.0-1
+- New upstream version
+- Compiled using `make generic_gcc` (includes asm)
+- Removed unzip542-rpmoptflags.patch, because RPM_OPT_FLAGS
+ are provided using command line
+- Removed unzip-5.51-link-segv.patch, because the link file
+ is not reopened in the current version
+- Removed unzip-5.51-link-segv2.patch, the bug was already fixed
+ in open_outfile in 5.52
+- Removed unzip-5.52-toctou.patch (CAN-2005-2475), the vulnerability
+ is fixed in the current version
+- Removed unzip-5.52-near-4GB.patch, unzip-5.52-near-4GB2.patch,
+ unzip-5.52-4GB3.patch, and unzip-5.52-4GB_types.patch, because
+ the current version supports large files
+- Removed unzip-5.52-long-filename.patch, the current version
+ fixes the vulnerability by checking the length of command line
+ arguments in unzip.c
+- Removed unzip-5.52-makefile.patch, because we no longer create
+ the link manually
+- Removed unzip-5.52-open.patch, the current version uses umask.
+- Removed unzip-5.52-cve-2008-0888.patch, the current version
+ fixes this vulnerability
+- Ported unzip-5.52-249057.patch to current version (unzip-6.0-close)
+
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 5.52-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
--- unzip-5.51-link-segv.patch DELETED ---
--- unzip-5.51-link-segv2.patch DELETED ---
--- unzip-5.52-249057.patch DELETED ---
--- unzip-5.52-4GB3.patch DELETED ---
--- unzip-5.52-4GB_types.patch DELETED ---
--- unzip-5.52-cve-2008-0888.patch DELETED ---
--- unzip-5.52-long-filename.patch DELETED ---
--- unzip-5.52-makefile.patch DELETED ---
--- unzip-5.52-near-4GB.patch DELETED ---
--- unzip-5.52-near-4GB2.patch DELETED ---
--- unzip-5.52-open.patch DELETED ---
--- unzip-5.52-toctou.patch DELETED ---
--- unzip542-rpmoptflags.patch DELETED ---
More information about the scm-commits
mailing list