[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gow, Cygwin alternative refers to GNU programs as open source UNIX

From: Kaz Kylheku (gnu-misc-discuss)
Subject: Re: Gow, Cygwin alternative refers to GNU programs as open source UNIX tools
Date: Wed, 28 Oct 2020 11:11:12 -0700
User-agent: Roundcube Webmail/0.9.2

On 2020-10-27 14:24, Tobias Geerinckx-Rice wrote:
Jean Louis 写道:
I did not notice it. There are no sources on Github, just binaries

They take some effort to miss:

The situation here is that

- gow-utilities-src-0.8.0.tar contains the source code archives of
  the bundled utilities, but no build scripts or documentation.
  There is not even a hint as to what toolchain is required; we can
  guess from .dll files bundled with the executables that this
  that this project just extends MSYS (the run-time system for MinGW)
  and thus probably uses the environment with which that is built.

- The download links to a "Source code" .zip and .tar.gz file
  actually lead to archived snapshots of the git repository
  with the all the .exe files and no source code.

These issues are just simple omissions that can be easily rectified.
I suspect that the author thinks he has met the obligations by putting
out that big aggregate tar file containing the utility source tarballs.

In fact, there is actually no need to provide that, since those programs
have upstream repositories which have those.

Nowadays, distributions don't ship copies of the tarballs; the mainstream
practice is for build scripts to download tarballs from the original
upstream locations, or else mirrors, and then cache them locally.

Even if the build script doesn't do any downloading, if it is obvious
from its source code that it requires, say, sed-4.2.1-src, then the
user can manually procure that exact program.

What's troubling about the source code archive is that it contains .zip
files and not original tarballs.

$ tar tvf gow-utilities-src-0.8.0.tar
drwxrwxrwx 0/0               0 2014-02-15 10:30 gow-utilities-src-0.8.0/
-rwxrwxrwx 0/0 368562 2012-09-09 20:08 gow-utilities-src-0.8.0/ -rwxrwxrwx 0/0 3796772 2012-09-09 20:09 gow-utilities-src-0.8.0/ -rwxrwxrwx 0/0 416587 2012-09-09 20:10 gow-utilities-src-0.8.0/ -rwxrwxrwx 0/0 9371720 2012-09-10 06:48 gow-utilities-src-0.8.0/ -rwxrwxrwx 0/0 4007401 2012-09-10 07:13 gow-utilities-src-0.8.0/ -rwxrwxrwx 0/0 1482028 2012-09-10 06:45 gow-utilities-src-0.8.0/
[ ... ]

So in other words, the sources are repackaged, leading to the suspicion
that there are alterations. Distributions should use the original
sources: either pull from the real upstream git repositories or what
have you or use the official release tarballs.

Let's dig into this deeper, using Bison as our focus. What we find inside is not just the Bison sources, but a tree structure containing
a build directory and other superfluous materials.

The Bison source is buried in this tree, at the relative path


This is not identical to GNU Bison 2.4.1.

$ diff -urN bison-2.4.1 gow-bison-2.4.1/src/bison/2.4.1/bison-2.4.1-src | wc
   141896  509172 4155393

The diff exceeds four megabytes! Some of the changes are due to line ending differences: the files have been altered with carriage return characters. However, this is not the bulk of it. If we suppress whitespace with -w, the
diff size is still about the same:

$ diff -urNw bison-2.4.1 gow-bison-2.4.1/src/bison/2.4.1/bison-2.4.1-src | wc
   141757  508598 4150945

Below is a small samples of the differences, which are serious. What is being called
bison-2.4.1 is certainly not bison-2.4.1:

--- bison-2.4.1/doc/bison.1     2008-12-11 14:07:25.000000000 -0800
+++ gow-bison-2.4.1/src/bison/2.4.1/bison-2.4.1-src/doc/bison.1 2008-12-14 04:03:25.000000000 -0800
@@ -3,7 +3,7 @@
 bison \- GNU Project parser generator (yacc replacement)
-.B bison
+.B j:\Devel\bison\2.4.1\bison-2.4.1\src\bison.exe
 [\fIOPTION\fR]... \fIFILE\fR
 .I Bison
@@ -60,9 +60,12 @@
 Generate LALR(1) and GLR parsers.
Mandatory arguments to long options are mandatory for short options too.
 The same is true for optional arguments.
-.SS "Operation modes:"
+Operation modes:
 \fB\-h\fR, \fB\-\-help\fR
 display this help and exit

diff -urNw bison-2.4.1/src/main.c gow-bison-2.4.1/src/bison/2.4.1/bison-2.4.1-src/src/main.c
--- bison-2.4.1/src/main.c      2008-11-19 08:57:30.000000000 -0800
+++ gow-bison-2.4.1/src/bison/2.4.1/bison-2.4.1-src/src/main.c 2008-12-14 04:03:00.000000000 -0800
@@ -55,7 +55,7 @@
 main (int argc, char *argv[])
-  program_name = argv[0];
+  set_program_name (argv[0]);
   setlocale (LC_ALL, "");
   (void) bindtextdomain (PACKAGE, LOCALEDIR);
   (void) bindtextdomain ("bison-runtime", LOCALEDIR);

diff -urNw bison-2.4.1/src/ gow-bison-2.4.1/src/bison/2.4.1/bison-2.4.1-src/src/
--- bison-2.4.1/src/ 2008-12-11 14:05:55.000000000 -0800
+++ gow-bison-2.4.1/src/bison/2.4.1/bison-2.4.1-src/src/ 2008-12-13 09:22:23.000000000 -0800
@@ -110,7 +110,7 @@
        relation.$(OBJEXT) scan-code-c.$(OBJEXT) scan-gram-c.$(OBJEXT) \
        scan-skel-c.$(OBJEXT) state.$(OBJEXT) symlist.$(OBJEXT) \
        symtab.$(OBJEXT) tables.$(OBJEXT) uniqstr.$(OBJEXT) \
-       graphviz.$(OBJEXT)
+       graphviz.$(OBJEXT) bison-res.$(OBJEXT)
 bison_OBJECTS = $(am_bison_OBJECTS)
 bison_LDADD = $(LDADD)
@@ -367,7 +367,7 @@
-M4 = @M4@
+M4 = m4.exe
@@ -430,6 +430,9 @@
+MAJOR=$(shell echo $(VERSION) | sed -e "s/\..*$$//")
+MINOR=$(shell echo $(VERSION) | sed -e "s/^[^\.]*\.0*\([0-9]\+\).*$$/\1/") +LDFLAGS += -Wl,--major-image-version=$(MAJOR) -Wl,--minor-image-version=$(MINOR)
@@ -508,7 +511,7 @@
 AM_CPPFLAGS = -I$(top_srcdir)/lib
 AM_YFLAGS = "-dv"
-LDADD = ../lib/libbison.a $(LIBINTL)
+LDADD = ../lib/libbison.a $(LIBINTL) $(VERSADD)
 bison_SOURCES = \
@@ -558,7 +561,7 @@
        $(MAKE) $(AM_MAKEFLAGS) all-am

-.SUFFIXES: .c .l .o .obj .y
+.SUFFIXES: .c .l .o .obj .y .rc
 $(srcdir)/  $(srcdir)/  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
@@ -706,6 +709,12 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tables.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uniqstr.Po@am__quote@

+# Rule to make compiled resource (Windows)
+resdir = @top_builddir@/resource
+vpath %-res.rc $(resdir)
+%-res.o: %-res.rc
+       windres --include-dir $(resdir) -i $< -o $@
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
 @am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po

reply via email to

[Prev in Thread] Current Thread [Next in Thread]