Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package unrar for openSUSE:Factory:NonFree checked in at 2021-03-10 08:44:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory:NonFree/unrar (Old) and /work/SRC/openSUSE:Factory:NonFree/.unrar.new.2378 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "unrar" Wed Mar 10 08:44:14 2021 rev:94 rq:876979 version:6.0.4 Changes: -------- --- /work/SRC/openSUSE:Factory:NonFree/unrar/unrar.changes 2020-12-08 13:21:52.338114621 +0100 +++ /work/SRC/openSUSE:Factory:NonFree/.unrar.new.2378/unrar.changes 2021-03-10 08:44:15.498084118 +0100 @@ -1,0 +2,6 @@ +Fri Mar 5 11:26:36 UTC 2021 - Ismail D??nmez <idon...@suse.com> + +- Update to version 6.0.4 + * Based on WinRAR 6.0.1 beta 1 + +------------------------------------------------------------------- Old: ---- unrarsrc-6.0.3.tar.gz New: ---- unrarsrc-6.0.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ unrar.spec ++++++ --- /var/tmp/diff_new_pack.yEFUe9/_old 2021-03-10 08:44:16.002084639 +0100 +++ /var/tmp/diff_new_pack.yEFUe9/_new 2021-03-10 08:44:16.006084643 +0100 @@ -18,10 +18,10 @@ # majorversion should match the major version number. %define majorversion 6 -%define libsuffix 6_0_3 +%define libsuffix 6_0_4 Name: unrar -Version: 6.0.3 +Version: 6.0.4 Release: 0 Summary: A program to extract, test, and view RAR archives License: NonFree ++++++ unrarsrc-6.0.3.tar.gz -> unrarsrc-6.0.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/dll.rc new/unrar/dll.rc --- old/unrar/dll.rc 2020-12-01 19:00:04.000000000 +0100 +++ new/unrar/dll.rc 2021-03-03 15:56:31.000000000 +0100 @@ -2,8 +2,8 @@ #include <commctrl.h> VS_VERSION_INFO VERSIONINFO -FILEVERSION 6, 0, 100, 3629 -PRODUCTVERSION 6, 0, 100, 3629 +FILEVERSION 6, 1, 1, 3721 +PRODUCTVERSION 6, 1, 1, 3721 FILEOS VOS__WINDOWS32 FILETYPE VFT_APP { @@ -14,9 +14,9 @@ VALUE "CompanyName", "Alexander Roshal\0" VALUE "ProductName", "RAR decompression library\0" VALUE "FileDescription", "RAR decompression library\0" - VALUE "FileVersion", "6.0.0\0" - VALUE "ProductVersion", "6.0.0\0" - VALUE "LegalCopyright", "Copyright ? Alexander Roshal 1993-2020\0" + VALUE "FileVersion", "6.1.1\0" + VALUE "ProductVersion", "6.1.1\0" + VALUE "LegalCopyright", "Copyright ? Alexander Roshal 1993-2021\0" VALUE "OriginalFilename", "Unrar.dll\0" } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/extinfo.hpp new/unrar/extinfo.hpp --- old/unrar/extinfo.hpp 2020-12-01 19:05:46.000000000 +0100 +++ new/unrar/extinfo.hpp 2021-03-05 10:34:04.000000000 +0100 @@ -7,7 +7,7 @@ void SetUnixOwner(Archive &Arc,const wchar *FileName); #endif -bool ExtractHardlink(wchar *NameNew,wchar *NameExisting,size_t NameExistingSize); +bool ExtractHardlink(CommandData *Cmd,wchar *NameNew,wchar *NameExisting,size_t NameExistingSize); void GetStreamNameNTFS(Archive &Arc,wchar *StreamName,size_t MaxSize); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/extract.cpp new/unrar/extract.cpp --- old/unrar/extract.cpp 2020-12-01 19:05:46.000000000 +0100 +++ new/unrar/extract.cpp 2021-03-05 10:34:04.000000000 +0100 @@ -654,7 +654,7 @@ ExtrPrepareName(Arc,Arc.FileHead.RedirName,NameExisting,ASIZE(NameExisting)); if (FileCreateMode && *NameExisting!=0) // *NameExisting can be 0 in case of excessive -ap switch. if (Type==FSREDIR_HARDLINK) - LinkSuccess=ExtractHardlink(DestFileName,NameExisting,ASIZE(NameExisting)); + LinkSuccess=ExtractHardlink(Cmd,DestFileName,NameExisting,ASIZE(NameExisting)); else LinkSuccess=ExtractFileCopy(CurFile,Arc.FileName,DestFileName,NameExisting,ASIZE(NameExisting)); } @@ -666,7 +666,7 @@ } else { - uiMsg(UIERROR_UNKNOWNEXTRA, Arc.FileName, DestFileName); + uiMsg(UIERROR_UNKNOWNEXTRA,Arc.FileName,DestFileName); LinkSuccess=false; } @@ -747,7 +747,13 @@ } } else - mprintf(L"\b\b\b\b\b "); + { + // We check SkipSolid to remove percent for skipped solid files only. + // We must not apply these \b to links with ShowChecksum==false + // and their possible error messages. + if (SkipSolid) + mprintf(L"\b\b\b\b\b "); + } // If we successfully unpacked a hard link, we wish to set its file // attributes. Hard link shares file metadata with link target, @@ -1100,19 +1106,23 @@ } if (!DirExist) { - CreatePath(DestFileName,true); + CreatePath(DestFileName,true,Cmd->DisableNames); MDCode=MakeDir(DestFileName,!Cmd->IgnoreGeneralAttr,Arc.FileHead.FileAttr); - if (MDCode!=MKDIR_SUCCESS) + if (MDCode!=MKDIR_SUCCESS && !IsNameUsable(DestFileName)) { + uiMsg(UIMSG_CORRECTINGNAME,Arc.FileName); wchar OrigName[ASIZE(DestFileName)]; wcsncpyz(OrigName,DestFileName,ASIZE(OrigName)); MakeNameUsable(DestFileName,true); - CreatePath(DestFileName,true); - MDCode=MakeDir(DestFileName,!Cmd->IgnoreGeneralAttr,Arc.FileHead.FileAttr); #ifndef SFX_MODULE - if (MDCode==MKDIR_SUCCESS) - uiMsg(UIERROR_RENAMING,Arc.FileName,OrigName,DestFileName); + uiMsg(UIERROR_RENAMING,Arc.FileName,OrigName,DestFileName); #endif + DirExist=FileExist(DestFileName) && IsDir(GetFileAttr(DestFileName)); + if (!DirExist) + { + CreatePath(DestFileName,true,Cmd->DisableNames); + MDCode=MakeDir(DestFileName,!Cmd->IgnoreGeneralAttr,Arc.FileHead.FileAttr); + } } } } @@ -1191,7 +1201,7 @@ MakeNameUsable(DestFileName,true); - CreatePath(DestFileName,true); + CreatePath(DestFileName,true,Cmd->DisableNames); if (FileCreate(Cmd,&CurFile,DestFileName,ASIZE(DestFileName),&UserReject,Arc.FileHead.UnpSize,&Arc.FileHead.mtime,true)) { #ifndef SFX_MODULE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/filcreat.cpp new/unrar/filcreat.cpp --- old/unrar/filcreat.cpp 2020-12-01 19:05:46.000000000 +0100 +++ new/unrar/filcreat.cpp 2021-03-05 10:34:04.000000000 +0100 @@ -49,7 +49,7 @@ if (NewFile!=NULL && NewFile->Create(Name,FileMode)) return true; - CreatePath(Name,true); + CreatePath(Name,true,Cmd->DisableNames); return NewFile!=NULL ? NewFile->Create(Name,FileMode):DelFile(Name); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/filefn.cpp new/unrar/filefn.cpp --- old/unrar/filefn.cpp 2020-12-01 19:05:46.000000000 +0100 +++ new/unrar/filefn.cpp 2021-03-05 10:34:04.000000000 +0100 @@ -38,7 +38,7 @@ } -bool CreatePath(const wchar *Path,bool SkipLastName) +bool CreatePath(const wchar *Path,bool SkipLastName,bool Silent) { if (Path==NULL || *Path==0) return false; @@ -73,7 +73,7 @@ DirName[s-Path]=0; Success=MakeDir(DirName,true,DirAttr)==MKDIR_SUCCESS; - if (Success) + if (Success && !Silent) { mprintf(St(MCreatDir),DirName); mprintf(L" %s",St(MOk)); @@ -474,6 +474,24 @@ } +bool DelDir(const wchar *Name) +{ +#ifdef _WIN_ALL + bool Success=RemoveDirectory(Name)!=0; + if (!Success) + { + wchar LongName[NM]; + if (GetWinLongPath(Name,LongName,ASIZE(LongName))) + Success=RemoveDirectory(LongName)!=0; + } + return Success; +#else + char NameA[NM]; + WideToChar(Name,NameA,ASIZE(NameA)); + bool Success=rmdir(NameA)==0; + return Success; +#endif +} #if defined(_WIN_ALL) && !defined(SFX_MODULE) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/filefn.hpp new/unrar/filefn.hpp --- old/unrar/filefn.hpp 2020-12-01 19:05:46.000000000 +0100 +++ new/unrar/filefn.hpp 2021-03-05 10:34:04.000000000 +0100 @@ -4,7 +4,7 @@ enum MKDIR_CODE {MKDIR_SUCCESS,MKDIR_ERROR,MKDIR_BADPATH}; MKDIR_CODE MakeDir(const wchar *Name,bool SetAttr,uint Attr); -bool CreatePath(const wchar *Path,bool SkipLastName); +bool CreatePath(const wchar *Path,bool SkipLastName,bool Silent); void SetDirTime(const wchar *Name,RarTime *ftm,RarTime *ftc,RarTime *fta); bool IsRemovable(const wchar *Name); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/hardlinks.cpp new/unrar/hardlinks.cpp --- old/unrar/hardlinks.cpp 2020-12-01 19:05:46.000000000 +0100 +++ new/unrar/hardlinks.cpp 2021-03-05 10:34:04.000000000 +0100 @@ -1,4 +1,4 @@ -bool ExtractHardlink(wchar *NameNew,wchar *NameExisting,size_t NameExistingSize) +bool ExtractHardlink(CommandData *Cmd,wchar *NameNew,wchar *NameExisting,size_t NameExistingSize) { SlashToNative(NameExisting,NameExisting,NameExistingSize); // Not needed for RAR 5.1+ archives. @@ -9,7 +9,7 @@ ErrHandler.SetErrorCode(RARX_CREATE); return false; } - CreatePath(NameNew,true); + CreatePath(NameNew,true,Cmd->DisableNames); #ifdef _WIN_ALL bool Success=CreateHardLink(NameNew,NameExisting,NULL)!=0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/loclang.hpp new/unrar/loclang.hpp --- old/unrar/loclang.hpp 2020-12-01 19:05:46.000000000 +0100 +++ new/unrar/loclang.hpp 2021-03-05 10:34:04.000000000 +0100 @@ -321,7 +321,7 @@ #define MStreamUnknown L"\nWARNING: Unknown format of %s stream data\n" #define MInvalidName L"\nERROR: Invalid file name %s" #define MProcessArc L"\n\nProcessing archive %s" -#define MCorrectingName L"\nWARNING: Attempting to correct the invalid file name" +#define MCorrectingName L"\nWARNING: Attempting to correct the invalid file or directory name" #define MUnpCannotMerge L"\nWARNING: You need to start extraction from a previous volume to unpack %s" #define MUnknownOption L"\nERROR: Unknown option: %s" #define MSubHeadCorrupt L"\nERROR: Corrupt data header found, ignored" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/savepos.hpp new/unrar/savepos.hpp --- old/unrar/savepos.hpp 2019-12-05 08:39:20.000000000 +0100 +++ new/unrar/savepos.hpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,40 +0,0 @@ -#ifndef _RAR_SAVEPOS_ -#define _RAR_SAVEPOS_ - -class SaveFilePos -{ - private: - File *SaveFile; - int64 SavePos; - public: - SaveFilePos(File &Src) - { - SaveFile=&Src; - SavePos=Src.Tell(); - } - ~SaveFilePos() - { - // Unless the file is already closed either by current exception - // processing or intentionally by external code. - if (SaveFile->IsOpened()) - { - try - { - SaveFile->Seek(SavePos,SEEK_SET); - } - catch(RAR_EXIT) - { - // Seek() can throw an exception and it terminates process - // if we are already processing another exception. Also in C++ 11 - // an exception in destructor always terminates process unless - // we mark destructor with noexcept(false). So we do not want to - // throw here. To prevent data loss we do not want to continue - // execution after seek error, so we close the file. - // Any next access to this file will return an error. - SaveFile->Close(); - } - } - } -}; - -#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/secpassword.cpp new/unrar/secpassword.cpp --- old/unrar/secpassword.cpp 2020-12-01 19:05:47.000000000 +0100 +++ new/unrar/secpassword.cpp 2021-03-05 10:34:05.000000000 +0100 @@ -51,7 +51,7 @@ }; // We need to call FreeLibrary when RAR is exiting. -CryptLoader GlobalCryptLoader; +static CryptLoader GlobalCryptLoader; #endif SecPassword::SecPassword() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/uiconsole.cpp new/unrar/uiconsole.cpp --- old/unrar/uiconsole.cpp 2020-12-01 19:05:47.000000000 +0100 +++ new/unrar/uiconsole.cpp 2021-03-05 10:34:05.000000000 +0100 @@ -1,4 +1,4 @@ -static bool AnyMessageDisplayed=0; // For console -idn switch. +static bool AnyMessageDisplayed=false; // For console -idn switch. // Purely user interface function. Gets and returns user input. UIASKREP_RESULT uiAskReplace(wchar *Name,size_t MaxNameSize,int64 FileSize,RarTime *FileTime,uint Flags) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/ulinks.cpp new/unrar/ulinks.cpp --- old/unrar/ulinks.cpp 2020-12-01 19:05:47.000000000 +0100 +++ new/unrar/ulinks.cpp 2021-03-05 10:34:05.000000000 +0100 @@ -1,9 +1,14 @@ -static bool UnixSymlink(const char *Target,const wchar *LinkName,RarTime *ftm,RarTime *fta) +static bool UnixSymlink(CommandData *Cmd,const char *Target,const wchar *LinkName,RarTime *ftm,RarTime *fta) { - CreatePath(LinkName,true); + CreatePath(LinkName,true,Cmd->DisableNames); + + // Overwrite prompt was already issued and confirmed earlier, so we can + // remove existing symlink or regular file here. PrepareToDelete was also + // called earlier inside of uiAskReplaceEx. DelFile(LinkName); + char LinkNameA[NM]; WideToChar(LinkName,LinkNameA,ASIZE(LinkNameA)); if (symlink(Target,LinkNameA)==-1) // Error. @@ -75,7 +80,7 @@ if (!Cmd->AbsoluteLinks && (*TargetW==0 || IsFullPath(TargetW) || !IsRelativeSymlinkSafe(Cmd,Arc.FileHead.FileName,LinkName,TargetW))) return false; - return UnixSymlink(Target,LinkName,&Arc.FileHead.mtime,&Arc.FileHead.atime); + return UnixSymlink(Cmd,Target,LinkName,&Arc.FileHead.mtime,&Arc.FileHead.atime); } return false; } @@ -101,5 +106,5 @@ if (!Cmd->AbsoluteLinks && (IsFullPath(Target) || !IsRelativeSymlinkSafe(Cmd,hd->FileName,Name,hd->RedirName))) return false; - return UnixSymlink(Target,Name,&hd->mtime,&hd->atime); + return UnixSymlink(Cmd,Target,Name,&hd->mtime,&hd->atime); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/version.hpp new/unrar/version.hpp --- old/unrar/version.hpp 2020-12-01 19:05:47.000000000 +0100 +++ new/unrar/version.hpp 2021-03-05 10:34:06.000000000 +0100 @@ -1,6 +1,6 @@ #define RARVER_MAJOR 6 -#define RARVER_MINOR 0 -#define RARVER_BETA 0 -#define RARVER_DAY 1 -#define RARVER_MONTH 12 -#define RARVER_YEAR 2020 +#define RARVER_MINOR 1 +#define RARVER_BETA 1 +#define RARVER_DAY 3 +#define RARVER_MONTH 3 +#define RARVER_YEAR 2021 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/win32lnk.cpp new/unrar/win32lnk.cpp --- old/unrar/win32lnk.cpp 2020-12-01 19:05:47.000000000 +0100 +++ new/unrar/win32lnk.cpp 2021-03-05 10:34:06.000000000 +0100 @@ -71,20 +71,36 @@ !IsRelativeSymlinkSafe(Cmd,hd->FileName,Name,hd->RedirName))) return false; - CreatePath(Name,true); + CreatePath(Name,true,Cmd->DisableNames); + + // Overwrite prompt was already issued and confirmed earlier, so we can + // remove existing symlink or regular file here. PrepareToDelete was also + // called earlier inside of uiAskReplaceEx. + if (FileExist(Name)) + if (IsDir(GetFileAttr(Name))) + DelDir(Name); + else + DelFile(Name); // 'DirTarget' check is important for Unix symlinks to directories. // Unix symlinks do not have their own 'directory' attribute. if (hd->Dir || hd->DirTarget) { if (!CreateDirectory(Name,NULL)) + { + uiMsg(UIERROR_DIRCREATE,UINULL,Name); + ErrHandler.SetErrorCode(RARX_CREATE); return false; + } } else { HANDLE hFile=CreateFile(Name,GENERIC_WRITE,0,NULL,CREATE_NEW,FILE_ATTRIBUTE_NORMAL,NULL); if (hFile == INVALID_HANDLE_VALUE) + { + ErrHandler.CreateErrorMsg(Name); return false; + } CloseHandle(hFile); } @@ -138,7 +154,11 @@ OPEN_EXISTING,FILE_FLAG_OPEN_REPARSE_POINT| FILE_FLAG_BACKUP_SEMANTICS,NULL); if (hFile==INVALID_HANDLE_VALUE) + { + ErrHandler.CreateErrorMsg(Name); + ErrHandler.SetErrorCode(RARX_CREATE); return false; + } DWORD Returned; if (!DeviceIoControl(hFile,FSCTL_SET_REPARSE_POINT,rdb,