[med-svn] [Git][med-team/blimps][master] 5 commits: more_gets.patch: new: fix more occurrences of gets(3).

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Sat Aug 24 17:02:47 BST 2024



Étienne Mollier pushed to branch master at Debian Med / blimps


Commits:
75fa9469 by Étienne Mollier at 2024-08-24T17:42:39+02:00
more_gets.patch: new: fix more occurrences of gets(3).

- - - - -
b42a21d6 by Étienne Mollier at 2024-08-24T17:44:22+02:00
d/rules: workaround for build failure with gcc-14.

Closes: #1078137

- - - - -
2e81be59 by Étienne Mollier at 2024-08-24T17:47:22+02:00
d/control: declare compliance to standards version 4.7.0.

- - - - -
380ba55a by Étienne Mollier at 2024-08-24T18:00:59+02:00
d/s/lintian-overrides: flag false positive source-missing.

- - - - -
1e2dc4bc by Étienne Mollier at 2024-08-24T18:01:40+02:00
Ready for upload to unstable.

- - - - -


6 changed files:

- debian/changelog
- debian/control
- + debian/patches/more_gets.patch
- debian/patches/series
- debian/rules
- + debian/source/lintian-overrides


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,13 @@
+blimps (3.9+ds-3) unstable; urgency=medium
+
+  * Team upload.
+  * more_gets.patch: new: fix more occurrences of gets(3).
+  * d/rules: workaround for build failure with gcc-14. (Closes: #1078137)
+  * d/control: declare compliance to standards version 4.7.0.
+  * d/s/lintian-overrides: flag false positive source-missing.
+
+ -- Étienne Mollier <emollier at debian.org>  Sat, 24 Aug 2024 18:01:33 +0200
+
 blimps (3.9+ds-2) unstable; urgency=medium
 
   * Team Upload.


=====================================
debian/control
=====================================
@@ -7,7 +7,7 @@ XS-Autobuild: yes
 Priority: optional
 Build-Depends: debhelper (>= 12~),
                d-shlibs (>= 0.84~)
-Standards-Version: 4.3.0
+Standards-Version: 4.7.0
 Vcs-Browser: https://salsa.debian.org/med-team/blimps
 Vcs-Git: https://salsa.debian.org/med-team/blimps.git
 Homepage: https://web.archive.org/web/20170606235903/http://blocks.fhcrc.org/blocks/uploads/blimps/


=====================================
debian/patches/more_gets.patch
=====================================
@@ -0,0 +1,359 @@
+Description: fix more occurrences of gets(3) in use instead of fgets(3).
+Author: Étienne Mollier <emollier at debian.org>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1078137
+Forwarded: no
+Last-Update: 2024-08-24
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- blimps.orig/protomat/blastdat.c
++++ blimps/protomat/blastdat.c
+@@ -58,7 +58,7 @@
+    else
+    {
+       printf("\nEnter name of BLASTP results file: ");
+-      gets(homfile);
++      fgets(homfile, FNAMELEN, stdin);
+    }
+    if ( (fhom=fopen(homfile, "r")) == NULL)
+    {
+@@ -76,7 +76,7 @@
+    else
+    {
+       printf("\nEnter name of file containing list of sequences: ");
+-      gets(lisfile);
++      fgets(lisfile, FNAMELEN, stdin);
+    }
+    if (!strlen(lisfile)) flis = NULL;
+    else if ( (flis=fopen(lisfile, "r")) == NULL)
+--- blimps.orig/protomat/blksort.c
++++ blimps/protomat/blksort.c
+@@ -239,7 +239,7 @@
+          else
+          {
+             printf("\nEnter name of file containing blocks search results: ");
+-            gets(homfile);
++            fgets(homfile, FNAMELEN, stdin);
+          }
+          /*------------- arg 3:  blocks database file -----------------------*/
+          db[0] = '\0';
+@@ -248,7 +248,7 @@
+          else
+          {
+             printf("\nEnter name of blocks database searched: ");
+-            gets(datfile);
++            fgets(datfile, FNAMELEN, stdin);
+          }
+          if (strlen(datfile))
+          {
+--- blimps.orig/protomat/getblock.c
++++ blimps/protomat/getblock.c
+@@ -129,7 +129,7 @@
+    {
+       strcpy(defname, "/howard/btest/bin/blocks.dat");
+       printf("\nEnter name of Blocks database file [%s]:\n", defname);
+-      gets(blkfile);
++      fgets(blkfile, FNAMELEN, stdin);
+       if (!strlen(blkfile))
+ 	 strcpy(blkfile, defname);
+    }
+@@ -286,7 +286,7 @@
+    {
+       strcpy(defname, "/howard/btest/bin/");
+       printf("\nEnter Prosite directory [%s]:\n", defname);
+-      gets(prosite);
++      fgets(prosite, FNAMELEN, stdin);
+       if (!strlen(prosite))
+ 	 strcpy(prosite, defname);
+    }
+--- blimps.orig/protomat/getseq.c
++++ blimps/protomat/getseq.c
+@@ -67,7 +67,7 @@
+    else
+    {
+       printf("\nEnter name of sequence to extract: ");
+-      gets(seqname);
++      fgets(seqname, FNAMELEN, stdin);
+    }
+    ids = makedbid();
+    id = makedbid(); ids->next = id;
+@@ -80,7 +80,7 @@
+    else
+    {
+       printf("\nEnter name of database file to extract sequence from: ");
+-      gets(infile);
++      fgets(infile, FNAMELEN, stdin);
+    }
+    if ( (fin=fopen(infile, "r")) == NULL)
+    {
+@@ -95,7 +95,7 @@
+    else
+    {
+       printf("\nEnter name of output file: ");
+-      gets(foutname);
++      fgets(foutname, FNAMELEN, stdin);
+    }
+    if (strlen(foutname))
+    {
+--- blimps.orig/protomat/lislis.c
++++ blimps/protomat/lislis.c
+@@ -42,7 +42,7 @@
+    else
+    {
+       printf("\nEnter name of file containing first list of sequences: ");
+-      gets(lisfile);
++      fgets(lisfile, FNAMELEN, stdin);
+    }
+    if ( (flis=fopen(lisfile, "r")) == NULL)
+    {
+@@ -58,7 +58,7 @@
+    else
+    {
+       printf("\nEnter name of file containing second list of sequences: ");
+-      gets(lis2file);
++      fgets(lis2file, FNAMELEN, stdin);
+    }
+    if ( (flis2=fopen(lis2file, "r")) == NULL)
+    {
+--- blimps.orig/protomat/motifj.c
++++ blimps/protomat/motifj.c
+@@ -191,7 +191,7 @@
+    else 
+    {
+      printf("\n\nEnter input file name: ");
+-     gets(intemp);
++     fgets(intemp, MAXLINE, stdin);
+    }
+    if (strlen(intemp) && intemp[0] == '-')
+    {
+@@ -328,7 +328,7 @@
+    else if (RunType == 0 || RunType == 2)
+    {
+      printf("\nEnter significance level [2-%d; %d]: ", NumSeqs, NumSeqs); 
+-     gets(intemp);   Signif = atoi(intemp); 
++     fgets(intemp, MAXLINE, stdin);   Signif = atoi(intemp);
+    }
+    else if (RunType == 4 || Signif == 0)
+      Signif = minseqs;	
+@@ -343,7 +343,7 @@
+      Dups = MAXFREQ - NumSeqs;
+      printf("Enter number of allowable internal duplicates [0-%d; 0]: ",
+ 	     Dups);
+-     gets(intemp);  Dups = atoi(intemp); 
++     fgets(intemp, MAXLINE, stdin);  Dups = atoi(intemp);
+    }
+    if (Dups + NumSeqs > MAXFREQ) Dups = MAXFREQ-NumSeqs;
+    if (Dups < 0) Dups = 0;
+@@ -355,7 +355,7 @@
+    {
+      Distance = -1;
+      printf("Enter search width [1-24; 17]: "); /* Distance=0 causes abort*/
+-     gets(intemp);
++     fgets(intemp, MAXLINE, stdin);
+      if (strlen(intemp)) Distance = atoi(intemp);
+      else                Distance = 17;
+    }
+@@ -367,7 +367,7 @@
+    {
+      Drop = 0;			/* 18540 = 2500*55/sqrt(55)  */
+      printf("Enter drop score [0-18540; %d]: ", Drop);
+-     gets(intemp);
++     fgets(intemp, MAXLINE, stdin);
+      if (strlen(intemp)) Drop = atoi(intemp);
+    }
+    else Drop = 0;
+@@ -557,18 +557,18 @@
+   {
+      printf(" Enter number to save or -1 to redo [1-%d; %d]: ",
+ 	      real_total_motifs, real_total_motifs);
+-     gets(chsig); total_motifs = atoi(chsig);
++     fgets(chsig, 5, stdin); total_motifs = atoi(chsig);
+      if (total_motifs == 0 || total_motifs > real_total_motifs)
+ 	 total_motifs = real_total_motifs;
+      else if (total_motifs < 0) 
+      {
+        printf("\nPrevious significance level was %d.", Signif);
+        printf(" Enter new level [2-%d; %d]: ", NumSeqs, Signif); 
+-       prevsig = Signif; gets(intemp);  Signif = atoi(intemp);  
++       prevsig = Signif; fgets(intemp, MAXLINE, stdin);  Signif = atoi(intemp);
+        if (Signif < 2 || Signif > NumSeqs) Signif = prevsig;  
+        printf("Previous number of internal duplications was %d.", Dups); 
+        printf(" Enter new number [0-;%d]: ", Dups);  
+-       prevdup = Dups; gets(intemp);  Dups = atoi(intemp);  
++       prevdup = Dups; fgets(intemp, MAXLINE, stdin);  Dups = atoi(intemp);
+        if (Dups < 0 || !strlen(intemp) ) Dups = prevdup;  
+        printf(" Using previous distance  %d\n", Distance);
+        goto REDO;
+@@ -618,10 +618,10 @@
+    if (RunType==0 || RunType==2)
+    {
+      printf("Enter 'g' to print first motif in each group: ");
+-     gets(chsig);
++     fgets(chsig, 5, stdin);
+      if (chsig[0] == 'g' || chsig[0] == 'G') First = YES;
+      printf("Enter 'l' for long form:  "); 
+-     gets(chsig);
++     fgets(chsig, 5, stdin);
+      if (chsig[0] == 'l' || chsig[0] == 'L') Short_Form = NO;
+   }
+ /*-------------------------------------------------------------------------*/
+@@ -669,7 +669,7 @@
+   {
+      printf("Enter number of motif groups to map (maximum %d)", max_group);
+      printf(" or 0 to assemble blocks: ");
+-     gets(chsig); n = atoi(chsig);
++     fgets(chsig, 5, stdin); n = atoi(chsig);
+   }
+   else  n = 0; 
+   if (n <= 0) goto EXIT;
+@@ -1343,7 +1343,7 @@
+    {
+      printf("\n");
+      printf("Use shuffled sequences [y/n; n]? ");
+-     gets(shuffle);
++     fgets(shuffle, 3, stdin);
+    }
+    else if (RunType == 4 || RunType == 5)
+      strcpy(shuffle, "y");
+--- blimps.orig/protomat/motomat.c
++++ blimps/protomat/motomat.c
+@@ -166,7 +166,7 @@
+       printf("\n");
+       system("ls -al *.mot");
+       printf("\nEnter name of file containing motifs: ");
+-      gets(Mot_Filename);
++      fgets(Mot_Filename, FNAMELEN, stdin);
+    }
+    ptr = strrchr(Mot_Filename, '.');   /* check for extension */
+    if (ptr == NULL) strcat(Mot_Filename, ".mot");
+@@ -432,7 +432,7 @@
+ 		  printf("\nEnter minimum block extension column score");
+ 		  printf(" or 1 for best block [100-2500 or 1; %d]: ",
+ 		    lastscore);
+-		  gets(ctemp);
++		  fgets(ctemp, MAXLINE, stdin);
+ 		  MinScore = atoi(ctemp);
+ 		  if ((MinScore > 1 && MinScore < 100) ||
+ 		       MinScore <= 0 || MinScore > 2500)
+@@ -440,7 +440,7 @@
+ 		  lastscore = MinScore;
+ 		  printf("Enter clustering identity threshold [1-100; %d]: ",
+ 		    lastthres);
+-		  gets(ctemp);
++		  fgets(ctemp, MAXLINE, stdin);
+ 		  ClThres = atoi(ctemp);
+ 		  if (ClThres <= 0 || ClThres > 100) ClThres = lastthres;
+ 		  lastthres = ClThres;
+@@ -518,7 +518,7 @@
+    if (RunType == 0 || RunType == 2)
+    {
+       printf("\nEnter drop standard deviations [-30 to 30; %d]: ", lastdrop);
+-      gets(ctemp);
++      fgets(ctemp, MAXLINE, stdin);
+       DropScore = atoi(ctemp);
+       if (DropScore < -30 || DropScore > 30) DropScore = lastdrop;
+       lastdrop = DropScore;
+--- blimps.orig/protomat/multimat.c
++++ blimps/protomat/multimat.c
+@@ -174,7 +174,7 @@
+    else
+    {
+       printf("\nEnter maximum number of hits to report [%d]: ", MaxHit);
+-      gets(ctemp);
++      fgets(ctemp, FNAMELEN, stdin);
+    }
+    if (strlen(ctemp)) MaxHit = atoi(ctemp);
+    if (MaxHit < 1 || MaxHit > NSCORE) MaxHit = MAXHIT;
+@@ -184,7 +184,7 @@
+    else
+    {
+       printf("\nEnter name of blocks database:\n");
+-      gets(datfile);
++      fgets(datfile, FNAMELEN, stdin);
+    }
+    if ( (fblk=fopen(datfile, "r")) == NULL)
+    {
+@@ -202,7 +202,7 @@
+    else
+    {
+       printf("\nEnter name of file containing list of true positives:\n");
+-      gets(lisfile);
++      fgets(lisfile, FNAMELEN, stdin);
+    }
+    if ( (flis=fopen(lisfile, "r")) == NULL)
+    {
+@@ -245,7 +245,7 @@
+       do
+       {
+ 	 printf("\nEnter name of BLIMPS results file: ");
+-	 gets(homfile[nhom++]);
++	 fgets(homfile[nhom++], FNAMELEN, stdin);
+       } while (nhom <= MAXHOM && strlen(homfile[nhom-1]));
+       nhom--;
+    }
+--- blimps.orig/protomat/protomot.c
++++ blimps/protomat/protomot.c
+@@ -81,7 +81,7 @@
+    {
+       strcpy(defname, "/cdrom/prosite/prosite.dat");
+       printf("\nEnter name of ProSite data file [%s]:\n", defname);
+-      gets(infile);
++      fgets(infile, FNAMELEN, stdin);
+       if ((int) strlen(infile) < 2)
+ 	 strcpy(infile, defname);
+    }
+@@ -96,7 +96,7 @@
+    else
+    {
+       printf("\nEnter accession number of ProSite pattern [all]: ");
+-      gets(PatName);
++      fgets(PatName, 15, stdin);
+    }
+    if ((int) strlen(PatName) < 2)   strcpy(PatName, "all");
+    else
+@@ -115,7 +115,7 @@
+    {
+       printf("\nEnter name (1-7 characters) for this group of proteins [%s]: ",
+ 	      defname);
+-      gets(Prefix);
++      fgets(Prefix, 15, stdin);
+    }
+    if ((int) strlen(Prefix) < 2)
+       strcpy(Prefix, defname);
+@@ -125,7 +125,7 @@
+    else
+    {
+       printf("\nEnter name SWISS-PROT database file [none]:\n");
+-      gets(swiss);
++      fgets(swiss, FNAMELEN, stdin);
+    }
+    if ((int) strlen(swiss) < 2)   strcpy(swiss, "none");
+ /*------------------- arg 5:  Directory for extracted proteins ----------*/
+@@ -141,7 +141,7 @@
+       printf("\nEnter directory into which proteins extracted from %s",
+ 	      swiss);
+       printf("\n should be deposited [%s]: ", defname);
+-      gets(Pros);
++      fgets(Pros, FNAMELEN, stdin);
+    }
+    if ((int) strlen(Pros) < 2)   strcpy(Pros, defname);
+ /*           Make sure directory ends with a backslash; expected by
+--- blimps.orig/protomat/universa.c
++++ blimps/protomat/universa.c
+@@ -60,7 +60,7 @@
+    else
+    {
+       printf("\nEnter name of file to convert: ");
+-      gets(infile);
++      fgets(infile, 50, stdin);
+    }
+    if ( (fin=fopen(infile, "r")) == NULL)
+    {
+@@ -74,7 +74,7 @@
+       strcpy(defname, infile);
+       ptr = strtok(defname, ".");  strcat(ptr, ".uni");
+       printf("\nEnter name of output file [%s]: ", defname);
+-      gets(outfile);
++      fgets(outfile, 50, stdin);
+       if (strlen(outfile) < 2)
+ 	 strcpy(outfile, defname);
+    }


=====================================
debian/patches/series
=====================================
@@ -3,3 +3,4 @@ makefile.patch
 hardening.patch
 avoid_privacy_breach.patch
 fixup-implicit-function-declaration.patch
+more_gets.patch


=====================================
debian/rules
=====================================
@@ -4,6 +4,8 @@
 # export DH_VERBOSE=1
 
 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+# Workaround build failures with gcc-14.
+export DEB_CFLAGS_MAINT_APPEND=-Wno-error=implicit-int
 
 include /usr/share/dpkg/default.mk
 


=====================================
debian/source/lintian-overrides
=====================================
@@ -0,0 +1,4 @@
+# Not sure why lintian is tripping on this one.  This is an html file
+# from back in 1997, visibly hand written except from a few bits and
+# pieces probably copied and pasted.
+source-is-missing [www/help/LAMA_help.html]



View it on GitLab: https://salsa.debian.org/med-team/blimps/-/compare/b304527b77ed2ef7537c6d36559e925f9f290d56...1e2dc4bcffbc8396aedd00afa2f3870aef18d7d7

-- 
View it on GitLab: https://salsa.debian.org/med-team/blimps/-/compare/b304527b77ed2ef7537c6d36559e925f9f290d56...1e2dc4bcffbc8396aedd00afa2f3870aef18d7d7
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/20240824/75701225/attachment-0001.htm>


More information about the debian-med-commit mailing list