debian/0000755000000000000000000000000012244512456007173 5ustar debian/rules0000755000000000000000000000021412244511671010246 0ustar #!/usr/bin/make -f %: dh $@ --buildsystem=ruby --with ruby override_dh_clean: dh_clean rm -rf test/temp rm -f ext/bzlib* ext/BZLIB_* debian/docs0000644000000000000000000000001412244510412010027 0ustar README TODO debian/watch0000644000000000000000000000021012244510413010204 0ustar version=3 opts=dversionmangle=s/\+debian\d*$// \ http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/ferret .*/ferret-(.*).tar.gz debian/source/0000755000000000000000000000000012244510413010462 5ustar debian/source/lintian-overrides0000644000000000000000000000024112244510413014040 0ustar ruby-ferret source: duplicate-short-description libferret-ruby libferret-ruby1.8 ruby-ferret source: duplicate-long-description libferret-ruby libferret-ruby1.8 debian/source/format0000644000000000000000000000001412244510413011670 0ustar 3.0 (quilt) debian/test.rb0000644000000000000000000000172312244510413010471 0ustar # a simple test script to make sure ferret is properly installed and working require 'ferret' require 'test/unit' require 'fileutils' class FerretTest < Test::Unit::TestCase def test_should_find_docs index = Ferret::Index::Index.new index << "some text about something" index << "test about other thing" index << "another text about the same something we said first" assert_equal 2, index.search('something').hits.size end def test_should_save_persistent_index nice_languages = %w[ Ruby Python Lua ] index = Ferret::Index::Index.new(:path => 'index.tmp') nice_languages.each do |lang| index << lang end index.commit index2 = Ferret::Index::Index.new(:path => 'index.tmp') assert_equal 0, index2.search('ruby').hits.first.doc assert_equal 1, index2.search('python').hits.first.doc assert_equal 2, index2.search('lua').hits.first.doc end def teardown FileUtils.rm_rf('index.tmp') end end debian/copyright0000644000000000000000000001464112244512046011127 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: ferret Source: https://github.com/jkraemer/ferret Files: * Copyright: Copyright (c) 2005-2006 David Balmain License: Expat Files: setup.rb Copyright: Copyright (c) 2000-2005 Minero Aoki License: LGPL-2.1 Files: ext/q_parser.c Copyright: Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. License: GPL-2+ Comment: with Bison exception allows distributing in derived works under any terms, as long as the derived work is not a parser generator itself (which is not the case). Files: ext/posh.c ext/posh.c Copyright: Copyright (c) 2004, Brian Hook License: BSD-3-clause Files: ext/BZLIB_* ext/bzlib* Copyright: 1996-2010 Julian R Seward License: BSD-4-clause Files: debian/* Copyright: 2007-2011 Leandro Nunes dos Santos 2007-2011 Antonio Terceiro License: GPL-3+ License: BSD-3-clause All rights reserved. . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . * The names of this package'ss contributors contributors may not be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License: BSD-4-clause All rights reserved. . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . 2. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. . 3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. . 4. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License: Expat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. License: GPL-3+ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . . On debian systems, the full text of this license can be read in the file /usr/share/common-licenses/GPL-3. License: LGPL-2.1 This program is free software. You can distribute/modify this program under the terms of the GNU LGPL, Lesser General Public License version 2.1. . In Debian systems, you can refer to the GNU LGPL 2.1 at /usr/share/common-licenses/LGPL-2.1 debian/control0000644000000000000000000000172412244510412010570 0ustar Source: ruby-ferret Section: ruby Priority: optional Maintainer: Debian Ruby Extras Maintainers Uploaders: Antonio Terceiro , Paul van Tilburg , Leandro Nunes dos Santos , Cédric Boutillier Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.3.0~), libbz2-dev Standards-Version: 3.9.5 Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-ferret.git Vcs-Browser: http://anonscm.debian.org/gitweb?p=pkg-ruby-extras/ruby-ferret.git;a=summary Homepage: https://github.com/jkraemer/ferret XS-Ruby-Versions: all Package: ruby-ferret Architecture: any XB-Ruby-Versions: ${ruby:Versions} Depends: ruby | ruby-interpreter, ${shlibs:Depends}, ${misc:Depends} Description: full text search engine library for Ruby Ferret is a high-performance, full-featured text search engine library written for Ruby, inspired by the Java Lucene Project. debian/ferret-browser.10000644000000000000000000000175212244510412012220 0ustar .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. .TH FERRET-BROWSER "1" "September 2007" "ferret-browser 0.11.4" "User Commands" .SH NAME ferret-browser \- lets you browse Ferret indexes .SH SYNOPSIS .B ferret-browser \fI/path/to/index\fR .SH DESCRIPTION .SS "Specific Options:" .TP \fB\-h\fR, \fB\-\-host\fR HOSTNAME Host for web server to bind to (default is all IPs) .TP \fB\-p\fR, \fB\-\-port\fR NUM Port for web server (defaults to 3301) .TP \fB\-s\fR, \fB\-\-server\fR NAME Server to force (webrick). .SS "Common options:" .TP \-?, \fB\-\-help\fR Show this message .TP \fB\-v\fR, \fB\-\-version\fR Show version .SH "SEE ALSO" Ferret RDOC documentation can be found in Debian GNU/Linux systems under .B /usr/share/doc/libferret-ruby/html (provided that the libferret-ruby package is installed) .SH "ABOUT" This manual page was written by Antonio Terceiro for the Debian GNU/Lixux system, but may be used by other under the same terms as Ferret itself. debian/ruby-ferret.manpages0000644000000000000000000000003012244510412013135 0ustar debian/ferret-browser.1 debian/patches/0000755000000000000000000000000012244510412010610 5ustar debian/patches/use_system_bzlib.patch0000644000000000000000000000132312244510412015212 0ustar Description: Use system bzlib, instead of embedded one Author: Cédric Boutillier Forwarded: no Last-Update: 2012-06-14 --- a/ext/index.c +++ b/ext/index.c @@ -9,7 +9,7 @@ #ifdef USE_ZLIB # include #else -# include "bzlib.h" +# include #endif #include "internal.h" --- a/ext/extconf.rb +++ b/ext/extconf.rb @@ -7,9 +7,11 @@ require 'mkmf' $CFLAGS = " -g -Wall -fno-stack-protector -fno-common -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=500" puts $CFLAGS + have_library('bz2') create_makefile("ferret_ext") else require 'mkmf' $CFLAGS += " -Wall -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=500" + have_library('bz2') create_makefile("ferret_ext") end debian/patches/series0000644000000000000000000000017712244510412012032 0ustar disable_test_causing_segfault.patch disable_load_path_manipulation.patch use_system_bzlib.patch fix_typos_in_source_code.patch debian/patches/fix_typos_in_source_code.patch0000644000000000000000000000440512244510412016720 0ustar Description: Fix typos in source code detected by lintian endianess -> endianness; lenght -> length Author: Cédric Boutillier Last-Update: 2012-06-14 --- a/ext/compound_io.c +++ b/ext/compound_io.c @@ -332,7 +332,7 @@ len = end_ptr - start_ptr; if (len != length) { RAISE(IO_ERROR, "Difference in compound file output file offsets " - "<%"OFF_T_PFX"d> does not match the original file lenght " + "<%"OFF_T_PFX"d> does not match the original file length " "<%"OFF_T_PFX"d>", len, length); } --- a/ext/posh.c +++ b/ext/posh.c @@ -200,10 +200,10 @@ const char * s_testEndianess( void ) { - /* check endianess */ + /* check endianness */ if ( s_testBigEndian() != IS_BIG_ENDIAN ) { - return "*ERROR: POSH compile time endianess does not match run-time endianess verification. Please report this to poshlib@poshlib.org!\n"; + return "*ERROR: POSH compile time endianness does not match run-time endianness verification. Please report this to poshlib@poshlib.org!\n"; } /* make sure our endian swap routines work */ @@ -212,7 +212,7 @@ ( NATIVE16( 0x1234 ) != 0x1234 ) || ( FOREIGN16( 0x1234 ) != 0x3412 ) ) { - return "*ERROR: POSH endianess macro selection failed. Please report this to poshlib@poshlib.org!\n"; + return "*ERROR: POSH endianness macro selection failed. Please report this to poshlib@poshlib.org!\n"; } /* test serialization routines */ @@ -245,7 +245,7 @@ "floating point..."POSH_FLOAT_STRING"\n" "compiler........."POSH_COMPILER_STRING"\n"; - /* test endianess */ + /* test endianness */ err = s_testEndianess(); if ( err != 0 ) --- a/ext/posh.h +++ b/ext/posh.h @@ -633,7 +633,7 @@ /* ** ---------------------------------------------------------------------------- -** Try to infer endianess. Basically we just go through the CPUs we know are +** Try to infer endianness. Basically we just go through the CPUs we know are ** little endian, and assume anything that isn't one of those is big endian. ** As a sanity check, we also do this with operating systems we know are ** little endian, such as Windows. Some processors are bi-endian, such as debian/patches/disable_load_path_manipulation.patch0000644000000000000000000000323312244510412020030 0ustar Description: avoid overriding $LOAD_PATH The needed paths are already in $LOAD_PATH Author: Cédric Boutillier Forwarded: not-needed Last-Update: 2012-06-14 --- a/lib/ferret.rb +++ b/lib/ferret.rb @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #++ # :include: ../TUTORIAL -$: << File.expand_path(File.join(File.dirname(__FILE__), "../ext")) +#$: << File.expand_path(File.join(File.dirname(__FILE__), "../ext")) require 'ferret_ext' require 'ferret/version' require 'ferret/document' --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,11 +1,12 @@ $:.unshift File.dirname(__FILE__) -if $test_installed_gem - require 'rubygems' - require 'ferret' -else - $:.unshift File.join(File.dirname(__FILE__), '../lib') - $:.unshift File.join(File.dirname(__FILE__), '../ext') -end +#if $test_installed_gem +# require 'rubygems' +# require 'ferret' +#else +# $:.unshift File.join(File.dirname(__FILE__), '../lib') +# $:.unshift File.join(File.dirname(__FILE__), '../ext') +#end +require 'ferret' ENV['LANG'] = "en_US.UTF-8" ENV['LC_CTYPE'] = "en_US.UTF-8" --- a/bin/ferret-browser +++ b/bin/ferret-browser @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -$: << File.expand_path(File.join(File.basename(__FILE__), '../lib')) +#$: << File.expand_path(File.join(File.basename(__FILE__), '../lib')) require 'ferret' require 'ferret/browser' --- a/test/threading/thread_safety_index_test.rb +++ b/test/threading/thread_safety_index_test.rb @@ -1,4 +1,4 @@ -$:.unshift('.') +#$:.unshift('.') require 'monitor' require File.dirname(__FILE__) + "/../test_helper" require File.dirname(__FILE__) + "/number_to_spoken.rb" debian/patches/disable_test_causing_segfault.patch0000644000000000000000000000124212244510412017675 0ustar Description: Disable this test for the moment It causes segfaults with version 0.11.8.4, as it did with versions < 0.11.6 https://github.com/jkraemer/ferret/issues/2#issuecomment-5713964 Author: Cédric Boutillier Last-Update: 2012-06-14 --- a/test/unit/index/tc_index_writer.rb +++ b/test/unit/index/tc_index_writer.rb @@ -64,7 +64,7 @@ :default_field => 'content') iw << {:content => "http://" + 'x' * 255} # The following line will cause a segfault prior to 0.11.6 - iw << {:content => "http://" + 'x' * 1_000_000} +# iw << {:content => "http://" + 'x' * 1_000_000} end private debian/patches/01_add_s390_support.patch0000644000000000000000000000064312244510412015236 0ustar --- ext/posh.h.old 2008-05-19 00:00:28.023431831 -0300 +++ ext/posh.h 2008-05-18 23:40:11.315431932 -0300 @@ -511,6 +511,11 @@ # define POSH_CPU_STRING "PA-RISC" #endif +#if defined __s390__ +# define POSH_CPU_S390 1 +# define POSH_CPU_STRING "S/390" +#endif + #if !defined POSH_CPU_STRING # error POSH cannot determine target CPU # define POSH_CPU_STRING "Unknown" /* this is here for Doxygen's benefit */ debian/compat0000644000000000000000000000000212244510412010357 0ustar 7 debian/changelog0000644000000000000000000000745412244512456011057 0ustar ruby-ferret (0.11.8.5-1) unstable; urgency=low * Imported Upstream version 0.11.8.5 * debian/control: + remove obsolete DM-Upload-Allowed flag + use canonical URI in Vcs-* fields + update my email address + bump Standards-Version to 3.9.5 (no changes needed) + drop transitional packages * Remove single-debian-patch option * Drop fix_compatibility_with_minitest.patch and block_variables_have_local_scopes.patch (applied upstream) * Remove indications that the source has been repacked (not true anymore) * Remove embedded copy of bzlib when cleaning instead of repacking * Add copyright notice for the embedded copy of bzlib * Install RELEASE_NOTES as documentation -- Cédric Boutillier Mon, 25 Nov 2013 01:09:16 +0100 ruby-ferret (0.11.8.4+debian-2) unstable; urgency=low * Bump build dependency on gem2deb to >= 0.3.0~ -- Cédric Boutillier Tue, 26 Jun 2012 09:58:52 +0200 ruby-ferret (0.11.8.4+debian-1) unstable; urgency=low * New upstream version from a new source + the new code fixes format security issues (Closes: #672069) + change homepage to https://github.com/jkraemer/ferret/ * Build for all Ruby versions (Closes: #655636) + change depends accordingly + do not set shebang of bin/ferret to ruby1.8 * Repack source to remove convenience copy of bzlib + build-dep on libbz2-dev + dversionmangle in debian/watch + add debian/README.source explaining how to clean the source * debian/patches: + disable_load_path_manipulation.patch: do not override $LOAD_PATH + disable_test_causing_segfault.patch: temporarily disable a test known to cause segfaults + fix_compatibility_with_minitest.patch: fix a failing test with Ruby1.9 + use_system_bzlib.patch: adapt the source to use system libbz2 + fix_typos_in_source_code.patch: correct some spelling errors in the source code + block_variables_have_local_scopes.patch: fix syntax in bin/ferret-browser * Override dh_auto_clean to remove test/temp when cleaning * Bump Standards-Version to 3.9.3 (no changes needed) * Set priority of transitional packages to extra * Add myself to Uploaders: * Update copyright to DEP-5 copyright-format/1.0 * Add TUTORIAL and debian/README.source to documents * Override lintian warnings about duplicate descriptions of transitional packages -- Cédric Boutillier Thu, 14 Jun 2012 23:04:48 +0200 ruby-ferret (0.11.6-3) unstable; urgency=low * Rename package to ruby-ferret and migrate to gem2deb. * Moved source to pkg-ruby-extras git repos, Vcs-* fields adjusted accordingly. * debian/copyright rewriten in DEP-5 format and more complete -- Antonio Terceiro Thu, 28 Jul 2011 00:02:49 -0700 libferret-ruby (0.11.6-2) unstable; urgency=low [ Antonio Terceiro ] * debian/control: swapping me and Leandro as Maintainer/Uploader. * debian/rules: using CDBS's simple-patchsys. * debian/patches/01_add_s390_support.patch: adding definition for S/390 systems (Closes: #474724). [ Paul van Tilburg ] * Changed section of libferret-ruby{,1.8} to libs. * Removed depend of libferret-ruby on ruby1.8, only ruby1.8 is needed. -- Paul van Tilburg Sun, 01 Jun 2008 14:00:19 +0200 libferret-ruby (0.11.6-1) unstable; urgency=low [ Leandro Nunes dos Santos ] * Initial release (Closes: #439847) [ Antonio Terceiro ] * Adjusting Leandro's initial packaging to pkg-ruby-extras team policies and practices. [ Paul van Tilburg ] * Added Vcs-* fields to debian/control. * Added copyright notice for setup.rb contained in the upstream tarball. * Added myself to the Uploaders field in debian/control. -- Paul van Tilburg Mon, 31 Mar 2008 23:26:24 +0200 debian/ruby-ferret.docs0000644000000000000000000000003612244510412012300 0ustar README TUTORIAL RELEASE_NOTES debian/ruby-tests.rb0000644000000000000000000000011412244510412011623 0ustar require 'test/unit' Dir.glob("test/unit/t[cs]*.rb").each { |f| require f }