Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package parzip for openSUSE:Factory checked 
in at 2023-04-12 12:52:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/parzip (Old)
 and      /work/SRC/openSUSE:Factory/.parzip.new.19717 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "parzip"

Wed Apr 12 12:52:24 2023 rev:4 rq:1078586 version:1.4.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/parzip/parzip.changes    2023-04-02 
19:18:14.972786673 +0200
+++ /work/SRC/openSUSE:Factory/.parzip.new.19717/parzip.changes 2023-04-12 
12:52:25.397220535 +0200
@@ -1,0 +2,12 @@
+Mon Apr  3 17:32:58 UTC 2023 - Bjørn Lie <[email protected]>
+
+- Update to version 1.4.0:
+  * Start using std::filesystem instead of native code.
+  * More use of C++ filesystem library.
+  * Update to new style wrapdb deps.
+  * Add #include <stdexcept>
+  * Add #include <cstdint> in file.h
+- Drop parzip-fix-missing-includes.patch: Patch applied upstream.
+- Replace gcc-c++ with generic c++_compiler BuildRequires.
+
+-------------------------------------------------------------------

Old:
----
  parzip-1.3.0.tar.gz
  parzip-fix-missing-includes.patch

New:
----
  parzip-1.4.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ parzip.spec ++++++
--- /var/tmp/diff_new_pack.ixEele/_old  2023-04-12 12:52:25.869223294 +0200
+++ /var/tmp/diff_new_pack.ixEele/_new  2023-04-12 12:52:25.873223317 +0200
@@ -17,16 +17,15 @@
 
 
 Name:           parzip
-Version:        1.3.0
+Version:        1.4.0
 Release:        0
 Summary:        Parallel pkzip implementation
 License:        GPL-3.0-or-later
 Group:          Productivity/Archiving/Compression
 URL:            https://github.com/jpakkane/parzip
 Source0:        %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM parzip-fix-missing-includes.patch
-Patch0:         parzip-fix-missing-includes.patch
-BuildRequires:  gcc-c++
+
+BuildRequires:  c++_compiler
 BuildRequires:  meson
 BuildRequires:  pkgconfig
 BuildRequires:  pkgconfig(liblzma)

++++++ parzip-1.3.0.tar.gz -> parzip-1.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/parzip-1.3.0/man/parunzip.1 
new/parzip-1.4.0/man/parunzip.1
--- old/parzip-1.3.0/man/parunzip.1     2019-06-06 19:03:38.000000000 +0200
+++ new/parzip-1.4.0/man/parunzip.1     2023-04-03 12:12:09.000000000 +0200
@@ -1,4 +1,4 @@
-.TH PARUNZIP "1" "June 2019" "parunzip 1.3.0" "User Commands"
+.TH PARUNZIP "1" "April 2023" "parunzip 1.4.0" "User Commands"
 .SH NAME
 parunzip - A fast zip file unpacker
 .SH DESCRIPTION
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/parzip-1.3.0/man/parzip.1 
new/parzip-1.4.0/man/parzip.1
--- old/parzip-1.3.0/man/parzip.1       2019-06-06 19:03:38.000000000 +0200
+++ new/parzip-1.4.0/man/parzip.1       2023-04-03 12:12:09.000000000 +0200
@@ -1,4 +1,4 @@
-.TH PARZIP "1" "June 2019" "parzip 1.3.0" "User Commands"
+.TH PARZIP "1" "April 2023" "parzip 1.4.0" "User Commands"
 .SH NAME
 parzip - A fast zip file creator
 .SH DESCRIPTION
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/parzip-1.3.0/meson.build new/parzip-1.4.0/meson.build
--- old/parzip-1.3.0/meson.build        2019-06-06 19:03:38.000000000 +0200
+++ new/parzip-1.4.0/meson.build        2023-04-03 12:12:09.000000000 +0200
@@ -1,13 +1,13 @@
 project('parzip', 'cpp',
-  version : '1.3.0',
+  version : '1.4.0',
   license : 'GPLv3+',
-  default_options : ['cpp_std=c++14', 'warning_level=3'])
+  default_options : ['cpp_std=c++17', 'warning_level=3'])
 
 #add_global_arguments('-DWIN32_LEAN_AND_MEAN', language: 'cpp')
 
-zdep = dependency('zlib', fallback : ['zlib', 'zlib_dep'])
+zdep = dependency('zlib')
 if host_machine.system() != 'windows'
-  lzmadep = dependency('liblzma', fallback : ['liblzma', 'lzma_dep'])
+  lzmadep = dependency('liblzma')
   compr_deps = [zdep, lzmadep]
 else
   compr_deps = [zdep]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/parzip-1.3.0/src/decompress.cpp 
