diff --git a/0001-zip-3.0-format-security.patch b/0001-zip-3.0-format-security.patch new file mode 100644 index 0000000000000000000000000000000000000000..54ce2e66281f3f8137e0b827e9e6e757a3813555 --- /dev/null +++ b/0001-zip-3.0-format-security.patch @@ -0,0 +1,20 @@ +--- a/zip.c ++++ a/zip.c +@@ -1028,7 +1028,7 @@ local void help_extended() + + for (i = 0; i < sizeof(text)/sizeof(char *); i++) + { +- printf(text[i]); ++ printf("%s", text[i]); + putchar('\n'); + } + #ifdef DOS +@@ -1225,7 +1225,7 @@ local void version_info() + CR_MAJORVER, CR_MINORVER, CR_BETA_VER, CR_VERSION_DATE); + for (i = 0; i < sizeof(cryptnote)/sizeof(char *); i++) + { +- printf(cryptnote[i]); ++ printf("%s", cryptnote[i]); + putchar('\n'); + } + ++i; /* crypt support means there IS at least one compilation option */ diff --git a/zip-3.0.tar.gz b/zip-3.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..57f60be499bef90ccf84fe47d522d32504609e9b Binary files /dev/null and b/zip-3.0.tar.gz differ diff --git a/zip.spec b/zip.spec new file mode 100644 index 0000000000000000000000000000000000000000..922903e2f6870c3f1c8eeef77a9e0349fe984fed --- /dev/null +++ b/zip.spec @@ -0,0 +1,54 @@ +%define anolis_release 1 +Name: zip +Version: 3.0 +Release: %{anolis_release}%{?dist} +License: BSD +URL: http://www.info-zip.org/Zip.html +Source: http://downloads.sourceforge.net/infozip/%{name}30.tar.gz#/%{name}-%{version}.tar.gz +Summary: A file compression and packaging utility compatible with PKZIP + +Patch1: 0001-zip-3.0-format-security.patch + +BuildRequires: make +BuildRequires: bzip2-devel, gcc +Requires: unzip + +%description +The zip program is a compression and file packaging utility. Zip is +analogous to a combination of the UNIX tar and compress commands and +is compatible with PKZIP (a compression and file packaging utility for +MS-DOS systems). + +Install the zip package if you need to compress files using the zip +program. + +%prep +%setup -q -n zip30 +%patch1 -p1 -b .format-security + +%build +%{make_build} -f unix/Makefile prefix=%{_prefix} "CFLAGS_NOOPT=-I. -DUNIX $RPM_OPT_FLAGS" generic + +%install +mkdir -p $RPM_BUILD_ROOT%{_bindir} +mkdir -p $RPM_BULD_ROOT%{_mandir}/man1 + +%{make_install} -f unix/Makefile prefix=$RPM_BUILD_ROOT%{_prefix} \ + MANDIR=$RPM_BUILD_ROOT%{_mandir}/man1 + +%files +%license LICENSE +%doc README CHANGES TODO WHATSNEW WHERE README.CR +%doc proginfo/algorith.txt +%{_bindir}/zipnote +%{_bindir}/zipsplit +%{_bindir}/zip +%{_bindir}/zipcloak +%{_mandir}/man1/zip.1* +%{_mandir}/man1/zipcloak.1* +%{_mandir}/man1/zipnote.1* +%{_mandir}/man1/zipsplit.1* + +%changelog +* Thu Apr 21 2022 yuanhui - 3.0-1 +- Init zip for anolis os 23