New package: gamin 0.1.10
This commit is contained in:
parent
aeabf278f0
commit
9d6d7111f4
9 changed files with 265 additions and 0 deletions
|
@ -456,6 +456,8 @@ libvhd.so.1.0 xen-libs-4.2.2_2
|
||||||
libxenstat.so.0 xen-libs-4.2.2_2
|
libxenstat.so.0 xen-libs-4.2.2_2
|
||||||
libblktapctl.so.1.0 xen-libs-4.2.2_2
|
libblktapctl.so.1.0 xen-libs-4.2.2_2
|
||||||
libfsimage.so.1.0 xen-libs-4.2.2_2
|
libfsimage.so.1.0 xen-libs-4.2.2_2
|
||||||
|
libfam.so.0 gamin-0.1.10_1
|
||||||
|
libgamin-1.so.0 gamin-0.1.10_1
|
||||||
libKF5SyntaxHighlighting.so.5 syntax-highlighting-5.29.0_1
|
libKF5SyntaxHighlighting.so.5 syntax-highlighting-5.29.0_1
|
||||||
libbabl-0.1.so.0 babl-0.1.10_1
|
libbabl-0.1.so.0 babl-0.1.10_1
|
||||||
libbamf3.so.2 bamf-0.5.1_1
|
libbamf3.so.2 bamf-0.5.1_1
|
||||||
|
|
1
srcpkgs/gamin-devel
Symbolic link
1
srcpkgs/gamin-devel
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
gamin
|
24
srcpkgs/gamin/patches/0001-Poll-files-on-nfs4.patch
Normal file
24
srcpkgs/gamin/patches/0001-Poll-files-on-nfs4.patch
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
source: https://src.fedoraproject.org/cgit/rpms/gamin.git/plain/0001-Poll-files-on-nfs4.patch
|
||||||
|
|
||||||
|
From b92b17ecced6df463da73d6de566740cf5cd00d4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marek Kasik <mkasik@redhat.com>
|
||||||
|
Date: Fri, 1 Feb 2013 15:19:58 +0100
|
||||||
|
Subject: [PATCH 1/2] Poll files on nfs4
|
||||||
|
|
||||||
|
Add nfs4 among polled filesystems.
|
||||||
|
|
||||||
|
https://bugzilla.gnome.org/show_bug.cgi?id=693006
|
||||||
|
---
|
||||||
|
server/gam_fs.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
--- server/gam_fs.c.orig
|
||||||
|
+++ server/gam_fs.c
|
||||||
|
@@ -178,6 +178,7 @@ gam_fs_init (void)
|
||||||
|
gam_fs_set ("reiserfs", GFS_MT_DEFAULT, 0);
|
||||||
|
gam_fs_set ("novfs", GFS_MT_POLL, 30);
|
||||||
|
gam_fs_set ("nfs", GFS_MT_POLL, 5);
|
||||||
|
+ gam_fs_set ("nfs4", GFS_MT_POLL, 5);
|
||||||
|
if (stat("/etc/mtab", &mtab_sbuf) != 0)
|
||||||
|
{
|
||||||
|
GAM_DEBUG(DEBUG_INFO, "Could not stat /etc/mtab\n");
|
|
@ -0,0 +1,59 @@
|
||||||
|
source: https://src.fedoraproject.org/cgit/rpms/gamin.git/plain/0002-Fix-compilation-of-recent-glib-removing-G_CONST_RETU.patch
|
||||||
|
|
||||||
|
From 77fe68f43ce75e920b0a94b0bc572cf3a21714f2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Maciej Piechotka <uzytkownik2@gmail.com>
|
||||||
|
Date: Tue, 13 Sep 2011 09:47:05 +0200
|
||||||
|
Subject: [PATCH 2/2] Fix compilation of recent glib removing G_CONST_RETURN
|
||||||
|
|
||||||
|
https://bugzilla.gnome.org/show_bug.cgi?id=658884
|
||||||
|
---
|
||||||
|
server/gam_node.c | 2 +-
|
||||||
|
server/gam_node.h | 2 +-
|
||||||
|
server/gam_subscription.c | 2 +-
|
||||||
|
server/gam_subscription.h | 2 +-
|
||||||
|
4 files changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
--- server/gam_node.c.orig
|
||||||
|
+++ server/gam_node.c
|
||||||
|
@@ -122,7 +122,7 @@ gam_node_set_is_dir(GamNode * node, gboolean is_dir)
|
||||||
|
* it has finished with the string. If it must keep it longer, it
|
||||||
|
* should makes its own copy. The returned string must not be freed.
|
||||||
|
*/
|
||||||
|
-G_CONST_RETURN char *
|
||||||
|
+const char *
|
||||||
|
gam_node_get_path(GamNode * node)
|
||||||
|
{
|
||||||
|
g_assert(node);
|
||||||
|
--- server/gam_node.h.orig
|
||||||
|
+++ server/gam_node.h
|
||||||
|
@@ -58,7 +58,7 @@ gboolean gam_node_is_dir (GamNode *node);
|
||||||
|
void gam_node_set_is_dir (GamNode *node,
|
||||||
|
gboolean is_dir);
|
||||||
|
|
||||||
|
-G_CONST_RETURN char *gam_node_get_path (GamNode *node);
|
||||||
|
+const char *gam_node_get_path (GamNode *node);
|
||||||
|
|
||||||
|
GList *gam_node_get_subscriptions (GamNode *node);
|
||||||
|
|
||||||
|
--- server/gam_subscription.c.orig
|
||||||
|
+++ server/gam_subscription.c
|
||||||
|
@@ -141,7 +141,7 @@ gam_subscription_pathlen(GamSubscription * sub)
|
||||||
|
* @param sub the GamSubscription
|
||||||
|
* @returns The path being monitored. It should not be freed.
|
||||||
|
*/
|
||||||
|
-G_CONST_RETURN char *
|
||||||
|
+const char *
|
||||||
|
gam_subscription_get_path(GamSubscription * sub)
|
||||||
|
{
|
||||||
|
if (sub == NULL)
|
||||||
|
--- server/gam_subscription.h.orig
|
||||||
|
+++ server/gam_subscription.h
|
||||||
|
@@ -21,7 +21,7 @@ int gam_subscription_pathlen (GamSubscription *sub);
|
||||||
|
|
||||||
|
int gam_subscription_get_reqno (GamSubscription *sub);
|
||||||
|
|
||||||
|
-G_CONST_RETURN char *gam_subscription_get_path (GamSubscription *sub);
|
||||||
|
+const char *gam_subscription_get_path (GamSubscription *sub);
|
||||||
|
|
||||||
|
GamListener *gam_subscription_get_listener (GamSubscription *sub);
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
source: https://src.fedoraproject.org/cgit/rpms/gamin.git/plain/0004-fix-possible-server-deadlock-in-ih_sub_cancel.patch
|
||||||
|
|
||||||
|
From f9c67a13af33f389429e4e760f2023a23a9ac19f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Anssi Hannula <anssi@mageia.org>
|
||||||
|
Date: Wed, 4 Jan 2012 00:23:55 +0200
|
||||||
|
Subject: [PATCH 4/4] fix possible server deadlock in ih_sub_cancel
|
||||||
|
|
||||||
|
ih_sub_foreach() calls ih_sub_cancel() while inotify_lock is locked.
|
||||||
|
However, ih_sub_cancel() locks it again, and locking GMutex recursively
|
||||||
|
causes undefined behaviour.
|
||||||
|
|
||||||
|
Fix that by removing locking from ih_sub_cancel() as ih_sub_foreach()
|
||||||
|
is its only user. Also make the function static so that it won't
|
||||||
|
accidentally get used by other files without locking (inotify-helper.h
|
||||||
|
is an internal server header).
|
||||||
|
|
||||||
|
This should fix the intermittent deadlocks I've been experiencing
|
||||||
|
causing KDE applications to no longer start, and probably also
|
||||||
|
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542361
|
||||||
|
---
|
||||||
|
server/inotify-helper.c | 7 ++-----
|
||||||
|
server/inotify-helper.h | 1 -
|
||||||
|
2 files changed, 2 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
--- server/inotify-helper.c.orig
|
||||||
|
+++ server/inotify-helper.c
|
||||||
|
@@ -123,13 +123,11 @@ ih_sub_add (ih_sub_t * sub)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cancels a subscription which was being monitored.
|
||||||
|
+ * inotify_lock must be held when calling.
|
||||||
|
*/
|
||||||
|
-gboolean
|
||||||
|
+static gboolean
|
||||||
|
ih_sub_cancel (ih_sub_t * sub)
|
||||||
|
{
|
||||||
|
- G_LOCK(inotify_lock);
|
||||||
|
-
|
||||||
|
-
|
||||||
|
if (!sub->cancelled)
|
||||||
|
{
|
||||||
|
IH_W("cancelling %s\n", sub->pathname);
|
||||||
|
@@ -140,7 +138,6 @@ ih_sub_cancel (ih_sub_t * sub)
|
||||||
|
sub_list = g_list_remove (sub_list, sub);
|
||||||
|
}
|
||||||
|
|
||||||
|
- G_UNLOCK(inotify_lock);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
--- server/inotify-helper.h.orig
|
||||||
|
+++ server/inotify-helper.h
|
||||||
|
@@ -34,7 +34,6 @@ gboolean ih_startup (event_callback_t ecb,
|
||||||
|
found_callback_t fcb);
|
||||||
|
gboolean ih_running (void);
|
||||||
|
gboolean ih_sub_add (ih_sub_t *sub);
|
||||||
|
-gboolean ih_sub_cancel (ih_sub_t *sub);
|
||||||
|
|
||||||
|
/* Return FALSE from 'f' if the subscription should be cancelled */
|
||||||
|
void ih_sub_foreach (void *callerdata, gboolean (*f)(ih_sub_t *sub, void *callerdata));
|
53
srcpkgs/gamin/patches/disable-tests-for-cross-build.patch
Normal file
53
srcpkgs/gamin/patches/disable-tests-for-cross-build.patch
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
Disable abstract socket namespace test since can't be achieved while cross-building.
|
||||||
|
--- configure.in.ORIG
|
||||||
|
+++ configure.in
|
||||||
|
@@ -388,47 +388,9 @@
|
||||||
|
#### Abstract sockets
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(abstract socket namespace)
|
||||||
|
-AC_LANG_PUSH(C)
|
||||||
|
-AC_RUN_IFELSE([AC_LANG_PROGRAM(
|
||||||
|
-[[
|
||||||
|
-#include <sys/types.h>
|
||||||
|
-#include <stdlib.h>
|
||||||
|
-#include <string.h>
|
||||||
|
-#include <stdio.h>
|
||||||
|
-#include <sys/socket.h>
|
||||||
|
-#include <sys/un.h>
|
||||||
|
-#include <errno.h>
|
||||||
|
-]],
|
||||||
|
-[[
|
||||||
|
- int listen_fd;
|
||||||
|
- struct sockaddr_un addr;
|
||||||
|
-
|
||||||
|
- listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
|
||||||
|
-
|
||||||
|
- if (listen_fd < 0)
|
||||||
|
- {
|
||||||
|
- fprintf (stderr, "socket() failed: %s\n", strerror (errno));
|
||||||
|
- exit (1);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- memset (&addr, '\0', sizeof (addr));
|
||||||
|
- addr.sun_family = AF_UNIX;
|
||||||
|
- strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
|
||||||
|
- addr.sun_path[0] = '\0'; /* this is what makes it abstract */
|
||||||
|
-
|
||||||
|
- if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
|
||||||
|
- {
|
||||||
|
- fprintf (stderr, "Abstract socket namespace bind() failed: %s\n",
|
||||||
|
- strerror (errno));
|
||||||
|
- exit (1);
|
||||||
|
- }
|
||||||
|
- else
|
||||||
|
- exit (0);
|
||||||
|
-]])],
|
||||||
|
- [have_abstract_sockets=yes],
|
||||||
|
- [have_abstract_sockets=no])
|
||||||
|
-AC_LANG_POP(C)
|
||||||
|
+have_abstract_sockets=yes
|
||||||
|
AC_MSG_RESULT($have_abstract_sockets)
|
||||||
|
+AC_MSG_WARN([Emptied abstract socket namespace test for cross-building])
|
||||||
|
|
||||||
|
if test x$enable_abstract_sockets = xyes; then
|
||||||
|
if test x$have_abstract_sockets = xno; then
|
16
srcpkgs/gamin/patches/gamin-manape.patch
Normal file
16
srcpkgs/gamin/patches/gamin-manape.patch
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
Don't try to build with -DG_DISABLE_DEPRECATED - glib has moved on
|
||||||
|
|
||||||
|
source: https://src.fedoraproject.org/cgit/rpms/gamin.git/plain/gamin-manape.patch
|
||||||
|
|
||||||
|
--- server/Makefile.am.manape 2008-11-12 15:45:28.000000000 -0500
|
||||||
|
+++ server/Makefile.am 2011-07-20 21:06:37.465307638 -0400
|
||||||
|
@@ -6,8 +6,7 @@ INCLUDES = \
|
||||||
|
-I$(top_srcdir)/lib \
|
||||||
|
-I$(top_srcdir)/libgamin \
|
||||||
|
$(DAEMON_CFLAGS) \
|
||||||
|
- -DBINDIR=\""$(libexecdir)"\" \
|
||||||
|
- -DG_DISABLE_DEPRECATED
|
||||||
|
+ -DBINDIR=\""$(libexecdir)"\"
|
||||||
|
|
||||||
|
if GAMIN_DEBUG
|
||||||
|
INCLUDES += -DGAM_DEBUG_ENABLED
|
16
srcpkgs/gamin/patches/musl.patch
Normal file
16
srcpkgs/gamin/patches/musl.patch
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
source: https://mail.gnome.org/archives/gamin-list/2016-April/msg00000.html
|
||||||
|
|
||||||
|
The musl C library does not provide the non portable
|
||||||
|
PTHREAD_MUTEX_RECURSIVE_NP. Test for PTHREAD_MUTEX_RECURSIVE_NP only.
|
||||||
|
|
||||||
|
--- libgamin/gam_data.c.orig
|
||||||
|
+++ libgamin/gam_data.c
|
||||||
|
@@ -470,7 +470,7 @@ gamin_data_new(void)
|
||||||
|
}
|
||||||
|
if (is_threaded > 0) {
|
||||||
|
pthread_mutexattr_init(&attr);
|
||||||
|
-#if defined(linux) || defined(PTHREAD_MUTEX_RECURSIVE_NP)
|
||||||
|
+#if defined(PTHREAD_MUTEX_RECURSIVE_NP)
|
||||||
|
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
|
||||||
|
#else
|
||||||
|
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
34
srcpkgs/gamin/template
Normal file
34
srcpkgs/gamin/template
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# Template file for 'gamin'
|
||||||
|
pkgname=gamin
|
||||||
|
version=0.1.10
|
||||||
|
revision=1
|
||||||
|
build_style=gnu-configure
|
||||||
|
configure_args="--disable-static"
|
||||||
|
# no -python subpackage: failed to cross build for armv7hf
|
||||||
|
hostmakedepends="automake libtool pkg-config"
|
||||||
|
makedepends="glib-devel"
|
||||||
|
short_desc="Library providing the FAM File Alteration Monitor API"
|
||||||
|
maintainer="yopito <pierre.bourgin@free.fr>"
|
||||||
|
license="GPL-2"
|
||||||
|
homepage="http://www.gnome.org/~veillard/gamin/"
|
||||||
|
distfiles="$GNOME_SITE/gamin/0.1/gamin-${version}.tar.bz2"
|
||||||
|
checksum=a59948b20ce2f14136c013f155abb8c8d51db2ea167c063ff33461e453fec10a
|
||||||
|
|
||||||
|
pre_configure() {
|
||||||
|
autoreconf -fi
|
||||||
|
}
|
||||||
|
|
||||||
|
post_install() {
|
||||||
|
# "--disable-static" configure arg has no effect
|
||||||
|
rm ${DESTDIR}/usr/lib/libgamin_shared.a
|
||||||
|
}
|
||||||
|
|
||||||
|
gamin-devel_package() {
|
||||||
|
short_desc+=" - development"
|
||||||
|
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
|
||||||
|
pkg_install() {
|
||||||
|
vmove usr/include
|
||||||
|
vmove usr/lib/*.so
|
||||||
|
vmove usr/lib/pkgconfig/gamin.pc
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue