[gamin] make it work on nfs4
Matthias Clasen
mclasen at fedoraproject.org
Fri Feb 1 18:19:11 UTC 2013
commit 0a3843c7380b1b3b9fd3e0b42989afe7f46b6469
Author: Matthias Clasen <mclasen at redhat.com>
Date: Fri Feb 1 13:19:37 2013 -0500
make it work on nfs4
0001-Poll-files-on-nfs4.patch | 27 ++++++++
...tion-of-recent-glib-removing-G_CONST_RETU.patch | 68 ++++++++++++++++++++
gamin.spec | 25 ++++----
3 files changed, 108 insertions(+), 12 deletions(-)
---
diff --git a/0001-Poll-files-on-nfs4.patch b/0001-Poll-files-on-nfs4.patch
new file mode 100644
index 0000000..f776732
--- /dev/null
+++ b/0001-Poll-files-on-nfs4.patch
@@ -0,0 +1,27 @@
+From b92b17ecced6df463da73d6de566740cf5cd00d4 Mon Sep 17 00:00:00 2001
+From: Marek Kasik <mkasik at 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(+)
+
+diff --git a/server/gam_fs.c b/server/gam_fs.c
+index c8ca704..143a603 100644
+--- a/server/gam_fs.c
++++ b/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");
+--
+1.8.1.2
+
diff --git a/0002-Fix-compilation-of-recent-glib-removing-G_CONST_RETU.patch b/0002-Fix-compilation-of-recent-glib-removing-G_CONST_RETU.patch
new file mode 100644
index 0000000..543fff1
--- /dev/null
+++ b/0002-Fix-compilation-of-recent-glib-removing-G_CONST_RETU.patch
@@ -0,0 +1,68 @@
+From 77fe68f43ce75e920b0a94b0bc572cf3a21714f2 Mon Sep 17 00:00:00 2001
+From: Maciej Piechotka <uzytkownik2 at 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(-)
+
+diff --git a/server/gam_node.c b/server/gam_node.c
+index 02358ba..d0302d2 100644
+--- a/server/gam_node.c
++++ b/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);
+diff --git a/server/gam_node.h b/server/gam_node.h
+index 02c8692..83349a8 100644
+--- a/server/gam_node.h
++++ b/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);
+
+diff --git a/server/gam_subscription.c b/server/gam_subscription.c
+index dfa3273..4675b34 100644
+--- a/server/gam_subscription.c
++++ b/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)
+diff --git a/server/gam_subscription.h b/server/gam_subscription.h
+index d894fbe..e6b4e15 100644
+--- a/server/gam_subscription.h
++++ b/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);
+
+--
+1.8.1.2
+
diff --git a/gamin.spec b/gamin.spec
index 7cec475..5907810 100644
--- a/gamin.spec
+++ b/gamin.spec
@@ -1,7 +1,7 @@
Summary: Library providing the FAM File Alteration Monitor API
Name: gamin
Version: 0.1.10
-Release: 13%{?dist}
+Release: 14%{?dist}
License: LGPLv2
#some of the files (server/inotify-kernel.c) are GPLv2
#so https://fedoraproject.org/wiki/Licensing#GPL_Compatibility_Matrix
@@ -29,6 +29,10 @@ Patch2: gamin-manape.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=786170
Patch3: gamin-0.1.11-double-lock.patch
+# upstream fixes
+Patch4: 0001-Poll-files-on-nfs4.patch
+Patch5: 0002-Fix-compilation-of-recent-glib-removing-G_CONST_RETU.patch
+
%description
This C library provides an API and ABI compatible file alteration
monitor mechanism compatible with FAM but not dependent on a system wide
@@ -61,6 +65,8 @@ of the gamin package.
%patch1 -p1 -b .gnueabi
%patch2 -p1 -b .manape
%patch3 -p1 -b .double-lock
+%patch4 -p1 -b .nfs4
+%patch5 -p1 -b .const
# recode docs into UTF-8
for i in ChangeLog NEWS ; do
@@ -77,30 +83,23 @@ for i in `find -name '*.py'`; do
rm ${i}.bak
done
+autoreconf --force --install
%build
-autoreconf --force --install
%configure
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}
%install
-rm -fr %{buildroot}
-
make install DESTDIR=%{buildroot} INSTALL="install -p"
find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' | xargs rm -f
-%clean
-rm -fr %{buildroot}
-
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
-%defattr(-, root, root, -)
-
%doc AUTHORS ChangeLog NEWS README Copyright TODO COPYING
%doc doc/*.html
%doc doc/*.gif
@@ -109,20 +108,22 @@ rm -fr %{buildroot}
%{_libexecdir}/gam_server
%files devel
-%defattr(-, root, root, -)
-
%{_libdir}/lib*.so
%{_includedir}/fam.h
%{_libdir}/pkgconfig/gamin.pc
%files python
-%defattr(-, root, root, -)
%{_libdir}/python*/site-packages/gamin.py*
%{_libdir}/python*/site-packages/_gamin*
%doc python/tests/*.py
%doc doc/python.html
%changelog
+* Fri Feb 1 2013 Matthias Clasen <mclasen at redhat.com> - 0.1.10-14
+- Make it work on nfs4
+- Fix the build
+- Minor spec file cleanups
+
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.1.10-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list