[med-svn] [Git][med-team/daligner][master] 9 commits: routine-update: New upstream version
Étienne Mollier (@emollier)
gitlab at salsa.debian.org
Wed Aug 3 15:51:50 BST 2022
Étienne Mollier pushed to branch master at Debian Med / daligner
Commits:
02f0f5c0 by Étienne Mollier at 2022-08-03T15:59:18+02:00
routine-update: New upstream version
- - - - -
12010419 by Étienne Mollier at 2022-08-03T15:59:30+02:00
New upstream version 1.0+git20210330.f61b8cf
- - - - -
88b47935 by Étienne Mollier at 2022-08-03T15:59:30+02:00
Update upstream source from tag 'upstream/1.0+git20210330.f61b8cf'
Update to upstream version '1.0+git20210330.f61b8cf'
with Debian dir 32a6dafbb63b753e8f43343861a75035d2db2f0d
- - - - -
ed2a4ad0 by Étienne Mollier at 2022-08-03T15:59:30+02:00
routine-update: Standards-Version: 4.6.1
- - - - -
30c03075 by Étienne Mollier at 2022-08-03T16:22:40+02:00
cppflags.patch: added to fortify hardened functions.
- - - - -
c62a9317 by Étienne Mollier at 2022-08-03T16:27:22+02:00
typos.patch: added to fix typos caught by lintian.
- - - - -
36582dad by Étienne Mollier at 2022-08-03T16:34:51+02:00
d/u/metadata: add repository information.
- - - - -
e02c27a9 by Étienne Mollier at 2022-08-03T16:35:42+02:00
d/control: add myself to uploaders.
- - - - -
40df07c3 by Étienne Mollier at 2022-08-03T16:36:48+02:00
ready to upload to unstable.
- - - - -
8 changed files:
- DB.c
- DB.h
- debian/changelog
- debian/control
- + debian/patches/cppflags.patch
- debian/patches/series
- + debian/patches/typos.patch
- debian/upstream/metadata
Changes:
=====================================
DB.c
=====================================
@@ -495,7 +495,9 @@ DAZZ_STUB *Read_DB_Stub(char *path, int what)
stub = Malloc(sizeof(DAZZ_STUB),"Allocating DB stub record");
if (stub == NULL)
- EXIT(NULL);
+ { fclose(dbfile);
+ EXIT(NULL);
+ }
stub->nreads = NULL;
stub->fname = NULL;
@@ -581,6 +583,7 @@ stub_trash:
EPRINTF(EPLACE,"%s: Stub file %s is junk\n",Prog_Name,path);
stub_error:
Free_DB_Stub(stub);
+ fclose(dbfile);
EXIT(NULL);
}
@@ -621,6 +624,7 @@ int Fetch_Block_Range(char *path, int trim, int n, int *first, int *last)
goto stub_error;
if (fscanf(dbfile,DB_BDATA,&ulast,&tlast) != 2)
goto stub_error;
+
fclose(dbfile);
if (trim)
@@ -635,6 +639,7 @@ int Fetch_Block_Range(char *path, int trim, int n, int *first, int *last)
return (0);
stub_error:
+ fclose(dbfile);
EPRINTF(EPLACE,"%s: Stub file %s is junk\n",Prog_Name,path);
EXIT(1);
}
@@ -1639,6 +1644,7 @@ void Close_Arrow(DAZZ_DB *db)
// 0: Track is for untrimmed DB
// -1: Track is not the right size of DB either trimmed or untrimmed
// -2: Could not find the track
+// -3: Error return (if INTERACTIVE mode only)
int Check_Track(DAZZ_DB *db, char *track, int *kind)
{ FILE *afile;
@@ -1658,12 +1664,14 @@ int Check_Track(DAZZ_DB *db, char *track, int *kind)
return (-2);
if (fread(&tracklen,sizeof(int),1,afile) != 1)
- { fprintf(stderr,"%s: track files for %s are corrupted\n",Prog_Name,track);
- exit (1);
+ { EPRINTF(EPLACE,"%s: track files for %s are corrupted\n",Prog_Name,track);
+ fclose(afile);
+ EXIT(-3);
}
if (fread(&size,sizeof(int),1,afile) != 1)
- { fprintf(stderr,"%s: track files for %s are corrupted\n",Prog_Name,track);
- exit (1);
+ { EPRINTF(EPLACE,"%s: track files for %s are corrupted\n",Prog_Name,track);
+ fclose(afile);
+ EXIT(-3);
}
if (size == 0)
@@ -1671,8 +1679,9 @@ int Check_Track(DAZZ_DB *db, char *track, int *kind)
else if (size > 0)
*kind = CUSTOM_TRACK;
else
- { fprintf(stderr,"%s: track files for %s are corrupted\n",Prog_Name,track);
- exit (1);
+ { EPRINTF(EPLACE,"%s: track files for %s are corrupted\n",Prog_Name,track);
+ fclose(afile);
+ EXIT(-3);
}
fclose(afile);
@@ -2144,11 +2153,11 @@ int Read_Extra(FILE *afile, char *aname, DAZZ_EXTRA *extra)
#define EREAD(v,s,n,file,ret) \
{ if (fread(v,s,n,file) != (size_t) n) \
{ if (ferror(file)) \
- fprintf(stderr,"%s: System error, read failed!\n",Prog_Name); \
+ EPRINTF(EPLACE,"%s: System error, read failed!\n",Prog_Name); \
else if (ret) \
return (1); \
else \
- fprintf(stderr,"%s: The file %s is corrupted\n",Prog_Name,aname); \
+ EPRINTF(EPLACE,"%s: The file %s is corrupted\n",Prog_Name,aname); \
EXIT(-1); \
} \
}
@@ -2160,7 +2169,7 @@ int Read_Extra(FILE *afile, char *aname, DAZZ_EXTRA *extra)
if (extra == NULL)
{ if (fseeko(afile,slen+8*nelem,SEEK_CUR) < 0)
- { fprintf(stderr,"%s: System error, read failed!\n",Prog_Name);
+ { EPRINTF(EPLACE,"%s: System error, read failed!\n",Prog_Name);
EXIT(-1);
}
return (0);
@@ -2168,8 +2177,11 @@ int Read_Extra(FILE *afile, char *aname, DAZZ_EXTRA *extra)
name = (char *) Malloc(slen+1,"Allocating extra name");
value = Malloc(8*nelem,"Allocating extra value");
- if (name == NULL || value == NULL)
- EXIT(-1);
+ if (value == NULL || name == NULL)
+ { free(name);
+ free(value);
+ EXIT(-1);
+ }
EREAD(name,1,slen,afile,0);
EREAD(value,8,nelem,afile,0);
@@ -2185,22 +2197,23 @@ int Read_Extra(FILE *afile, char *aname, DAZZ_EXTRA *extra)
}
if (vtype != extra->vtype)
- { fprintf(stderr,"%s: Type of extra %s does not agree with previous .anno block files\n",
+ { EPRINTF(EPLACE,"%s: Type of extra %s does not agree with previous .anno block files\n",
Prog_Name,name);
goto error;
}
if (nelem != extra->nelem)
- { fprintf(stderr,"%s: Length of extra %s does not agree with previous .anno block files\n",
+ { EPRINTF(EPLACE,"%s: Length of extra %s does not agree with previous .anno block files\n",
Prog_Name,name);
goto error;
}
if (accum != extra->accum)
- { fprintf(stderr,"%s: Reduction indicator of extra %s does not agree with",Prog_Name,name);
- fprintf(stderr," previos .anno block files\n");
+ { EPRINTF(EPLACE,
+ "%s: Reduction indicator of extra %s does not agree with previos .anno block files\n",
+ Prog_Name,name);
goto error;
}
if (strcmp(name,extra->name) != 0)
- { fprintf(stderr,"%s: Expecting extra %s in .anno block file, not %s\n",
+ { EPRINTF(EPLACE,"%s: Expecting extra %s in .anno block file, not %s\n",
Prog_Name,extra->name,name);
goto error;
}
@@ -2213,8 +2226,9 @@ int Read_Extra(FILE *afile, char *aname, DAZZ_EXTRA *extra)
if (accum == DB_EXACT)
{ for (j = 0; j < nelem; j++)
if (eval[j] != ival[j])
- { fprintf(stderr,"%s: Value of extra %s doe not agree",Prog_Name,name);
- fprintf(stderr," with previous .anno block files\n");
+ { EPRINTF(EPLACE,
+ "%s: Value of extra %s doe not agree with previous .anno block files\n",
+ Prog_Name,name);
goto error;
}
}
@@ -2232,8 +2246,9 @@ int Read_Extra(FILE *afile, char *aname, DAZZ_EXTRA *extra)
if (accum == DB_EXACT)
{ for (j = 0; j < nelem; j++)
if (eval[j] != ival[j])
- { fprintf(stderr,"%s: Value of extra %s doe not agree",Prog_Name,name);
- fprintf(stderr," with previous .anoo block files\n");
+ { EPRINTF(EPLACE,
+ "%s: Value of extra %s doe not agree with previous .anno block files\n",
+ Prog_Name,name);
goto error;
}
}
@@ -2250,7 +2265,7 @@ int Read_Extra(FILE *afile, char *aname, DAZZ_EXTRA *extra)
error:
free(value);
free(name);
- EXIT(1);
+ EXIT(-2);
}
// Write extra record to end of file afile and advance write pointer
@@ -2685,8 +2700,8 @@ FILE *Next_Block_Arg(Block_Looper *e_parse)
if (parse->isDB)
{ fprintf(stderr,"%s: Cannot open a DB block as a file (Next_Block_Arg)\n",Prog_Name);
- exit (1);
- }
+ exit (1); // exit even in interactive mode as this is a programming bug on
+ } // the part of the caller
parse->next += 1;
if (parse->next > parse->last)
@@ -2699,8 +2714,8 @@ FILE *Next_Block_Arg(Block_Looper *e_parse)
if ((input = fopen(MyCatenate(parse->pwd,"/",disp,".las"),"r")) == NULL)
{ if (parse->last != INT_MAX)
- { fprintf(stderr,"%s: %s.las is not present\n",Prog_Name,disp);
- exit (1);
+ { EPRINTF(EPLACE,"%s: %s.las is not present\n",Prog_Name,disp);
+ EXIT(NULL);
}
return (NULL);
}
@@ -2767,7 +2782,7 @@ char *Next_Block_Slice(Block_Looper *e_parse, int slice)
{ int size = strlen(parse->pwd) + strlen(Block_Arg_Root(parse)) + 30;
parse->slice = (char *) Malloc(size,"Block argument slice");
if (parse->slice == NULL)
- exit (1);
+ EXIT(NULL);
}
if (parse->next+1 > parse->last)
@@ -2807,16 +2822,16 @@ static Block_Looper *parse_block_arg(char *arg, int isDB)
else
root = Root(arg,".las");
if (parse == NULL || pwd == NULL || root == NULL)
- exit (1);
+ goto error;
ppnt = index(root,BLOCK_SYMBOL);
if (ppnt == NULL)
first = last = -1;
else
{ if (index(ppnt+1,BLOCK_SYMBOL) != NULL)
- { fprintf(stderr,"%s: Two or more occurences of %c-sign in source name '%s'\n",
+ { EPRINTF(EPLACE,"%s: Two or more occurences of %c-sign in source name '%s'\n",
Prog_Name,BLOCK_SYMBOL,root);
- exit (1);
+ goto error;
}
*ppnt++ = '\0';
first = strtol(ppnt,&cpnt,10);
@@ -2826,24 +2841,24 @@ static Block_Looper *parse_block_arg(char *arg, int isDB)
}
else
{ if (first < 1)
- { fprintf(stderr,
+ { EPRINTF(EPLACE,
"%s: Integer following %c-sigan is less than 1 in source name '%s'\n",
Prog_Name,BLOCK_SYMBOL,root);
- exit (1);
+ goto error;
}
if (*cpnt == '-')
{ ppnt = cpnt+1;
last = strtol(ppnt,&cpnt,10);
if (cpnt == ppnt)
- { fprintf(stderr,"%s: Second integer must follow - in source name '%s'\n",
+ { EPRINTF(EPLACE,"%s: Second integer must follow - in source name '%s'\n",
Prog_Name,root);
- exit (1);
+ goto error;
}
if (last < first)
- { fprintf(stderr,
+ { EPRINTF(EPLACE,
"%s: 2nd integer is less than 1st integer in source name '%s'\n",
Prog_Name,root);
- exit (1);
+ goto error;
}
ppnt = cpnt;
}
@@ -2875,8 +2890,8 @@ static Block_Looper *parse_block_arg(char *arg, int isDB)
{ dbname = MyCatenate(pwd,"/",root,"dam");
dbfile = fopen(dbname,"r");
if (dbfile == NULL)
- { fprintf(stderr,"%s: Cannot open database %s[db|dam]\n",Prog_Name,root);
- exit (1);
+ { EPRINTF(EPLACE,"%s: Cannot open database %s[db|dam]\n",Prog_Name,root);
+ goto error;
}
}
@@ -2893,6 +2908,12 @@ static Block_Looper *parse_block_arg(char *arg, int isDB)
}
return ((Block_Looper *) parse);
+
+error:
+ free(parse);
+ free(root);
+ free(pwd);
+ EXIT(NULL);
}
Block_Looper *Parse_Block_LAS_Arg(char *arg)
=====================================
DB.h
=====================================
@@ -596,6 +596,7 @@ void Close_Arrow(DAZZ_DB *);
// 0: Track is for untrimmed DB
// -1: Track is not the right size of DB either trimmed or untrimmed
// -2: Could not find the track
+ // -3: Error return (if INTERACTIVE mode only)
// In addition, if opened (0 or 1 returned), then kind points at an integer indicating
// the type of track as follows:
// CUSTOM 0 => a custom track
@@ -705,7 +706,7 @@ void Close_QVs(DAZZ_DB *db);
// Take a command line argument and interpret the '@' block number ranges.
// Parse_Block_[LAS,DB]_Arg produces a Block_Looper iterator object that can then
// be invoked multiple times to iterate through all the file names implied by
- // the @ pattern/range. Next_Block_Slice returns a string encoing the next
+ // the @ pattern/range. Next_Block_Slice returns a string encoding the next
// slice files represented by an @-notation, and advances the iterator by
// that many files.
=====================================
debian/changelog
=====================================
@@ -1,3 +1,14 @@
+daligner (1.0+git20210330.f61b8cf-1) unstable; urgency=medium
+
+ * New upstream version
+ * Standards-Version: 4.6.1 (routine-update)
+ * cppflags.patch: added to fortify hardened functions.
+ * typos.patch: added to fix typos caught by lintian.
+ * d/u/metadata: add repository information.
+ * d/control: add myself to uploaders.
+
+ -- Étienne Mollier <emollier at debian.org> Wed, 03 Aug 2022 16:35:57 +0200
+
daligner (1.0+git20200727.ed40ce5-3) unstable; urgency=medium
[ Helmut Grohne ]
=====================================
debian/control
=====================================
@@ -1,10 +1,11 @@
Source: daligner
Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
-Uploaders: Andreas Tille <tille at debian.org>
+Uploaders: Andreas Tille <tille at debian.org>,
+ Étienne Mollier <emollier at debian.org>
Section: science
Priority: optional
Build-Depends: debhelper-compat (= 13)
-Standards-Version: 4.5.0
+Standards-Version: 4.6.1
Vcs-Browser: https://salsa.debian.org/med-team/daligner
Vcs-Git: https://salsa.debian.org/med-team/daligner.git
Homepage: https://dazzlerblog.wordpress.com
=====================================
debian/patches/cppflags.patch
=====================================
@@ -0,0 +1,62 @@
+Description: apply CPPFLAGS too.
+ Among other things, it enables fortifying sources.
+Author: Étienne Mollier <emollier at debian.org>
+Forwarded: not-needed
+Last-Update: 2022-08-03
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- daligner.orig/Makefile
++++ daligner/Makefile
+@@ -10,40 +10,40 @@
+ all: $(ALL)
+
+ daligner: daligner.c filter.c filter.h lsd.sort.c lsd.sort.h align.c align.h DB.c DB.h QV.c QV.h
+- $(CC) $(CFLAGS) -o daligner daligner.c filter.c lsd.sort.c align.c DB.c QV.c -lpthread -lm $(LDFLAGS)
++ $(CC) $(CPPFLAGS) $(CFLAGS) -o daligner daligner.c filter.c lsd.sort.c align.c DB.c QV.c -lpthread -lm $(LDFLAGS)
+
+ HPC.daligner: HPC.daligner.c DB.c DB.h QV.c QV.h
+- $(CC) $(CFLAGS) -o HPC.daligner HPC.daligner.c DB.c QV.c -lm $(LDFLAGS)
++ $(CC) $(CPPFLAGS) $(CFLAGS) -o HPC.daligner HPC.daligner.c DB.c QV.c -lm $(LDFLAGS)
+
+ LAsort: LAsort.c align.h DB.c DB.h QV.c QV.h
+- $(CC) $(CFLAGS) -o LAsort LAsort.c DB.c QV.c -lm $(LDFLAGS)
++ $(CC) $(CPPFLAGS) $(CFLAGS) -o LAsort LAsort.c DB.c QV.c -lm $(LDFLAGS)
+
+ LAmerge: LAmerge.c align.h DB.c DB.h QV.c QV.h
+- $(CC) $(CFLAGS) -o LAmerge LAmerge.c DB.c QV.c -lm $(LDFLAGS)
++ $(CC) $(CPPFLAGS) $(CFLAGS) -o LAmerge LAmerge.c DB.c QV.c -lm $(LDFLAGS)
+
+ LAshow: LAshow.c align.c align.h DB.c DB.h QV.c QV.h
+- $(CC) $(CFLAGS) -o LAshow LAshow.c align.c DB.c QV.c -lm $(LDFLAGS)
++ $(CC) $(CPPFLAGS) $(CFLAGS) -o LAshow LAshow.c align.c DB.c QV.c -lm $(LDFLAGS)
+
+ LAdump: LAdump.c align.c align.h DB.c DB.h QV.c QV.h
+- $(CC) $(CFLAGS) -o LAdump LAdump.c align.c DB.c QV.c -lm $(LDFLAGS)
++ $(CC) $(CPPFLAGS) $(CFLAGS) -o LAdump LAdump.c align.c DB.c QV.c -lm $(LDFLAGS)
+
+ LAcat: LAcat.c align.h DB.c DB.h QV.c QV.h
+- $(CC) $(CFLAGS) -o LAcat LAcat.c DB.c QV.c -lm $(LDFLAGS)
++ $(CC) $(CPPFLAGS) $(CFLAGS) -o LAcat LAcat.c DB.c QV.c -lm $(LDFLAGS)
+
+ LAsplit: LAsplit.c align.h DB.c DB.h QV.c QV.h
+- $(CC) $(CFLAGS) -o LAsplit LAsplit.c DB.c QV.c -lm $(LDFLAGS)
++ $(CC) $(CPPFLAGS) $(CFLAGS) -o LAsplit LAsplit.c DB.c QV.c -lm $(LDFLAGS)
+
+ LAcheck: LAcheck.c align.c align.h DB.c DB.h QV.c QV.h
+- $(CC) $(CFLAGS) -o LAcheck LAcheck.c align.c DB.c QV.c -lm $(LDFLAGS)
++ $(CC) $(CPPFLAGS) $(CFLAGS) -o LAcheck LAcheck.c align.c DB.c QV.c -lm $(LDFLAGS)
+
+ LAa2b: LAa2b.c align.c align.h DB.c DB.h QV.c QV.h
+- $(CC) $(CFLAGS) -o LAa2b LAa2b.c align.c DB.c QV.c -lm $(LDFLAGS)
++ $(CC) $(CPPFLAGS) $(CFLAGS) -o LAa2b LAa2b.c align.c DB.c QV.c -lm $(LDFLAGS)
+
+ LAb2a: LAb2a.c align.c align.h DB.c DB.h QV.c QV.h
+- $(CC) $(CFLAGS) -o LAb2a LAb2a.c align.c DB.c QV.c -lm $(LDFLAGS)
++ $(CC) $(CPPFLAGS) $(CFLAGS) -o LAb2a LAb2a.c align.c DB.c QV.c -lm $(LDFLAGS)
+
+ dumpLA: dumpLA.c align.c align.h DB.c DB.h QV.c QV.h
+- $(CC) $(CFLAGS) -o dumpLA dumpLA.c align.c DB.c QV.c -lm $(LDFLAGS)
++ $(CC) $(CPPFLAGS) $(CFLAGS) -o dumpLA dumpLA.c align.c DB.c QV.c -lm $(LDFLAGS)
+
+ clean:
+ rm -f $(ALL)
=====================================
debian/patches/series
=====================================
@@ -2,3 +2,5 @@ cflags.patch
lddflags.patch
destdir-install.patch
cross.patch
+cppflags.patch
+typos.patch
=====================================
debian/patches/typos.patch
=====================================
@@ -0,0 +1,59 @@
+Description: fix a couple of typos caught by lintian.
+Author: Étienne Mollier <emollier at debian.org>
+Forwarded: no
+Last-Update: 2022-08-03
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- daligner.orig/DB.c
++++ daligner/DB.c
+@@ -2208,7 +2208,7 @@
+ }
+ if (accum != extra->accum)
+ { EPRINTF(EPLACE,
+- "%s: Reduction indicator of extra %s does not agree with previos .anno block files\n",
++ "%s: Reduction indicator of extra %s does not agree with previous .anno block files\n",
+ Prog_Name,name);
+ goto error;
+ }
+@@ -2829,7 +2829,7 @@
+ first = last = -1;
+ else
+ { if (index(ppnt+1,BLOCK_SYMBOL) != NULL)
+- { EPRINTF(EPLACE,"%s: Two or more occurences of %c-sign in source name '%s'\n",
++ { EPRINTF(EPLACE,"%s: Two or more occurrences of %c-sign in source name '%s'\n",
+ Prog_Name,BLOCK_SYMBOL,root);
+ goto error;
+ }
+--- daligner.orig/LAsplit.c
++++ daligner/LAsplit.c
+@@ -105,7 +105,7 @@
+ exit (1);
+ }
+ if (index(root2+1,BLOCK_SYMBOL) != NULL)
+- { fprintf(stderr,"%s: Two or more occurences of %c-sign in source name '%s'\n",
++ { fprintf(stderr,"%s: Two or more occurrences of %c-sign in source name '%s'\n",
+ Prog_Name,BLOCK_SYMBOL,root);
+ exit (1);
+ }
+--- daligner.orig/lsd.sort.c
++++ daligner/lsd.sort.c
+@@ -55,7 +55,7 @@
+ int64 thresh[256]; // If check then multiple of LEX_zdiv to check for thread assignment
+ int64 tptr[256]; // Finger for each 8-bit value
+ int64 *sptr; // Conceptually [256][NTHREADS]. At end of sorting pass
+- } Lex_Arg; // sprtr[b][n] = # of occurences of value b in rangd of
++ } Lex_Arg; // sprtr[b][n] = # of occurrences of value b in rangd of
+ // thread n for the *next* pass
+
+ // Threaded sorting pass
+--- daligner.orig/daligner.c
++++ daligner/daligner.c
+@@ -531,7 +531,7 @@
+ ARG_POSITIVE(HIT_MIN,"Hit threshold (in bp.s)")
+ break;
+ case 't':
+- ARG_POSITIVE(MAX_REPS,"Tuple supression frequency")
++ ARG_POSITIVE(MAX_REPS,"Tuple suppression frequency")
+ break;
+ case 'H':
+ ARG_POSITIVE(HGAP_MIN,"HGAP threshold (in bp.s)")
=====================================
debian/upstream/metadata
=====================================
@@ -19,3 +19,5 @@ Registry:
Entry: SCR_016066
- Name: conda:bioconda
Entry: daligner
+Repository: https://github.com/thegenemyers/DALIGNER.git
+Repository-Browse: https://github.com/thegenemyers/DALIGNER
View it on GitLab: https://salsa.debian.org/med-team/daligner/-/compare/5a1f9b0e404601fd4f63a9835a288007f12df1c2...40df07c352656fcd2ba653a4161cf4004acc18f6
--
View it on GitLab: https://salsa.debian.org/med-team/daligner/-/compare/5a1f9b0e404601fd4f63a9835a288007f12df1c2...40df07c352656fcd2ba653a4161cf4004acc18f6
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220803/35c62cf2/attachment-0001.htm>
More information about the debian-med-commit
mailing list