matchbox-desktop: sync with gio for the inotify-sub
PATCH 1/1 matchbox-desktop: sync with gio for the inotify-sub
From: Jackie Huang <[email protected]>
matchbox-desktop builds with included libinotify which is very old (last sync was in 2008), if we compile glib-2.0 with -fvisibility=default (the default is hidden for libglib and libgio), it will crash because of inconsistency of inotify-sub, so port the related parts to fix the issue.
--- .../files/gio-sync-for-the-inotify-sub.patch | 112 +++++++++++++++++++++ .../matchbox-desktop/matchbox-desktop_git.bb | 4 +- 2 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-sato/matchbox-desktop/files/gio-sync-for-the-inotify-sub.patch
meta/recipes-sato/matchbox-desktop/files/gio-sync-for-the-inotify-sub.patch new file +112 -0
@@ -0,0 +1,112 @@ +From 84b7272c446cea5c6ae185548de0c6cad3a42355 Mon Sep 17 00:00:00 2001 +From: Jackie Huang <[email protected]> +Date: Sat, 28 Nov 2015 07:53:38 +0000 +Subject: [PATCH] gio: sync for the inotify-sub + +This only sync for the inotify-sub with glib-2.44 +to keep _ih_sub_new consistent. + +Upstream-Status: Pending + +Signed-off-by: Jackie Huang <[email protected]> +--- + libtaku/inotify/inotify-sub.c | 15 +++++++++------ + libtaku/inotify/inotify-sub.h | 13 +++++++++---- + libtaku/taku-menu-desktop.c | 2 +- + 3 files changed, 19 insertions(+), 11 deletions(-) + +diff --git a/libtaku/inotify/inotify-sub.c b/libtaku/inotify/inotify-sub.c +index 404dc20..85b3411 100644 +--- a/libtaku/inotify/inotify-sub.c ++++ b/libtaku/inotify/inotify-sub.c +@@ -16,8 +16,7 @@ + + You should have received a copy of the GNU Library General Public + License along with the Gnome Library; see the file COPYING.LIB. If not, +- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +- Boston, MA 02111-1307, USA. ++ see <http://www.gnu.org/licenses/>. + + Authors: + John McCutchan <[email protected]> +@@ -38,15 +37,17 @@ dup_dirname (const gchar *dirname) + gchar *d_dirname = g_strdup (dirname); + size_t len = strlen (d_dirname); + +- if (d_dirname[len] == '/') +- d_dirname[len] = '\0'; ++ if (len && d_dirname[len - 1] == '/') ++ d_dirname[len - 1] = '\0'; + + return d_dirname; + } + + inotify_sub* + _ih_sub_new (const gchar *dirname, +- const gchar *filename, ++ const gchar *filename, ++ gboolean pair_moves, ++ gboolean watch_hardlinks, + gpointer user_data) + { + inotify_sub *sub = NULL; +@@ -54,8 +55,10 @@ _ih_sub_new (const gchar *dirname, + sub = g_new0 (inotify_sub, 1); + sub->dirname = dup_dirname (dirname); + sub->filename = g_strdup (filename); ++ sub->pair_moves = pair_moves; ++ sub->hardlinks = watch_hardlinks; + sub->user_data = user_data; +- ++ + IS_W ("new subscription for %s being setup\n", sub->dirname); + + return sub; +diff --git a/libtaku/inotify/inotify-sub.h b/libtaku/inotify/inotify-sub.h +index 36561e7..ff37567 100644 +--- a/libtaku/inotify/inotify-sub.h ++++ b/libtaku/inotify/inotify-sub.h +@@ -14,8 +14,7 @@ + + You should have received a copy of the GNU Library General Public + License along with the Gnome Library; see the file COPYING.LIB. If not, +- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +- Boston, MA 02111-1307, USA. ++ see <http://www.gnu.org/licenses/>. + + Author: John McCutchan <[email protected]> + */ +@@ -30,9 +29,15 @@ typedef struct + gchar* filename; + gboolean cancelled; + gpointer user_data; ++ gboolean pair_moves; ++ gboolean hardlinks; + } inotify_sub; + +-inotify_sub* _ih_sub_new (const gchar* dirname, const gchar* filename, gpointer user_data); +-void _ih_sub_free (inotify_sub* sub); ++inotify_sub *_ih_sub_new (const gchar *dirname, ++ const gchar *filename, ++ gboolean pair_moves, ++ gboolean watch_hardlinks, ++ gpointer user_data); ++void _ih_sub_free (inotify_sub *sub); + + #endif /* __INOTIFY_SUB_H */ +diff --git a/libtaku/taku-menu-desktop.c b/libtaku/taku-menu-desktop.c +index 34b10d9..ef88421 100644 +--- a/libtaku/taku-menu-desktop.c ++++ b/libtaku/taku-menu-desktop.c +@@ -415,7 +415,7 @@ monitor (const char *directory) + if (!with_inotify) + return; + +- sub = _ih_sub_new (directory, NULL, NULL); ++ sub = _ih_sub_new (directory, NULL, FALSE, FALSE, NULL); + _ip_start_watching (sub); + } + +-- +2.5.0 +
meta/recipes-sato/matchbox-desktop/matchbox-desktop_git.bb +3 -1
@@ -13,7 +13,9 @@ SECTION = "x11/wm" SRCREV = "71e3e6e04271e9d5a14f1c231ef100c7f320134d" PV = "2.0+git${SRCPV}" -SRC_URI = "git://git.yoctoproject.org/${BPN}-2" +SRC_URI = "git://git.yoctoproject.org/${BPN}-2 \ + file://gio-sync-for-the-inotify-sub.patch \ +" EXTRA_OECONF = "--enable-startup-notification --with-dbus"
Signature · 1 line
1.9.1
Quoted 6 lines · On 1 December 2015 at 05:47, <[email protected]> wrote:
matchbox-desktop builds with included libinotify which is very old (last sync was in 2008), if we compile glib-2.0 with -fvisibility=default (the default is hidden for libglib and libgio), it will crash because of inconsistency of inotify-sub, so port the related parts to fix the issue.
matchbox-desktop is maintained by the Yocto Project, so this patch should be applied there and then the recipe updated to the latest git revision.
There's a big rewrite of matchbox-desktop going on, so dropping that code entirely is probably the best idea: just use GIO instead.
Ross
So I should send the patch to [email protected]<mailto:[email protected]>, right?
I agree to drop those codes, and it should already be part of the rewrite, where I can find info about the rewrite, I don’t see any actives in:
git.yoctoproject.org/cgit/cgit.cgi/matchbox-desktop-2
The latest commit is 3 years ago.
Thanks,
Jackie
From: Burton, Ross [mailto:[email protected]]
Sent: Tuesday, December 01, 2015 4:56 PM
To: Huang, Jie (Jackie)
Cc: OE-core
Subject: Re: [OE-core] [PATCH] matchbox-desktop: sync with gio for the inotify-sub
On 1 December 2015 at 05:47, <[email protected]<mailto:[email protected]>> wrote:
matchbox-desktop builds with included libinotify which
is very old (last sync was in 2008), if we compile glib-2.0
with -fvisibility=default (the default is hidden for libglib
and libgio), it will crash because of inconsistency of
inotify-sub, so port the related parts to fix the issue.
matchbox-desktop is maintained by the Yocto Project, so this patch should be applied there and then the recipe updated to the latest git revision.
There's a big rewrite of matchbox-desktop going on, so dropping that code entirely is probably the best idea: just use GIO instead.
Ross
Quoted 8 lines · Jie (Jackie)
I agree to drop those codes, and it should already be part of the rewrite,
where I can find info about the rewrite, I don’t see any actives in:
git.yoctoproject.org/cgit/cgit.cgi/matchbox-desktop-2
The latest commit is 3 years ago.
They're not very recent either but most of the matchbox-* repos have a branch 'gtk3' that contains the most up to date work. I've just started looking at the code with the intention of finishing this gtk3 transition:
an up-to-date poky branch with these changes is 'jku/shuku' in git://
git.yoctoproject.org/poky-contrib. Be warned that it's currently quite
broken: I hope I have something that runs in a week or two.
I agree with ross about preferably getting rid of things like custom inotify code.
- Jussi
Thanks, so we can ignore this patch and should get rid of the inotify codes in the rewrite.
Thanks,
Jackie
From: Jussi Kukkonen [mailto:[email protected]]
Sent: Thursday, December 03, 2015 7:58 PM
To: Huang, Jie (Jackie)
Cc: BURTON, ROSS; OE-core
Subject: Re: [OE-core] [PATCH] matchbox-desktop: sync with gio for the inotify-sub
Quoted 8 lines · On 3 December 2015 at 11:11, Huang, Jie (Jackie)…
I agree to drop those codes, and it should already be part of the rewrite,
where I can find info about the rewrite, I don’t see any actives in:
git.yoctoproject.org/cgit/cgit.cgi/matchbox-desktop-2<http://git.yoctoproject.org/cgit/cgit.cgi/matchbox-desktop-2>
The latest commit is 3 years ago.
They're not very recent either but most of the matchbox-* repos have a branch 'gtk3' that contains the most up to date work. I've just started looking at the code with the intention of finishing this gtk3 transition: an up-to-date poky branch with these changes is 'jku/shuku' in git://git.yoctoproject.org/poky-contrib<http://git.yoctoproject.org/poky-contrib>. Be warned that it's currently quite broken: I hope I have something that runs in a week or two.
I agree with ross about preferably getting rid of things like custom inotify code.
- Jussi