[med-svn] r20070 - in trunk/packages/ffindex/trunk/debian: . patches

Andreas Tille tille at moszumanska.debian.org
Mon Sep 14 17:37:35 UTC 2015


Author: tille
Date: 2015-09-14 17:37:35 +0000 (Mon, 14 Sep 2015)
New Revision: 20070

Added:
   trunk/packages/ffindex/trunk/debian/patches/Makefile.patch
   trunk/packages/ffindex/trunk/debian/patches/basename.patch
Removed:
   trunk/packages/ffindex/trunk/debian/libffindex0.symbols
   trunk/packages/ffindex/trunk/debian/patches/Makefile
   trunk/packages/ffindex/trunk/debian/patches/basename
   trunk/packages/ffindex/trunk/debian/patches/clang.patch
Modified:
   trunk/packages/ffindex/trunk/debian/changelog
   trunk/packages/ffindex/trunk/debian/patches/series
Log:
New upstream version, remove symbols file


Modified: trunk/packages/ffindex/trunk/debian/changelog
===================================================================
--- trunk/packages/ffindex/trunk/debian/changelog	2015-09-13 20:28:57 UTC (rev 20069)
+++ trunk/packages/ffindex/trunk/debian/changelog	2015-09-14 17:37:35 UTC (rev 20070)
@@ -1,3 +1,10 @@
+ffindex (0.9.9.6-1) UNRELEASED; urgency=medium
+
+  * New upstream version
+  * Remove symbols file
+
+ -- Andreas Tille <tille at debian.org>  Mon, 14 Sep 2015 15:09:02 +0200
+
 ffindex (0.9.9.3-2) unstable; urgency=medium
 
   * Build with clang (thanks for the patch to Alexander <sanek23994 at gmail.com>)

Deleted: trunk/packages/ffindex/trunk/debian/libffindex0.symbols
===================================================================
--- trunk/packages/ffindex/trunk/debian/libffindex0.symbols	2015-09-13 20:28:57 UTC (rev 20069)
+++ trunk/packages/ffindex/trunk/debian/libffindex0.symbols	2015-09-14 17:37:35 UTC (rev 20070)
@@ -1,32 +0,0 @@
-libffindex.so.0 libffindex0 #MINVER#
- fferror_print at Base 0.9.8
- ffindex_bsearch_get_entry at Base 0.9.8
- ffindex_copyright at Base 0.9.8
- ffindex_copyright_text at Base 0.9.8
- ffindex_fopen_by_entry at Base 0.9.8
- ffindex_fopen_by_name at Base 0.9.8
- ffindex_get_data_by_entry at Base 0.9.8
- ffindex_get_data_by_index at Base 0.9.8
- ffindex_get_data_by_name at Base 0.9.8
- ffindex_get_data_by_offset at Base 0.9.8
- ffindex_get_entry_by_index at Base 0.9.8
- ffindex_get_entry_by_name at Base 0.9.9
- ffindex_index_as_tree at Base 0.9.8
- ffindex_index_open at Base 0.9.9.3
- ffindex_index_parse at Base 0.9.8
- ffindex_insert_dir at Base 0.9.8
- ffindex_insert_ffindex at Base 0.9.9.3
- ffindex_insert_file at Base 0.9.8
- ffindex_insert_filestream at Base 0.9.8
- ffindex_insert_list_file at Base 0.9.8
- ffindex_insert_memory at Base 0.9.8
- ffindex_mmap_data at Base 0.9.8
- ffindex_restore at Base 0.9.8
- ffindex_sort_index_file at Base 0.9.8
- ffindex_tree_get_entry at Base 0.9.8
- ffindex_tree_unlink at Base 0.9.8
- ffindex_tree_write at Base 0.9.8
- ffindex_unlink at Base 0.9.8
- ffindex_unlink_entries at Base 0.9.8
- ffindex_write at Base 0.9.8
- ffnchomp at Base 0.9.8