new/parzip-1.4.0/src/decompress.cpp
--- old/parzip-1.3.0/src/decompress.cpp 2019-06-06 19:03:38.000000000 +0200
+++ new/parzip-1.4.0/src/decompress.cpp 2023-04-03 12:12:09.000000000 +0200
@@ -53,6 +53,7 @@
 #include <cstring>
 
 #include <memory>
+#include <stdexcept>
 
 #define CHUNK 1024 * 1024
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/parzip-1.3.0/src/file.h new/parzip-1.4.0/src/file.h
--- old/parzip-1.3.0/src/file.h 2019-06-06 19:03:38.000000000 +0200
+++ new/parzip-1.4.0/src/file.h 2023-04-03 12:12:09.000000000 +0200
@@ -19,6 +19,7 @@
 
 #include <cstdio>
 #include <string>
+#include <cstdint>
 
 class MMapper;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/parzip-1.3.0/src/fileutils.cpp 
new/parzip-1.4.0/src/fileutils.cpp
--- old/parzip-1.3.0/src/fileutils.cpp  2019-06-06 19:03:38.000000000 +0200
+++ new/parzip-1.4.0/src/fileutils.cpp  2023-04-03 12:12:09.000000000 +0200
@@ -27,6 +27,7 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #endif
+#include <filesystem>
 #include <algorithm>
 #include <array>
 #include <cassert>
@@ -34,10 +35,15 @@
 #include <numeric>
 #include <stdexcept>
 
