Hello community,

here is the log from the commit of package menu-cache for openSUSE:Factory 
checked in at 2020-11-13 19:00:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/menu-cache (Old)
 and      /work/SRC/openSUSE:Factory/.menu-cache.new.24930 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "menu-cache"

Fri Nov 13 19:00:28 2020 rev:31 rq:848364 version:1.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/menu-cache/menu-cache.changes    2017-11-04 
19:29:54.391767656 +0100
+++ /work/SRC/openSUSE:Factory/.menu-cache.new.24930/menu-cache.changes 
2020-11-13 19:00:50.202234025 +0100
@@ -1,0 +2,9 @@
+Fri Nov 13 08:26:15 UTC 2020 - mun...@googlemail.com
+
+- Added upstream-libmenu-cache_Fix-memory-leaks.patch
+  * libmenu-cache: Fix memory leaks
+- Added menu-cache-1.1.0-0001-Support-gcc10-compilation.patch
+  * gcc10 now defaults to -fno-common, and with gcc10 menu-cache
+    compilation fails with "multiple definition of ..."
+
+-------------------------------------------------------------------

New:
----
  menu-cache-1.1.0-0001-Support-gcc10-compilation.patch
  upstream-libmenu-cache_Fix-memory-leaks.patch

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

Other differences:
------------------
++++++ menu-cache.spec ++++++
--- /var/tmp/diff_new_pack.NofCzK/_old  2020-11-13 19:00:50.710234658 +0100
+++ /var/tmp/diff_new_pack.NofCzK/_new  2020-11-13 19:00:50.714234663 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package menu-cache
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -20,10 +20,14 @@
 Version:        1.1.0
 Release:        0
 Summary:        A tool speed up menus
-License:        GPL-2.0+ and LGPL-2.1+
+License:        GPL-2.0-or-later AND LGPL-2.1-or-later
 Group:          System/GUI/LXDE
-Url:            http://www.lxde.org
+URL:            https://www.lxde.org
 Source0:        https://github.com/lxde/%{name}/archive/%{version}.tar.gz
+# 
https://github.com/lxde/menu-cache/commit/583c1901719f2ef2aa3aa0034bd370983a7ed523
+Patch0:         upstream-libmenu-cache_Fix-memory-leaks.patch
+# 
https://github.com/archlinux/svntogit-community/blob/packages/menu-cache/trunk/menu-cache-1.1.0-0001-Support-gcc10-compilation.patch
+Patch1:         
https://raw.githubusercontent.com/archlinux/svntogit-community/packages/menu-cache/trunk/menu-cache-1.1.0-0001-Support-gcc10-compilation.patch
 BuildRequires:  automake
 BuildRequires:  fdupes
 BuildRequires:  gtk-doc
@@ -32,7 +36,6 @@
 BuildRequires:  libtool
 #BuildRequires:  m4
 BuildRequires:  pkgconfig(libfm-extra)
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 Libmenu-cache is a library creating and utilizing caches to speed up
@@ -58,7 +61,7 @@
 %{name} libraries for development
 
 %prep
-%setup -q
+%autosetup -p1
 sh autogen.sh
 
 %build
@@ -77,18 +80,16 @@
 %postun -n libmenu-cache3 -p /sbin/ldconfig
 
 %files
-%defattr(-,root,root)
-%doc README AUTHORS COPYING NEWS
+%license COPYING
+%doc README AUTHORS NEWS
 %{_libexecdir}/%{name}
 
 %files devel
-%defattr(-,root,root)
 %{_includedir}/%{name}
 %{_libdir}/libmenu-cache.so
 %{_libdir}/pkgconfig/libmenu-cache.pc
 
 %files -n libmenu-cache3
-%defattr(-,root,root)
 %{_libdir}/libmenu-cache.so.3
 %{_libdir}/libmenu-cache.so.3.2.0
 

++++++ menu-cache-1.1.0-0001-Support-gcc10-compilation.patch ++++++
From 1ce739649b4d66339a03fc0ec9ee7a2f7c141780 Mon Sep 17 00:00:00 2001
From: Mamoru TASAKA <mtas...@fedoraproject.org>
Date: Fri, 24 Jan 2020 13:33:00 +0900
Subject: [PATCH] Support gcc10 compilation

gcc10 now defaults to -fno-common, and with gcc10 menu-cache compilation fails 
like