Deleted: trunk/packages/ffindex/trunk/debian/patches/Makefile
===================================================================
--- trunk/packages/ffindex/trunk/debian/patches/Makefile	2015-09-13 20:28:57 UTC (rev 20069)
+++ trunk/packages/ffindex/trunk/debian/patches/Makefile	2015-09-14 17:37:35 UTC (rev 20070)
@@ -1,87 +0,0 @@
-From: Laszlo Kajan <lkajan at rostlab.org>
-Subject: Makefile fixes
-  * make Makefile DESTDIR-aware
-  * other changes to allow help2man to work better.
-  * deinstall -> uninstall
-  .
-  Upstream is aware but not interested in DESTDIR.
-Forwarded: yes
-
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -1,15 +1,19 @@
--INSTALL_DIR?=..
--libdir=`([ -d /usr/lib64 ] && echo lib64) || echo lib`
-+PREFIX?=/usr
-+INSTALL_DIR=$(DESTDIR)$(PREFIX)
-+libdir=lib
- LANG=C
--CC=gcc -fopenmp
--#CC=icc -openmp
-+CC=gcc
- CFLAGS+=-std=c99 -O2 -g -fPIC -Wall -pedantic -D_GNU_SOURCE=1
--LDFLAGS=-lffindex -L.
-+SOCURRENT=2
-+SOREVISION=0
-+SOAGE=2
-+SOVERSION=$(SOCURRENT).$(SOREVISION).$(SOAGE)
-+SOMAJORV=$(shell echo $$(( $(SOCURRENT)-$(SOAGE) )) )
- ifdef FFINDEX_STATIC
- 	LDFLAGS+=-static
- 	FFINDEX_OBJECTS=libffindex.a
- else
--	FFINDEX_OBJECTS=libffindex.so libffindex.so.0.1 
-+	FFINDEX_OBJECTS=libffindex.so libffindex.so.$(SOVERSION)
- endif
- 
- #-Wl,--version-script=libffindex.map
-@@ -47,16 +51,17 @@
- ffindex_unpack: $(FFINDEX_OBJECTS) ffindex_unpack.o ffindex.h
- 	$(CC) -o $@ ffindex_unpack.o $(LDFLAGS) -L. -lffindex
- 
--libffindex.so.0.1: ffindex.o ffutil.o
--	$(CC) -Wl,-z,defs -shared -Wl,-soname,libffindex.so.0.1 -o libffindex.so.0.1 ffindex.o ffutil.o -lc
-+libffindex.so.$(SOVERSION): ffindex.o ffutil.o
-+	$(CC) $(LDFLAGS) -Wl,-z,defstack -shared -Wl,-soname,libffindex.so.$(SOMAJORV) -o libffindex.so.$(SOVERSION) ffindex.o ffutil.o -lc
- 
--libffindex.so: libffindex.so.0.1
--	ln -sf libffindex.so.0.1 libffindex.so
-+libffindex.so: libffindex.so.$(SOVERSION)
-+	ln -sf libffindex.so.$(SOVERSION) libffindex.so.$(SOMAJORV)
-+	ln -sf libffindex.so.$(SOVERSION) libffindex.so
- 
- libffindex.a: ffindex.o ffutil.o
- 	ar rcs libffindex.a ffutil.o ffindex.o 
- 
--test:
-+check:
- 	rm -f /tmp/test.data /tmp/test.ffindex
- 	LD_LIBRARY_PATH=".:$(LD_LIBRARY_PATH)" ./ffindex_build -s /tmp/test.data /tmp/test.ffindex ../test/data ../test/data2
- 	LD_LIBRARY_PATH=".:$(LD_LIBRARY_PATH)" ./ffindex_get  /tmp/test.data /tmp/test.ffindex a b foo | tee /tmp/test.out
-@@ -76,8 +81,11 @@
- 	LD_LIBRARY_PATH=".:$(LD_LIBRARY_PATH)" zsh -c "time ./ffindex_get  ../test_big/nr20_11Jan10_a3m_db ../test_big/nr20_11Jan10_a3m_db.ffindex BABBAMIBA.a3m KARDUZEBA.a3m HARPAQIBA.a3m WOQQATEBA.a3m BEBRAQIBA.a3m GIRSAKEBA.a3m NAQTIFIBA.a3m BIWCIQABA.a3m > /dev/null"
- 
- clean:
--	rm -f ffindex.o ffutil.o ffindex_build ffindex_build.o ffindex_get ffindex_get.o libffindex.so libffindex.so.0.1 ffindex_modify ffindex_modify.o \
--		libffindex.a  ffindex_from_fasta.o ffindex_from_fasta ffindex_apply_mpi.o ffindex_apply.o
-+	rm -f ffindex.o ffutil.o ffindex_build ffindex_build.o ffindex_get ffindex_get.o libffindex.so libffindex.so.$(SOMAJORV)* libffindex.so.$(SOCURRENT)* ffindex_modify ffindex_modify.o \
-+		libffindex.a  ffindex_from_fasta.o ffindex_from_fasta ffindex_apply_mpi.o ffindex_apply.o \
-+		$(OBJECTS) $(OBJECTS:%=%.o)
-+
-+distclean: clean
- 
- install:
- 	mkdir -p $(INSTALL_DIR)/bin
-@@ -89,9 +97,10 @@
- 	install ffindex_from_fasta $(INSTALL_DIR)/bin/ffindex_from_fasta
- 	install ffindex_apply $(INSTALL_DIR)/bin/ffindex_apply
- 	install ffindex_unpack $(INSTALL_DIR)/bin/ffindex_unpack
--	install libffindex.so.0.1 $(INSTALL_DIR)/$(libdir)/libffindex.so.0.1
-+	install libffindex.so.$(SOVERSION) $(INSTALL_DIR)/$(libdir)/libffindex.so.$(SOVERSION)
- 	install libffindex.a $(INSTALL_DIR)/$(libdir)/libffindex.a
--	ln -sf libffindex.so.0.1 $(INSTALL_DIR)/$(libdir)/libffindex.so
-+	ln -sf libffindex.so.$(SOVERSION) $(INSTALL_DIR)/$(libdir)/libffindex.so.$(SOMAJORV)
-+	ln -sf libffindex.so.$(SOVERSION) $(INSTALL_DIR)/$(libdir)/libffindex.so
- 	install ffindex.h $(INSTALL_DIR)/include/ffindex.h
- 	install ffutil.h $(INSTALL_DIR)/include/ffutil.h
- ifdef HAVE_MPI

