GNU bug report logs - #39263
[PATCH 0/2] Update Godot

Previous Next

Package: guix-patches;

Reported by: Timotej Lazar <timotej.lazar <at> araneo.si>

Date: Fri, 24 Jan 2020 14:52:01 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39263 in the body.
You can then email your comments to 39263 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#39263; Package guix-patches. (Fri, 24 Jan 2020 14:52:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Timotej Lazar <timotej.lazar <at> araneo.si>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 24 Jan 2020 14:52:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Timotej Lazar <timotej.lazar <at> araneo.si>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/2] Update Godot
Date: Fri, 24 Jan 2020 15:50:59 +0100
Hi,

these patches update Godot to latest stable version 3.1.2 and unbundle
bullet, pcre2 and zstd libraries.

Thanks!

Timotej Lazar (2):
  gnu: godot: Update to 3.1.2.
  gnu: godot: Unbundle some dependencies.

 gnu/packages/game-development.scm | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

-- 
2.25.0




Information forwarded to guix-patches <at> gnu.org:
bug#39263; Package guix-patches. (Fri, 24 Jan 2020 15:04:02 GMT) Full text and rfc822 format available.

Message #8 received at 39263 <at> debbugs.gnu.org (full text, mbox):

From: Timotej Lazar <timotej.lazar <at> araneo.si>
To: 39263 <at> debbugs.gnu.org
Cc: Timotej Lazar <timotej.lazar <at> araneo.si>
Subject: [PATCH 1/2] gnu: godot: Update to 3.1.2.
Date: Fri, 24 Jan 2020 16:02:25 +0100
* gnu/packages/game-development.scm (godot): Update to 3.1.2.
[inputs]: Remove openssl, replaced by a (modified) bundled copy of mbedtls.
[arguments](configure-flags): Remove builtin_openssl flag.
[source]: Don’t try to remove the (now nonexistent) bundled openssl directory.
---
 gnu/packages/game-development.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index ee8dea23b5..79e3f6dc6c 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -18,6 +18,7 @@
 ;;; Copyright © 2019, 2020 Leo Prikler <leo.prikler <at> student.tugraz.at>
 ;;; Copyright © 2019 Jethro Cao <jethrocao <at> gmail.com>
 ;;; Copyright © 2020 Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
+;;; Copyright © 2020 Timotej Lazar <timotej.lazar <at> araneo.si>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1503,7 +1504,7 @@ games.")
 (define-public godot
   (package
     (name "godot")
-    (version "3.0.6")
+    (version "3.1.2")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -1512,7 +1513,7 @@ games.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0g64h0x8dlv6aa9ggfcidk2mknkfl5li7z1phcav8aqp9srj8avf"))
+                "12305wj2i4067jc50l8r0wmb7zjcna24fli8vb8kiaild0jrlip6"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -1527,7 +1528,6 @@ games.")
                                 "libvorbis"
                                 "libvpx"
                                 "libwebp"
-                                "openssl"
                                 "opus"
                                 "zlib"))
                     #t)))))
@@ -1550,7 +1550,6 @@ games.")
                            "builtin_libvorbis=no"
                            "builtin_libvpx=no"
                            "builtin_libwebp=no"
-                           "builtin_openssl=no"
                            "builtin_opus=no"
                            "builtin_zlib=no")
        #:tests? #f ; There are no tests
@@ -1612,7 +1611,6 @@ games.")
               ("libxinerama" ,libxinerama)
               ("libxrandr" ,libxrandr)
               ("mesa" ,mesa)
-              ("openssl" ,openssl)
               ("opusfile" ,opusfile)
               ("pulseaudio" ,pulseaudio)))
     (home-page "https://godotengine.org/")
-- 
2.25.0





Information forwarded to guix-patches <at> gnu.org:
bug#39263; Package guix-patches. (Fri, 24 Jan 2020 15:04:02 GMT) Full text and rfc822 format available.

