[gtk-gnutella/f15] update to 0.97.1
Dmitry Butskoy
buc at fedoraproject.org
Fri Dec 2 13:09:34 UTC 2011
commit 3447c336703a9a03ad8d95ddee9fc64d737616b8
Author: Dmitry Butskoy <Dmitry at Butskoy.name>
Date: Fri Dec 2 17:08:56 2011 +0400
update to 0.97.1
gtk-gnutella-0.96.9-s390.patch | 11 -------
gtk-gnutella-0.97.1-fileindex.patch | 53 +++++++++++++++++++++++++++++++++++
gtk-gnutella.spec | 21 ++++++++------
sources | 2 +-
4 files changed, 66 insertions(+), 21 deletions(-)
---
diff --git a/gtk-gnutella-0.97.1-fileindex.patch b/gtk-gnutella-0.97.1-fileindex.patch
new file mode 100644
index 0000000..d52cdd1
--- /dev/null
+++ b/gtk-gnutella-0.97.1-fileindex.patch
@@ -0,0 +1,53 @@
+diff -Nrbu gtk-gnutella-0.97.1/src/core/matching.c gtk-gnutella-0.97.1-OK/src/core/matching.c
+--- gtk-gnutella-0.97.1/src/core/matching.c 2011-09-11 18:28:24.000000000 +0400
++++ gtk-gnutella-0.97.1-OK/src/core/matching.c 2011-12-02 16:32:30.000000000 +0400
+@@ -700,6 +700,9 @@
+
+ sf = e->sf;
+
++ if (!shared_file_is_shareable(sf))
++ continue; /* Cannot be shared */
++
+ canonic_len = shared_file_name_canonic_len(sf);
+ if (canonic_len < minlen)
+ continue; /* Can't match */
+diff -Nrbu gtk-gnutella-0.97.1/src/core/share.c gtk-gnutella-0.97.1-OK/src/core/share.c
+--- gtk-gnutella-0.97.1/src/core/share.c 2011-09-11 18:28:26.000000000 +0400
++++ gtk-gnutella-0.97.1-OK/src/core/share.c 2011-12-02 16:36:47.000000000 +0400
+@@ -2460,6 +2460,25 @@
+ return NULL != sf->fi;
+ }
+
++gboolean
++shared_file_is_shareable(const shared_file_t *sf)
++{
++ shared_file_check(sf);
++
++ /*
++ * A zeroed file_index indicates we called shared_file_deindex(),
++ * most probably through shared_file_remove().
++ *
++ * We don't want to include this file in query hits even though the
++ * file entry happens to be still listed in search bins (for instance
++ * because it was removed dynamically as we discovered it was spam).
++ *
++ * Thanks to Dmitry Butskoy for investigating this corner case.
++ */
++
++ return sf->file_index != 0;
++}
++
+ filesize_t
+ shared_file_size(const shared_file_t *sf)
+ {
+diff -Nrbu gtk-gnutella-0.97.1/src/core/share.h gtk-gnutella-0.97.1-OK/src/core/share.h
+--- gtk-gnutella-0.97.1/src/core/share.h 2011-09-11 18:28:26.000000000 +0400
++++ gtk-gnutella-0.97.1-OK/src/core/share.h 2011-12-02 16:37:42.000000000 +0400
+@@ -112,6 +112,7 @@
+ gboolean sha1_hash_is_uptodate(shared_file_t *sf);
+ gboolean shared_file_is_partial(const shared_file_t *sf);
+ gboolean shared_file_is_finished(const shared_file_t *sf);
++gboolean shared_file_is_shareable(const shared_file_t *sf);
+ filesize_t shared_file_size(const shared_file_t *sf);
+ guint32 shared_file_index(const shared_file_t *sf);
+ time_t shared_file_modification_time(const shared_file_t *sf);
diff --git a/gtk-gnutella.spec b/gtk-gnutella.spec
index 6dd40cf..f7f143a 100644
--- a/gtk-gnutella.spec
+++ b/gtk-gnutella.spec
@@ -1,14 +1,13 @@
Name: gtk-gnutella
Summary: GUI based Gnutella Client
-Version: 0.96.9
-Release: 2%{?dist}
+Version: 0.97.1
+Release: 1%{?dist}
Group: Applications/Internet
License: GPLv2+
URL: http://gtk-gnutella.sourceforge.net
-Source0: http://dl.sourceforge.net/sourceforge/gtk-gnutella/gtk-gnutella-%{version}.tar.bz2
-# s390(x) has IEEE 754 floats
-Patch0: %{name}-0.96.9-s390.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Source0: http://dl.sourceforge.net/sourceforge/gtk-gnutella/gtk-gnutella-%{version}.tar.bz2
+Patch0: gtk-gnutella-0.97.1-fileindex.patch
%if 0%{!?_with_gtk1:1}
BuildRequires: gtk2-devel, libglade2-devel
@@ -17,7 +16,7 @@ BuildRequires: gtk+-devel, libglade-devel
%endif
BuildRequires: libxml2-devel, byacc, groff, gettext
-BuildRequires: gnutls-devel >= 1.0.16
+BuildRequires: gnutls-devel >= 1.0.16, dbus-devel >= 0.35.2
BuildRequires: desktop-file-utils >= 0.2.90
@@ -32,15 +31,15 @@ features.
%prep
%setup -q
-%patch0 -p1 -b .s390
+%patch0 -p1
%build
./Configure -O -Dprefix=%{_prefix} -Dbindir=%{_bindir} \
-Dglibpth="/%{_lib} %{_libdir}" \
-Dprivlib=%{_datadir}/%{name} -Dsysman=%{_mandir}/man1 \
- -Dccflags="%{optflags} -Wall" -Dcc="%{__cc}" -Doptimize=" " \
- -Dyacc="byacc" -Dgtkversion=%{?_with_gtk1:1}%{!?_with_gtk1:2} \
+ -Dccflags="%{optflags}" -Dcc="%{__cc}" -Dyacc="byacc" \
+ -Dgtkversion=%{?_with_gtk1:1}%{!?_with_gtk1:2} \
-Dofficial=true -ders
make %{?_smp_mflags}
@@ -85,6 +84,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Fri Dec 2 2011 Dmitry Butskoy <Dmitry at Butskoy.name> - 0.97.1-1
+- Upgrade to 0.97.1
+- add upstream patch for zero fileindex
+
* Tue Apr 12 2011 Dan HorĂ¡k <dan[at]danny.cz> - 0.96.9-2
- s390(x) has IEEE 754 floats
diff --git a/sources b/sources
index 5d2195c..c07edce 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-77e1a66685f563c668d4bbf69e4db0bb gtk-gnutella-0.96.9.tar.bz2
+7ded76ca9892b58b0e9314ee563e4bae gtk-gnutella-0.97.1.tar.bz2
More information about the scm-commits
mailing list