Added: trunk/packages/ffindex/trunk/debian/patches/Makefile.patch
===================================================================
--- trunk/packages/ffindex/trunk/debian/patches/Makefile.patch	                        (rev 0)
+++ trunk/packages/ffindex/trunk/debian/patches/Makefile.patch	2015-09-14 17:37:35 UTC (rev 20070)
@@ -0,0 +1,115 @@
+From: Laszlo Kajan <lkajan at rostlab.org>
+Subject: Makefile fixes
+  * make Makefile DESTDIR-aware
+  * other changes to allow help2man to work better.
+  * deinstall -> uninstall
+  .
+  Upstream is aware but not interested in DESTDIR.
+Forwarded: yes
+
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -1,5 +1,6 @@
+-INSTALL_DIR?=..
+-libdir=`([ -d /usr/lib64 ] && echo lib64) || echo lib`
++PREFIX?=/usr
++INSTALL_DIR=$(DESTDIR)$(PREFIX)
++libdir=lib
+ LANG=C
+ #CC=musl-gcc
+ #OMPI_CC=musl-gcc
+@@ -7,7 +8,11 @@ CC=gcc
+ #CC=icc
+ #CC=clang
+ CFLAGS+=-std=c99 -O2 -g -fPIC -Wall -pedantic -D_GNU_SOURCE=1 -I.
+-LDFLAGS=-lffindex -L.
++SOCURRENT=2
++SOREVISION=0
++SOAGE=2
++SOVERSION=$(SOCURRENT).$(SOREVISION).$(SOAGE)
++SOMAJORV=$(shell echo $$(( $(SOCURRENT)-$(SOAGE) )) )
+ 
+ OS:= $(shell uname)
+ 
+@@ -15,7 +20,7 @@ ifdef FFINDEX_STATIC
+ 	LDFLAGS+=-static
+ 	FFINDEX_OBJECTS=libffindex.a
+ else
+-	FFINDEX_OBJECTS=libffindex.so libffindex.so.0.1 
++	FFINDEX_OBJECTS=libffindex.so libffindex.so.$(SOVERSION)
+ endif
+ 
+ OBJECTS=ffindex_apply ffindex_from_fasta ffindex_get ffindex_build ffindex_modify libffindex.a libffindex.so ffindex_unpack ffindex_from_tsv
+@@ -35,7 +40,7 @@ ffindex_apply.o: ffindex_apply_mpi.c ffi
+ 	$(CC) $(CFLAGS) -c ffindex_apply_mpi.c -o $@ 
+ 
+ ffindex_apply: $(FFINDEX_OBJECTS) ffindex_apply.o ffindex.h
+-	$(CC) $(CFLAGS) -o $@  ffindex_apply.o $(LDFLAGS)
++	$(CC) $(CFLAGS) -o $@  ffindex_apply.o $(LDFLAGS) -L. -lffindex
+ 
+ ffindex_apply_mpi: $(FFINDEX_OBJECTS) ffindex_apply_mpi.o ffindex.h
+ 	mpicc $(CFLAGS) -DHAVE_MPI -o $@  ffindex_apply_mpi.o $(LDFLAGS)
+@@ -68,20 +73,20 @@ ffindex_unpack: $(FFINDEX_OBJECTS) ffind
+ 	$(CC) -o $@ ffindex_unpack.o $(LDFLAGS) -L. -lffindex
+ 
+ ifeq ($(OS), Darwin)
+-libffindex.so.0.1: ffindex.o ffutil.o ffindex_posix_search.o ext/fmemopen.o
+-		$(CC) -shared -o libffindex.so.0.1 $^
++libffindex.so.$(SOVERSION): ffindex.o ffutil.o ffindex_posix_search.o ext/fmemopen.o
++		$(CC) -shared -o libffindex.so.$(SOVERSION) $^
+ else
+-libffindex.so.0.1: ffindex.o ffutil.o ffindex_posix_search.o
+-		$(CC) -Wl,-z,defs -Wl,-soname,libffindex.so.0.1 -shared -o libffindex.so.0.1 $^
++libffindex.so.$(SOVERSION): ffindex.o ffutil.o ffindex_posix_search.o
++		$(CC) $(LDFLAGS) -Wl,-z,defstack -Wl,-soname,libffindex.so.$(SOVERSION) -shared -o libffindex.so.$(SOVERSION) $^
+ endif
+ 
+-libffindex.so: libffindex.so.0.1
+-	ln -sf libffindex.so.0.1 libffindex.so
++libffindex.so: libffindex.so.$(SOVERSION)
++	ln -sf libffindex.so.$(SOVERSION) libffindex.so
+ 
+ libffindex.a: ffindex.o ffutil.o ffindex_posix_search.o
+ 	ar rcs libffindex.a $^
+ 
+-test:
++check:
+ 	rm -f /tmp/test.data /tmp/test.ffindex
+ 	LD_LIBRARY_PATH=".:$(LD_LIBRARY_PATH)" ./ffindex_build -s /tmp/test.data /tmp/test.ffindex ../test/data ../test/data2
+ 	LD_LIBRARY_PATH=".:$(LD_LIBRARY_PATH)" ./ffindex_get  /tmp/test.data /tmp/test.ffindex a b foo | tee /tmp/test.out
+@@ -101,10 +106,11 @@ time:
+ 	LD_LIBRARY_PATH=".:$(LD_LIBRARY_PATH)" zsh -c "time ./ffindex_get  ../test_big/nr20_11Jan10_a3m_db ../test_big/nr20_11Jan10_a3m_db.ffindex BABBAMIBA.a3m KARDUZEBA.a3m HARPAQIBA.a3m WOQQATEBA.a3m BEBRAQIBA.a3m GIRSAKEBA.a3m NAQTIFIBA.a3m BIWCIQABA.a3m > /dev/null"
+ 
+ clean:
+-	rm -f ffindex.o ffutil.o ffindex_build ffindex_build.o ffindex_get ffindex_get.o libffindex.so libffindex.so.0.1 \
++	rm -f ffindex.o ffutil.o ffindex_build ffindex_build.o ffindex_get ffindex_get.o libffindex.so libffindex.so.$(SOVERSION) \
+ 		ffindex_modify ffindex_modify.o libffindex.a  ffindex_from_fasta.o ffindex_from_fasta ffindex_apply_mpi.o \
+ 		ffindex_apply.o ffindex_apply ffindex_from_tsv ffindex_khget ffindex_unpack ffindex_from_tsv.o ffindex_unpack.o \
+-		ffindex_posix_search.o
++		ffindex_posix_search.o \
++		$(OBJECTS) $(OBJECTS:%=%.o)
+ 
+ install:
+ 	mkdir -p $(INSTALL_DIR)/bin
+@@ -116,9 +122,10 @@ install:
+ 	install ffindex_from_fasta $(INSTALL_DIR)/bin/ffindex_from_fasta
+ 	install ffindex_apply $(INSTALL_DIR)/bin/ffindex_apply
+ 	install ffindex_unpack $(INSTALL_DIR)/bin/ffindex_unpack
+-	install libffindex.so.0.1 $(INSTALL_DIR)/$(libdir)/libffindex.so.0.1
++	install libffindex.so.$(SOVERSION) $(INSTALL_DIR)/$(libdir)/libffindex.so.$(SOVERSION)
+ 	install libffindex.a $(INSTALL_DIR)/$(libdir)/libffindex.a
+-	ln -sf libffindex.so.0.1 $(INSTALL_DIR)/$(libdir)/libffindex.so
++	ln -sf libffindex.so.$(SOVERSION) $(INSTALL_DIR)/$(libdir)/libffindex.so.$(SOMAJORV)
++	ln -sf libffindex.so.$(SOVERSION) $(INSTALL_DIR)/$(libdir)/libffindex.so
+ 	install ffindex.h $(INSTALL_DIR)/include/ffindex.h
+ 	install ffutil.h $(INSTALL_DIR)/include/ffutil.h
+ ifdef HAVE_MPI
+@@ -127,7 +134,7 @@ endif
+ 
+ deinstall:
+ 	rm -f $(INSTALL_DIR)/bin/ffindex_get $(INSTALL_DIR)/bin/ffindex_build $(INSTALL_DIR)/bin/ffindex_modify \
+-		$(INSTALL_DIR)/$(libdir)/libffindex.so.0.1 $(INSTALL_DIR)/$(libdir)/libffindex.a \
++		$(INSTALL_DIR)/$(libdir)/libffindex.so.$(SOVERSION) $(INSTALL_DIR)/$(libdir)/libffindex.a \
+ 		$(INSTALL_DIR)/$(libdir)/libffindex.so $(INSTALL_DIR)/include/ffindex.h $(INSTALL_DIR)/include/ffutil.h\
+ 		$(INSTALL_DIR)/bin/ffindex_from_fasta
+ 	rmdir $(INSTALL_DIR)/bin || true

