diff --git a/.gitignore b/.gitignore index 570927e..a70d0d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /p7zip_9.13_src_all-norar.tar.bz2 /p7zip_9.20.1_src_all-norar.tar.bz2 +/p7zip_15.09_src_all-norar.tar.bz2 diff --git a/p7zip-15.09-CVE-2015-1038.patch b/p7zip-15.09-CVE-2015-1038.patch new file mode 100644 index 0000000..5da28c5 --- /dev/null +++ b/p7zip-15.09-CVE-2015-1038.patch @@ -0,0 +1,290 @@ +Author: Ben Hutchings +Date: Tue, 19 May 2015 02:38:40 +0100 +Description: Delay creation of symlinks to prevent arbitrary file writes (CVE-2015-1038) +Bug: http://sourceforge.net/p/p7zip/bugs/147/ +Bug-Debian: https://bugs.debian.org/774660 + +Alexander Cherepanov discovered that 7zip is susceptible to a +directory traversal vulnerability. While extracting an archive, it +will extract symlinks and then follow them if they are referenced in +further entries. This can be exploited by a rogue archive to write +files outside the current directory. + +We have to create placeholder files (which we already do) and delay +creating symlinks until the end of extraction. + +Due to the possibility of anti-items (deletions) in the archive, it is +possible for placeholders to be deleted and replaced before we create +the symlinks. It's not clear that this can be used for mischief, but +GNU tar guards against similar problems by checking that the placeholder +still exists and is the same inode. XXX It also checks 'birth time' but +this isn't portable. We can probably get away with comparing ctime +since we don't support hard links. + +diff -rup p7zip_15.09.orig/CPP/7zip/UI/Agent/Agent.cpp p7zip_15.09/CPP/7zip/UI/Agent/Agent.cpp +--- p7zip_15.09.orig/CPP/7zip/UI/Agent/Agent.cpp 2015-09-17 20:02:35.000000000 +0100 ++++ p7zip_15.09/CPP/7zip/UI/Agent/Agent.cpp 2015-12-03 02:22:47.073724194 +0000 +@@ -1515,7 +1515,7 @@ STDMETHODIMP CAgentFolder::Extract(const + HRESULT result = _agentSpec->GetArchive()->Extract(&realIndices.Front(), + realIndices.Size(), testMode, extractCallback); + if (result == S_OK) +- result = extractCallbackSpec->SetDirsTimes(); ++ result = extractCallbackSpec->SetFinalAttribs(); + return result; + COM_TRY_END + } +diff -rup p7zip_15.09.orig/CPP/7zip/UI/Client7z/Client7z.cpp p7zip_15.09/CPP/7zip/UI/Client7z/Client7z.cpp +--- p7zip_15.09.orig/CPP/7zip/UI/Client7z/Client7z.cpp 2015-10-17 15:52:30.000000000 +0100 ++++ p7zip_15.09/CPP/7zip/UI/Client7z/Client7z.cpp 2015-12-03 02:22:47.073724194 +0000 +@@ -230,8 +230,11 @@ private: + COutFileStream *_outFileStreamSpec; + CMyComPtr _outFileStream; + ++ CObjectVector _delayedSymLinks; ++ + public: + void Init(IInArchive *archiveHandler, const FString &directoryPath); ++ HRESULT SetFinalAttribs(); + + UInt64 NumErrors; + bool PasswordIsDefined; +@@ -449,11 +452,23 @@ STDMETHODIMP CArchiveExtractCallback::Se + } + _outFileStream.Release(); + if (_extractMode && _processedFileInfo.AttribDefined) +- SetFileAttrib(_diskFilePath, _processedFileInfo.Attrib); ++ SetFileAttrib(_diskFilePath, _processedFileInfo.Attrib, &_delayedSymLinks); + PrintNewLine(); + return S_OK; + } + ++HRESULT CArchiveExtractCallback::SetFinalAttribs() ++{ ++ HRESULT result = S_OK; ++ ++ for (int i = 0; i != _delayedSymLinks.Size(); ++i) ++ if (!_delayedSymLinks[i].Create()) ++ result = E_FAIL; ++ ++ _delayedSymLinks.Clear(); ++ ++ return result; ++} + + STDMETHODIMP CArchiveExtractCallback::CryptoGetTextPassword(BSTR *password) + { +@@ -914,6 +929,8 @@ int MY_CDECL main(int numArgs, const cha + // extractCallbackSpec->PasswordIsDefined = true; + // extractCallbackSpec->Password = L"1"; + HRESULT result = archive->Extract(NULL, (UInt32)(Int32)(-1), false, extractCallback); ++ if (result == S_OK) ++ result = extractCallbackSpec->SetFinalAttribs(); + if (result != S_OK) + { + PrintError("Extract Error"); +diff -rup p7zip_15.09.orig/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp p7zip_15.09/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp +--- p7zip_15.09.orig/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp 2015-10-03 09:49:15.000000000 +0100 ++++ p7zip_15.09/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp 2015-12-03 02:24:40.444963545 +0000 +@@ -1502,7 +1502,7 @@ STDMETHODIMP CArchiveExtractCallback::Se + NumFiles++; + + if (!_stdOutMode && _extractMode && _fi.AttribDefined) +- SetFileAttrib(_diskFilePath, _fi.Attrib); ++ SetFileAttrib(_diskFilePath, _fi.Attrib, &_delayedSymLinks); + + RINOK(_extractCallback2->SetOperationResult(opRes, BoolToInt(_encrypted))); + +@@ -1584,8 +1584,9 @@ static unsigned GetNumSlashes(const FCha + } + } + +-HRESULT CArchiveExtractCallback::SetDirsTimes() ++HRESULT CArchiveExtractCallback::SetFinalAttribs() + { ++ HRESULT result = S_OK; + CRecordVector pairs; + pairs.ClearAndSetSize(_extractedFolderPaths.Size()); + unsigned i; +@@ -1622,5 +1623,12 @@ HRESULT CArchiveExtractCallback::SetDirs + (WriteATime && ATimeDefined) ? &ATime : NULL, + (WriteMTime && MTimeDefined) ? &MTime : (_arc->MTimeDefined ? &_arc->MTime : NULL)); + } +- return S_OK; ++ ++ for (int i = 0; i != _delayedSymLinks.Size(); ++i) ++ if (!_delayedSymLinks[i].Create()) ++ result = E_FAIL; ++ ++ _delayedSymLinks.Clear(); ++ ++ return result; + } +diff -rup p7zip_15.09.orig/CPP/7zip/UI/Common/ArchiveExtractCallback.h p7zip_15.09/CPP/7zip/UI/Common/ArchiveExtractCallback.h +--- p7zip_15.09.orig/CPP/7zip/UI/Common/ArchiveExtractCallback.h 2015-10-03 11:29:09.000000000 +0100 ++++ p7zip_15.09/CPP/7zip/UI/Common/ArchiveExtractCallback.h 2015-12-03 02:22:47.074724204 +0000 +@@ -6,6 +6,8 @@ + #include "../../../Common/MyCom.h" + #include "../../../Common/Wildcard.h" + ++#include "../../../Windows/FileDir.h" ++ + #include "../../IPassword.h" + + #include "../../Common/FileStreams.h" +@@ -237,6 +239,8 @@ class CArchiveExtractCallback: + bool _saclEnabled; + #endif + ++ CObjectVector _delayedSymLinks; ++ + void CreateComplexDirectory(const UStringVector &dirPathParts, FString &fullPath); + HRESULT GetTime(int index, PROPID propID, FILETIME &filetime, bool &filetimeIsDefined); + HRESULT GetUnpackSize(); +@@ -330,7 +334,7 @@ public: + } + #endif + +- HRESULT SetDirsTimes(); ++ HRESULT SetFinalAttribs(); + }; + + bool CensorNode_CheckPath(const NWildcard::CCensorNode &node, const CReadArcItem &item); +diff -rup p7zip_15.09.orig/CPP/7zip/UI/Common/Extract.cpp p7zip_15.09/CPP/7zip/UI/Common/Extract.cpp +--- p7zip_15.09.orig/CPP/7zip/UI/Common/Extract.cpp 2015-09-07 20:47:32.000000000 +0100 ++++ p7zip_15.09/CPP/7zip/UI/Common/Extract.cpp 2015-12-03 02:22:47.075724215 +0000 +@@ -207,7 +207,7 @@ static HRESULT DecompressArchive( + else + result = archive->Extract(&realIndices.Front(), realIndices.Size(), testMode, ecs); + if (result == S_OK && !options.StdInMode) +- result = ecs->SetDirsTimes(); ++ result = ecs->SetFinalAttribs(); + return callback->ExtractResult(result); + } + +diff -rup p7zip_15.09.orig/CPP/Windows/FileDir.cpp p7zip_15.09/CPP/Windows/FileDir.cpp +--- p7zip_15.09.orig/CPP/Windows/FileDir.cpp 2015-10-10 13:37:41.000000000 +0100 ++++ p7zip_15.09/CPP/Windows/FileDir.cpp 2015-12-03 02:22:47.075724215 +0000 +@@ -347,7 +347,8 @@ static int convert_to_symlink(const char + return -1; + } + +-bool SetFileAttrib(CFSTR fileName, DWORD fileAttributes) ++bool SetFileAttrib(CFSTR fileName, DWORD fileAttributes, ++ CObjectVector *delayedSymLinks) + { + if (!fileName) { + SetLastError(ERROR_PATH_NOT_FOUND); +@@ -379,7 +380,9 @@ bool SetFileAttrib(CFSTR fileName, DWORD + stat_info.st_mode = fileAttributes >> 16; + #ifdef ENV_HAVE_LSTAT + if (S_ISLNK(stat_info.st_mode)) { +- if ( convert_to_symlink(name) != 0) { ++ if (delayedSymLinks) ++ delayedSymLinks->Add(CDelayedSymLink(name)); ++ else if ( convert_to_symlink(name) != 0) { + TRACEN((printf("SetFileAttrib(%s,%d) : false-3\n",(const char *)name,fileAttributes))) + return false; + } +@@ -814,6 +817,43 @@ bool CTempDir::Remove() + return !_mustBeDeleted; + } + ++#ifdef ENV_UNIX ++ ++CDelayedSymLink::CDelayedSymLink(const char * source) ++ : _source(source) ++{ ++ struct stat st; ++ ++ if (lstat(_source, &st) == 0) { ++ _dev = st.st_dev; ++ _ino = st.st_ino; ++ } else { ++ _dev = 0; ++ } ++} ++ ++bool CDelayedSymLink::Create() ++{ ++ struct stat st; ++ ++ if (_dev == 0) { ++ errno = EPERM; ++ return false; ++ } ++ if (lstat(_source, &st) != 0) ++ return false; ++ if (_dev != st.st_dev || _ino != st.st_ino) { ++ // Placeholder file has been overwritten or moved by another ++ // symbolic link creation ++ errno = EPERM; ++ return false; ++ } ++ ++ return convert_to_symlink(_source) == 0; ++} ++ ++#endif // ENV_UNIX ++ + }}} + + #ifndef _SFX +diff -rup p7zip_15.09.orig/CPP/Windows/FileDir.h p7zip_15.09/CPP/Windows/FileDir.h +--- p7zip_15.09.orig/CPP/Windows/FileDir.h 2015-06-19 11:52:06.000000000 +0100 ++++ p7zip_15.09/CPP/Windows/FileDir.h 2015-12-03 02:22:47.075724215 +0000 +@@ -4,6 +4,7 @@ + #define __WINDOWS_FILE_DIR_H + + #include "../Common/MyString.h" ++#include "../Common/MyVector.h" + + #include "FileIO.h" + +@@ -11,11 +12,14 @@ namespace NWindows { + namespace NFile { + namespace NDir { + ++class CDelayedSymLink; ++ + bool GetWindowsDir(FString &path); + bool GetSystemDir(FString &path); + + bool SetDirTime(CFSTR path, const FILETIME *cTime, const FILETIME *aTime, const FILETIME *mTime); +-bool SetFileAttrib(CFSTR path, DWORD attrib); ++bool SetFileAttrib(CFSTR path, DWORD attrib, ++ CObjectVector *delayedSymLinks = 0); + bool MyMoveFile(CFSTR existFileName, CFSTR newFileName); + + #ifndef UNDER_CE +@@ -76,6 +80,31 @@ public: + bool Remove(); + }; + ++// Symbolic links must be created last so that they can't be used to ++// create or overwrite files above the extraction directory. ++class CDelayedSymLink ++{ ++#ifdef ENV_UNIX ++ // Where the symlink should be created. The target is specified in ++ // the placeholder file. ++ AString _source; ++ ++ // Device and inode of the placeholder file. Before creating the ++ // symlink, we must check that these haven't been changed by creation ++ // of another symlink. ++ dev_t _dev; ++ ino_t _ino; ++ ++public: ++ explicit CDelayedSymLink(const char * source); ++ bool Create(); ++#else // !ENV_UNIX ++public: ++ CDelayedSymLink(const char * source) {} ++ bool Create() { return true; } ++#endif // ENV_UNIX ++}; ++ + #if !defined(UNDER_CE) + class CCurrentDirRestorer + { diff --git a/p7zip.spec b/p7zip.spec index 57be1d6..c4a0887 100644 --- a/p7zip.spec +++ b/p7zip.spec @@ -1,7 +1,7 @@ Summary: Very high compression ratio file archiver Name: p7zip -Version: 9.20.1 -Release: 2%{?dist} +Version: 15.09 +Release: 4%{?dist} # Files under C/Compress/Lzma/ are dual LGPL or CPL License: LGPLv2 and (LGPLv2+ or CPL) Group: Applications/Archiving @@ -12,14 +12,15 @@ URL: http://p7zip.sourceforge.net/ # wget http://downloads.sf.net/p7zip/p7zip_${VERSION}_src_all.tar.bz2 # tar xjvf p7zip_${VERSION}_src_all.tar.bz2 # rm -rf p7zip_${VERSION}/CPP/7zip/{Archive,Compress,Crypto}/Rar* -# rm -f p7zip_${VERSION}/DOCS/unRarLicense.txt +# rm p7zip_${VERSION}/DOC/unRarLicense.txt # tar --numeric-owner -cjvf p7zip_${VERSION}_src_all-norar.tar.bz2 p7zip_${VERSION} Source: p7zip_%{version}_src_all-norar.tar.bz2 -Patch0: p7zip_9.20.1-norar.patch -Patch1: p7zip_9.20.1-install.patch -Patch2: p7zip_9.20.1-nostrip.patch -Patch3: p7zip_9.20.1-execstack.patch -Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root +Patch0: p7zip_15.09-norar_cmake.patch +Patch1: p7zip_15.09-s390.patch +Patch2: p7zip-15.09-CVE-2015-1038.patch + +BuildRequires: cmake +# BuildRequires: wxGTK3-devel wxGTK-devel # for 7zG GUI %ifarch %{ix86} BuildRequires: nasm %endif @@ -43,13 +44,12 @@ This package contains also a virtual file system for Midnight Commander. %prep %setup -q -n %{name}_%{version} -%patch0 -p1 -b .norar -%patch1 -p1 -b .install -%patch2 -p1 -b .nostrip -%patch3 -p1 -b .execstack +%patch0 -p1 -b .norar_cmake +%patch1 -p1 -b .s390 +%patch2 -p1 -b .CVE-2015-1038 # Move docs early so that they don't get installed by "make install" and we # can include them in %%doc -mv DOCS docs +mv DOC docs mv ChangeLog README TODO docs/ # And fix useless executable bit while we're at it find docs -type f -exec chmod -x {} \; @@ -57,6 +57,9 @@ find contrib -type f -exec chmod -x {} \; %build +pushd CPP/7zip/CMAKE/ +./generate.sh +popd %ifarch %{ix86} cp -f makefile.linux_x86_asm_gcc_4.X makefile.machine %endif @@ -76,7 +79,6 @@ make %{?_smp_mflags} all2 \ %install -rm -rf %{buildroot} make install \ DEST_DIR=%{buildroot} \ DEST_HOME=%{_prefix} \ @@ -85,12 +87,7 @@ make install \ DEST_MAN=%{_mandir} -%clean -rm -rf %{buildroot} - - %files -%defattr(-,root,root,-) %doc docs/* %{_bindir}/7za %dir %{_libexecdir}/p7zip/ @@ -100,9 +97,9 @@ rm -rf %{buildroot} %exclude %{_mandir}/man1/7zr.1* %files plugins -%defattr(-,root,root,-) %doc contrib/ %{_bindir}/7z +%dir %{_libexecdir}/p7zip/ %{_libexecdir}/p7zip/7z %{_libexecdir}/p7zip/7z.so #{_libexecdir}/p7zip/Codecs/ @@ -111,6 +108,47 @@ rm -rf %{buildroot} %changelog +* Thu Dec 03 2015 Sérgio Basto - 15.09-4 +- Fix CVE-2015-1038 (#1179505) + +* Wed Dec 02 2015 Sérgio Basto - 15.09-3 +- Fix build on s390 architecture (#1286992) + +* Thu Nov 12 2015 Sérgio Basto - 15.09-2 +- fix rhbz #917366 + +* Thu Nov 05 2015 Sérgio Basto - 15.09-1 +- Update to p7zip_15.09 +- Use cmake. +- Refactor norar patch. +- Deleted: p7zip_9.20.1-execstack.patch (upstreamed) +- Deleted: p7zip_9.20.1-install.patch (upstreamed) +- Deleted: p7zip_9.20.1-nostrip.patch (upstreamed) + +* Thu Jun 18 2015 Fedora Release Engineering - 9.20.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat May 02 2015 Kalev Lember - 9.20.1-9 +- Rebuilt for GCC 5 C++11 ABI change + +* Sun Aug 17 2014 Fedora Release Engineering - 9.20.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Fri Jun 06 2014 Fedora Release Engineering - 9.20.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat Aug 03 2013 Fedora Release Engineering - 9.20.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 9.20.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Jul 20 2012 Fedora Release Engineering - 9.20.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 9.20.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Tue Jul 26 2011 Matthias Saou 9.20.1-2 - Execstack patch to fix what's wanted by the yasm code (#718778). diff --git a/p7zip_15.09-norar_cmake.patch b/p7zip_15.09-norar_cmake.patch new file mode 100644 index 0000000..f9c7540 --- /dev/null +++ b/p7zip_15.09-norar_cmake.patch @@ -0,0 +1,148 @@ +diff -rup p7zip_15.09.orig/CPP/7zip/CMAKE/generate.sh p7zip_15.09/CPP/7zip/CMAKE/generate.sh +--- p7zip_15.09.orig/CPP/7zip/CMAKE/generate.sh 2015-01-18 17:14:54.000000000 +0000 ++++ p7zip_15.09/CPP/7zip/CMAKE/generate.sh 2015-11-05 03:55:11.789432894 +0000 +@@ -15,14 +15,14 @@ CURDIR=$PWD + cd $CURDIR + doit "Unix" "Unix Makefiles" + +-cd $CURDIR +-doit "codeblocks" "CodeBlocks - Unix Makefiles" ++#cd $CURDIR ++#doit "codeblocks" "CodeBlocks - Unix Makefiles" + + #cd $CURDIR + #doit "KDevelop3" "KDevelop3" + +-cd $CURDIR +-doit "EclipseCDT4" "Eclipse CDT4 - Unix Makefiles" ++#cd $CURDIR ++#doit "EclipseCDT4" "Eclipse CDT4 - Unix Makefiles" + + #cd $CURDIR + #doit "ninja" "Ninja" +diff -rup p7zip_15.09.orig/CPP/7zip/CMAKE/Format7zFree/CMakeLists.txt p7zip_15.09/CPP/7zip/CMAKE/Format7zFree/CMakeLists.txt +--- p7zip_15.09.orig/CPP/7zip/CMAKE/Format7zFree/CMakeLists.txt 2015-10-10 13:30:03.000000000 +0100 ++++ p7zip_15.09/CPP/7zip/CMAKE/Format7zFree/CMakeLists.txt 2015-11-05 04:21:50.386888680 +0000 +@@ -127,8 +127,6 @@ add_library(7z MODULE + "../../../../CPP/7zip/Archive/PeHandler.cpp" + "../../../../CPP/7zip/Archive/PpmdHandler.cpp" + "../../../../CPP/7zip/Archive/QcowHandler.cpp" +- "../../../../CPP/7zip/Archive/Rar/RarHandler.cpp" +- "../../../../CPP/7zip/Archive/Rar/Rar5Handler.cpp" + "../../../../CPP/7zip/Archive/RpmHandler.cpp" + "../../../../CPP/7zip/Archive/SplitHandler.cpp" + "../../../../CPP/7zip/Archive/SquashfsHandler.cpp" +@@ -231,9 +229,6 @@ add_library(7z MODULE + "../../../../CPP/7zip/Crypto/MyAesReg.cpp" + "../../../../CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp" + "../../../../CPP/7zip/Crypto/RandGen.cpp" +- "../../../../CPP/7zip/Crypto/Rar20Crypto.cpp" +- "../../../../CPP/7zip/Crypto/Rar5Aes.cpp" +- "../../../../CPP/7zip/Crypto/RarAes.cpp" + "../../../../CPP/7zip/Crypto/WzAes.cpp" + "../../../../CPP/7zip/Crypto/ZipCrypto.cpp" + "../../../../CPP/7zip/Crypto/ZipStrong.cpp" +--- p7zip_15.09.orig/CPP/7zip/Bundles/Format7zFree/makefile.list 2015-10-10 13:30:03.000000000 +0100 ++++ p7zip_15.09/CPP/7zip/Bundles/Format7zFree/makefile.list 2015-11-05 13:22:50.715659911 +0000 +@@ -89,8 +89,6 @@ SRCS=\ + ../../../../CPP/7zip/Archive/PeHandler.cpp \ + ../../../../CPP/7zip/Archive/PpmdHandler.cpp \ + ../../../../CPP/7zip/Archive/QcowHandler.cpp \ +- ../../../../CPP/7zip/Archive/Rar/RarHandler.cpp \ +- ../../../../CPP/7zip/Archive/Rar/Rar5Handler.cpp \ + ../../../../CPP/7zip/Archive/RpmHandler.cpp \ + ../../../../CPP/7zip/Archive/SplitHandler.cpp \ + ../../../../CPP/7zip/Archive/SquashfsHandler.cpp \ +@@ -193,9 +191,6 @@ SRCS=\ + ../../../../CPP/7zip/Crypto/MyAesReg.cpp \ + ../../../../CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp \ + ../../../../CPP/7zip/Crypto/RandGen.cpp \ +- ../../../../CPP/7zip/Crypto/Rar20Crypto.cpp \ +- ../../../../CPP/7zip/Crypto/Rar5Aes.cpp \ +- ../../../../CPP/7zip/Crypto/RarAes.cpp \ + ../../../../CPP/7zip/Crypto/WzAes.cpp \ + ../../../../CPP/7zip/Crypto/ZipCrypto.cpp \ + ../../../../CPP/7zip/Crypto/ZipStrong.cpp \ +@@ -491,10 +486,6 @@ PpmdHandler.o : ../../../../CPP/7zip/Arc + $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Archive/PpmdHandler.cpp + QcowHandler.o : ../../../../CPP/7zip/Archive/QcowHandler.cpp + $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Archive/QcowHandler.cpp +-RarHandler.o : ../../../../CPP/7zip/Archive/Rar/RarHandler.cpp +- $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Archive/Rar/RarHandler.cpp +-Rar5Handler.o : ../../../../CPP/7zip/Archive/Rar/Rar5Handler.cpp +- $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Archive/Rar/Rar5Handler.cpp + RpmHandler.o : ../../../../CPP/7zip/Archive/RpmHandler.cpp + $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Archive/RpmHandler.cpp + SplitHandler.o : ../../../../CPP/7zip/Archive/SplitHandler.cpp +@@ -699,12 +690,6 @@ Pbkdf2HmacSha1.o : ../../../../CPP/7zip/ + $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp + RandGen.o : ../../../../CPP/7zip/Crypto/RandGen.cpp + $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Crypto/RandGen.cpp +-Rar20Crypto.o : ../../../../CPP/7zip/Crypto/Rar20Crypto.cpp +- $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Crypto/Rar20Crypto.cpp +-Rar5Aes.o : ../../../../CPP/7zip/Crypto/Rar5Aes.cpp +- $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Crypto/Rar5Aes.cpp +-RarAes.o : ../../../../CPP/7zip/Crypto/RarAes.cpp +- $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Crypto/RarAes.cpp + WzAes.o : ../../../../CPP/7zip/Crypto/WzAes.cpp + $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Crypto/WzAes.cpp + ZipCrypto.o : ../../../../CPP/7zip/Crypto/ZipCrypto.cpp +@@ -877,8 +862,6 @@ OBJS=\ + PeHandler.o \ + PpmdHandler.o \ + QcowHandler.o \ +- RarHandler.o \ +- Rar5Handler.o \ + RpmHandler.o \ + SplitHandler.o \ + SquashfsHandler.o \ +@@ -981,9 +964,6 @@ OBJS=\ + MyAesReg.o \ + Pbkdf2HmacSha1.o \ + RandGen.o \ +- Rar20Crypto.o \ +- Rar5Aes.o \ +- RarAes.o \ + WzAes.o \ + ZipCrypto.o \ + ZipStrong.o \ +--- p7zip_15.09.orig/makefile 2015-10-05 09:39:57.000000000 +0100 ++++ p7zip_15.09/makefile 2015-11-05 13:36:01.160793573 +0000 +@@ -70,7 +70,6 @@ depend: + $(MAKE) -C CPP/7zip/UI/Client7z depend + $(MAKE) -C CPP/7zip/UI/Console depend + $(MAKE) -C CPP/7zip/Bundles/Format7zFree depend +- $(MAKE) -C CPP/7zip/Compress/Rar depend + $(MAKE) -C CPP/7zip/UI/GUI depend + $(MAKE) -C CPP/7zip/UI/FileManager depend + +@@ -81,7 +80,6 @@ sfx: common + common7z:common + $(MKDIR) bin/Codecs + $(MAKE) -C CPP/7zip/Bundles/Format7zFree all +- $(MAKE) -C CPP/7zip/Compress/Rar all + + 7z: common7z + $(MAKE) -C CPP/7zip/UI/Console all +@@ -106,7 +104,6 @@ clean: + $(MAKE) -C CPP/7zip/UI/FileManager clean + $(MAKE) -C CPP/7zip/UI/GUI clean + $(MAKE) -C CPP/7zip/Bundles/Format7zFree clean +- $(MAKE) -C CPP/7zip/Compress/Rar clean + $(MAKE) -C CPP/7zip/Bundles/LzmaCon clean2 + $(MAKE) -C CPP/7zip/Bundles/AloneGCOV clean + $(MAKE) -C CPP/7zip/TEST/TestUI clean +--- p7zip_15.09.orig/CPP/7zip/CMAKE/CMakeLists.txt 2015-06-21 20:53:26.000000000 +0100 ++++ p7zip_15.09/CPP/7zip/CMAKE/CMakeLists.txt 2015-11-05 14:35:42.849613481 +0000 +@@ -27,9 +27,9 @@ add_subdirectory(7za) + + add_subdirectory(7z_) + +-add_subdirectory(7zG) ++#add_subdirectory(7zG) + +-add_subdirectory(7zFM) ++#add_subdirectory(7zFM) + + add_subdirectory(7zr) + diff --git a/p7zip_15.09-s390.patch b/p7zip_15.09-s390.patch new file mode 100644 index 0000000..5ae3af2 --- /dev/null +++ b/p7zip_15.09-s390.patch @@ -0,0 +1,11 @@ +--- p7zip_15.09.orig/C/CpuArch.h 2015-09-27 15:31:20.000000000 -0400 ++++ p7zip_15.09/C/CpuArch.h 2015-12-01 06:16:38.000000000 -0500 +@@ -77,7 +77,7 @@ + || defined(__MIPSEB) \ + || defined(_MIPSEB) \ + || defined(__m68k__) \ +- || defined(__s390x__) ++ || defined(__s390__) + #define MY_CPU_BE + #endif + diff --git a/p7zip_9.20.1-execstack.patch b/p7zip_9.20.1-execstack.patch deleted file mode 100644 index 1fdff48..0000000 --- a/p7zip_9.20.1-execstack.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -Naupr p7zip_9.20.1.orig/Asm/x64/7zCrcT8U.asm p7zip_9.20.1/Asm/x64/7zCrcT8U.asm ---- p7zip_9.20.1.orig/Asm/x64/7zCrcT8U.asm 2008-08-14 11:18:07.000000000 +0200 -+++ p7zip_9.20.1/Asm/x64/7zCrcT8U.asm 2011-07-26 17:43:57.727910278 +0200 -@@ -101,3 +101,8 @@ _CrcUpdateT8: - ret - - end -+ -+%ifidn __OUTPUT_FORMAT__,elf -+section .note.GNU-stack noalloc noexec nowrite progbits -+%endif -+ -diff -Naupr p7zip_9.20.1.orig/Asm/x86/7zCrcT8U.asm p7zip_9.20.1/Asm/x86/7zCrcT8U.asm ---- p7zip_9.20.1.orig/Asm/x86/7zCrcT8U.asm 2009-07-14 12:44:15.000000000 +0200 -+++ p7zip_9.20.1/Asm/x86/7zCrcT8U.asm 2011-07-26 17:44:23.938864508 +0200 -@@ -99,3 +99,8 @@ _CrcUpdateT8: - - - ; end -+ -+%ifidn __OUTPUT_FORMAT__,elf -+section .note.GNU-stack noalloc noexec nowrite progbits -+%endif -+ diff --git a/p7zip_9.20.1-install.patch b/p7zip_9.20.1-install.patch deleted file mode 100644 index 8e63e6d..0000000 --- a/p7zip_9.20.1-install.patch +++ /dev/null @@ -1,99 +0,0 @@ -diff -Naupr p7zip_9.20.1.orig/install.sh p7zip_9.20.1/install.sh ---- p7zip_9.20.1.orig/install.sh 2011-03-16 20:32:56.000000000 +0100 -+++ p7zip_9.20.1/install.sh 2011-07-26 14:07:09.609064252 +0200 -@@ -7,12 +7,10 @@ installShared() - then - echo "- installing ${DEST_DIR}${DEST_BIN}/${prg}" - cp bin/${prg} "${DEST_DIR}${DEST_SHARE}/${prg}" -- chmod 777 "${DEST_DIR}${DEST_SHARE}/${prg}" -- strip "${DEST_DIR}${DEST_SHARE}/${prg}" -- chmod 555 "${DEST_DIR}${DEST_SHARE}/${prg}" -+ chmod 755 "${DEST_DIR}${DEST_SHARE}/${prg}" - echo "#! /bin/sh" > "${DEST_DIR}${DEST_BIN}/${prg}" - echo "\"${DEST_SHARE}/${prg}\" \"\$@\"" >> "${DEST_DIR}${DEST_BIN}/${prg}" -- chmod 555 "${DEST_DIR}${DEST_BIN}/${prg}" -+ chmod 755 "${DEST_DIR}${DEST_BIN}/${prg}" - fi - } - -@@ -117,7 +115,7 @@ else - echo "- installing ${DEST_DIR}${DEST_BIN}/7za" - mkdir -p "${DEST_DIR}${DEST_BIN}" - cp bin/7za "${DEST_DIR}${DEST_BIN}/7za" -- chmod 555 "${DEST_DIR}${DEST_BIN}/7za" -+ chmod 755 "${DEST_DIR}${DEST_BIN}/7za" - fi - - if [ -x bin/7zr ] -@@ -125,7 +123,7 @@ else - echo "- installing ${DEST_DIR}${DEST_BIN}/7zr" - mkdir -p "${DEST_DIR}${DEST_BIN}" - cp bin/7zr "${DEST_DIR}${DEST_BIN}/7zr" -- chmod 555 "${DEST_DIR}${DEST_BIN}/7zr" -+ chmod 755 "${DEST_DIR}${DEST_BIN}/7zr" - fi - fi - -@@ -134,27 +132,27 @@ if [ -d DOCS ] - then - echo "- installing ${DEST_DIR}${DEST_MAN}/man1/7z.1" - sed -e s?"{DEST_SHARE_DOC}"?"${DEST_SHARE_DOC}/DOCS"?g man1/7z.1 > "${DEST_DIR}${DEST_MAN}/man1/7z.1" -- chmod 444 "${DEST_DIR}${DEST_MAN}/man1/7z.1" -+ chmod 644 "${DEST_DIR}${DEST_MAN}/man1/7z.1" - - echo "- installing ${DEST_DIR}${DEST_MAN}/man1/7za.1" - sed -e s?"{DEST_SHARE_DOC}"?"${DEST_SHARE_DOC}/DOCS"?g man1/7za.1 > "${DEST_DIR}${DEST_MAN}/man1/7za.1" -- chmod 444 "${DEST_DIR}${DEST_MAN}/man1/7za.1" -+ chmod 644 "${DEST_DIR}${DEST_MAN}/man1/7za.1" - - echo "- installing ${DEST_DIR}${DEST_MAN}/man1/7zr.1" - sed -e s?"{DEST_SHARE_DOC}"?"${DEST_SHARE_DOC}/DOCS"?g man1/7zr.1 > "${DEST_DIR}${DEST_MAN}/man1/7zr.1" -- chmod 444 "${DEST_DIR}${DEST_MAN}/man1/7zr.1" -+ chmod 644 "${DEST_DIR}${DEST_MAN}/man1/7zr.1" - else - echo "- installing ${DEST_DIR}${DEST_MAN}/man1/7z.1" - grep -v "{DEST_SHARE_DOC}" man1/7z.1 > "${DEST_DIR}${DEST_MAN}/man1/7z.1" -- chmod 444 "${DEST_DIR}${DEST_MAN}/man1/7z.1" -+ chmod 644 "${DEST_DIR}${DEST_MAN}/man1/7z.1" - - echo "- installing ${DEST_DIR}${DEST_MAN}/man1/7za.1" - grep -v "{DEST_SHARE_DOC}" man1/7za.1 > "${DEST_DIR}${DEST_MAN}/man1/7za.1" -- chmod 444 "${DEST_DIR}${DEST_MAN}/man1/7za.1" -+ chmod 644 "${DEST_DIR}${DEST_MAN}/man1/7za.1" - - echo "- installing ${DEST_DIR}${DEST_MAN}/man1/7zr.1" - grep -v "{DEST_SHARE_DOC}" man1/7zr.1 > "${DEST_DIR}${DEST_MAN}/man1/7zr.1" -- chmod 444 "${DEST_DIR}${DEST_MAN}/man1/7zr.1" -+ chmod 644 "${DEST_DIR}${DEST_MAN}/man1/7zr.1" - fi - - if [ -f README ] -@@ -162,7 +160,7 @@ then - echo "- installing ${DEST_DIR}${DEST_SHARE_DOC}/README" - mkdir -p "${DEST_DIR}${DEST_SHARE_DOC}" - cp README "${DEST_DIR}${DEST_SHARE_DOC}/README" -- chmod 444 "${DEST_DIR}${DEST_SHARE_DOC}/README" -+ chmod 644 "${DEST_DIR}${DEST_SHARE_DOC}/README" - fi - - if [ -f ChangeLog ] -@@ -170,7 +168,7 @@ then - echo "- installing ${DEST_DIR}${DEST_SHARE_DOC}/ChangeLog" - mkdir -p "${DEST_DIR}${DEST_SHARE_DOC}" - cp ChangeLog "${DEST_DIR}${DEST_SHARE_DOC}/ChangeLog" -- chmod 444 "${DEST_DIR}${DEST_SHARE_DOC}/ChangeLog" -+ chmod 644 "${DEST_DIR}${DEST_SHARE_DOC}/ChangeLog" - fi - - if [ -d DOCS ] -@@ -178,8 +176,8 @@ then - echo "- installing HTML help in ${DEST_DIR}${DEST_SHARE_DOC}/DOCS" - mkdir -p "${DEST_DIR}${DEST_SHARE_DOC}" - cp -r DOCS "${DEST_DIR}${DEST_SHARE_DOC}/DOCS" -- find "${DEST_DIR}${DEST_SHARE_DOC}/DOCS" -type d -exec chmod 555 {} \; -- find "${DEST_DIR}${DEST_SHARE_DOC}/DOCS" -type f -exec chmod 444 {} \; -+ find "${DEST_DIR}${DEST_SHARE_DOC}/DOCS" -type d -exec chmod 755 {} \; -+ find "${DEST_DIR}${DEST_SHARE_DOC}/DOCS" -type f -exec chmod 644 {} \; - fi - - use_lang="n" diff --git a/p7zip_9.20.1-nostrip.patch b/p7zip_9.20.1-nostrip.patch deleted file mode 100644 index 9435126..0000000 --- a/p7zip_9.20.1-nostrip.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -Naupr p7zip_9.20.1.orig/makefile.linux_amd64_asm p7zip_9.20.1/makefile.linux_amd64_asm ---- p7zip_9.20.1.orig/makefile.linux_amd64_asm 2009-12-22 19:11:03.000000000 +0100 -+++ p7zip_9.20.1/makefile.linux_amd64_asm 2011-07-26 14:43:58.275086735 +0200 -@@ -2,7 +2,7 @@ - OPTFLAGS=-O - - # use "-m32" to have a 32bits executable --ALLFLAGS=-m64 ${OPTFLAGS} -pipe -s \ -+ALLFLAGS=-m64 ${OPTFLAGS} -pipe \ - -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ - -DNDEBUG -D_REENTRANT -DENV_UNIX \ - -D_7ZIP_LARGE_PAGES \ -diff -Naupr p7zip_9.20.1.orig/makefile.linux_x86_asm_gcc_4.X p7zip_9.20.1/makefile.linux_x86_asm_gcc_4.X ---- p7zip_9.20.1.orig/makefile.linux_x86_asm_gcc_4.X 2011-01-11 21:57:50.000000000 +0100 -+++ p7zip_9.20.1/makefile.linux_x86_asm_gcc_4.X 2011-07-26 14:44:14.945027628 +0200 -@@ -4,7 +4,7 @@ - - OPTFLAGS=-O - --ALLFLAGS=${OPTFLAGS} -pipe -m32 -s \ -+ALLFLAGS=${OPTFLAGS} -pipe -m32 \ - -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ - -DNDEBUG -D_REENTRANT -DENV_UNIX \ - -D_7ZIP_LARGE_PAGES \ diff --git a/sources b/sources index bcd6e8a..25b0a88 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0fb779e1b1fdc6828f4aed9f7fd3f7d6 p7zip_9.20.1_src_all-norar.tar.bz2 +51b361979baf8124935cfaa2888b4a10 p7zip_15.09_src_all-norar.tar.bz2