all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
To: Maxime Devos <maximedevos@telenet.be>
Cc: Liliana Marie Prikler <liliana.prikler@gmail.com>, guix-devel@gnu.org
Subject: Re: FSDG issues of SCUMMVM-based games
Date: Thu, 15 Jun 2023 18:30:07 +0200	[thread overview]
Message-ID: <20230615183007.78b46914@primary_laptop> (raw)
In-Reply-To: <cf56fa37-fd81-7323-523a-e89264f86281@telenet.be>


[-- Attachment #1.1: Type: text/plain, Size: 7852 bytes --]

Hi,

About the license it's still unclear if it's free or not as some people
pointed on the gnu-linux-libre mailing[1] list that it's a bit similar
to the open font license, but that is a license for fonts not code
though. So I've looked at the other aspects (missing source code, etc).

On Sat, 6 Aug 2022 17:24:52 +0200
Maxime Devos <maximedevos@telenet.be> wrote:
> As such, I agree they should not be distributed (unless the actual 
> sources are found, but even then there is (1.)), as per the first 
> sentence of ‘(guix)GNU Distribution’.

For the lack of missing source code I've looked a bit more in depth
about Drascula and the other games mentioned and here's what I found
below.

Drascula:
---------
The file used by ScummVM is Packet.001.

Apparently it's an ARJ archive:
> $ file Packet.001
> Packet.001: ARJ archive data, v7, slash-switched, created 11 dec
> 1980+18, original name: PACKET.ARJ, os: MS-DOS

And binwalk can manage to extract the files from it:
> $ binwalk -e Packet.001

There might be way better tools to do that but I don't know them.

That extracted 1146 files.

One of these files is DRASCULA.COM, and it's safe to assume that it
should be a dos executable because many of these games were also
released for DOS. There are other .COM files too.

File also seems to think that DRASCULA.COM is a dos executable (file is
not 100% reliable).
> $ file DRASCULA.COM 
> DRASCULA.COM: DOS executable (COM), start instruction 0xeb3a9043
> 6f6d7069

I've no idea what most of the files are for but here's their extensions:
> $ ls | sed 's#.*\.##' | sort -u
> ALD
> ALG
> ALS
> arj (that could be the header of the Packet.001 file)
> BIN
> CAL
> CFG
> COM
> DEV
> DRV
> EPA
> EXE
[GSAVE* (GSAVE00, GSAVE01, .. GSAVE10)]
> RCT
> VOC

So:
- We lack the source code for DRASCULA.COM
- If people re-make ARJ archives without any of the executables, and
  that the game still works, then still have issues about the other
  files that might contain code that lack corresponding source code.
  More on that below (in the part about draci-historie).

Lure:
-----
The files used by ScummVM are: Disk1.vga Disk2.vga Disk3.vga
and Disk4.vga I don't know much more about the format.

I've also found an executable without source code (Lure.exe) in one of
the source pacakge, but Guix probably has a mechanism to take care of
that to republishing modified source code without Lure.exe.

queen:
------
The file used by ScummVM is queen.1c, but I don't know more.

sky:
----
The following 3 files are used by ScummVM:
- sky.cpt: Targa image data - Map - RLE 487 x 608 x 1 +353 +412 - 1-bit
           alpha
- sky.dnr: DOS executable (COM), start instruction 0xe9130000 cfea0000
- sky.dsk: data

File seems wrong with sky.cpt, and I've no idea if file is write with
sky.dnr.

There are also deeper issues:
------------------------------
- All these files are not built from source, so it's complicated to
  understand the provenance of what's inside. And so it's probably
  safer not to ship them (unless we build everything from source)
  because we're unsure that there is some corresponding source code
  inside. 
- Even if there was complete source code inside, we need to be able to
  modify that source code somehow, so doing that might require a lot of
  work to research or build the tools for that.
- ScummVM might contain checksums (See the "4. Play the recompiled
  game" of the draci-historie build documentation [3]) but if someone
  manages to build a game for ScummVM, it could be added as a
  dependency of ScummVM and its checksum could be added inside ScummVM
  at compilation time. 

Also if:
- There are no free programs for ScummVM (a hello world under
  a free license would could count as a free program) (we don't know if
  it's the case or not)
- ScummVM needs to be patched to run modified games (this is very
  likely)
- We don't know if it's possible to build a game for ScummVM
  with only free software (the game doesn't necessarily need to be
  public but free software tools would need to exist to build it).

Then it would clearly steers users toward nonfree software. 

Though here we don't know if there are free programs or not but we also
cannot tell users that scummVM is usefull with a specific free program
or show them a use case that doesn't require nonfree software, so we
might also have a problem with that.

A way forward:
--------------
A possibility here could be to remove ScummVM and the games that run in
it. Another would be to find a 100% free program for ScummVM (that
doesn't have nonfree dependencies for being modified or rebuilt) or to
find a way to make your own program for ScummVM with 100% free software.

I've looked a bit at another game (draci-historie[2]) that has some
source code published. This game is not packaged nor redistributed by
Guix but it looks way better than the other freedom wise and it can
teach us how ScummVM games are made.

Its probably not good enough as-is as its source code also also relies
on a tarball that contains executable to build the game and I also
didn't manage to build it with Guix yet (I've attached a file with my
attempt) but maybe it's possible to get it to build and maybe we can
build a 100% free software version of it.

For the licenses the website has the following:
> In 2006, I (Robert Špalek) released the source codes under the GNU
> GPL2 license.
> [...]
> The game has been released under the GNU GPL license version 2,
> hence you can download it for free including full source codes. The
> new game engine is a part of ScummVM and its source codes are thus
> also a part of it. The old game engine was written in Borland Pascal
> and Turbo Assembler, and only runs on MS-DOS. It can be downloaded
> below. Besides the game player you can also download the source codes
> of the game scripts written in our proprietary game programming
> language, and source images, sounds, and animations. 

So I'm unsure about the license of the executable, game data, etc.

The interesting thing is that it has some draci-historie specific
scripting language and a compiler for it. So we can safely assume that
the other games most likely have a way to script things and that the
games are complex enough to have scripts.

And these scripts may need to be compiled here (I've no idea how
scripts look like for the other games).

A way forward would be to try to build this draci-historie game if we
really want to have ScummVM games and to patch ScummVM to use the
checksums from the newly built game.

There is also an IDE (QT AGI Studio)[4] and some templates[5] for the
AGI game engine supported by ScummVM, but all that require some work
because (a) the IDE depends on QT4, and (b) the template license is a
bit similar to the games license[6], and (c) if scummVM still has
checksums, then users need to build their own version anyway (d) nobody
knows if that can work with 100% free software unless people audit or
package the software and try to see if it works.

References:
-----------
[1]This gnu-linux-libre mailing list is at nongnu.org. Despite its name,
   this mailing list is meant for discussions about all FSDG compliant
   distributions(even the ones without GNU or linux-libre like
   Replicant), about the list of software to exclude from FSDG
   distributions, about adding new distros in the list, etc.
[2]https://www.ucw.cz/draci-historie/index-en.html
[3]https://www.ucw.cz/draci-historie/src/doc/compiling-the-game.txt
[4]https://agistudio.sourceforge.net/#requirements
[5]https://github.com/nbudin/agikit-project-template
[6]https://github.com/nbudin/agikit-project-template/blob/main/README-original.txt

Denis.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: draci-historie.scm --]
[-- Type: text/x-scheme, Size: 6540 bytes --]

;;; Copyright © 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
;;;
;;; This file is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; This file is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this file.  If not, see <http://www.gnu.org/licenses/>.

(use-modules (gnu packages compression)
	     (gnu packages pascal)
	     (gnu packages python)
	     (guix build-system gnu)
	     (guix build-system trivial)
	     (guix download)
	     (guix gexp)
	     (guix packages)
	     ((guix licenses) #:prefix license:))

;; Serious issues to address:
;; (1) Is the Data GPLv2 ? Is it redistributable? What the dh-en-2012.zip
;;     binaries?
;; (2) compiling-the-game.txt[1] has a section "4. Play the recompiled
;;     game" that explains that the game built is incompatible with
;;     ScummVM unless scummVM is patched with the md5 of the game binary.
;;     [1]https://www.ucw.cz/draci-historie/src/doc/compiling-the-game.txt
;; (3) Actually make it work
;; (4) Patch scummVM and test the game

;; TODO:
;; - Also pakcage licenses and license declarations too
;; - identify and remove the binaries that are not used by the build
;;   system.
;; - Make sure only data that can be edited with free software
;;   tools remains.
;; - Make a cleaned-up tarball and get that mirrored instead of the
;;   binaries we don't use.
;; - Convert that into a function that makes a package for a given
;;   language.
(define-public draci-historie-dubbing-en
  (package
   (name "draci-historie-dubbing-en")
   ;; There are no versions in the release.
   (version "1+1")
   (source (origin
            (method url-fetch)
            (uri
	     (string-append
	      "https://www.ucw.cz/draci-historie/binary/dh-en-2012.zip"))
	    (sha256
	     (base32
	      "08xffj4648nxp3mjxwf54z1y4nk1718jrnkib2ikj5h509cn4z40"))))
	    (build-system trivial-build-system)
	    (arguments
	     (list #:modules '((guix build utils))
		   #:builder 
		   #~(begin
		       (use-modules (guix build utils))
		       (let* ((destination
			       (string-append
				(assoc-ref %outputs "out")
				"/share/draci-historie-dubbing-en/"))
			      (source (assoc-ref %build-inputs "source"))
			      (unzip (search-input-file %build-inputs "/bin/unzip")))
			 (invoke unzip source "-d" "source")
			 (copy-recursively "source" destination)))))
	    (native-inputs (list unzip))
	    (home-page "https://www.ucw.cz/draci-historie/index-en.html")
	    (synopsis "TODO")
	    (description "TODO")
	    (license license:gpl2))) ;; Is the Data really GPLv2(+?) ???

;; TODO: also pakcage licenses and license declarations too
(define-public draci-historie-data
  (package
   (name "draci-historie-data")
   ;; There are no versions in the release.
   (version "1+1")
   (source (origin
            (method url-fetch)
            (uri "https://www.ucw.cz/draci-historie/source/new-gfx.zip")
	    (sha256
	     (base32
	      "09z7kipd1vpd7si4lmpqr1xfb0vc3jfnwllv9zvxiyqrr44n56py"))))
	   (build-system trivial-build-system)
	   (arguments
	    (list #:modules '((guix build utils))
		  #:builder 
		  #~(begin
		      (use-modules (guix build utils))
		      (let* ((gfx (string-append (assoc-ref %outputs "out") "/share/gfx/"))
			     (source (assoc-ref %build-inputs "source"))
			     (unzip (search-input-file %build-inputs "/bin/unzip")))
			(invoke unzip source)
			(copy-recursively "gfx" gfx)))))
	   (native-inputs (list unzip))
	   (home-page "https://www.ucw.cz/draci-historie/index-en.html")
	   (synopsis "TODO")
	   (description "TODO")
	   (license license:gpl2))) ;; Is the Data really GPLv2(+?) ???

;; TODO: also pakcage some the documentation in doc/ and package
;; licenses and license declarations too
(define-public draci-historie
  (package
   (name "draci-historie")
   ;; There are no versions in the release.
   (version "1+2")
   (source (origin
            (method url-fetch/zipbomb)
            (uri "https://www.ucw.cz/draci-historie/source/new-sources.zip")
            (sha256
             (base32
              "1a7qxigbzmh7v85r83zc9hc347qwrq4iyia044vq87cy8n1z1whb"))))
   (build-system gnu-build-system)
   (arguments
    (list
     #:tests? #f ; No target
     #:make-flags #~(list "-d") ;; debug
     #:parallel-build? #f ;; debug
     #:phases 
     #~(modify-phases
	%standard-phases
	(add-after
	 'unpack 'fix-build
	 (lambda _
	   (substitute* "Makefile"
			(("^DIR=/.*")
			 (string-append
			  "DIR="
			  (getcwd)
			  "/build\n")))
	   ;; TODO: Add support for more LANGS an AUDIO (see doc/compiling-the-game.txt)
	   (substitute* "Makefile"
			(("^LANGS=.*") "LANGS=en\n"))
	   (substitute* "Makefile"
			(("^AUDIO=.*") "AUDIO=\n"))
	   (substitute* (find-files "scripts" ".py$")
			(("#!/usr/bin/python")
			 (string-append "#!" (which "python2"))))))
	(add-after
	 'fix-build 'unpack-gfx
	 (lambda _
	   (let* ((gfx
		   (string-append
		    #$(this-package-native-input "draci-historie-data")
		    "/share/gfx/")))
	     (mkdir-p "build")
	     (copy-recursively gfx "build/orig-gfx"))))
	(add-after
	 'unpack-gfx 'unpack-english
	 (lambda _
	   (let* ((dubbing-en
		   (string-append
		    #$(this-package-native-input "draci-historie-dubbing-en")
		    "/share/draci-historie-dubbing-en/")))
	     (mkdir-p "build/orig-exe/en")
	     (copy-recursively dubbing-en "build/orig-exe/en"))))
	(add-before
	 'build 'clean-source
	 (lambda _
	   ;; Turbo Pascal configuration files
	   (for-each delete-file (find-files "." ".*\\.tp"))
	   (invoke "make" "clean_all")))
	(add-after
	 'build 'build-dubbing
	 (lambda _
	   (invoke "make" "dubbing_all")))
	 (delete 'configure))))
   (native-inputs (list draci-historie-data
			draci-historie-dubbing-en
			fpc python-2.7 zip))
   (home-page "https://www.ucw.cz/draci-historie/index-en.html")
   (synopsis "TODO")
   (description "TODO")
   (license license:gpl2))) ; I didn't fin mentions of "or later"

(list draci-historie)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2023-06-15 16:34 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-06  4:59 FSDG issues of SCUMMVM-based games Liliana Marie Prikler
2022-08-06  6:36 ` Tobias Geerinckx-Rice
2022-08-06 14:41   ` Tobias Geerinckx-Rice
2022-08-07 12:52   ` Christine Lemmer-Webber
2022-08-06 15:24 ` Maxime Devos
2022-08-06 17:00   ` Liliana Marie Prikler
2023-06-15 16:30   ` Denis 'GNUtoo' Carikli [this message]
2023-06-15 17:34     ` Liliana Marie Prikler
2023-06-16 15:41       ` Denis 'GNUtoo' Carikli
2023-06-18  8:19         ` Liliana Marie Prikler
2023-06-18 19:07           ` Denis 'GNUtoo' Carikli
2023-06-20  4:30             ` Liliana Marie Prikler
2023-06-20  8:00               ` Efraim Flashner
2023-06-21  1:27               ` Denis 'GNUtoo' Carikli
2023-06-21  8:38               ` Giovanni Biscuolo
2023-07-23  8:10                 ` Liliana Marie Prikler
2023-11-24 18:54               ` Denis 'GNUtoo' Carikli
2023-11-24 19:52                 ` Liliana Marie Prikler
2022-08-24 12:53 ` Nicolas Goaziou
2022-08-24 18:44   ` Liliana Marie Prikler
2022-08-24 20:24     ` Vagrant Cascadian
2022-08-24 21:31       ` Maxime Devos
2022-08-24 20:24     ` zimoun
2022-08-24 21:48       ` Maxime Devos
2022-08-24 22:08       ` Tobias Geerinckx-Rice
2022-08-25 19:26         ` Tobias Geerinckx-Rice

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230615183007.78b46914@primary_laptop \
    --to=gnutoo@cyberdimension.org \
    --cc=guix-devel@gnu.org \
    --cc=liliana.prikler@gmail.com \
    --cc=maximedevos@telenet.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.