/bin/ld: menu-merge.o:menu-cache-gen/menu-tags.h:167: multiple definition of 
`DirDirs'; main.o:menu-cache-gen/menu-tags.h:167: first defined here
/bin/ld: menu-merge.o:menu-cache-gen/menu-tags.h:164: multiple definition of 
`AppDirs'; main.o:menu-cache-gen/menu-tags.h:164: first defined here
/bin/ld: menu-merge.o:menu-cache-gen/menu-tags.h:52: multiple definition of 
`menuTag_Layout'; main.o:menu-cache-gen/menu-tags.h:52: first defined here
....

This patch fixes compilation with gcc10: properly declaring variables in header 
with "extern", and also removing some unneeded variables in header files.
---
 menu-cache-gen/menu-tags.h | 55 ++++++++++++--------------------------
 1 file changed, 17 insertions(+), 38 deletions(-)

diff --git a/menu-cache-gen/menu-tags.h b/menu-cache-gen/menu-tags.h
index f3fd7d3..f71c0bc 100644
--- a/menu-cache-gen/menu-tags.h
+++ b/menu-cache-gen/menu-tags.h
@@ -22,38 +22,17 @@
 #include <libfm/fm-extra.h>
 #include <menu-cache.h>
 
-FmXmlFileTag menuTag_Menu;
-FmXmlFileTag menuTag_AppDir;
-FmXmlFileTag menuTag_DefaultAppDirs;
-FmXmlFileTag menuTag_DirectoryDir;
-FmXmlFileTag menuTag_DefaultDirectoryDirs;
-FmXmlFileTag menuTag_Include;
-FmXmlFileTag menuTag_Exclude;
-FmXmlFileTag menuTag_Filename;
-FmXmlFileTag menuTag_Or;
-FmXmlFileTag menuTag_And;
-FmXmlFileTag menuTag_Not;
-FmXmlFileTag menuTag_Category;
-FmXmlFileTag menuTag_MergeFile;
-FmXmlFileTag menuTag_MergeDir;
-FmXmlFileTag menuTag_DefaultMergeDirs;
-FmXmlFileTag menuTag_Directory;
-FmXmlFileTag menuTag_Name;
-FmXmlFileTag menuTag_Deleted;
-FmXmlFileTag menuTag_NotDeleted;
-FmXmlFileTag menuTag_OnlyUnallocated;
-FmXmlFileTag menuTag_NotOnlyUnallocated;
-FmXmlFileTag menuTag_All;
-FmXmlFileTag menuTag_LegacyDir;
-FmXmlFileTag menuTag_KDELegacyDirs;
-FmXmlFileTag menuTag_Move;
-FmXmlFileTag menuTag_Old;
-FmXmlFileTag menuTag_New;
-FmXmlFileTag menuTag_Layout;
-FmXmlFileTag menuTag_DefaultLayout;
-FmXmlFileTag menuTag_Menuname;
-FmXmlFileTag menuTag_Separator;
-FmXmlFileTag menuTag_Merge;
+extern FmXmlFileTag menuTag_AppDir;
+extern FmXmlFileTag menuTag_DirectoryDir;
+extern FmXmlFileTag menuTag_Include;
+extern FmXmlFileTag menuTag_Exclude;
+extern FmXmlFileTag menuTag_Filename;
+extern FmXmlFileTag menuTag_Or;
+extern FmXmlFileTag menuTag_And;
+extern FmXmlFileTag menuTag_Not;
+extern FmXmlFileTag menuTag_Category;
+extern FmXmlFileTag menuTag_All;
+extern FmXmlFileTag menuTag_LegacyDir;
 
 typedef enum {
     MERGE_NONE, /* starting value */
@@ -152,19 +131,19 @@ typedef struct {
 } MenuRule;
 
 /* requested language(s) */
-char **languages;
+extern char **languages;
 
 /* list of menu files to monitor */
-GSList *MenuFiles;
+extern GSList *MenuFiles;
 
 /* list of menu dirs to monitor */
-GSList *MenuDirs;
+extern GSList *MenuDirs;
 
 /* list of available app dirs */
-GSList *AppDirs;
+extern GSList *AppDirs;
 
 /* list of available dir dirs */
-GSList *DirDirs;
+extern GSList *DirDirs;
 
 /* parse and merge menu files */
 MenuMenu *get_merged_menu(const char *file, FmXmlFile **xmlfile, GError 
**error);
@@ -177,7 +156,7 @@ gboolean save_menu_cache(MenuMenu *layout, const char 
*menuname, const char *fil
 void _free_layout_items(GList *data);
 
 /* verbosity level */
-gint verbose;
+extern gint verbose;
 
 #define DBG if (verbose) g_debug
 #define VDBG if (verbose > 1) g_debug
-- 
2.24.1

++++++ upstream-libmenu-cache_Fix-memory-leaks.patch ++++++
From 97e5de8682c0c44fe4e6a2df864c5fdf76cd77cc Mon Sep 17 00:00:00 2001
From: Palo Kisa <palo.k...@gmail.com>
Date: Thu, 30 Nov 2017 11:36:18 +0100
Subject: [PATCH] libmenu-cache: Fix memory leaks

---
 libmenu-cache/menu-cache.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libmenu-cache/menu-cache.c b/libmenu-cache/menu-cache.c
index 5025d72..273b503 100644
--- a/libmenu-cache/menu-cache.c
+++ b/libmenu-cache/menu-cache.c
@@ -379,11 +379,15 @@ static MenuCacheItem* read_item(GDataInputStream* f, 
MenuCache* cache,
             else /* separator */
             {
                 item->type = MENU_CACHE_TYPE_SEP;
+                g_free(line);
                 return item;
             }
         }
         else
+        {
+            g_free(line);
             return NULL;
+        }
 
         item->id = g_strndup( line + 1, len - 1 );
         g_free(line);
@@ -923,6 +927,7 @@ gboolean menu_cache_item_unref(MenuCacheItem* item)
         else
         {
             MenuCacheApp* app = MENU_CACHE_APP(item);
+            g_free(app->generic_name);
             g_free( app->exec );
             g_free(app->try_exec);
             g_free(app->working_dir);
_______________________________________________
openSUSE Commits mailing list -- commit@lists.opensuse.org
To unsubscribe, email commit-le...@lists.opensuse.org
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/commit@lists.opensuse.org

Reply via email to