From 284908b595ff6545b3b5903f816c578388d900ba Mon Sep 17 00:00:00 2001 From: "jk7744.park" Date: Wed, 9 Sep 2015 02:36:13 +0900 Subject: [PATCH] tizen 2.3.1 release --- packaging/unzip-6.0-make-debug.patch | 11 +++++++++++ packaging/unzip.manifest | 10 ++++++++-- packaging/unzip.spec | 23 ++++++++++++++++++----- process.c | 6 +++--- unix/unix.c | 14 ++++++++------ 5 files changed, 48 insertions(+), 16 deletions(-) create mode 100644 packaging/unzip-6.0-make-debug.patch mode change 100644 => 100755 packaging/unzip.spec diff --git a/packaging/unzip-6.0-make-debug.patch b/packaging/unzip-6.0-make-debug.patch new file mode 100644 index 0000000..28e7f15 --- /dev/null +++ b/packaging/unzip-6.0-make-debug.patch @@ -0,0 +1,11 @@ +--- 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 diff --git a/packaging/unzip.manifest b/packaging/unzip.manifest index 017d22d..ede5999 100644 --- a/packaging/unzip.manifest +++ b/packaging/unzip.manifest @@ -1,5 +1,11 @@ - + - + + + + + + + diff --git a/packaging/unzip.spec b/packaging/unzip.spec old mode 100644 new mode 100755 index 05ed6f0..368445d --- a/packaging/unzip.spec +++ b/packaging/unzip.spec @@ -2,8 +2,8 @@ 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 @@ -19,6 +19,7 @@ Patch4: unzip-6.0-attribs-overflow.patch # 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) @@ -40,16 +41,27 @@ a zip archive. %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 @@ -57,7 +69,8 @@ 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}/*/* diff --git a/process.c b/process.c index 1e9a1e1..612f6e0 100644 --- a/process.c +++ b/process.c @@ -2897,7 +2897,7 @@ unsigned ef_scan_for_izux(ef_buf, ef_len, ef_is_c, dos_mdatetime, #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; @@ -2909,10 +2909,10 @@ unsigned ef_scan_for_izux(ef_buf, ef_len, ef_is_c, dos_mdatetime, 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 */ } diff --git a/unix/unix.c b/unix/unix.c index efa97fc..42c0d25 100644 --- a/unix/unix.c +++ b/unix/unix.c @@ -1299,12 +1299,14 @@ int set_symlnk_attribs(__G__ slnk_entry) } # 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... */ -- 2.7.4