Message #11 received at 39263 <at> debbugs.gnu.org (full text, mbox):

From: Timotej Lazar <timotej.lazar <at> araneo.si>
To: 39263 <at> debbugs.gnu.org
Cc: Timotej Lazar <timotej.lazar <at> araneo.si>
Subject: [PATCH 2/2] gnu: godot: Unbundle some dependencies.
Date: Fri, 24 Jan 2020 16:02:26 +0100
* gnu/packages/game-development.scm (godot)[inputs]: Add bullet, pcre2, zstd.
[arguments](configure-flags): Use system libraries for the above.
[source](snippet): Remove bundled copies.
---
 gnu/packages/game-development.scm | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 79e3f6dc6c..9ded71375f 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -78,6 +78,7 @@
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages music)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages pcre)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
@@ -1521,7 +1522,8 @@ games.")
                   ;; of these may be modified; see "thirdparty/README.md".
                   (with-directory-excursion "thirdparty"
                     (for-each delete-file-recursively
-                              '("freetype"
+                              '("bullet"
+                                "freetype"
                                 "libogg"
                                 "libpng"
                                 "libtheora"
@@ -1529,7 +1531,9 @@ games.")
                                 "libvpx"
                                 "libwebp"
                                 "opus"
-                                "zlib"))
+                                "pcre2"
+                                "zlib"
+                                "zstd"))
                     #t)))))
     (build-system scons-build-system)
     (arguments
@@ -1541,6 +1545,7 @@ games.")
                                '())
                            ;; Avoid using many of the bundled libs.
                            ;; Note: These options can be found in the SConstruct file.
+                           "builtin_bullet=no"
                            "builtin_freetype=no"
                            "builtin_glew=no"
                            "builtin_libmpdec=no"
@@ -1551,7 +1556,9 @@ games.")
                            "builtin_libvpx=no"
                            "builtin_libwebp=no"
                            "builtin_opus=no"
-                           "builtin_zlib=no")
+                           "builtin_pcre2=no"
+                           "builtin_zlib=no"
+                           "builtin_zstd=no")
        #:tests? #f ; There are no tests
        #:phases
        (modify-phases %standard-phases
@@ -1598,6 +1605,7 @@ games.")
                #t))))))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs `(("alsa-lib" ,alsa-lib)
+              ("bullet" ,bullet)
               ("freetype" ,freetype)
               ("glew" ,glew)
               ("glu" ,glu)
@@ -1612,7 +1620,9 @@ games.")
               ("libxrandr" ,libxrandr)
               ("mesa" ,mesa)
               ("opusfile" ,opusfile)
-              ("pulseaudio" ,pulseaudio)))
+              ("pcre2" ,pcre2)
+              ("pulseaudio" ,pulseaudio)
+              ("zstd" ,zstd "lib")))
     (home-page "https://godotengine.org/")
     (synopsis "Advanced 2D and 3D game engine")
     (description
-- 
2.25.0





Information forwarded to guix-patches <at> gnu.org:
bug#39263; Package guix-patches. (Sat, 25 Jan 2020 09:17:01 GMT) Full text and rfc822 format available.

Message #14 received at 39263 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Timotej Lazar <timotej.lazar <at> araneo.si>
Cc: 39263 <at> debbugs.gnu.org
Subject: Re: [bug#39263] [PATCH 1/2] gnu: godot: Update to 3.1.2.
Date: Sat, 25 Jan 2020 09:16:08 +0000
[Message part 1 (text/plain, inline)]
Timotej Lazar <timotej.lazar <at> araneo.si> writes:

> * gnu/packages/game-development.scm (godot): Update to 3.1.2.
> [inputs]: Remove openssl, replaced by a (modified) bundled copy of mbedtls.
> [arguments](configure-flags): Remove builtin_openssl flag.
> [source]: Don’t try to remove the (now nonexistent) bundled openssl directory.
> ---
>  gnu/packages/game-development.scm | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
> index ee8dea23b5..79e3f6dc6c 100644
> --- a/gnu/packages/game-development.scm
> +++ b/gnu/packages/game-development.scm
> @@ -18,6 +18,7 @@
>  ;;; Copyright © 2019, 2020 Leo Prikler <leo.prikler <at> student.tugraz.at>
>  ;;; Copyright © 2019 Jethro Cao <jethrocao <at> gmail.com>
>  ;;; Copyright © 2020 Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
> +;;; Copyright © 2020 Timotej Lazar <timotej.lazar <at> araneo.si>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -1503,7 +1504,7 @@ games.")
>  (define-public godot
>    (package
>      (name "godot")
> -    (version "3.0.6")
> +    (version "3.1.2")
>      (source (origin
>                (method git-fetch)
>                (uri (git-reference
> @@ -1512,7 +1513,7 @@ games.")
>                (file-name (git-file-name name version))
>                (sha256
>                 (base32
> -                "0g64h0x8dlv6aa9ggfcidk2mknkfl5li7z1phcav8aqp9srj8avf"))
> +                "12305wj2i4067jc50l8r0wmb7zjcna24fli8vb8kiaild0jrlip6"))
>                (modules '((guix build utils)))
>                (snippet
>                 '(begin
> @@ -1527,7 +1528,6 @@ games.")
>                                  "libvorbis"
>                                  "libvpx"
>                                  "libwebp"
> -                                "openssl"
>                                  "opus"
>                                  "zlib"))
>                      #t)))))
> @@ -1550,7 +1550,6 @@ games.")
>                             "builtin_libvorbis=no"
>                             "builtin_libvpx=no"
>                             "builtin_libwebp=no"
> -                           "builtin_openssl=no"
>                             "builtin_opus=no"
>                             "builtin_zlib=no")
>         #:tests? #f ; There are no tests
> @@ -1612,7 +1611,6 @@ games.")
>                ("libxinerama" ,libxinerama)
>                ("libxrandr" ,libxrandr)
>                ("mesa" ,mesa)
> -              ("openssl" ,openssl)
>                ("opusfile" ,opusfile)
>                ("pulseaudio" ,pulseaudio)))
>      (home-page "https://godotengine.org/")

I did have a look if the package builds with the mbedtls-apache package,
rather than using the included source code, and it looks to. Although
I'm aware that [1] says there are modifications.

1: https://github.com/godotengine/godot/tree/master/thirdparty#mbedtls
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#39263; Package guix-patches. (Sat, 25 Jan 2020 09:19:02 GMT) Full text and rfc822 format available.

Message #17 received at 39263 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Timotej Lazar <timotej.lazar <at> araneo.si>
Cc: 39263 <at> debbugs.gnu.org
Subject: Re: [bug#39263] [PATCH 2/2] gnu: godot: Unbundle some dependencies.
Date: Sat, 25 Jan 2020 09:18:33 +0000
[Message part 1 (text/plain, inline)]
Timotej Lazar <timotej.lazar <at> araneo.si> writes:

> * gnu/packages/game-development.scm (godot)[inputs]: Add bullet, pcre2, zstd.
> [arguments](configure-flags): Use system libraries for the above.
> [source](snippet): Remove bundled copies.
> ---

Generally, this is good :)

>  gnu/packages/game-development.scm | 18 ++++++++++++++----
>  1 file changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
> index 79e3f6dc6c..9ded71375f 100644
> --- a/gnu/packages/game-development.scm
> +++ b/gnu/packages/game-development.scm
> @@ -78,6 +78,7 @@
>    #:use-module (gnu packages multiprecision)
>    #:use-module (gnu packages music)
>    #:use-module (gnu packages ncurses)
> +  #:use-module (gnu packages pcre)
>    #:use-module (gnu packages pkg-config)
>    #:use-module (gnu packages pulseaudio)
>    #:use-module (gnu packages python)
> @@ -1521,7 +1522,8 @@ games.")
>                    ;; of these may be modified; see "thirdparty/README.md".
>                    (with-directory-excursion "thirdparty"
>                      (for-each delete-file-recursively
> -                              '("freetype"
> +                              '("bullet"
> +                                "freetype"
>                                  "libogg"
>                                  "libpng"
>                                  "libtheora"
> @@ -1529,7 +1531,9 @@ games.")
>                                  "libvpx"
>                                  "libwebp"
>                                  "opus"
> -                                "zlib"))
> +                                "pcre2"
> +                                "zlib"
> +                                "zstd"))
>                      #t)))))

One thought I had here is that it would be more rigorous to have a list
of directories that are kept, and anything not on the list is
deleted. That way it's harder for new thirdparty dependencies to sneak
in. Not something that necessarily needs changing now though.

>      (build-system scons-build-system)
>      (arguments
> @@ -1541,6 +1545,7 @@ games.")
>                                 '())
>                             ;; Avoid using many of the bundled libs.
>                             ;; Note: These options can be found in the SConstruct file.
> +                           "builtin_bullet=no"
>                             "builtin_freetype=no"
>                             "builtin_glew=no"
>                             "builtin_libmpdec=no"
> @@ -1551,7 +1556,9 @@ games.")
>                             "builtin_libvpx=no"
>                             "builtin_libwebp=no"
>                             "builtin_opus=no"
> -                           "builtin_zlib=no")
> +                           "builtin_pcre2=no"
> +                           "builtin_zlib=no"
> +                           "builtin_zstd=no")
>         #:tests? #f ; There are no tests
>         #:phases
>         (modify-phases %standard-phases
> @@ -1598,6 +1605,7 @@ games.")
>                 #t))))))
>      (native-inputs `(("pkg-config" ,pkg-config)))
>      (inputs `(("alsa-lib" ,alsa-lib)
> +              ("bullet" ,bullet)
>                ("freetype" ,freetype)
>                ("glew" ,glew)
>                ("glu" ,glu)
> @@ -1612,7 +1620,9 @@ games.")
>                ("libxrandr" ,libxrandr)
>                ("mesa" ,mesa)
>                ("opusfile" ,opusfile)
> -              ("pulseaudio" ,pulseaudio)))
> +              ("pcre2" ,pcre2)
> +              ("pulseaudio" ,pulseaudio)
> +              ("zstd" ,zstd "lib")))
>      (home-page "https://godotengine.org/")
>      (synopsis "Advanced 2D and 3D game engine")
>      (description
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#39263; Package guix-patches. (Tue, 28 Jan 2020 18:19:02 GMT) Full text and rfc822 format available.

Message #20 received at 39263 <at> debbugs.gnu.org (full text, mbox):

From: Timotej Lazar <timotej.lazar <at> araneo.si>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 39263 <at> debbugs.gnu.org
Subject: Re: [bug#39263] [PATCH 2/2] gnu: godot: Unbundle some dependencies.
Date: Tue, 28 Jan 2020 19:18:09 +0100
Thanks for the feedback! I am sending updated patches after this reply.

Christopher Baines <mail <at> cbaines.net> [2020-01-25 09:16:08+0000]:
> I did have a look if the package builds with the mbedtls-apache
> package, rather than using the included source code, and it looks to.
> Although I'm aware that [1] says there are modifications.

The two Godot patches for mbedtls don’t seem to be relevant to Guix, so
I replaced the bundled copy with the mbedtls-apache package. I don’t
have a use case to test this, but the minimal example from the
HTTPRequest tutorial seems to work OK with an HTTPS URI.

Christopher Baines <mail <at> cbaines.net> [2020-01-25 09:18:33+0000]:
> One thought I had here is that it would be more rigorous to have a list
> of directories that are kept, and anything not on the list is deleted.
> That way it's harder for new thirdparty dependencies to sneak in.

Makes sense. As you suggest, I flipped the logic for removing thirdparty
files: whitelist preserved files and remove everything else. The snippet
can only preserve direct children of the thirdparty/ directory, which
keeps it simple but perhaps not flexible enough in the long run.

Do we generally prefer whitelisting bundled files? Most packages I have
seen (and written) do the opposite and list the files to remove. Maybe
we could add a guideline somewhere? Or point me to the one I missed. :)




Information forwarded to guix-patches <at> gnu.org:
bug#39263; Package guix-patches. (Tue, 28 Jan 2020 18:26:01 GMT) Full text and rfc822 format available.

Message #23 received at 39263 <at> debbugs.gnu.org (full text, mbox):

From: Timotej Lazar <timotej.lazar <at> araneo.si>
To: 39263 <at> debbugs.gnu.org
Cc: Timotej Lazar <timotej.lazar <at> araneo.si>
Subject: [PATCH v2 1/3] gnu: godot: Update to 3.1.2.
Date: Tue, 28 Jan 2020 19:25:38 +0100
* gnu/packages/game-development.scm (godot): Update to 3.1.2.
[inputs]: Remove openssl, replaced by a bundled copy of mbedtls.
[arguments](configure-flags): Remove builtin_openssl flag.
[source]: Don’t try to remove the (now nonexistent) bundled openssl directory.
---
 gnu/packages/game-development.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 13006f3509..49e18602a0 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -18,6 +18,7 @@
 ;;; Copyright © 2019, 2020 Leo Prikler <leo.prikler <at> student.tugraz.at>
 ;;; Copyright © 2019 Jethro Cao <jethrocao <at> gmail.com>
 ;;; Copyright © 2020 Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
+;;; Copyright © 2020 Timotej Lazar <timotej.lazar <at> araneo.si>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1503,7 +1504,7 @@ games.")
 (define-public godot
   (package
     (name "godot")
-    (version "3.0.6")
+    (version "3.1.2")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -1512,7 +1513,7 @@ games.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0g64h0x8dlv6aa9ggfcidk2mknkfl5li7z1phcav8aqp9srj8avf"))
+                "12305wj2i4067jc50l8r0wmb7zjcna24fli8vb8kiaild0jrlip6"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -1527,7 +1528,6 @@ games.")
                                 "libvorbis"
                                 "libvpx"
                                 "libwebp"
-                                "openssl"
                                 "opus"
                                 "zlib"))
                     #t)))))
@@ -1550,7 +1550,6 @@ games.")
                            "builtin_libvorbis=no"
                            "builtin_libvpx=no"
                            "builtin_libwebp=no"
-                           "builtin_openssl=no"
                            "builtin_opus=no"
                            "builtin_zlib=no")
        #:tests? #f ; There are no tests
