Hello community,

here is the log from the commit of package growlight for openSUSE:Factory 
checked in at 2020-11-10 13:46:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/growlight (Old)
 and      /work/SRC/openSUSE:Factory/.growlight.new.11331 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "growlight"

Tue Nov 10 13:46:04 2020 rev:6 rq:847334 version:1.2.18

Changes:
--------
--- /work/SRC/openSUSE:Factory/growlight/growlight.changes      2020-10-27 
18:59:54.434785250 +0100
+++ /work/SRC/openSUSE:Factory/.growlight.new.11331/growlight.changes   
2020-11-10 13:53:11.410879839 +0100
@@ -1,0 +2,8 @@
+Sun Nov  1 10:44:30 UTC 2020 - Martin Hauke <mar...@gmx.de>
+
+- Update to version 1.2.18
+  * use recursive_lock_init() for musl.
+  * add recursive_lock_init() for glibc+musl.
+  * convert growlight.png to growlight.jpeg, save ~130K
+
+-------------------------------------------------------------------

Old:
----
  growlight-1.2.17.tar.gz

New:
----
  growlight-1.2.18.tar.gz

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

Other differences:
------------------
++++++ growlight.spec ++++++
--- /var/tmp/diff_new_pack.JemtAM/_old  2020-11-10 13:53:12.150878440 +0100
+++ /var/tmp/diff_new_pack.JemtAM/_new  2020-11-10 13:53:12.154878433 +0100
@@ -18,7 +18,7 @@
 
 
 Name:           growlight
-Version:        1.2.17
+Version:        1.2.18
 Release:        0
 Summary:        Disk manipulation and system setup tool
 License:        GPL-3.0-or-later

++++++ growlight-1.2.17.tar.gz -> growlight-1.2.18.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/growlight-1.2.17/CMakeLists.txt 
new/growlight-1.2.18/CMakeLists.txt
--- old/growlight-1.2.17/CMakeLists.txt 2020-10-25 19:20:23.000000000 +0100
+++ new/growlight-1.2.18/CMakeLists.txt 2020-11-01 11:03:07.000000000 +0100
@@ -1,5 +1,5 @@
 cmake_minimum_required(VERSION 3.14)
