From 542aa3db4e9b7ed92ae6b7fa0edb3c1888c0222a Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Sat, 13 Aug 2016 02:42:45 +0900 Subject: [PATCH 01/41] Update to the latest git - Backport 2 patches from my branch - removal of monitored *.menu file triggers core dump (github#8) - menu-cached utilize 100% CPU (github#7) --- .gitignore | 1 + ...ors-only-when-cache-regeneration-suc.patch | 92 ++++++++++ ...source_remove-when-destoying-channel.patch | 167 ++++++++++++++++++ menu-cache.spec | 29 ++- sources | 2 +- 5 files changed, 284 insertions(+), 7 deletions(-) create mode 100644 menu-cache-1.0.1-0001-Cancel-old-monitors-only-when-cache-regeneration-suc.patch create mode 100644 menu-cache-1.0.1-0002-Call-g_source_remove-when-destoying-channel.patch diff --git a/.gitignore b/.gitignore index 0aaf3ac..53ab4ac 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ menu-cache-0.3.2.tar.gz /menu-cache-1.0.0-D20151126git7e63ae3f66c30a4516bf04139fd98a3856e6a065.tar.gz /menu-cache-1.0.0-D20151128git0b1e85c263f571f61384c7eb81c7edc2a69335dc.tar.gz /menu-cache-1.0.1.tar.xz +/menu-cache-1.0.1-D20160506git2932d67f305d4fd45a29c35c233ecd2925c2ecab.tar.gz diff --git a/menu-cache-1.0.1-0001-Cancel-old-monitors-only-when-cache-regeneration-suc.patch b/menu-cache-1.0.1-0001-Cancel-old-monitors-only-when-cache-regeneration-suc.patch new file mode 100644 index 0000000..8c03854 --- /dev/null +++ b/menu-cache-1.0.1-0001-Cancel-old-monitors-only-when-cache-regeneration-suc.patch @@ -0,0 +1,92 @@ +From 258d23c399c80d1472e59a85b332d4fbb699a74a Mon Sep 17 00:00:00 2001 +From: Mamoru TASAKA +Date: Tue, 26 Jul 2016 23:36:20 +0900 +Subject: [PATCH 1/2] Cancel old monitors only when cache regeneration + succeeds. + +Currently when menu-cache-gen fails and regenrate_cache() returns +false, while cache->n_files are already freed, cache->n_files +remains non-zero, which causes segv. + +So: +- cancel old monitors only when cache regeneration succeeds +- keep delayed_reload call when do_reload() fails cache->need_reload + remain true. +--- + menu-cache-daemon/menu-cached.c | 27 +++++++++++++++++++++------ + 1 file changed, 21 insertions(+), 6 deletions(-) + +diff --git a/menu-cache-daemon/menu-cached.c b/menu-cache-daemon/menu-cached.c +index 42ac93f..a78a0d0 100644 +--- a/menu-cache-daemon/menu-cached.c ++++ b/menu-cache-daemon/menu-cached.c +@@ -261,6 +261,9 @@ static void do_reload(Cache* cache) + int i; + GFile* gf; + ++ int new_n_files; ++ char **new_files = NULL; ++ + /* DEBUG("Re-generation of cache is needed!"); */ + /* DEBUG("call menu-cache-gen to re-generate the cache"); */ + memcpy( buf, "REL:", 4 ); +@@ -268,6 +271,13 @@ static void do_reload(Cache* cache) + buf[36] = '\n'; + buf[37] = '\0'; + ++ if( ! regenerate_cache( cache->menu_name, cache->lang_name, cache->cache_file, ++ cache->env, &new_n_files, &new_files ) ) ++ { ++ DEBUG("regeneration of cache failed."); ++ return; ++ } ++ + /* cancel old file monitors */ + g_strfreev(cache->files); + for( i = 0; i < cache->n_files; ++i ) +@@ -280,11 +290,9 @@ static void do_reload(Cache* cache) + g_file_monitor_cancel(cache->cache_mon); + g_object_unref(cache->cache_mon); + */ +- if( ! regenerate_cache( cache->menu_name, cache->lang_name, cache->cache_file, +- cache->env, &cache->n_files, &cache->files ) ) +- { +- DEBUG("regeneration of cache failed."); +- } ++ ++ cache->n_files = new_n_files; ++ cache->files = new_files; + + cache->mons = g_realloc( cache->mons, sizeof(GFileMonitor*)*(cache->n_files+1) ); + /* create required file monitors */ +@@ -321,10 +329,13 @@ static gboolean delayed_reload( Cache* cache ) + if(g_source_is_destroyed(g_main_current_source())) + return FALSE; + +- cache->delayed_reload_handler = 0; + if(cache->need_reload) + do_reload(cache); + ++ if (cache->need_reload) ++ return TRUE; ++ ++ cache->delayed_reload_handler = 0; + return FALSE; + } + +@@ -385,8 +396,12 @@ void on_file_changed( GFileMonitor* mon, GFile* gf, GFile* other, + g_source_remove(cache->delayed_reload_handler); + } + else ++ { + /* no reload in last 3 seconds... good, do it immediately */ ++ /* mark need_reload anyway. If do_reload succeeds, it is cleaned up */ ++ cache->need_reload = TRUE; + do_reload(cache); ++ } + + cache->delayed_reload_handler = g_timeout_add_seconds_full( G_PRIORITY_LOW, 3, (GSourceFunc)delayed_reload, cache, NULL ); + } +-- +2.9.2 + diff --git a/menu-cache-1.0.1-0002-Call-g_source_remove-when-destoying-channel.patch b/menu-cache-1.0.1-0002-Call-g_source_remove-when-destoying-channel.patch new file mode 100644 index 0000000..f17b310 --- /dev/null +++ b/menu-cache-1.0.1-0002-Call-g_source_remove-when-destoying-channel.patch @@ -0,0 +1,167 @@ +From 5800ac60392bb1dce41e6aa08a07cfbbd333b16b Mon Sep 17 00:00:00 2001 +From: Mamoru TASAKA +Date: Mon, 8 Aug 2016 21:01:50 +0900 +Subject: [PATCH 2/2] Call g_source_remove when destoying channel + +ref: https://github.com/lxde/menu-cache/issues/7 + +It seems that even if the client side of *socket* is already +closed, the server side cannot receive POLLHUP. And when +it already happened, at the time the server tries to write +into the socket, SIGPIPE is received, then we firstly know that +the client is already closed. + +Also, then closing GIOChannel, we must explicitly remove the +"source" added by g_io_add_watch, otherwise we see 100 percent +CPU usage by poll. + +So we must register source id as well as channel simultaneously, +and call shutdown function explicitly when we receive +SIGPIPE. +--- + menu-cache-daemon/menu-cached.c | 42 +++++++++++++++++++++++++++++++---------- + 1 file changed, 32 insertions(+), 10 deletions(-) + +diff --git a/menu-cache-daemon/menu-cached.c b/menu-cache-daemon/menu-cached.c +index a78a0d0..758a541 100644 +--- a/menu-cache-daemon/menu-cached.c ++++ b/menu-cache-daemon/menu-cached.c +@@ -76,6 +76,11 @@ typedef struct _Cache + char *cache_file; + }Cache; + ++typedef struct ClientIO_ { ++ guint source_id; ++ GIOChannel *channel; ++} ClientIO; ++ + static GMainLoop* main_loop = NULL; + + static GHashTable* hash = NULL; +@@ -85,6 +90,8 @@ static char *socket_file = NULL; + static void on_file_changed( GFileMonitor* mon, GFile* gf, GFile* other, + GFileMonitorEvent evt, Cache* cache ); + ++static void on_client_closed(gpointer user_data); ++ + static gboolean delayed_cache_free(gpointer data) + { + Cache* cache = data; +@@ -317,9 +324,12 @@ static void do_reload(Cache* cache) + /* notify the clients that reload is needed. */ + for( l = cache->clients; l; l = l->next ) + { +- GIOChannel* ch = (GIOChannel*)l->data; ++ ClientIO *channel_io = (ClientIO *)l->data; ++ GIOChannel* ch = channel_io->channel; + if(write(g_io_channel_unix_get_fd(ch), buf, 37) < 37) +- g_io_channel_shutdown(ch, FALSE, NULL); ++ { ++ on_client_closed(channel_io); ++ } + } + cache->need_reload = FALSE; + } +@@ -503,16 +513,18 @@ static int create_socket(struct sockaddr_un *addr) + + static void on_client_closed(gpointer user_data) + { +- GIOChannel* ch = user_data; ++ ClientIO* client_io = user_data; + GHashTableIter it; + char* md5; + Cache* cache; + GSList *l; ++ GIOChannel *ch = client_io->channel; ++ + DEBUG("client closed: %p", ch); + g_hash_table_iter_init (&it, hash); + while( g_hash_table_iter_next (&it, (gpointer*)&md5, (gpointer*)&cache) ) + { +- while((l = g_slist_find( cache->clients, ch )) != NULL) ++ while((l = g_slist_find( cache->clients, client_io )) != NULL) + { + /* FIXME: some clients are closed accidentally without + * unregister the menu first due to crashes. +@@ -530,6 +542,9 @@ static void on_client_closed(gpointer user_data) + } + } + /* DEBUG("client closed"); */ ++ ++ g_source_remove(client_io->source_id); ++ g_free(client_io); + } + + static gboolean on_client_data_in(GIOChannel* ch, GIOCondition cond, gpointer user_data) +@@ -544,6 +559,7 @@ static gboolean on_client_data_in(GIOChannel* ch, GIOCondition cond, gpointer us + + if(cond & (G_IO_HUP|G_IO_ERR) ) + { ++ on_client_closed(user_data); + return FALSE; /* remove the watch */ + } + +@@ -551,8 +567,10 @@ retry: + st = g_io_channel_read_line( ch, &line, &len, NULL, NULL ); + if( st == G_IO_STATUS_AGAIN ) + goto retry; +- if( st != G_IO_STATUS_NORMAL ) ++ if( st != G_IO_STATUS_NORMAL ) { ++ on_client_closed(user_data); + return FALSE; ++ } + + --len; + line[len] = 0; +@@ -659,7 +677,7 @@ retry: + } + } + /* DEBUG("menu %s requested by client %d", md5, g_io_channel_unix_get_fd(ch)); */ +- cache->clients = g_slist_prepend(cache->clients, ch); ++ cache->clients = g_slist_prepend(cache->clients, user_data); + if(cache->delayed_free_handler) + { + g_source_remove(cache->delayed_free_handler); +@@ -685,7 +703,7 @@ retry: + if(cache && cache->clients) + { + /* remove the IO channel from the cache */ +- cache->clients = g_slist_remove(cache->clients, ch); ++ cache->clients = g_slist_remove(cache->clients, user_data); + if(cache->clients == NULL) + cache_free(cache); + } +@@ -703,6 +721,7 @@ static gboolean on_new_conn_incoming(GIOChannel* ch, GIOCondition cond, gpointer + socklen_t client_addrlen; + struct sockaddr client_addr; + GIOChannel* child; ++ ClientIO* client_io; + + server = g_io_channel_unix_get_fd(ch); + +@@ -716,8 +735,12 @@ static gboolean on_new_conn_incoming(GIOChannel* ch, GIOCondition cond, gpointer + + child = g_io_channel_unix_new(client); + g_io_channel_set_close_on_unref( child, TRUE ); +- g_io_add_watch_full(child, G_PRIORITY_DEFAULT, G_IO_PRI|G_IO_IN|G_IO_HUP|G_IO_ERR, +- on_client_data_in, child, on_client_closed); ++ ++ client_io = g_new0 (ClientIO, 1); ++ client_io->channel = child; ++ client_io->source_id = ++ g_io_add_watch(child, G_IO_PRI|G_IO_IN|G_IO_HUP|G_IO_ERR, ++ on_client_data_in, client_io); + g_io_channel_unref(child); + + DEBUG("new client accepted: %p", child); +@@ -823,7 +846,6 @@ int main(int argc, char** argv) + ch = g_io_channel_unix_new(server_fd); + if(!ch) + return 1; +- g_io_channel_set_close_on_unref(ch, TRUE); + g_io_add_watch(ch, G_IO_IN|G_IO_PRI, on_new_conn_incoming, NULL); + g_io_add_watch(ch, G_IO_ERR, on_server_conn_close, NULL); + g_io_channel_unref(ch); +-- +2.9.2 + diff --git a/menu-cache.spec b/menu-cache.spec index 699b641..da152b0 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -1,10 +1,10 @@ -%global usegit 0 -%global mainrel 1 +%global usegit 1 +%global mainrel 2 -%global githash 0b1e85c263f571f61384c7eb81c7edc2a69335dc +%global githash 2932d67f305d4fd45a29c35c233ecd2925c2ecab %global shorthash %(TMP=%githash ; echo ${TMP:0:10}) -%global gitdate 0b1e85c263f571f61384c7eb81c7edc2a69335dc -%global gitdate_num 20151128 +%global gitdate Sun, 6 Mar 2016 18:06:49 +0100 +%global gitdate_num 20160506 %if 0%{?usegit} >= 1 %global fedorarel %{mainrel}.D%{gitdate_num}git%{shorthash} @@ -14,7 +14,7 @@ Name: menu-cache Version: 1.0.1 -Release: %{fedorarel}%{?dist}.1 +Release: %{fedorarel}%{?dist} Summary: Caching mechanism for freedesktop.org compliant menus Group: System Environment/Libraries @@ -27,6 +27,14 @@ Source0: https://github.com/lxde/menu-cache/archive/%{githash}/%{name}-%{ Source0: http://downloads.sourceforge.net/lxde/%{name}-%{version}.tar.xz %endif +# https://github.com/lxde/menu-cache/issues/8 +# https://github.com/lxde/menu-cache/pull/12 +# https://github.com/mtasaka/menu-cache/commit/258d23c399c80d1472e59a85b332d4fbb699a74a +Patch1: menu-cache-1.0.1-0001-Cancel-old-monitors-only-when-cache-regeneration-suc.patch +# https://github.com/lxde/menu-cache/issues/7 +# https://github.com/mtasaka/menu-cache/commit/5800ac60392bb1dce41e6aa08a07cfbbd333b16b +Patch2: menu-cache-1.0.1-0002-Call-g_source_remove-when-destoying-channel.patch + BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(libfm-extra) %if 0%{?usegit} >= 1 @@ -57,6 +65,9 @@ developing applications that use %{name}. %setup -q %endif +%patch1 -p1 +%patch2 -p1 + %if 0%{?usegit} >= 1 sh autogen.sh %endif @@ -96,6 +107,12 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Sat Aug 13 2016 Mamoru TASAKA - 1.0.1-2.D20160506git2932d67f30 +- Update to the latest git +- Backport 2 patches from my branch + - removal of monitored *.menu file triggers core dump (github#8) + - menu-cached utilize 100% CPU (github#7) + * Thu Feb 04 2016 Fedora Release Engineering - 1.0.1-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index 6362c0c..61abde0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a856ba860b16fdc8c69ee784bc4ade36 menu-cache-1.0.1.tar.xz +b07681e5f7a7c2fc468bcea4878a8d5d menu-cache-1.0.1-D20160506git2932d67f305d4fd45a29c35c233ecd2925c2ecab.tar.gz From 9d9f4c9a88dea4a0ed61c44c955bbf76df234f06 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Sun, 23 Oct 2016 14:38:55 +0900 Subject: [PATCH 02/41] Update to the latest git --- .gitignore | 1 + ...ors-only-when-cache-regeneration-suc.patch | 92 ---------- ...source_remove-when-destoying-channel.patch | 167 ------------------ menu-cache.spec | 22 +-- sources | 2 +- 5 files changed, 9 insertions(+), 275 deletions(-) delete mode 100644 menu-cache-1.0.1-0001-Cancel-old-monitors-only-when-cache-regeneration-suc.patch delete mode 100644 menu-cache-1.0.1-0002-Call-g_source_remove-when-destoying-channel.patch diff --git a/.gitignore b/.gitignore index 53ab4ac..d8912ea 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ menu-cache-0.3.2.tar.gz /menu-cache-1.0.0-D20151128git0b1e85c263f571f61384c7eb81c7edc2a69335dc.tar.gz /menu-cache-1.0.1.tar.xz /menu-cache-1.0.1-D20160506git2932d67f305d4fd45a29c35c233ecd2925c2ecab.tar.gz +/menu-cache-1.0.1-D20161021git441f0ca9a1b3a8e06dc4b440af28aaa5f4e2e37a.tar.gz diff --git a/menu-cache-1.0.1-0001-Cancel-old-monitors-only-when-cache-regeneration-suc.patch b/menu-cache-1.0.1-0001-Cancel-old-monitors-only-when-cache-regeneration-suc.patch deleted file mode 100644 index 8c03854..0000000 --- a/menu-cache-1.0.1-0001-Cancel-old-monitors-only-when-cache-regeneration-suc.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 258d23c399c80d1472e59a85b332d4fbb699a74a Mon Sep 17 00:00:00 2001 -From: Mamoru TASAKA -Date: Tue, 26 Jul 2016 23:36:20 +0900 -Subject: [PATCH 1/2] Cancel old monitors only when cache regeneration - succeeds. - -Currently when menu-cache-gen fails and regenrate_cache() returns -false, while cache->n_files are already freed, cache->n_files -remains non-zero, which causes segv. - -So: -- cancel old monitors only when cache regeneration succeeds -- keep delayed_reload call when do_reload() fails cache->need_reload - remain true. ---- - menu-cache-daemon/menu-cached.c | 27 +++++++++++++++++++++------ - 1 file changed, 21 insertions(+), 6 deletions(-) - -diff --git a/menu-cache-daemon/menu-cached.c b/menu-cache-daemon/menu-cached.c -index 42ac93f..a78a0d0 100644 ---- a/menu-cache-daemon/menu-cached.c -+++ b/menu-cache-daemon/menu-cached.c -@@ -261,6 +261,9 @@ static void do_reload(Cache* cache) - int i; - GFile* gf; - -+ int new_n_files; -+ char **new_files = NULL; -+ - /* DEBUG("Re-generation of cache is needed!"); */ - /* DEBUG("call menu-cache-gen to re-generate the cache"); */ - memcpy( buf, "REL:", 4 ); -@@ -268,6 +271,13 @@ static void do_reload(Cache* cache) - buf[36] = '\n'; - buf[37] = '\0'; - -+ if( ! regenerate_cache( cache->menu_name, cache->lang_name, cache->cache_file, -+ cache->env, &new_n_files, &new_files ) ) -+ { -+ DEBUG("regeneration of cache failed."); -+ return; -+ } -+ - /* cancel old file monitors */ - g_strfreev(cache->files); - for( i = 0; i < cache->n_files; ++i ) -@@ -280,11 +290,9 @@ static void do_reload(Cache* cache) - g_file_monitor_cancel(cache->cache_mon); - g_object_unref(cache->cache_mon); - */ -- if( ! regenerate_cache( cache->menu_name, cache->lang_name, cache->cache_file, -- cache->env, &cache->n_files, &cache->files ) ) -- { -- DEBUG("regeneration of cache failed."); -- } -+ -+ cache->n_files = new_n_files; -+ cache->files = new_files; - - cache->mons = g_realloc( cache->mons, sizeof(GFileMonitor*)*(cache->n_files+1) ); - /* create required file monitors */ -@@ -321,10 +329,13 @@ static gboolean delayed_reload( Cache* cache ) - if(g_source_is_destroyed(g_main_current_source())) - return FALSE; - -- cache->delayed_reload_handler = 0; - if(cache->need_reload) - do_reload(cache); - -+ if (cache->need_reload) -+ return TRUE; -+ -+ cache->delayed_reload_handler = 0; - return FALSE; - } - -@@ -385,8 +396,12 @@ void on_file_changed( GFileMonitor* mon, GFile* gf, GFile* other, - g_source_remove(cache->delayed_reload_handler); - } - else -+ { - /* no reload in last 3 seconds... good, do it immediately */ -+ /* mark need_reload anyway. If do_reload succeeds, it is cleaned up */ -+ cache->need_reload = TRUE; - do_reload(cache); -+ } - - cache->delayed_reload_handler = g_timeout_add_seconds_full( G_PRIORITY_LOW, 3, (GSourceFunc)delayed_reload, cache, NULL ); - } --- -2.9.2 - diff --git a/menu-cache-1.0.1-0002-Call-g_source_remove-when-destoying-channel.patch b/menu-cache-1.0.1-0002-Call-g_source_remove-when-destoying-channel.patch deleted file mode 100644 index f17b310..0000000 --- a/menu-cache-1.0.1-0002-Call-g_source_remove-when-destoying-channel.patch +++ /dev/null @@ -1,167 +0,0 @@ -From 5800ac60392bb1dce41e6aa08a07cfbbd333b16b Mon Sep 17 00:00:00 2001 -From: Mamoru TASAKA -Date: Mon, 8 Aug 2016 21:01:50 +0900 -Subject: [PATCH 2/2] Call g_source_remove when destoying channel - -ref: https://github.com/lxde/menu-cache/issues/7 - -It seems that even if the client side of *socket* is already -closed, the server side cannot receive POLLHUP. And when -it already happened, at the time the server tries to write -into the socket, SIGPIPE is received, then we firstly know that -the client is already closed. - -Also, then closing GIOChannel, we must explicitly remove the -"source" added by g_io_add_watch, otherwise we see 100 percent -CPU usage by poll. - -So we must register source id as well as channel simultaneously, -and call shutdown function explicitly when we receive -SIGPIPE. ---- - menu-cache-daemon/menu-cached.c | 42 +++++++++++++++++++++++++++++++---------- - 1 file changed, 32 insertions(+), 10 deletions(-) - -diff --git a/menu-cache-daemon/menu-cached.c b/menu-cache-daemon/menu-cached.c -index a78a0d0..758a541 100644 ---- a/menu-cache-daemon/menu-cached.c -+++ b/menu-cache-daemon/menu-cached.c -@@ -76,6 +76,11 @@ typedef struct _Cache - char *cache_file; - }Cache; - -+typedef struct ClientIO_ { -+ guint source_id; -+ GIOChannel *channel; -+} ClientIO; -+ - static GMainLoop* main_loop = NULL; - - static GHashTable* hash = NULL; -@@ -85,6 +90,8 @@ static char *socket_file = NULL; - static void on_file_changed( GFileMonitor* mon, GFile* gf, GFile* other, - GFileMonitorEvent evt, Cache* cache ); - -+static void on_client_closed(gpointer user_data); -+ - static gboolean delayed_cache_free(gpointer data) - { - Cache* cache = data; -@@ -317,9 +324,12 @@ static void do_reload(Cache* cache) - /* notify the clients that reload is needed. */ - for( l = cache->clients; l; l = l->next ) - { -- GIOChannel* ch = (GIOChannel*)l->data; -+ ClientIO *channel_io = (ClientIO *)l->data; -+ GIOChannel* ch = channel_io->channel; - if(write(g_io_channel_unix_get_fd(ch), buf, 37) < 37) -- g_io_channel_shutdown(ch, FALSE, NULL); -+ { -+ on_client_closed(channel_io); -+ } - } - cache->need_reload = FALSE; - } -@@ -503,16 +513,18 @@ static int create_socket(struct sockaddr_un *addr) - - static void on_client_closed(gpointer user_data) - { -- GIOChannel* ch = user_data; -+ ClientIO* client_io = user_data; - GHashTableIter it; - char* md5; - Cache* cache; - GSList *l; -+ GIOChannel *ch = client_io->channel; -+ - DEBUG("client closed: %p", ch); - g_hash_table_iter_init (&it, hash); - while( g_hash_table_iter_next (&it, (gpointer*)&md5, (gpointer*)&cache) ) - { -- while((l = g_slist_find( cache->clients, ch )) != NULL) -+ while((l = g_slist_find( cache->clients, client_io )) != NULL) - { - /* FIXME: some clients are closed accidentally without - * unregister the menu first due to crashes. -@@ -530,6 +542,9 @@ static void on_client_closed(gpointer user_data) - } - } - /* DEBUG("client closed"); */ -+ -+ g_source_remove(client_io->source_id); -+ g_free(client_io); - } - - static gboolean on_client_data_in(GIOChannel* ch, GIOCondition cond, gpointer user_data) -@@ -544,6 +559,7 @@ static gboolean on_client_data_in(GIOChannel* ch, GIOCondition cond, gpointer us - - if(cond & (G_IO_HUP|G_IO_ERR) ) - { -+ on_client_closed(user_data); - return FALSE; /* remove the watch */ - } - -@@ -551,8 +567,10 @@ retry: - st = g_io_channel_read_line( ch, &line, &len, NULL, NULL ); - if( st == G_IO_STATUS_AGAIN ) - goto retry; -- if( st != G_IO_STATUS_NORMAL ) -+ if( st != G_IO_STATUS_NORMAL ) { -+ on_client_closed(user_data); - return FALSE; -+ } - - --len; - line[len] = 0; -@@ -659,7 +677,7 @@ retry: - } - } - /* DEBUG("menu %s requested by client %d", md5, g_io_channel_unix_get_fd(ch)); */ -- cache->clients = g_slist_prepend(cache->clients, ch); -+ cache->clients = g_slist_prepend(cache->clients, user_data); - if(cache->delayed_free_handler) - { - g_source_remove(cache->delayed_free_handler); -@@ -685,7 +703,7 @@ retry: - if(cache && cache->clients) - { - /* remove the IO channel from the cache */ -- cache->clients = g_slist_remove(cache->clients, ch); -+ cache->clients = g_slist_remove(cache->clients, user_data); - if(cache->clients == NULL) - cache_free(cache); - } -@@ -703,6 +721,7 @@ static gboolean on_new_conn_incoming(GIOChannel* ch, GIOCondition cond, gpointer - socklen_t client_addrlen; - struct sockaddr client_addr; - GIOChannel* child; -+ ClientIO* client_io; - - server = g_io_channel_unix_get_fd(ch); - -@@ -716,8 +735,12 @@ static gboolean on_new_conn_incoming(GIOChannel* ch, GIOCondition cond, gpointer - - child = g_io_channel_unix_new(client); - g_io_channel_set_close_on_unref( child, TRUE ); -- g_io_add_watch_full(child, G_PRIORITY_DEFAULT, G_IO_PRI|G_IO_IN|G_IO_HUP|G_IO_ERR, -- on_client_data_in, child, on_client_closed); -+ -+ client_io = g_new0 (ClientIO, 1); -+ client_io->channel = child; -+ client_io->source_id = -+ g_io_add_watch(child, G_IO_PRI|G_IO_IN|G_IO_HUP|G_IO_ERR, -+ on_client_data_in, client_io); - g_io_channel_unref(child); - - DEBUG("new client accepted: %p", child); -@@ -823,7 +846,6 @@ int main(int argc, char** argv) - ch = g_io_channel_unix_new(server_fd); - if(!ch) - return 1; -- g_io_channel_set_close_on_unref(ch, TRUE); - g_io_add_watch(ch, G_IO_IN|G_IO_PRI, on_new_conn_incoming, NULL); - g_io_add_watch(ch, G_IO_ERR, on_server_conn_close, NULL); - g_io_channel_unref(ch); --- -2.9.2 - diff --git a/menu-cache.spec b/menu-cache.spec index da152b0..0bbdd0b 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -1,10 +1,10 @@ %global usegit 1 -%global mainrel 2 +%global mainrel 3 -%global githash 2932d67f305d4fd45a29c35c233ecd2925c2ecab +%global githash 441f0ca9a1b3a8e06dc4b440af28aaa5f4e2e37a %global shorthash %(TMP=%githash ; echo ${TMP:0:10}) -%global gitdate Sun, 6 Mar 2016 18:06:49 +0100 -%global gitdate_num 20160506 +%global gitdate Fri, 21 Oct 2016 02:16:40 +0300 +%global gitdate_num 20161021 %if 0%{?usegit} >= 1 %global fedorarel %{mainrel}.D%{gitdate_num}git%{shorthash} @@ -27,14 +27,6 @@ Source0: https://github.com/lxde/menu-cache/archive/%{githash}/%{name}-%{ Source0: http://downloads.sourceforge.net/lxde/%{name}-%{version}.tar.xz %endif -# https://github.com/lxde/menu-cache/issues/8 -# https://github.com/lxde/menu-cache/pull/12 -# https://github.com/mtasaka/menu-cache/commit/258d23c399c80d1472e59a85b332d4fbb699a74a -Patch1: menu-cache-1.0.1-0001-Cancel-old-monitors-only-when-cache-regeneration-suc.patch -# https://github.com/lxde/menu-cache/issues/7 -# https://github.com/mtasaka/menu-cache/commit/5800ac60392bb1dce41e6aa08a07cfbbd333b16b -Patch2: menu-cache-1.0.1-0002-Call-g_source_remove-when-destoying-channel.patch - BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(libfm-extra) %if 0%{?usegit} >= 1 @@ -65,9 +57,6 @@ developing applications that use %{name}. %setup -q %endif -%patch1 -p1 -%patch2 -p1 - %if 0%{?usegit} >= 1 sh autogen.sh %endif @@ -107,6 +96,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Sun Oct 23 2016 Mamoru TASAKA - 1.0.1-3.D20161021git441f0ca9a1 +- Update to the latest git + * Sat Aug 13 2016 Mamoru TASAKA - 1.0.1-2.D20160506git2932d67f30 - Update to the latest git - Backport 2 patches from my branch diff --git a/sources b/sources index 61abde0..cafaf73 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b07681e5f7a7c2fc468bcea4878a8d5d menu-cache-1.0.1-D20160506git2932d67f305d4fd45a29c35c233ecd2925c2ecab.tar.gz +b6589fb480a16cae193140a425ccc9f1 menu-cache-1.0.1-D20161021git441f0ca9a1b3a8e06dc4b440af28aaa5f4e2e37a.tar.gz From 6c9e97c6735db420e354e43d812f108ec9c56dbf Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Tue, 8 Nov 2016 15:13:26 +0900 Subject: [PATCH 03/41] 1.0.2 --- .gitignore | 1 + menu-cache.spec | 16 ++++++++++++---- sources | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index d8912ea..4394d78 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ menu-cache-0.3.2.tar.gz /menu-cache-1.0.1.tar.xz /menu-cache-1.0.1-D20160506git2932d67f305d4fd45a29c35c233ecd2925c2ecab.tar.gz /menu-cache-1.0.1-D20161021git441f0ca9a1b3a8e06dc4b440af28aaa5f4e2e37a.tar.gz +/menu-cache-1.0.2.tar.xz diff --git a/menu-cache.spec b/menu-cache.spec index 0bbdd0b..998f091 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -1,5 +1,5 @@ -%global usegit 1 -%global mainrel 3 +%global usegit 0 +%global mainrel 1 %global githash 441f0ca9a1b3a8e06dc4b440af28aaa5f4e2e37a %global shorthash %(TMP=%githash ; echo ${TMP:0:10}) @@ -13,7 +13,7 @@ %endif Name: menu-cache -Version: 1.0.1 +Version: 1.0.2 Release: %{fedorarel}%{?dist} Summary: Caching mechanism for freedesktop.org compliant menus @@ -81,7 +81,12 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %files #FIXME: add ChangeLog and NEWS if there is content -%doc AUTHORS COPYING README +%doc AUTHORS +%license COPYING +%if 0%{?usegit} < 1 +%doc NEWS +%endif +%doc README %{_libexecdir}/%{name}/menu-cache-gen %{_libexecdir}/%{name}/menu-cached %{_libdir}/libmenu-cache.so.* @@ -96,6 +101,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Tue Nov 8 2016 Mamoru TASAKA - 1.0.2-1 +- 1.0.2 + * Sun Oct 23 2016 Mamoru TASAKA - 1.0.1-3.D20161021git441f0ca9a1 - Update to the latest git diff --git a/sources b/sources index cafaf73..bfa1424 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b6589fb480a16cae193140a425ccc9f1 menu-cache-1.0.1-D20161021git441f0ca9a1b3a8e06dc4b440af28aaa5f4e2e37a.tar.gz +8dde7a3f5bd9798d0129d1979a5d7640 menu-cache-1.0.2.tar.xz From b7e681b97a0bd9e93c88ed44455db6153f4721a5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 20:51:26 +0000 Subject: [PATCH 04/41] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- menu-cache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index 998f091..1bb22db 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -14,7 +14,7 @@ Name: menu-cache Version: 1.0.2 -Release: %{fedorarel}%{?dist} +Release: %{fedorarel}%{?dist}.1 Summary: Caching mechanism for freedesktop.org compliant menus Group: System Environment/Libraries @@ -101,6 +101,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 1.0.2-1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Tue Nov 8 2016 Mamoru TASAKA - 1.0.2-1 - 1.0.2 From f87cdd4b5067803eb015495915e0b1d2494d2e0f Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Tue, 18 Apr 2017 16:08:53 +0900 Subject: [PATCH 05/41] Update to the latest git Tentative fix for menu-cache-gen segv (sourceforge bug 863) --- .gitignore | 1 + menu-cache.spec | 16 ++++++++++------ sources | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 4394d78..b923f86 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ menu-cache-0.3.2.tar.gz /menu-cache-1.0.1-D20160506git2932d67f305d4fd45a29c35c233ecd2925c2ecab.tar.gz /menu-cache-1.0.1-D20161021git441f0ca9a1b3a8e06dc4b440af28aaa5f4e2e37a.tar.gz /menu-cache-1.0.2.tar.xz +/menu-cache-1.0.2-D20170417git54ab9e45764435634cdf5de360b295ee3a22817a.tar.gz diff --git a/menu-cache.spec b/menu-cache.spec index 1bb22db..debbf31 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -1,10 +1,10 @@ -%global usegit 0 -%global mainrel 1 +%global usegit 1 +%global mainrel 2 -%global githash 441f0ca9a1b3a8e06dc4b440af28aaa5f4e2e37a +%global githash 54ab9e45764435634cdf5de360b295ee3a22817a %global shorthash %(TMP=%githash ; echo ${TMP:0:10}) -%global gitdate Fri, 21 Oct 2016 02:16:40 +0300 -%global gitdate_num 20161021 +%global gitdate Mon, 17 Apr 2017 22:43:56 +0300 +%global gitdate_num 20170417 %if 0%{?usegit} >= 1 %global fedorarel %{mainrel}.D%{gitdate_num}git%{shorthash} @@ -14,7 +14,7 @@ Name: menu-cache Version: 1.0.2 -Release: %{fedorarel}%{?dist}.1 +Release: %{fedorarel}%{?dist} Summary: Caching mechanism for freedesktop.org compliant menus Group: System Environment/Libraries @@ -101,6 +101,10 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Tue Apr 18 2017 Mamoru TASAKA - 1.0.2-2.D20170417git54ab9e4576 +- Update to the latest git + - Tentative fix for menu-cache-gen segv (sourceforge bug 863) + * Fri Feb 10 2017 Fedora Release Engineering - 1.0.2-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index bfa1424..20477cf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8dde7a3f5bd9798d0129d1979a5d7640 menu-cache-1.0.2.tar.xz +SHA512 (menu-cache-1.0.2-D20170417git54ab9e45764435634cdf5de360b295ee3a22817a.tar.gz) = 01613d30164418a834d07ec059f9ed43fd60e39c1d6d3335073408364ac0bd487c453bd260a65f49157917b8745f41fbcb57c6882ac8bb45313d9b04924c98f6 From 85e352b1fc37d1a6f46b509a543eb09268eea445 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Sun, 23 Apr 2017 15:09:33 +0900 Subject: [PATCH 06/41] Update to the latest git New API needed for new lxqt-runner (github #15) --- .gitignore | 1 + menu-cache.spec | 12 ++++++++---- sources | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index b923f86..c8ddab6 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ menu-cache-0.3.2.tar.gz /menu-cache-1.0.1-D20161021git441f0ca9a1b3a8e06dc4b440af28aaa5f4e2e37a.tar.gz /menu-cache-1.0.2.tar.xz /menu-cache-1.0.2-D20170417git54ab9e45764435634cdf5de360b295ee3a22817a.tar.gz +/menu-cache-1.0.2-D20170419gitdffb1314ec1b7212bbee5dfa9a021a069b826cbb.tar.gz diff --git a/menu-cache.spec b/menu-cache.spec index debbf31..bfa55f0 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -1,10 +1,10 @@ %global usegit 1 -%global mainrel 2 +%global mainrel 3 -%global githash 54ab9e45764435634cdf5de360b295ee3a22817a +%global githash dffb1314ec1b7212bbee5dfa9a021a069b826cbb %global shorthash %(TMP=%githash ; echo ${TMP:0:10}) -%global gitdate Mon, 17 Apr 2017 22:43:56 +0300 -%global gitdate_num 20170417 +%global gitdate Wed, 19 Apr 2017 02:36:06 +0200 +%global gitdate_num 20170419 %if 0%{?usegit} >= 1 %global fedorarel %{mainrel}.D%{gitdate_num}git%{shorthash} @@ -101,6 +101,10 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Sun Apr 23 2017 Mamoru TASAKA - 1.0.2-3.D20170419gitdffb1314ec +- Update to the latest git + - New API needed for new lxqt-runner (github #15) + * Tue Apr 18 2017 Mamoru TASAKA - 1.0.2-2.D20170417git54ab9e4576 - Update to the latest git - Tentative fix for menu-cache-gen segv (sourceforge bug 863) diff --git a/sources b/sources index 20477cf..ebc2dbb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (menu-cache-1.0.2-D20170417git54ab9e45764435634cdf5de360b295ee3a22817a.tar.gz) = 01613d30164418a834d07ec059f9ed43fd60e39c1d6d3335073408364ac0bd487c453bd260a65f49157917b8745f41fbcb57c6882ac8bb45313d9b04924c98f6 +SHA512 (menu-cache-1.0.2-D20170419gitdffb1314ec1b7212bbee5dfa9a021a069b826cbb.tar.gz) = b9556083c015be1630b860f2aa8ba7259225d35dd4ea178aaa820b37653861d04a1e466bd9e5db366452f852047e8627bdaa22363aa7e3a2ff3cfb7d5652f403 From 33f2c31491d865e5d8122733d6beca43e4902165 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Mon, 15 May 2017 15:05:45 +0900 Subject: [PATCH 07/41] Update to the latest git use runtime home directory for socket path instead of tmpdir --- .gitignore | 1 + menu-cache.spec | 13 +++++++++---- sources | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index c8ddab6..85905ca 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ menu-cache-0.3.2.tar.gz /menu-cache-1.0.2.tar.xz /menu-cache-1.0.2-D20170417git54ab9e45764435634cdf5de360b295ee3a22817a.tar.gz /menu-cache-1.0.2-D20170419gitdffb1314ec1b7212bbee5dfa9a021a069b826cbb.tar.gz +/menu-cache-1.0.2-D20170514git56f66684592abf257c4004e6e1fff041c64a12ce.tar.gz diff --git a/menu-cache.spec b/menu-cache.spec index bfa55f0..c70d228 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -1,10 +1,10 @@ %global usegit 1 -%global mainrel 3 +%global mainrel 4 -%global githash dffb1314ec1b7212bbee5dfa9a021a069b826cbb +%global githash 56f66684592abf257c4004e6e1fff041c64a12ce %global shorthash %(TMP=%githash ; echo ${TMP:0:10}) -%global gitdate Wed, 19 Apr 2017 02:36:06 +0200 -%global gitdate_num 20170419 +%global gitdate Sun, 14 May 2017 21:28:00 +0300 +%global gitdate_num 20170514 %if 0%{?usegit} >= 1 %global fedorarel %{mainrel}.D%{gitdate_num}git%{shorthash} @@ -101,6 +101,11 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Mon May 15 2017 Mamoru TASAKA - 1.0.2-4.D20170514git56f6668459 +- Update to the latest git + - use runtime home directory for socket path + instead of tmpdir + * Sun Apr 23 2017 Mamoru TASAKA - 1.0.2-3.D20170419gitdffb1314ec - Update to the latest git - New API needed for new lxqt-runner (github #15) diff --git a/sources b/sources index ebc2dbb..4f3af56 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (menu-cache-1.0.2-D20170419gitdffb1314ec1b7212bbee5dfa9a021a069b826cbb.tar.gz) = b9556083c015be1630b860f2aa8ba7259225d35dd4ea178aaa820b37653861d04a1e466bd9e5db366452f852047e8627bdaa22363aa7e3a2ff3cfb7d5652f403 +SHA512 (menu-cache-1.0.2-D20170514git56f66684592abf257c4004e6e1fff041c64a12ce.tar.gz) = f1bfb632242bee2739f8b81bc22b50ba4b440edc36c235c0ea7a2c189dd4983fb469efa908ca0103e19c03126ba1161930da6b829a4eacdaab278b30fd7ede77 From d47dd5488c01a84d943be6254b6effa63e334eb2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 21:18:09 +0000 Subject: [PATCH 08/41] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- menu-cache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index c70d228..96a9146 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -14,7 +14,7 @@ Name: menu-cache Version: 1.0.2 -Release: %{fedorarel}%{?dist} +Release: %{fedorarel}%{?dist}.1 Summary: Caching mechanism for freedesktop.org compliant menus Group: System Environment/Libraries @@ -101,6 +101,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 1.0.2-4.D20170514git56f6668459.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Mon May 15 2017 Mamoru TASAKA - 1.0.2-4.D20170514git56f6668459 - Update to the latest git - use runtime home directory for socket path From cc0fb3499515728a19acc22dc012110b1a7f9db8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 03:14:24 +0000 Subject: [PATCH 09/41] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- menu-cache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index 96a9146..c59b6eb 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -14,7 +14,7 @@ Name: menu-cache Version: 1.0.2 -Release: %{fedorarel}%{?dist}.1 +Release: %{fedorarel}%{?dist}.2 Summary: Caching mechanism for freedesktop.org compliant menus Group: System Environment/Libraries @@ -101,6 +101,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 1.0.2-4.D20170514git56f6668459.2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Wed Jul 26 2017 Fedora Release Engineering - 1.0.2-4.D20170514git56f6668459.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From d87feca8dd4bb860d39275e60c20a8660b0e44de Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Thu, 7 Sep 2017 18:36:53 +0900 Subject: [PATCH 10/41] Update to the latest git github #13 #16 --- .gitignore | 1 + menu-cache.spec | 14 +++++++++----- sources | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 85905ca..046202f 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ menu-cache-0.3.2.tar.gz /menu-cache-1.0.2-D20170417git54ab9e45764435634cdf5de360b295ee3a22817a.tar.gz /menu-cache-1.0.2-D20170419gitdffb1314ec1b7212bbee5dfa9a021a069b826cbb.tar.gz /menu-cache-1.0.2-D20170514git56f66684592abf257c4004e6e1fff041c64a12ce.tar.gz +/menu-cache-1.0.2-D20170905git2ef9df036ccc68eaae1eb2ebbffe29a6e2856b97.tar.gz diff --git a/menu-cache.spec b/menu-cache.spec index c59b6eb..89b6fee 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -1,10 +1,10 @@ %global usegit 1 -%global mainrel 4 +%global mainrel 5 -%global githash 56f66684592abf257c4004e6e1fff041c64a12ce +%global githash 2ef9df036ccc68eaae1eb2ebbffe29a6e2856b97 %global shorthash %(TMP=%githash ; echo ${TMP:0:10}) -%global gitdate Sun, 14 May 2017 21:28:00 +0300 -%global gitdate_num 20170514 +%global gitdate Tue Sep 5 01:25:01 2017 +0300 +%global gitdate_num 20170905 %if 0%{?usegit} >= 1 %global fedorarel %{mainrel}.D%{gitdate_num}git%{shorthash} @@ -14,7 +14,7 @@ Name: menu-cache Version: 1.0.2 -Release: %{fedorarel}%{?dist}.2 +Release: %{fedorarel}%{?dist} Summary: Caching mechanism for freedesktop.org compliant menus Group: System Environment/Libraries @@ -101,6 +101,10 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Thu Sep 7 2017 Mamoru TASAKA - 1.0.2-5.D20170905git2ef9df036c +- Update to the latest git + - github #13 #16 + * Thu Aug 03 2017 Fedora Release Engineering - 1.0.2-4.D20170514git56f6668459.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild diff --git a/sources b/sources index 4f3af56..6ac5e7d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (menu-cache-1.0.2-D20170514git56f66684592abf257c4004e6e1fff041c64a12ce.tar.gz) = f1bfb632242bee2739f8b81bc22b50ba4b440edc36c235c0ea7a2c189dd4983fb469efa908ca0103e19c03126ba1161930da6b829a4eacdaab278b30fd7ede77 +SHA512 (menu-cache-1.0.2-D20170905git2ef9df036ccc68eaae1eb2ebbffe29a6e2856b97.tar.gz) = a53b25bc1c1c30af307175759dd70b0a6fde0b05a5c2788fe442987513fcef26dcd322b94ffd7094ed464e1028c9c8c76039680772dbc33295c12834dd3d0fc7 From 40e1869de58dd5e76449fb987cc27bc2cec9c55c Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Wed, 13 Sep 2017 14:31:28 +0900 Subject: [PATCH 11/41] Update to the latest git Yet another possible fix for #7 --- .gitignore | 1 + menu-cache.spec | 12 ++++++++---- sources | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 046202f..8df5a2c 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ menu-cache-0.3.2.tar.gz /menu-cache-1.0.2-D20170419gitdffb1314ec1b7212bbee5dfa9a021a069b826cbb.tar.gz /menu-cache-1.0.2-D20170514git56f66684592abf257c4004e6e1fff041c64a12ce.tar.gz /menu-cache-1.0.2-D20170905git2ef9df036ccc68eaae1eb2ebbffe29a6e2856b97.tar.gz +/menu-cache-1.0.2-D20170913gitfd52af607c6f4bc8db99877d71f802f1afdd7c06.tar.gz diff --git a/menu-cache.spec b/menu-cache.spec index 89b6fee..1e4b181 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -1,10 +1,10 @@ %global usegit 1 -%global mainrel 5 +%global mainrel 6 -%global githash 2ef9df036ccc68eaae1eb2ebbffe29a6e2856b97 +%global githash fd52af607c6f4bc8db99877d71f802f1afdd7c06 %global shorthash %(TMP=%githash ; echo ${TMP:0:10}) -%global gitdate Tue Sep 5 01:25:01 2017 +0300 -%global gitdate_num 20170905 +%global gitdate Wed, 13 Sep 2017 02:17:24 +0300 +%global gitdate_num 20170913 %if 0%{?usegit} >= 1 %global fedorarel %{mainrel}.D%{gitdate_num}git%{shorthash} @@ -101,6 +101,10 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Wed Sep 13 2017 Mamoru TASAKA - 1.0.2-6.D20170913gitfd52af607c +- Update to the latest git + - Yet another possible fix for #7 + * Thu Sep 7 2017 Mamoru TASAKA - 1.0.2-5.D20170905git2ef9df036c - Update to the latest git - github #13 #16 diff --git a/sources b/sources index 6ac5e7d..e8f19ab 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (menu-cache-1.0.2-D20170905git2ef9df036ccc68eaae1eb2ebbffe29a6e2856b97.tar.gz) = a53b25bc1c1c30af307175759dd70b0a6fde0b05a5c2788fe442987513fcef26dcd322b94ffd7094ed464e1028c9c8c76039680772dbc33295c12834dd3d0fc7 +SHA512 (menu-cache-1.0.2-D20170913gitfd52af607c6f4bc8db99877d71f802f1afdd7c06.tar.gz) = 6adadcb0cf42bdb530e235ba5c6427a90020e1f62c965fd15b4c2ff70ed0ad623c1b3aaa9eb2685dcd19253cad134bd73904c781bb434c89e7ad6cb1e467ea9b From bf8520ff0fc70dc7fe0951b0a7053da9f22d4a79 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 22 Sep 2017 12:53:11 +0900 Subject: [PATCH 12/41] Update to the latest git --- .gitignore | 1 + menu-cache.spec | 11 +++++++---- sources | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 8df5a2c..643efaf 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ menu-cache-0.3.2.tar.gz /menu-cache-1.0.2-D20170514git56f66684592abf257c4004e6e1fff041c64a12ce.tar.gz /menu-cache-1.0.2-D20170905git2ef9df036ccc68eaae1eb2ebbffe29a6e2856b97.tar.gz /menu-cache-1.0.2-D20170913gitfd52af607c6f4bc8db99877d71f802f1afdd7c06.tar.gz +/menu-cache-1.0.2-D20170914git8c8534159d4898935b47f9103cf32cd9b21b3df5.tar.gz diff --git a/menu-cache.spec b/menu-cache.spec index 1e4b181..691a4f7 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -1,10 +1,10 @@ %global usegit 1 -%global mainrel 6 +%global mainrel 7 -%global githash fd52af607c6f4bc8db99877d71f802f1afdd7c06 +%global githash 8c8534159d4898935b47f9103cf32cd9b21b3df5 %global shorthash %(TMP=%githash ; echo ${TMP:0:10}) -%global gitdate Wed, 13 Sep 2017 02:17:24 +0300 -%global gitdate_num 20170913 +%global gitdate Thu, 14 Sep 2017 00:32:14 +0300 +%global gitdate_num 20170914 %if 0%{?usegit} >= 1 %global fedorarel %{mainrel}.D%{gitdate_num}git%{shorthash} @@ -101,6 +101,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Fri Sep 22 2017 Mamoru TASAKA - 1.0.2-7.D20170914git8c8534159d +- Update to the latest git + * Wed Sep 13 2017 Mamoru TASAKA - 1.0.2-6.D20170913gitfd52af607c - Update to the latest git - Yet another possible fix for #7 diff --git a/sources b/sources index e8f19ab..c96b04c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (menu-cache-1.0.2-D20170913gitfd52af607c6f4bc8db99877d71f802f1afdd7c06.tar.gz) = 6adadcb0cf42bdb530e235ba5c6427a90020e1f62c965fd15b4c2ff70ed0ad623c1b3aaa9eb2685dcd19253cad134bd73904c781bb434c89e7ad6cb1e467ea9b +SHA512 (menu-cache-1.0.2-D20170914git8c8534159d4898935b47f9103cf32cd9b21b3df5.tar.gz) = 03fdda391095abd2a704b646048914cfa099b85772f602a8b394bf5c8b1392c08cdc944fdf039de2ea9629b3c6fb6801ff30714273d587c4ba31dacd86d8dfbb From 9be09557def39228f03c4cf97923bda9c8bba396 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Mon, 6 Nov 2017 16:25:23 +0900 Subject: [PATCH 13/41] 1.1.0 --- .gitignore | 1 + menu-cache.spec | 11 +++++++---- sources | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 643efaf..facbe27 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ menu-cache-0.3.2.tar.gz /menu-cache-1.0.2-D20170905git2ef9df036ccc68eaae1eb2ebbffe29a6e2856b97.tar.gz /menu-cache-1.0.2-D20170913gitfd52af607c6f4bc8db99877d71f802f1afdd7c06.tar.gz /menu-cache-1.0.2-D20170914git8c8534159d4898935b47f9103cf32cd9b21b3df5.tar.gz +/menu-cache-1.1.0.tar.xz diff --git a/menu-cache.spec b/menu-cache.spec index 691a4f7..eee0428 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -1,5 +1,5 @@ -%global usegit 1 -%global mainrel 7 +%global usegit 0 +%global mainrel 1 %global githash 8c8534159d4898935b47f9103cf32cd9b21b3df5 %global shorthash %(TMP=%githash ; echo ${TMP:0:10}) @@ -13,7 +13,7 @@ %endif Name: menu-cache -Version: 1.0.2 +Version: 1.1.0 Release: %{fedorarel}%{?dist} Summary: Caching mechanism for freedesktop.org compliant menus @@ -89,7 +89,7 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %doc README %{_libexecdir}/%{name}/menu-cache-gen %{_libexecdir}/%{name}/menu-cached -%{_libdir}/libmenu-cache.so.* +%{_libdir}/libmenu-cache.so.3* #%{_mandir}/man*/*.gz @@ -101,6 +101,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Mon Nov 6 2017 Mamoru TASAKA - 1.1.0-1 +- 1.1.0 + * Fri Sep 22 2017 Mamoru TASAKA - 1.0.2-7.D20170914git8c8534159d - Update to the latest git diff --git a/sources b/sources index c96b04c..e43c3a1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (menu-cache-1.0.2-D20170914git8c8534159d4898935b47f9103cf32cd9b21b3df5.tar.gz) = 03fdda391095abd2a704b646048914cfa099b85772f602a8b394bf5c8b1392c08cdc944fdf039de2ea9629b3c6fb6801ff30714273d587c4ba31dacd86d8dfbb +SHA512 (menu-cache-1.1.0.tar.xz) = e4c6619ade7b9a1b97c1366bb94dffb9975be5664b193cf0c69cf9470ef7ae19bda3390d04d98ee9a5b1658ec48aa5c83508c26c347af689161ee67c076b3c9e From b8c976bdb6312c4a42f13214899fce48ea8ac8c6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 8 Feb 2018 01:39:48 +0000 Subject: [PATCH 14/41] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- menu-cache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index eee0428..34943ba 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -14,7 +14,7 @@ Name: menu-cache Version: 1.1.0 -Release: %{fedorarel}%{?dist} +Release: %{fedorarel}%{?dist}.1 Summary: Caching mechanism for freedesktop.org compliant menus Group: System Environment/Libraries @@ -101,6 +101,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Thu Feb 08 2018 Fedora Release Engineering - 1.1.0-1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Mon Nov 6 2017 Mamoru TASAKA - 1.1.0-1 - 1.1.0 From 0e9990745f3595fdc2aa393042a70758870edb03 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 9 Jul 2018 19:06:49 +0200 Subject: [PATCH 15/41] add BuildRequires: gcc Reference: https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot --- menu-cache.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/menu-cache.spec b/menu-cache.spec index 34943ba..3f51f6c 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -27,6 +27,7 @@ Source0: https://github.com/lxde/menu-cache/archive/%{githash}/%{name}-%{ Source0: http://downloads.sourceforge.net/lxde/%{name}-%{version}.tar.xz %endif +BuildRequires: gcc BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(libfm-extra) %if 0%{?usegit} >= 1 From a16fa4bc01b3bec511cfb41db16463f77efe8e75 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 10:08:31 +0000 Subject: [PATCH 16/41] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- menu-cache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index 3f51f6c..9fbee41 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -14,7 +14,7 @@ Name: menu-cache Version: 1.1.0 -Release: %{fedorarel}%{?dist}.1 +Release: %{fedorarel}%{?dist}.2 Summary: Caching mechanism for freedesktop.org compliant menus Group: System Environment/Libraries @@ -102,6 +102,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 1.1.0-1.2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Thu Feb 08 2018 Fedora Release Engineering - 1.1.0-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From ea9b5950ea85556c09fed5d36dcbe65611e2fd0a Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 22 Jan 2019 18:40:24 +0100 Subject: [PATCH 17/41] Remove obsolete ldconfig scriptlets References: https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets Signed-off-by: Igor Gnatenko --- menu-cache.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/menu-cache.spec b/menu-cache.spec index 9fbee41..6832784 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -75,9 +75,7 @@ make %{?_smp_mflags} make install DESTDIR=%{buildroot} find %{buildroot} -name '*.la' -exec rm -f {} ';' -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig +%ldconfig_scriptlets %files From 19c6c9cd1d8c7933d4158cd445e58d591e884368 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:17:53 +0100 Subject: [PATCH 18/41] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- menu-cache.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/menu-cache.spec b/menu-cache.spec index 6832784..7dfe882 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -17,7 +17,6 @@ Version: 1.1.0 Release: %{fedorarel}%{?dist}.2 Summary: Caching mechanism for freedesktop.org compliant menus -Group: System Environment/Libraries License: LGPLv2+ and GPLv2+ URL: http://lxde.org #VCS: git:git://lxde.git.sourceforge.net/gitroot/lxde/menu-cache @@ -43,7 +42,6 @@ components of the LXDE desktop environment such as LXPanel or LXLauncher. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} %description devel From 64dec0e0da98e091d884c1a328e8f17747d95de4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 1 Feb 2019 10:11:23 +0000 Subject: [PATCH 19/41] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- menu-cache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index 7dfe882..71d870d 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -14,7 +14,7 @@ Name: menu-cache Version: 1.1.0 -Release: %{fedorarel}%{?dist}.2 +Release: %{fedorarel}%{?dist}.3 Summary: Caching mechanism for freedesktop.org compliant menus License: LGPLv2+ and GPLv2+ @@ -98,6 +98,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Fri Feb 01 2019 Fedora Release Engineering - 1.1.0-1.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Fri Jul 13 2018 Fedora Release Engineering - 1.1.0-1.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From c1128127ff3ef6565790d60b34927b7752fbd493 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 16:22:41 +0000 Subject: [PATCH 20/41] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- menu-cache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index 71d870d..7d13039 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -14,7 +14,7 @@ Name: menu-cache Version: 1.1.0 -Release: %{fedorarel}%{?dist}.3 +Release: %{fedorarel}%{?dist}.4 Summary: Caching mechanism for freedesktop.org compliant menus License: LGPLv2+ and GPLv2+ @@ -98,6 +98,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 1.1.0-1.4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Fri Feb 01 2019 Fedora Release Engineering - 1.1.0-1.3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From c4a5212433f96d7856f8d03e3283d1d70f19b218 Mon Sep 17 00:00:00 2001 From: Zamir SUN Date: Fri, 20 Sep 2019 15:01:41 +0800 Subject: [PATCH 21/41] Improve compatibility for epel7 Signed-off-by: Zamir SUN --- menu-cache.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index 7d13039..88a530a 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -14,7 +14,7 @@ Name: menu-cache Version: 1.1.0 -Release: %{fedorarel}%{?dist}.4 +Release: %{fedorarel}%{?dist}.5 Summary: Caching mechanism for freedesktop.org compliant menus License: LGPLv2+ and GPLv2+ @@ -25,6 +25,10 @@ Source0: https://github.com/lxde/menu-cache/archive/%{githash}/%{name}-%{ %else Source0: http://downloads.sourceforge.net/lxde/%{name}-%{version}.tar.xz %endif +%if 0%{?el7} +# bz#1451069 - CVE-2017-8933 menu-cache: Insecure temporary file creation in get_socket_name function +Patch0: menu-cache-CVE-2017-8933.patch +%endif BuildRequires: gcc BuildRequires: pkgconfig(glib-2.0) @@ -98,6 +102,10 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Fri Sep 20 2019 Zamir SUN - 1.1.0-1.5 +- Improve compatibility for epel7 +- Remove changelog that is out-of-order + * Thu Jul 25 2019 Fedora Release Engineering - 1.1.0-1.4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From f497a2fee6a0442a2ca44cc4d81af4227740fd96 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 24 Jan 2020 13:42:12 +0900 Subject: [PATCH 22/41] Fix compilation with gcc10 -fno-common --- ...1.1.0-0001-Support-gcc10-compilation.patch | 108 ++++++++++++++++++ menu-cache.spec | 11 +- 2 files changed, 117 insertions(+), 2 deletions(-) create mode 100644 menu-cache-1.1.0-0001-Support-gcc10-compilation.patch diff --git a/menu-cache-1.1.0-0001-Support-gcc10-compilation.patch b/menu-cache-1.1.0-0001-Support-gcc10-compilation.patch new file mode 100644 index 0000000..29f8e53 --- /dev/null +++ b/menu-cache-1.1.0-0001-Support-gcc10-compilation.patch @@ -0,0 +1,108 @@ +From 1ce739649b4d66339a03fc0ec9ee7a2f7c141780 Mon Sep 17 00:00:00 2001 +From: Mamoru TASAKA +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 + #include + +-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 + diff --git a/menu-cache.spec b/menu-cache.spec index 88a530a..12b3ff8 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -1,5 +1,5 @@ %global usegit 0 -%global mainrel 1 +%global mainrel 2 %global githash 8c8534159d4898935b47f9103cf32cd9b21b3df5 %global shorthash %(TMP=%githash ; echo ${TMP:0:10}) @@ -14,7 +14,7 @@ Name: menu-cache Version: 1.1.0 -Release: %{fedorarel}%{?dist}.5 +Release: %{fedorarel}%{?dist} Summary: Caching mechanism for freedesktop.org compliant menus License: LGPLv2+ and GPLv2+ @@ -29,6 +29,8 @@ Source0: http://downloads.sourceforge.net/lxde/%{name}-%{version}.tar.xz # bz#1451069 - CVE-2017-8933 menu-cache: Insecure temporary file creation in get_socket_name function Patch0: menu-cache-CVE-2017-8933.patch %endif +# https://github.com/lxde/menu-cache/pull/19 +Patch1: menu-cache-1.1.0-0001-Support-gcc10-compilation.patch BuildRequires: gcc BuildRequires: pkgconfig(glib-2.0) @@ -63,8 +65,10 @@ developing applications that use %{name}. %if 0%{?usegit} >= 1 sh autogen.sh %endif +%patch1 -p1 -b .gcc10 %build +%global optflags %optflags -fno-common %configure --disable-static --disable-silent-rules # remove rpath in menu-cache-gen #sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool @@ -102,6 +106,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Fri Jan 23 2020 Mamoru TASAKA - 1.1.0-2 +- Fix compilation with gcc10 -fno-common + * Fri Sep 20 2019 Zamir SUN - 1.1.0-1.5 - Improve compatibility for epel7 - Remove changelog that is out-of-order From 73ac8aff313448661a2ee511d5124b970d8fc9bb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jan 2020 12:34:55 +0000 Subject: [PATCH 23/41] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- menu-cache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index 12b3ff8..ddc213e 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -14,7 +14,7 @@ Name: menu-cache Version: 1.1.0 -Release: %{fedorarel}%{?dist} +Release: %{fedorarel}%{?dist}.1 Summary: Caching mechanism for freedesktop.org compliant menus License: LGPLv2+ and GPLv2+ @@ -106,6 +106,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Wed Jan 29 2020 Fedora Release Engineering - 1.1.0-2.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Fri Jan 23 2020 Mamoru TASAKA - 1.1.0-2 - Fix compilation with gcc10 -fno-common From 794c8c9ec9cb1a6af450ed148a22f420a18563dd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jul 2020 07:16:20 +0000 Subject: [PATCH 24/41] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- menu-cache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index ddc213e..c0a0ffd 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -14,7 +14,7 @@ Name: menu-cache Version: 1.1.0 -Release: %{fedorarel}%{?dist}.1 +Release: %{fedorarel}%{?dist}.2 Summary: Caching mechanism for freedesktop.org compliant menus License: LGPLv2+ and GPLv2+ @@ -106,6 +106,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Tue Jul 28 2020 Fedora Release Engineering - 1.1.0-2.2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jan 29 2020 Fedora Release Engineering - 1.1.0-2.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 433903ea137d83cbbb6bc753cda88ee8045fb1d3 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 6 Jan 2021 21:41:02 +0000 Subject: [PATCH 25/41] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- menu-cache.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/menu-cache.spec b/menu-cache.spec index c0a0ffd..4d27ca7 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -32,6 +32,7 @@ Patch0: menu-cache-CVE-2017-8933.patch # https://github.com/lxde/menu-cache/pull/19 Patch1: menu-cache-1.1.0-0001-Support-gcc10-compilation.patch +BuildRequires: make BuildRequires: gcc BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(libfm-extra) From 55e22601ccbfb9d9027215f4a5b0069a9606cc52 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 19:38:34 +0000 Subject: [PATCH 26/41] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- menu-cache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index 4d27ca7..7bfcdb8 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -14,7 +14,7 @@ Name: menu-cache Version: 1.1.0 -Release: %{fedorarel}%{?dist}.2 +Release: %{fedorarel}%{?dist}.3 Summary: Caching mechanism for freedesktop.org compliant menus License: LGPLv2+ and GPLv2+ @@ -107,6 +107,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 1.1.0-2.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Tue Jul 28 2020 Fedora Release Engineering - 1.1.0-2.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 53507aa511d27038204744f9e4d0ab343b309f24 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 14:08:29 +0000 Subject: [PATCH 27/41] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- menu-cache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index 7bfcdb8..c80a1c7 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -14,7 +14,7 @@ Name: menu-cache Version: 1.1.0 -Release: %{fedorarel}%{?dist}.3 +Release: %{fedorarel}%{?dist}.4 Summary: Caching mechanism for freedesktop.org compliant menus License: LGPLv2+ and GPLv2+ @@ -107,6 +107,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 1.1.0-2.4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Tue Jan 26 2021 Fedora Release Engineering - 1.1.0-2.3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 6a0622ed61eeccc8edf94e2407f07dba5009f1e1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 19:05:36 +0000 Subject: [PATCH 28/41] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- menu-cache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index c80a1c7..0f6d29e 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -14,7 +14,7 @@ Name: menu-cache Version: 1.1.0 -Release: %{fedorarel}%{?dist}.4 +Release: %{fedorarel}%{?dist}.5 Summary: Caching mechanism for freedesktop.org compliant menus License: LGPLv2+ and GPLv2+ @@ -107,6 +107,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 1.1.0-2.5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Thu Jul 22 2021 Fedora Release Engineering - 1.1.0-2.4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 3a027e0eeb50e9ccbcce5d54d6519674cde7fdd3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 20:56:45 +0000 Subject: [PATCH 29/41] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- menu-cache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index 0f6d29e..e069228 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -14,7 +14,7 @@ Name: menu-cache Version: 1.1.0 -Release: %{fedorarel}%{?dist}.5 +Release: %{fedorarel}%{?dist}.6 Summary: Caching mechanism for freedesktop.org compliant menus License: LGPLv2+ and GPLv2+ @@ -107,6 +107,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 1.1.0-2.6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Thu Jan 20 2022 Fedora Release Engineering - 1.1.0-2.5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From e19fd73764776027ce0a9a45aa510b65b5d84160 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 19:22:22 +0000 Subject: [PATCH 30/41] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- menu-cache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index e069228..28e7a99 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -14,7 +14,7 @@ Name: menu-cache Version: 1.1.0 -Release: %{fedorarel}%{?dist}.6 +Release: %{fedorarel}%{?dist}.7 Summary: Caching mechanism for freedesktop.org compliant menus License: LGPLv2+ and GPLv2+ @@ -107,6 +107,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 1.1.0-2.7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Jul 21 2022 Fedora Release Engineering - 1.1.0-2.6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 37a31e518547254a93dacf0eca5935aa6592ba07 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Mon, 12 Jun 2023 13:12:20 +0200 Subject: [PATCH 31/41] migrated to SPDX license --- menu-cache.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/menu-cache.spec b/menu-cache.spec index 28e7a99..1f9024b 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -14,10 +14,10 @@ Name: menu-cache Version: 1.1.0 -Release: %{fedorarel}%{?dist}.7 +Release: %{fedorarel}%{?dist}.8 Summary: Caching mechanism for freedesktop.org compliant menus -License: LGPLv2+ and GPLv2+ +License: LGPL-2.0-or-later AND GPL-2.0-or-later URL: http://lxde.org #VCS: git:git://lxde.git.sourceforge.net/gitroot/lxde/menu-cache %if 0%{?usegit} >= 1 @@ -107,6 +107,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Mon Jun 12 2023 Than Ngo - 1.1.0-2.8 +- migrated to SPDX license + * Thu Jan 19 2023 Fedora Release Engineering - 1.1.0-2.7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 5211abfd7c24259460eb0523265bf285f429d4f4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jul 2023 14:14:47 +0000 Subject: [PATCH 32/41] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- menu-cache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index 1f9024b..6c4e573 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -14,7 +14,7 @@ Name: menu-cache Version: 1.1.0 -Release: %{fedorarel}%{?dist}.8 +Release: %{fedorarel}%{?dist}.9 Summary: Caching mechanism for freedesktop.org compliant menus License: LGPL-2.0-or-later AND GPL-2.0-or-later @@ -107,6 +107,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Thu Jul 20 2023 Fedora Release Engineering - 1.1.0-2.9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Mon Jun 12 2023 Than Ngo - 1.1.0-2.8 - migrated to SPDX license From 326133b8946c6225b3ffb194d0682f3cecd99e78 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Mon, 21 Aug 2023 17:04:20 +0900 Subject: [PATCH 33/41] Update to the latest git --- .gitignore | 21 +-- create-menu-cache-git-bare-tarball.sh | 27 ++++ ...1.1.0-0001-Support-gcc10-compilation.patch | 108 ---------------- menu-cache.spec | 120 ++++++++++++------ sources | 2 +- 5 files changed, 108 insertions(+), 170 deletions(-) create mode 100644 create-menu-cache-git-bare-tarball.sh delete mode 100644 menu-cache-1.1.0-0001-Support-gcc10-compilation.patch diff --git a/.gitignore b/.gitignore index facbe27..433ef5e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,2 @@ -menu-cache-0.3.2.tar.gz -/menu-cache-0.3.3.tar.gz -/menu-cache-0.4.1.tar.gz -/menu-cache-0.5.1.tar.gz -/menu-cache-1.0.0.tar.xz -/menu-cache-1.0.0-D20151117git2d65876eb6948f122b35241d6611cf0f009b6f79.tar.gz -/menu-cache-1.0.0-D20151126git7e63ae3f66c30a4516bf04139fd98a3856e6a065.tar.gz -/menu-cache-1.0.0-D20151128git0b1e85c263f571f61384c7eb81c7edc2a69335dc.tar.gz -/menu-cache-1.0.1.tar.xz -/menu-cache-1.0.1-D20160506git2932d67f305d4fd45a29c35c233ecd2925c2ecab.tar.gz -/menu-cache-1.0.1-D20161021git441f0ca9a1b3a8e06dc4b440af28aaa5f4e2e37a.tar.gz -/menu-cache-1.0.2.tar.xz -/menu-cache-1.0.2-D20170417git54ab9e45764435634cdf5de360b295ee3a22817a.tar.gz -/menu-cache-1.0.2-D20170419gitdffb1314ec1b7212bbee5dfa9a021a069b826cbb.tar.gz -/menu-cache-1.0.2-D20170514git56f66684592abf257c4004e6e1fff041c64a12ce.tar.gz -/menu-cache-1.0.2-D20170905git2ef9df036ccc68eaae1eb2ebbffe29a6e2856b97.tar.gz -/menu-cache-1.0.2-D20170913gitfd52af607c6f4bc8db99877d71f802f1afdd7c06.tar.gz -/menu-cache-1.0.2-D20170914git8c8534159d4898935b47f9103cf32cd9b21b3df5.tar.gz -/menu-cache-1.1.0.tar.xz +/menu-cache-*.tar.xz +/menu-cache-*.tar.gz diff --git a/create-menu-cache-git-bare-tarball.sh b/create-menu-cache-git-bare-tarball.sh new file mode 100644 index 0000000..5d59463 --- /dev/null +++ b/create-menu-cache-git-bare-tarball.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +set -x +set -e + +REPONAME=menu-cache +GITURL=https://github.com/lxde/${REPONAME}.git + +DATE=$(date '+%Y%m%d') +TIME=$(date '+%H%M') + +TARNAME=${REPONAME}-${DATE}T${TIME}.tar.gz + +PWDDIR=$(pwd) +TMPDIR=$(mktemp -d /var/tmp/libfm-XXXXXX) +pushd $TMPDIR + +git clone --mirror $GITURL +tar czf ${TARNAME} ${REPONAME}.git/ + +pushd ${REPONAME}.git/ +git log --format=fuller | head -n 12 +popd + +cp -p ${TARNAME} $PWDDIR +popd +rm -rf $TMPDIR diff --git a/menu-cache-1.1.0-0001-Support-gcc10-compilation.patch b/menu-cache-1.1.0-0001-Support-gcc10-compilation.patch deleted file mode 100644 index 29f8e53..0000000 --- a/menu-cache-1.1.0-0001-Support-gcc10-compilation.patch +++ /dev/null @@ -1,108 +0,0 @@ -From 1ce739649b4d66339a03fc0ec9ee7a2f7c141780 Mon Sep 17 00:00:00 2001 -From: Mamoru TASAKA -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 - #include - --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 - diff --git a/menu-cache.spec b/menu-cache.spec index 6c4e573..db85a65 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -1,46 +1,63 @@ -%global usegit 0 -%global mainrel 2 +%global use_release 0 +%global use_git 0 +%global use_gitbare 1 -%global githash 8c8534159d4898935b47f9103cf32cd9b21b3df5 -%global shorthash %(TMP=%githash ; echo ${TMP:0:10}) -%global gitdate Thu, 14 Sep 2017 00:32:14 +0300 -%global gitdate_num 20170914 - -%if 0%{?usegit} >= 1 -%global fedorarel %{mainrel}.D%{gitdate_num}git%{shorthash} -%else -%global fedorarel %{?prever:0.}%{mainrel}%{?prever:.%{prerpmver}} +%if 0%{?use_git} < 1 +%if 0%{?use_gitbare} < 1 +# force +%global use_release 1 %endif +%endif + +%global git_version %{nil} +%global git_ver_rpm %{nil} +%global git_builddir %{nil} + +%if 0%{?use_gitbare} +%global gittardate 20230821 +%global gittartime 1652 + +%global gitbaredate 20230724 +%global git_rev 4a82095ca4a334ceaf306c128248eb020f11bef1 +%global git_short %(echo %{git_rev} | cut -c-8) +%global git_version %{gitbaredate}git%{git_short} +%endif + +%if 0%{?use_git} || 0%{?use_gitbare} +%global git_ver_rpm ^%{git_version} +%global git_builddir -%{git_version} +%endif + + +%global main_version 1.1.0 + Name: menu-cache -Version: 1.1.0 -Release: %{fedorarel}%{?dist}.9 +Version: %{main_version}%{git_ver_rpm} +Release: 1%{?dist} Summary: Caching mechanism for freedesktop.org compliant menus -License: LGPL-2.0-or-later AND GPL-2.0-or-later +# SPDX confirmed +License: LGPL-2.0-or-later URL: http://lxde.org -#VCS: git:git://lxde.git.sourceforge.net/gitroot/lxde/menu-cache -%if 0%{?usegit} >= 1 -Source0: https://github.com/lxde/menu-cache/archive/%{githash}/%{name}-%{version}-D%{gitdate_num}git%{githash}.tar.gz -%else -Source0: http://downloads.sourceforge.net/lxde/%{name}-%{version}.tar.xz +%if 0%{?use_gitbare} +Source0: %{name}-%{gittardate}T%{gittartime}.tar.gz %endif -%if 0%{?el7} -# bz#1451069 - CVE-2017-8933 menu-cache: Insecure temporary file creation in get_socket_name function -Patch0: menu-cache-CVE-2017-8933.patch +%if 0%{?use_release} +Source0: http://downloads.sourceforge.net/sourceforge/lxde/%{name}-%{version}.tar.xz %endif -# https://github.com/lxde/menu-cache/pull/19 -Patch1: menu-cache-1.1.0-0001-Support-gcc10-compilation.patch +Source1: create-menu-cache-git-bare-tarball.sh -BuildRequires: make +BuildRequires: make BuildRequires: gcc BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(libfm-extra) -%if 0%{?usegit} >= 1 +%if 0%{?use_gitbare} >= 1 BuildRequires: automake BuildRequires: gtk-doc BuildRequires: libtool %endif +BuildRequires: /usr/bin/git %description Menu-cache is a caching mechanism for freedesktop.org compliant menus to @@ -57,29 +74,47 @@ developing applications that use %{name}. %prep -%if 0%{?usegit} >= 1 -%setup -q -n %{name}-%{githash} -%else -%setup -q +%if 0%{?use_release} +%setup -q -n %{name}-%{main_version}%{git_builddir} + +git init %endif -%if 0%{?usegit} >= 1 +%if 0%{?use_gitbare} +%setup -q -c -T -n %{name}-%{main_version}%{git_builddir} -a 0 +git clone ./%{name}.git/ +cd %{name} + +git checkout -b %{main_version}-fedora %{git_rev} +cp -a [A-Z]* .. +%endif + +git config user.name "%{name} Fedora maintainer" +git config user.email "%{name}-maintainers@fedoraproject.org" + +%if 0%{?use_release} +git add . +git commit -m "base" -q +%endif + +%if 0%{?use_gitbare} sh autogen.sh %endif -%patch1 -p1 -b .gcc10 %build -%global optflags %optflags -fno-common +%if 0%{?use_gitbare} +cd %{name} +%endif + %configure --disable-static --disable-silent-rules -# remove rpath in menu-cache-gen -#sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool -#sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool - -make %{?_smp_mflags} - +%make_build %install -make install DESTDIR=%{buildroot} +%if 0%{?use_gitbare} +cd %{name} +%endif + +%make_install find %{buildroot} -name '*.la' -exec rm -f {} ';' %ldconfig_scriptlets @@ -89,9 +124,7 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' #FIXME: add ChangeLog and NEWS if there is content %doc AUTHORS %license COPYING -%if 0%{?usegit} < 1 %doc NEWS -%endif %doc README %{_libexecdir}/%{name}/menu-cache-gen %{_libexecdir}/%{name}/menu-cached @@ -107,6 +140,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Mon Aug 21 2023 Mamoru TASAKA - 1.1.0^20230724git4a82095c-1 +- Update to the latest git + * Thu Jul 20 2023 Fedora Release Engineering - 1.1.0-2.9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/sources b/sources index e43c3a1..f4bd25a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (menu-cache-1.1.0.tar.xz) = e4c6619ade7b9a1b97c1366bb94dffb9975be5664b193cf0c69cf9470ef7ae19bda3390d04d98ee9a5b1658ec48aa5c83508c26c347af689161ee67c076b3c9e +SHA512 (menu-cache-20230821T1652.tar.gz) = 8a10216e399ac1fcdd28dd5b743bd38faeb1bb74587b1d8b23cf57f8834975c4fe7eeaf47e9f92c892bc2e71328058a87445df56835953581589f95635cd1e79 From 919f1c78762739095e3e48ee92fe14b9a6f071eb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 07:20:02 +0000 Subject: [PATCH 34/41] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- menu-cache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index db85a65..d85a344 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -34,7 +34,7 @@ Name: menu-cache Version: %{main_version}%{git_ver_rpm} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Caching mechanism for freedesktop.org compliant menus # SPDX confirmed @@ -140,6 +140,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 1.1.0^20230724git4a82095c-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Aug 21 2023 Mamoru TASAKA - 1.1.0^20230724git4a82095c-1 - Update to the latest git From e5a068d970c7f8d791a92c28d52a9cc9b9bb54cc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jan 2024 06:12:16 +0000 Subject: [PATCH 35/41] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- menu-cache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index d85a344..8f31e84 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -34,7 +34,7 @@ Name: menu-cache Version: %{main_version}%{git_ver_rpm} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Caching mechanism for freedesktop.org compliant menus # SPDX confirmed @@ -140,6 +140,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Thu Jan 25 2024 Fedora Release Engineering - 1.1.0^20230724git4a82095c-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Fedora Release Engineering - 1.1.0^20230724git4a82095c-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From acc044a4f1f92b1f6affbe7bf789761c8dc8d5e1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 17:11:58 +0000 Subject: [PATCH 36/41] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- menu-cache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index 8f31e84..8d972ab 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -34,7 +34,7 @@ Name: menu-cache Version: %{main_version}%{git_ver_rpm} -Release: 3%{?dist} +Release: 4%{?dist} Summary: Caching mechanism for freedesktop.org compliant menus # SPDX confirmed @@ -140,6 +140,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 1.1.0^20230724git4a82095c-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Jan 25 2024 Fedora Release Engineering - 1.1.0^20230724git4a82095c-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 391a317573edddb70300f5c0606fddd0ec3f28e9 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Sun, 25 Aug 2024 16:48:04 +0900 Subject: [PATCH 37/41] Update to the latest git Update to the latest git --- menu-cache.spec | 13 ++++++++----- sources | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/menu-cache.spec b/menu-cache.spec index 8d972ab..64c9d2e 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -14,11 +14,11 @@ %global git_builddir %{nil} %if 0%{?use_gitbare} -%global gittardate 20230821 -%global gittartime 1652 +%global gittardate 20240825 +%global gittartime 1624 -%global gitbaredate 20230724 -%global git_rev 4a82095ca4a334ceaf306c128248eb020f11bef1 +%global gitbaredate 20240821 +%global git_rev 83d90343ba7ed345f8c2f0e9d5b71e2fc88d1d6e %global git_short %(echo %{git_rev} | cut -c-8) %global git_version %{gitbaredate}git%{git_short} %endif @@ -34,7 +34,7 @@ Name: menu-cache Version: %{main_version}%{git_ver_rpm} -Release: 4%{?dist} +Release: 1%{?dist} Summary: Caching mechanism for freedesktop.org compliant menus # SPDX confirmed @@ -140,6 +140,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Sun Aug 25 2024 Mamoru TASAKA - 1.1.0^20240821git83d90343-1 +- Update to the latest git + * Thu Jul 18 2024 Fedora Release Engineering - 1.1.0^20230724git4a82095c-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild diff --git a/sources b/sources index f4bd25a..997f5f7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (menu-cache-20230821T1652.tar.gz) = 8a10216e399ac1fcdd28dd5b743bd38faeb1bb74587b1d8b23cf57f8834975c4fe7eeaf47e9f92c892bc2e71328058a87445df56835953581589f95635cd1e79 +SHA512 (menu-cache-20240825T1624.tar.gz) = c43bf7712b9197c17952171a65b4bcd401f016aa058572b168e581b260e8afb69225995505697afb84176576ca42d75cc9ac1943cf8f8c74eb93eb7a846f10b6 From 71ed39b7d3c73d612ec8965f66cb7f95eb307a4f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 17:26:56 +0000 Subject: [PATCH 38/41] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- menu-cache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index 64c9d2e..4aff43d 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -34,7 +34,7 @@ Name: menu-cache Version: %{main_version}%{git_ver_rpm} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Caching mechanism for freedesktop.org compliant menus # SPDX confirmed @@ -140,6 +140,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 1.1.0^20240821git83d90343-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Sun Aug 25 2024 Mamoru TASAKA - 1.1.0^20240821git83d90343-1 - Update to the latest git From 346f2db97f1962781c87a27d0a98ee8b241ff7d1 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Sun, 9 Feb 2025 16:16:27 +0900 Subject: [PATCH 39/41] update to the latest git --- menu-cache.spec | 13 ++++++++----- sources | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/menu-cache.spec b/menu-cache.spec index 4aff43d..1776d61 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -14,11 +14,11 @@ %global git_builddir %{nil} %if 0%{?use_gitbare} -%global gittardate 20240825 -%global gittartime 1624 +%global gittardate 20250209 +%global gittartime 1612 -%global gitbaredate 20240821 -%global git_rev 83d90343ba7ed345f8c2f0e9d5b71e2fc88d1d6e +%global gitbaredate 20250128 +%global git_rev 18bad9324b9e8990c73a67cee9b87d551d34be91 %global git_short %(echo %{git_rev} | cut -c-8) %global git_version %{gitbaredate}git%{git_short} %endif @@ -34,7 +34,7 @@ Name: menu-cache Version: %{main_version}%{git_ver_rpm} -Release: 2%{?dist} +Release: 1%{?dist} Summary: Caching mechanism for freedesktop.org compliant menus # SPDX confirmed @@ -140,6 +140,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Sun Feb 09 2025 Mamoru TASAKA - 1.1.0^20250128git18bad932-1 +- Update to the latest git + * Fri Jan 17 2025 Fedora Release Engineering - 1.1.0^20240821git83d90343-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index 997f5f7..4cd890e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (menu-cache-20240825T1624.tar.gz) = c43bf7712b9197c17952171a65b4bcd401f016aa058572b168e581b260e8afb69225995505697afb84176576ca42d75cc9ac1943cf8f8c74eb93eb7a846f10b6 +SHA512 (menu-cache-20250209T1612.tar.gz) = ff2051ddcde1153a268e4f11094c0ddcd557ad70c92d5fc58ff1abeac2a5143dfe901ed5f447799ed052ce3485b71922763a8d5d88eff6c24c987cebbd5bbf04 From a1b3306638b65d1e95443a5ee51df541e78d6544 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Sun, 16 Feb 2025 16:47:01 +0900 Subject: [PATCH 40/41] 1.1.1 --- menu-cache.spec | 15 +++++++-------- sources | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/menu-cache.spec b/menu-cache.spec index 1776d61..39f027e 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -1,6 +1,6 @@ -%global use_release 0 +%global use_release 1 %global use_git 0 -%global use_gitbare 1 +%global use_gitbare 0 %if 0%{?use_git} < 1 %if 0%{?use_gitbare} < 1 @@ -29,7 +29,7 @@ %endif -%global main_version 1.1.0 +%global main_version 1.1.1 Name: menu-cache @@ -44,7 +44,7 @@ URL: http://lxde.org Source0: %{name}-%{gittardate}T%{gittartime}.tar.gz %endif %if 0%{?use_release} -Source0: http://downloads.sourceforge.net/sourceforge/lxde/%{name}-%{version}.tar.xz +Source0: https://github.com/lxde/%{name}/archive/%{version}/%{name}-%{version}.tar.gz %endif Source1: create-menu-cache-git-bare-tarball.sh @@ -52,11 +52,9 @@ BuildRequires: make BuildRequires: gcc BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(libfm-extra) -%if 0%{?use_gitbare} >= 1 BuildRequires: automake BuildRequires: gtk-doc BuildRequires: libtool -%endif BuildRequires: /usr/bin/git %description @@ -97,9 +95,7 @@ git add . git commit -m "base" -q %endif -%if 0%{?use_gitbare} sh autogen.sh -%endif %build %if 0%{?use_gitbare} @@ -140,6 +136,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Sun Feb 16 2025 Mamoru TASAKA - 1.1.1-1 +- 1.1.1 + * Sun Feb 09 2025 Mamoru TASAKA - 1.1.0^20250128git18bad932-1 - Update to the latest git diff --git a/sources b/sources index 4cd890e..7018d9d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (menu-cache-20250209T1612.tar.gz) = ff2051ddcde1153a268e4f11094c0ddcd557ad70c92d5fc58ff1abeac2a5143dfe901ed5f447799ed052ce3485b71922763a8d5d88eff6c24c987cebbd5bbf04 +SHA512 (menu-cache-1.1.1.tar.gz) = a2ede5663946d13a2992196a8547319ffa252cf5e37ba76dad559deb18450797ac6d5910415226ab996eab2131a2aa715b091a023a8a1eb39c83ea47043976e1 From 7fd366d9f796d791b2fbb29862229c7dbcb52cbc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 21:32:35 +0000 Subject: [PATCH 41/41] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- menu-cache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu-cache.spec b/menu-cache.spec index 39f027e..391c032 100644 --- a/menu-cache.spec +++ b/menu-cache.spec @@ -34,7 +34,7 @@ Name: menu-cache Version: %{main_version}%{git_ver_rpm} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Caching mechanism for freedesktop.org compliant menus # SPDX confirmed @@ -136,6 +136,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 1.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Sun Feb 16 2025 Mamoru TASAKA - 1.1.1-1 - 1.1.1