From cc0af506533bfb9aad495f45ed4b2b5d72615239e7122500b0df127362f0ec28 Mon Sep 17 00:00:00 2001 From: Max Mitschke Date: Fri, 23 Apr 2021 15:49:43 +0000 Subject: [PATCH 1/2] Accepting request 887901 from home:cunix:godot Update to 3.3 OBS-URL: https://build.opensuse.org/request/show/887901 OBS-URL: https://build.opensuse.org/package/show/games/godot?expand=0&rev=22 --- _constraints | 3 + godot-3.2.3-stable.tar.xz | 3 - godot-3.2.3-stable.tar.xz.sha256 | 1 - godot-3.3-stable.tar.xz | 3 + godot-3.3-stable.tar.xz.sha256 | 1 + godot.changes | 72 ++++++++++++++++++++ godot.spec | 17 ++--- linker_pie_flag.patch | 14 ++-- upstream_fix_TGA_loader.patch | 113 ------------------------------- use_system_zlib_for_fbx.patch | 28 ++++++++ 10 files changed, 123 insertions(+), 132 deletions(-) delete mode 100644 godot-3.2.3-stable.tar.xz delete mode 100644 godot-3.2.3-stable.tar.xz.sha256 create mode 100644 godot-3.3-stable.tar.xz create mode 100644 godot-3.3-stable.tar.xz.sha256 delete mode 100644 upstream_fix_TGA_loader.patch create mode 100644 use_system_zlib_for_fbx.patch diff --git a/_constraints b/_constraints index d8bf233..eb2fe07 100644 --- a/_constraints +++ b/_constraints @@ -4,5 +4,8 @@ 8192 + + 10 + diff --git a/godot-3.2.3-stable.tar.xz b/godot-3.2.3-stable.tar.xz deleted file mode 100644 index 8dfe164..0000000 --- a/godot-3.2.3-stable.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:85fd73d742cc64887056a232f8f7a622112e78b51f31d4d08db0f982e5f3a023 -size 14360332 diff --git a/godot-3.2.3-stable.tar.xz.sha256 b/godot-3.2.3-stable.tar.xz.sha256 deleted file mode 100644 index 72b4cfa..0000000 --- a/godot-3.2.3-stable.tar.xz.sha256 +++ /dev/null @@ -1 +0,0 @@ -85fd73d742cc64887056a232f8f7a622112e78b51f31d4d08db0f982e5f3a023 godot-3.2.3-stable.tar.xz diff --git a/godot-3.3-stable.tar.xz b/godot-3.3-stable.tar.xz new file mode 100644 index 0000000..d83b4eb --- /dev/null +++ b/godot-3.3-stable.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fcbbc6aaab16059e6622482c3358d58098d34ed51e099c854ec0ad79f466d555 +size 20581028 diff --git a/godot-3.3-stable.tar.xz.sha256 b/godot-3.3-stable.tar.xz.sha256 new file mode 100644 index 0000000..73676b1 --- /dev/null +++ b/godot-3.3-stable.tar.xz.sha256 @@ -0,0 +1 @@ +fcbbc6aaab16059e6622482c3358d58098d34ed51e099c854ec0ad79f466d555 godot-3.3-stable.tar.xz diff --git a/godot.changes b/godot.changes index 8ee7f73..b2c27e2 100644 --- a/godot.changes +++ b/godot.changes @@ -1,3 +1,75 @@ +------------------------------------------------------------------- +Thu Apr 22 12:00:00 UTC 2021 - cunix@mail.de + +- Update to 3.3 + + Added: + * MP3 loading and playback support + * AudioEffectCapture to access the microphone in real-time + * New dynamic BVH for rendering and the GodotPhysics backends + * Ability to restore RandomNumberGenerator state + * "Array.append_array()" method to append an array + at the end of another array + * "OS.set_environment()" method to set environment variables + * Infinite 3D editor grid + * New 3D rotation gizmo + * Support for copy-pasting nodes + * Detect external modification of scenes and prompt for reloading + * New editor to configure default import presets + * 3D viewport's View Information pane displays viewport resolution + * Minimap support in GraphEdit + * New AspectRatioContainer Control node + * Rewritten and greatly improved FBX importer + * "Keep" mode to keep files as-is and export them + * Mouse event pass-through support for the window + * Support for pause-aware picking (breaks compatibility but only + enabled by default for new projects) + * CollisionObject can now display collision shape meshes + * Cylinder collision shape support + * PulseAudio and ALSA libraries are now dynamically loaded + * Implement the "--no-window" command line argument + * 2D batching for GLES3 + * Configurable amount of lights per object + * New CPU lightmapper + * Anisotropic filtering now works when using the GLES2 backend + + Changed: + * Deleted object access now raises an error instead of a warning + * Improved error messages when passing nonexistent node paths + to "get_node()" + * Modernized multi-threading APIs + * SVG images can now be used as a project icon + * Improved inspector subresource editing visibility + * Pressed CheckButtons are now colored in blue for easier recognition + * Rename Node is now bound to "F2" key + * Search Help shortcut from keys "Shift + F1" changed to "F1" + * The inspector now allows using a comma as a decimal separator + * Drag-and-dropping a ZIP archive to the project manager window + will now prompt for importing it + * Increase the default HTTPClient download chunk size to 64 KiB + * Binaries are now stripped of string and symbol tables, + reducing their size significantly + + Removed: + * ResourceImporterCSV importer superseded by the new "keep" import mode + + Fixed: + * Use higher-quality resampling for Ogg Vorbis and MP3 sounds + * exporting if the temporary export directory doesn't exist yet + * Export PCK/ZIP action now obeys the export path configured + in the export preset as expected + * UDP ports being silently reused without an error in PacketPeerUDP + * keyboard input lag and clipboard delay issues + + And more: + https://downloads.tuxfamily.org/godotengine/3.3/Godot_v3.3-stable_changelog_chrono.txt + +- "linker_pie_flag.patch" rebased + +- "upstream_fix_TGA_loader.patch" dropped - included in source now + +- "use_system_zlib_for_fbx.patch" added to force using system zlib + ------------------------------------------------------------------- Sat Feb 13 00:00:00 UTC 2021 - cunix@mail.de diff --git a/godot.spec b/godot.spec index 02fa644..294121e 100644 --- a/godot.spec +++ b/godot.spec @@ -24,7 +24,7 @@ %define ca_bundle %{_localstatedir}/lib/ca-certificates/ca-bundle.pem Name: godot -Version: 3.2.3 +Version: 3.3 Release: 0 Summary: Cross-Platform Game Engine with an Integrated Editor License: MIT @@ -36,9 +36,8 @@ Source1: https://downloads.tuxfamily.org/godotengine/%{version}/%{name}-% Patch0: linker_pie_flag.patch # Use system certificates as fallback for certificates Patch1: certs_fallback.patch -# PATCH-FIX-UPSTREAM upstream_fix_TGA_loader.patch boo#1182177 boo#1182178 -# commit 113b5ab1c45c01b8e6d54d13ac8876d091f883a8 -Patch2: upstream_fix_TGA_loader.patch +# Do not use zlib from thirdparty directory +Patch2: use_system_zlib_for_fbx.patch BuildRequires: Mesa-devel BuildRequires: desktop-file-utils BuildRequires: fdupes @@ -103,7 +102,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build # Has some modifications for IPv6 support, upstream enet is unresponsive # Should not be unbundled. -Provides: bundled(enet) = 1.3.15 +Provides: bundled(enet) = 1.3.17 # Has custom changes to support seeking in zip archives # Should not be unbundled. @@ -113,6 +112,7 @@ Provides: bundled(FastLZ) Provides: bundled(Tangent_Space_Normal_Maps) Provides: bundled(cvtt) Provides: bundled(easing) +Provides: bundled(embree) Provides: bundled(etc2comp) Provides: bundled(glad) Provides: bundled(google-droid-fonts) @@ -122,6 +122,7 @@ Provides: bundled(ifaddrs-android) Provides: bundled(jpeg-compressor) Provides: bundled(libsimplewebm) Provides: bundled(noto-sans-fonts) +Provides: bundled(oidn) Provides: bundled(open-simplex-noise-in-c) Provides: bundled(pcg) Provides: bundled(polyclipping) @@ -139,16 +140,12 @@ Provides: bundled(recastnavigation) Provides: bundled(squish) = 1.15 Provides: bundled(xatlas) -## Need to update in Factory ## -# Possibility to unbundle disabled in 3.2.1 -Provides: bundled(assimp) - %if 0%{?suse_version} > 1500 %else Provides: bundled(bullet) = 2.89 Provides: bundled(libzstd) %if 0%{?sle_version} < 150200 -Provides: bundled(mbedtls) = 2.16.8 +Provides: bundled(mbedtls) = 2.16.10 %endif %if !0%{?is_opensuse} # SLES seems not to have miniupnpc and wslay diff --git a/linker_pie_flag.patch b/linker_pie_flag.patch index 430d1c6..c5bd491 100644 --- a/linker_pie_flag.patch +++ b/linker_pie_flag.patch @@ -5,7 +5,7 @@ References: https://github.com/godotengine/godot/pull/23542#issuecomment-4363858 https://github.com/godotengine/godot/pull/23542 https://github.com/godotengine/godot/issues/34533 Upstream: seems to do the opposite -Rebased: 2020-06-25 +Rebased: 2021-04-22 Linker flag "-no-pie" is added by upstream. rpmlint complains this violates project policy. @@ -13,10 +13,12 @@ Patch replaces flag "-no-pie" with "-pie". --- -diff -Naur a/platform/x11/detect.py b/platform/x11/detect.py ---- a/platform/x11/detect.py 2020-06-26 12:57:27.036237658 -0400 -+++ b/platform/x11/detect.py 2020-06-26 12:57:50.187746327 -0400 -@@ -185,7 +185,7 @@ +diff -r -U 5 a/platform/x11/detect.py b/platform/x11/detect.py +--- a/platform/x11/detect.py ++++ b/platform/x11/detect.py +@@ -199,11 +199,11 @@ + # Check for gcc version >= 6 before adding -no-pie + version = get_compiler_version(env) or [-1, -1] if using_gcc(env): if version[0] >= 6: env.Append(CCFLAGS=["-fpie"]) @@ -25,3 +27,5 @@ diff -Naur a/platform/x11/detect.py b/platform/x11/detect.py # Do the same for clang should be fine with Clang 4 and higher if using_clang(env): if version[0] >= 4: + env.Append(CCFLAGS=["-fpie"]) + env.Append(LINKFLAGS=["-no-pie"]) diff --git a/upstream_fix_TGA_loader.patch b/upstream_fix_TGA_loader.patch deleted file mode 100644 index 77d3aa0..0000000 --- a/upstream_fix_TGA_loader.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 113b5ab1c45c01b8e6d54d13ac8876d091f883a8 Mon Sep 17 00:00:00 2001 -From: Hein-Pieter van Braam-Stewart -Date: Thu, 4 Feb 2021 12:56:33 +0100 -Subject: [PATCH] Fix a crash in the TGA loader with malformed input -Upstream: merged security fix - ---- - modules/tga/image_loader_tga.cpp | 25 ++++++++++++++++++++++--- - modules/tga/image_loader_tga.h | 2 +- - 2 files changed, 23 insertions(+), 4 deletions(-) - -diff --git a/modules/tga/image_loader_tga.cpp b/modules/tga/image_loader_tga.cpp -index d60efdd5bcc..964dc091a7d 100644 ---- a/modules/tga/image_loader_tga.cpp -+++ b/modules/tga/image_loader_tga.cpp -@@ -55,6 +55,10 @@ Error ImageLoaderTGA::decode_tga_rle(const uint8_t *p_compressed_buffer, size_t - compressed_pos += 1; - count = (c & 0x7f) + 1; - -+ if (output_pos + count * p_pixel_size > output_pos) { -+ return ERR_PARSE_ERROR; -+ } -+ - if (c & 0x80) { - for (size_t i = 0; i < p_pixel_size; i++) { - pixels_w.ptr()[i] = p_compressed_buffer[compressed_pos]; -@@ -78,7 +82,7 @@ Error ImageLoaderTGA::decode_tga_rle(const uint8_t *p_compressed_buffer, size_t - return OK; - } - --Error ImageLoaderTGA::convert_to_image(Ref p_image, const uint8_t *p_buffer, const tga_header_s &p_header, const uint8_t *p_palette, const bool p_is_monochrome) { -+Error ImageLoaderTGA::convert_to_image(Ref p_image, const uint8_t *p_buffer, const tga_header_s &p_header, const uint8_t *p_palette, const bool p_is_monochrome, size_t p_output_size) { - - #define TGA_PUT_PIXEL(r, g, b, a) \ - int image_data_ofs = ((y * width) + x); \ -@@ -130,6 +134,9 @@ Error ImageLoaderTGA::convert_to_image(Ref p_image, const uint8_t *p_buff - if (p_is_monochrome) { - while (y != y_end) { - while (x != x_end) { -+ if (i > p_output_size) { -+ return ERR_PARSE_ERROR; -+ } - uint8_t shade = p_buffer[i]; - - TGA_PUT_PIXEL(shade, shade, shade, 0xff) -@@ -143,6 +150,9 @@ Error ImageLoaderTGA::convert_to_image(Ref p_image, const uint8_t *p_buff - } else { - while (y != y_end) { - while (x != x_end) { -+ if (i > p_output_size) { -+ return ERR_PARSE_ERROR; -+ } - uint8_t index = p_buffer[i]; - uint8_t r = 0x00; - uint8_t g = 0x00; -@@ -171,6 +181,10 @@ Error ImageLoaderTGA::convert_to_image(Ref p_image, const uint8_t *p_buff - } else if (p_header.pixel_depth == 24) { - while (y != y_end) { - while (x != x_end) { -+ if (i + 2 > p_output_size) { -+ return ERR_PARSE_ERROR; -+ } -+ - uint8_t r = p_buffer[i + 2]; - uint8_t g = p_buffer[i + 1]; - uint8_t b = p_buffer[i + 0]; -@@ -186,6 +200,10 @@ Error ImageLoaderTGA::convert_to_image(Ref p_image, const uint8_t *p_buff - } else if (p_header.pixel_depth == 32) { - while (y != y_end) { - while (x != x_end) { -+ if (i + 3 > p_output_size) { -+ return ERR_PARSE_ERROR; -+ } -+ - uint8_t a = p_buffer[i + 3]; - uint8_t r = p_buffer[i + 2]; - uint8_t g = p_buffer[i + 1]; -@@ -280,7 +298,7 @@ Error ImageLoaderTGA::load_image(Ref p_image, FileAccess *f, bool p_force - PoolVector::Read src_image_r = src_image.read(); - - const size_t pixel_size = tga_header.pixel_depth >> 3; -- const size_t buffer_size = (tga_header.image_width * tga_header.image_height) * pixel_size; -+ size_t buffer_size = (tga_header.image_width * tga_header.image_height) * pixel_size; - - PoolVector uncompressed_buffer; - uncompressed_buffer.resize(buffer_size); -@@ -299,11 +317,12 @@ Error ImageLoaderTGA::load_image(Ref p_image, FileAccess *f, bool p_force - } - } else { - buffer = src_image_r.ptr(); -+ buffer_size = src_image_len; - }; - - if (err == OK) { - PoolVector::Read palette_r = palette.read(); -- err = convert_to_image(p_image, buffer, tga_header, palette_r.ptr(), is_monochrome); -+ err = convert_to_image(p_image, buffer, tga_header, palette_r.ptr(), is_monochrome, buffer_size); - } - } - -diff --git a/modules/tga/image_loader_tga.h b/modules/tga/image_loader_tga.h -index 249e33411e7..bbfc3fed329 100644 ---- a/modules/tga/image_loader_tga.h -+++ b/modules/tga/image_loader_tga.h -@@ -73,7 +73,7 @@ class ImageLoaderTGA : public ImageFormatLoader { - uint8_t image_descriptor; - }; - static Error decode_tga_rle(const uint8_t *p_compressed_buffer, size_t p_pixel_size, uint8_t *p_uncompressed_buffer, size_t p_output_size); -- static Error convert_to_image(Ref p_image, const uint8_t *p_buffer, const tga_header_s &p_header, const uint8_t *p_palette, const bool p_is_monochrome); -+ static Error convert_to_image(Ref p_image, const uint8_t *p_buffer, const tga_header_s &p_header, const uint8_t *p_palette, const bool p_is_monochrome, size_t p_output_size); - - public: - virtual Error load_image(Ref p_image, FileAccess *f, bool p_force_linear, float p_scale); diff --git a/use_system_zlib_for_fbx.patch b/use_system_zlib_for_fbx.patch new file mode 100644 index 0000000..f808ef4 --- /dev/null +++ b/use_system_zlib_for_fbx.patch @@ -0,0 +1,28 @@ +From: cunix@mail.de +Date: 2021-04-22 12:00:00 +Subject: FBXParser should compile with system zlib +References: https://github.com/godotengine/godot/pull/48074 + +Although zlib is unbundled, FBXParser.cpp wants to use the bundled +header file. Fix this. + +Upstream patch probably included in 3.3.1. + +--- + +diff -r -U 5 a/modules/fbx/fbx_parser/FBXParser.cpp b/modules/fbx/fbx_parser/FBXParser.cpp +--- a/modules/fbx/fbx_parser/FBXParser.cpp ++++ b/modules/fbx/fbx_parser/FBXParser.cpp +@@ -72,11 +72,11 @@ + + /** @file FBXParser.cpp + * @brief Implementation of the FBX parser and the rudimentary DOM that we use + */ + +-#include "thirdparty/zlib/zlib.h" ++#include "/usr/include/zlib.h" + #include /* strtol */ + + #include "ByteSwapper.h" + #include "FBXParseTools.h" + #include "FBXParser.h" From f6427ede334e0451914352a016dd4d7c396c81b6311d7a5b2b01a565005970ea Mon Sep 17 00:00:00 2001 From: Max Mitschke Date: Mon, 26 Apr 2021 15:46:26 +0000 Subject: [PATCH 2/2] Accepting request 888247 from home:cunix:godot reduces godot binary size by 1.3 MiB. Still a few MB bigger than v3.2 builds. OBS-URL: https://build.opensuse.org/request/show/888247 OBS-URL: https://build.opensuse.org/package/show/games/godot?expand=0&rev=23 --- godot.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/godot.spec b/godot.spec index 294121e..0b62619 100644 --- a/godot.spec +++ b/godot.spec @@ -294,8 +294,8 @@ mkdir -pv thirdparty/certs touch thirdparty/certs/ca-certificates.crt %define build_args %{?_smp_mflags} \\\ - progress=yes verbose=yes udev=yes use_lto=1 \\\ - CCFLAGS='%{optflags}' \\\ + progress=no verbose=yes udev=yes use_lto=1 \\\ + use_static_cpp=no CCFLAGS='%{optflags}' \\\ system_certs_path=%{ca_bundle} $system_libs # Build graphical editor (tools)