Deleted: trunk/packages/ffindex/trunk/debian/patches/basename
===================================================================
--- trunk/packages/ffindex/trunk/debian/patches/basename	2015-09-13 20:28:57 UTC (rev 20069)
+++ trunk/packages/ffindex/trunk/debian/patches/basename	2015-09-14 17:37:35 UTC (rev 20070)
@@ -1,151 +0,0 @@
-Author: Laszlo Kajan <lkajan at rostlab.org>
-Author: Elso Andras <elso.andras at gmail.com>
-Subject: 40000000 bug and basename
- [Laszlo Kajan]
- The default value 40000000 for FFINDEX_MAX_INDEX_ENTRIES_DEFAULT is too high for a machine with 2G (or less) RAM.
- Bug fixed by introducing an environment variable FFINDEX_MAX_INDEX_ENTRIES to control the value.
- [Elso Andras]
- using basename for usage print, this helps help2man if a packager is using it
-Forwarded: yes
-
---- a/src/ffindex_apply.c
-+++ b/src/ffindex_apply.c
-@@ -34,8 +34,10 @@
-   if(argn < 4)
-   {
-     fprintf(stderr, "USAGE: %s DATA_FILENAME INDEX_FILENAME PROGRAM [PROGRAM_ARGS]*\n"
-+                    "ENVIRONMENT\n"
-+                    "\tFFINDEX_MAX_INDEX_ENTRIES - allocate memory for this number of entries\n"
-                     FFINDEX_COPYRIGHT,
--                    argv[0]);
-+                    basename(argv[0]));
-     return -1;
-   }
-   char *data_filename  = argv[1];
---- a/src/ffindex_apply_mpi.c
-+++ b/src/ffindex_apply_mpi.c
-@@ -207,7 +207,7 @@
-                     "\t-d\tFFDATA output file, stdout of program will be captured\n"
-                     "\t-i\tFFINDEX output file, entries get the same name as input entry\n"
-                     FFINDEX_COPYRIGHT,
--                    argv[0]);
-+                    basename(argv[0]));
-     errno = EINVAL;
-     goto EXCEPTION;
-   }
---- a/src/ffindex_build.c
-+++ b/src/ffindex_build.c
-@@ -40,6 +40,8 @@
-                     "\t-s\t\tsort index file, so that the index can queried.\n"
-                     "\t\t\tAnother append operations can be done without sorting.\n"
-                     "\t-v\t\tprint version and other info then exit\n"
-+                    "ENVIRONMENT\n"
-+                    "\tFFINDEX_MAX_INDEX_ENTRIES - allocate memory for this number of entries\n"
-                     "\nEXAMPLES:\n"
-                     "\tCreate a new ffindex containing all files from the \"bar/\" directory containing\n"
-                     "\tsay myfile1.txt, myfile2.txt and sort (-s) it so that e.g. ffindex_get can use it.\n"
-@@ -52,7 +54,7 @@
-                     "\tMaximum key/filename length is %d and maximum entries are by default %d\n"
-                     "\tThis can be changed in the sources.\n"
-                     FFINDEX_COPYRIGHT,
--                    program_name, MAX_FILENAME_LIST_FILES, FFINDEX_MAX_ENTRY_NAME_LENTH, FFINDEX_MAX_INDEX_ENTRIES_DEFAULT);
-+                    basename(program_name), MAX_FILENAME_LIST_FILES, FFINDEX_MAX_ENTRY_NAME_LENTH, FFINDEX_MAX_INDEX_ENTRIES_DEFAULT);
- }
- 
- int main(int argn, char **argv)
---- a/src/ffindex_from_fasta.c
-+++ b/src/ffindex_from_fasta.c
-@@ -33,8 +33,10 @@
- {
-     fprintf(stderr, "USAGE: %s -v | [-s] data_filename index_filename fasta_filename\n"
-                     "\t-s\tsort index file\n"
-+                    "ENVIRONMENT\n"
-+                    "\tFFINDEX_MAX_INDEX_ENTRIES - allocate memory for this number of entries\n"
-                     FFINDEX_COPYRIGHT,
--                    program_name);
-+                    basename(program_name));
- }
- 
- int main(int argn, char **argv)
-@@ -123,4 +125,4 @@
-   return err;
- }
- 
--/* vim: ts=2 sw=2 et: */
-+// vim: ts=2 sw=2 et:
---- a/src/ffindex_get.c
-+++ b/src/ffindex_get.c
-@@ -26,8 +26,10 @@
- {
-     fprintf(stderr, "USAGE: %s data_filename index_filename entry name(s)\n"
-                     "-n\tuse index of entry instead of entry name\n"
-+                    "ENVIRONMENT\n"
-+                    "\tFFINDEX_MAX_INDEX_ENTRIES - allocate memory for this number of entries\n"
-                     FFINDEX_COPYRIGHT,
--                    program_name);
-+                    basename(program_name));
- }
- 
- int main(int argn, char **argv)
---- a/src/ffindex_modify.c
-+++ b/src/ffindex_modify.c
-@@ -41,7 +41,7 @@
-                     "\tTo clean up the data file after unlinking insert it to an new one:\n"
-                     "\tffindex_build -as cleaned.ffdata cleaned.ffindex -d foo.ffdata -i foo.ffindex\n"
-                     FFINDEX_COPYRIGHT,
--                    program_name, MAX_FILENAME_LIST_FILES, program_name);
-+                    basename(program_name), MAX_FILENAME_LIST_FILES, program_name);
- }
- 
- int main(int argn, char **argv)
-@@ -128,7 +128,7 @@
-     }
-     else // unused
-     {
--      char** sorted_names_to_unlink = malloc(FFINDEX_MAX_INDEX_ENTRIES_DEFAULT * sizeof(char *));
-+      char** sorted_names_to_unlink = malloc(ffindex_max_index_entries() * sizeof(char *));
-       if(sorted_names_to_unlink == NULL)
-         fferror_print(__FILE__, __LINE__, __func__, "malloc failed");
-       /* For each list_file unlink all entries */
---- a/src/ffindex_unpack.c
-+++ b/src/ffindex_unpack.c
-@@ -35,7 +35,7 @@
-   {
-     fprintf(stderr, "USAGE: %s DATA_FILENAME INDEX_FILENAME OUT_DIR\n"
-                     FFINDEX_COPYRIGHT,
--                    argv[0]);
-+                    basename(argv[0]));
-     return -1;
-   }
-   char *data_filename  = argv[1];
---- a/src/ffindex.c
-+++ b/src/ffindex.c
-@@ -284,7 +284,7 @@
- ffindex_index_t* ffindex_index_parse(FILE *index_file, size_t num_max_entries)
- {
-   if(num_max_entries == 0)
--    num_max_entries = FFINDEX_MAX_INDEX_ENTRIES_DEFAULT;
-+    num_max_entries = ffindex_max_index_entries();
-   size_t nbytes = sizeof(ffindex_index_t) + (sizeof(ffindex_entry_t) * num_max_entries);
-   ffindex_index_t *index = (ffindex_index_t *)malloc(nbytes);
-   if(index == NULL)
---- a/src/ffindex.h
-+++ b/src/ffindex.h
-@@ -24,6 +24,8 @@
- #define FFINDEX_VERSION 0.993
- #define FFINDEX_COPYRIGHT "\nDesigned and implemented by Andreas Hauser <andy at splashground.de>.\n"
- 
-+// lkajan: the below makes a default allocation over 2G. malloc in ffindex.c:225 fails on a machine with 'only' 2G of RAM.
-+// lkajan: let the default remain 80000000, and let the actual value be controlled by the env var FFINDEX_MAX_INDEX_ENTRIES wherever FFINDEX_MAX_INDEX_ENTRIES_DEFAULT is used.
- #define FFINDEX_MAX_INDEX_ENTRIES_DEFAULT 80000000
- #define FFINDEX_MAX_ENTRY_NAME_LENTH 63
- 
-@@ -51,6 +53,8 @@
- int ffindex_index_open(char *data_filename, char *index_filename, char* mode, FILE **out_data_file, FILE **out_index_file, size_t *out_offset);
- 
- 
-+inline size_t ffindex_max_index_entries(){ char *FMIE = getenv("FFINDEX_MAX_INDEX_ENTRIES"); if( FMIE ) { return atol( FMIE ); } else { return FFINDEX_MAX_INDEX_ENTRIES_DEFAULT; } }
-+
- int ffindex_insert_memory(FILE *data_file, FILE *index_file, size_t *offset, char *from_start, size_t from_length, char *name);
- 
- int ffindex_insert_file(FILE *data_file, FILE *index_file, size_t *offset, const char *path, char *name);

Added: trunk/packages/ffindex/trunk/debian/patches/basename.patch
===================================================================
--- trunk/packages/ffindex/trunk/debian/patches/basename.patch	                        (rev 0)
+++ trunk/packages/ffindex/trunk/debian/patches/basename.patch	2015-09-14 17:37:35 UTC (rev 20070)
@@ -0,0 +1,130 @@
+Author: Laszlo Kajan <lkajan at rostlab.org>
+Author: Elso Andras <elso.andras at gmail.com>
+Subject: 40000000 bug and basename
+ [Laszlo Kajan]
+ The default value 40000000 for FFINDEX_MAX_INDEX_ENTRIES_DEFAULT is too high for a machine with 2G (or less) RAM.
+ Bug fixed by introducing an environment variable FFINDEX_MAX_INDEX_ENTRIES to control the value.
+ [Elso Andras]
+ using basename for usage print, this helps help2man if a packager is using it
+Forwarded: yes
+
+--- a/src/ffindex_build.c
++++ b/src/ffindex_build.c
+@@ -40,6 +40,8 @@ void usage(char *program_name)
+                     "\t-s\t\tsort index file, so that the index can queried.\n"
+                     "\t\t\tAnother append operations can be done without sorting.\n"
+                     "\t-v\t\tprint version and other info then exit\n"
++                    "ENVIRONMENT\n"
++                    "\tFFINDEX_MAX_INDEX_ENTRIES - allocate memory for this number of entries\n"
+                     "\nEXAMPLES:\n"
+                     "\tCreate a new ffindex containing all files from the \"bar/\" directory containing\n"
+                     "\tsay myfile1.txt, myfile2.txt and sort (-s) it so that e.g. ffindex_get can use it.\n"
+@@ -52,7 +54,7 @@ void usage(char *program_name)
+                     "\tMaximum key/filename length is %d and maximum entries are by default %d\n"
+                     "\tThis can be changed in the sources.\n"
+                     FFINDEX_COPYRIGHT,
+-                    program_name, MAX_FILENAME_LIST_FILES, FFINDEX_MAX_ENTRY_NAME_LENTH, FFINDEX_MAX_INDEX_ENTRIES_DEFAULT);
++                    basename(program_name), MAX_FILENAME_LIST_FILES, FFINDEX_MAX_ENTRY_NAME_LENTH, FFINDEX_MAX_INDEX_ENTRIES_DEFAULT);
+ }
+ 
+ int main(int argn, char **argv)
+--- a/src/ffindex_from_fasta.c
++++ b/src/ffindex_from_fasta.c
+@@ -33,8 +33,10 @@ void usage(char *program_name)
+ {
+     fprintf(stderr, "USAGE: %s -v | [-s] data_filename index_filename fasta_filename\n"
+                     "\t-s\tsort index file\n"
++                    "ENVIRONMENT\n"
++                    "\tFFINDEX_MAX_INDEX_ENTRIES - allocate memory for this number of entries\n"
+                     FFINDEX_COPYRIGHT,
+-                    program_name);
++                    basename(program_name));
+ }
+ 
+ int main(int argn, char **argv)
+@@ -123,4 +125,4 @@ int main(int argn, char **argv)
+   return err;
+ }
+ 
+-/* vim: ts=2 sw=2 et: */
++// vim: ts=2 sw=2 et:
+--- a/src/ffindex_unpack.c
++++ b/src/ffindex_unpack.c
+@@ -37,7 +37,7 @@ int main(int argn, char **argv)
+     fprintf(stderr, "USAGE: %s DATA_FILENAME INDEX_FILENAME OUT_DIR\n"
+                     "\n\tPlease note that a huge number of files might be created!\n"
+                     FFINDEX_COPYRIGHT,
+-                    argv[0]);
++                    basename(argv[0]));
+     return -1;
+   }
+   char *data_filename  = argv[1];
+--- a/src/ffindex.c
++++ b/src/ffindex.c
+@@ -307,7 +307,7 @@ ffindex_entry_t* ffindex_bsearch_get_ent
+ ffindex_index_t* ffindex_index_parse(FILE *index_file, size_t num_max_entries)
+ {
+   if(num_max_entries == 0)
+-    num_max_entries = FFINDEX_MAX_INDEX_ENTRIES_DEFAULT;
++    num_max_entries = ffindex_max_index_entries();
+   size_t nbytes = sizeof(ffindex_index_t) + (sizeof(ffindex_entry_t) * num_max_entries);
+   ffindex_index_t *index = (ffindex_index_t *)malloc(nbytes);
+   if(index == NULL)
+--- a/src/ffindex.h
++++ b/src/ffindex.h
+@@ -24,6 +24,8 @@
+ #define FFINDEX_VERSION 0.996
+ #define FFINDEX_COPYRIGHT "\nDesigned and implemented by Andreas Hauser <andy at splashground.de>.\n"
+ 
++// lkajan: the below makes a default allocation over 2G. malloc in ffindex.c:225 fails on a machine with 'only' 2G of RAM.
++// lkajan: let the default remain 80000000, and let the actual value be controlled by the env var FFINDEX_MAX_INDEX_ENTRIES wherever FFINDEX_MAX_INDEX_ENTRIES_DEFAULT is used.
+ #define FFINDEX_MAX_INDEX_ENTRIES_DEFAULT 80000000
+ #define FFINDEX_MAX_ENTRY_NAME_LENTH 63
+ 
+@@ -71,6 +73,8 @@ ffindex_db_t * ffindex_index_db_open(ffi
+ /* return *out_data_file, *out_index_file, out_offset. */
+ int ffindex_index_open(char *data_filename, char *index_filename, char* mode, FILE **out_data_file, FILE **out_index_file, size_t *out_offset);
+ 
++inline size_t ffindex_max_index_entries(){ char *FMIE = getenv("FFINDEX_MAX_INDEX_ENTRIES"); if( FMIE ) { return atol( FMIE ); } else { return FFINDEX_MAX_INDEX_ENTRIES_DEFAULT; } }
++
+ int ffindex_insert_memory(FILE *data_file, FILE *index_file, size_t *offset, char *from_start, size_t from_length, char *name);
+ 
+ int ffindex_insert_file(FILE *data_file, FILE *index_file, size_t *offset, const char *path, char *name);
+--- a/src/ffindex_apply_mpi.c
++++ b/src/ffindex_apply_mpi.c
+@@ -214,8 +214,8 @@ int main(int argn, char **argv)
+                     "\t-d\tFFDATA output file, stdout of program will be captured\n"
+                     "\t-i\tFFINDEX output file, entries get the same name as input entry\n"
+                     FFINDEX_COPYRIGHT,
+-                    argv[0],
+-                    argv[0]);
++                    basename(argv[0]),
++                    basename(argv[0]));
+     errno = EINVAL;
+     goto EXCEPTION;
+   }
+--- a/src/ffindex_get.c
++++ b/src/ffindex_get.c
+@@ -27,8 +27,10 @@ void usage(char* program_name)
+     fprintf(stderr, "USAGE: %s data_filename index_filename entry name(s)\n"
+                     "\t-f FILE\t\tfile containing a list of file names, one per line\n"
+                     "\t-n\t\tuse index of entry instead of entry name\n"
++                    "ENVIRONMENT\n"
++                    "\tFFINDEX_MAX_INDEX_ENTRIES - allocate memory for this number of entries\n"
+                     FFINDEX_COPYRIGHT,
+-                    program_name);
++                    basename(program_name));
+ }
+ 
+ int main(int argn, char **argv)
+--- a/src/ffindex_modify.c
++++ b/src/ffindex_modify.c
+@@ -41,7 +41,7 @@ void usage(char *program_name)
+                     "\tTo clean up the data file after unlinking insert it to an new one:\n"
+                     "\tffindex_build -as cleaned.ffdata cleaned.ffindex -d foo.ffdata -i foo.ffindex\n"
+                     FFINDEX_COPYRIGHT,
+-                    program_name, MAX_FILENAME_LIST_FILES, program_name);
++                    basename(program_name), MAX_FILENAME_LIST_FILES, basename(program_name));
+ }
+ 
+ int main(int argn, char **argv)