@@ -1612,7 +1611,6 @@ games.")
               ("libxinerama" ,libxinerama)
               ("libxrandr" ,libxrandr)
               ("mesa" ,mesa)
-              ("openssl" ,openssl)
               ("opusfile" ,opusfile)
               ("pulseaudio" ,pulseaudio)))
     (home-page "https://godotengine.org/")
-- 
2.25.0





Information forwarded to guix-patches <at> gnu.org:
bug#39263; Package guix-patches. (Tue, 28 Jan 2020 18:26:02 GMT) Full text and rfc822 format available.

Message #26 received at 39263 <at> debbugs.gnu.org (full text, mbox):

From: Timotej Lazar <timotej.lazar <at> araneo.si>
To: 39263 <at> debbugs.gnu.org
Cc: Timotej Lazar <timotej.lazar <at> araneo.si>
Subject: [PATCH v2 2/3] gnu: godot: Unbundle some dependencies.
Date: Tue, 28 Jan 2020 19:25:39 +0100
* gnu/packages/game-development.scm (godot)[inputs]: Add bullet, mbedtls-apache,
pcre2 and zstd.
[arguments](configure-flags): Use system libraries for the above.
[source](snippet): Remove bundled copies.
---
 gnu/packages/game-development.scm | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 49e18602a0..0ef9fcc7dd 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -78,6 +78,7 @@
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages music)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages pcre)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
@@ -1521,15 +1522,19 @@ games.")
                   ;; of these may be modified; see "thirdparty/README.md".
                   (with-directory-excursion "thirdparty"
                     (for-each delete-file-recursively
-                              '("freetype"
+                              '("bullet"
+                                "freetype"
                                 "libogg"
                                 "libpng"
                                 "libtheora"
                                 "libvorbis"
                                 "libvpx"
                                 "libwebp"
+                                "mbedtls"
                                 "opus"
-                                "zlib"))
+                                "pcre2"
+                                "zlib"
+                                "zstd"))
                     #t)))))
     (build-system scons-build-system)
     (arguments
@@ -1541,6 +1546,7 @@ games.")
                                '())
                            ;; Avoid using many of the bundled libs.
                            ;; Note: These options can be found in the SConstruct file.
+                           "builtin_bullet=no"
                            "builtin_freetype=no"
                            "builtin_glew=no"
                            "builtin_libmpdec=no"
@@ -1550,8 +1556,11 @@ games.")
                            "builtin_libvorbis=no"
                            "builtin_libvpx=no"
                            "builtin_libwebp=no"
+                           "builtin_mbedtls=no"
                            "builtin_opus=no"
-                           "builtin_zlib=no")
+                           "builtin_pcre2=no"
+                           "builtin_zlib=no"
+                           "builtin_zstd=no")
        #:tests? #f ; There are no tests
        #:phases
        (modify-phases %standard-phases
@@ -1598,6 +1607,7 @@ games.")
                #t))))))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs `(("alsa-lib" ,alsa-lib)
+              ("bullet" ,bullet)
               ("freetype" ,freetype)
               ("glew" ,glew)
               ("glu" ,glu)
@@ -1610,9 +1620,12 @@ games.")
               ("libxi" ,libxi)
               ("libxinerama" ,libxinerama)
               ("libxrandr" ,libxrandr)
+              ("mbedtls" ,mbedtls-apache)
               ("mesa" ,mesa)
               ("opusfile" ,opusfile)
-              ("pulseaudio" ,pulseaudio)))
+              ("pcre2" ,pcre2)
+              ("pulseaudio" ,pulseaudio)
+              ("zstd" ,zstd "lib")))
     (home-page "https://godotengine.org/")
     (synopsis "Advanced 2D and 3D game engine")
     (description
-- 
2.25.0





Information forwarded to guix-patches <at> gnu.org:
bug#39263; Package guix-patches. (Tue, 28 Jan 2020 18:26:02 GMT) Full text and rfc822 format available.

Message #29 received at 39263 <at> debbugs.gnu.org (full text, mbox):

From: Timotej Lazar <timotej.lazar <at> araneo.si>
To: 39263 <at> debbugs.gnu.org
Cc: Timotej Lazar <timotej.lazar <at> araneo.si>
Subject: [PATCH v2 3/3] gnu: godot: List which third party files to keep.
Date: Tue, 28 Jan 2020 19:25:40 +0100
Remove everything else to catch added dependencies in new versions.

* gnu/packages/game-development.scm (godot)[source](snippet): Instead of
  removing (only) the unbundled libs, remove everything except the listed files.
---
 gnu/packages/game-development.scm | 51 ++++++++++++++++++++-----------
 1 file changed, 33 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 0ef9fcc7dd..517d91df54 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1515,27 +1515,42 @@ games.")
               (sha256
                (base32
                 "12305wj2i4067jc50l8r0wmb7zjcna24fli8vb8kiaild0jrlip6"))
-              (modules '((guix build utils)))
+              (modules '((guix build utils)
+                         (ice-9 ftw)
+                         (srfi srfi-1)))
               (snippet
                '(begin
-                  ;; Drop libraries that we take from Guix.  Note that some
-                  ;; of these may be modified; see "thirdparty/README.md".
+                  ;; Keep only those bundled files we have not (yet) replaced
+                  ;; with Guix versions. Note that some of these may be
+                  ;; modified; see "thirdparty/README.md".
                   (with-directory-excursion "thirdparty"
-                    (for-each delete-file-recursively
-                              '("bullet"
-                                "freetype"
-                                "libogg"
-                                "libpng"
-                                "libtheora"
-                                "libvorbis"
-                                "libvpx"
-                                "libwebp"
-                                "mbedtls"
-                                "opus"
-                                "pcre2"
-                                "zlib"
-                                "zstd"))
-                    #t)))))
+                    (let* ((preserved-files
+                            '("README.md"
+                              "b2d_convexdecomp"
+                              "certs"
+                              "cvtt"
+                              "enet"
+                              "etc2comp"
+                              "fonts"
+                              "glad"
+                              "jpeg-compressor"
+                              "libsimplewebm"
+                              "libwebsockets"
+                              "miniupnpc"
+                              "minizip"
+                              "misc"
+                              "nanosvg"
+                              "pvrtccompressor"
+                              "recastnavigation"
+                              "squish"
+                              "thekla_atlas"
+                              "tinyexr"
+                              "xatlas")))
+                      (for-each delete-file-recursively
+                                (lset-difference string=?
+                                                 (scandir ".")
+                                                 (cons* "." ".." preserved-files)))))
+                  #t))))
     (build-system scons-build-system)
     (arguments
      `(#:scons ,scons-python2
-- 
2.25.0





Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Wed, 29 Jan 2020 08:01:01 GMT) Full text and rfc822 format available.

Notification sent to Timotej Lazar <timotej.lazar <at> araneo.si>:
bug acknowledged by developer. (Wed, 29 Jan 2020 08:01:02 GMT) Full text and rfc822 format available.

Message #34 received at 39263-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Timotej Lazar <timotej.lazar <at> araneo.si>
Cc: 39263-done <at> debbugs.gnu.org
Subject: Re: [bug#39263] [PATCH 2/2] gnu: godot: Unbundle some dependencies.
Date: Wed, 29 Jan 2020 08:00:27 +0000
[Message part 1 (text/plain, inline)]
Timotej Lazar <timotej.lazar <at> araneo.si> writes:

> Thanks for the feedback! I am sending updated patches after this reply.
>
> Christopher Baines <mail <at> cbaines.net> [2020-01-25 09:16:08+0000]:
>> I did have a look if the package builds with the mbedtls-apache
>> package, rather than using the included source code, and it looks to.
>> Although I'm aware that [1] says there are modifications.
>
> The two Godot patches for mbedtls don’t seem to be relevant to Guix, so
> I replaced the bundled copy with the mbedtls-apache package. I don’t
> have a use case to test this, but the minimal example from the
> HTTPRequest tutorial seems to work OK with an HTTPS URI.

Wonderful :)

> Christopher Baines <mail <at> cbaines.net> [2020-01-25 09:18:33+0000]:
>> One thought I had here is that it would be more rigorous to have a list
>> of directories that are kept, and anything not on the list is deleted.
>> That way it's harder for new thirdparty dependencies to sneak in.
>
> Makes sense. As you suggest, I flipped the logic for removing thirdparty
> files: whitelist preserved files and remove everything else. The snippet
> can only preserve direct children of the thirdparty/ directory, which
> keeps it simple but perhaps not flexible enough in the long run.

Great, this looks really useful.

> Do we generally prefer whitelisting bundled files? Most packages I have
> seen (and written) do the opposite and list the files to remove. Maybe
> we could add a guideline somewhere? Or point me to the one I missed. :)

I don't know if it's written down somewhere, all I can say is it
occurred to me when looking at the package definition.

I've pushed the 3 latest patches you sent to master, so they're included
in 18f8e935e85a99d5c284c0a6b719351a402ada21.

Thanks,

Chris
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 26 Feb 2020 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 32 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.