On Tue 2018-09-18 11:28:03 +0200, Neal H. Walfield wrote: > Along with Justus and Kai (in cc), I'm developing Sequoia, which is a new > OpenPGP implementation (think of GnuPG). Although Sequoia is firstly a > library, we also offer a command-line tool, which we named 'sq'. > Unfortunately, and this is the reason that I'm reaching out, the debian > ispell package also ships an sq binary. It seems to me that ispell's sq is > just an internal ispell tool. Do you know whether other programs use sq? > Would you be open to shipping sq as e.g. /usr/lib/ispell/sq?
This kind of namespace contention is tough. And it's even worse with a short name like sq, which i can't figure out how to search for on https://codesearch.debian.net/ fwiw, debian has been shipping a bugfix patch to ispell's sq for over 7 years, despite several new upstream releases. debian/patches/0006-Fix-sq-and-unsq.patch also "addresses" that ispell upstream doesn't even ship sq and unsq by default. anyway, for simplicity, we might just stop shipping sq entirely, thereby falling in line with upstream. The attached patch below (against the git repo in https://salsa.debian.org/debian/ispell) does that, i think. If someone really wants to keep sq, perhaps they could speak up here? --dkg
>From 941518e0e8be8cf842a435f68c6ea66ec73c3264 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor <[email protected]> Date: Wed, 31 Oct 2018 10:29:51 -0400 Subject: [PATCH] Stop shipping sq and unsq (Closes: #909085) Upstream doesn't ship sq or unsq. It has had nasty bugs lingering in upstream for years (which we've fixed in debian). Nothing in ispell itself seems to delberately use sq or unsq, and to my knowledge, debian ships no "squeezed" dictionary files. dropping sq and unsq from debian clears the way for sequoia (an actively developed upstream project) to use the /usr/bin/sq name. --- debian/patches/0006-Fix-sq-and-unsq.patch | 239 ------------------ .../0015-CFLAGS-from-environment.patch | 14 +- debian/patches/0018-Dont-strip-binaries.patch | 6 +- .../patches/0020-Mark-Rcs_Id-as-unused.patch | 4 +- ...nclude-Debian-Makefile.languages.inc.patch | 4 +- debian/patches/0037-CC-from-environment.patch | 6 +- debian/patches/series | 1 - 7 files changed, 17 insertions(+), 257 deletions(-) delete mode 100644 debian/patches/0006-Fix-sq-and-unsq.patch diff --git a/debian/patches/0006-Fix-sq-and-unsq.patch b/debian/patches/0006-Fix-sq-and-unsq.patch deleted file mode 100644 index d3c2782..0000000 --- a/debian/patches/0006-Fix-sq-and-unsq.patch +++ /dev/null @@ -1,239 +0,0 @@ -From: "Dr. Werner Fink" <[email protected]> -Date: Thu, 31 May 2007 00:00:00 +0200 -Subject: 0006 Fix sq and unsq - -Fix sq/unsq, hint from Thomas Rachel - -The patch is taken from ispell-3.3.02-102.1.src.rpm from OpenSUSE. ---- - Makefile | 9 +++++++-- - sq.1 | 4 ++-- - sq.c | 32 ++++++++++++++++++++------------ - unsq.c | 29 ++++++++++++++++++----------- - 4 files changed, 47 insertions(+), 27 deletions(-) - -diff --git a/Makefile b/Makefile -index a11ed06..c8e4b23 100644 ---- a/Makefile -+++ b/Makefile -@@ -283,6 +283,7 @@ all: all-languages - programs: buildhash findaffix tryaffix ispell - programs: icombine ijoin munchlist - programs: subset zapdups -+programs: sq unsq - - defmt-programs: - cd deformatters; $(MAKE) all -@@ -341,11 +342,15 @@ install-basic: - @. ./config.sh; \ - set -x; \ - $$INSTALL ispell.1 $(DESTDIR)$$MAN1DIR/ispell$$MAN1EXT; \ -- $$INSTALL ispell.5 $(DESTDIR)$$MAN45DIR/ispell$$MAN45EXT -+ $$INSTALL ispell.5 $(DESTDIR)$$MAN45DIR/ispell$$MAN45EXT; \ -+ $$INSTALL sq.1 $(DESTDIR)$$MAN1DIR/sq$$MAN1EXT; \ -+ echo .so man1/sq.1 > $(DESTDIR)$$MAN1DIR/unsq$$MAN1EXT - @. ./config.sh; \ - set -x; \ - cd $(DESTDIR)$$MAN1DIR; \ - chmod 644 ispell$$MAN1EXT; \ -+ chmod 644 sq$$MAN1EXT; \ -+ chmod 644 unsq$$MAN1EXT; \ - cd $(DESTDIR)$$MAN45DIR; \ - chmod 644 ispell$$MAN45EXT - -@@ -379,7 +384,7 @@ install-dictbuild: - @. ./config.sh; \ - set -x; \ - $$INSTALL buildhash icombine ijoin munchlist findaffix \ -- tryaffix \ -+ tryaffix sq unsq \ - $(DESTDIR)$$BINDIR - @. ./config.sh; \ - set -x; \ -diff --git a/sq.1 b/sq.1 -index 99442a2..31c24bd 100644 ---- a/sq.1 -+++ b/sq.1 -@@ -73,7 +73,7 @@ sq, unsq \- squeeze or unsqueeze a sorted word list - compresses a sorted list of words (a dictionary). - For example: - .RS --sort -u /usr/dict/words | sq | gzip -9 > words.sq.Z -+sort \-u /usr/share/dict/words | sq | gzip \-9 > words.sq.gz - .RE - will compress dict by about a factor of 5. - .PP -@@ -82,7 +82,7 @@ uncompress the output of - .I sq. - For example: - .RS --gunzip < words.sq.gz | unsq | sort -f -o words -+gunzip < words.sq.gz | unsq | sort \-f \-o words - .RE - will uncompress a dictionary compressed with - .I sq. -diff --git a/sq.c b/sq.c -index c931421..85ebf63 100644 ---- a/sq.c -+++ b/sq.c -@@ -59,6 +59,7 @@ static char Rcs_Id[] = - */ - - #include <stdio.h> -+#include <string.h> - - #ifdef __STDC__ - #define P(x) x -@@ -67,7 +68,7 @@ static char Rcs_Id[] = - #endif /* __STDC__ */ - - int main P ((int argc, char * argv[])); --static void trunc P ((char * word, char * prev)); -+static void sqtrunc P ((const char * word, char * prev)); - - /* - * The following table encodes prefix sizes as a single character. A -@@ -84,27 +85,34 @@ static char size_encodings[] = - 'y', 'z' /* 60-61 */ - }; - --#define MAX_PREFIX (sizeof (size_encodings) - 1) -+#define MAX_PREFIX ((sizeof(size_encodings)/sizeof(char)) - 1) -+#define UNSEQBUFSIZE 257 - - int main (argc, argv) - int argc; - char * argv[]; - { -- char word[257]; -- static char prev[257] = ""; -+ char word[UNSEQBUFSIZE]; -+ char * nl; -+ static char prev[UNSEQBUFSIZE] = ""; - -- while (gets (word) != NULL) -- trunc (word, prev); -+ while (fgets (word, UNSEQBUFSIZE, stdin) != NULL) { -+ if ((nl = strrchr(word, '\n'))) -+ *nl = '\0'; -+ else -+ word[UNSEQBUFSIZE - 1] = '\0'; -+ sqtrunc (word, prev); -+ } - return 0; - } - --static void trunc (word, prev) -- char * word; -+static void sqtrunc (word, prev) -+ const char * word; - char * prev; - { -- register char * wordp; -- register char * prevp; -- register int same_count; -+ const register char * wordp; -+ const register char * prevp; -+ register int same_count; - - wordp = word; - prevp = prev; -@@ -113,7 +121,7 @@ static void trunc (word, prev) - if (same_count>MAX_PREFIX) - same_count = MAX_PREFIX; - (void) putchar (size_encodings[same_count]); -- (void) puts (wordp); -+ (void) puts (&word[same_count]); - (void) strcpy (prev, word); - } - -diff --git a/unsq.c b/unsq.c -index 125f654..b14bcf3 100644 ---- a/unsq.c -+++ b/unsq.c -@@ -58,7 +58,9 @@ static char Rcs_Id[] = - * - */ - -+#include <stdlib.h> - #include <stdio.h> -+#include <string.h> - #include "msgs.h" - - #ifdef __STDC__ -@@ -68,7 +70,7 @@ static char Rcs_Id[] = - #endif /* __STDC__ */ - - int main P ((int argc, char * argv[])); --static int expand P ((char * word, char * prev)); -+static int sqexpand P ((char * word, char * prev)); - - /* - * The following table encodes prefix sizes as a single character. A -@@ -85,39 +87,40 @@ static char size_encodings[] = - 'y', 'z' /* 60-61 */ - }; - --#define MAX_PREFIX (sizeof (size_encodings) - 1) -- --extern void exit P ((int status)); -+#define MAX_PREFIX ((sizeof(size_encodings)/sizeof(char)) - 1) -+#define UNSEQBUFSIZE 257 - - int main (argc, argv) - int argc; - char * argv[]; - { -- char word[257]; -- static char prev[257] = ""; -+ char word[UNSEQBUFSIZE]; -+ static char prev[UNSEQBUFSIZE] = ""; - -- while (!expand (word, prev)) -+ while (!sqexpand (word, prev)) - puts (word); - return 0; - } - --static int expand (word, prev) -+static int sqexpand (word, prev) - char * word; - char * prev; - { - register char * wordp; - register char * prevp; -+ register char * nl; - register int same_count; - register int count_char; -+ register off_t size; - - count_char = getchar (); - if (count_char == EOF) - return(1); - for (same_count = 0; -- same_count < MAX_PREFIX && size_encodings[same_count] != count_char; -+ same_count <= MAX_PREFIX && size_encodings[same_count] != count_char; - same_count++) - ; -- if (same_count == MAX_PREFIX) -+ if (same_count > MAX_PREFIX) - { - (void) fprintf (stderr, UNSQ_C_BAD_COUNT, (unsigned int) count_char); - exit (1); -@@ -126,11 +129,15 @@ static int expand (word, prev) - wordp = word; - while (same_count--) - *wordp++ = (*prevp++); -- if (gets (wordp) == NULL) -+ size = UNSEQBUFSIZE - (wordp - word); -+ if (fgets(wordp, size <= UNSEQBUFSIZE ? size : 0, stdin) == NULL) - { - (void) fprintf (stderr, UNSQ_C_SURPRISE_EOF); - exit (1); - } -+ word[UNSEQBUFSIZE - 1] = '\0'; /* In case of no newline */ -+ if ((nl = strrchr(wordp, '\n'))) -+ *nl = '\0'; - (void) strcpy (prev, word); - return 0 ; - } diff --git a/debian/patches/0015-CFLAGS-from-environment.patch b/debian/patches/0015-CFLAGS-from-environment.patch index 529b31e..f334c41 100644 --- a/debian/patches/0015-CFLAGS-from-environment.patch +++ b/debian/patches/0015-CFLAGS-from-environment.patch @@ -10,10 +10,10 @@ Make use of LDFLAGS when needed. 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile -index c8e4b23..7f6e065 100644 +index a11ed06..32e194f 100644 --- a/Makefile +++ b/Makefile -@@ -294,7 +294,7 @@ showversion: ispell +@@ -293,7 +293,7 @@ showversion: ispell .c.o: @. ./config.sh; \ set -x; \ @@ -22,7 +22,7 @@ index c8e4b23..7f6e065 100644 # # The funny business with y_tab.c is necessary for MS-DOS systems, -@@ -305,7 +305,7 @@ showversion: ispell +@@ -304,7 +304,7 @@ showversion: ispell set -x; \ $$YACC $<; \ [ -f y_tab.c ] || mv y.tab.c y_tab.c; \ @@ -31,7 +31,7 @@ index c8e4b23..7f6e065 100644 mv y_tab.o $@; \ rm -f y_tab.c -@@ -485,22 +485,23 @@ language-subdirs: config.sh +@@ -480,22 +480,23 @@ language-subdirs: config.sh buildhash: config.sh buildhash.o hash.o makedent.o parse.o @. ./config.sh; \ set -x; \ @@ -58,7 +58,7 @@ index c8e4b23..7f6e065 100644 # # Note: we use "sed -n -e $$p" to achieve "tail -1" here because some -@@ -537,7 +538,7 @@ defhash.h: config.X local.h Makefile +@@ -532,7 +533,7 @@ defhash.h: config.X local.h Makefile config.sh: config.X defhash.h local.h Makefile set $(SHELLDEBUG); \ @@ -67,7 +67,7 @@ index c8e4b23..7f6e065 100644 DEFLANG EXEEXT HASHSUFFIX INSTALL \ LANGUAGES LIBDIR LIBES LINK LINT LINTFLAGS LOOK_XREF \ MAKE_SORTTMP MAN1DIR MAN1EXT MAN45DIR MAN45EXT MAN45SECT MASTERHASH \ -@@ -549,6 +550,7 @@ config.sh: config.X defhash.h local.h Makefile +@@ -544,6 +545,7 @@ config.sh: config.X defhash.h local.h Makefile | sed -e 's/"[^"]*$$/'"'/" -e "s/=/='/" -e 's/\\"/"/g' \ | sed -n -e '$$p'; \ done > config.sh; \ @@ -75,7 +75,7 @@ index c8e4b23..7f6e065 100644 echo 'case "$$MAKE_SORTTMP" in "") \ SORTTMP="-e /!!SORTTMP!!/s/=.*$$/=/";; *) SORTTMP=;; esac' \ >> config.sh -@@ -631,17 +633,17 @@ term.o: term.c +@@ -626,17 +628,17 @@ term.o: term.c ispell: config.sh $(OBJS) @. ./config.sh; \ set -x; \ diff --git a/debian/patches/0018-Dont-strip-binaries.patch b/debian/patches/0018-Dont-strip-binaries.patch index 8601bac..3240812 100644 --- a/debian/patches/0018-Dont-strip-binaries.patch +++ b/debian/patches/0018-Dont-strip-binaries.patch @@ -9,10 +9,10 @@ Fix Makefile not to strip binaries (closes: #437235) 2 files changed, 3 deletions(-) diff --git a/Makefile b/Makefile -index 7f6e065..d671d65 100644 +index 32e194f..128a46d 100644 --- a/Makefile +++ b/Makefile -@@ -329,7 +329,6 @@ install-basic: +@@ -328,7 +328,6 @@ install-basic: @. ./config.sh; \ set -x; \ cd $(DESTDIR)$$BINDIR; \ @@ -20,7 +20,7 @@ index 7f6e065..d671d65 100644 chmod 755 ispell$$EXEEXT @. ./config.sh; \ set -x; \ -@@ -389,7 +388,6 @@ install-dictbuild: +@@ -384,7 +383,6 @@ install-dictbuild: @. ./config.sh; \ set -x; \ cd $(DESTDIR)$$BINDIR; \ diff --git a/debian/patches/0020-Mark-Rcs_Id-as-unused.patch b/debian/patches/0020-Mark-Rcs_Id-as-unused.patch index 8682f22..446ca6d 100644 --- a/debian/patches/0020-Mark-Rcs_Id-as-unused.patch +++ b/debian/patches/0020-Mark-Rcs_Id-as-unused.patch @@ -213,7 +213,7 @@ index 358fc84..33836a9 100644 #endif diff --git a/sq.c b/sq.c -index 85ebf63..d7e6b42 100644 +index c931421..9b19e1f 100644 --- a/sq.c +++ b/sq.c @@ -1,5 +1,5 @@ @@ -257,7 +257,7 @@ index c26f635..05a6918 100644 #endif diff --git a/unsq.c b/unsq.c -index b14bcf3..997170e 100644 +index 125f654..d698841 100644 --- a/unsq.c +++ b/unsq.c @@ -1,5 +1,5 @@ diff --git a/debian/patches/0027-Include-Debian-Makefile.languages.inc.patch b/debian/patches/0027-Include-Debian-Makefile.languages.inc.patch index 0dc9638..b8ac782 100644 --- a/debian/patches/0027-Include-Debian-Makefile.languages.inc.patch +++ b/debian/patches/0027-Include-Debian-Makefile.languages.inc.patch @@ -16,10 +16,10 @@ is added into top-level Makefile. 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile -index d671d65..232a4d4 100644 +index 128a46d..32aae78 100644 --- a/Makefile +++ b/Makefile -@@ -422,7 +422,7 @@ install-languages: +@@ -417,7 +417,7 @@ install-languages: || $(MAKE) NEWDIR=$(DESTDIR)$$LIBDIR mkdirpath; \ set -x; \ cd $(DESTDIR)$$LIBDIR; \ diff --git a/debian/patches/0037-CC-from-environment.patch b/debian/patches/0037-CC-from-environment.patch index d9983d9..a6c1d0a 100644 --- a/debian/patches/0037-CC-from-environment.patch +++ b/debian/patches/0037-CC-from-environment.patch @@ -12,10 +12,10 @@ Bug-Debian: https://bugs.debian.org/840715 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile -index 232a4d4..e065c67 100644 +index 32aae78..30947c5 100644 --- a/Makefile +++ b/Makefile -@@ -536,7 +536,7 @@ defhash.h: config.X local.h Makefile +@@ -531,7 +531,7 @@ defhash.h: config.X local.h Makefile config.sh: config.X defhash.h local.h Makefile set $(SHELLDEBUG); \ @@ -24,7 +24,7 @@ index 232a4d4..e065c67 100644 DEFLANG EXEEXT HASHSUFFIX INSTALL \ LANGUAGES LIBDIR LIBES LINK LINT LINTFLAGS LOOK_XREF \ MAKE_SORTTMP MAN1DIR MAN1EXT MAN45DIR MAN45EXT MAN45SECT MASTERHASH \ -@@ -548,6 +548,7 @@ config.sh: config.X defhash.h local.h Makefile +@@ -543,6 +543,7 @@ config.sh: config.X defhash.h local.h Makefile | sed -e 's/"[^"]*$$/'"'/" -e "s/=/='/" -e 's/\\"/"/g' \ | sed -n -e '$$p'; \ done > config.sh; \ diff --git a/debian/patches/series b/debian/patches/series index 9f86545..3b52243 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,6 +1,5 @@ 0001-Configuration.patch 0003-Fix-FTBFS-on-Hurd.patch -0006-Fix-sq-and-unsq.patch 0007-Use-termios.patch 0008-Tex-backslash.patch 0009-Fix-FTBFS-on-glibc.patch -- 2.19.1

