From 1477cb1c965f11e0f6f93ce0191ebcc1716e5b4fa58721b04c0d7b27474b03f3 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 14 Jan 2010 17:28:49 +0000 Subject: [PATCH] Accepting request 29535 from games Copy from games/gnuchess based on submit request 29535 from user coolo OBS-URL: https://build.opensuse.org/request/show/29535 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnuchess?expand=0&rev=4 --- gnuchess-5.07-fix-missing-fclose.patch | 17 ++++++++++ gnuchess.changes | 5 +++ gnuchess.spec | 46 +++----------------------- 3 files changed, 27 insertions(+), 41 deletions(-) create mode 100644 gnuchess-5.07-fix-missing-fclose.patch diff --git a/gnuchess-5.07-fix-missing-fclose.patch b/gnuchess-5.07-fix-missing-fclose.patch new file mode 100644 index 0000000..791c1d3 --- /dev/null +++ b/gnuchess-5.07-fix-missing-fclose.patch @@ -0,0 +1,17 @@ +Index: src/book.c +=================================================================== +--- src/book.c.orig ++++ src/book.c +@@ -343,9 +343,11 @@ int BookBuilderOpen(void) + } + digest_bits = MAX_DIGEST_BITS; + /* We use read_book() here only to allocate memory */ +- if (read_book(wfp) == BOOK_ENOMEM) { ++ if (read_book(rfp) == BOOK_ENOMEM) { ++ fclose(rfp); + return BOOK_ENOMEM; + } ++ fclose(rfp); + } + return BOOK_SUCCESS; + } diff --git a/gnuchess.changes b/gnuchess.changes index 5b479e0..0142fc1 100644 --- a/gnuchess.changes +++ b/gnuchess.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Oct 16 11:16:01 CEST 2009 - marek.belisko@open-nandra.com + +- Add missing fclose() and correct typo (bnc#534576) + ------------------------------------------------------------------- Sun Jun 7 12:00:28 CEST 2009 - ro@suse.de diff --git a/gnuchess.spec b/gnuchess.spec index ba2baa5..931cbdd 100644 --- a/gnuchess.spec +++ b/gnuchess.spec @@ -1,7 +1,7 @@ # # spec file for package gnuchess (Version 5.07) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,13 +21,13 @@ Name: gnuchess BuildRequires: bison flex readline-devel Url: http://www.gnu.org/software/chess/chess.html -License: GPL v2 or later +License: GPLv2+ Group: Amusements/Games/Board/Chess Provides: chess_backend Provides: gchess AutoReqProv: on Version: 5.07 -Release: 144 +Release: 145 Summary: GNU Chess Program Source: %{name}-%{version}.tar.bz2 # WARNING: Don't forget to re-generate book.dat manually before submit! @@ -38,6 +38,8 @@ Source3: genbook.sh Source4: gnuchess.6 Patch0: gnuchess-nonstatic.diff Patch1: gnuchess-getline.diff +# PATCH-FIX-OPENSUSE gnuchess-5.07-fix-missing-fclose.patch bnc#534576 +Patch2: gnuchess-5.07-fix-missing-fclose.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -92,41 +94,3 @@ rm -rf $RPM_BUILD_ROOT %doc AUTHORS COPYING ChangeLog NEWS README TODO doc %changelog -* Sun Jun 07 2009 ro@suse.de -- rename getline to my_getline to avoid conflict with function - from glibc -* Thu Nov 06 2008 ro@suse.de -- remove NoSource tag -* Fri Mar 30 2007 ro@suse.de -- added flex,bison to buildreq -* Wed Jan 25 2006 mls@suse.de -- converted neededforbuild to BuildRequires -* Tue Apr 05 2005 mmj@suse.de -- Make gcc4 happy -* Thu Aug 26 2004 sbrabec@suse.cz -- Updated to version 5.07. -- Updated book to version 1.01. -* Sun Jan 11 2004 adrian@suse.de -- add %%defattr -* Thu Aug 07 2003 sbrabec@suse.cz -- Updated to version 5.06. -* Tue Feb 11 2003 sbrabec@suse.cz -- Updated to version 5.05. -- Adapt to new gnuchess packaging scheme. -- Added new build script genbook.sh to shrink source RPM. -* Tue Feb 04 2003 sbrabec@suse.cz -- Provide chess_backend. -* Mon Aug 06 2001 dan@suse.cz -- update to 5.02 version -* Tue May 08 2001 mfabian@suse.de -- bzip2 sources -* Tue May 02 2000 vinil@suse.cz -- prefix problem fixed -* Tue Apr 11 2000 vinil@suse.cz -- buildroot added -* Thu Jan 20 2000 ro@suse.de -- man to /usr/share/man -* Wed Oct 13 1999 ro@suse.de -- update to pl80 -* Mon Sep 13 1999 bs@suse.de -- ran old prepare_spec on spec file to switch to new prepare_spec.