-project(growlight VERSION 1.2.17
+project(growlight VERSION 1.2.18
   DESCRIPTION "Block device and filesystem manager"
   HOMEPAGE_URL "https://nick-black.com/dankwiki/index.php/Growlight";
   LANGUAGES C)
Binary files old/growlight-1.2.17/doc/growlight.jpg and 
new/growlight-1.2.18/doc/growlight.jpg differ
Binary files old/growlight-1.2.17/doc/growlight.png and 
new/growlight-1.2.18/doc/growlight.png differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/growlight-1.2.17/doc/man/man8/growlight-readline.8.md 
new/growlight-1.2.18/doc/man/man8/growlight-readline.8.md
--- old/growlight-1.2.17/doc/man/man8/growlight-readline.8.md   2020-10-25 
19:20:23.000000000 +0100
+++ new/growlight-1.2.18/doc/man/man8/growlight-readline.8.md   2020-11-01 
11:03:07.000000000 +0100
@@ -1,6 +1,6 @@
 % growlight-readline(8)
 % nick black <nickbl...@linux.com>
-% v1.2.17
+% v1.2.18
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/growlight-1.2.17/doc/man/man8/growlight.8.md 
new/growlight-1.2.18/doc/man/man8/growlight.8.md
--- old/growlight-1.2.17/doc/man/man8/growlight.8.md    2020-10-25 
19:20:23.000000000 +0100
+++ new/growlight-1.2.18/doc/man/man8/growlight.8.md    2020-11-01 
11:03:07.000000000 +0100
@@ -1,6 +1,6 @@
 % growlight(8)
 % nick black <nickbl...@linux.com>
-% v1.2.17
+% v1.2.18
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/growlight-1.2.17/src/growlight.c 
new/growlight-1.2.18/src/growlight.c
--- old/growlight-1.2.17/src/growlight.c        2020-10-25 19:20:23.000000000 
+0100
+++ new/growlight-1.2.18/src/growlight.c        2020-11-01 11:03:07.000000000 
+0100
@@ -48,6 +48,7 @@
 #include "ptable.h"
 #include "mounts.h"
 #include "target.h"
+#include "threads.h"
 #include "version.h"
 #include "libblkid.h"
 #include "growlight.h"
@@ -71,7 +72,7 @@
 static unsigned usepci;
 static const glightui *gui;
 static struct pci_access *pciacc;
-static pthread_mutex_t lock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+static pthread_mutex_t lock; // recursive, initialized in growlight_init()
 
 static unsigned thrcount;
 static pthread_mutex_t barrier = PTHREAD_MUTEX_INITIALIZER;
@@ -1900,6 +1901,9 @@
 }
 
 int growlight_init(int argc, char * const *argv, const glightui *ui, int 
*disphelp){
+       if(recursive_lock_init(&lock)){
+               return -1;
+       }
        static const struct option ops[] = {
                {
                        .name = "help",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/growlight-1.2.17/src/notcurses/notcurses.c 
new/growlight-1.2.18/src/notcurses/notcurses.c
--- old/growlight-1.2.17/src/notcurses/notcurses.c      2020-10-25 
19:20:23.000000000 +0100
+++ new/growlight-1.2.18/src/notcurses/notcurses.c      2020-11-01 
11:03:07.000000000 +0100
@@ -18,6 +18,7 @@
 #include "health.h"
 #include "ptable.h"
 #include "ptypes.h"
+#include "threads.h"
 #include "growlight.h"
 #include "aggregate.h"
 #include "notui-aggregate.h"
@@ -87,7 +88,7 @@
 "not natively support it. I recommend use of EXT4 or FAT16 for root and ZFS "
 "(in a redundant configuration) for other filesystems.";
 
-static pthread_mutex_t bfl = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+static pthread_mutex_t bfl; // recursive, initialized in main()
 
 struct panel_state {
   struct ncplane *n;
@@ -6032,7 +6033,11 @@
   int showhelp = 1;
 
   if(setlocale(LC_ALL, "") == NULL){
-    fprintf(stderr,"Warning: couldn't load locale\n");
+    fprintf(stderr, "Warning: couldn't load locale\n");
+    return EXIT_FAILURE;
+  }
+  if(recursive_lock_init(&bfl)){
+    fprintf(stderr, "Error initializing recursive mutex\n");
     return EXIT_FAILURE;
   }
   sigset_t sigmask;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/growlight-1.2.17/src/threads.c 
new/growlight-1.2.18/src/threads.c
--- old/growlight-1.2.17/src/threads.c  1970-01-01 01:00:00.000000000 +0100
+++ new/growlight-1.2.18/src/threads.c  2020-11-01 11:03:07.000000000 +0100
@@ -0,0 +1,26 @@
+// copyright 2012–2020 nick black
+#include "threads.h"
+
+// initialize a recursive mutex lock in a way that works on both glibc + musl
+int recursive_lock_init(pthread_mutex_t *lock){
+#ifndef __GLIBC__
+#define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
+#endif
+       pthread_mutexattr_t attr;
+       if(pthread_mutexattr_init(&attr)){
+               return -1;
+       }
+       if(pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP)){
+               pthread_mutexattr_destroy(&attr);
+               return -1;
+       }
+       if(pthread_mutex_init(lock, &attr)){
+               pthread_mutexattr_destroy(&attr);
+               return -1;
+       }
+  pthread_mutexattr_destroy(&attr);
+       return 0;
+#ifndef __GLIBC__
+#undef PTHREAD_MUTEX_RECURSIVE_NP
+#endif
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/growlight-1.2.17/src/threads.h 
new/growlight-1.2.18/src/threads.h
--- old/growlight-1.2.17/src/threads.h  1970-01-01 01:00:00.000000000 +0100
+++ new/growlight-1.2.18/src/threads.h  2020-11-01 11:03:07.000000000 +0100
@@ -0,0 +1,17 @@
+// copyright 2012–2020 nick black
+#ifndef GROWLIGHT_THREADS
+#define GROWLIGHT_THREADS
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <pthread.h>
+
+int recursive_lock_init(pthread_mutex_t *lock);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif


Reply via email to