Deleted: trunk/packages/ffindex/trunk/debian/patches/clang.patch
===================================================================
--- trunk/packages/ffindex/trunk/debian/patches/clang.patch	2015-09-13 20:28:57 UTC (rev 20069)
+++ trunk/packages/ffindex/trunk/debian/patches/clang.patch	2015-09-14 17:37:35 UTC (rev 20070)
@@ -1,43 +0,0 @@
-Description: Enable building with clang
-Author: Alexander <sanek23994 at gmail.com>
-Last-Update: Thu, 14 Aug 2014 23:42:00 +0400
-
-
---- ffindex-0.9.9.3.orig/src/ffindex.c
-+++ ffindex-0.9.9.3/src/ffindex.c
-@@ -510,11 +510,10 @@ ffindex_index_t* ffindex_index_as_tree(f
-   return index;
- }
- 
-+static FILE* index_file_action = NULL;
-+static int ret_action = EXIT_SUCCESS;
- 
--int ffindex_tree_write(ffindex_index_t* index, FILE* index_file)
--{
--  int ret = EXIT_SUCCESS;
--  void action(const void *node, const VISIT which, const int depth)
-+static void action(const void *node, const VISIT which, const int depth)
-   {
-     ffindex_entry_t *entry;
-     switch (which)
-@@ -526,13 +525,17 @@ int ffindex_tree_write(ffindex_index_t*
-       case postorder:
-       case leaf:
-         entry = *(ffindex_entry_t **) node;
--        if(fprintf(index_file, "%s\t%zd\t%zd\n", entry->name, entry->offset, entry->length) < 0)
--          ret = EXIT_FAILURE;
-+      if(fprintf(index_file_action, "%s\t%zd\t%zd\n", entry->name, entry->offset, entry->length) < 0)
-+        ret_action = EXIT_FAILURE;
-         break;
-     }                                        
-   }
-+
-+int ffindex_tree_write(ffindex_index_t* index, FILE* index_file)
-+{
-+  index_file_action = index_file;
-   twalk(index->tree_root, action);
--  return ret;
-+  return ret_action;
- }
- 
- /* vim: ts=2 sw=2 et

Modified: trunk/packages/ffindex/trunk/debian/patches/series
===================================================================
--- trunk/packages/ffindex/trunk/debian/patches/series	2015-09-13 20:28:57 UTC (rev 20069)
+++ trunk/packages/ffindex/trunk/debian/patches/series	2015-09-14 17:37:35 UTC (rev 20070)
@@ -1,3 +1,2 @@
-Makefile
-basename
-clang.patch
+Makefile.patch
+basename.patch




More information about the debian-med-commit mailing list