Hello community, here is the log from the commit of package karchive for openSUSE:Factory checked in at 2015-07-14 17:21:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/karchive (Old) and /work/SRC/openSUSE:Factory/.karchive.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "karchive" Changes: -------- --- /work/SRC/openSUSE:Factory/karchive/karchive.changes 2015-06-23 12:05:59.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.karchive.new/karchive.changes 2015-07-14 17:21:46.000000000 +0200 @@ -1,0 +2,9 @@ +Sun Jul 5 18:44:46 UTC 2015 - [email protected] + +- Update to 5.12.0 + * Preserve executable permissions from files in copyTo() + * Clarify ~KArchive by removing dead code. + * For more details please see: + https://www.kde.org/announcements/kde-frameworks-5.12.0.php + +------------------------------------------------------------------- Old: ---- karchive-5.11.0.tar.xz New: ---- karchive-5.12.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ karchive.spec ++++++ --- /var/tmp/diff_new_pack.CFUfzg/_old 2015-07-14 17:21:46.000000000 +0200 +++ /var/tmp/diff_new_pack.CFUfzg/_new 2015-07-14 17:21:46.000000000 +0200 @@ -17,9 +17,9 @@ %define lname libKF5Archive5 -%define _tar_path 5.11 +%define _tar_path 5.12 Name: karchive -Version: 5.11.0 +Version: 5.12.0 Release: 0 BuildRequires: cmake >= 2.8.12 BuildRequires: extra-cmake-modules >= %{_tar_path} ++++++ karchive-5.11.0.tar.xz -> karchive-5.12.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/karchive-5.11.0/CMakeLists.txt new/karchive-5.12.0/CMakeLists.txt --- old/karchive-5.11.0/CMakeLists.txt 2015-06-06 11:22:22.000000000 +0200 +++ new/karchive-5.12.0/CMakeLists.txt 2015-07-04 22:29:27.000000000 +0200 @@ -3,7 +3,7 @@ project(KArchive) include(FeatureSummary) -find_package(ECM 5.11.0 NO_MODULE) +find_package(ECM 5.12.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) @@ -49,7 +49,7 @@ include(ECMSetupVersion) include(ECMGenerateHeaders) -set(KF5_VERSION "5.11.0") # handled by release scripts +set(KF5_VERSION "5.12.0") # handled by release scripts ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KARCHIVE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/karchive-5.11.0/autotests/karchivetest.cpp new/karchive-5.12.0/autotests/karchivetest.cpp --- old/karchive-5.11.0/autotests/karchivetest.cpp 2015-06-06 11:22:22.000000000 +0200 +++ new/karchive-5.12.0/autotests/karchivetest.cpp 2015-07-04 22:29:27.000000000 +0200 @@ -90,6 +90,9 @@ // Add local symlink QVERIFY(archive->addLocalFile("test3_symlink", "z/test3_symlink")); #endif + + // Add executable + QVERIFY(archive->writeFile("executableAll", "#!/bin/sh\necho hi", 0100755)); } static QString getCurrentUserName() @@ -296,6 +299,8 @@ } QCOMPARE(symLinkTarget, QString("test3")); #endif + + QVERIFY(QFileInfo(dirName + "executableAll").permissions() & (QFileDevice::ExeOwner | QFileDevice::ExeGroup | QFileDevice::ExeOther)); } /** @@ -462,9 +467,9 @@ const QStringList listing = recursiveListEntries(dir, "", WithUserGroup | WithTime); #ifndef Q_OS_WIN - QCOMPARE(listing.count(), 15); + QCOMPARE(listing.count(), 16); #else - QCOMPARE(listing.count(), 14); + QCOMPARE(listing.count(), 15); #endif compareEntryWithTimestamp(listing[0], QString("mode=40755 user= group= path=aaaemptydir type=dir"), creationTime); @@ -472,24 +477,25 @@ QCOMPARE(listing[2], QString("mode=40777 user=%1 group=%2 path=dir/subdir type=dir time=%3").arg(systemUserName).arg(systemGroupName).arg(emptyTime)); compareEntryWithTimestamp(listing[3], QString("mode=100644 user= group= path=dir/subdir/mediumfile2 type=file size=100"), creationTime); compareEntryWithTimestamp(listing[4], QString("mode=100644 user=weis group=users path=empty type=file size=0"), creationTime); - compareEntryWithTimestamp(listing[5], QString("mode=100644 user= group= path=hugefile type=file size=20000"), creationTime); - compareEntryWithTimestamp(listing[6], QString("mode=100644 user= group= path=mediumfile type=file size=100"), creationTime); - QCOMPARE(listing[7], QString("mode=40777 user=%1 group=%2 path=my type=dir time=").arg(systemUserName).arg(systemGroupName)); - QCOMPARE(listing[8], QString("mode=40777 user=%1 group=%2 path=my/dir type=dir time=").arg(systemUserName).arg(systemGroupName)); - compareEntryWithTimestamp(listing[9], QString("mode=100644 user=dfaure group=hackers path=my/dir/test3 type=file size=28"), creationTime); - compareEntryWithTimestamp(listing[10], QString("mode=100440 user=weis group=users path=test1 type=file size=5"), creationTime); - compareEntryWithTimestamp(listing[11], QString("mode=100644 user=weis group=users path=test2 type=file size=8"), creationTime); - QCOMPARE(listing[12], QString("mode=40777 user=%1 group=%2 path=z type=dir time=").arg(systemUserName).arg(systemGroupName)); + compareEntryWithTimestamp(listing[5], QString("mode=100755 user= group= path=executableAll type=file size=17"), creationTime); + compareEntryWithTimestamp(listing[6], QString("mode=100644 user= group= path=hugefile type=file size=20000"), creationTime); + compareEntryWithTimestamp(listing[7], QString("mode=100644 user= group= path=mediumfile type=file size=100"), creationTime); + QCOMPARE(listing[8], QString("mode=40777 user=%1 group=%2 path=my type=dir time=").arg(systemUserName).arg(systemGroupName)); + QCOMPARE(listing[9], QString("mode=40777 user=%1 group=%2 path=my/dir type=dir time=").arg(systemUserName).arg(systemGroupName)); + compareEntryWithTimestamp(listing[10], QString("mode=100644 user=dfaure group=hackers path=my/dir/test3 type=file size=28"), creationTime); + compareEntryWithTimestamp(listing[11], QString("mode=100440 user=weis group=users path=test1 type=file size=5"), creationTime); + compareEntryWithTimestamp(listing[12], QString("mode=100644 user=weis group=users path=test2 type=file size=8"), creationTime); + QCOMPARE(listing[13], QString("mode=40777 user=%1 group=%2 path=z type=dir time=").arg(systemUserName).arg(systemGroupName)); // This one was added with addLocalFile, so ignore mode. - QString str = listing[13]; - str.replace(QRegExp("mode.*user"), "user"); + QString str = listing[14]; + str.replace(QRegExp("mode.*user="), "user="); compareEntryWithTimestamp(str, QString("user=%1 group=%2 path=z/test3 type=file size=13").arg(owner).arg(group), creationTime); #ifndef Q_OS_WIN - str = listing[14]; - str.replace(QRegExp("mode.*path"), "path"); + str = listing[15]; + str.replace(QRegExp("mode.*path="), "path="); compareEntryWithTimestamp(str, QString("path=z/test3_symlink type=file size=0 symlink=test3"), creationTime); #endif @@ -842,31 +848,32 @@ const QStringList listing = recursiveListEntries(dir, "", 0); #ifndef Q_OS_WIN - QCOMPARE(listing.count(), 16); + QCOMPARE(listing.count(), 17); #else - QCOMPARE(listing.count(), 15); + QCOMPARE(listing.count(), 16); #endif QCOMPARE(listing[0], QString("mode=40755 path=aaaemptydir type=dir")); QCOMPARE(listing[1], QString("mode=40777 path=dir type=dir")); QCOMPARE(listing[2], QString("mode=40777 path=dir/subdir type=dir")); QCOMPARE(listing[3], QString("mode=100644 path=dir/subdir/mediumfile2 type=file size=100")); QCOMPARE(listing[4], QString("mode=100644 path=empty type=file size=0")); - QCOMPARE(listing[5], QString("mode=100644 path=hugefile type=file size=20000")); - QCOMPARE(listing[6], QString("mode=100644 path=mediumfile type=file size=100")); - QCOMPARE(listing[7], QString("mode=100644 path=mimetype type=file size=%1").arg(strlen(s_zipMimeType))); - QCOMPARE(listing[8], QString("mode=40777 path=my type=dir")); - QCOMPARE(listing[9], QString("mode=40777 path=my/dir type=dir")); - QCOMPARE(listing[10], QString("mode=100644 path=my/dir/test3 type=file size=28")); - QCOMPARE(listing[11], QString("mode=100440 path=test1 type=file size=5")); - QCOMPARE(listing[12], QString("mode=100644 path=test2 type=file size=8")); - QCOMPARE(listing[13], QString("mode=40777 path=z type=dir")); + QCOMPARE(listing[5], QString("mode=100755 path=executableAll type=file size=17")); + QCOMPARE(listing[6], QString("mode=100644 path=hugefile type=file size=20000")); + QCOMPARE(listing[7], QString("mode=100644 path=mediumfile type=file size=100")); + QCOMPARE(listing[8], QString("mode=100644 path=mimetype type=file size=%1").arg(strlen(s_zipMimeType))); + QCOMPARE(listing[9], QString("mode=40777 path=my type=dir")); + QCOMPARE(listing[10], QString("mode=40777 path=my/dir type=dir")); + QCOMPARE(listing[11], QString("mode=100644 path=my/dir/test3 type=file size=28")); + QCOMPARE(listing[12], QString("mode=100440 path=test1 type=file size=5")); + QCOMPARE(listing[13], QString("mode=100644 path=test2 type=file size=8")); + QCOMPARE(listing[14], QString("mode=40777 path=z type=dir")); // This one was added with addLocalFile, so ignore mode - QString str = listing[14]; - str.replace(QRegExp("mode.*path"), "path"); + QString str = listing[15]; + str.replace(QRegExp("mode.*path="), "path="); QCOMPARE(str, QString("path=z/test3 type=file size=13")); #ifndef Q_OS_WIN - str = listing[15]; - str.replace(QRegExp("mode.*path"), "path"); + str = listing[16]; + str.replace(QRegExp("mode.*path="), "path="); QCOMPARE(str, QString("path=z/test3_symlink type=file size=5 symlink=test3")); #endif @@ -1151,30 +1158,31 @@ const QStringList listing = recursiveListEntries(dir, "", 0); #ifndef Q_OS_WIN - QCOMPARE(listing.count(), 15); + QCOMPARE(listing.count(), 16); #else - QCOMPARE(listing.count(), 14); + QCOMPARE(listing.count(), 15); #endif QCOMPARE(listing[0], QString("mode=40755 path=aaaemptydir type=dir")); QCOMPARE(listing[1], QString("mode=40777 path=dir type=dir")); QCOMPARE(listing[2], QString("mode=40777 path=dir/subdir type=dir")); QCOMPARE(listing[3], QString("mode=100644 path=dir/subdir/mediumfile2 type=file size=100")); QCOMPARE(listing[4], QString("mode=100644 path=empty type=file size=0")); - QCOMPARE(listing[5], QString("mode=100644 path=hugefile type=file size=20000")); - QCOMPARE(listing[6], QString("mode=100644 path=mediumfile type=file size=100")); - QCOMPARE(listing[7], QString("mode=40777 path=my type=dir")); - QCOMPARE(listing[8], QString("mode=40777 path=my/dir type=dir")); - QCOMPARE(listing[9], QString("mode=100644 path=my/dir/test3 type=file size=28")); - QCOMPARE(listing[10], QString("mode=100440 path=test1 type=file size=5")); - QCOMPARE(listing[11], QString("mode=100644 path=test2 type=file size=8")); - QCOMPARE(listing[12], QString("mode=40777 path=z type=dir")); + QCOMPARE(listing[5], QString("mode=100755 path=executableAll type=file size=17")); + QCOMPARE(listing[6], QString("mode=100644 path=hugefile type=file size=20000")); + QCOMPARE(listing[7], QString("mode=100644 path=mediumfile type=file size=100")); + QCOMPARE(listing[8], QString("mode=40777 path=my type=dir")); + QCOMPARE(listing[9], QString("mode=40777 path=my/dir type=dir")); + QCOMPARE(listing[10], QString("mode=100644 path=my/dir/test3 type=file size=28")); + QCOMPARE(listing[11], QString("mode=100440 path=test1 type=file size=5")); + QCOMPARE(listing[12], QString("mode=100644 path=test2 type=file size=8")); + QCOMPARE(listing[13], QString("mode=40777 path=z type=dir")); // This one was added with addLocalFile, so ignore mode/user/group. - QString str = listing[13]; - str.replace(QRegExp("mode.*path"), "path"); + QString str = listing[14]; + str.replace(QRegExp("mode.*path="), "path="); QCOMPARE(str, QString("path=z/test3 type=file size=13")); #ifndef Q_OS_WIN - str = listing[14]; - str.replace(QRegExp("mode.*path"), "path"); + str = listing[15]; + str.replace(QRegExp("mode.*path="), "path="); QCOMPARE(str, QString("path=z/test3_symlink type=file size=0 symlink=test3")); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/karchive-5.11.0/examples/bzip2gzip/main.cpp new/karchive-5.12.0/examples/bzip2gzip/main.cpp --- old/karchive-5.11.0/examples/bzip2gzip/main.cpp 2015-06-06 11:22:22.000000000 +0200 +++ new/karchive-5.12.0/examples/bzip2gzip/main.cpp 2015-07-04 22:29:27.000000000 +0200 @@ -77,7 +77,7 @@ KCompressionDevice output(outputFile, KCompressionDevice::GZip); output.open(QIODevice::WriteOnly); - while(!input.atEnd()) { + while (!input.atEnd()) { // Read and uncompress the data QByteArray data = input.read(512); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/karchive-5.11.0/examples/helloworld/main.cpp new/karchive-5.12.0/examples/helloworld/main.cpp --- old/karchive-5.11.0/examples/helloworld/main.cpp 2015-06-06 11:22:22.000000000 +0200 +++ new/karchive-5.12.0/examples/helloworld/main.cpp 2015-07-04 22:29:27.000000000 +0200 @@ -65,22 +65,22 @@ const KArchiveDirectory *dir = archive.directory(); const KArchiveEntry *e = dir->entry("world"); - if (!e) { - qDebug() << "File not found!"; - return -1; - } - const KArchiveFile *f = static_cast<const KArchiveFile *>(e); - QByteArray arr(f->data()); - qDebug() << arr; // the file contents + if (!e) { + qDebug() << "File not found!"; + return -1; + } + const KArchiveFile *f = static_cast<const KArchiveFile *>(e); + QByteArray arr(f->data()); + qDebug() << arr; // the file contents - // To avoid reading everything into memory in one go, we can use createDevice() instead - QIODevice *dev = f->createDevice(); - while (!dev->atEnd()) { - qDebug() << dev->readLine(); - } - delete dev; + // To avoid reading everything into memory in one go, we can use createDevice() instead + QIODevice *dev = f->createDevice(); + while (!dev->atEnd()) { + qDebug() << dev->readLine(); + } + delete dev; } - //@@snippet_end + //@@snippet_end return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/karchive-5.11.0/src/karchive.cpp new/karchive-5.12.0/src/karchive.cpp --- old/karchive-5.11.0/src/karchive.cpp 2015-06-06 11:22:22.000000000 +0200 +++ new/karchive-5.12.0/src/karchive.cpp 2015-07-04 22:29:27.000000000 +0200 @@ -75,10 +75,7 @@ KArchive::~KArchive() { - if (isOpen()) { - close(); // WARNING: won't call the virtual method close in the derived class!!! - } - + Q_ASSERT(!isOpen()); // the derived class destructor must have closed already delete d; } @@ -675,6 +672,22 @@ return true; } +static QFileDevice::Permissions withExecutablePerms( + QFileDevice::Permissions filePerms, + mode_t perms) +{ + if (perms & 01) + filePerms |= QFileDevice::ExeOther; + + if (perms & 010) + filePerms |= QFileDevice::ExeGroup; + + if (perms & 0100) + filePerms |= QFileDevice::ExeOwner; + + return filePerms; +} + bool KArchiveFile::copyTo(const QString &dest) const { QFile f(dest + QLatin1Char('/') + name()); @@ -695,6 +708,7 @@ f.write(array.data(), currentChunkSize); remainingSize -= currentChunkSize; } + f.setPermissions(withExecutablePerms(f.permissions(), permissions())); f.close(); delete inputDev;
