diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-09-25 10:50:14 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-09-25 10:50:14 +0000 |
commit | 6c73a0908fea13a004457d67941dbd9efbc5cdcc (patch) | |
tree | fd9f483e8e0396d0a5036ae2b844c76410de88ca /app-admin | |
parent | amd64 stable, bug #285110 (diff) | |
download | historical-6c73a0908fea13a004457d67941dbd9efbc5cdcc.tar.gz historical-6c73a0908fea13a004457d67941dbd9efbc5cdcc.tar.bz2 historical-6c73a0908fea13a004457d67941dbd9efbc5cdcc.zip |
Move the freebsd patch to the mirrors.
Package-Manager: portage-2.2_rc41/cvs/Linux x86_64
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/gam-server/ChangeLog | 6 | ||||
-rw-r--r-- | app-admin/gam-server/Manifest | 16 | ||||
-rw-r--r-- | app-admin/gam-server/files/gamin-0.1.9-freebsd.patch | 588 | ||||
-rw-r--r-- | app-admin/gam-server/gam-server-0.1.10.ebuild | 7 |
4 files changed, 22 insertions, 595 deletions
diff --git a/app-admin/gam-server/ChangeLog b/app-admin/gam-server/ChangeLog index b81ff3dce69a..284ec3ef3edc 100644 --- a/app-admin/gam-server/ChangeLog +++ b/app-admin/gam-server/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for app-admin/gam-server # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/gam-server/ChangeLog,v 1.8 2009/04/28 18:15:34 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/gam-server/ChangeLog,v 1.9 2009/09/25 10:50:13 flameeyes Exp $ + + 25 Sep 2009; Diego E. Pettenò <flameeyes@gentoo.org> + -files/gamin-0.1.9-freebsd.patch, gam-server-0.1.10.ebuild: + Move the freebsd patch to the mirrors. 28 Apr 2009; Raúl Porcel <armin76@gentoo.org> gam-server-0.1.10.ebuild: m68k stable diff --git a/app-admin/gam-server/Manifest b/app-admin/gam-server/Manifest index 6878e30e85e3..c1fe6934d4bb 100644 --- a/app-admin/gam-server/Manifest +++ b/app-admin/gam-server/Manifest @@ -1,6 +1,16 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX gam-server-0.1.10-noinst-lib.patch 2207 RMD160 f0d2479f5aec3ef8852a36214c168ef560de3594 SHA1 544895f7345413c5314b4d5892492e7b27c8eb6b SHA256 e19ede71d259fbe5888c06635441365a48687034b24c5f15edd808a7cbd9cdc7 -AUX gamin-0.1.9-freebsd.patch 16238 RMD160 814d3ea14e9de819bf48bed005fb3d72af0a4ec4 SHA1 44206ae9860edd463d55f85bedb0ad80e1bce562 SHA256 c6986a8f0b2152e873cf10a3475330c149002755b9f4842bf82117f80cc325a0 DIST gamin-0.1.10.tar.gz 653392 RMD160 fb6ba5ec2d2f49afacf10dda4095f02f5930d686 SHA1 f4c6b9fe87757552ef58fef4abef9e42cd3142ac SHA256 28085f0ae8be10eab582ff186af4fb0be92cc6c62b5cc19cd09b295c7c2899a1 -EBUILD gam-server-0.1.10.ebuild 1583 RMD160 756ba2b2638e9d77e07b9cb367d30ac72739df3d SHA1 5095cfdafda70369a2eff972ff40ad3b5df730a1 SHA256 c410e99c2f476a9821046726a35b63997ee91012ae871aeb893ca9babb3244f7 -MISC ChangeLog 1297 RMD160 3662d41702007d0b2b9ae91cade64b483ae221fa SHA1 5f60ba189ed97c0ff614abc505587b6295212261 SHA256 1313ca1ce5ee8fb4552f914d5591a1f7178520cfbd865ad1aadc9207276521bc +DIST gamin-0.1.9-freebsd.patch.bz2 4635 RMD160 9f53abfcb9e785e9408cb8f1d35ff36fb739d878 SHA1 3d276802bbab47885dfcba0bbe6422711c84e676 SHA256 fcd1a6655d1c7cd86db6102931a4da1c22bc85f1c4692959c1a966fec5231723 +EBUILD gam-server-0.1.10.ebuild 1638 RMD160 86454a4318baecac9e3d3af4f23023a0aa3a42eb SHA1 54831f60a1a3f099438231ba6555360f4944f1fa SHA256 6c8eea3f7c3f96b0916e786b414cfac808110aeb6dc342f90e47ede892a11076 +MISC ChangeLog 1459 RMD160 f9241c8276dcb08335db99b8659cc033ef54c315 SHA1 6c51d66a4621f4900adb89f555ad4095c81a1ee9 SHA256 82694604929c9ac2a3cc96f892857f84e7f06e90dde4fcc2e838bd77739a35c4 MISC metadata.xml 193 RMD160 d229eaaf3f5d3937df3a8242fbb874afee3afeff SHA1 c11375432387dea6f6f9b80baf1490c17f9674ae SHA256 4143c03933b7210719f44d20a67303de568d2b5a064ab0903720ce628ce4afa2 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.11 (GNU/Linux) + +iEYEARECAAYFAkq8oG4ACgkQAiZjviIA2Xi2XgCg6cM8mkgKIt5NDmZZJUaElo59 +SogAn2k33gU6RMb5QhKpzf4OzZhXQSeI +=0Yeq +-----END PGP SIGNATURE----- diff --git a/app-admin/gam-server/files/gamin-0.1.9-freebsd.patch b/app-admin/gam-server/files/gamin-0.1.9-freebsd.patch deleted file mode 100644 index 3450f1bc5541..000000000000 --- a/app-admin/gam-server/files/gamin-0.1.9-freebsd.patch +++ /dev/null @@ -1,588 +0,0 @@ -diff -ur a/libgamin/gam_api.c b/libgamin/gam_api.c ---- a/libgamin/gam_api.c 2007-07-04 14:36:48 +0100 -+++ b/libgamin/gam_api.c 2007-08-07 17:34:38 +0100 -@@ -14,6 +14,7 @@ - #include <sys/socket.h> - #include <sys/un.h> - #include <sys/uio.h> -+#include <string.h> - #include "fam.h" - #include "gam_protocol.h" - #include "gam_data.h" -@@ -428,10 +429,10 @@ - { - char data[2] = { 0, 0 }; - int written; --#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS) -- struct { -+#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__)) -+ union { - struct cmsghdr hdr; -- struct cmsgcred cred; -+ char cred[CMSG_SPACE (sizeof (struct cmsgcred))]; - } cmsg; - struct iovec iov; - struct msghdr msg; -@@ -443,16 +444,16 @@ - msg.msg_iov = &iov; - msg.msg_iovlen = 1; - -- msg.msg_control = &cmsg; -- msg.msg_controllen = sizeof (cmsg); -+ msg.msg_control = (caddr_t) &cmsg; -+ msg.msg_controllen = CMSG_SPACE (sizeof (struct cmsgcred)); - memset (&cmsg, 0, sizeof (cmsg)); -- cmsg.hdr.cmsg_len = sizeof (cmsg); -+ cmsg.hdr.cmsg_len = CMSG_LEN (sizeof (struct cmsgcred)); - cmsg.hdr.cmsg_level = SOL_SOCKET; - cmsg.hdr.cmsg_type = SCM_CREDS; - #endif - - retry: --#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS) -+#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__)) - written = sendmsg(fd, &msg, 0); - #else - written = write(fd, &data[0], 1); -@@ -654,15 +655,16 @@ - gid_t c_gid; - - #ifdef HAVE_CMSGCRED -- struct { -+ struct cmsgcred *cred; -+ union { - struct cmsghdr hdr; -- struct cmsgcred cred; -+ char cred[CMSG_SPACE (sizeof (struct cmsgcred))]; - } cmsg; - #endif - - s_uid = getuid(); - --#if defined(LOCAL_CREDS) && defined(HAVE_CMSGCRED) -+#if defined(LOCAL_CREDS) && defined(HAVE_CMSGCRED) && !defined(__FreeBSD__) - /* Set the socket to receive credentials on the next message */ - { - int on = 1; -@@ -683,8 +685,8 @@ - - #ifdef HAVE_CMSGCRED - memset(&cmsg, 0, sizeof(cmsg)); -- msg.msg_control = &cmsg; -- msg.msg_controllen = sizeof(cmsg); -+ msg.msg_control = (caddr_t) &cmsg; -+ msg.msg_controllen = CMSG_SPACE (sizeof (struct cmsgcred)); - #endif - - retry: -@@ -701,7 +703,7 @@ - goto failed; - } - #ifdef HAVE_CMSGCRED -- if (cmsg.hdr.cmsg_len < sizeof(cmsg) || cmsg.hdr.cmsg_type != SCM_CREDS) { -+ if (cmsg.hdr.cmsg_len < CMSG_LEN (sizeof (struct cmsgcred)) || cmsg.hdr.cmsg_type != SCM_CREDS) { - GAM_DEBUG(DEBUG_INFO, - "Message from recvmsg() was not SCM_CREDS\n"); - goto failed; -@@ -727,9 +729,10 @@ - goto failed; - } - #elif defined(HAVE_CMSGCRED) -- c_pid = cmsg.cred.cmcred_pid; -- c_uid = cmsg.cred.cmcred_euid; -- c_gid = cmsg.cred.cmcred_groups[0]; -+ cred = (struct cmsgcred *) CMSG_DATA (&cmsg); -+ c_pid = cred->cmcred_pid; -+ c_uid = cred->cmcred_euid; -+ c_gid = cred->cmcred_groups[0]; - #else /* !SO_PEERCRED && !HAVE_CMSGCRED */ - GAM_DEBUG(DEBUG_INFO, - "Socket credentials not supported on this OS\n"); -@@ -1288,14 +1291,17 @@ - - // FIXME: drop and reacquire lock while blocked? - gamin_data_lock(conn); -- if (!gamin_data_event_ready(conn)) { -+ while ((ret = gamin_data_event_ready(conn)) == 0) { - if (gamin_read_data(conn, fc->fd, 1) < 0) { - gamin_try_reconnect(conn, fc->fd); - FAMErrno = FAM_CONNECT; - return (-1); - } - } -- ret = gamin_data_read_event(conn, fe); -+ -+ if (ret > 0) -+ ret = gamin_data_read_event(conn, fe); -+ - gamin_data_unlock(conn); - - if (ret < 0) { -diff -ur a/server/gam_channel.c b/server/gam_channel.c ---- a/server/gam_channel.c 2007-07-04 14:36:49 +0100 -+++ b/server/gam_channel.c 2007-08-07 17:34:38 +0100 -@@ -7,6 +7,7 @@ - #include <sys/stat.h> - #include <sys/un.h> - #include <sys/uio.h> -+#include <string.h> - #include "gam_error.h" - #include "gam_connection.h" - #include "gam_channel.h" -@@ -30,10 +31,10 @@ - { - char data[2] = { 0, 0 }; - int written; --#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS) -- struct { -+#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__)) -+ union { - struct cmsghdr hdr; -- struct cmsgcred cred; -+ char cred[CMSG_SPACE (sizeof (struct cmsgcred))]; - } cmsg; - struct iovec iov; - struct msghdr msg; -@@ -45,16 +46,16 @@ - msg.msg_iov = &iov; - msg.msg_iovlen = 1; - -- msg.msg_control = &cmsg; -- msg.msg_controllen = sizeof (cmsg); -+ msg.msg_control = (caddr_t) &cmsg; -+ msg.msg_controllen = CMSG_SPACE (sizeof (struct cmsgcred)); - memset (&cmsg, 0, sizeof (cmsg)); -- cmsg.hdr.cmsg_len = sizeof (cmsg); -+ cmsg.hdr.cmsg_len = CMSG_LEN (sizeof (struct cmsgcred)); - cmsg.hdr.cmsg_level = SOL_SOCKET; - cmsg.hdr.cmsg_type = SCM_CREDS; - #endif - - retry: --#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS) -+#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__)) - written = sendmsg(fd, &msg, 0); - #else - written = write(fd, &data[0], 1); -@@ -95,15 +96,16 @@ - gid_t c_gid; - - #ifdef HAVE_CMSGCRED -- struct { -+ struct cmsgcred *cred; -+ union { - struct cmsghdr hdr; -- struct cmsgcred cred; -+ char cred[CMSG_SPACE (sizeof (struct cmsgcred))]; - } cmsg; - #endif - - s_uid = getuid(); - --#if defined(LOCAL_CREDS) && defined(HAVE_CMSGCRED) -+#if defined(LOCAL_CREDS) && defined(HAVE_CMSGCRED) && !defined(__FreeBSD__) - /* Set the socket to receive credentials on the next message */ - { - int on = 1; -@@ -124,8 +126,8 @@ - - #ifdef HAVE_CMSGCRED - memset(&cmsg, 0, sizeof(cmsg)); -- msg.msg_control = &cmsg; -- msg.msg_controllen = sizeof(cmsg); -+ msg.msg_control = (caddr_t) &cmsg; -+ msg.msg_controllen = CMSG_SPACE (sizeof (struct cmsgcred)); - #endif - - retry: -@@ -142,7 +144,7 @@ - goto failed; - } - #ifdef HAVE_CMSGCRED -- if (cmsg.hdr.cmsg_len < sizeof(cmsg) || cmsg.hdr.cmsg_type != SCM_CREDS) { -+ if (cmsg.hdr.cmsg_len < CMSG_LEN (sizeof (struct cmsgcred)) || cmsg.hdr.cmsg_type != SCM_CREDS) { - GAM_DEBUG(DEBUG_INFO, - "Message from recvmsg() was not SCM_CREDS\n"); - goto failed; -@@ -168,9 +170,10 @@ - goto failed; - } - #elif defined(HAVE_CMSGCRED) -- c_pid = cmsg.cred.cmcred_pid; -- c_uid = cmsg.cred.cmcred_euid; -- c_gid = cmsg.cred.cmcred_groups[0]; -+ cred = (struct cmsgcred *) CMSG_DATA (&cmsg); -+ c_pid = cred->cmcred_pid; -+ c_uid = cred->cmcred_euid; -+ c_gid = cred->cmcred_groups[0]; - #else /* !SO_PEERCRED && !HAVE_CMSGCRED */ - GAM_DEBUG(DEBUG_INFO, - "Socket credentials not supported on this OS\n"); -@@ -620,6 +623,7 @@ - { - int fd; - struct sockaddr_un addr; -+ struct stat st; - - fd = socket(PF_UNIX, SOCK_STREAM, 0); - if (fd < 0) { -@@ -640,9 +644,19 @@ - * some extra protection checks. Also make sure the socket is created - * with restricted mode - */ -- if (!gam_check_secure_path(path)) { -+ if (!gam_check_secure_dir()) { -+ close(fd); - return (-1); - } -+ -+ if (stat(path, &st) == 0) { -+ /* bind() will fail if the socket already exists */ -+ if (unlink(path) < 0) { -+ GAM_DEBUG(DEBUG_INFO, "Failed to remove %s\n", path); -+ close(fd); -+ return (-1); -+ } -+ } - strncpy(&addr.sun_path[0], path, (sizeof(addr) - 4) - 1); - umask(0077); - #endif -diff -ur a/server/gam_fs.c b/server/gam_fs.c ---- a/server/gam_fs.c 2007-07-04 14:36:49 +0100 -+++ b/server/gam_fs.c 2007-08-07 17:34:38 +0100 -@@ -7,6 +7,11 @@ - #include <string.h> - #include <errno.h> - #include <glib.h> -+#ifdef __FreeBSD__ -+#include <sys/param.h> -+#include <sys/ucred.h> -+#include <sys/mount.h> -+#endif - #include "gam_error.h" - #include "gam_fs.h" - -@@ -21,9 +26,13 @@ - typedef struct _gam_fs { - char *path; - char *fsname; -+ guint64 flags; - } gam_fs; - - static gboolean initialized = FALSE; -+#ifdef __FreeBSD__ -+static gboolean initializing = FALSE; -+#endif - static GList *filesystems = NULL; - static GList *fs_props = NULL; - static struct stat mtab_sbuf; -@@ -110,6 +119,7 @@ - return strlen(fsb->path) - strlen (fsa->path); - } - -+#ifdef __linux__ - static void - gam_fs_scan_mtab (void) - { -@@ -165,10 +175,41 @@ - gam_fs_free_filesystems (); - filesystems = g_list_sort (new_filesystems, gam_fs_filesystem_sort_cb); - } -+#endif -+ -+#ifdef __FreeBSD__ -+static void -+gam_fs_getmntinfo (void) -+{ -+ struct statfs *stat; -+ GList *new_filesystems = NULL; -+ gam_fs *fs = NULL; -+ int i, n; -+ -+ n = getmntinfo(&stat, MNT_NOWAIT); -+ if (n == -1) -+ return; -+ -+ for (i = 0; i < n; i++) -+ { -+ fs = g_new0 (gam_fs, 1); -+ fs->path = g_strdup (stat[i].f_mntonname); -+ fs->fsname = g_strdup (stat[i].f_fstypename); -+ fs->flags = stat[i].f_flags; -+ -+ new_filesystems = g_list_prepend (new_filesystems, fs); -+ } -+ -+ /* Replace the old file systems list with the new one */ -+ gam_fs_free_filesystems (); -+ filesystems = g_list_sort (new_filesystems, gam_fs_filesystem_sort_cb); -+} -+#endif - - void - gam_fs_init (void) - { -+#if defined(__linux__) - if (initialized == FALSE) - { - initialized = TRUE; -@@ -181,6 +222,7 @@ - if (stat("/etc/mtab", &mtab_sbuf) != 0) - { - GAM_DEBUG(DEBUG_INFO, "Could not stat /etc/mtab\n"); -+ return; - } - gam_fs_scan_mtab (); - } else { -@@ -189,6 +231,7 @@ - if (stat("/etc/mtab", &sbuf) != 0) - { - GAM_DEBUG(DEBUG_INFO, "Could not stat /etc/mtab\n"); -+ return; - } - - /* /etc/mtab has changed */ -@@ -199,6 +242,54 @@ - - mtab_sbuf = sbuf; - } -+#elif defined(__FreeBSD__) -+ if (initialized == FALSE && initializing == FALSE) -+ { -+ GList *iterator = NULL; -+ GHashTable *fs_hash = NULL; -+ gam_fs *fs = NULL; -+ -+ initialized = TRUE; -+ initializing = TRUE; -+ -+ gam_fs_getmntinfo (); -+ -+ iterator = filesystems; -+ fs_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); -+ -+ while (iterator) { -+ fs = iterator->data; -+ -+ if (!g_hash_table_lookup (fs_hash, fs->fsname)) { -+ if (fs->flags & MNT_LOCAL) -+ gam_fs_set (fs->fsname, GFS_MT_KERNEL, 0); -+ else -+ gam_fs_set (fs->fsname, GFS_MT_POLL, 5); -+ -+ g_hash_table_insert (fs_hash, g_strdup (fs->fsname), GINT_TO_POINTER (1)); -+ } -+ -+ iterator = g_list_next (iterator); -+ } -+ -+ g_hash_table_destroy (fs_hash); -+ initializing = FALSE; -+ } else if (initializing == FALSE) { -+ struct stat sbuf; -+ -+ if (stat ("/etc/fstab", &sbuf) != 0) { -+ GAM_DEBUG(DEBUG_INFO, "Could not stat /etc/fstab\n"); -+ return; -+ } -+ -+ if (sbuf.st_mtime != mtab_sbuf.st_mtime) { -+ GAM_DEBUG(DEBUG_INFO, "Updating list of mounted filesystems\n"); -+ gam_fs_getmntinfo (); -+ } -+ -+ mtab_sbuf = sbuf; -+ } -+#endif - } - - gam_fs_mon_type -@@ -209,10 +300,13 @@ - - props = gam_fs_find_fs_props (path); - -- if (!props) -- return GFS_MT_DEFAULT; -- -- return props->mon_type; -+#if (defined(ENABLE_INOTIFY) || defined(ENABLE_DNOTIFY) || defined(ENABLE_KQUEUE) || defined(ENABLE_HURD_MACH_NOTIFY)) && defined(USE_GAMIN_POLLER) -+ if (props) -+ return props->mon_type; -+#elif !defined(USE_GAMIN_POLLER) -+ return GFS_MT_DEFAULT; -+#endif -+ return GFS_MT_POLL; - } - - int -diff -ur a/server/gam_kqueue.c b/server/gam_kqueue.c ---- a/server/gam_kqueue.c 2007-07-04 14:50:41 +0100 -+++ b/server/gam_kqueue.c 2007-08-07 17:34:38 +0100 -@@ -10,9 +10,10 @@ - * FAM should do: we do not call g_dir_open() if the file is a - * symbolic link). - * -- * * kqueue cannot monitor files residing on anything but a UFS -- * file system. If kqueue cannot monitor a file, this backend -- * will poll it periodically. -+ * * While kqueue is no longer tied to the UFS file system, it is -+ * better to not use it for remote file systems (because for -+ * such file systems, only local changes are detected by -+ * the kernel). - * - * * Monitoring a file with kqueue prevents the file system it - * resides on from being unmounted, because kqueue can only -@@ -28,10 +29,9 @@ - * - kqueue needs to be augmented with a filename-based - * monitoring facility; - * -- * - kqueue needs to be moved out the UFS code. -- * - * Copyright (C) 2005 Joe Marcus Clarke <marcus@FreeBSD.org> -- * Copyright (C) 2005 Jean-Yves Lefort <jylefort@FreeBSD.org> -+ * Copyright (C) 2005, 2006 Jean-Yves Lefort <jylefort@FreeBSD.org> -+ * Copyright (C) 2006 Alex Dupre <ale@FreeBSD.org> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -53,6 +53,9 @@ - #include <fcntl.h> - #include <unistd.h> - #include <sys/param.h> -+#ifndef USE_GAMIN_POLLER -+#include <sys/mount.h> -+#endif - #include <sys/types.h> - #include <sys/sysctl.h> - #include <sys/stat.h> -@@ -509,6 +512,9 @@ - gam_kqueue_monitor_enable_kqueue (Monitor *mon) - { - struct kevent ev[1]; -+#ifndef USE_GAMIN_POLLER -+ struct statfs sb; -+#endif - - if (open_files == max_open_files) - { -@@ -516,26 +522,36 @@ - return FALSE; - } - -- mon->fd = open(mon->pathname, O_RDONLY | O_NOFOLLOW); -+ mon->fd = open(mon->pathname, O_RDONLY | O_NONBLOCK | O_NOFOLLOW); - if (mon->fd < 0) - { - GAM_DEBUG(DEBUG_INFO, "cannot open %s (%s), falling back to poll\n", mon->pathname, g_strerror(errno)); - return FALSE; - } - -+#ifndef USE_GAMIN_POLLER -+ if (fstatfs(mon->fd, &sb) == 0 && (sb.f_flags & MNT_LOCAL) == 0) -+ { -+ GAM_DEBUG(DEBUG_INFO, "%s resides on a remote file system, falling back to poll\n", mon->pathname); -+ goto poll; -+ } -+#endif -+ - EV_SET(ev, mon->fd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_CLEAR, VN_NOTE_ALL, 0, mon); - if (kevent(kq, ev, G_N_ELEMENTS(ev), NULL, 0, NULL) < 0) - { - GAM_DEBUG(DEBUG_INFO, "cannot enable kqueue notification for %s (%s), falling back to poll\n", mon->pathname, g_strerror(errno)); -- -- close(mon->fd); -- mon->fd = -1; -- -- return FALSE; -+ goto poll; - } - - open_files++; - return TRUE; -+ -+ poll: -+ close(mon->fd); -+ mon->fd = -1; -+ -+ return FALSE; - } - - static void -@@ -840,6 +856,8 @@ - case GAMIN_EVENT_MOVED: - gam_kqueue_sub_monitor_set_missing(smon); - break; -+ default: -+ break; - } - - gam_server_emit_event(mon->pathname, isdir, event, smon->subs, 1); -@@ -981,6 +999,8 @@ - - gam_kqueue_hash_table_remove(fmon->smon->fmons, fmon); - break; -+ default: -+ break; - } - } - -diff -ur a/server/gam_node.c b/server/gam_node.c ---- a/server/gam_node.c 2007-07-04 14:36:49 +0100 -+++ b/server/gam_node.c 2007-08-07 17:34:38 +0100 -@@ -23,6 +23,7 @@ - #include "gam_event.h" - #include "gam_node.h" - #include "gam_error.h" -+#include "gam_server.h" - - /** - * Create a new node -diff -ur a/server/gam_server.c b/server/gam_server.c ---- a/server/gam_server.c 2007-07-04 14:36:49 +0100 -+++ b/server/gam_server.c 2007-08-07 17:34:38 +0100 -@@ -32,7 +32,7 @@ - #include "gam_server.h" - #include "gam_channel.h" - #include "gam_subscription.h" --#include "gam_poll_generic.h" -+#include "gam_poll_basic.h" - #ifdef ENABLE_INOTIFY - #include "gam_inotify.h" - #endif -@@ -438,7 +438,7 @@ - GamPollHandler - gam_server_get_poll_handler (void) - { -- return __gam_kernel_handler; -+ return __gam_poll_handler; - } - - gboolean -diff -ur a/tests/testing.c b/tests/testing.c ---- a/tests/testing.c 2007-07-04 14:36:49 +0100 -+++ b/tests/testing.c 2007-08-07 17:34:38 +0100 -@@ -376,11 +376,11 @@ - } - printf("chmod %s to %s\n", arg, arg2); - } else if (!strcmp(command, "chown")) { -+ struct stat sb; - if (args != 3) { - fprintf(stderr, "chown line %d: lacks path and owner\n", no); - return (-1); - } -- struct stat sb; - if (!lstat (arg, &sb)) { - ret = (S_ISLNK (sb.st_mode)) ? - lchown(arg, strtol(arg2, NULL, 10), -1) : -@@ -486,9 +486,9 @@ - return (-1); - } - /* -- * wait at most 3 secs before declaring failure -+ * wait at most 7 secs before declaring failure - */ -- while ((delay < 30) && (testState.nb_events < nb_events + count)) { -+ while ((delay < 70) && (testState.nb_events < nb_events + count)) { - debugLoop(100); - - /* printf("+"); fflush(stdout); */ diff --git a/app-admin/gam-server/gam-server-0.1.10.ebuild b/app-admin/gam-server/gam-server-0.1.10.ebuild index 44487ee1db10..36f4d9119bf2 100644 --- a/app-admin/gam-server/gam-server-0.1.10.ebuild +++ b/app-admin/gam-server/gam-server-0.1.10.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/gam-server/gam-server-0.1.10.ebuild,v 1.8 2009/04/28 18:15:34 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/gam-server/gam-server-0.1.10.ebuild,v 1.9 2009/09/25 10:50:13 flameeyes Exp $ inherit autotools eutils flag-o-matic libtool python @@ -9,7 +9,8 @@ MY_P=${MY_PN}-${PV} DESCRIPTION="Library providing the FAM File Alteration Monitor API" HOMEPAGE="http://www.gnome.org/~veillard/gamin/" -SRC_URI="http://www.gnome.org/~veillard/${MY_PN}/sources/${MY_P}.tar.gz" +SRC_URI="http://www.gnome.org/~veillard/${MY_PN}/sources/${MY_P}.tar.gz + mirror://gentoo/${MY_PN}-0.1.9-freebsd.patch.bz2" LICENSE="LGPL-2" SLOT="0" @@ -31,7 +32,7 @@ src_unpack() { cd "${S}" # Fix compile warnings; bug #188923 - epatch "${FILESDIR}/${MY_PN}-0.1.9-freebsd.patch" + epatch "${DISTDIR}/${MY_PN}-0.1.9-freebsd.patch.bz2" # Fix file-collision due to shared library, upstream bug #530635 epatch "${FILESDIR}/${P}-noinst-lib.patch" |