Hello community,

here is the log from the commit of package libfilezilla for openSUSE:Factory 
checked in at 2017-07-09 13:04:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libfilezilla (Old)
 and      /work/SRC/openSUSE:Factory/.libfilezilla.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libfilezilla"

Sun Jul  9 13:04:20 2017 rev:11 rq:508948 version:0.9.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/libfilezilla/libfilezilla.changes        
2017-02-25 00:54:09.882890417 +0100
+++ /work/SRC/openSUSE:Factory/.libfilezilla.new/libfilezilla.changes   
2017-07-09 13:04:23.797425530 +0200
@@ -1,0 +2,13 @@
+Sun Jun  4 08:04:34 UTC 2017 - ec...@opensuse.org
+
+- update to 0.9.2
+  * New features:
+    - Added fz::random_bytes to obtain a vector of the passed size 
+      of uniformly distributed random bytes
+    - Added fz::ltrim and fz::rtim
+    - Added parameter to trim functions which characters to trim
+    - It is now possible to detach threads from async_task
+- add patch libfilezilla-fix_undefined_reference.patch to prevent
+  build error in filezilla
+
+-------------------------------------------------------------------

Old:
----
  libfilezilla-0.9.1.tar.bz2

New:
----
  libfilezilla-0.9.2.tar.bz2
  libfilezilla-fix_undefined_reference.patch

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

Other differences:
------------------
++++++ libfilezilla.spec ++++++
--- /var/tmp/diff_new_pack.6Zv52Y/_old  2017-07-09 13:04:24.377343715 +0200
+++ /var/tmp/diff_new_pack.6Zv52Y/_new  2017-07-09 13:04:24.381343152 +0200
@@ -20,7 +20,7 @@
 %define libname                %{name}%{major}
 %define develname      %{name}-devel
 Name:           libfilezilla
-Version:        0.9.1
+Version:        0.9.2
 Release:        0
 Summary:        C++ library for filezilla
 License:        GPL-2.0+
@@ -28,7 +28,8 @@
 Url:            https://lib.filezilla-project.org/
 Source0:        
http://download.filezilla-project.org/libfilezilla/%{name}-%{version}.tar.bz2
 Source1:        COPYING
-Patch0:         libfilezilla-date-time.patch
+Patch0:         %{name}-date-time.patch
+Patch1:         %{name}-fix_undefined_reference.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  doxygen
@@ -88,6 +89,7 @@
 %prep
 %setup -q
 %patch0
+%patch1 -p1
 #copy in up to date GPL-2.0 license.
 cp -v %{SOURCE1} .
 

++++++ libfilezilla-0.9.1.tar.bz2 -> libfilezilla-0.9.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.9.1/NEWS new/libfilezilla-0.9.2/NEWS
--- old/libfilezilla-0.9.1/NEWS 2017-02-20 23:08:47.000000000 +0100
+++ new/libfilezilla-0.9.2/NEWS 2017-05-25 20:35:14.000000000 +0200
@@ -1,3 +1,10 @@
+0.9.2 (2017-05-25)
+
++ Added fz::random_bytes to obtain a vector of the passed size of uniformly 
distributed random bytes
++ Added fz::ltrim and fz::rtim
++ Added parameter to trim functions which characters to trim
++ It is now possible to detach threads from async_task
+
 0.9.1 (2017-02-20)
 
 + Added a small helper function to fz::file to get the current position in the 
file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.9.1/configure 
new/libfilezilla-0.9.2/configure
--- old/libfilezilla-0.9.1/configure    2017-02-20 23:10:00.000000000 +0100
+++ new/libfilezilla-0.9.2/configure    2017-05-25 20:35:21.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libfilezilla 0.9.1.
+# Generated by GNU Autoconf 2.69 for libfilezilla 0.9.2.
 #
 # Report bugs to <tim.ko...@filezilla-project.org>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='libfilezilla'
 PACKAGE_TARNAME='libfilezilla'
-PACKAGE_VERSION='0.9.1'
-PACKAGE_STRING='libfilezilla 0.9.1'
+PACKAGE_VERSION='0.9.2'
+PACKAGE_STRING='libfilezilla 0.9.2'
 PACKAGE_BUGREPORT='tim.ko...@filezilla-project.org'
 PACKAGE_URL='https://lib.filezilla-project.org/'
 
@@ -1396,7 +1396,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libfilezilla 0.9.1 to adapt to many kinds of systems.
+\`configure' configures libfilezilla 0.9.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1466,7 +1466,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libfilezilla 0.9.1:";;
+     short | recursive ) echo "Configuration of libfilezilla 0.9.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1591,7 +1591,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libfilezilla configure 0.9.1
+libfilezilla configure 0.9.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2036,7 +2036,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libfilezilla $as_me 0.9.1, which was
+It was created by libfilezilla $as_me 0.9.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2902,7 +2902,7 @@
 
 # Define the identity of the package.
  PACKAGE='libfilezilla'
- VERSION='0.9.1'
+ VERSION='0.9.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -20214,7 +20214,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libfilezilla $as_me 0.9.1, which was
+This file was extended by libfilezilla $as_me 0.9.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20281,7 +20281,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-libfilezilla config.status 0.9.1
+libfilezilla config.status 0.9.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.9.1/configure.ac 
new/libfilezilla-0.9.2/configure.ac
--- old/libfilezilla-0.9.1/configure.ac 2017-02-20 23:08:14.000000000 +0100
+++ new/libfilezilla-0.9.2/configure.ac 2017-05-25 20:35:14.000000000 +0200
@@ -1,4 +1,4 @@
-AC_INIT([libfilezilla],[0.9.1],[tim.ko...@filezilla-project.org],[],[https://lib.filezilla-project.org/])
+AC_INIT([libfilezilla],[0.9.2],[tim.ko...@filezilla-project.org],[],[https://lib.filezilla-project.org/])
 AC_CONFIG_HEADERS([lib/libfilezilla/private/config.hpp])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR(config)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.9.1/lib/libfilezilla/shared.hpp 
new/libfilezilla-0.9.2/lib/libfilezilla/shared.hpp
--- old/libfilezilla-0.9.1/lib/libfilezilla/shared.hpp  2016-05-20 
18:31:53.000000000 +0200
+++ new/libfilezilla-0.9.2/lib/libfilezilla/shared.hpp  2017-05-25 
20:35:14.000000000 +0200
@@ -4,7 +4,7 @@
 #include <memory>
 
 /** \file
-* \brief Declares the shared_optionsl and shared_value template classes.
+* \brief Declares the shared_optional and shared_value template classes.
 */
 namespace fz {
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.9.1/lib/libfilezilla/string.hpp 
new/libfilezilla-0.9.2/lib/libfilezilla/string.hpp
--- old/libfilezilla-0.9.1/lib/libfilezilla/string.hpp  2017-02-20 
22:19:51.000000000 +0100
+++ new/libfilezilla-0.9.2/lib/libfilezilla/string.hpp  2017-05-25 
20:35:14.000000000 +0200
@@ -396,24 +396,43 @@
 
 /// \brief Return passed string with all leading and trailing whitespace 
removed
 template<typename String>
-String trimmed(String const& s) {
-       size_t const first = s.find_first_not_of(fzS(typename 
String::value_type, " \r\n\t"));
+String trimmed(String const& s, String const& chars = fzS(typename 
String::value_type, " \r\n\t"), bool fromLeft = true, bool fromRight = true) {
+       size_t const first = fromLeft ? s.find_first_not_of(chars) : 0;
        if (first == String::npos) {
                return String();
        }
-       else {
-               // Cannot be npos
-               size_t const last = s.find_last_not_of(fzS(typename 
String::value_type, " \r\n\t"));
-
-               return s.substr(first, last - first + 1);
+       
+       size_t const last = fromRight ? s.find_last_not_of(chars) : s.size();
+       if (last == String::npos) {
+               return String();
        }
+       return s.substr(first, last - first + 1);
 }
 
+template<typename String>
+String ltrimmed(String const& s, String const& chars = fzS(typename 
String::value_type, " \r\n\t"), bool fromLeft = true, bool fromRight = true) {
+       return trimmed(s, chars, true, false);
+}
+
+template<typename String>
+String rtrimmed(String const& s, String const& chars = fzS(typename 
String::value_type, " \r\n\t"), bool fromLeft = true, bool fromRight = true) {
+       return trimmed(s, chars, false, true);
+}
 
 /// \brief Remove all leading and trailing whitespace from string
 template<typename String>
-void trim(String & s) {
-       s = trimmed(s);
+void trim(String & s, String const& chars = fzS(typename String::value_type, " 
\r\n\t")) {
+       s = trimmed(s, chars);
+}
+
+template<typename String>
+void ltrim(String & s, String const& chars = fzS(typename String::value_type, 
" \r\n\t")) {
+       s = trimmed(s, chars, true, false);
+}
+
+template<typename String>
+void rtrim(String & s, String const& chars = fzS(typename String::value_type, 
" \r\n\t")) {
+       s = trimmed(s, chars, false, true);
 }
 
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.9.1/lib/libfilezilla/thread_pool.hpp 
new/libfilezilla-0.9.2/lib/libfilezilla/thread_pool.hpp
--- old/libfilezilla-0.9.1/lib/libfilezilla/thread_pool.hpp     2016-09-24 
15:14:12.000000000 +0200
+++ new/libfilezilla-0.9.2/lib/libfilezilla/thread_pool.hpp     2017-05-25 
20:35:14.000000000 +0200
@@ -22,6 +22,8 @@
 class FZ_PUBLIC_SYMBOL async_task final {
 public:
        async_task() = default;
+
+       /// If task has not been detached, calls join
        ~async_task();
 
        async_task(async_task const&) = delete;
@@ -30,12 +32,15 @@
        async_task(async_task && other) noexcept;
        async_task& operator=(async_task && other) noexcept;
 
-       /// Wait for the task to finish
+       /// Wait for the task to finish, adds the now idle thread back into the 
pool
        void join();
 
        /// Check whether it's a spawned, unjoined task.
        explicit operator bool() const { return impl_ != 0; }
 
+       /// Detach the running thread from the task. Once done, the thread adds 
itself back into the pool
+       void detach();
+
 private:
        friend class thread_pool;
        friend class pooled_thread_impl;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.9.1/lib/libfilezilla/util.hpp 
new/libfilezilla-0.9.2/lib/libfilezilla/util.hpp
--- old/libfilezilla-0.9.1/lib/libfilezilla/util.hpp    2015-11-02 
14:47:31.000000000 +0100
+++ new/libfilezilla-0.9.2/lib/libfilezilla/util.hpp    2017-05-25 
20:35:14.000000000 +0200
@@ -26,6 +26,10 @@
  */
 int64_t FZ_PUBLIC_SYMBOL random_number(int64_t min, int64_t max);
 
+/** \brief Get random uniformly distributed bytes
+ */
+std::vector<uint8_t> random_bytes(size_t size);
+
 }
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.9.1/lib/libfilezilla/version.hpp 
new/libfilezilla-0.9.2/lib/libfilezilla/version.hpp
--- old/libfilezilla-0.9.1/lib/libfilezilla/version.hpp 2017-02-20 
23:10:02.000000000 +0100
+++ new/libfilezilla-0.9.2/lib/libfilezilla/version.hpp 2017-05-25 
20:35:23.000000000 +0200
@@ -9,15 +9,15 @@
 
 #include <tuple>
 /// \brief Version string of the libfilezilla headers
-#define LIBFILEZILLA_VERSION "0.9.1"
+#define LIBFILEZILLA_VERSION "0.9.2"
 
 #define LIBFILEZILLA_VERSION_MAJOR  0
 #define LIBFILEZILLA_VERSION_MINOR  9
-#define LIBFILEZILLA_VERSION_MICRO  1
+#define LIBFILEZILLA_VERSION_MICRO  2
 #define LIBFILEZILLA_VERSION_NANO   0
 
 /// \brief Suffix string, e.g. "rc1"
-#define LIBFILEZILLA_VERSION_SUFFIX "0.9.1"
+#define LIBFILEZILLA_VERSION_SUFFIX "0.9.2"
 
 namespace fz {
 /// \brief Get version string of libfilezilla
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.9.1/lib/libfilezilla.vcxproj 
new/libfilezilla-0.9.2/lib/libfilezilla.vcxproj
--- old/libfilezilla-0.9.1/lib/libfilezilla.vcxproj     2016-09-24 
15:14:12.000000000 +0200
+++ new/libfilezilla-0.9.2/lib/libfilezilla.vcxproj     2017-05-25 
20:35:14.000000000 +0200
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+<Project DefaultTargets="Build" ToolsVersion="15.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
   <ItemGroup Label="ProjectConfigurations">
     <ProjectConfiguration Include="dll_debug|Win32">
       <Configuration>dll_debug</Configuration>
@@ -54,7 +54,7 @@
     <ConfigurationType>DynamicLibrary</ConfigurationType>
   </PropertyGroup>
   <PropertyGroup Label="Configuration">
-    <PlatformToolset>v140</PlatformToolset>
+    <PlatformToolset>v141</PlatformToolset>
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Label="Configuration" 
Condition="'$(Configuration)'=='static_release'">
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.9.1/lib/mutex.cpp 
new/libfilezilla-0.9.2/lib/mutex.cpp
--- old/libfilezilla-0.9.1/lib/mutex.cpp        2016-07-20 10:41:55.000000000 
+0200
+++ new/libfilezilla-0.9.2/lib/mutex.cpp        2017-05-25 20:35:14.000000000 
+0200
@@ -3,8 +3,10 @@
 #ifndef FZ_WINDOWS
 #include <errno.h>
 #include <sys/time.h>
+
 #endif
 
+
 #ifndef FZ_WINDOWS
 namespace {
 // Static initializers for mutex and condition attributes
@@ -14,6 +16,7 @@
        static pthread_mutexattr_t attr;
        pthread_mutexattr_init(&attr);
        pthread_mutexattr_settype(&attr, type);
+
        return &attr;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.9.1/lib/thread_pool.cpp 
new/libfilezilla-0.9.2/lib/thread_pool.cpp
--- old/libfilezilla-0.9.1/lib/thread_pool.cpp  2016-09-24 15:14:12.000000000 
+0200
+++ new/libfilezilla-0.9.2/lib/thread_pool.cpp  2017-05-25 20:35:14.000000000 
+0200
@@ -11,6 +11,7 @@
        pooled_thread_impl(thread_pool & pool)
                : m_(pool.m_)
                , pool_(pool)
+           , detached_()
        {}
 
        virtual ~pooled_thread_impl()
@@ -27,7 +28,13 @@
                                l.unlock();
                                f_();
                                l.lock();
-                               task_cond_.signal(l);
+                               if (detached_) {
+                                       f_ = std::function<void()>();
+                                       pool_.idle_.push_back(this);
+                               }
+                               else {
+                                       task_cond_.signal(l);
+                               }
                        }
                }
        }
@@ -44,6 +51,7 @@
        condition task_cond_;
        thread_pool& pool_;
 
+       bool detached_{};
 private:
        bool quit_{};
 };
@@ -65,7 +73,6 @@
        join();
 }
 
-
 void async_task::join()
 {
        if (impl_) {
@@ -77,7 +84,19 @@
        }
 }
 
-
+void async_task::detach()
+{
+       if (impl_) {
+               scoped_lock l(impl_->m_);
+               if (impl_->task_cond_.signalled(l)) {
+                       join();
+               }
+               else {
+                       impl_->detached_ = true;
+                       impl_ = 0;
+               }
+       }
+}
 
 thread_pool::thread_pool()
 {
@@ -121,6 +140,7 @@
 
        ret.impl_ = t;
        t->f_ = f;
+       t->detached_ = false;
        t->thread_cond_.signal(l);
 
        return ret;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.9.1/lib/util.cpp 
new/libfilezilla-0.9.2/lib/util.cpp
--- old/libfilezilla-0.9.1/lib/util.cpp 2015-11-02 14:47:31.000000000 +0100
+++ new/libfilezilla-0.9.2/lib/util.cpp 2017-05-25 20:35:14.000000000 +0200
@@ -5,6 +5,7 @@
 #include <random>
 
 #include <time.h>
+#include <string.h>
 
 #if defined(FZ_WINDOWS) && !defined(_MSC_VER)
 #include "libfilezilla/private/windows.hpp"
@@ -88,4 +89,26 @@
        return dist(rd);
 }
 
+std::vector<uint8_t> random_bytes(size_t size)
+{
+       std::vector<uint8_t> ret;
+       ret.resize(size);
+
+       std::random_device rd;
+
+       ret.resize(size);
+       size_t i;
+       for (i = 0; i + sizeof(std::random_device::result_type) <= ret.size(); 
i += sizeof(std::random_device::result_type)) {
+               *reinterpret_cast<std::random_device::result_type*>(&ret[i]) = 
rd();
+       }
+
+       if (i < size) {
+               auto v = rd();
+               memcpy(&ret[i], &v, size - i);
+       }
+
+       return ret;
+}
+
+
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.9.1/libfilezilla.sln 
new/libfilezilla-0.9.2/libfilezilla.sln
--- old/libfilezilla-0.9.1/libfilezilla.sln     2016-09-24 15:18:31.000000000 
+0200
+++ new/libfilezilla-0.9.2/libfilezilla.sln     2017-05-25 20:35:14.000000000 
+0200
@@ -1,7 +1,7 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.25420.1
+# Visual Studio 15
+VisualStudioVersion = 15.0.25914.0
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_events", 
"demos\demo_events.vcxproj", "{59E51CBA-EA1F-448F-9DF5-955EECAB8ACD}"
        ProjectSection(ProjectDependencies) = postProject

++++++ libfilezilla-fix_undefined_reference.patch ++++++
diff -Pdpru libfilezilla-0.9.2.orig/lib/libfilezilla/util.hpp 
libfilezilla-0.9.2/lib/libfilezilla/util.hpp
--- libfilezilla-0.9.2.orig/lib/libfilezilla/util.hpp   2017-05-25 
20:35:14.000000000 +0200
+++ libfilezilla-0.9.2/lib/libfilezilla/util.hpp        2017-06-05 
11:51:32.080063047 +0200
@@ -28,7 +28,7 @@ int64_t FZ_PUBLIC_SYMBOL random_number(i
 
 /** \brief Get random uniformly distributed bytes
  */
-std::vector<uint8_t> random_bytes(size_t size);
+std::vector<uint8_t> FZ_PUBLIC_SYMBOL random_bytes(size_t size);
 
 }
 

Reply via email to