+namespace fs = std::filesystem;
+
 namespace {
 
 std::vector<fileinfo> expand_entry(const std::string &fname);
 
+// The C++ filesystem API does not seem to have uids or gids.
+// Thus we have to use platform specific code to get this information.
+
 fileinfo get_unix_stats(const std::string &fname) {
     struct stat buf;
     fileinfo sd;
@@ -58,8 +64,8 @@
     sd.ue.atime = buf.st_atime;
     sd.ue.mtime = buf.st_mtime;
 #else
-sd.ue.atime = buf.st_atim.tv_sec;
-sd.ue.mtime = buf.st_mtim.tv_sec;
+    sd.ue.atime = buf.st_atim.tv_sec;
+    sd.ue.mtime = buf.st_mtim.tv_sec;
 #endif
     sd.mode = buf.st_mode;
     sd.fsize = buf.st_size;
@@ -67,42 +73,12 @@
     return sd;
 } // namespace
 
-#ifdef _WIN32
-std::vector<std::string> handle_dir_platform(const std::string &dirname) {
-    std::string glob = dirname + "\\*.*";
-    std::vector<std::string> entries;
-    HANDLE hFind;
-    WIN32_FIND_DATA data;
-
-    hFind = FindFirstFile(glob.c_str(), &data);
-    if(hFind == INVALID_HANDLE_VALUE) {
-        throw_system("Could not get directory contents: ");
-    }
-    if(hFind != INVALID_HANDLE_VALUE) {
-        do {
-            entries.push_back(data.cFileName);
-        } while(FindNextFile(hFind, &data));
-        FindClose(hFind);
-    }
-    return entries;
-}
-
-#else
 
 std::vector<std::string> handle_dir_platform(const std::string &dirname) {
     std::vector<std::string> entries;
-    std::unique_ptr<DIR, int (*)(DIR *)> dirholder(opendir(dirname.c_str()), 
closedir);
-    auto dir = dirholder.get();
-    if(!dir) {
-        printf("Could not access directory: %s\n", dirname.c_str());
-        return entries;
-    }
-    std::array<char, sizeof(dirent) + NAME_MAX + 1> buf;
-    struct dirent *cur = reinterpret_cast<struct dirent *>(buf.data());
-    struct dirent *de;
     std::string basename;
-    while(readdir_r(dir, cur, &de) == 0 && de) {
-        basename = cur->d_name;
+    for(const auto &e : fs::directory_iterator(dirname.c_str())) {
+        auto basename = e.path().filename();
         if(basename == "." || basename == "..") {
             continue;
         }
@@ -110,7 +86,6 @@
     }
     return entries;
 }
-#endif
 
 std::vector<fileinfo> expand_dir(const std::string &dirname) {
     // Always set order to create reproducible zip files.
@@ -141,21 +116,15 @@
 } // namespace
 
 bool is_dir(const std::string &s) {
-    struct stat sbuf;
-    if(stat(s.c_str(), &sbuf) < 0) {
-        return false;
-    }
-    return (sbuf.st_mode & S_IFMT) == S_IFDIR;
+    fs::path p{s};
+    return fs::is_directory(p);
 }
 
 bool is_dir(const fileinfo &f) { return S_ISDIR(f.mode); }
 
 bool is_file(const std::string &s) {
-    struct stat sbuf;
-    if(stat(s.c_str(), &sbuf) < 0) {
-        return false;
-    }
-    return (sbuf.st_mode & S_IFMT) == S_IFREG;
+    fs::path p{s};
+    return fs::is_regular_file(p);
 }
 
 bool is_file(const fileinfo &f) { return S_ISREG(f.mode); }
@@ -163,34 +132,13 @@
 bool is_symlink(const fileinfo &f) { return S_ISLNK(f.mode); }
 
 bool exists_on_fs(const std::string &s) {
-    struct stat sbuf;
-    return stat(s.c_str(), &sbuf) == 0;
+    fs::path p{s};
+    return fs::exists(p);
 }
 
 void mkdirp(const std::string &s) {
-    if(is_dir(s)) {
-        return;
-    }
-    std::string::size_type offset = 1;
-    do {
-        auto slash = s.find('/', offset);
-        if(slash == std::string::npos) {
-            slash = s.size();
-        }
-        auto curdir = s.substr(0, slash);
-        if(!is_dir(curdir)) {
-#ifdef _WIN32
-            _mkdir(curdir.c_str());
-#else
-            mkdir(curdir.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | 
S_IXOTH);
-#endif
-            if(!is_dir(curdir)) {
-                throw_system("Could not create directory:");
-            }
-        }
-        offset = slash + 1;
-    } while(offset <= s.size());
-    assert(is_dir(s));
+    fs::path p{s};
+    fs::create_directories(p);
 }
 
 void create_dirs_for_file(const std::string &s) {
@@ -205,8 +153,11 @@
     if(fname.empty()) {
         return false;
     }
+    // The C++ standard library seems to define an absolute path as
+    // "absolute given the platform we are running on". Zip files
+    // must be multiplatform, so we have to roll our own here.
     if(fname.front() == '/' || fname.front() == '\\' ||
-       (fname.size() > 2 && fname[1] == ':' && (fname[2] == '/' || fname[2] == 
'\\'))) {
+            (fname.size() > 2 && fname[1] == ':' && (fname[2] == '/' || 
fname[2] == '\\'))) {
         return true;
     }
     return false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/parzip-1.3.0/subprojects/liblzma.wrap 
new/parzip-1.4.0/subprojects/liblzma.wrap
--- old/parzip-1.3.0/subprojects/liblzma.wrap   2019-06-06 19:03:38.000000000 
+0200
+++ new/parzip-1.4.0/subprojects/liblzma.wrap   2023-04-03 12:12:09.000000000 
+0200
@@ -1,10 +1,12 @@
 [wrap-file]
 directory = xz-5.2.1
-
 source_url = http://tukaani.org/xz/xz-5.2.1.tar.xz
 source_filename = xz-5.2.1.tar.xz
 source_hash = 6ecdd4d80b12001497df0741d6037f918d270fa0f9a1ab4e2664bf4157ae323c
+patch_filename = liblzma_5.2.1-6_patch.zip
+patch_url = https://wrapdb.mesonbuild.com/v2/liblzma_5.2.1-6/get_patch
+patch_hash = f0b524552a14111f1b635f380e0bab90b3b44ba6119c46cc4cb85a36fde3d13e
+
+[provide]
+liblzma = liblzma_dep
 
-patch_url = https://wrapdb.mesonbuild.com/v1/projects/liblzma/5.2.1/5/get_zip
-patch_filename = liblzma-5.2.1-5-wrap.zip
-patch_hash = cde35a0feaf438e3dc0b8d227910fc26051801e7b68bbac24ef6546d94be6049
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/parzip-1.3.0/subprojects/zlib.wrap 
new/parzip-1.4.0/subprojects/zlib.wrap
--- old/parzip-1.3.0/subprojects/zlib.wrap      2019-06-06 19:03:38.000000000 
+0200
+++ new/parzip-1.4.0/subprojects/zlib.wrap      2023-04-03 12:12:09.000000000 
+0200
@@ -1,10 +1,12 @@
 [wrap-file]
 directory = zlib-1.2.11
-
 source_url = http://zlib.net/fossils/zlib-1.2.11.tar.gz
 source_filename = zlib-1.2.11.tar.gz
 source_hash = c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
+patch_url = https://wrapdb.mesonbuild.com/v2/zlib_1.2.11-5/get_patch
+patch_filename = zlib-1.2.11-5-wrap.zip
+patch_hash = 728c8e24acbc2e6682fbd950fec39e2fc77528af361adb87259f8a8511434004
+
+[provide]
+zlib = zlib_dep
 
-patch_url = https://wrapdb.mesonbuild.com/v1/projects/zlib/1.2.11/4/get_zip
-patch_filename = zlib-1.2.11-4-wrap.zip
-patch_hash = f733976fbfc59e0bcde01aa9469a24eeb16faf0a4280b17e9eaa60a301d75657

Reply via email to