From 83a66432e556ec4429f6ec024f9753e9e875010fec573bcfbb73244af691e512 Mon Sep 17 00:00:00 2001 From: c unix Date: Tue, 11 Feb 2020 23:10:18 +0000 Subject: [PATCH 1/3] Accepting request 773320 from home:demonpig:Games:Tools - Removed patch files as they are no longer needed - Removed export_presets.cfg file as games should supply this file - Update to v3.2 Added: * Support for importing 3D scense using Assimp * Support for high-level multiplayer API and NAT traversal for WebRTC * Support for enabling / disabling parts of the editor or specific nodes * Added language server for GDScript * Added version control integration into the editor * Added a network profiler * Editor is now capped to 20FPS when the window is unfocused * Added MSAA support in the GLES2 renderer * Ability to define script templates on a per-project basis * Ability to limit the minimum and maximum window size * Minimap in the script editor * CSV files can now be imported as non-translation files * Multicast support in PacketPeerUDP * WebSocket improvements. * Support for SSL in WebSocketServer. * WebSocketClient can now use custom SSL certificates (except on HTML5). * WebSocketClient can now define custom headers. * The editor now features a built-in Web server for testing HTML5 projects * Reimplemented support for embedding project data in the PCK file Changed: * Tabs and space indentation can no longer be mixed in the same GDScript file * assert() in GDScript must now always be used with parentheses * UDP broadcasting is now disabled by default and must be enabled by calling set_broadcast_enabled(true) on the PacketPeerUDP instance * 3D collision shapes and RayCasts are now drawn in gray when disabled * The SCons build system now automatically detects the host platform * Exporting a project PCK or ZIP from the command line must now be done with the new --export-pack command-line argument * Exported PCK files now contain the Godot patch version in their header * "Set as Main Scene" context option for scenes in the FileSystem dock Removed: * Unused Panel panelf and panelnc styles. * thekla_atlas dependency, as light baking now relies on xatlas for UV unwrapping. * Rating icons in the Asset Library * Some editor languages are no longer available due to missing support for RTL and text shaping in Godot. * Arabic * Bengali * Persian * Hebrew * Hindi * Malayalam * Sinhalese * Tamil * Telugu * Urdu * Android: ARMv6 support. * iOS: ARMv7 support. Fixed: * The Project Manager now remembers the sorting option that was previously set * Fixed issues with PBR environment mapping * Several fixes to the GLES2 renderer * Fixed importing BMP images * Exporting a project via the command-line now returns a non-zero exit code if an error occurred during exporting * Fixed autocompletion in the script editor And more: https://github.com/godotengine/godot/blob/3.2/CHANGELOG.md OBS-URL: https://build.opensuse.org/request/show/773320 OBS-URL: https://build.opensuse.org/package/show/games/godot?expand=0&rev=4 --- export_presets.cfg | 24 --------- fix-pie-warning.patch | 13 ----- godot-3.1.2-stable.tar.xz | 3 -- godot-3.1.2-stable.tar.xz.sha256 | 1 - godot-3.2-stable.tar.xz | 3 ++ godot-3.2-stable.tar.xz.sha256 | 1 + godot.changes | 82 +++++++++++++++++++++++++++++++ godot.spec | 84 ++++++++++++-------------------- project_certs_fallback.patch | 51 ------------------- 9 files changed, 117 insertions(+), 145 deletions(-) delete mode 100644 export_presets.cfg delete mode 100644 fix-pie-warning.patch delete mode 100644 godot-3.1.2-stable.tar.xz delete mode 100644 godot-3.1.2-stable.tar.xz.sha256 create mode 100644 godot-3.2-stable.tar.xz create mode 100644 godot-3.2-stable.tar.xz.sha256 delete mode 100644 project_certs_fallback.patch diff --git a/export_presets.cfg b/export_presets.cfg deleted file mode 100644 index 2e70dd2..0000000 --- a/export_presets.cfg +++ /dev/null @@ -1,24 +0,0 @@ -[preset.0] - -name="Linux/X11" -platform="Linux/X11" -runnable=true -custom_features="" -export_filter="all_resources" -include_filter="" -exclude_filter="" -export_path="" -patch_list=PoolStringArray( ) -script_export_mode=1 -script_encryption_key="" - -[preset.0.options] - -texture_format/bptc=false -texture_format/s3tc=true -texture_format/etc=false -texture_format/etc2=false -texture_format/no_bptc_fallbacks=true -binary_format/64_bits=true -custom_template/release="/usr/bin/godot-runner" -custom_template/debug="" \ No newline at end of file diff --git a/fix-pie-warning.patch b/fix-pie-warning.patch deleted file mode 100644 index 47ecc5c..0000000 --- a/fix-pie-warning.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/platform/x11/detect.py b/platform/x11/detect.py -index 28f5335..35892d8 100644 ---- a/platform/x11/detect.py -+++ b/platform/x11/detect.py -@@ -160,7 +160,7 @@ def configure(env): - version = get_compiler_version(env) - if version != None and version[0] >= '6': - env.Append(CCFLAGS=['-fpie']) -- env.Append(LINKFLAGS=['-no-pie']) -+ - # Do the same for clang should be fine with Clang 4 and higher - if using_clang(env): - version = get_compiler_version(env) diff --git a/godot-3.1.2-stable.tar.xz b/godot-3.1.2-stable.tar.xz deleted file mode 100644 index 6e2ce0b..0000000 --- a/godot-3.1.2-stable.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:44cccbeec37490768429d5adf1495cd904a195f56b7157308c5650e075d9b89e -size 13197308 diff --git a/godot-3.1.2-stable.tar.xz.sha256 b/godot-3.1.2-stable.tar.xz.sha256 deleted file mode 100644 index d97c79a..0000000 --- a/godot-3.1.2-stable.tar.xz.sha256 +++ /dev/null @@ -1 +0,0 @@ -44cccbeec37490768429d5adf1495cd904a195f56b7157308c5650e075d9b89e release-3.1.2-stable/godot-3.1.2-stable.tar.xz diff --git a/godot-3.2-stable.tar.xz b/godot-3.2-stable.tar.xz new file mode 100644 index 0000000..bba30d5 --- /dev/null +++ b/godot-3.2-stable.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:258e166a33f0d71aec59016d8e0d96342a0047a4d84aad2346c232bac8b3c0ce +size 14038472 diff --git a/godot-3.2-stable.tar.xz.sha256 b/godot-3.2-stable.tar.xz.sha256 new file mode 100644 index 0000000..62901df --- /dev/null +++ b/godot-3.2-stable.tar.xz.sha256 @@ -0,0 +1 @@ +258e166a33f0d71aec59016d8e0d96342a0047a4d84aad2346c232bac8b3c0ce godot-3.2-stable.tar.xz diff --git a/godot.changes b/godot.changes index 5e9d6bd..f7664bd 100644 --- a/godot.changes +++ b/godot.changes @@ -1,3 +1,85 @@ +------------------------------------------------------------------- +Sat Feb 1 04:33:27 UTC 2020 - Max Mitschke + +- Removed patch files as they are no longer needed +- Removed export_presets.cfg file as games should supply this file + +- Update to v3.2 + + Added: + * Support for importing 3D scense using Assimp + * Support for high-level multiplayer API and NAT traversal for + WebRTC + * Support for enabling / disabling parts of the editor or specific + nodes + * Added language server for GDScript + * Added version control integration into the editor + * Added a network profiler + * Editor is now capped to 20FPS when the window is unfocused + * Added MSAA support in the GLES2 renderer + * Ability to define script templates on a per-project basis + * Ability to limit the minimum and maximum window size + * Minimap in the script editor + * CSV files can now be imported as non-translation files + * Multicast support in PacketPeerUDP + * WebSocket improvements. + * Support for SSL in WebSocketServer. + * WebSocketClient can now use custom SSL certificates + (except on HTML5). + * WebSocketClient can now define custom headers. + * The editor now features a built-in Web server for testing HTML5 + projects + * Reimplemented support for embedding project data in the PCK file + + Changed: + * Tabs and space indentation can no longer be mixed in the same + GDScript file + * assert() in GDScript must now always be used with parentheses + * UDP broadcasting is now disabled by default and must be enabled + by calling + set_broadcast_enabled(true) on the PacketPeerUDP instance + * 3D collision shapes and RayCasts are now drawn in gray when disabled + * The SCons build system now automatically detects the host platform + * Exporting a project PCK or ZIP from the command line must now + be done with the new --export-pack command-line argument + * Exported PCK files now contain the Godot patch version in their + header + * "Set as Main Scene" context option for scenes in the FileSystem dock + + Removed: + + * Unused Panel panelf and panelnc styles. + * thekla_atlas dependency, as light baking now relies on xatlas + for UV unwrapping. + * Rating icons in the Asset Library + * Some editor languages are no longer available due to missing + support for RTL and text shaping in Godot. + * Arabic + * Bengali + * Persian + * Hebrew + * Hindi + * Malayalam + * Sinhalese + * Tamil + * Telugu + * Urdu + * Android: ARMv6 support. + * iOS: ARMv7 support. + + Fixed: + * The Project Manager now remembers the sorting option that was + previously set + * Fixed issues with PBR environment mapping + * Several fixes to the GLES2 renderer + * Fixed importing BMP images + * Exporting a project via the command-line now returns a non-zero + exit code if an error occurred during exporting + * Fixed autocompletion in the script editor + + And more: + https://github.com/godotengine/godot/blob/3.2/CHANGELOG.md + ------------------------------------------------------------------- Mon Jan 13 16:00:00 UTC 2020 - cunix@mail.de diff --git a/godot.spec b/godot.spec index 2358ae2..eefdc12 100644 --- a/godot.spec +++ b/godot.spec @@ -1,7 +1,7 @@ # # spec file for package godot # -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2020 SUSE LLC # Copyright (c) 2017 Luke Jones, luke.nukem.jones@gmail.com # # All modifications and additions to the file contributed by third parties @@ -21,7 +21,7 @@ %define ca_bundle /var/lib/ca-certificates/ca-bundle.pem Name: godot -Version: 3.1.2 +Version: 3.2 Release: 0 Summary: Cross-Platform Game Engine with an Integrated Editor License: MIT @@ -29,12 +29,7 @@ Group: Development/Tools/Other URL: https://godotengine.org/ Source0: https://downloads.tuxfamily.org/godotengine/%{version}/%{name}-%{version}-stable.tar.xz Source1: https://downloads.tuxfamily.org/godotengine/%{version}/%{name}-%{version}-stable.tar.xz.sha256 -Source2: export_presets.cfg Source3: %{name}-rpmlintrc -# PATCH-FIX-OPENSUSE Allows building all files with -lpie -Patch0: fix-pie-warning.patch -# Use system certificates as fallback for project certificates -Patch1: project_certs_fallback.patch BuildRequires: Mesa-devel BuildRequires: fdupes BuildRequires: gcc @@ -52,6 +47,7 @@ BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libwebp) +BuildRequires: pkgconfig(libwslay) BuildRequires: pkgconfig(ogg) BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(opus) @@ -67,9 +63,9 @@ BuildRequires: pkgconfig(xi) BuildRequires: pkgconfig(xinerama) BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(zlib) -%if %{suse_version} > 1500 -BuildRequires: mbedtls-devel -BuildRequires: pkgconfig(miniupnpc) +%if 0%{?suse_version} > 1500 +BuildRequires: pkgconfig(bullet) +BuildRequires: pkgconfig(libzstd) %endif Requires: ca-certificates Recommends: ca-certificates-mozilla @@ -84,37 +80,29 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build # Fedora Godot specfile. # Link: https://src.fedoraproject.org/rpms/godot/blob/master/f/godot.spec -# Git commit slightly newer than 2.87 -# Can be unbundled if bullet 2.88+ is available -Provides: bundled(bullet) = 2.88 - # Has some modifications for IPv6 support, upstream enet is unresponsive # Should not be unbundled. -Provides: bundled(enet) = 1.3.13 - -# Upstream commit from 2016, newer than 1.0.0.27 which is last tag -# Could be unbundled if packaged. -# Godot upstream will soon deprecate this "libsimplewebm" module. -Provides: bundled(libwebm) = 1.0.2 +Provides: bundled(enet) = 1.3.14 # Has custom changes to support seeking in zip archives # Should not be unbundled. Provides: bundled(minizip) = 1.2.11 -# Could be unbundled if packaged. -# Version: git (25241c5, 2019) +# Can be unbundled if packaged Provides: bundled(nanosvg) - -# Could be unbundled if packaged. Provides: bundled(squish) = 1.15 -# Can't be unbundled out-of-the-box as it uses experimental APIs available -# only to static linking. They're not critical features though and could -# maybe be patched away to link against a shared zstd. -Provides: bundled(zstd) = 1.4.4 +# Has custom changes +Provides: bundled(mbedtls) = 2.16.4 +Provides: bundled(miniupnpc) -# Has custom changes made to library to aid in build configurations -Provides: bundled(libwebsockets) = 3.0.1 +## Need to update in Factory ## +Provides: bundled(assimp) + +%if 0%{?suse_version} > 1500 +%else +Provides: bundled(bullet) = 2.89 +%endif %description Godot is a game engine. It provides a set of tools and a visually @@ -124,8 +112,8 @@ platforms. %package headless Summary: Headless version of Godot editor useful for command line Group: Development/Tools/Other -Requires: godot-rpm-macros -Requires: godot-runner +Requires: ca-certificates +Recommends: ca-certificates-mozilla %description headless This package is the headless version of the Godot editor that is suited for @@ -145,6 +133,8 @@ by pointing to the location of the game's data package. %package server Summary: Godot headless binary for servers Group: Amusements/Games/Other +Requires: ca-certificates +Recommends: ca-certificates-mozilla %description server This package contains the headless binary for the Godot game engine @@ -152,8 +142,6 @@ particularly suited for running dedicated servers. %prep %setup -q -n %{name}-%{version}-stable -%patch0 -p1 -%patch1 -p1 %build # Adding distribution name to build name @@ -167,11 +155,11 @@ particularly suited for running dedicated servers. # Configuring build to use some distribution libraries unbundle_libs=('certs' 'freetype' 'libogg' 'libpng' 'libtheora' 'libvorbis' \ - 'libwebp' 'opus' 'pcre2' 'zlib') + 'libwebp' 'opus' 'pcre2' 'wslay' 'zlib') # Unbundle more libs for Tumbleweed %if %{suse_version} > 1500 -unbundle_libs+=('mbedtls' 'miniupnpc') +unbundle_libs+=('bullet' 'zstd') %endif # Unbundle libvpx only if it doesn't meet the minimum requirement. @@ -197,17 +185,10 @@ rm -rf thirdparty/rtaudio mkdir -pv thirdparty/certs touch thirdparty/certs/ca-certificates.crt -# Common build arguments for all targets -%if %{suse_version} >= 1500 -%define use_lto use_lto=1 -%else -%define use_lto use_lto=0 -%endif - %define build_args %{?_smp_mflags} \\\ - progress=yes verbose=yes udev=yes %{use_lto} \\\ - CCFLAGS='%{optflags}' system_certs_path=%{ca_bundle} \\\ - $system_libs + progress=yes verbose=yes udev=yes use_lto=1 \\\ + CCFLAGS='%{optflags}' \\\ + system_certs_path=%{ca_bundle} $system_libs # Build graphical editor (tools) scons %{build_args} platform=x11 tools=yes target=release_debug @@ -234,7 +215,6 @@ install -D -p -m 755 bin/%{name}.x11.opt.%{__isa_bits} %{buildroot}%{_bindir}/%{ # Installing the server install -D -p -m 755 bin/%{name}_server.x11.opt.%{__isa_bits} %{buildroot}%{_bindir}/%{name}-server -install -D -p -m 644 %{S:2} %{buildroot}%{_datadir}/%{name}/export_presets.cfg install -D -p -m 644 misc/dist/linux/godot.6 %{buildroot}/%{_mandir}/man6/%{name}.6%{?ext_man} install -D -p -m 644 icon.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{name}.png install -D -p -m 644 icon.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg @@ -246,7 +226,7 @@ cp thirdparty/README.md thirdparty_README.md %files %license LICENSE.txt LOGO_LICENSE.md COPYRIGHT.txt thirdparty_README.md -%doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md ISSUE_TEMPLATE.md README.md +%doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md README.md CODE_OF_CONDUCT.md %dir %{_datadir}/icons/hicolor %dir %{_datadir}/icons/hicolor/256x256 %dir %{_datadir}/icons/hicolor/256x256/apps @@ -261,19 +241,17 @@ cp thirdparty/README.md thirdparty_README.md %files headless %license LICENSE.txt LOGO_LICENSE.md COPYRIGHT.txt thirdparty_README.md -%doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md ISSUE_TEMPLATE.md README.md -%dir %{_datadir}/%{name} +%doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md README.md CODE_OF_CONDUCT.md %{_bindir}/%{name}-headless -%{_datadir}/%{name}/export_presets.cfg %files runner %license LICENSE.txt LOGO_LICENSE.md COPYRIGHT.txt thirdparty_README.md -%doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md ISSUE_TEMPLATE.md README.md +%doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md README.md CODE_OF_CONDUCT.md %{_bindir}/%{name}-runner %files server %license LICENSE.txt LOGO_LICENSE.md COPYRIGHT.txt thirdparty_README.md -%doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md ISSUE_TEMPLATE.md README.md +%doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md README.md CODE_OF_CONDUCT.md %{_bindir}/%{name}-server %changelog diff --git a/project_certs_fallback.patch b/project_certs_fallback.patch deleted file mode 100644 index a0f0e1f..0000000 --- a/project_certs_fallback.patch +++ /dev/null @@ -1,51 +0,0 @@ -From: cunix@bitmessage.ch -Date: 2019-04-29 16:00:00 -Subject: System certs as fallback for project certs -References: https://github.com/godotengine/godot/pull/22066#issuecomment-421565719 - https://github.com/godotengine/godot/pull/22066#issuecomment-422528664 - https://github.com/godotengine/godot/issues/22232 -Upstream: might be offered to upstream - -If project has no value set for "network/ssl/certificates" (the default), -function "get_project_cert_array" returns no certificates because we don't -use builtin certs - BUILTIN_CERTS_ENABLED is not defined. Therefore the -editor shows an error. - -We use a distro specific "system_certs_path" as build option and apply it here -via "_SYSTEM_CERTS_PATH" (defined in included "core/io/certs_compressed.gen.h") -as fallback for project certificates. - ---- - -diff -r -U 5 a/core/io/stream_peer_ssl.cpp b/core/io/stream_peer_ssl.cpp ---- a/core/io/stream_peer_ssl.cpp -+++ b/core/io/stream_peer_ssl.cpp -@@ -33,10 +33,12 @@ - #include "core/io/certs_compressed.gen.h" - #include "core/io/compression.h" - #include "core/os/file_access.h" - #include "core/project_settings.h" - -+#include -+ - StreamPeerSSL *(*StreamPeerSSL::_create)() = NULL; - - StreamPeerSSL *StreamPeerSSL::create() { - - return _create(); -@@ -96,10 +98,14 @@ - ProjectSettings::get_singleton()->set_custom_property_info("network/ssl/certificates", PropertyInfo(Variant::STRING, "network/ssl/certificates", PROPERTY_HINT_FILE, "*.crt")); - - if (certs_path != "") { - // Use certs defined in project settings. - return get_cert_file_as_array(certs_path); -+ } else if (strcmp(_SYSTEM_CERTS_PATH, "") != 0) { -+ // Use system certs only if user did not override it in project settings -+ // and if _SYSTEM_CERTS_PATH is set. -+ return get_cert_file_as_array(_SYSTEM_CERTS_PATH); - } - #ifdef BUILTIN_CERTS_ENABLED - else { - // Use builtin certs only if user did not override it in project settings. - out.resize(_certs_uncompressed_size + 1); - From 1f1d01a3a7d545c1cdfdf96c4c508dbef5199b9bf97b2af5d17db5b03149033c Mon Sep 17 00:00:00 2001 From: Max Mitschke Date: Sat, 22 Feb 2020 19:13:51 +0000 Subject: [PATCH 2/3] Accepting request 777745 from home:cunix:godot - Added "linker_pie_flag.patch" in order to link with "-pie". Replaces previous "fix-pie-warning.patch". - "project_certs_fallback.patch" renamed to "certs_fallback.patch". Modified and adapted to Godot source code changes. - bash completion files "godot", "godot-headless", "godot-runner" and "godot-server" added. - Location of documentation in man page adjusted. - godot-rpmlintrc deleted with filter "no-manual-page-for-binary" because this warning doesn't seems to be thrown anymore. - Build option "faster_build" introduced to speed up build during tests. - Removed patch "fix-pie-warning.patch" OBS-URL: https://build.opensuse.org/request/show/777745 OBS-URL: https://build.opensuse.org/package/show/games/godot?expand=0&rev=5 --- certs_fallback.patch | 66 +++++++++++++++++++ godot-rpmlintrc | 2 - godot.changes | 24 ++++++- godot.spec | 145 ++++++++++++++++++++++++++++++++++-------- linker_pie_flag.patch | 30 +++++++++ 5 files changed, 236 insertions(+), 31 deletions(-) create mode 100644 certs_fallback.patch delete mode 100644 godot-rpmlintrc create mode 100644 linker_pie_flag.patch diff --git a/certs_fallback.patch b/certs_fallback.patch new file mode 100644 index 0000000..361e829 --- /dev/null +++ b/certs_fallback.patch @@ -0,0 +1,66 @@ +From: cunix@mail.de +Date: 2019-04-29 16:00:00 +Subject: System certs as fallback for project certs +References: https://github.com/godotengine/godot/pull/22066#issuecomment-421565719 + https://github.com/godotengine/godot/pull/22066#issuecomment-422528664 + https://github.com/godotengine/godot/issues/22232 +Upstream: offered to upstream + +If project has no value set for "network/ssl/certificates" (the default), +"default_certs" is not filled by function "load_default_certificates" because +we don't use builtin certs - BUILTIN_CERTS_ENABLED is not defined. + +We use a distro specific "system_certs_path" as build option and apply it here +via "_SYSTEM_CERTS_PATH" (defined in included "core/io/certs_compressed.gen.h") +as fallback for certificates. + +In result patch restores upstream behavior for certificate usage. +Difference is: +Where upstream by default uses hard coded certificates at build time, we hard +code path to the default certificates as "/var/lib/ca-certificates/ca-bundle.pem". +This bundle might be updated separately or admin can edit content of this file. + +User can always define different path via Editor or Project settings. + +See comments in patch for more details. + +--- + +diff -r -U 5 a/modules/mbedtls/crypto_mbedtls.cpp b/modules/mbedtls/crypto_mbedtls.cpp +--- a/modules/mbedtls/crypto_mbedtls.cpp ++++ b/modules/mbedtls/crypto_mbedtls.cpp +@@ -44,10 +44,12 @@ + #define PEM_END_CRT "-----END CERTIFICATE-----\n" + + #include "mbedtls/pem.h" + #include + ++#include ++ + CryptoKey *CryptoKeyMbedTLS::create() { + return memnew(CryptoKeyMbedTLS); + } + + Error CryptoKeyMbedTLS::load(String p_path) { +@@ -204,10 +206,21 @@ + ERR_FAIL_COND(default_certs == NULL); + + if (p_path != "") { + // Use certs defined in project settings. + default_certs->load(p_path); ++ } else if (strcmp(_SYSTEM_CERTS_PATH, "") != 0) { ++ // Use system certs only if user did not override in project settings ++ // and if _SYSTEM_CERTS_PATH is set. ++ // Should happen if Project Setting "network/ssl/certificates" is empty. ++ // Editor Setting "network/ssl/editor_ssl_certificates" is already set ++ // to "_SYSTEM_CERTS_PATH" by default -> This is caught by "if (p_path != "") {". ++ // But the same fallback might apply for certificates used by editor ++ // if user has set "network/ssl/editor_ssl_certificates" to "". ++ // "load_default_certificates" is only called twice with one of ++ // these parameters. ++ default_certs->load(_SYSTEM_CERTS_PATH); + } + #ifdef BUILTIN_CERTS_ENABLED + else { + // Use builtin certs only if user did not override it in project settings. + PoolByteArray out; diff --git a/godot-rpmlintrc b/godot-rpmlintrc deleted file mode 100644 index 1df9411..0000000 --- a/godot-rpmlintrc +++ /dev/null @@ -1,2 +0,0 @@ -# package server has no manual-page -addFilter("no-manual-page-for-binary godot-server") diff --git a/godot.changes b/godot.changes index f7664bd..1f50c9e 100644 --- a/godot.changes +++ b/godot.changes @@ -1,7 +1,27 @@ +------------------------------------------------------------------- +Wed Feb 12 12:00:00 UTC 2020 - cunix@mail.de + +- Added "linker_pie_flag.patch" in order to link with "-pie". + Replaces previous "fix-pie-warning.patch". + +- "project_certs_fallback.patch" renamed to "certs_fallback.patch". + Modified and adapted to Godot source code changes. + +- bash completion files "godot", "godot-headless", "godot-runner" + and "godot-server" added. + +- Location of documentation in man page adjusted. + +- godot-rpmlintrc deleted with filter "no-manual-page-for-binary" + because this warning doesn't seems to be thrown anymore. + +- Build option "faster_build" introduced to speed up build + during tests. + ------------------------------------------------------------------- Sat Feb 1 04:33:27 UTC 2020 - Max Mitschke -- Removed patch files as they are no longer needed +- Removed patch "fix-pie-warning.patch" - Removed export_presets.cfg file as games should supply this file - Update to v3.2 @@ -76,7 +96,7 @@ Sat Feb 1 04:33:27 UTC 2020 - Max Mitschke * Exporting a project via the command-line now returns a non-zero exit code if an error occurred during exporting * Fixed autocompletion in the script editor - + And more: https://github.com/godotengine/godot/blob/3.2/CHANGELOG.md diff --git a/godot.spec b/godot.spec index eefdc12..992df24 100644 --- a/godot.spec +++ b/godot.spec @@ -17,8 +17,11 @@ # +# faster_build only builds the editor to speed up the build. +%define faster_build 0 + %define _buildshell /bin/bash -%define ca_bundle /var/lib/ca-certificates/ca-bundle.pem +%define ca_bundle %{_localstatedir}/lib/ca-certificates/ca-bundle.pem Name: godot Version: 3.2 @@ -29,7 +32,10 @@ Group: Development/Tools/Other URL: https://godotengine.org/ Source0: https://downloads.tuxfamily.org/godotengine/%{version}/%{name}-%{version}-stable.tar.xz Source1: https://downloads.tuxfamily.org/godotengine/%{version}/%{name}-%{version}-stable.tar.xz.sha256 -Source3: %{name}-rpmlintrc +# Project policy does not allow "-no-pie" +Patch0: linker_pie_flag.patch +# Use system certificates as fallback for certificates +Patch1: certs_fallback.patch BuildRequires: Mesa-devel BuildRequires: fdupes BuildRequires: gcc @@ -47,9 +53,7 @@ BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libwebp) -BuildRequires: pkgconfig(libwslay) BuildRequires: pkgconfig(ogg) -BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(opus) BuildRequires: pkgconfig(opusfile) BuildRequires: pkgconfig(theora) @@ -64,9 +68,22 @@ BuildRequires: pkgconfig(xinerama) BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(zlib) %if 0%{?suse_version} > 1500 +BuildRequires: mbedtls-devel BuildRequires: pkgconfig(bullet) +BuildRequires: pkgconfig(libwslay) BuildRequires: pkgconfig(libzstd) +BuildRequires: pkgconfig(miniupnpc) +%else +%if 0%{?is_opensuse} +# SLES seems not to have wslay and miniupnpc +BuildRequires: pkgconfig(libwslay) +BuildRequires: libminiupnpc-devel +%if 0%{?sle_version} >= 150200 +BuildRequires: mbedtls-devel %endif +%endif +%endif +Requires: bash-completion Requires: ca-certificates Recommends: ca-certificates-mozilla Requires(post): update-desktop-files @@ -88,13 +105,36 @@ Provides: bundled(enet) = 1.3.14 # Should not be unbundled. Provides: bundled(minizip) = 1.2.11 +Provides: bundled(cvtt) +Provides: bundled(etc2comp) +Provides: bundled(noto-sans-fonts) +Provides: bundled(hack-fonts) +Provides: bundled(google-droid-fonts) +Provides: bundled(glad) +Provides: bundled(jpeg-compressor) +Provides: bundled(libsimplewebm) +Provides: bundled(polyclipping) +Provides: bundled(FastLZ) +Provides: bundled(hqx) +Provides: bundled(open-simplex-noise-in-c) +Provides: bundled(pcg) +Provides: bundled(smaz) +Provides: bundled(polypartition) +Provides: bundled(curl_hostcheck) +Provides: bundled(yuv2rgb) +Provides: bundled(ifaddrs-android) +Provides: bundled(easing) +Provides: bundled(Tangent_Space_Normal_Maps) +Provides: bundled(stb) +Provides: bundled(pvrtccompressor) +Provides: bundled(tinyexr) +Provides: bundled(vhacd) + # Can be unbundled if packaged Provides: bundled(nanosvg) +Provides: bundled(recastnavigation) Provides: bundled(squish) = 1.15 - -# Has custom changes -Provides: bundled(mbedtls) = 2.16.4 -Provides: bundled(miniupnpc) +Provides: bundled(xatlas) ## Need to update in Factory ## Provides: bundled(assimp) @@ -102,6 +142,15 @@ 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.4 +%endif +%if !0%{?is_opensuse} +# SLES seems not to have miniupnpc and wslay +Provides: bundled(libwslay) = 1.1.0 +Provides: bundled(miniupnpc) +%endif %endif %description @@ -109,9 +158,12 @@ Godot is a game engine. It provides a set of tools and a visually oriented workflow that can export games to PC, Mobile and Web platforms. +%if !0%{?faster_build} + %package headless Summary: Headless version of Godot editor useful for command line Group: Development/Tools/Other +Requires: bash-completion Requires: ca-certificates Recommends: ca-certificates-mozilla @@ -122,6 +174,7 @@ exporting Godot games on the command line. %package runner Summary: Shared binary to play games developed with the Godot engine Group: Amusements/Games/Other +Requires: bash-completion Requires: ca-certificates Recommends: ca-certificates-mozilla @@ -133,6 +186,7 @@ by pointing to the location of the game's data package. %package server Summary: Godot headless binary for servers Group: Amusements/Games/Other +Requires: bash-completion Requires: ca-certificates Recommends: ca-certificates-mozilla @@ -140,26 +194,54 @@ Recommends: ca-certificates-mozilla This package contains the headless binary for the Godot game engine particularly suited for running dedicated servers. +%endif + %prep %setup -q -n %{name}-%{version}-stable +%patch0 -p1 +%patch1 -p1 + +cp thirdparty/README.md thirdparty_README.md + +# actual doc location in openSUSE +sed -i 's/\/usr\/share\/doc\/godot\//\/usr\/share\/doc\/packages\/godot\//' misc/dist/linux/godot.6 + +# disarm shebang +sed -i '1s/#!/##/' misc/dist/shell/godot.bash-completion + +# bash completion for sub packages +cp misc/dist/shell/godot.bash-completion misc/dist/shell/godot-headless +cp misc/dist/shell/godot.bash-completion misc/dist/shell/godot-runner +cp misc/dist/shell/godot.bash-completion misc/dist/shell/godot-server + +sed -i '$s/_complete_godot_bash godot/_complete_godot_bash godot-headless/' misc/dist/shell/godot-headless +sed -i '$s/_complete_godot_bash godot/_complete_godot_bash godot-runner/' misc/dist/shell/godot-runner +sed -i '$s/_complete_godot_bash godot/_complete_godot_bash godot-server/' misc/dist/shell/godot-server %build +# Configuring build to use some distribution libraries +unbundle_libs=('certs' 'freetype' 'libogg' 'libpng' 'libtheora' 'libvorbis' \ + 'libwebp' 'opus' 'pcre2' 'zlib') + # Adding distribution name to build name %if 0%{?suse_version} %if 0%{?is_opensuse} + # Unbundle more libs for openSUSE + unbundle_libs+=('miniupnpc' 'wslay') export BUILD_NAME="openSUSE" %else export BUILD_NAME="SUSE" %endif %endif -# Configuring build to use some distribution libraries -unbundle_libs=('certs' 'freetype' 'libogg' 'libpng' 'libtheora' 'libvorbis' \ - 'libwebp' 'opus' 'pcre2' 'wslay' 'zlib') - # Unbundle more libs for Tumbleweed %if %{suse_version} > 1500 -unbundle_libs+=('bullet' 'zstd') +unbundle_libs+=('bullet' 'mbedtls' 'zstd') +%else +# Unbundle more libs for coming Leap +%if 0%{?sle_version} >= 150200 && 0%{?is_opensuse} +unbundle_libs+=('mbedtls') +%endif %endif # Unbundle libvpx only if it doesn't meet the minimum requirement. @@ -176,10 +258,6 @@ for thirdparty in "${unbundle_libs[@]}"; do rm -rf thirdparty/$thirdparty done -# Removing extra thirdparty libraries as they are either not needed or are -# provided by the distribution. -rm -rf thirdparty/rtaudio - # Keep empty certificates file needed as "source" by # function "make_certs_header" in core/core_builders.py mkdir -pv thirdparty/certs @@ -193,6 +271,7 @@ touch thirdparty/certs/ca-certificates.crt # Build graphical editor (tools) scons %{build_args} platform=x11 tools=yes target=release_debug +%if !0%{?faster_build} # Build headless version of the editor (with tools) scons %{build_args} platform=server tools=yes target=release_debug @@ -201,27 +280,33 @@ scons %{build_args} platform=x11 tools=no target=release # Build server version (without tools) scons %{build_args} platform=server tools=no target=release +%endif %install # Installing the editor install -D -p -m 755 bin/%{name}.x11.opt.tools.%{__isa_bits} %{buildroot}%{_bindir}/%{name} -# Installing the headless editor -install -D -p -m 755 bin/%{name}_server.x11.opt.tools.%{__isa_bits} %{buildroot}%{_bindir}/%{name}-headless - -# Installing the runner -install -D -p -m 755 bin/%{name}.x11.opt.%{__isa_bits} %{buildroot}%{_bindir}/%{name}-runner - -# Installing the server -install -D -p -m 755 bin/%{name}_server.x11.opt.%{__isa_bits} %{buildroot}%{_bindir}/%{name}-server - install -D -p -m 644 misc/dist/linux/godot.6 %{buildroot}/%{_mandir}/man6/%{name}.6%{?ext_man} +install -D -p -m 644 misc/dist/shell/godot.bash-completion %{buildroot}%{_datadir}/bash-completion/completions/%{name} install -D -p -m 644 icon.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{name}.png install -D -p -m 644 icon.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg install -D -p -m 644 misc/dist/linux/org.godotengine.Godot.appdata.xml %{buildroot}%{_datadir}/appdata/org.godotengine.Godot.appdata.xml %suse_update_desktop_file -i org.godotengine.Godot -cp thirdparty/README.md thirdparty_README.md +%if !0%{?faster_build} +# Installing the headless editor +install -D -p -m 755 bin/%{name}_server.x11.opt.tools.%{__isa_bits} %{buildroot}%{_bindir}/%{name}-headless +install -D -p -m 644 misc/dist/shell/godot-headless %{buildroot}%{_datadir}/bash-completion/completions/%{name}-headless + +# Installing the runner +install -D -p -m 755 bin/%{name}.x11.opt.%{__isa_bits} %{buildroot}%{_bindir}/%{name}-runner +install -D -p -m 644 misc/dist/shell/godot-runner %{buildroot}%{_datadir}/bash-completion/completions/%{name}-runner + +# Installing the server +install -D -p -m 755 bin/%{name}_server.x11.opt.%{__isa_bits} %{buildroot}%{_bindir}/%{name}-server +install -D -p -m 644 misc/dist/shell/godot-server %{buildroot}%{_datadir}/bash-completion/completions/%{name}-server +%endif + %fdupes -s %{buildroot}/%{_prefix} %files @@ -235,23 +320,29 @@ cp thirdparty/README.md thirdparty_README.md %{_bindir}/%{name} %{_datadir}/appdata/org.godotengine.Godot.appdata.xml %{_datadir}/applications/org.godotengine.Godot.desktop +%{_datadir}/bash-completion/completions/%{name} %{_datadir}/icons/hicolor/256x256/apps/%{name}.png %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{_mandir}/man6/%{name}.6%{?ext_man} +%if !0%{?faster_build} %files headless %license LICENSE.txt LOGO_LICENSE.md COPYRIGHT.txt thirdparty_README.md %doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md README.md CODE_OF_CONDUCT.md %{_bindir}/%{name}-headless +%{_datadir}/bash-completion/completions/%{name}-headless %files runner %license LICENSE.txt LOGO_LICENSE.md COPYRIGHT.txt thirdparty_README.md %doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md README.md CODE_OF_CONDUCT.md %{_bindir}/%{name}-runner +%{_datadir}/bash-completion/completions/%{name}-runner %files server %license LICENSE.txt LOGO_LICENSE.md COPYRIGHT.txt thirdparty_README.md %doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md README.md CODE_OF_CONDUCT.md %{_bindir}/%{name}-server +%{_datadir}/bash-completion/completions/%{name}-server +%endif %changelog diff --git a/linker_pie_flag.patch b/linker_pie_flag.patch new file mode 100644 index 0000000..699afd3 --- /dev/null +++ b/linker_pie_flag.patch @@ -0,0 +1,30 @@ +From: cunix@mail.de +Date: 2020-02-12 12:00:00 +Subject: linker should use "-pie" instead of "-no-pie" +References: https://github.com/godotengine/godot/pull/23542#issuecomment-436385853 + https://github.com/godotengine/godot/pull/23542 + https://github.com/godotengine/godot/issues/34533 +Upstream: seems to do the opposite + +Linker flag "-no-pie" is added by upstream. +rpmlint complains this violates project policy. +Patch replaces flag "-no-pie" with "-pie". + +--- + +diff -r -U 5 a/platform/x11/detect.py b/platform/x11/detect.py +--- a/platform/x11/detect.py ++++ b/platform/x11/detect.py +@@ -182,11 +182,11 @@ + # Check for gcc version >= 6 before adding -no-pie + if using_gcc(env): + version = get_compiler_version(env) + if version != None and version[0] >= '6': + env.Append(CCFLAGS=['-fpie']) +- env.Append(LINKFLAGS=['-no-pie']) ++ env.Append(LINKFLAGS=['-pie']) + # Do the same for clang should be fine with Clang 4 and higher + if using_clang(env): + version = get_compiler_version(env) + if version != None and version[0] >= '4': + env.Append(CCFLAGS=['-fpie']) From 7b39b537c58a3bde111a5eb56365badebeb4255e3542b0d03956d84efb6074c5 Mon Sep 17 00:00:00 2001 From: Max Mitschke Date: Wed, 4 Mar 2020 17:06:47 +0000 Subject: [PATCH 3/3] Accepting request 781051 from home:cunix:godot Package "godot-bash-completion" added. OBS-URL: https://build.opensuse.org/request/show/781051 OBS-URL: https://build.opensuse.org/package/show/games/godot?expand=0&rev=6 --- godot.changes | 4 +++- godot.spec | 50 +++++++++++++++++++++++++++++++++++--------------- 2 files changed, 38 insertions(+), 16 deletions(-) diff --git a/godot.changes b/godot.changes index 1f50c9e..80d5d52 100644 --- a/godot.changes +++ b/godot.changes @@ -7,9 +7,11 @@ Wed Feb 12 12:00:00 UTC 2020 - cunix@mail.de - "project_certs_fallback.patch" renamed to "certs_fallback.patch". Modified and adapted to Godot source code changes. -- bash completion files "godot", "godot-headless", "godot-runner" +- Bash completion files "godot", "godot-headless", "godot-runner" and "godot-server" added. +- Package "godot-bash-completion" added. + - Location of documentation in man page adjusted. - godot-rpmlintrc deleted with filter "no-manual-page-for-binary" diff --git a/godot.spec b/godot.spec index 992df24..737dda5 100644 --- a/godot.spec +++ b/godot.spec @@ -83,14 +83,14 @@ BuildRequires: mbedtls-devel %endif %endif %endif -Requires: bash-completion Requires: ca-certificates Recommends: ca-certificates-mozilla Requires(post): update-desktop-files Requires(postun): update-desktop-files -Suggests: godot-headless = %{version} -Suggests: godot-runner = %{version} -Suggests: godot-server = %{version} +Recommends: %{name}-bash-completion +Suggests: %{name}-headless = %{version} +Suggests: %{name}-runner = %{version} +Suggests: %{name}-server = %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build # The following "Provides: bundled()" and comments were taken from the @@ -163,9 +163,9 @@ platforms. %package headless Summary: Headless version of Godot editor useful for command line Group: Development/Tools/Other -Requires: bash-completion Requires: ca-certificates Recommends: ca-certificates-mozilla +Suggests: %{name}-bash-completion %description headless This package is the headless version of the Godot editor that is suited for @@ -174,9 +174,9 @@ exporting Godot games on the command line. %package runner Summary: Shared binary to play games developed with the Godot engine Group: Amusements/Games/Other -Requires: bash-completion Requires: ca-certificates Recommends: ca-certificates-mozilla +Suggests: %{name}-bash-completion %description runner This package contains a godot-runner binary for the Linux X11 platform, @@ -186,9 +186,9 @@ by pointing to the location of the game's data package. %package server Summary: Godot headless binary for servers Group: Amusements/Games/Other -Requires: bash-completion Requires: ca-certificates Recommends: ca-certificates-mozilla +Suggests: %{name}-bash-completion %description server This package contains the headless binary for the Godot game engine @@ -196,6 +196,21 @@ particularly suited for running dedicated servers. %endif +%package bash-completion +Summary: Godot command line completion for Bash +Group: Amusements/Games/Other +BuildArch: noarch +Requires: bash-completion +Supplements: bash-completion +Supplements: %{name} +Enhances: %{name}-headless +Enhances: %{name}-runner +Enhances: %{name}-server + +%description bash-completion +Bash command line completion support for %{name}, %{name}-headless, +%{name}-runner and %{name}-server + %prep %setup -q -n %{name}-%{version}-stable %patch0 -p1 @@ -287,7 +302,6 @@ scons %{build_args} platform=server tools=no target=release install -D -p -m 755 bin/%{name}.x11.opt.tools.%{__isa_bits} %{buildroot}%{_bindir}/%{name} install -D -p -m 644 misc/dist/linux/godot.6 %{buildroot}/%{_mandir}/man6/%{name}.6%{?ext_man} -install -D -p -m 644 misc/dist/shell/godot.bash-completion %{buildroot}%{_datadir}/bash-completion/completions/%{name} install -D -p -m 644 icon.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{name}.png install -D -p -m 644 icon.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg install -D -p -m 644 misc/dist/linux/org.godotengine.Godot.appdata.xml %{buildroot}%{_datadir}/appdata/org.godotengine.Godot.appdata.xml @@ -296,17 +310,20 @@ install -D -p -m 644 misc/dist/linux/org.godotengine.Godot.appdata.xml %{buildr %if !0%{?faster_build} # Installing the headless editor install -D -p -m 755 bin/%{name}_server.x11.opt.tools.%{__isa_bits} %{buildroot}%{_bindir}/%{name}-headless -install -D -p -m 644 misc/dist/shell/godot-headless %{buildroot}%{_datadir}/bash-completion/completions/%{name}-headless # Installing the runner install -D -p -m 755 bin/%{name}.x11.opt.%{__isa_bits} %{buildroot}%{_bindir}/%{name}-runner -install -D -p -m 644 misc/dist/shell/godot-runner %{buildroot}%{_datadir}/bash-completion/completions/%{name}-runner # Installing the server install -D -p -m 755 bin/%{name}_server.x11.opt.%{__isa_bits} %{buildroot}%{_bindir}/%{name}-server -install -D -p -m 644 misc/dist/shell/godot-server %{buildroot}%{_datadir}/bash-completion/completions/%{name}-server %endif +# Installing bash-completion +install -D -p -m 644 misc/dist/shell/godot.bash-completion %{buildroot}%{_datadir}/bash-completion/completions/%{name} +install -D -p -m 644 misc/dist/shell/godot-headless %{buildroot}%{_datadir}/bash-completion/completions/%{name}-headless +install -D -p -m 644 misc/dist/shell/godot-runner %{buildroot}%{_datadir}/bash-completion/completions/%{name}-runner +install -D -p -m 644 misc/dist/shell/godot-server %{buildroot}%{_datadir}/bash-completion/completions/%{name}-server + %fdupes -s %{buildroot}/%{_prefix} %files @@ -320,7 +337,6 @@ install -D -p -m 644 misc/dist/shell/godot-server %{buildroot}%{_datadir}/bash-c %{_bindir}/%{name} %{_datadir}/appdata/org.godotengine.Godot.appdata.xml %{_datadir}/applications/org.godotengine.Godot.desktop -%{_datadir}/bash-completion/completions/%{name} %{_datadir}/icons/hicolor/256x256/apps/%{name}.png %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{_mandir}/man6/%{name}.6%{?ext_man} @@ -330,19 +346,23 @@ install -D -p -m 644 misc/dist/shell/godot-server %{buildroot}%{_datadir}/bash-c %license LICENSE.txt LOGO_LICENSE.md COPYRIGHT.txt thirdparty_README.md %doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md README.md CODE_OF_CONDUCT.md %{_bindir}/%{name}-headless -%{_datadir}/bash-completion/completions/%{name}-headless %files runner %license LICENSE.txt LOGO_LICENSE.md COPYRIGHT.txt thirdparty_README.md %doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md README.md CODE_OF_CONDUCT.md %{_bindir}/%{name}-runner -%{_datadir}/bash-completion/completions/%{name}-runner %files server %license LICENSE.txt LOGO_LICENSE.md COPYRIGHT.txt thirdparty_README.md %doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md README.md CODE_OF_CONDUCT.md %{_bindir}/%{name}-server -%{_datadir}/bash-completion/completions/%{name}-server %endif +%files bash-completion +%license LICENSE.txt COPYRIGHT.txt +%{_datadir}/bash-completion/completions/%{name} +%{_datadir}/bash-completion/completions/%{name}-headless +%{_datadir}/bash-completion/completions/%{name}-runner +%{_datadir}/bash-completion/completions/%{name}-server + %changelog