Accepting request 39794 from Archiving
Copy from Archiving/unzip based on submit request 39794 from user psmt OBS-URL: https://build.opensuse.org/request/show/39794 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/unzip?expand=0&rev=12
This commit is contained in:
parent
88a409789e
commit
94175f1a3d
176
unzip-5.52-use_librcc.patch
Normal file
176
unzip-5.52-use_librcc.patch
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
Author: Suren A. Chilingaryan <csa@dside.dyndns.org>
|
||||||
|
Description: Provides header file
|
||||||
|
|
||||||
|
Index: dsrecode.c
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ dsrecode.c 2010-05-10 18:00:17.972091018 +0200
|
||||||
|
@@ -0,0 +1,137 @@
|
||||||
|
+#include <librcc.h>
|
||||||
|
+
|
||||||
|
+static rcc_class_default_charset default_oem[] =
|
||||||
|
+{
|
||||||
|
+ { "ru", "IBM866" },
|
||||||
|
+ { NULL, NULL }
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static rcc_class_default_charset default_iso[] =
|
||||||
|
+{
|
||||||
|
+ { "ru", "CP1251" },
|
||||||
|
+ { NULL, NULL }
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+#define OEM_CLASS 0
|
||||||
|
+#define ISO_CLASS 1
|
||||||
|
+#define OUT_CLASS 2
|
||||||
|
+static rcc_class classes[] =
|
||||||
|
+{
|
||||||
|
+ { "oem", RCC_CLASS_STANDARD, NULL, default_oem, "OEM_INTERN", 0 },
|
||||||
|
+ { "iso", RCC_CLASS_STANDARD, NULL, default_iso, "ISO_INTERN", 0 },
|
||||||
|
+ { "out", RCC_CLASS_STANDARD, "LC_CTYPE", NULL, "Output", 0 },
|
||||||
|
+ { NULL }
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+int initialized = 0;
|
||||||
|
+
|
||||||
|
+#ifdef RCC_LAZY
|
||||||
|
+#include <dlfcn.h>
|
||||||
|
+# define RCC_LIBRARY "librcc.so.0"
|
||||||
|
+int (*rccInit2)(void);
|
||||||
|
+int (*rccFree2)(void);
|
||||||
|
+int (*rccInitDefaultContext2)(const char *locale_variable,
|
||||||
|
+ unsigned int max_languages,
|
||||||
|
+ unsigned int max_classes,
|
||||||
|
+ rcc_class_ptr defclasses,
|
||||||
|
+ rcc_init_flags flags);
|
||||||
|
+int (*rccInitDb42)(rcc_context ctx, const char *name, rcc_db4_flags flags);
|
||||||
|
+char* (*rccSizedRecode2)(rcc_context ctx, rcc_class_id from, rcc_class_id to,
|
||||||
|
+ const char *buf, size_t len, size_t *rlen);
|
||||||
|
+int (*rccLoad2)(rcc_context ctx, const char *name);
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static char *rccRecode2(rcc_context ctx, rcc_class_id from,
|
||||||
|
+ rcc_class_id to, const char *buf)
|
||||||
|
+{
|
||||||
|
+ return rccSizedRecode2(ctx, from, to, buf, 0, NULL);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void *rcc_handle;
|
||||||
|
+#else /* RCC_LAZY */
|
||||||
|
+#define rccInit2 rccInit
|
||||||
|
+#define rccFree2 rccFree
|
||||||
|
+#define rccInitDefaultContext2 rccInitDefaultContext
|
||||||
|
+#define rccInitDb42 rccInitDb4
|
||||||
|
+#define rccRecode2 rccRecode
|
||||||
|
+#define rccLoad2 rccLoad
|
||||||
|
+#endif /* RCC_LAZY */
|
||||||
|
+
|
||||||
|
+static void rccUnzipFree(void)
|
||||||
|
+{
|
||||||
|
+ if (initialized > 0) {
|
||||||
|
+ rccFree2();
|
||||||
|
+#ifdef RCC_LAZY
|
||||||
|
+ dlclose(rcc_handle);
|
||||||
|
+#endif /* RCC_LAZY */
|
||||||
|
+ initialized = 0;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static int rccUnzipInit(void)
|
||||||
|
+{
|
||||||
|
+ if (initialized) return 0;
|
||||||
|
+
|
||||||
|
+#ifdef RCC_LAZY
|
||||||
|
+ rcc_handle = dlopen(RCC_LIBRARY, RTLD_NOW);
|
||||||
|
+ if (!rcc_handle) {
|
||||||
|
+ initialized = -1;
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ rccInit2 = dlsym(rcc_handle, "rccInit");
|
||||||
|
+ rccFree2 = dlsym(rcc_handle, "rccFree");
|
||||||
|
+ rccInitDefaultContext2 = dlsym(rcc_handle, "rccInitDefaultContext");
|
||||||
|
+ rccInitDb42 = dlsym(rcc_handle, "rccInitDb4");
|
||||||
|
+ rccSizedRecode2 = dlsym(rcc_handle, "rccSizedRecode");
|
||||||
|
+ rccLoad2 = dlsym(rcc_handle, "rccLoad");
|
||||||
|
+
|
||||||
|
+ if ((!rccInit2) || (!rccFree2) || (!rccInitDefaultContext2) ||
|
||||||
|
+ (!rccInitDb42) || (!rccSizedRecode2) || (!rccLoad2)) {
|
||||||
|
+ dlclose(rcc_handle);
|
||||||
|
+ initialized = -1;
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+#endif /* RCC_LAZY */
|
||||||
|
+
|
||||||
|
+ rccInit2();
|
||||||
|
+ rccInitDefaultContext2(NULL, 0, 0, classes, 0);
|
||||||
|
+ rccLoad2(NULL, "zip");
|
||||||
|
+ rccInitDb42(NULL, NULL, 0);
|
||||||
|
+ atexit(rccUnzipFree);
|
||||||
|
+ initialized = 1;
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+void _DS_OEM_INTERN(char *string)
|
||||||
|
+{
|
||||||
|
+ char *str;
|
||||||
|
+ rccUnzipInit();
|
||||||
|
+
|
||||||
|
+ if (initialized>0) {
|
||||||
|
+ str = rccRecode2(NULL, OEM_CLASS, OUT_CLASS, string);
|
||||||
|
+
|
||||||
|
+ if (str) {
|
||||||
|
+ strncpy(string,str,FILNAMSIZ);
|
||||||
|
+ free(str);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void _DS_ISO_INTERN(char *string)
|
||||||
|
+{
|
||||||
|
+ char *str;
|
||||||
|
+ rccUnzipInit();
|
||||||
|
+
|
||||||
|
+ if (initialized>0) {
|
||||||
|
+ str = rccRecode2(NULL, ISO_CLASS, OUT_CLASS, string);
|
||||||
|
+
|
||||||
|
+ if (str) {
|
||||||
|
+ strncpy(string,str,FILNAMSIZ);
|
||||||
|
+ free(str);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
Index: fileio.c
|
||||||
|
===================================================================
|
||||||
|
--- fileio.c.orig 2010-05-10 18:00:17.912090858 +0200
|
||||||
|
+++ fileio.c 2010-05-10 18:00:17.976090793 +0200
|
||||||
|
@@ -78,7 +78,7 @@
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
#include "ebcdic.h" /* definition/initialization of ebcdic[] */
|
||||||
|
-
|
||||||
|
+#include "dsrecode.c"
|
||||||
|
|
||||||
|
/*
|
||||||
|
Note: Under Windows, the maximum size of the buffer that can be used
|
||||||
|
Index: unzpriv.h
|
||||||
|
===================================================================
|
||||||
|
--- unzpriv.h.orig 2010-05-10 18:00:17.848090721 +0200
|
||||||
|
+++ unzpriv.h 2010-05-10 18:00:18.016090830 +0200
|
||||||
|
@@ -2582,10 +2582,11 @@ char *GetLoadPath OF((__GPRO));
|
||||||
|
!(((islochdr) || (isuxatt)) && \
|
||||||
|
((hostver) == 25 || (hostver) == 26 || (hostver) == 40))) || \
|
||||||
|
(hostnum) == FS_HPFS_ || \
|
||||||
|
+ (hostnum) == UNIX_ || \
|
||||||
|
((hostnum) == FS_NTFS_ && (hostver) == 50)) { \
|
||||||
|
- _OEM_INTERN((string)); \
|
||||||
|
+ _DS_OEM_INTERN((string)); \
|
||||||
|
} else { \
|
||||||
|
- _ISO_INTERN((string)); \
|
||||||
|
+ _DS_ISO_INTERN((string)); \
|
||||||
|
}}
|
||||||
|
#endif
|
||||||
|
|
3348
unzip-near-4GB.patch
3348
unzip-near-4GB.patch
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,8 @@
|
|||||||
--- unix/Makefile
|
Index: unix/Makefile
|
||||||
+++ unix/Makefile
|
===================================================================
|
||||||
@@ -764,7 +764,7 @@
|
--- unix/Makefile.orig 2010-05-10 17:45:59.892090727 +0200
|
||||||
|
+++ unix/Makefile 2010-05-10 17:46:18.636090912 +0200
|
||||||
|
@@ -773,7 +773,7 @@ isi: unix_make
|
||||||
linux: unix_make
|
linux: unix_make
|
||||||
@echo 'NOTE: use linux_noasm target for non-Intel Linux compiles.'
|
@echo 'NOTE: use linux_noasm target for non-Intel Linux compiles.'
|
||||||
$(MAKE) unzips CC=gcc LD=gcc AS=gcc\
|
$(MAKE) unzips CC=gcc LD=gcc AS=gcc\
|
||||||
@ -9,7 +11,7 @@
|
|||||||
AF="-Di386 $(AF)" CRC32=crc_gcc
|
AF="-Di386 $(AF)" CRC32=crc_gcc
|
||||||
# GRR: this echo is pointless; if user gets this far, no difference to install
|
# GRR: this echo is pointless; if user gets this far, no difference to install
|
||||||
# @echo 'Be sure to use the install_asm target rather than the install target'
|
# @echo 'Be sure to use the install_asm target rather than the install target'
|
||||||
@@ -774,7 +774,7 @@
|
@@ -783,7 +783,7 @@ linux_asm: linux
|
||||||
# Linux (Posix, approximately SysV): virtually any version since before 0.96,
|
# Linux (Posix, approximately SysV): virtually any version since before 0.96,
|
||||||
# for any platform. Change "-O" to "-O3" or whatever, as desired...
|
# for any platform. Change "-O" to "-O3" or whatever, as desired...
|
||||||
linux_noasm: unix_make
|
linux_noasm: unix_make
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon May 10 16:39:20 UTC 2010 - pth@suse.de
|
||||||
|
|
||||||
|
- Use librcc to convert russian/slavic file names (bnc#540598).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Dec 6 17:51:30 CET 2009 - jengelh@.medozas.de
|
Sun Dec 6 17:51:30 CET 2009 - jengelh@.medozas.de
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ Provides: crunzip
|
|||||||
Obsoletes: crunzip
|
Obsoletes: crunzip
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Version: 5.52
|
Version: 5.52
|
||||||
Release: 143
|
Release: 144
|
||||||
Summary: A program to unpack compressed files
|
Summary: A program to unpack compressed files
|
||||||
Source: unzip552.tar.bz2
|
Source: unzip552.tar.bz2
|
||||||
Url: http://www.info-zip.org/
|
Url: http://www.info-zip.org/
|
||||||
@ -37,7 +37,9 @@ Patch6: unzip-near-4GB.patch
|
|||||||
Patch7: unzip-CVE-2005-2475.patch
|
Patch7: unzip-CVE-2005-2475.patch
|
||||||
Patch8: unzip-open_missing_mode.patch
|
Patch8: unzip-open_missing_mode.patch
|
||||||
Patch9: unzip-5.5.2-goo-sec.patch
|
Patch9: unzip-5.5.2-goo-sec.patch
|
||||||
|
Patch10: unzip-5.52-use_librcc.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
BuildRequires: librcc-devel
|
||||||
|
|
||||||
%description
|
%description
|
||||||
UnZip is an extraction utility for archives compressed in .zip format
|
UnZip is an extraction utility for archives compressed in .zip format
|
||||||
@ -63,10 +65,11 @@ Authors:
|
|||||||
%patch7
|
%patch7
|
||||||
%patch8
|
%patch8
|
||||||
%patch9
|
%patch9
|
||||||
|
%patch10
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export RPM_OPT_FLAGS="%optflags -DLARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fstack-protector"
|
export RPM_OPT_FLAGS="%optflags -DLARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fstack-protector"
|
||||||
make %{?jobs:-j%jobs} -f unix/Makefile LF2= linux_noasm
|
make %{?jobs:-j%jobs} -f unix/Makefile LF2=-lrcc linux_noasm
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
|
mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
|
||||||
|
Loading…
Reference in New Issue
Block a user