--- /dev/null
+--- unzip60-orig/unix/Makefile 2012-10-15 17:09:19.233392092 +0900
++++ unzip60/unix/Makefile 2012-10-15 17:37:26.721456601 +0900
+@@ -819,7 +819,7 @@
+ # Linux (Posix, approximately SysV): virtually any version since before 0.96,
+ # for any platform. Change "-O" to "-O3" or whatever, as desired...
+ linux_noasm: unix_make
+- $(MAKE) unzips CC=gcc LD=gcc CFLAGS="-O -Wall"
++ $(MAKE) unzips CC=gcc LD=gcc CFLAGS="-g -O -Wall"
+
+ # Linux with lcc compiler: __inline__ (stat.h) not recognized, and must edit
+ # /usr/include/gnu/types.h to get rid of "long long" if __LCC__ defined. -O3
<manifest>
- <request>
+ <request>
<domain name="_"/>
- </request>
+ </request>
+ <assign>
+ <filesystem path="/bin/*" label="_" exec_label="none" />
+ <filesystem path="/sbin/*" label="_" exec_label="none" />
+ <filesystem path="/usr/bin/*" label="_" exec_label="none" />
+ <filesystem path="/usr/sbin/*" label="_" exec_label="none" />
+ </assign>
</manifest>
Summary: A utility for unpacking zip files
Name: unzip
Version: 6.0
-Release: 9
-License: BSD
+Release: 11
+License: BSD-2.0
Group: Applications/Archiving
Source0: %{name}-%{version}.tar.gz
Source1001: packaging/unzip.manifest
# Not sent to upstream, as it's Fedora/RHEL specific.
# Modify the configure script not to request the strip of binaries.
Patch5: unzip-6.0-nostrip.patch
+Patch1002: unzip-6.0-make-debug.patch
URL: http://www.info-zip.org/pub/infozip/UnZip.html
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%patch3 -p1 -b .close
%patch4 -p1 -b .attribs-overflow
%patch5 -p1 -b .nostrip
+%patch1002 -p1 -b .make-debug
ln -s unix/Makefile Makefile
%build
cp %{SOURCE1001} .
-make CFLAGS="-D_LARGEFILE64_SOURCE" linux_noasm LF2="" %{?_smp_mflags}
+make CFLAGS="-D_LARGEFILE64_SOURCE" linux_noasm LF2="" %{?_smp_mflags} LOCAL_UNZIP=-DIZ_HAVE_UXUIDGID
%install
rm -rf $RPM_BUILD_ROOT
-make prefix=$RPM_BUILD_ROOT%{_prefix} MANDIR=$RPM_BUILD_ROOT/%{_mandir}/man1 INSTALL="cp -p" install LF2=""
+make prefix=$RPM_BUILD_ROOT%{_prefix} MANDIR=$RPM_BUILD_ROOT/%{_mandir}/man1 INSTALL="cp -p" install LF2=""
+
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/license
+for keyword in LICENSE COPYING COPYRIGHT;
+do
+ for file in `find %{_builddir} -name $keyword`;
+ do
+ cat $file >> $RPM_BUILD_ROOT%{_datadir}/license/%{name};
+ echo "";
+ done;
+done
%clean
rm -rf $RPM_BUILD_ROOT
%files
%manifest unzip.manifest
%defattr(-,root,root)
-%doc README BUGS LICENSE
+%doc README BUGS LICENSE
+%{_datadir}/license/%{name}
%{_bindir}/*
%doc %{_mandir}/*/*
#ifdef IZ_HAVE_UXUIDGID
if (eb_len >= EB_UX3_MINLEN
&& z_uidgid != NULL
- && (*((EB_HEADSIZE + 0) + ef_buf) == 1)
+ && (*((EB_HEADSIZE + 0) + ef_buf) == 1))
/* only know about version 1 */
{
uch uid_size;
flags &= ~0x0ff; /* ignore any previous UNIX field */
if ( read_ux3_value((EB_HEADSIZE + 2) + ef_buf,
- uid_size, z_uidgid[0])
+ uid_size, z_uidgid)
&&
read_ux3_value((EB_HEADSIZE + uid_size + 3) + ef_buf,
- gid_size, z_uidgid[1]) )
+ gid_size, z_uidgid + 1))
{
flags |= EB_UX2_VALID; /* signal success */
}
}
# endif /* !NO_LCHOWN */
# if (!defined(NO_LCHMOD))
- TTrace((stderr,
- "set_symlnk_attribs: restoring Unix attributes for\n %s\n",
- FnFilter1(slnk_entry->fname)));
- if (lchmod(slnk_entry->fname,
- filtattr(__G__ *(unsigned *)(zvoid *)slnk_entry->buf)))
- perror("lchmod (file attributes) error");
+ if (uO.X_flag >= 0) {
+ TTrace((stderr,
+ "set_symlnk_attribs: restoring Unix attributes for\n %s\n",
+ FnFilter1(slnk_entry->fname)));
+ if (lchmod(slnk_entry->fname,
+ filtattr(__G__ *(unsigned *)(zvoid *)slnk_entry->buf)))
+ perror("lchmod (file attributes) error");
+ }
# endif /* !NO_LCHMOD */
}
/* currently, no error propagation... */