diff options
Diffstat (limited to 'gnu/packages/patches')
76 files changed, 3544 insertions, 5108 deletions
diff --git a/gnu/packages/patches/audacity-add-include.patch b/gnu/packages/patches/audacity-add-include.patch deleted file mode 100644 index a7f27918e7..0000000000 --- a/gnu/packages/patches/audacity-add-include.patch +++ /dev/null @@ -1,15 +0,0 @@ -Without <sys/time.h>, gettimeofday is undefined. - -diff --git a/src/AudioIO.cpp b/src/AudioIO.cpp -index 0187e3962..e15d55f4c 100644 ---- a/src/AudioIO.cpp -+++ b/src/AudioIO.cpp -@@ -479,6 +479,8 @@ time warp info and AudioIOListener and whether the playback is looped. - #include "../lib-src/portmidi/porttime/porttime.h" - #include "../lib-src/header-substitutes/allegro.h" - -+#include <sys/time.h> -+ - #define MIDI_SLEEP 10 /* milliseconds */ - // how long do we think the thread that fills MIDI buffers, - // if it is separate from the portaudio thread, diff --git a/gnu/packages/patches/audacity-build-with-system-portaudio.patch b/gnu/packages/patches/audacity-build-with-system-portaudio.patch deleted file mode 100644 index 05325a1493..0000000000 --- a/gnu/packages/patches/audacity-build-with-system-portaudio.patch +++ /dev/null @@ -1,62 +0,0 @@ -Downloaded from here: -https://sourceforge.net/p/audacity/mailman/message/36106562/ - -Modified for use on later versions of audacity. - ->From 5f9482a191359f2c477763a36d2c865c5f186602 Mon Sep 17 00:00:00 2001 -From: Antonio Ospite <[email protected]> -Date: Tue, 7 Nov 2017 13:06:33 +0100 -Subject: [PATCH] Fix building against the system portaudio library - -Building against the system portaudio results in this error: - -./src/AudioIO.cpp:983: undefined reference to `PaUtil_GetTime' -audacity-AudioIO.o: In function `audacityAudioCallback(void const*, void*, -unsigned long, PaStreamCallbackTimeInfo const*, unsigned long, void*)': -./src/AudioIO.cpp:4630: undefined reference to `PaUtil_GetTime' -collect2: error: ld returned 1 exit status -Makefile:2349: recipe for target 'audacity' failed -make[3]: *** [audacity] Error 1 - -This is because PaUtil_GetTime is declared as a C symbol in pa_util.h -but is resolved as a C++ symbol at link time. - -Audacity fixes this in the local tree with this change: -https://github.com/audacity/audacity/commit/38fd97b8e26060332ab3e9e000a8882326a70ba7 - -However this is not general enough for the portaudio debian package. - -Since PaUtil_GetTime() is the only function causing problems, just copy -over the code where it's used. ---- - src/AudioIO.cpp | 17 ++++++++++++++++- - 1 file changed, 16 insertions(+), 1 deletion(-) - -diff --git a/src/AudioIO.cpp b/src/AudioIO.cpp -index 48715869c..bb4bf472c 100644 ---- a/src/AudioIO.cpp -+++ b/src/AudioIO.cpp -@@ -480,9 +480,22 @@ time warp info and AudioIOListener and whether the playback is looped. - #define ROUND(x) (int) ((x)+0.5) - //#include <string.h> - // #include "../lib-src/portmidi/pm_common/portmidi.h" -- #include "../lib-src/portaudio-v19/src/common/pa_util.h" - #include "NoteTrack.h" - #endif -+PaTime PaUtil_GetTime( void ) -+{ -+#ifdef HAVE_MACH_ABSOLUTE_TIME -+ return mach_absolute_time() * machSecondsConversionScaler_; -+#elif defined(HAVE_CLOCK_GETTIME) -+ struct timespec tp; -+ clock_gettime(CLOCK_REALTIME, &tp); -+ return (PaTime)(tp.tv_sec + tp.tv_nsec * 1e-9); -+#else -+ struct timeval tv; -+ gettimeofday( &tv, NULL ); -+ return (PaTime) tv.tv_usec * 1e-6 + tv.tv_sec; -+#endif -+} - - #ifdef EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT - #define LOWER_BOUND 0.0 diff --git a/gnu/packages/patches/behave-skip-a-couple-of-tests.patch b/gnu/packages/patches/behave-skip-a-couple-of-tests.patch deleted file mode 100644 index e3d4e15241..0000000000 --- a/gnu/packages/patches/behave-skip-a-couple-of-tests.patch +++ /dev/null @@ -1,462 +0,0 @@ -Fix build with Python 3.8, this is a patch based on upstream commit [1]. - -1: c000c88eb5239b87f299c85e83b349b0ef387ae7 - - -diff --git a/behave.ini b/behave.ini -index 45c0f0d7..952240d6 100644 ---- a/behave.ini -+++ b/behave.ini -@@ -15,8 +15,9 @@ show_skipped = false - format = rerun - progress3 - outfiles = rerun.txt -- reports/report_progress3.txt -+ build/behave.reports/report_progress3.txt - junit = true -+junit_directory = build/behave.reports - logging_level = INFO - # logging_format = LOG.%(levelname)-8s %(name)-10s: %(message)s - # logging_format = LOG.%(levelname)-8s %(asctime)s %(name)-10s: %(message)s -diff --git a/features/environment.py b/features/environment.py -index 4744e89a..3769ee40 100644 ---- a/features/environment.py -+++ b/features/environment.py -@@ -1,5 +1,7 @@ - # -*- coding: UTF-8 -*- -+# FILE: features/environemnt.py - -+from __future__ import absolute_import, print_function - from behave.tag_matcher import ActiveTagMatcher, setup_active_tag_values - from behave4cmd0.setup_command_shell import setup_command_shell_processors4behave - import platform -@@ -20,6 +22,15 @@ - } - active_tag_matcher = ActiveTagMatcher(active_tag_value_provider) - -+ -+def print_active_tags_summary(): -+ active_tag_data = active_tag_value_provider -+ print("ACTIVE-TAG SUMMARY:") -+ print("use.with_python.version=%s" % active_tag_data.get("python.version")) -+ # print("use.with_os=%s" % active_tag_data.get("os")) -+ print() -+ -+ - # ----------------------------------------------------------------------------- - # HOOKS: - # ----------------------------------------------------------------------------- -@@ -30,11 +41,14 @@ def before_all(context): - setup_python_path() - setup_context_with_global_params_test(context) - setup_command_shell_processors4behave() -+ print_active_tags_summary() -+ - - def before_feature(context, feature): - if active_tag_matcher.should_exclude_with(feature.tags): - feature.skip(reason=active_tag_matcher.exclude_reason) - -+ - def before_scenario(context, scenario): - if active_tag_matcher.should_exclude_with(scenario.effective_tags): - scenario.skip(reason=active_tag_matcher.exclude_reason) -diff --git a/features/step.duplicated_step.feature b/features/step.duplicated_step.feature -index 59888b0f..396cca27 100644 ---- a/features/step.duplicated_step.feature -+++ b/features/step.duplicated_step.feature -@@ -32,11 +32,11 @@ Feature: Duplicated Step Definitions - AmbiguousStep: @given('I call Alice') has already been defined in - existing step @given('I call Alice') at features/steps/alice_steps.py:3 - """ -- And the command output should contain: -- """ -- File "features/steps/alice_steps.py", line 7, in <module> -- @given(u'I call Alice') -- """ -+ # -- DISABLED: Python 3.8 traceback line numbers differ w/ decorators (+1). -+ # And the command output should contain: -+ # """ -+ # File "features/steps/alice_steps.py", line 7, in <module> -+ # """ - - - Scenario: Duplicated Step Definition in another File -@@ -70,11 +70,11 @@ Feature: Duplicated Step Definitions - AmbiguousStep: @given('I call Bob') has already been defined in - existing step @given('I call Bob') at features/steps/bob1_steps.py:3 - """ -- And the command output should contain: -- """ -- File "features/steps/bob2_steps.py", line 3, in <module> -- @given('I call Bob') -- """ -+ # -- DISABLED: Python 3.8 traceback line numbers differ w/ decorators (+1). -+ # And the command output should contain: -+ # """ -+ # File "features/steps/bob2_steps.py", line 3, in <module> -+ # """ - - @xfail - Scenario: Duplicated Same Step Definition via import from another File -diff --git a/issue.features/environment.py b/issue.features/environment.py -index 2dfec751..7e48ee03 100644 ---- a/issue.features/environment.py -+++ b/issue.features/environment.py -@@ -1,5 +1,5 @@ - # -*- coding: UTF-8 -*- --# FILE: features/environment.py -+# FILE: issue.features/environemnt.py - # pylint: disable=unused-argument - """ - Functionality: -@@ -7,17 +7,20 @@ - * active tags - """ - --from __future__ import print_function -+ -+from __future__ import absolute_import, print_function - import sys - import platform - import os.path - import six - from behave.tag_matcher import ActiveTagMatcher - from behave4cmd0.setup_command_shell import setup_command_shell_processors4behave --# PREPARED: --# from behave.tag_matcher import setup_active_tag_values -+# PREPARED: from behave.tag_matcher import setup_active_tag_values - - -+# --------------------------------------------------------------------------- -+# TEST SUPPORT: For Active Tags -+# --------------------------------------------------------------------------- - def require_tool(tool_name): - """Check if a tool (an executable program) is provided on this platform. - -@@ -45,12 +48,14 @@ def require_tool(tool_name): - # print("TOOL-NOT-FOUND: %s" % tool_name) - return False - -+ - def as_bool_string(value): - if bool(value): - return "yes" - else: - return "no" - -+ - def discover_ci_server(): - # pylint: disable=invalid-name - ci_server = "none" -@@ -67,11 +72,17 @@ def discover_ci_server(): - return ci_server - - -+# --------------------------------------------------------------------------- -+# BEHAVE SUPPORT: Active Tags -+# --------------------------------------------------------------------------- - # -- MATCHES ANY TAGS: @use.with_{category}={value} - # NOTE: active_tag_value_provider provides category values for active tags. -+python_version = "%s.%s" % sys.version_info[:2] - active_tag_value_provider = { -+ "platform": sys.platform, - "python2": str(six.PY2).lower(), - "python3": str(six.PY3).lower(), -+ "python.version": python_version, - # -- python.implementation: cpython, pypy, jython, ironpython - "python.implementation": platform.python_implementation().lower(), - "pypy": str("__pypy__" in sys.modules).lower(), -@@ -82,17 +92,33 @@ def discover_ci_server(): - } - active_tag_matcher = ActiveTagMatcher(active_tag_value_provider) - -+ -+def print_active_tags_summary(): -+ active_tag_data = active_tag_value_provider -+ print("ACTIVE-TAG SUMMARY:") -+ print("use.with_python.version=%s" % active_tag_data.get("python.version")) -+ # print("use.with_platform=%s" % active_tag_data.get("platform")) -+ # print("use.with_os=%s" % active_tag_data.get("os")) -+ print() -+ -+ -+# --------------------------------------------------------------------------- -+# BEHAVE HOOKS: -+# --------------------------------------------------------------------------- - def before_all(context): - # -- SETUP ACTIVE-TAG MATCHER (with userdata): - # USE: behave -D browser=safari ... -- # NOT-NEEDED: setup_active_tag_values(active_tag_value_provider, -- # context.config.userdata) -+ # NOT-NEEDED: -+ # setup_active_tag_values(active_tag_value_provider, context.config.userdata) - setup_command_shell_processors4behave() -+ print_active_tags_summary() -+ - - def before_feature(context, feature): - if active_tag_matcher.should_exclude_with(feature.tags): - feature.skip(reason=active_tag_matcher.exclude_reason) - -+ - def before_scenario(context, scenario): - if active_tag_matcher.should_exclude_with(scenario.effective_tags): - scenario.skip(reason=active_tag_matcher.exclude_reason) -diff --git a/issue.features/issue0330.feature b/issue.features/issue0330.feature -index dc1ebe75..81cb6e29 100644 ---- a/issue.features/issue0330.feature -+++ b/issue.features/issue0330.feature -@@ -70,6 +70,7 @@ Feature: Issue #330: Skipped scenarios are included in junit reports when --no-s - And note that "bob.feature is skipped" - - -+ @not.with_python.version=3.8 - Scenario: Junit report for skipped feature is created with --show-skipped - When I run "behave --junit -t @tag1 --show-skipped @alice_and_bob.featureset" - Then it should pass with: -@@ -83,6 +84,23 @@ Feature: Issue #330: Skipped scenarios are included in junit reports when --no-s - <testsuite errors="0" failures="0" name="bob.Bob" skipped="1" tests="1" time="0.0"> - """ - -+ @use.with_python.version=3.8 -+ Scenario: Junit report for skipped feature is created with --show-skipped -+ When I run "behave --junit -t @tag1 --show-skipped @alice_and_bob.featureset" -+ Then it should pass with: -+ """ -+ 1 feature passed, 0 failed, 1 skipped -+ """ -+ And a file named "test_results/TESTS-alice.xml" exists -+ And a file named "test_results/TESTS-bob.xml" exists -+ And the file "test_results/TESTS-bob.xml" should contain: -+ """ -+ <testsuite name="bob.Bob" tests="1" errors="0" failures="0" skipped="1" time="0.0"> -+ """ -+ # -- HINT FOR: Python < 3.8 -+ # <testsuite errors="0" failures="0" name="bob.Bob" skipped="1" tests="1" time="0.0"> -+ -+ @not.with_python.version=3.8 - Scenario: Junit report for skipped scenario is neither shown nor counted with --no-skipped - When I run "behave --junit -t @tag1 --no-skipped" - Then it should pass with: -@@ -102,7 +120,30 @@ Feature: Issue #330: Skipped scenarios are included in junit reports when --no-s - """ - And note that "Charly2 is the skipped scenarion in charly.feature" - -+ @use.with_python.version=3.8 -+ Scenario: Junit report for skipped scenario is neither shown nor counted with --no-skipped -+ When I run "behave --junit -t @tag1 --no-skipped" -+ Then it should pass with: -+ """ -+ 2 features passed, 0 failed, 1 skipped -+ 2 scenarios passed, 0 failed, 2 skipped -+ """ -+ And a file named "test_results/TESTS-alice.xml" exists -+ And a file named "test_results/TESTS-charly.xml" exists -+ And the file "test_results/TESTS-charly.xml" should contain: -+ """ -+ <testsuite name="charly.Charly" tests="1" errors="0" failures="0" skipped="0" -+ """ -+ # -- HINT FOR: Python < 3.8 -+ # <testsuite errors="0" failures="0" name="charly.Charly" skipped="0" tests="1" -+ And the file "test_results/TESTS-charly.xml" should not contain: -+ """ -+ <testcase classname="charly.Charly" name="Charly2" -+ """ -+ And note that "Charly2 is the skipped scenarion in charly.feature" -+ - -+ @not.with_python.version=3.8 - Scenario: Junit report for skipped scenario is shown and counted with --show-skipped - When I run "behave --junit -t @tag1 --show-skipped" - Then it should pass with: -@@ -122,3 +163,26 @@ Feature: Issue #330: Skipped scenarios are included in junit reports when --no-s - """ - And note that "Charly2 is the skipped scenarion in charly.feature" - -+ -+ @use.with_python.version=3.8 -+ Scenario: Junit report for skipped scenario is shown and counted with --show-skipped -+ When I run "behave --junit -t @tag1 --show-skipped" -+ Then it should pass with: -+ """ -+ 2 features passed, 0 failed, 1 skipped -+ 2 scenarios passed, 0 failed, 2 skipped -+ """ -+ And a file named "test_results/TESTS-alice.xml" exists -+ And a file named "test_results/TESTS-charly.xml" exists -+ And the file "test_results/TESTS-charly.xml" should contain: -+ """ -+ <testsuite name="charly.Charly" tests="2" errors="0" failures="0" skipped="1" -+ """ -+ # HINT: Python < 3.8 -+ # <testsuite errors="0" failures="0" name="charly.Charly" skipped="1" tests="2" -+ And the file "test_results/TESTS-charly.xml" should contain: -+ """ -+ <testcase classname="charly.Charly" name="Charly2" status="skipped" -+ """ -+ And note that "Charly2 is the skipped scenarion in charly.feature" -+ -diff --git a/issue.features/issue0446.feature b/issue.features/issue0446.feature -index a2ed892d..901bdec5 100644 ---- a/issue.features/issue0446.feature -+++ b/issue.features/issue0446.feature -@@ -58,6 +58,7 @@ Feature: Issue #446 -- Support scenario hook-errors with JUnitReporter - behave.reporter.junit.show_hostname = False - """ - -+ @not.with_python.version=3.8 - Scenario: Hook error in before_scenario() - When I run "behave -f plain --junit features/before_scenario_failure.feature" - Then it should fail with: -@@ -86,6 +87,40 @@ Feature: Issue #446 -- Support scenario hook-errors with JUnitReporter - And note that "the traceback is contained in the XML element <error/>" - - -+ @use.with_python.version=3.8 -+ Scenario: Hook error in before_scenario() -+ When I run "behave -f plain --junit features/before_scenario_failure.feature" -+ Then it should fail with: -+ """ -+ 0 scenarios passed, 1 failed, 0 skipped -+ """ -+ And the command output should contain: -+ """ -+ HOOK-ERROR in before_scenario: RuntimeError: OOPS -+ """ -+ And the file "reports/TESTS-before_scenario_failure.xml" should contain: -+ """ -+ <testsuite name="before_scenario_failure.Alice" tests="1" errors="1" failures="0" skipped="0" -+ """ -+ # -- HINT FOR: Python < 3.8 -+ # <testsuite errors="1" failures="0" name="before_scenario_failure.Alice" skipped="0" tests="1" -+ And the file "reports/TESTS-before_scenario_failure.xml" should contain: -+ """ -+ <error type="RuntimeError" message="HOOK-ERROR in before_scenario: RuntimeError: OOPS"> -+ """ -+ # -- HINT FOR: Python < 3.8 -+ # <error message="HOOK-ERROR in before_scenario: RuntimeError: OOPS" type="RuntimeError"> -+ And the file "reports/TESTS-before_scenario_failure.xml" should contain: -+ """ -+ File "features/environment.py", line 6, in before_scenario -+ cause_hook_failure() -+ File "features/environment.py", line 2, in cause_hook_failure -+ raise RuntimeError("OOPS") -+ """ -+ And note that "the traceback is contained in the XML element <error/>" -+ -+ -+ @not.with_python.version=3.8 - Scenario: Hook error in after_scenario() - When I run "behave -f plain --junit features/after_scenario_failure.feature" - Then it should fail with: -@@ -114,3 +149,38 @@ Feature: Issue #446 -- Support scenario hook-errors with JUnitReporter - raise RuntimeError("OOPS") - """ - And note that "the traceback is contained in the XML element <error/>" -+ -+ -+ @use.with_python.version=3.8 -+ Scenario: Hook error in after_scenario() -+ When I run "behave -f plain --junit features/after_scenario_failure.feature" -+ Then it should fail with: -+ """ -+ 0 scenarios passed, 1 failed, 0 skipped -+ """ -+ And the command output should contain: -+ """ -+ Scenario: B1 -+ Given another step passes ... passed -+ HOOK-ERROR in after_scenario: RuntimeError: OOPS -+ """ -+ And the file "reports/TESTS-after_scenario_failure.xml" should contain: -+ """ -+ <testsuite name="after_scenario_failure.Bob" tests="1" errors="1" failures="0" skipped="0" -+ """ -+ # -- HINT FOR: Python < 3.8 -+ # <testsuite errors="1" failures="0" name="after_scenario_failure.Bob" skipped="0" tests="1" -+ And the file "reports/TESTS-after_scenario_failure.xml" should contain: -+ """ -+ <error type="RuntimeError" message="HOOK-ERROR in after_scenario: RuntimeError: OOPS"> -+ """ -+ # -- HINT FOR: Python < 3.8 -+ # <error message="HOOK-ERROR in after_scenario: RuntimeError: OOPS" type="RuntimeError"> -+ And the file "reports/TESTS-after_scenario_failure.xml" should contain: -+ """ -+ File "features/environment.py", line 10, in after_scenario -+ cause_hook_failure() -+ File "features/environment.py", line 2, in cause_hook_failure -+ raise RuntimeError("OOPS") -+ """ -+ And note that "the traceback is contained in the XML element <error/>" -diff --git a/issue.features/issue0457.feature b/issue.features/issue0457.feature -index f80640e9..46f96e9c 100644 ---- a/issue.features/issue0457.feature -+++ b/issue.features/issue0457.feature -@@ -24,6 +24,7 @@ Feature: Issue #457 -- Double-quotes in error messages of JUnit XML reports - """ - - -+ @not.with_python.version=3.8 - Scenario: Use failing assertation in a JUnit XML report - Given a file named "features/fails1.feature" with: - """ -@@ -44,6 +45,31 @@ Feature: Issue #457 -- Double-quotes in error messages of JUnit XML reports - <failure message="FAILED: My name is "Alice"" - """ - -+ @use.with_python.version=3.8 -+ Scenario: Use failing assertation in a JUnit XML report -+ Given a file named "features/fails1.feature" with: -+ """ -+ Feature: -+ Scenario: Alice -+ Given a step fails with message: -+ ''' -+ My name is "Alice" -+ ''' -+ """ -+ When I run "behave --junit features/fails1.feature" -+ Then it should fail with: -+ """ -+ 0 scenarios passed, 1 failed, 0 skipped -+ """ -+ And the file "reports/TESTS-fails1.xml" should contain: -+ """ -+ <failure type="AssertionError" message="FAILED: My name is "Alice""> -+ """ -+ # -- HINT FOR: Python < 3.8 -+ # <failure message="FAILED: My name is "Alice"" -+ -+ -+ @not.with_python.version=3.8 - Scenario: Use exception in a JUnit XML report - Given a file named "features/fails2.feature" with: - """ -@@ -63,3 +89,26 @@ Feature: Issue #457 -- Double-quotes in error messages of JUnit XML reports - """ - <error message="My name is "Bob" and <here> I am" - """ -+ -+ @use.with_python.version=3.8 -+ Scenario: Use exception in a JUnit XML report -+ Given a file named "features/fails2.feature" with: -+ """ -+ Feature: -+ Scenario: Bob -+ Given a step fails with error and message: -+ ''' -+ My name is "Bob" and <here> I am -+ ''' -+ """ -+ When I run "behave --junit features/fails2.feature" -+ Then it should fail with: -+ """ -+ 0 scenarios passed, 1 failed, 0 skipped -+ """ -+ And the file "reports/TESTS-fails2.xml" should contain: -+ """ -+ <error type="RuntimeError" message="My name is "Bob" and <here> I am"> -+ """ -+ # -- HINT FOR: Python < 3.8 -+ # <error message="My name is "Bob" and <here> I am" diff --git a/gnu/packages/patches/bind-re-add-attr-constructor-priority.patch b/gnu/packages/patches/bind-re-add-attr-constructor-priority.patch index 5d6765dd92..33e4f183f6 100644 --- a/gnu/packages/patches/bind-re-add-attr-constructor-priority.patch +++ b/gnu/packages/patches/bind-re-add-attr-constructor-priority.patch @@ -8,7 +8,7 @@ This reverts commit 0340df46ec5897636dd071bc8b5c4272cfa7d7be. It works around an irrelevant operating system and breaks compilation on Guix: mem.c:873: fatal error: RUNTIME_CHECK(((pthread_mutex_lock(((&contextslock))) == 0) ? 0 : 34) == 0) failed -/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash: line 1: 13768 Aborted ./${fuzzer} +/gnu/store/…-bash-minimal-5.0.16/bin/bash: line 1: 13768 Aborted ./${fuzzer} Let's simply revert it for now---there are securities at stake! --- diff --git a/gnu/packages/patches/binutils-CVE-2021-45078.patch b/gnu/packages/patches/binutils-CVE-2021-45078.patch new file mode 100644 index 0000000000..fca692bdb5 --- /dev/null +++ b/gnu/packages/patches/binutils-CVE-2021-45078.patch @@ -0,0 +1,257 @@ +Fix CVE-2021-45078 (incomplete fix for CVE-2018-12699): + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-45078 +https://sourceware.org/bugzilla/show_bug.cgi?id=28694 + +Patch copied from upstream source repository: + +https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=161e87d12167b1e36193385485c1f6ce92f74f02 + +From 161e87d12167b1e36193385485c1f6ce92f74f02 Mon Sep 17 00:00:00 2001 +From: Alan Modra <[email protected]> +Date: Wed, 15 Dec 2021 11:48:42 +1030 +Subject: [PATCH] PR28694, Out-of-bounds write in stab_xcoff_builtin_type + + PR 28694 + * stabs.c (stab_xcoff_builtin_type): Make typenum unsigned. + Negate typenum earlier, simplifying bounds checking. Correct + off-by-one indexing. Adjust switch cases. +--- + binutils/stabs.c | 87 ++++++++++++++++++++++++------------------------ + 1 file changed, 43 insertions(+), 44 deletions(-) + +diff --git a/binutils/stabs.c b/binutils/stabs.c +index 274bfb0e7fa..83ee3ea5fa4 100644 +--- a/binutils/stabs.c ++++ b/binutils/stabs.c +@@ -202,7 +202,7 @@ static debug_type stab_find_type (void *, struct stab_handle *, const int *); + static bool stab_record_type + (void *, struct stab_handle *, const int *, debug_type); + static debug_type stab_xcoff_builtin_type +- (void *, struct stab_handle *, int); ++ (void *, struct stab_handle *, unsigned int); + static debug_type stab_find_tagged_type + (void *, struct stab_handle *, const char *, int, enum debug_type_kind); + static debug_type *stab_demangle_argtypes +@@ -3496,166 +3496,167 @@ stab_record_type (void *dhandle ATTRIBUTE_UNUSED, struct stab_handle *info, + + static debug_type + stab_xcoff_builtin_type (void *dhandle, struct stab_handle *info, +- int typenum) ++ unsigned int typenum) + { + debug_type rettype; + const char *name; + +- if (typenum >= 0 || typenum < -XCOFF_TYPE_COUNT) ++ typenum = -typenum - 1; ++ if (typenum >= XCOFF_TYPE_COUNT) + { +- fprintf (stderr, _("Unrecognized XCOFF type %d\n"), typenum); ++ fprintf (stderr, _("Unrecognized XCOFF type %d\n"), -typenum - 1); + return DEBUG_TYPE_NULL; + } +- if (info->xcoff_types[-typenum] != NULL) +- return info->xcoff_types[-typenum]; ++ if (info->xcoff_types[typenum] != NULL) ++ return info->xcoff_types[typenum]; + +- switch (-typenum) ++ switch (typenum) + { +- case 1: ++ case 0: + /* The size of this and all the other types are fixed, defined + by the debugging format. */ + name = "int"; + rettype = debug_make_int_type (dhandle, 4, false); + break; +- case 2: ++ case 1: + name = "char"; + rettype = debug_make_int_type (dhandle, 1, false); + break; +- case 3: ++ case 2: + name = "short"; + rettype = debug_make_int_type (dhandle, 2, false); + break; +- case 4: ++ case 3: + name = "long"; + rettype = debug_make_int_type (dhandle, 4, false); + break; +- case 5: ++ case 4: + name = "unsigned char"; + rettype = debug_make_int_type (dhandle, 1, true); + break; +- case 6: ++ case 5: + name = "signed char"; + rettype = debug_make_int_type (dhandle, 1, false); + break; +- case 7: ++ case 6: + name = "unsigned short"; + rettype = debug_make_int_type (dhandle, 2, true); + break; +- case 8: ++ case 7: + name = "unsigned int"; + rettype = debug_make_int_type (dhandle, 4, true); + break; +- case 9: ++ case 8: + name = "unsigned"; + rettype = debug_make_int_type (dhandle, 4, true); + break; +- case 10: ++ case 9: + name = "unsigned long"; + rettype = debug_make_int_type (dhandle, 4, true); + break; +- case 11: ++ case 10: + name = "void"; + rettype = debug_make_void_type (dhandle); + break; +- case 12: ++ case 11: + /* IEEE single precision (32 bit). */ + name = "float"; + rettype = debug_make_float_type (dhandle, 4); + break; +- case 13: ++ case 12: + /* IEEE double precision (64 bit). */ + name = "double"; + rettype = debug_make_float_type (dhandle, 8); + break; +- case 14: ++ case 13: + /* This is an IEEE double on the RS/6000, and different machines + with different sizes for "long double" should use different + negative type numbers. See stabs.texinfo. */ + name = "long double"; + rettype = debug_make_float_type (dhandle, 8); + break; +- case 15: ++ case 14: + name = "integer"; + rettype = debug_make_int_type (dhandle, 4, false); + break; +- case 16: ++ case 15: + name = "boolean"; + rettype = debug_make_bool_type (dhandle, 4); + break; +- case 17: ++ case 16: + name = "short real"; + rettype = debug_make_float_type (dhandle, 4); + break; +- case 18: ++ case 17: + name = "real"; + rettype = debug_make_float_type (dhandle, 8); + break; +- case 19: ++ case 18: + /* FIXME */ + name = "stringptr"; + rettype = NULL; + break; +- case 20: ++ case 19: + /* FIXME */ + name = "character"; + rettype = debug_make_int_type (dhandle, 1, true); + break; +- case 21: ++ case 20: + name = "logical*1"; + rettype = debug_make_bool_type (dhandle, 1); + break; +- case 22: ++ case 21: + name = "logical*2"; + rettype = debug_make_bool_type (dhandle, 2); + break; +- case 23: ++ case 22: + name = "logical*4"; + rettype = debug_make_bool_type (dhandle, 4); + break; +- case 24: ++ case 23: + name = "logical"; + rettype = debug_make_bool_type (dhandle, 4); + break; +- case 25: ++ case 24: + /* Complex type consisting of two IEEE single precision values. */ + name = "complex"; + rettype = debug_make_complex_type (dhandle, 8); + break; +- case 26: ++ case 25: + /* Complex type consisting of two IEEE double precision values. */ + name = "double complex"; + rettype = debug_make_complex_type (dhandle, 16); + break; +- case 27: ++ case 26: + name = "integer*1"; + rettype = debug_make_int_type (dhandle, 1, false); + break; +- case 28: ++ case 27: + name = "integer*2"; + rettype = debug_make_int_type (dhandle, 2, false); + break; +- case 29: ++ case 28: + name = "integer*4"; + rettype = debug_make_int_type (dhandle, 4, false); + break; +- case 30: ++ case 29: + /* FIXME */ + name = "wchar"; + rettype = debug_make_int_type (dhandle, 2, false); + break; +- case 31: ++ case 30: + name = "long long"; + rettype = debug_make_int_type (dhandle, 8, false); + break; +- case 32: ++ case 31: + name = "unsigned long long"; + rettype = debug_make_int_type (dhandle, 8, true); + break; +- case 33: ++ case 32: + name = "logical*8"; + rettype = debug_make_bool_type (dhandle, 8); + break; +- case 34: ++ case 33: + name = "integer*8"; + rettype = debug_make_int_type (dhandle, 8, false); + break; +@@ -3664,9 +3665,7 @@ stab_xcoff_builtin_type (void *dhandle, struct stab_handle *info, + } + + rettype = debug_name_type (dhandle, name, rettype); +- +- info->xcoff_types[-typenum] = rettype; +- ++ info->xcoff_types[typenum] = rettype; + return rettype; + } + +-- +2.27.0 + diff --git a/gnu/packages/patches/blender-2.79-gcc8.patch b/gnu/packages/patches/blender-2.79-gcc8.patch deleted file mode 100644 index 6a9186323b..0000000000 --- a/gnu/packages/patches/blender-2.79-gcc8.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/intern/itasc/kdl/tree.hpp b/intern/itasc/kdl/tree.hpp -index c8a253fc901..bd35f82d185 100644 ---- a/intern/itasc/kdl/tree.hpp -+++ b/intern/itasc/kdl/tree.hpp -@@ -34,7 +34,7 @@ namespace KDL - //Forward declaration - class TreeElement; - // Eigen allocator is needed for alignment of Eigen data types -- typedef std::map<std::string,TreeElement, std::less<std::string>, Eigen::aligned_allocator<std::pair<std::string, TreeElement> > > SegmentMap; -+ typedef std::map<std::string,TreeElement, std::less<std::string>, Eigen::aligned_allocator<std::pair<const std::string, TreeElement> > > SegmentMap; - - class TreeElement - { -diff --git a/intern/cycles/util/util_sseb.h b/intern/cycles/util/util_sseb.h -index 6e669701f3b..977976c3fc0 100644 ---- a/intern/cycles/util/util_sseb.h -+++ b/intern/cycles/util/util_sseb.h -@@ -22,6 +22,9 @@ CCL_NAMESPACE_BEGIN - - #ifdef __KERNEL_SSE2__ - -+struct ssei; -+struct ssef; -+ - /*! 4-wide SSE bool type. */ - struct sseb - { -@@ -116,7 +119,7 @@ __forceinline const sseb unpacklo( const sseb& a, const sseb& b ) { return _mm_u - __forceinline const sseb unpackhi( const sseb& a, const sseb& b ) { return _mm_unpackhi_ps(a, b); } - - template<size_t i0, size_t i1, size_t i2, size_t i3> __forceinline const sseb shuffle( const sseb& a ) { -- return _mm_shuffle_epi32(a, _MM_SHUFFLE(i3, i2, i1, i0)); -+ return _mm_castsi128_ps(_mm_shuffle_epi32(a, _MM_SHUFFLE(i3, i2, i1, i0))); - } - - template<> __forceinline const sseb shuffle<0, 1, 0, 1>( const sseb& a ) { diff --git a/gnu/packages/patches/blender-2.79-gcc9.patch b/gnu/packages/patches/blender-2.79-gcc9.patch deleted file mode 100644 index d538a02620..0000000000 --- a/gnu/packages/patches/blender-2.79-gcc9.patch +++ /dev/null @@ -1,53 +0,0 @@ -commit e6d803fd4a383cecf8c643095f093a31c944b785 -Author: Robert-André Mauchin <[email protected]> -Date: Wed Apr 3 01:36:52 2019 +0200 - - Fix for GCC9 new OpenMP data sharing - - GCC 9 started implementing the OpenMP 4.0 and later behavior. When not using - default clause or when using default(shared), this makes no difference, but - if using default(none), previously the choice was not specify the const - qualified variables on the construct at all, or specify in firstprivate - clause. In GCC 9 as well as for OpenMP 4.0 compliance, those variables need - to be specified on constructs in which they are used, either in shared or - in firstprivate clause. Specifying them in firstprivate clause is one way to - achieve compatibility with both older GCC versions and GCC 9, - another option is to drop the default(none) clause. - - This patch thus drops the default(none) clause. - - See https://gcc.gnu.org/gcc-9/porting_to.html#ompdatasharing - - Signed-off-by: Robert-André Mauchin <[email protected]> - -diff --git a/intern/elbeem/intern/solver_main.cpp b/intern/elbeem/intern/solver_main.cpp -index 68f7c04cd54..514087b6130 100644 ---- a/intern/elbeem/intern/solver_main.cpp -+++ b/intern/elbeem/intern/solver_main.cpp -@@ -381,7 +381,7 @@ LbmFsgrSolver::mainLoop(const int lev) - GRID_REGION_INIT(); - #if PARALLEL==1 - const int gDebugLevel = ::gDebugLevel; --#pragma omp parallel default(none) num_threads(mNumOMPThreads) \ -+#pragma omp parallel num_threads(mNumOMPThreads) \ - reduction(+: \ - calcCurrentMass,calcCurrentVolume, \ - calcCellsFilled,calcCellsEmptied, \ -@@ -1126,7 +1126,7 @@ LbmFsgrSolver::preinitGrids() - GRID_REGION_INIT(); - #if PARALLEL==1 - const int gDebugLevel = ::gDebugLevel; --#pragma omp parallel default(none) num_threads(mNumOMPThreads) \ -+#pragma omp parallel num_threads(mNumOMPThreads) \ - reduction(+: \ - calcCurrentMass,calcCurrentVolume, \ - calcCellsFilled,calcCellsEmptied, \ -@@ -1164,7 +1164,7 @@ LbmFsgrSolver::standingFluidPreinit() - GRID_REGION_INIT(); - #if PARALLEL==1 - const int gDebugLevel = ::gDebugLevel; --#pragma omp parallel default(none) num_threads(mNumOMPThreads) \ -+#pragma omp parallel num_threads(mNumOMPThreads) \ - reduction(+: \ - calcCurrentMass,calcCurrentVolume, \ - calcCellsFilled,calcCellsEmptied, \ diff --git a/gnu/packages/patches/blender-2.79-newer-ffmpeg.patch b/gnu/packages/patches/blender-2.79-newer-ffmpeg.patch deleted file mode 100644 index 363489bc70..0000000000 --- a/gnu/packages/patches/blender-2.79-newer-ffmpeg.patch +++ /dev/null @@ -1,80 +0,0 @@ -https://sources.debian.org/data/main/b/blender/2.79.b+dfsg0-4/debian/patches/0008-fix_building_with_latest_versions_of_FFmpeg.patch - -From: Bastien Montagne <[email protected]> -Date: Tue, 8 May 2018 16:00:52 +0200 -Subject: fix_building_with_latest_versions_of_FFmpeg - -Some years-old deprecated stuff has now been removed. - -Correct solution is probably to use valid defines etc. in own code, but -this is more FFMEPG maintainer task (since it also may change how old -FFMPEG we do support...). ---- - intern/ffmpeg/ffmpeg_compat.h | 39 ++++++++++++++++++++++++++ - source/blender/blenkernel/intern/writeffmpeg.c | 3 +- - 2 files changed, 41 insertions(+), 1 deletion(-) - -diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h -index 9c06c8a..f7f437c 100644 ---- a/intern/ffmpeg/ffmpeg_compat.h -+++ b/intern/ffmpeg/ffmpeg_compat.h -@@ -109,6 +109,45 @@ int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt) - - #endif - -+/* XXX TODO Probably fix to correct modern flags in code? Not sure how old FFMPEG we want to support though, -+ * so for now this will do. */ -+ -+#ifndef FF_MIN_BUFFER_SIZE -+# ifdef AV_INPUT_BUFFER_MIN_SIZE -+# define FF_MIN_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE -+# endif -+#endif -+ -+#ifndef FF_INPUT_BUFFER_PADDING_SIZE -+# ifdef AV_INPUT_BUFFER_PADDING_SIZE -+# define FF_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE -+# endif -+#endif -+ -+#ifndef CODEC_FLAG_GLOBAL_HEADER -+# ifdef AV_CODEC_FLAG_GLOBAL_HEADER -+# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER -+# endif -+#endif -+ -+#ifndef CODEC_FLAG_GLOBAL_HEADER -+# ifdef AV_CODEC_FLAG_GLOBAL_HEADER -+# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER -+# endif -+#endif -+ -+#ifndef CODEC_FLAG_INTERLACED_DCT -+# ifdef AV_CODEC_FLAG_INTERLACED_DCT -+# define CODEC_FLAG_INTERLACED_DCT AV_CODEC_FLAG_INTERLACED_DCT -+# endif -+#endif -+ -+#ifndef CODEC_FLAG_INTERLACED_ME -+# ifdef AV_CODEC_FLAG_INTERLACED_ME -+# define CODEC_FLAG_INTERLACED_ME AV_CODEC_FLAG_INTERLACED_ME -+# endif -+#endif -+ - /* FFmpeg upstream 1.0 is the first who added AV_ prefix. */ - #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 59, 100) - # define AV_CODEC_ID_NONE CODEC_ID_NONE -diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c -index a19e414..04d508a 100644 ---- a/source/blender/blenkernel/intern/writeffmpeg.c -+++ b/source/blender/blenkernel/intern/writeffmpeg.c -@@ -605,7 +605,8 @@ static AVStream *alloc_video_stream(FFMpegContext *context, RenderData *rd, int - c->rc_buffer_aggressivity = 1.0; - #endif - -- c->me_method = ME_EPZS; -+ /* Deprecated and not doing anything since July 2015, deleted in recent ffmpeg */ -+ //c->me_method = ME_EPZS; - - codec = avcodec_find_encoder(c->codec_id); - if (!codec) diff --git a/gnu/packages/patches/blender-2.79-oiio2.patch b/gnu/packages/patches/blender-2.79-oiio2.patch deleted file mode 100644 index 1c3606a940..0000000000 --- a/gnu/packages/patches/blender-2.79-oiio2.patch +++ /dev/null @@ -1,284 +0,0 @@ -From: Sergey Sharybin <[email protected]> -Date: Fri, 28 Dec 2018 11:25:35 +0100 -Subject: adapt_build_against_OIIO2 - ---- - intern/cycles/blender/blender_python.cpp | 2 +- - intern/cycles/graph/node_xml.cpp | 2 +- - intern/cycles/render/buffers.cpp | 4 ++-- - intern/cycles/render/image.cpp | 15 ++++-------- - intern/cycles/render/image.h | 3 ++- - intern/cycles/util/util_unique_ptr.h | 28 ++++++++++++++++++++++ - .../blender/imbuf/intern/oiio/openimageio_api.cpp | 19 +++++++-------- - 7 files changed, 48 insertions(+), 25 deletions(-) - create mode 100644 intern/cycles/util/util_unique_ptr.h - -diff --git a/intern/cycles/blender/blender_python.cpp b/intern/cycles/blender/blender_python.cpp -index 54973fd..bee6dd1 100644 ---- a/intern/cycles/blender/blender_python.cpp -+++ b/intern/cycles/blender/blender_python.cpp -@@ -493,7 +493,7 @@ static PyObject *osl_update_node_func(PyObject * /*self*/, PyObject *args) - socket_type = "NodeSocketString"; - data_type = BL::NodeSocket::type_STRING; - if(param->validdefault) -- default_string = param->sdefault[0]; -+ default_string = param->sdefault[0].string(); - } - else - continue; -diff --git a/intern/cycles/graph/node_xml.cpp b/intern/cycles/graph/node_xml.cpp -index d26b3b2..2a24104 100644 ---- a/intern/cycles/graph/node_xml.cpp -+++ b/intern/cycles/graph/node_xml.cpp -@@ -250,7 +250,7 @@ void xml_read_node(XMLReader& reader, Node *node, xml_node xml_node) - } - } - -- if(node->name) -+ if(!node->name.empty()) - reader.node_map[node->name] = node; - } - -diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp -index cf402c3..f84a37a 100644 ---- a/intern/cycles/render/buffers.cpp -+++ b/intern/cycles/render/buffers.cpp -@@ -27,6 +27,7 @@ - #include "util/util_opengl.h" - #include "util/util_time.h" - #include "util/util_types.h" -+#include "util/util_unique_ptr.h" - - CCL_NAMESPACE_BEGIN - -@@ -453,7 +454,7 @@ void DisplayBuffer::write(Device *device, const string& filename) - device->pixels_copy_from(rgba, 0, w, h); - - /* write image */ -- ImageOutput *out = ImageOutput::create(filename); -+ unique_ptr<ImageOutput> out = unique_ptr<ImageOutput>(ImageOutput::create(filename)); - ImageSpec spec(w, h, 4, TypeDesc::UINT8); - int scanlinesize = w*4*sizeof(uchar); - -@@ -468,7 +469,6 @@ void DisplayBuffer::write(Device *device, const string& filename) - - out->close(); - -- delete out; - } - - device_memory& DisplayBuffer::rgba_data() -diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp -index 595eb46..a143b02 100644 ---- a/intern/cycles/render/image.cpp -+++ b/intern/cycles/render/image.cpp -@@ -23,6 +23,7 @@ - #include "util/util_path.h" - #include "util/util_progress.h" - #include "util/util_texture.h" -+#include "util/util_unique_ptr.h" - - #ifdef WITH_OSL - #include <OSL/oslexec.h> -@@ -148,7 +149,7 @@ ImageDataType ImageManager::get_image_metadata(const string& filename, - return IMAGE_DATA_TYPE_BYTE4; - } - -- ImageInput *in = ImageInput::create(filename); -+ unique_ptr<ImageInput> in(ImageInput::create(filename)); - - if(in) { - ImageSpec spec; -@@ -194,7 +195,6 @@ ImageDataType ImageManager::get_image_metadata(const string& filename, - in->close(); - } - -- delete in; - } - - if(is_half) { -@@ -449,7 +449,7 @@ void ImageManager::tag_reload_image(const string& filename, - } - - bool ImageManager::file_load_image_generic(Image *img, -- ImageInput **in, -+ unique_ptr<ImageInput> *in, - int &width, - int &height, - int &depth, -@@ -465,7 +465,7 @@ bool ImageManager::file_load_image_generic(Image *img, - } - - /* load image from file through OIIO */ -- *in = ImageInput::create(img->filename); -+ *in = unique_ptr<ImageInput>(ImageInput::create(img->filename)); - - if(!*in) - return false; -@@ -477,8 +477,6 @@ bool ImageManager::file_load_image_generic(Image *img, - config.attribute("oiio:UnassociatedAlpha", 1); - - if(!(*in)->open(img->filename, spec, config)) { -- delete *in; -- *in = NULL; - return false; - } - -@@ -500,8 +498,6 @@ bool ImageManager::file_load_image_generic(Image *img, - if(!(components >= 1 && components <= 4)) { - if(*in) { - (*in)->close(); -- delete *in; -- *in = NULL; - } - - return false; -@@ -519,7 +515,7 @@ bool ImageManager::file_load_image(Image *img, - device_vector<DeviceType>& tex_img) - { - const StorageType alpha_one = (FileFormat == TypeDesc::UINT8)? 255 : 1; -- ImageInput *in = NULL; -+ unique_ptr<ImageInput> in = NULL; - int width, height, depth, components; - if(!file_load_image_generic(img, &in, width, height, depth, components)) { - return false; -@@ -575,7 +571,6 @@ bool ImageManager::file_load_image(Image *img, - } - cmyk = strcmp(in->format_name(), "jpeg") == 0 && components == 4; - in->close(); -- delete in; - } - else { - if(FileFormat == TypeDesc::FLOAT) { -diff --git a/intern/cycles/render/image.h b/intern/cycles/render/image.h -index db7e28a..f4a14f4 100644 ---- a/intern/cycles/render/image.h -+++ b/intern/cycles/render/image.h -@@ -23,6 +23,7 @@ - #include "util/util_image.h" - #include "util/util_string.h" - #include "util/util_thread.h" -+#include "util/util_unique_ptr.h" - #include "util/util_vector.h" - - CCL_NAMESPACE_BEGIN -@@ -133,7 +134,7 @@ private: - bool pack_images; - - bool file_load_image_generic(Image *img, -- ImageInput **in, -+ unique_ptr<ImageInput> *in, - int &width, - int &height, - int &depth, -diff --git a/intern/cycles/util/util_unique_ptr.h b/intern/cycles/util/util_unique_ptr.h -new file mode 100644 -index 0000000..1ceae73 ---- /dev/null -+++ b/intern/cycles/util/util_unique_ptr.h -@@ -0,0 +1,28 @@ -+/* -+ * Copyright 2011-2013 Blender Foundation -+ * -+ * Licensed under the Apache License, Version 2.0 (the "License"); -+ * you may not use this file except in compliance with the License. -+ * You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, -+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ * See the License for the specific language governing permissions and -+ * limitations under the License. -+ */ -+ -+#ifndef __UTIL_UNIQUE_PTR_H__ -+#define __UTIL_UNIQUE_PTR_H__ -+ -+#include <memory> -+ -+CCL_NAMESPACE_BEGIN -+ -+using std::unique_ptr; -+ -+CCL_NAMESPACE_END -+ -+#endif /* __UTIL_UNIQUE_PTR_H__ */ -diff --git a/source/blender/imbuf/intern/oiio/openimageio_api.cpp b/source/blender/imbuf/intern/oiio/openimageio_api.cpp -index b123d50..7f2fac9 100644 ---- a/source/blender/imbuf/intern/oiio/openimageio_api.cpp -+++ b/source/blender/imbuf/intern/oiio/openimageio_api.cpp -@@ -35,6 +35,11 @@ - #include "utfconv.h" - #endif - -+// NOTE: Keep first, BLI_path_util conflicts with OIIO's format. -+#include <memory> -+#include <openimageio_api.h> -+#include <OpenImageIO/imageio.h> -+ - extern "C" - { - #include "MEM_guardedalloc.h" -@@ -48,12 +53,10 @@ extern "C" - #include "IMB_colormanagement_intern.h" - } - --#include <openimageio_api.h> --#include <OpenImageIO/imageio.h> -- - OIIO_NAMESPACE_USING - - using std::string; -+using std::unique_ptr; - - typedef unsigned char uchar; - -@@ -197,7 +200,6 @@ int imb_save_photoshop(struct ImBuf *ibuf, const char * /*name*/, int flags) - - struct ImBuf *imb_load_photoshop(const char *filename, int flags, char colorspace[IM_MAX_SPACE]) - { -- ImageInput *in = NULL; - struct ImBuf *ibuf = NULL; - int width, height, components; - bool is_float, is_alpha; -@@ -210,7 +212,7 @@ struct ImBuf *imb_load_photoshop(const char *filename, int flags, char colorspac - - colorspace_set_default_role(colorspace, IM_MAX_SPACE, COLOR_ROLE_DEFAULT_BYTE); - -- in = ImageInput::create(filename); -+ unique_ptr<ImageInput> in(ImageInput::create(filename)); - if (!in) { - std::cerr << __func__ << ": ImageInput::create() failed:" << std::endl - << OIIO_NAMESPACE::geterror() << std::endl; -@@ -223,7 +225,6 @@ struct ImBuf *imb_load_photoshop(const char *filename, int flags, char colorspac - if (!in->open(filename, spec, config)) { - std::cerr << __func__ << ": ImageInput::open() failed:" << std::endl - << in->geterror() << std::endl; -- delete in; - return NULL; - } - -@@ -249,19 +250,17 @@ struct ImBuf *imb_load_photoshop(const char *filename, int flags, char colorspac - if (!(components >= 1 && components <= 4)) { - if (in) { - in->close(); -- delete in; - } - return NULL; - } - - if (is_float) -- ibuf = imb_oiio_load_image_float(in, width, height, components, flags, is_alpha); -+ ibuf = imb_oiio_load_image_float(in.get(), width, height, components, flags, is_alpha); - else -- ibuf = imb_oiio_load_image(in, width, height, components, flags, is_alpha); -+ ibuf = imb_oiio_load_image(in.get(), width, height, components, flags, is_alpha); - - if (in) { - in->close(); -- delete in; - } - - if (!ibuf) diff --git a/gnu/packages/patches/blender-2.79-python-3.7-fix.patch b/gnu/packages/patches/blender-2.79-python-3.7-fix.patch deleted file mode 100644 index fd1d8ba437..0000000000 --- a/gnu/packages/patches/blender-2.79-python-3.7-fix.patch +++ /dev/null @@ -1,43 +0,0 @@ -Copied from https://git.blender.org/gitweb/gitweb.cgi/blender.git/patch/1db47a2ccd1e68994bf8140eba6cc2a26a2bc91f -Fixes <https://bugs.gnu.org/33608>. - -From 1db47a2ccd1e68994bf8140eba6cc2a26a2bc91f Mon Sep 17 00:00:00 2001 -From: Campbell Barton <[email protected]> -Date: Thu, 12 Jul 2018 08:28:06 +0200 -Subject: [PATCH] Fix PyRNA class registration w/ Python 3.7 - -In Python3.7 this now raises an error. ---- - source/blender/python/intern/bpy_rna.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c -index 9052b6f580a..80b0aa7a51b 100644 ---- a/source/blender/python/intern/bpy_rna.c -+++ b/source/blender/python/intern/bpy_rna.c -@@ -7577,10 +7577,12 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr, StructRNA *srna, v - if (!(flag & PROP_REGISTER)) - continue; - -+ /* TODO(campbell): Use Python3.7x _PyObject_LookupAttr(), also in the macro below. */ - identifier = RNA_property_identifier(prop); - item = PyObject_GetAttrString(py_class, identifier); - - if (item == NULL) { -+ PyErr_Clear(); - /* Sneaky workaround to use the class name as the bl_idname */ - - #define BPY_REPLACEMENT_STRING(rna_attr, py_attr) \ -@@ -7596,6 +7598,9 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr, StructRNA *srna, v - } \ - Py_DECREF(item); \ - } \ -+ else { \ -+ PyErr_Clear(); \ -+ } \ - } /* intentionally allow else here */ - - if (false) {} /* needed for macro */ --- -2.20.1 - diff --git a/gnu/packages/patches/blender-2.79-python-3.8-fix.patch b/gnu/packages/patches/blender-2.79-python-3.8-fix.patch deleted file mode 100644 index 18d25449ee..0000000000 --- a/gnu/packages/patches/blender-2.79-python-3.8-fix.patch +++ /dev/null @@ -1,204 +0,0 @@ -From 4b663ecf264020b1d7003a137ce84b06d7ec4ce6 Mon Sep 17 00:00:00 2001 -From: bartus <[email protected]> -Date: Sat, 16 Nov 2019 20:29:30 +0100 -Subject: [PATCH] Add python 3.8 support. - ---- - source/blender/python/generic/py_capi_utils.c | 27 +++++++++++++++---- - 1 file changed, 22 insertions(+), 5 deletions(-) - -diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c -index 545e0506f84..a7eab70600b 100644 ---- a/source/blender/python/generic/py_capi_utils.c -+++ b/source/blender/python/generic/py_capi_utils.c -@@ -696,9 +696,16 @@ PyObject *PyC_UnicodeFromByte(const char *str) - ****************************************************************************/ - PyObject *PyC_DefaultNameSpace(const char *filename) - { -+ #if PY_VERSION_HEX >= 0x03080000 -+ PyObject *modules = PyImport_GetModuleDict(); -+ PyObject *builtins = PyEval_GetBuiltins(); -+ #else - PyInterpreterState *interp = PyThreadState_GET()->interp; -+ PyObject *modules = interp->modules; -+ PyObject *builtins = interp->builtins; -+ #endif - PyObject *mod_main = PyModule_New("__main__"); -- PyDict_SetItemString(interp->modules, "__main__", mod_main); -+ PyDict_SetItemString(modules, "__main__", mod_main); - Py_DECREF(mod_main); /* sys.modules owns now */ - PyModule_AddStringConstant(mod_main, "__name__", "__main__"); - if (filename) { -@@ -706,8 +713,8 @@ PyObject *PyC_DefaultNameSpace(const char *filename) - * note: this wont map to a real file when executing text-blocks and buttons. */ - PyModule_AddObject(mod_main, "__file__", PyC_UnicodeFromByte(filename)); - } -- PyModule_AddObject(mod_main, "__builtins__", interp->builtins); -- Py_INCREF(interp->builtins); /* AddObject steals a reference */ -+ PyModule_AddObject(mod_main, "__builtins__", builtins); -+ Py_INCREF(builtins); /* AddObject steals a reference */ - return PyModule_GetDict(mod_main); - } - -@@ -734,15 +741,25 @@ bool PyC_NameSpace_ImportArray(PyObject *py_dict, const char *imports[]) - /* restore MUST be called after this */ - void PyC_MainModule_Backup(PyObject **main_mod) - { -+ #if PY_VERSION_HEX >= 0x03080000 -+ PyObject *modules = PyImport_GetModuleDict(); -+ #else - PyInterpreterState *interp = PyThreadState_GET()->interp; -- *main_mod = PyDict_GetItemString(interp->modules, "__main__"); -+ PyObject *modules = interp->modules; -+ #endif -+ *main_mod = PyDict_GetItemString(modules, "__main__"); - Py_XINCREF(*main_mod); /* don't free */ - } - - void PyC_MainModule_Restore(PyObject *main_mod) - { -+ #if PY_VERSION_HEX >= 0x03080000 -+ PyObject *modules = PyImport_GetModuleDict(); -+ #else - PyInterpreterState *interp = PyThreadState_GET()->interp; -- PyDict_SetItemString(interp->modules, "__main__", main_mod); -+ PyObject *modules = interp->modules; -+ #endif -+ PyDict_SetItemString(modules, "__main__", main_mod); - Py_XDECREF(main_mod); - } - --- -2.24.0 - -From 44f719b63238503ef8f933f55383c6d4798995cc Mon Sep 17 00:00:00 2001 -From: Campbell Barton <[email protected]> -Date: Thu, 13 Sep 2018 17:06:07 +1000 -Subject: [PATCH] Cleanup: use PyImport_GetModuleDict - -Replace direct access using PyThreadState_GET ---- - source/blender/python/bmesh/bmesh_py_api.c | 2 +- - source/blender/python/generic/idprop_py_api.c | 2 +- - source/blender/python/intern/bpy_interface.c | 2 +- - source/blender/python/intern/gpu.c | 4 ++-- - source/blender/python/mathutils/mathutils.c | 2 +- - source/blender/python/mathutils/mathutils_noise.c | 5 +++-- - source/gameengine/Ketsji/KX_PythonInit.cpp | 2 +- - 7 files changed, 10 insertions(+), 9 deletions(-) - -diff --git a/source/blender/python/bmesh/bmesh_py_api.c b/source/blender/python/bmesh/bmesh_py_api.c -index d5973baeadb..d7324eabb6c 100644 ---- a/source/blender/python/bmesh/bmesh_py_api.c -+++ b/source/blender/python/bmesh/bmesh_py_api.c -@@ -196,7 +196,7 @@ PyObject *BPyInit_bmesh(void) - { - PyObject *mod; - PyObject *submodule; -- PyObject *sys_modules = PyThreadState_GET()->interp->modules; -+ PyObject *sys_modules = PyImport_GetModuleDict(); - - BPy_BM_init_types(); - BPy_BM_init_types_select(); -diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c -index 4d4d5232800..8bed0f28cba 100644 ---- a/source/blender/python/generic/idprop_py_api.c -+++ b/source/blender/python/generic/idprop_py_api.c -@@ -1795,7 +1795,7 @@ PyObject *BPyInit_idprop(void) - { - PyObject *mod; - PyObject *submodule; -- PyObject *sys_modules = PyThreadState_GET()->interp->modules; -+ PyObject *sys_modules = PyImport_GetModuleDict(); - - mod = PyModule_Create(&IDProp_module_def); - -diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c -index 7ca087e4993..123c938b921 100644 ---- a/source/blender/python/intern/bpy_interface.c -+++ b/source/blender/python/intern/bpy_interface.c -@@ -537,7 +537,7 @@ static bool python_script_exec( - - if (py_dict) { - #ifdef PYMODULE_CLEAR_WORKAROUND -- PyModuleObject *mmod = (PyModuleObject *)PyDict_GetItemString(PyThreadState_GET()->interp->modules, "__main__"); -+ PyModuleObject *mmod = (PyModuleObject *)PyDict_GetItemString(PyImport_GetModuleDict(), "__main__"); - PyObject *dict_back = mmod->md_dict; - /* freeing the module will clear the namespace, - * gives problems running classes defined in this namespace being used later. */ -diff --git a/source/blender/python/intern/gpu.c b/source/blender/python/intern/gpu.c -index 43796dc9474..d902b6838f4 100644 ---- a/source/blender/python/intern/gpu.c -+++ b/source/blender/python/intern/gpu.c -@@ -326,7 +326,7 @@ PyObject *GPU_initPython(void) - { - PyObject *module; - PyObject *submodule; -- PyObject *sys_modules = PyThreadState_GET()->interp->modules; -+ PyObject *sys_modules = PyImport_GetModuleDict(); - - module = PyInit_gpu(); - -@@ -337,6 +337,6 @@ PyObject *GPU_initPython(void) - PyDict_SetItem(sys_modules, PyModule_GetNameObject(submodule), submodule); - Py_INCREF(submodule); - -- PyDict_SetItem(PyImport_GetModuleDict(), PyModule_GetNameObject(module), module); -+ PyDict_SetItem(sys_modules, PyModule_GetNameObject(module), module); - return module; - } -diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c -index a3a4e7f313b..f021d456b3a 100644 ---- a/source/blender/python/mathutils/mathutils.c -+++ b/source/blender/python/mathutils/mathutils.c -@@ -615,7 +615,7 @@ PyMODINIT_FUNC PyInit_mathutils(void) - { - PyObject *mod; - PyObject *submodule; -- PyObject *sys_modules = PyThreadState_GET()->interp->modules; -+ PyObject *sys_modules = PyImport_GetModuleDict(); - - if (PyType_Ready(&vector_Type) < 0) - return NULL; -diff --git a/source/blender/python/mathutils/mathutils_noise.c b/source/blender/python/mathutils/mathutils_noise.c -index 839d1ffc588..834322c0aed 100644 ---- a/source/blender/python/mathutils/mathutils_noise.c -+++ b/source/blender/python/mathutils/mathutils_noise.c -@@ -845,6 +845,7 @@ static struct PyModuleDef M_Noise_module_def = { - /*----------------------------MODULE INIT-------------------------*/ - PyMODINIT_FUNC PyInit_mathutils_noise(void) - { -+ PyObject *sys_modules = PyImport_GetModuleDict(); - PyObject *submodule = PyModule_Create(&M_Noise_module_def); - PyObject *item_types, *item_metrics; - -@@ -852,11 +853,11 @@ PyMODINIT_FUNC PyInit_mathutils_noise(void) - setRndSeed(0); - - PyModule_AddObject(submodule, "types", (item_types = PyInit_mathutils_noise_types())); -- PyDict_SetItemString(PyThreadState_GET()->interp->modules, "noise.types", item_types); -+ PyDict_SetItemString(sys_modules, "noise.types", item_types); - Py_INCREF(item_types); - - PyModule_AddObject(submodule, "distance_metrics", (item_metrics = PyInit_mathutils_noise_metrics())); -- PyDict_SetItemString(PyThreadState_GET()->interp->modules, "noise.distance_metrics", item_metrics); -+ PyDict_SetItemString(sys_modules, "noise.distance_metrics", item_metrics); - Py_INCREF(item_metrics); - - return submodule; -diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp -index 251273cf7a8..9611a4ea49b 100644 ---- a/source/gameengine/Ketsji/KX_PythonInit.cpp -+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp -@@ -2234,7 +2234,7 @@ PyMODINIT_FUNC initBGE(void) - { - PyObject *mod; - PyObject *submodule; -- PyObject *sys_modules = PyThreadState_GET()->interp->modules; -+ PyObject *sys_modules = PyImport_GetModuleDict(); - const char *mod_full; - - mod = PyModule_Create(&BGE_module_def); --- -2.25.0 - diff --git a/gnu/packages/patches/bubblewrap-fix-locale-in-tests.patch b/gnu/packages/patches/bubblewrap-fix-locale-in-tests.patch new file mode 100644 index 0000000000..bd5924ef87 --- /dev/null +++ b/gnu/packages/patches/bubblewrap-fix-locale-in-tests.patch @@ -0,0 +1,34 @@ +From 9282223de4b511aeda3b7d2caf3810a56a865710 Mon Sep 17 00:00:00 2001 +From: kiasoc5 <[email protected]> +Date: Mon, 10 Jan 2022 14:16:32 -0500 +Subject: [PATCH] Use C locale unconditionally for tests. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The ‘en_US.utf8’ locale is available. However, the ‘locale -a’ command won’t list it. +--- + tests/libtest-core.sh | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/tests/libtest-core.sh b/tests/libtest-core.sh +index 9632e90..82951dd 100644 +--- a/tests/libtest-core.sh ++++ b/tests/libtest-core.sh +@@ -41,12 +41,7 @@ assert_not_reached () { + # + # If we can't find the locale command assume we have support for C.UTF-8 + # (e.g. musl based systems) +-if type -p locale >/dev/null; then +- export LC_ALL=$(locale -a | grep -iEe '^(C|en_US)\.(UTF-8|utf8)$' | head -n1 || true) +- if [ -z "${LC_ALL}" ]; then fatal "Can't find suitable UTF-8 locale"; fi +-else +- export LC_ALL=C.UTF-8 +-fi ++export LC_ALL=en_US.utf8 + # A GNU extension, used whenever LC_ALL is not C + unset LANGUAGE + +-- +2.34.1 + diff --git a/gnu/packages/patches/calibre-fix-zeroconf.patch b/gnu/packages/patches/calibre-fix-zeroconf.patch new file mode 100644 index 0000000000..d7d0f18667 --- /dev/null +++ b/gnu/packages/patches/calibre-fix-zeroconf.patch @@ -0,0 +1,38 @@ +Fix a build failure when upgrading zeroconf from 0.28.8 to 0.38.1: + +https://issues.guix.gnu.org/53247 + +Patch copied from Gentoo: + +https://bugs.gentoo.org/800233#c5 + +diff --color -Naru a/src/calibre/devices/smart_device_app/driver.py b/src/calibre/devices/smart_device_app/driver.py +--- a/src/calibre/devices/smart_device_app/driver.py 2021-08-08 08:32:03.104016444 +0200 ++++ b/src/calibre/devices/smart_device_app/driver.py 2021-08-08 08:33:30.699018403 +0200 +@@ -2040,13 +2040,6 @@ + # Function to monkeypatch zeroconf to remove the 15 character name length restriction. + # Copied from https://github.com/jstasiak/python-zeroconf version 0.28.1 + +- +-from zeroconf import (BadTypeInNameException, _HAS_A_TO_Z, +- _HAS_ONLY_A_TO_Z_NUM_HYPHEN_UNDERSCORE, +- _HAS_ASCII_CONTROL_CHARS, +- _HAS_ONLY_A_TO_Z_NUM_HYPHEN) +- +- + def service_type_name(type_: str, *, allow_underscores: bool = False) -> str: + """ + Validate a fully qualified service name, instance or subtype. [rfc6763] +@@ -2087,6 +2080,12 @@ + :param type_: Type, SubType or service name to validate + :return: fully qualified service name (eg: _http._tcp.local.) + """ ++ ++ from zeroconf import (BadTypeInNameException, _HAS_A_TO_Z, ++ _HAS_ONLY_A_TO_Z_NUM_HYPHEN_UNDERSCORE, ++ _HAS_ASCII_CONTROL_CHARS, ++ _HAS_ONLY_A_TO_Z_NUM_HYPHEN) ++ + if not (type_.endswith('._tcp.local.') or type_.endswith('._udp.local.')): + raise BadTypeInNameException("Type '%s' must end with '._tcp.local.' or '._udp.local.'" % type_) + diff --git a/gnu/packages/patches/chez-scheme-build-util-paths-backport.patch b/gnu/packages/patches/chez-scheme-build-util-paths-backport.patch deleted file mode 100644 index aad2d99996..0000000000 --- a/gnu/packages/patches/chez-scheme-build-util-paths-backport.patch +++ /dev/null @@ -1,780 +0,0 @@ -From 2447e047b750c3371778beb487f881641a582e66 Mon Sep 17 00:00:00 2001 -From: Philip McGrath <[email protected]> -Date: Thu, 11 Mar 2021 18:17:47 -0500 -Subject: [PATCH] avoid hard-coded paths for utilities in build scripts - -Backported from -https://github.com/cisco/ChezScheme/commit/8f4633ce24ac6425b2ab13cc78026b1c9bb5361e - -Specific changes: - - `cc` -> `$(CC)` - - `/bin/rm` -> `rm` - - `/bin/ln` -> `ln` - - `/bin/cp` -> `cp` - - `/bin/echo` -> `echo` - - in `makefiles/installsh`, add a case to find `true` - at an unusual path or as a shell builtin - -Co-authored-by: Andy Keep <[email protected]> ---- - LOG | 12 ++++++++++++ - csug/gifs/Makefile | 8 ++++---- - csug/math/Makefile | 4 ++-- - examples/Makefile | 2 +- - makefiles/Makefile-csug.in | 6 +++--- - makefiles/Makefile-release_notes.in | 2 +- - makefiles/Mf-install.in | 4 ++-- - makefiles/installsh | 3 ++- - mats/6.ms | 2 +- - mats/Mf-a6fb | 4 ++-- - mats/Mf-a6le | 4 ++-- - mats/Mf-a6nb | 4 ++-- - mats/Mf-a6ob | 4 ++-- - mats/Mf-a6osx | 4 ++-- - mats/Mf-arm32le | 4 ++-- - mats/Mf-i3fb | 4 ++-- - mats/Mf-i3le | 4 ++-- - mats/Mf-i3nb | 4 ++-- - mats/Mf-i3ob | 4 ++-- - mats/Mf-i3osx | 4 ++-- - mats/Mf-i3qnx | 4 ++-- - mats/Mf-ppc32le | 4 ++-- - mats/Mf-ta6fb | 4 ++-- - mats/Mf-ta6le | 4 ++-- - mats/Mf-ta6nb | 4 ++-- - mats/Mf-ta6ob | 4 ++-- - mats/Mf-ta6osx | 4 ++-- - mats/Mf-ti3fb | 4 ++-- - mats/Mf-ti3le | 4 ++-- - mats/Mf-ti3nb | 4 ++-- - mats/Mf-ti3ob | 4 ++-- - mats/Mf-ti3osx | 4 ++-- - mats/Mf-tppc32le | 4 ++-- - mats/unix.ms | 4 ++-- - newrelease | 22 +++++++++++----------- - pkg/Makefile | 2 +- - release_notes/gifs/Makefile | 6 +++--- - release_notes/math/Makefile | 4 ++-- - s/Mf-base | 2 +- - workarea | 10 +++++----- - 40 files changed, 101 insertions(+), 88 deletions(-) - -diff --git a/LOG b/LOG -index e1631df..399104d 100644 ---- a/LOG -+++ b/LOG -@@ -2119,3 +2119,15 @@ - bintar/Makefile rpm/Makefile pkg/Makefile wininstall/Makefile - wininstall/a6nt.wxs wininstall/i3nt.wxs wininstall/ta6nt.wxs - wininstall/ti3nt.wxs -+9.5.5 changes: -+- avoid hard-coded paths for utilities in build scripts -+ checkin csug/gifs/Makefile csug/math/Makefile examples/Makefile -+ makefiles/Makefile-csug.in makefiles/Makefile-release_notes.in -+ makefiles/Mf-install.in makefiles/installsh mats/6.ms mats/Mf-a6fb -+ mats/Mf-a6le mats/Mf-a6nb mats/Mf-a6ob mats/Mf-a6osx mats/Mf-arm32le -+ mats/Mf-i3fb mats/Mf-i3le mats/Mf-i3nb mats/Mf-i3ob mats/Mf-i3osx -+ mats/Mf-i3qnx mats/Mf-ppc32le mats/Mf-ta6fb mats/Mf-ta6le mats/Mf-ta6nb -+ mats/Mf-ta6ob mats/Mf-ta6osx mats/Mf-ti3fb mats/Mf-ti3le mats/Mf-ti3nb -+ mats/Mf-ti3ob mats/Mf-ti3osx mats/Mf-tppc32le mats/unix.ms newrelease -+ pkg/Makefile release_notes/gifs/Makefile release_notes/math/Makefile -+ s/Mf-base workarea -diff --git a/csug/gifs/Makefile b/csug/gifs/Makefile -index 8676e4c..4253ffd 100644 ---- a/csug/gifs/Makefile -+++ b/csug/gifs/Makefile -@@ -18,7 +18,7 @@ density=-r90x90 - ${density} - |\ - pnmcrop |\ - ppmtogif -transparent white > $*.gif -- /bin/rm -f $*.dvi $*.log *.aux -+ rm -f $*.dvi $*.log *.aux - test -f $*.gif && chmod 644 $*.gif - - # translate ps file to gif w/o transparent white background -@@ -28,7 +28,7 @@ density=-r90x90 - ${density} - |\ - pnmcrop |\ - ppmtogif > $*.gif -- /bin/rm -f $*.dvi $*.log *.aux -+ rm -f $*.dvi $*.log *.aux - test -f $*.gif && chmod 644 $*.gif - - all: ${gifs} -@@ -57,7 +57,7 @@ ghostRightarrow.gif: Rightarrow.tex - giftrans -g '#000000=#ffffff' |\ - giftopnm |\ - ppmtogif -transparent white > $*.gif -- /bin/rm -f Rightarrow.dvi Rightarrow.log Rightarrow.aux -+ rm -f Rightarrow.dvi Rightarrow.log Rightarrow.aux - test -f $*.gif && chmod 644 $*.gif - --clean: ; /bin/rm -f *.gif Make.out -+clean: ; rm -f *.gif Make.out -diff --git a/csug/math/Makefile b/csug/math/Makefile -index 3385fdb..3392ea8 100644 ---- a/csug/math/Makefile -+++ b/csug/math/Makefile -@@ -15,11 +15,11 @@ density=-r90x90 - ${density} - |\ - pnmcrop |\ - ppmtogif -transparent white > $*.gif -- /bin/rm -f $*.dvi $*.log $*.aux -+ rm -f $*.dvi $*.log $*.aux - test -f $*.gif && chmod 644 $*.gif - - all: ${gifs} - - ${gifs}: mathmacros - --clean: ; /bin/rm -f *.gif Make.out -+clean: ; rm -f *.gif Make.out -diff --git a/examples/Makefile b/examples/Makefile -index b1b4e1d..3edfdd0 100644 ---- a/examples/Makefile -+++ b/examples/Makefile -@@ -25,4 +25,4 @@ needed: ${obj} - - all: ; echo "(time (for-each compile-file (map symbol->string '(${src}))))" | ${Scheme} - --clean: ; /bin/rm -f $(obj) expr.md -+clean: ; rm -f $(obj) expr.md -diff --git a/makefiles/Makefile-csug.in b/makefiles/Makefile-csug.in -index df24092..6f8a8d9 100644 ---- a/makefiles/Makefile-csug.in -+++ b/makefiles/Makefile-csug.in -@@ -29,7 +29,7 @@ install: target - # thrice is not enough when starting from scratch - logcheck1: $(x).thirdrun - @if [ -n "`grep 'Warning: Label(s) may have changed' $(x).log`" ] ; then\ -- /bin/rm -f $(x).thirdrun ;\ -+ rm -f $(x).thirdrun ;\ - $(MAKE) $(x).thirdrun;\ - fi - -@@ -55,7 +55,7 @@ stexsrc = csug.stex title.stex copyright.stex contents.stex\ - texsrc = ${stexsrc:%.stex=%.tex} - - title.tex contents.tex bibliography.tex: -- /bin/rm -f $*.tex -+ rm -f $*.tex - echo "%%% DO NOT EDIT THIS FILE" > $*.tex - echo "%%% Edit the .stex version instead" >> $*.tex - echo "" >> $*.tex -@@ -147,7 +147,7 @@ code: $(stexsrc) - echo '(load "code" pretty-print)' | $(Scheme) -q - - $(x).clean: -- -/bin/rm -f $(x).rfm $(x).sfm $(x).prefirstrun $(x).presecondrun\ -+ -rm -f $(x).rfm $(x).sfm $(x).prefirstrun $(x).presecondrun\ - $(x).prethirdrun $(x).ans\ - $(x).hprefirstrun $(x).hpresecondrun $(x).hprethirdrun\ - tspl.aux tspl.haux tspl.rfm tspl.idx in.hidx\ -diff --git a/makefiles/Makefile-release_notes.in b/makefiles/Makefile-release_notes.in -index 4435b6f..64348a4 100644 ---- a/makefiles/Makefile-release_notes.in -+++ b/makefiles/Makefile-release_notes.in -@@ -38,7 +38,7 @@ install: $x.pdf $x.html - $(INSTALL) -m 2755 -d $(installdir)/gifs - $(INSTALL) -m 0644 --ifdiff gifs/*.gif $(installdir)/gifs - $(INSTALL) -m 2755 -d $(installdir)/math -- -/bin/rm -rf $(installdir)/$(mathdir) -+ -rm -rf $(installdir)/$(mathdir) - $(INSTALL) -m 2755 -d $(installdir)/$(mathdir) - if [ -e $(mathdir)/0.gif ] ; then $(INSTALL) -m 0644 $(mathdir)/*.gif $(installdir)/$(mathdir) ; fi - -diff --git a/makefiles/Mf-install.in b/makefiles/Mf-install.in -index a702c34..c09043d 100644 ---- a/makefiles/Mf-install.in -+++ b/makefiles/Mf-install.in -@@ -114,12 +114,12 @@ bininstall: ${Bin} - libbininstall: ${LibBin} - $I -m 444 ${PetiteBoot} ${LibBin}/petite.boot - if [ "${InstallPetiteName}" != "petite" ]; then\ -- /bin/rm -f ${LibBin}/${InstallPetiteName}.boot;\ -+ rm -f ${LibBin}/${InstallPetiteName}.boot;\ - ln -f ${LibBin}/petite.boot ${LibBin}/${InstallPetiteName}.boot;\ - fi - $I -m 444 ${SchemeBoot} ${LibBin}/scheme.boot;\ - if [ "${InstallSchemeName}" != "scheme" ]; then\ -- /bin/rm -f ${LibBin}/${InstallSchemeName}.boot;\ -+ rm -f ${LibBin}/${InstallSchemeName}.boot;\ - ln -f ${LibBin}/scheme.boot ${LibBin}/${InstallSchemeName}.boot;\ - fi - ln -f ${LibBin}/scheme.boot ${LibBin}/${InstallScriptName}.boot; -diff --git a/makefiles/installsh b/makefiles/installsh -index 48f1e46..95d85fb 100755 ---- a/makefiles/installsh -+++ b/makefiles/installsh -@@ -1,7 +1,8 @@ - #! /bin/sh - if [ -x /bin/true ]; then TRUE=/bin/true; - elif [ -x /usr/bin/true ]; then TRUE=/usr/bin/true; --else echo "Can't find /bin/true or /usr/bin/true" ; exit 1; -+elif command -v true &> /dev/null; then TRUE=true; -+else echo "Can't find /bin/true or /usr/bin/true and no true command" ; exit 1; - fi - - while ${TRUE} ; do -diff --git a/mats/6.ms b/mats/6.ms -index 102f84b..e504230 100644 ---- a/mats/6.ms -+++ b/mats/6.ms -@@ -2685,7 +2685,7 @@ - (begin - (system "ln -s ../examples .") - (load "examples/fatfib.ss" compile) -- (system "/bin/rm examples") -+ (system "rm -f examples") - #t)) - (or (windows?) (embedded?) - (equal? -diff --git a/mats/Mf-a6fb b/mats/Mf-a6fb -index b16d1b6..ff9e687 100644 ---- a/mats/Mf-a6fb -+++ b/mats/Mf-a6fb -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -fPIC -shared -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -fPIC -shared -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-a6le b/mats/Mf-a6le -index d6fee09..a3bda76 100644 ---- a/mats/Mf-a6le -+++ b/mats/Mf-a6le -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -m64 -fPIC -shared -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -m64 -fPIC -shared -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-a6nb b/mats/Mf-a6nb -index 48187ef..0f7ac17 100644 ---- a/mats/Mf-a6nb -+++ b/mats/Mf-a6nb -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -fPIC -shared -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -fPIC -shared -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-a6ob b/mats/Mf-a6ob -index 12758f3..0ffcccc 100644 ---- a/mats/Mf-a6ob -+++ b/mats/Mf-a6ob -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -fPIC -shared -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -fPIC -shared -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-a6osx b/mats/Mf-a6osx -index f1dbf85..57bac22 100644 ---- a/mats/Mf-a6osx -+++ b/mats/Mf-a6osx -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -m64 -dynamiclib -undefined dynamic_lookup -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -m64 -dynamiclib -undefined dynamic_lookup -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-arm32le b/mats/Mf-arm32le -index f33a665..83896eb 100644 ---- a/mats/Mf-arm32le -+++ b/mats/Mf-arm32le -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -fPIC -fomit-frame-pointer -shared -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -fPIC -fomit-frame-pointer -shared -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-i3fb b/mats/Mf-i3fb -index 150cedb..1e4e8fc 100644 ---- a/mats/Mf-i3fb -+++ b/mats/Mf-i3fb -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -fPIC -shared -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -fPIC -shared -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-i3le b/mats/Mf-i3le -index 8f521c8..b248620 100644 ---- a/mats/Mf-i3le -+++ b/mats/Mf-i3le -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -m32 -fPIC -shared -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -m32 -fPIC -shared -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-i3nb b/mats/Mf-i3nb -index e81f6ff..8afeb5c 100644 ---- a/mats/Mf-i3nb -+++ b/mats/Mf-i3nb -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -fPIC -shared -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -fPIC -shared -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-i3ob b/mats/Mf-i3ob -index 4e3ee1b..fcd4dee 100644 ---- a/mats/Mf-i3ob -+++ b/mats/Mf-i3ob -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -fPIC -shared -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -fPIC -shared -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-i3osx b/mats/Mf-i3osx -index 53c7d4a..a55f6ee 100644 ---- a/mats/Mf-i3osx -+++ b/mats/Mf-i3osx -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -m32 -dynamiclib -undefined dynamic_lookup -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -m32 -dynamiclib -undefined dynamic_lookup -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-i3qnx b/mats/Mf-i3qnx -index 724f2db..3e1437a 100644 ---- a/mats/Mf-i3qnx -+++ b/mats/Mf-i3qnx -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -m32 -fPIC -shared -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -m32 -fPIC -shared -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-ppc32le b/mats/Mf-ppc32le -index 28151a8..547ca00 100644 ---- a/mats/Mf-ppc32le -+++ b/mats/Mf-ppc32le -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -m32 -fPIC -shared -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -m32 -fPIC -shared -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-ta6fb b/mats/Mf-ta6fb -index 921d609..5ed233e 100644 ---- a/mats/Mf-ta6fb -+++ b/mats/Mf-ta6fb -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -pthread -fPIC -shared -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -pthread -fPIC -shared -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-ta6le b/mats/Mf-ta6le -index cd014ec..21c686a 100644 ---- a/mats/Mf-ta6le -+++ b/mats/Mf-ta6le -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -m64 -pthread -fPIC -shared -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -m64 -pthread -fPIC -shared -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-ta6nb b/mats/Mf-ta6nb -index 6b1929d..9b9b898 100644 ---- a/mats/Mf-ta6nb -+++ b/mats/Mf-ta6nb -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -pthread -fPIC -shared -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -pthread -fPIC -shared -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-ta6ob b/mats/Mf-ta6ob -index a7aee91..8f25aed 100644 ---- a/mats/Mf-ta6ob -+++ b/mats/Mf-ta6ob -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -pthread -fPIC -shared -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -pthread -fPIC -shared -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-ta6osx b/mats/Mf-ta6osx -index 42da5d7..0dd386f 100644 ---- a/mats/Mf-ta6osx -+++ b/mats/Mf-ta6osx -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -m64 -pthread -dynamiclib -undefined dynamic_lookup -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -m64 -pthread -dynamiclib -undefined dynamic_lookup -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-ti3fb b/mats/Mf-ti3fb -index c891145..56bf7d3 100644 ---- a/mats/Mf-ti3fb -+++ b/mats/Mf-ti3fb -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -pthread -fPIC -shared -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -pthread -fPIC -shared -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-ti3le b/mats/Mf-ti3le -index 12e77b8..22b4148 100644 ---- a/mats/Mf-ti3le -+++ b/mats/Mf-ti3le -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -m32 -pthread -fPIC -shared -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -m32 -pthread -fPIC -shared -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-ti3nb b/mats/Mf-ti3nb -index 028c652..573946e 100644 ---- a/mats/Mf-ti3nb -+++ b/mats/Mf-ti3nb -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -pthread -fPIC -shared -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -pthread -fPIC -shared -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-ti3ob b/mats/Mf-ti3ob -index 8a4741c..4472b60 100644 ---- a/mats/Mf-ti3ob -+++ b/mats/Mf-ti3ob -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -pthread -fPIC -shared -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -pthread -fPIC -shared -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-ti3osx b/mats/Mf-ti3osx -index 6913c34..9273b44 100644 ---- a/mats/Mf-ti3osx -+++ b/mats/Mf-ti3osx -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -m32 -pthread -dynamiclib -undefined dynamic_lookup -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -m32 -pthread -dynamiclib -undefined dynamic_lookup -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/Mf-tppc32le b/mats/Mf-tppc32le -index a12b515..8b9d9f0 100644 ---- a/mats/Mf-tppc32le -+++ b/mats/Mf-tppc32le -@@ -21,7 +21,7 @@ fobj = foreign1.so - include Mf-base - - foreign1.so: ${fsrc} ../boot/$m/scheme.h -- cc -m32 -pthread -fPIC -shared -I${Include} -o foreign1.so ${fsrc} -+ $(CC) -m32 -pthread -fPIC -shared -I${Include} -o foreign1.so ${fsrc} - - cat_flush: cat_flush.c -- cc -o cat_flush cat_flush.c -+ $(CC) -o cat_flush cat_flush.c -diff --git a/mats/unix.ms b/mats/unix.ms -index cfba3e7..db7f6f9 100644 ---- a/mats/unix.ms -+++ b/mats/unix.ms -@@ -72,8 +72,8 @@ - (mat system - (eqv? (with-output-to-file "testfile.ss" void '(replace)) (void)) - (begin -- (system (format "~:[~;/pkg~]/bin/rm testfile.ss" (embedded?))) -- (system (format "~:[~;/pkg~]/bin/echo hello > testfile.ss" (embedded?))) -+ (system "rm -f testfile.ss") -+ (system "echo hello > testfile.ss") - (let ([p (open-input-file "testfile.ss")]) - (and (eq? (read p) 'hello) - (begin (close-input-port p) #t)))) -diff --git a/newrelease b/newrelease -index e903956..2d06740 100755 ---- a/newrelease -+++ b/newrelease -@@ -75,13 +75,13 @@ if ($status != 0) exit 1 - - cd $W - --/bin/rm -f BUILDING -+rm -f BUILDING - sed -e "s/Chez Scheme Version [^ ]*/Chez Scheme Version $R/" \ - -e "s/Copyright 1984-.... /Copyright 1984-`date +%Y` /" \ - ../BUILDING > BUILDING - set updatedfiles = ($updatedfiles BUILDING) - --/bin/rm -f NOTICE -+rm -f NOTICE - sed -e "s/Chez Scheme Version [^ ]*/Chez Scheme Version $R/" \ - -e "s/Copyright 1984-.... /Copyright 1984-`date +%Y` /" \ - ../NOTICE > NOTICE -@@ -92,19 +92,19 @@ sed -e "s/csv[0-9]\.[0-9]\(\.[0-9]\)*/csv$R/" ../makefiles/Mf-install.in > makef - sed -e "s/csug[0-9]\.[0-9]/csug$MR.$mR/" -e "s/csug[0-9]_[0-9]/csug$MR""_$mR/" ../makefiles/Makefile-csug.in > makefiles/Makefile-csug.in - set updatedfiles = ($updatedfiles makefiles/Mf-install.in makefiles/Makefile-csug.in) - --/bin/rm scheme.1.in -+rm -f scheme.1.in - sed -e "s/Chez Scheme Version [0-9]\.[0-9]\(\.[0-9]\)* .* [0-9][0-9]*/Chez Scheme Version $R `date +'%B %Y'`/" \ - -e "s/Copyright .* Cisco Systems, Inc./Copyright `date +%Y` Cisco Systems, Inc./" \ - ../scheme.1.in > scheme.1.in - set updatedfiles = ($updatedfiles scheme.1.in) - --/bin/rm -f c/Makefile.{,t}{i3,a6}nt -+rm -f c/Makefile.{,t}{i3,a6}nt - foreach fn (c/Makefile.{,t}{a6,i3}nt) - set updatedfiles = ($updatedfiles $fn) - sed -e "s/csv[0-9][0-9][0-9]*/csv$ZR/g" ../$fn > $fn - end - --/bin/rm -f mats/Mf-{,t}{i3,a6}nt -+rm -f mats/Mf-{,t}{i3,a6}nt - foreach fn (mats/Mf-{,t}{a6,i3}nt) - set updatedfiles = ($updatedfiles $fn) - sed -e "s/csv[0-9][0-9][0-9]*/csv$ZR/g" ../$fn > $fn -@@ -123,11 +123,11 @@ sed -e "s/FILEVERSION .*/FILEVERSION $RCVERSION/"\ - -e "s/Copyright 1984-..../Copyright 1984-`date +%Y`/g" ../c/scheme.rc > c/scheme.rc - set updatedfiles = ($updatedfiles c/scheme.rc) - --/bin/rm -f s/7.ss -+rm -f s/7.ss - sed -e "s/nCopyright 1984-..../nCopyright 1984-`date +%Y`/g" ../s/7.ss > s/7.ss - set updatedfiles = ($updatedfiles s/7.ss) - --/bin/rm -f s/cmacros.ss -+rm -f s/cmacros.ss - set VNUM = `printf "%04x%02x%02x" $MR $mR $bR` - sed -e "s/scheme-version #x......../scheme-version #x$VNUM/" ../s/cmacros.ss > s/cmacros.ss - set updatedfiles = ($updatedfiles s/cmacros.ss) -@@ -146,17 +146,17 @@ sed -e "s/Revised\(.*\)for Chez Scheme Version [^ ]*<br>/Revised\1for Chez Schem - ../csug/csug.stex > csug/csug.stex - set updatedfiles = ($updatedfiles csug/copyright.stex csug/csug.stex) - --/bin/rm bintar/Makefile -+rm -f bintar/Makefile - sed -e "s/^version = .*/version = $R/" \ - -e "s/csv[0-9][0-9][0-9]*/csv$ZR/g" \ - ../bintar/Makefile > bintar/Makefile - set updatedfiles = ($updatedfiles bintar/Makefile) - --/bin/rm rpm/Makefile -+rm -f rpm/Makefile - sed -e "s/^version = .*/version = $R/" ../rpm/Makefile > rpm/Makefile - set updatedfiles = ($updatedfiles rpm/Makefile) - --/bin/rm pkg/Makefile -+rm -f pkg/Makefile - sed -e "s/^version = .*/version = $R/" \ - -e "s/© .* Cisco Systems/\© `date +%Y` Cisco Systems/" \ - ../pkg/Makefile > pkg/Makefile -@@ -170,7 +170,7 @@ foreach fn (wininstall/{,t}{a6,i3}nt.wxs) - sed -e "s/csv[0-9][0-9][0-9]*/csv$ZR/" ../$fn > $fn - end - --/bin/rm LOG -+rm -f LOG - cat ../LOG > LOG - echo "" >> LOG - echo "$R changes:" >> LOG -diff --git a/pkg/Makefile b/pkg/Makefile -index e0eef67..a3fe83f 100644 ---- a/pkg/Makefile -+++ b/pkg/Makefile -@@ -39,7 +39,7 @@ $(PKG): $(BUILDROOT)/$(PKG) - --package-path $(BUILDROOT)\ - $(PKG) - sudo chown $(DOTUSER):$(DOTGROUP) $(PKG) -- sudo /bin/rm -rf $(RELEASE) $(BUILDROOT) -+ sudo rm -rf $(RELEASE) $(BUILDROOT) - - $(BUILDROOT)/$(PKG): $(PKGCONTENT) - sudo /usr/bin/pkgbuild\ -diff --git a/release_notes/gifs/Makefile b/release_notes/gifs/Makefile -index 9572965..701d53a 100644 ---- a/release_notes/gifs/Makefile -+++ b/release_notes/gifs/Makefile -@@ -15,7 +15,7 @@ density=-r90x90 - ${density} - |\ - pnmcrop |\ - ppmtogif -transparent white > $*.gif -- /bin/rm -f $*.dvi $*.log *.aux -+ rm -f $*.dvi $*.log *.aux - test -f $*.gif && chmod 644 $*.gif - - all: ${gifs} -@@ -44,7 +44,7 @@ ghostRightarrow.gif: Rightarrow.tex - giftrans -g '#000000=#ffffff' |\ - giftopnm |\ - ppmtogif -transparent white > $*.gif -- /bin/rm -f Rightarrow.dvi Rightarrow.log Rightarrow.aux -+ rm -f Rightarrow.dvi Rightarrow.log Rightarrow.aux - test -f $*.gif && chmod 644 $*.gif - --clean: ; /bin/rm -f *.gif Make.out -+clean: ; rm -f *.gif Make.out -diff --git a/release_notes/math/Makefile b/release_notes/math/Makefile -index b3ffae3..9eca430 100644 ---- a/release_notes/math/Makefile -+++ b/release_notes/math/Makefile -@@ -16,11 +16,11 @@ density=-r90x90 - ${density} - |\ - pnmcrop |\ - ppmtogif -transparent white > $*.gif -- /bin/rm -f $*.dvi $*.log $*.aux -+ rm -f $*.dvi $*.log $*.aux - test -f $*.gif && chmod 644 $*.gif - - all: ${gifs} - - ${gifs}: mathmacros - --clean: ; /bin/rm -f *.gif Make.out -+clean: ; rm -f *.gif Make.out -diff --git a/s/Mf-base b/s/Mf-base -index c709608..40d816c 100644 ---- a/s/Mf-base -+++ b/s/Mf-base -@@ -206,7 +206,7 @@ profiled: - $(MAKE) all loadspd=t bp=t PetiteBoot=../boot/$m/xpetite.boot SchemeBoot=../boot/$m/xscheme.boot - $(MAKE) prettyclean - $(MAKE) io.$m loadspd=t dumpbpd=t Scheme="../bin/$m/scheme -b ../boot/$m/xpetite.boot -b ../boot/$m/xscheme.boot" -- /bin/rm -f ../boot/$m/xpetite.boot ../boot/$m/xscheme.boot -+ rm -f ../boot/$m/xpetite.boot ../boot/$m/xscheme.boot - $(MAKE) prettyclean - $(MAKE) all loadspd=t loadbpd=t - -diff --git a/workarea b/workarea -index bacc712..0461919 100755 ---- a/workarea -+++ b/workarea -@@ -70,9 +70,9 @@ esac - - if [ "$OS" = "Windows_NT" ] - then -- ln="/bin/cp -R" -+ ln="cp -R" - else -- ln="/bin/ln -s" -+ ln="ln -s" - fi - - # This shell script creates a workarea for local modifications to the -@@ -102,7 +102,7 @@ workln() - forceworkln() - { - if [ ! -e $2 ] ; then -- /bin/ln -s $1 $2 2> /dev/null -+ ln -s $1 $2 2> /dev/null - fi - } - -@@ -168,13 +168,13 @@ done - # deep copy submodules where builds occur so changes don't propagate through symlinks - for dir in `echo zlib` ; do - if [ ! -e $W/$dir ] ; then -- /bin/cp -R $dir $W/$dir -+ cp -R $dir $W/$dir - fi - done - - for dir in `echo lz4` ; do - if [ ! -e $W/$dir ] ; then -- /bin/cp -R $dir $W/$dir -+ cp -R $dir $W/$dir - fi - done - --- -2.21.1 (Apple Git-122.3) - diff --git a/gnu/packages/patches/clang-13.0-libc-search-path.patch b/gnu/packages/patches/clang-13.0-libc-search-path.patch new file mode 100644 index 0000000000..77303e636d --- /dev/null +++ b/gnu/packages/patches/clang-13.0-libc-search-path.patch @@ -0,0 +1,96 @@ +Clang attempts to guess file names based on the OS and distro (yes!), +but unfortunately, that doesn't work for us. + +This patch makes it easy to insert libc's $libdir so that Clang passes the +correct absolute file name of crt1.o etc. to 'ld'. It also disables all +the distro-specific stuff and removes the hard-coded FHS directory names +to make sure Clang also works on foreign distros. + +diff --git a/lib/Driver/Distro.cpp b/lib/Driver/Distro.cpp +index ee4fe841..f0313bbe 100644 +--- a/lib/Driver/Distro.cpp ++++ b/lib/Driver/Distro.cpp +@@ -93,6 +93,10 @@ static Distro::DistroType DetectLsbRelease(llvm::vfs::FileSystem &VFS) { + } + + static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) { ++ // The compiler should always behave the same, even when used via Guix on a ++ // foreign distro. ++ return Distro::UnknownDistro; ++ + Distro::DistroType Version = Distro::UnknownDistro; + + // Newer freedesktop.org's compilant systemd-based systems +diff --git a/lib/Driver/ToolChains/Cuda.cpp b/lib/Driver/ToolChains/Cuda.cpp +index d14776c5..88bc3ccd 100644 +--- a/lib/Driver/ToolChains/Cuda.cpp ++++ b/lib/Driver/ToolChains/Cuda.cpp +@@ -119,6 +119,9 @@ CudaInstallationDetector::CudaInstallationDetector( + const Driver &D, const llvm::Triple &HostTriple, + const llvm::opt::ArgList &Args) + : D(D) { ++ // Don't look for CUDA in /usr. ++ return; ++ + struct Candidate { + std::string Path; + bool StrictChecking; +diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp +--- a/lib/Driver/ToolChains/Linux.cpp ++++ b/lib/Driver/ToolChains/Linux.cpp +@@ -186,6 +186,10 @@ + + Generic_GCC::PushPPaths(PPaths); + ++ // Comment out the distro-specific tweaks so that they don't bite when ++ // using Guix on a foreign distro. ++#if 0 ++ + Distro Distro(D.getVFS(), Triple); + + if (Distro.IsAlpineLinux() || Triple.isAndroid()) { +@@ -251,6 +255,7 @@ + + if (IsAndroid || Distro.IsOpenSUSE()) + ExtraOpts.push_back("--enable-new-dtags"); ++#endif + + // The selection of paths to try here is designed to match the patterns which + // the GCC driver itself uses, as this is part of the GCC-compatible driver. +@@ -264,6 +269,7 @@ + + Generic_GCC::AddMultilibPaths(D, SysRoot, OSLibDir, MultiarchTriple, Paths); + ++#if 0 + addPathIfExists(D, SysRoot + "/lib/" + MultiarchTriple, Paths); + addPathIfExists(D, SysRoot + "/lib/../" + OSLibDir, Paths); + +@@ -295,9 +301,11 @@ + addPathIfExists(D, SysRoot + "/" + OSLibDir + "/" + ABIName, Paths); + addPathIfExists(D, SysRoot + "/usr/" + OSLibDir + "/" + ABIName, Paths); + } ++#endif + + Generic_GCC::AddMultiarchPaths(D, SysRoot, OSLibDir, Paths); + ++#if 0 + // Similar to the logic for GCC above, if we are currently running Clang + // inside of the requested system root, add its parent library path to those + // searched. +@@ -305,9 +313,14 @@ + // directory ('Dir' below) or the ResourceDir. + if (StringRef(D.Dir).startswith(SysRoot)) + addPathIfExists(D, D.Dir + "/../lib", Paths); ++#endif ++ ++ // Add libc's lib/ directory to the search path, so that crt1.o, crti.o, ++ // and friends can be found. ++ addPathIfExists(D, "@GLIBC_LIBDIR@", Paths); + +- addPathIfExists(D, SysRoot + "/lib", Paths); +- addPathIfExists(D, SysRoot + "/usr/lib", Paths); ++ // Add GCC's lib/ directory so libstdc++.so can be found. ++ addPathIfExists(D, GCCInstallation.getParentLibPath(), Paths); + } + + ToolChain::RuntimeLibType Linux::GetDefaultRuntimeLibType() const { diff --git a/gnu/packages/patches/cool-retro-term-wctype.patch b/gnu/packages/patches/cool-retro-term-wctype.patch new file mode 100644 index 0000000000..790b0c4453 --- /dev/null +++ b/gnu/packages/patches/cool-retro-term-wctype.patch @@ -0,0 +1,13 @@ +Submitted upstream at https://github.com/Swordfish90/cool-retro-term/issues/692 + +--- a/qmltermwidget/lib/TerminalCharacterDecoder.cpp 1969-12-31 18:00:01.000000000 -0600 ++++ b/qmltermwidget/lib/TerminalCharacterDecoder.cpp 2021-12-27 22:07:04.452256118 -0600 +@@ -19,6 +19,8 @@ + 02110-1301 USA. + */ + ++#include <cwctype> ++ + // Own + #include "TerminalCharacterDecoder.h" + diff --git a/gnu/packages/patches/dealii-fix-compiliation-with-boost-1.78.patch b/gnu/packages/patches/dealii-fix-compiliation-with-boost-1.78.patch new file mode 100644 index 0000000000..1937aa9afc --- /dev/null +++ b/gnu/packages/patches/dealii-fix-compiliation-with-boost-1.78.patch @@ -0,0 +1,40 @@ +From cbef761731627cece2a6f0276b87dacabbdc8a72 Mon Sep 17 00:00:00 2001 +From: David Wells <[email protected]> +Date: Tue, 4 Jan 2022 12:46:30 -0500 +Subject: [PATCH] Fix compilation with boost 1.78. + +I bisected (fortunately Boost.Geometry a header-only library so adding the +include directory sufficed) and +https://github.com/boostorg/geometry/commit/6eb9e238bcb37e26dc31d16acf826784a2ba30f4 +is where this problem starts for us. See also +https://github.com/boostorg/geometry/issues/792 - the easiest fix for all such +issues is to just include the project header `boost/geometry/geometry.hpp`. + +In this particular case, if you look at the commit which causes grid_tools.cc +fails to compile, its because we were relying on some implicit includes. In +particular, we need the distance header to find the distance between points and +boxes, but that was previously included in another file. + +This patch has been adapted from +e0e76835519d122fd12b5858e16d08641a641c6a to apply to dealii 9.3.2. + +See https://github.com/dealii/dealii/pull/13165. +--- + include/deal.II/numerics/rtree.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/deal.II/numerics/rtree.h b/include/deal.II/numerics/rtree.h +index 1b9d04dacd..1e1bfd2932 100644 +--- a/include/deal.II/numerics/rtree.h ++++ b/include/deal.II/numerics/rtree.h +@@ -26,6 +26,7 @@ + #include <deal.II/boost_adaptors/segment.h> + + DEAL_II_DISABLE_EXTRA_DIAGNOSTICS ++#include <boost/geometry/algorithms/distance.hpp> + #include <boost/geometry/index/rtree.hpp> + #include <boost/geometry/strategies/strategies.hpp> + DEAL_II_ENABLE_EXTRA_DIAGNOSTICS +-- +2.30.2 + diff --git a/gnu/packages/patches/dealii-fix-sundials.patch b/gnu/packages/patches/dealii-fix-sundials.patch new file mode 100644 index 0000000000..7dd5df45da --- /dev/null +++ b/gnu/packages/patches/dealii-fix-sundials.patch @@ -0,0 +1,60 @@ +From af73f368f7f9d4a00df075d1a9f50fc495f8e87a Mon Sep 17 00:00:00 2001 +From: Timo Heister <[email protected]> +Date: Sat, 25 Dec 2021 12:30:45 -0500 +Subject: [PATCH] fix sundials compilation + +--- + include/deal.II/sundials/n_vector.templates.h | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/include/deal.II/sundials/n_vector.templates.h b/include/deal.II/sundials/n_vector.templates.h +index 2b49e3efc9..746f63a03b 100644 +--- a/include/deal.II/sundials/n_vector.templates.h ++++ b/include/deal.II/sundials/n_vector.templates.h +@@ -253,13 +253,13 @@ namespace SUNDIALS + template < + typename VectorType, + typename std::enable_if_t<!IsBlockVector<VectorType>::value, int> = 0> +- MPI_Comm ++ const MPI_Comm & + get_communicator(N_Vector v); + + template < + typename VectorType, + typename std::enable_if_t<IsBlockVector<VectorType>::value, int> = 0> +- MPI_Comm ++ const MPI_Comm & + get_communicator(N_Vector v); + + /** +@@ -481,7 +481,7 @@ SUNDIALS::internal::NVectorOperations::destroy(N_Vector v) + + template <typename VectorType, + std::enable_if_t<IsBlockVector<VectorType>::value, int>> +-MPI_Comm ++const MPI_Comm & + SUNDIALS::internal::NVectorOperations::get_communicator(N_Vector v) + { + return unwrap_nvector_const<VectorType>(v)->block(0).get_mpi_communicator(); +@@ -491,7 +491,7 @@ SUNDIALS::internal::NVectorOperations::get_communicator(N_Vector v) + + template <typename VectorType, + std::enable_if_t<!IsBlockVector<VectorType>::value, int>> +-MPI_Comm ++const MPI_Comm & + SUNDIALS::internal::NVectorOperations::get_communicator(N_Vector v) + { + return unwrap_nvector_const<VectorType>(v)->get_mpi_communicator(); +@@ -519,7 +519,8 @@ SUNDIALS::internal::NVectorOperations::get_communicator_as_void_ptr(N_Vector v) + (void)v; + return nullptr; + # else +- return get_communicator<VectorType>(v); ++ // We need to cast away const here, as SUNDIALS demands a pure `void *`. ++ return &(const_cast<MPI_Comm &>(get_communicator<VectorType>(v))); + # endif + } + +-- +2.30.2 + diff --git a/gnu/packages/patches/dune-istl-2.7-fix-non-mpi-tests.patch b/gnu/packages/patches/dune-istl-2.7-fix-non-mpi-tests.patch deleted file mode 100644 index ee2bb8f676..0000000000 --- a/gnu/packages/patches/dune-istl-2.7-fix-non-mpi-tests.patch +++ /dev/null @@ -1,82 +0,0 @@ -Fix build of dune-istl's tests - -Patch copied from upstream source repository: - -https://gitlab.dune-project.org/core/dune-istl/-/commit/9eee3462df5a64881c08574f9291e76db398de0a - -From 9eee3462df5a64881c08574f9291e76db398de0a Mon Sep 17 00:00:00 2001 -From: Felix Gruber <[email protected]> -Date: Sat, 4 Apr 2020 15:27:09 +0200 -Subject: [PATCH] make tests succeed when MPI is disabled - -When MPI is not available or explicitly disabled with the CMake build -option -DCMAKE_IDSABLE_FIND_PACKAGE_MPI=TRUE, some tests were unable to -build. - -The tests created from solverfactorytest.cc.in and part of -scalarproductstest.cc use Dune::OwnerOverlapCopyCommunication which is -defined behind `#if HAVE_MPI` and is thus not available in a non-MPI -build. I've thus disabled those tests when MPI is unavailable. - -The matrixmarkettest did not work without MPI, as it contained some code -using the wrong template parameters when HAVE_MPI was not set. Those -template paramters have been fixed now. - -I've confirmed, that after my changes `make build_tests` succeeds to -build all tests and that those tests run without failure. ---- - dune/istl/test/CMakeLists.txt | 3 ++- - dune/istl/test/matrixmarkettest.cc | 2 +- - dune/istl/test/scalarproductstest.cc | 2 ++ - 3 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/dune/istl/test/CMakeLists.txt b/dune/istl/test/CMakeLists.txt -index ffd87969..2c7b2387 100644 ---- a/dune/istl/test/CMakeLists.txt -+++ b/dune/istl/test/CMakeLists.txt -@@ -77,7 +77,8 @@ set(DUNE_TEST_FACTORY_BLOCK_SIZES - function(add_factory_test BLOCK) - STRING(REGEX REPLACE "[^a-zA-Z0-9]" "" BLOCK_CLEAN ${BLOCK}) - configure_file(solverfactorytest.cc.in solverfactorytest_${BLOCK_CLEAN}.cc) -- dune_add_test(SOURCES ${CMAKE_CURRENT_BINARY_DIR}/solverfactorytest_${BLOCK_CLEAN}.cc) -+ dune_add_test(SOURCES ${CMAKE_CURRENT_BINARY_DIR}/solverfactorytest_${BLOCK_CLEAN}.cc -+ CMAKE_GUARD HAVE_MPI) - endfunction(add_factory_test) - - foreach(FIELD_TYPE ${DUNE_TEST_FACTORY_FIELD_TYPES}) -diff --git a/dune/istl/test/matrixmarkettest.cc b/dune/istl/test/matrixmarkettest.cc -index b335afe6..ce30e8ae 100644 ---- a/dune/istl/test/matrixmarkettest.cc -+++ b/dune/istl/test/matrixmarkettest.cc -@@ -52,7 +52,7 @@ int testMatrixMarket(int N) - storeMatrixMarket(mat, std::string("testmat"), comm); - storeMatrixMarket(bv, std::string("testvec"), comm, false); - #else -- typedef Dune::MatrixAdapter<BCRSMat,BVector,BVector> Operator; -+ typedef Dune::MatrixAdapter<Matrix,Vector,Vector> Operator; - Operator op(mat); - op.apply(bv, cv); - -diff --git a/dune/istl/test/scalarproductstest.cc b/dune/istl/test/scalarproductstest.cc -index 452b1d89..f46ce2a9 100644 ---- a/dune/istl/test/scalarproductstest.cc -+++ b/dune/istl/test/scalarproductstest.cc -@@ -115,6 +115,7 @@ int main(int argc, char** argv) - scalarProductTest<ScalarProduct, Vector>(scalarProduct,numBlocks); - } - -+#if HAVE_MPI - // Test the ParallelScalarProduct class - { - using Vector = BlockVector<FieldVector<double,BlockSize> >; -@@ -139,6 +140,7 @@ int main(int argc, char** argv) - ScalarProduct scalarProduct(communicator,SolverCategory::nonoverlapping); - scalarProductTest<ScalarProduct, Vector>(scalarProduct,numBlocks); - } -+#endif - - return t.exit(); - } --- -2.25.1 - diff --git a/gnu/packages/patches/enlightenment-fix-setuid-path.patch b/gnu/packages/patches/enlightenment-fix-setuid-path.patch index a0efb29857..e4f98de7c8 100644 --- a/gnu/packages/patches/enlightenment-fix-setuid-path.patch +++ b/gnu/packages/patches/enlightenment-fix-setuid-path.patch @@ -1,9 +1,11 @@ +This diff was generated against enlightenment-0.25.0, targeting all the occurances of 'suid_exes'. + diff --git a/src/bin/e_auth.c b/src/bin/e_auth.c -index 8b0aa6641..3dff0ad84 100644 +index 6d07a0ac3..31e0e728f 100644 --- a/src/bin/e_auth.c +++ b/src/bin/e_auth.c -@@ -12,8 +12,7 @@ e_auth_begin(char *passwd) - if (pwlen == 0) goto out; +@@ -38,8 +38,7 @@ e_auth_begin(char *passwd) + pwlen = strlen(passwd); snprintf(buf, sizeof(buf), - "%s/enlightenment/utils/enlightenment_ckpasswd pw", @@ -11,9 +13,9 @@ index 8b0aa6641..3dff0ad84 100644 + "/run/setuid-programs/enlightenment_ckpasswd pw"); exe = ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_WRITE, NULL); if (!exe) goto out; - if (ecore_exe_send(exe, passwd, pwlen) != EINA_TRUE) goto out; -@@ -47,8 +46,7 @@ e_auth_polkit_begin(char *passwd, const char *cookie, unsigned int uid) - if (pwlen == 0) goto out; + snprintf(buf, sizeof(buf), "pw %s", passwd); +@@ -75,8 +74,7 @@ e_auth_polkit_begin(char *passwd, const char *cookie, unsigned int uid) + pwlen = strlen(passwd); snprintf(buf, sizeof(buf), - "%s/enlightenment/utils/enlightenment_ckpasswd pk", @@ -54,23 +56,24 @@ index 9b10b3117..74e6b72ad 100644 } v->guard = ecore_timer_loop_add(E_FM_MOUNT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_mount_timeout, v); diff --git a/src/bin/e_start_main.c b/src/bin/e_start_main.c -index b2c439455..cb16c7bd4 100644 +index 722063339..2da2d5a23 100644 --- a/src/bin/e_start_main.c +++ b/src/bin/e_start_main.c -@@ -710,7 +710,7 @@ main(int argc, char **argv) - "E_ALERT_FONT_DIR=%s/data/fonts", eina_prefix_data_get(pfx)); +@@ -596,8 +596,7 @@ main(int argc, char **argv) + eina_prefix_data_get(pfx)); putenv(buf2); - snprintf(buf3, sizeof(buf3), -- "E_ALERT_SYSTEM_BIN=%s/enlightenment/utils/enlightenment_system", eina_prefix_lib_get(pfx)); -+ "E_ALERT_SYSTEM_BIN=/run/setuid-programs/enlightenment_system"); + myasprintf(&buf3, +- "E_ALERT_SYSTEM_BIN=%s/enlightenment/utils/enlightenment_system", +- eina_prefix_lib_get(pfx)); ++ "E_ALERT_SYSTEM_BIN=/run/setuid-programs/enlightenment_system"); putenv(buf3); - if ((valgrind_mode || valgrind_tool) && + home = getenv("HOME"); diff --git a/src/bin/e_system.c b/src/bin/e_system.c -index 1e7aabb64..dc0173219 100644 +index bfd43e7e2..45d78b7ed 100644 --- a/src/bin/e_system.c +++ b/src/bin/e_system.c -@@ -132,7 +132,7 @@ _system_spawn(void) +@@ -133,7 +133,7 @@ _system_spawn(void) else _respawn_count = 0; if (_respawn_count > 5) return; snprintf(buf, sizeof(buf), diff --git a/gnu/packages/patches/eog-update-libportal-usage.patch b/gnu/packages/patches/eog-update-libportal-usage.patch new file mode 100644 index 0000000000..220a16ddc4 --- /dev/null +++ b/gnu/packages/patches/eog-update-libportal-usage.patch @@ -0,0 +1,40 @@ +Fix eog to work with libportal-0.5 + +This patch is extracted from upstream, see here +https://gitlab.gnome.org/GNOME/eog/-/commit/a06e6325907e136678b0bbe7058c25d688034afd + +diff --git a/meson.build b/meson.build +index 9a32e4bb..9d49aa45 100644 +--- a/meson.build ++++ b/meson.build +@@ -165,10 +165,14 @@ config_h.set('HAVE_EXEMPI', enable_xmp) + # xdg-desktop-portal support with libportal (optional) + enable_libportal = get_option('libportal') + if enable_libportal +- libportal_dep = dependency('libportal', version: '>= 0.3', required: false) ++ libportal_dep = dependency('libportal', version: '>= 0.5', required: false) + assert(libportal_dep.found() and cc.has_header('libportal/portal.h', dependencies: libportal_dep), + 'xdg-desktop-portal support requested but library not found. Please use -Dlibportal=false') + +- common_deps += libportal_dep ++ libportal_gtk3_dep = dependency('libportal-gtk3', version: '>= 0.5', required: false) ++ assert(libportal_gtk3_dep.found() and cc.has_header('libportal-gtk3/portal-gtk3.h', dependencies: libportal_gtk3_dep), ++ 'xdg-desktop-portal support requested but library not found. Please use -Dlibportal=false') ++ ++ common_deps += [libportal_dep, libportal_gtk3_dep] + endif + config_h.set('HAVE_LIBPORTAL', enable_libportal) + +diff --git a/src/eog-util.c b/src/eog-util.c +index 90b9768e..56d23472 100644 +--- a/src/eog-util.c ++++ b/src/eog-util.c +@@ -45,7 +45,7 @@ + #include <glib/gi18n.h> + #ifdef HAVE_LIBPORTAL + #include <libportal/portal.h> +-#include <libportal/portal-gtk3.h> ++#include <libportal-gtk3/portal-gtk3.h> + #endif + + void diff --git a/gnu/packages/patches/epiphany-update-libportal-usage.patch b/gnu/packages/patches/epiphany-update-libportal-usage.patch new file mode 100644 index 0000000000..0d8ea045fb --- /dev/null +++ b/gnu/packages/patches/epiphany-update-libportal-usage.patch @@ -0,0 +1,53 @@ +Fix for epiphany with libportal-0.5. + +This patch was adapted from upstream +https://gitlab.gnome.org/GNOME/epiphany/-/commit/e4d259f614f75c26ad0d2094f4f569ffd1bc06d1 + +diff --git a/lib/ephy-flatpak-utils.c b/lib/ephy-flatpak-utils.c +index 6fc9a5dec17a63c0660cbc1d95103c8f77231d30..0fd90b3f178392930e812a8391fd81bf1371b8bf 100644 +--- a/lib/ephy-flatpak-utils.c ++++ b/lib/ephy-flatpak-utils.c +@@ -29,7 +29,7 @@ + #include <gio/gio.h> + #include <gio/gunixfdlist.h> + #if USE_LIBPORTAL +-#include <libportal/portal-gtk3.h> ++#include <libportal-gtk3/portal-gtk3.h> + #endif + #include <string.h> + #include <sys/stat.h> +diff --git a/lib/meson.build b/lib/meson.build +index 264f9c5fb66268fc248f780b8d1c06c8291f856d..db0a0557f0ae634d7fb95e57aba0cd901ca4d6c1 100644 +--- a/lib/meson.build ++++ b/lib/meson.build +@@ -66,6 +66,7 @@ libephymisc_deps = [ + libxml_dep, + m_dep, + portal_dep, ++ portal_gtk_dep, + sqlite3_dep, + webkit2gtk_dep + ] +diff --git a/meson.build b/meson.build +index 0b9f862b22a23619289342ec39fa0a0274558c25..4285a975004e48366789a4e66f8b23f3af05a636 100644 +--- a/meson.build ++++ b/meson.build +@@ -95,7 +95,8 @@ libhandy_dep = dependency('libhandy-1', version: '>= 1.5.0') + libsecret_dep = dependency('libsecret-1', version: '>= 0.19.0') + libxml_dep = dependency('libxml-2.0', version: '>= 2.6.12') + nettle_dep = dependency('nettle', version: nettle_requirement) +-portal_dep = dependency('libportal', version: '>= 0.0.2', required: get_option('libportal')) ++portal_dep = dependency('libportal', version: '>= 0.5', required: get_option('libportal')) ++portal_gtk_dep = dependency('libportal-gtk3', version: '>= 0.5', required: get_option('libportal')) + sqlite3_dep = dependency('sqlite3', version: '>= 3.22') + + if get_option('soup2').enabled() +@@ -108,7 +109,7 @@ else + webkit2gtk_web_extension_dep = dependency('webkit2gtk-web-extension-4.1', version: webkitgtk_requirement) + endif + +-conf.set10('USE_LIBPORTAL', portal_dep.found()) ++conf.set10('USE_LIBPORTAL', portal_dep.found() and portal_gtk_dep.found()) + + webkit_revision = webkit2gtk_dep.get_variable(pkgconfig : 'revision', default_value : '') + if webkit_revision == 'tarball' diff --git a/gnu/packages/patches/fifengine-boost-compat.patch b/gnu/packages/patches/fifengine-boost-compat.patch new file mode 100644 index 0000000000..dcbf923297 --- /dev/null +++ b/gnu/packages/patches/fifengine-boost-compat.patch @@ -0,0 +1,17 @@ +Fix build with newer Boost. + +Taken from upstream: + + https://github.com/fifengine/fifengine/commit/8072f18a9bf4e75c3e1b197b6ccda11e82954460 + +diff --git a/engine/core/vfs/zip/zipnode.cpp b/engine/core/vfs/zip/zipnode.cpp +--- a/engine/core/vfs/zip/zipnode.cpp ++++ b/engine/core/vfs/zip/zipnode.cpp +@@ -28,6 +28,7 @@ + #include "vfs/fife_boost_filesystem.h" + + #include "zipnode.h" ++#include <algorithm> + + namespace { + /** helper function to find a value in a ZipNodeContainer diff --git a/gnu/packages/patches/gnome-builder-update-libportal.patch b/gnu/packages/patches/gnome-builder-update-libportal.patch new file mode 100644 index 0000000000..1cf7f32132 --- /dev/null +++ b/gnu/packages/patches/gnome-builder-update-libportal.patch @@ -0,0 +1,93 @@ +From b3bfa0df53a3749c3b73cb6c4bad5cab3fa549a1 Mon Sep 17 00:00:00 2001 +From: Abderrahim Kitouni <[email protected]> +Date: Sat, 25 Dec 2021 16:25:43 +0100 +Subject: [PATCH] build: use libportal 0.5 + +This partly reverts 2aea4bd7d0ced77a7d0778517b4505af5dea2dac +--- + build-aux/flatpak/org.gnome.Builder.json | 7 ++++--- + meson.build | 2 +- + src/gstyle/gstyle-color-panel.c | 2 +- + src/plugins/devhelp/gbp-devhelp-page.c | 2 +- + src/plugins/open-with-external/gbp-owe-workbench-addin.c | 2 +- + 5 files changed, 8 insertions(+), 7 deletions(-) + +diff --git a/build-aux/flatpak/org.gnome.Builder.json b/build-aux/flatpak/org.gnome.Builder.json +index 02ac31ede..a32d29b92 100644 +--- a/build-aux/flatpak/org.gnome.Builder.json ++++ b/build-aux/flatpak/org.gnome.Builder.json +@@ -601,15 +601,16 @@ + "name" : "libportal", + "config-opts" : [ + "--libdir=/app/lib", +- "--buildtype=debugoptimized" ++ "--buildtype=debugoptimized", ++ "-Dbackends=gtk3" + ], + "buildsystem" : "meson", + "builddir" : true, + "sources" : [ + { + "type" : "archive", +- "url" : "https://github.com/flatpak/libportal/releases/download/0.4/libportal-0.4.tar.xz", +- "sha256" : "3cd5f50907831cf236b40aa14c5a14ccbbf08828cecb3286efa82ce03cacef28" ++ "url" : "https://github.com/flatpak/libportal/releases/download/0.5/libportal-0.5.tar.xz", ++ "sha256" : "d8c8cb18a34e5eeb26a39c94044c955995b01de0e139caac5e18c076cf821b3b" + } + ] + }, +diff --git a/meson.build b/meson.build +index 01737034b..494e0d752 100644 +--- a/meson.build ++++ b/meson.build +@@ -284,7 +284,7 @@ libjsonrpc_glib_dep = dependency('jsonrpc-glib-1.0', version: '>= 3.41.0') + libm_dep = cc.find_library('m', required: false) + libpangoft2_dep = dependency('pangoft2', version: '>= 1.38.0') + libpeas_dep = dependency('libpeas-1.0', version: '>= 1.22.0') +-libportal_dep = dependency('libportal', version: '>= 0.3', required: false) ++libportal_dep = dependency('libportal-gtk3', required: false) + libtemplate_glib_dep = dependency('template-glib-1.0', version: '>= 3.28.0') + libvte_dep = dependency('vte-2.91', version: '>= 0.65.0') + libwebkit_dep = dependency('webkit2gtk-4.0', version: '>= 2.26', required: false) +diff --git a/src/gstyle/gstyle-color-panel.c b/src/gstyle/gstyle-color-panel.c +index 15742a7be..a6295c168 100644 +--- a/src/gstyle/gstyle-color-panel.c ++++ b/src/gstyle/gstyle-color-panel.c +@@ -30,7 +30,7 @@ + #include "gstyle-color.h" + + #include <libportal/portal.h> +-#include <libportal/portal-gtk3.h> ++#include <libportal-gtk3/portal-gtk3.h> + + #define HSV_TO_SCALE_FACTOR (1.0 / 256.0) + #define CIELAB_L_TO_SCALE_FACTOR (100.0 / 256.0) +diff --git a/src/plugins/devhelp/gbp-devhelp-page.c b/src/plugins/devhelp/gbp-devhelp-page.c +index 5d5c52b0d..2ac788414 100644 +--- a/src/plugins/devhelp/gbp-devhelp-page.c ++++ b/src/plugins/devhelp/gbp-devhelp-page.c +@@ -25,7 +25,7 @@ + #include <webkit2/webkit2.h> + + #include <libportal/portal.h> +-#include <libportal/portal-gtk3.h> ++#include <libportal-gtk3/portal-gtk3.h> + + #include "gbp-devhelp-page.h" + #include "gbp-devhelp-search.h" +diff --git a/src/plugins/open-with-external/gbp-owe-workbench-addin.c b/src/plugins/open-with-external/gbp-owe-workbench-addin.c +index 51d2da844..816fe643f 100644 +--- a/src/plugins/open-with-external/gbp-owe-workbench-addin.c ++++ b/src/plugins/open-with-external/gbp-owe-workbench-addin.c +@@ -23,7 +23,7 @@ + #include "gbp-owe-workbench-addin.h" + + #include <libportal/portal.h> +-#include <libportal/portal-gtk3.h> ++#include <libportal-gtk3/portal-gtk3.h> + + struct _GbpOweWorkbenchAddin + { +-- +GitLab + diff --git a/gnu/packages/patches/gnome-control-center-libexecdir.patch b/gnu/packages/patches/gnome-control-center-libexecdir.patch new file mode 100644 index 0000000000..a5f4988e34 --- /dev/null +++ b/gnu/packages/patches/gnome-control-center-libexecdir.patch @@ -0,0 +1,58 @@ +This reverts commit 2007a5b2, which broke installation of the package. +See: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1579. + +diff --git a/meson.build b/meson.build +index 734810d01..b4a45c60d 100644 +--- a/meson.build ++++ b/meson.build +@@ -259,6 +259,13 @@ config_h.set('HAVE_WACOM', host_is_linux_not_s390, + config_h.set('BUILD_THUNDERBOLT', host_is_linux_not_s390, + description: 'Define to 1 to build the Thunderbolt panel') + ++# Check for info panel ++gnome_session_libexecdir = get_option('gnome_session_libexecdir') ++if gnome_session_libexecdir == '' ++ gnome_session_libexecdir = control_center_libexecdir ++endif ++ ++ + gnome = import('gnome') + i18n = import('i18n') + pkg = import('pkgconfig') +diff --git a/meson_options.txt b/meson_options.txt +index 1b7b54810..910226c56 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -1,5 +1,6 @@ + option('cheese', type: 'boolean', value: true, description: 'build with cheese webcam support') + option('documentation', type: 'boolean', value: false, description: 'build documentation') ++option('gnome_session_libexecdir', type: 'string', value: '', description: 'Directory for gnome-session\'s libexecdir') + option('ibus', type: 'boolean', value: true, description: 'build with IBus support') + option('privileged_group', type: 'string', value: 'wheel', description: 'name of group that has elevated permissions') + option('snap', type: 'boolean', value: false, description: 'build with Snap support') +diff --git a/panels/info-overview/cc-info-overview-panel.c b/panels/info-overview/cc-info-overview-panel.c +index 6e832eb35..b34030c8c 100644 +--- a/panels/info-overview/cc-info-overview-panel.c ++++ b/panels/info-overview/cc-info-overview-panel.c +@@ -236,7 +236,7 @@ static char * + get_renderer_from_helper (const char **env) + { + int status; +- char *argv[] = { LIBEXECDIR "/gnome-control-center-print-renderer", NULL }; ++ char *argv[] = { GNOME_SESSION_DIR "/gnome-session-check-accelerated", NULL }; + g_auto(GStrv) envp = NULL; + g_autofree char *renderer = NULL; + g_autoptr(GError) error = NULL; +diff --git a/panels/info-overview/meson.build b/panels/info-overview/meson.build +index 2fe10b32c..506b7274e 100644 +--- a/panels/info-overview/meson.build ++++ b/panels/info-overview/meson.build +@@ -19,7 +19,7 @@ i18n.merge_file( + + cflags += [ + '-DDATADIR="@0@"'.format(control_center_datadir), +- '-DLIBEXECDIR="@0@"'.format(control_center_libexecdir), ++ '-DGNOME_SESSION_DIR="@0@"'.format(gnome_session_libexecdir) + ] + + sources = files( diff --git a/gnu/packages/patches/gnome-todo-libportal.patch b/gnu/packages/patches/gnome-todo-libportal.patch new file mode 100644 index 0000000000..380c628592 --- /dev/null +++ b/gnu/packages/patches/gnome-todo-libportal.patch @@ -0,0 +1,54 @@ +From 3e1f4da8c0e536c09ffaf3b43fe2eb5dc17cc23e Mon Sep 17 00:00:00 2001 +From: Georges Basile Stavracas Neto <[email protected]> +Date: Thu, 18 Nov 2021 19:46:13 -0300 +Subject: [PATCH] flatpak: Adjust to libportal changes + +--- + build-aux/flatpak/org.gnome.Todo.json | 3 +++ + src/plugins/background/gtd-plugin-background.c | 2 +- + src/plugins/background/meson.build | 2 +- + 3 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/build-aux/flatpak/org.gnome.Todo.json b/build-aux/flatpak/org.gnome.Todo.json +index 034e200c..44b83d66 100644 +--- a/build-aux/flatpak/org.gnome.Todo.json ++++ b/build-aux/flatpak/org.gnome.Todo.json +@@ -143,6 +143,9 @@ + { + "name" : "libportal", + "buildsystem" : "meson", ++ "config-opts" : [ ++ "-Dbackends=gtk4" ++ ], + "sources" : [ + { + "type" : "git", +diff --git a/src/plugins/background/gtd-plugin-background.c b/src/plugins/background/gtd-plugin-background.c +index cf48786c..f64d07aa 100644 +--- a/src/plugins/background/gtd-plugin-background.c ++++ b/src/plugins/background/gtd-plugin-background.c +@@ -28,7 +28,7 @@ + #include <gtk/gtk.h> + + #include <libportal/portal.h> +-#include <libportal/portal-gtk4.h> ++#include <libportal-gtk4/portal-gtk4.h> + + #define AUTOSTART_NOTIFICATION_ID "Gtd::BackgroundPlugin::autostart_notification" + #define AUTOSTART_NOTIFICATION_TIMEOUT 3 /* seconds */ +diff --git a/src/plugins/background/meson.build b/src/plugins/background/meson.build +index a671a4f3..59d3635f 100644 +--- a/src/plugins/background/meson.build ++++ b/src/plugins/background/meson.build +@@ -1,7 +1,7 @@ + plugins_ldflags += ['-Wl,--undefined=gtd_plugin_background_register_types'] + + plugins_deps += [ +- dependency('libportal'), ++ dependency('libportal-gtk4'), + ] + + plugins_sources += files( +-- +GitLab + diff --git a/gnu/packages/patches/gpaste-fix-paths.patch b/gnu/packages/patches/gpaste-fix-paths.patch new file mode 100644 index 0000000000..be63878fe6 --- /dev/null +++ b/gnu/packages/patches/gpaste-fix-paths.patch @@ -0,0 +1,24 @@ +This is copied from NixOS, which is under MIT licence. +https://github.com/NixOS/nixpkgs/blob/master/pkgs/desktops/gnome/misc/gpaste/ +--- a/src/gnome-shell/extension.js ++++ b/src/gnome-shell/extension.js +@@ -6,6 +6,8 @@ + + const Config = imports.misc.config; + ++imports.gi.GIRepository.Repository.prepend_search_path('@typelibPath@'); ++ + imports.gi.versions.Clutter = Config.LIBMUTTER_API_VERSION; + imports.gi.versions.GLib = '2.0'; + imports.gi.versions.GPaste = '1.0'; +--- a/src/gnome-shell/prefs.js ++++ b/src/gnome-shell/prefs.js +@@ -6,6 +6,8 @@ + + const Gettext = imports.gettext; + ++imports.gi.GIRepository.Repository.prepend_search_path('@typelibPath@'); ++ + //const { GPaste } = imports.gi; + + const ExtensionUtils = imports.misc.extensionUtils; diff --git a/gnu/packages/patches/gtk-introspection-test.patch b/gnu/packages/patches/gtk-introspection-test.patch new file mode 100644 index 0000000000..570ea806a9 --- /dev/null +++ b/gnu/packages/patches/gtk-introspection-test.patch @@ -0,0 +1,22 @@ +# Extend rather than stomp environment variables. +# Upstream status: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4268 +diff --git a/testsuite/introspection/meson.build b/testsuite/introspection/meson.build +index 6202fb7446..b59191eb0f 100644 +--- a/testsuite/introspection/meson.build ++++ b/testsuite/introspection/meson.build +@@ -1,9 +1,10 @@ ++env = environment() ++env.prepend('GI_TYPELIB_PATH', ++ join_paths(project_build_root, 'gtk'), ++ gi_dep.get_pkgconfig_variable('typelibdir')) ++env.prepend('LD_PRELOAD', join_paths(project_build_root, 'gtk', 'libgtk-4.so')) + + test('api', + find_program('api.py', dirs: meson.current_source_dir()), + suite: ['introspection'], +- env: [ +- 'GI_TYPELIB_PATH=@0@/gtk:@1@'.format(project_build_root, +- gi_dep.get_pkgconfig_variable('typelibdir')), +- 'LD_PRELOAD=@0@/gtk/libgtk-4.so'.format(project_build_root), +- ]) ++ env: env) diff --git a/gnu/packages/patches/htslib-for-stringtie.patch b/gnu/packages/patches/htslib-for-stringtie.patch new file mode 100644 index 0000000000..3e6cd5bb63 --- /dev/null +++ b/gnu/packages/patches/htslib-for-stringtie.patch @@ -0,0 +1,26 @@ +These changes are commits d7e357946ead219b81cc1becbe0de8a99d96ca84 and +8ed0daa39bc662defa99507f926815431056543a in +https://github.com/samtools/htscodecs. The stringtie package expects these +changes to have been applied. + +diff -ru htslib-1.12/htscodecs/htscodecs/tokenise_name3.c stringtie-2.2.0/htslib/htscodecs/htscodecs/tokenise_name3.c +--- a/htscodecs/htscodecs/tokenise_name3.c 2021-02-22 13:07:06.000000000 +0100 ++++ b/htscodecs/htscodecs/tokenise_name3.c 2021-12-04 19:27:39.000000000 +0100 +@@ -211,7 +211,7 @@ + if (!ctx) return NULL; + ctx->max_names = max_names; + pthread_setspecific(tok_key, ctx); +- } else if (ctx->max_names < max_names) { ++ } else if (ctx->max_names < max_names+1) { + ctx = realloc(ctx, sizeof(*ctx) + ++max_names*sizeof(*ctx->lc)); + if (!ctx) return NULL; + ctx->max_names = max_names; +@@ -1058,6 +1058,8 @@ + tok = decode_token_type(ctx, ntok); + //fprintf(stderr, "Tok %d = %d\n", ntok, tok); + ++ ctx->lc[cnum].last_ntok = 0; ++ + switch (tok) { + case N_CHAR: + if (len+1 >= name_len) return -1;
\ No newline at end of file diff --git a/gnu/packages/patches/hueplusplus-mbedtls.patch b/gnu/packages/patches/hueplusplus-mbedtls.patch new file mode 100644 index 0000000000..894590af8d --- /dev/null +++ b/gnu/packages/patches/hueplusplus-mbedtls.patch @@ -0,0 +1,20 @@ +Remove references to bundled mbedtls library to use the one from inputs. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1e27d21..f0eb1a5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -85,13 +85,6 @@ endif() + + set(USE_STATIC_MBEDTLS_LIBRARY ON) + set(USE_SHARED_MBEDTLS_LIBRARY OFF) +-add_subdirectory("lib/mbedtls" EXCLUDE_FROM_ALL) +- +-# Compile the mbedtls library as a static with position independent code, +-# because we need it for both a shared and static library +-set_property(TARGET mbedtls PROPERTY POSITION_INDEPENDENT_CODE ON) +-set_property(TARGET mbedcrypto PROPERTY POSITION_INDEPENDENT_CODE ON) +-set_property(TARGET mbedx509 PROPERTY POSITION_INDEPENDENT_CODE ON) + + add_subdirectory(src) + diff --git a/gnu/packages/patches/icedtea-6-extend-hotspot-aarch64-support.patch b/gnu/packages/patches/icedtea-6-extend-hotspot-aarch64-support.patch deleted file mode 100644 index 9dc112a344..0000000000 --- a/gnu/packages/patches/icedtea-6-extend-hotspot-aarch64-support.patch +++ /dev/null @@ -1,1831 +0,0 @@ -From d51cb8c0f7966ac0b870e90e421cc8a796d98abf Mon Sep 17 00:00:00 2001 -From: Simon South <[email protected]> -Date: Tue, 9 Jun 2020 13:48:42 -0400 -Subject: [PATCH] Extend AArch64 support - -This adds to IcedTea 6 a patch that extends the support for AArch64 in -its version of HotSpot, allowing the portable Zero virtual machine to -be built for that platform. - -The patch added is a backport of the one prepared for JDK 9 by the -OpenJDK AArch64 Porting Project, available (as of 11 June 2020) for -download from https://openjdk.java.net/jeps/237. ---- - Makefile.am | 3 +- - Makefile.in | 12 +- - .../hs23/aarch64-extended-support.patch | 1766 +++++++++++++++++ - 3 files changed, 1775 insertions(+), 6 deletions(-) - create mode 100644 patches/hotspot/hs23/aarch64-extended-support.patch - -diff --git a/Makefile.am b/Makefile.am -index 97dac85..f5c917b 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -621,7 +621,8 @@ ICEDTEA_PATCHES = \ - patches/openjdk/6260348-pr3068.patch \ - patches/openjdk/6961123-pr2975.patch \ - patches/pr2800-missing_resources.patch \ -- patches/pr3213-conditional_arm32jit.patch -+ patches/pr3213-conditional_arm32jit.patch \ -+ patches/hotspot/hs23/aarch64-extended-support.patch - - if WITH_RHINO - ICEDTEA_PATCHES += \ -diff --git a/Makefile.in b/Makefile.in -index aced7c2..e3545ee 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -1049,11 +1049,13 @@ ICEDTEA_PATCHES = $(DROP_PATCHES) $(SECURITY_PATCHES) \ - patches/openjdk/6260348-pr3068.patch \ - patches/openjdk/6961123-pr2975.patch \ - patches/pr2800-missing_resources.patch \ -- patches/pr3213-conditional_arm32jit.patch $(am__append_21) \ -- $(am__append_22) $(am__append_23) $(am__append_24) \ -- $(am__append_25) $(am__append_26) $(am__append_27) \ -- $(am__append_28) $(am__append_29) $(am__append_30) \ -- $(am__append_31) $(am__append_32) $(DISTRIBUTION_PATCHES) -+ patches/pr3213-conditional_arm32jit.patch \ -+ patches/hotspot/hs23/aarch64-extended-support.patch \ -+ $(am__append_21) $(am__append_22) $(am__append_23) \ -+ $(am__append_24) $(am__append_25) $(am__append_26) \ -+ $(am__append_27) $(am__append_28) $(am__append_29) \ -+ $(am__append_30) $(am__append_31) $(am__append_32) \ -+ $(DISTRIBUTION_PATCHES) - @ENABLE_NSS_FALSE@NSS_PATCHES = patches/nss-not-enabled-config.patch - @ENABLE_NSS_TRUE@NSS_PATCHES = patches/nss-config.patch - -diff --git a/patches/hotspot/hs23/aarch64-extended-support.patch b/patches/hotspot/hs23/aarch64-extended-support.patch -new file mode 100644 -index 0000000..7817f4d ---- /dev/null -+++ b/patches/hotspot/hs23/aarch64-extended-support.patch -@@ -0,0 +1,1766 @@ -+diff --git openjdk.orig/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c -+index 5771fdd..b23cc17 100644 -+--- openjdk.orig/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c -++++ openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c -+@@ -304,6 +304,9 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo -+ #ifdef amd64 -+ #define NPRGREG sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_NPRGREG -+ #endif -++#ifdef aarch64 -++#define NPRGREG 32 -++#endif -+ #if defined(sparc) || defined(sparcv9) -+ #define NPRGREG sun_jvm_hotspot_debugger_sparc_SPARCThreadContext_NPRGREG -+ #endif -+@@ -406,6 +409,12 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo -+ regs[REG_INDEX(R_O7)] = gregs.u_regs[14]; -+ #endif /* sparc */ -+ -++#if defined(aarch64) -++ -++#define REG_INDEX(reg) sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext_##reg -++ -++#endif /* aarch64 */ -++ -+ -+ (*env)->ReleaseLongArrayElements(env, array, regs, JNI_COMMIT); -+ return array; -+diff --git openjdk.orig/hotspot/agent/src/os/linux/libproc.h openjdk/hotspot/agent/src/os/linux/libproc.h -+index e4d77f7..c02b841 100644 -+--- openjdk.orig/hotspot/agent/src/os/linux/libproc.h -++++ openjdk/hotspot/agent/src/os/linux/libproc.h -+@@ -54,6 +54,10 @@ struct pt_regs { -+ -+ #endif //sparc or sparcv9 -+ -++#if defined(aarch64) -++#include "asm/ptrace.h" -++#endif -++ -+ /************************************************************************************ -+ -+ 0. This is very minimal subset of Solaris libproc just enough for current application. -+@@ -97,6 +101,9 @@ unsigned long regs[IA64_REG_COUNT]; /* integer and fp regs */ -+ #if defined(sparc) || defined(sparcv9) -+ #define user_regs_struct pt_regs -+ #endif -++#if defined(aarch64) -++#define user_regs_struct user_pt_regs -++#endif -+ -+ // This C bool type must be int for compatibility with Linux calls and -+ // it would be a mistake to equivalence it to C++ bool on many platforms -+diff --git openjdk.orig/hotspot/make/defs.make openjdk/hotspot/make/defs.make -+index 44f21f8..4e8d00b 100644 -+--- openjdk.orig/hotspot/make/defs.make -++++ openjdk/hotspot/make/defs.make -+@@ -232,7 +232,7 @@ ifneq ($(OSNAME),windows) -+ -+ # Use uname output for SRCARCH, but deal with platform differences. If ARCH -+ # is not explicitly listed below, it is treated as x86. -+- SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 arm ppc zero,$(ARCH))) -++ SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 arm ppc aarch64 zero,$(ARCH))) -+ ARCH/ = x86 -+ ARCH/sparc = sparc -+ ARCH/sparc64= sparc -+@@ -242,6 +242,7 @@ ifneq ($(OSNAME),windows) -+ ARCH/ppc64 = ppc -+ ARCH/ppc = ppc -+ ARCH/arm = arm -++ ARCH/aarch64= aarch64 -+ ARCH/zero = zero -+ -+ # BUILDARCH is usually the same as SRCARCH, except for sparcv9 -+@@ -267,11 +268,12 @@ ifneq ($(OSNAME),windows) -+ LIBARCH/sparcv9 = sparcv9 -+ LIBARCH/ia64 = ia64 -+ LIBARCH/ppc64 = ppc -++ LIBARCH/aarch64 = aarch64 -+ LIBARCH/ppc = ppc -+ LIBARCH/arm = arm -+ LIBARCH/zero = $(ZERO_LIBARCH) -+ -+- LP64_ARCH = sparcv9 amd64 ia64 zero -++ LP64_ARCH = sparcv9 amd64 ia64 aarch64 zero -+ endif -+ -+ # Required make macro settings for all platforms -+diff --git openjdk.orig/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make -+index 7c3d4f9..3bc7e8a 100644 -+--- openjdk.orig/hotspot/make/linux/makefiles/buildtree.make -++++ openjdk/hotspot/make/linux/makefiles/buildtree.make -+@@ -385,6 +385,7 @@ DATA_MODE/sparc = 32 -+ DATA_MODE/sparcv9 = 64 -+ DATA_MODE/amd64 = 64 -+ DATA_MODE/ia64 = 64 -++DATA_MODE/aarch64 = 64 -+ DATA_MODE/zero = $(ARCH_DATA_MODEL) -+ -+ JAVA_FLAG/32 = -d32 -+diff --git openjdk.orig/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make -+index 7bb3149..39ffda4 100644 -+--- openjdk.orig/hotspot/make/linux/makefiles/defs.make -++++ openjdk/hotspot/make/linux/makefiles/defs.make -+@@ -118,6 +118,15 @@ ifeq ($(ARCH), ppc) -+ HS_ARCH = ppc -+ endif -+ -++# AARCH64 -++ifeq ($(ARCH), aarch64) -++ ARCH_DATA_MODEL = 64 -++ MAKE_ARGS += LP64=1 -++ PLATFORM = linux-aarch64 -++ VM_PLATFORM = linux_aarch64 -++ HS_ARCH = aarch64 -++endif -++ -+ # determine if HotSpot is being built in JDK6 or earlier version -+ JDK6_OR_EARLIER=0 -+ ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1" -+diff --git openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make -+index 897e3a6..44f1673 100644 -+--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make -++++ openjdk/hotspot/make/linux/makefiles/gcc.make -+@@ -104,6 +104,7 @@ endif -+ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH)) -+ ARCHFLAG/i486 = -m32 -march=i586 -+ ARCHFLAG/amd64 = -m64 -++ARCHFLAG/aarch64 = -+ ARCHFLAG/ia64 = -+ ARCHFLAG/sparc = -m32 -mcpu=v9 -+ ARCHFLAG/sparcv9 = -m64 -mcpu=v9 -+diff --git openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp -+index c1b0e5c..9f7cda0 100644 -+--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp -++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp -+@@ -296,6 +296,8 @@ static char cpu_arch[] = "sparcv9"; -+ # else -+ static char cpu_arch[] = "sparc"; -+ # endif -++#elif defined(AARCH64) -++static char cpu_arch[] = "aarch64"; -+ #else -+ #error Add appropriate cpu_arch setting -+ #endif -+@@ -1442,7 +1444,7 @@ void os::Linux::clock_init() { -+ #ifndef SYS_clock_getres -+ -+ #if defined(IA32) || defined(AMD64) -+-#define SYS_clock_getres IA32_ONLY(266) AMD64_ONLY(229) -++#define SYS_clock_getres IA32_ONLY(266) AMD64_ONLY(229) AARCH64_ONLY(114) -+ #define sys_clock_getres(x,y) ::syscall(SYS_clock_getres, x, y) -+ #else -+ #warning "SYS_clock_getres not defined for this platform, disabling fast_thread_cpu_time" -+@@ -1930,7 +1932,7 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen) -+ static Elf32_Half running_arch_code=EM_AARCH64; -+ #else -+ #error Method os::dll_load requires that one of following is defined:\ -+- IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, SH -++ IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, SH, AARCH64 -+ #endif -+ -+ // Identify compatability class for VM's architecture and library's architecture -+@@ -3056,7 +3058,7 @@ void os::large_page_init() { -+ -+ #ifndef ZERO -+ _large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) SPARC_ONLY(4 * M) -+- ARM_ONLY(2 * M) PPC_ONLY(4 * M); -++ ARM_ONLY(2 * M) PPC_ONLY(4 * M) AARCH64_ONLY(2 * M); -+ #endif // ZERO -+ -+ FILE *fp = fopen("/proc/meminfo", "r"); -+@@ -5378,11 +5380,11 @@ void Parker::unpark() { -+ extern char** environ; -+ -+ #ifndef __NR_fork -+-#define __NR_fork IA32_ONLY(2) IA64_ONLY(not defined) AMD64_ONLY(57) -++#define __NR_fork IA32_ONLY(2) IA64_ONLY(not defined) AMD64_ONLY(57) AARCH64_ONLY(1079) -+ #endif -+ -+ #ifndef __NR_execve -+-#define __NR_execve IA32_ONLY(11) IA64_ONLY(1033) AMD64_ONLY(59) -++#define __NR_execve IA32_ONLY(11) IA64_ONLY(1033) AMD64_ONLY(59) AARCH64_ONLY(221) -+ #endif -+ -+ // Run the specified command in a separate process. Return its exit value, -+diff --git openjdk.orig/hotspot/src/share/vm/adlc/main.cpp openjdk/hotspot/src/share/vm/adlc/main.cpp -+index 47e207a..b93504e 100644 -+--- openjdk.orig/hotspot/src/share/vm/adlc/main.cpp -++++ openjdk/hotspot/src/share/vm/adlc/main.cpp -+@@ -244,6 +244,11 @@ int main(int argc, char *argv[]) -+ AD.addInclude(AD._CPP_file, "assembler_arm.inline.hpp"); -+ AD.addInclude(AD._CPP_file, "nativeInst_arm.hpp"); -+ AD.addInclude(AD._CPP_file, "vmreg_arm.inline.hpp"); -++#endif -++#ifdef TARGET_ARCH_aarch64 -++ AD.addInclude(AD._CPP_file, "assembler_aarch64.inline.hpp"); -++ AD.addInclude(AD._CPP_file, "nativeInst_aarch64.hpp"); -++ AD.addInclude(AD._CPP_file, "vmreg_aarch64.inline.hpp"); -+ #endif -+ AD.addInclude(AD._HPP_file, "memory/allocation.hpp"); -+ AD.addInclude(AD._HPP_file, "opto/machnode.hpp"); -+diff --git openjdk.orig/hotspot/src/share/vm/asm/assembler.cpp openjdk/hotspot/src/share/vm/asm/assembler.cpp -+index 2bcdcbc..57787ac 100644 -+--- openjdk.orig/hotspot/src/share/vm/asm/assembler.cpp -++++ openjdk/hotspot/src/share/vm/asm/assembler.cpp -+@@ -43,6 +43,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "assembler_ppc.inline.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "assembler_aarch64.inline.hpp" -++#endif -+ -+ -+ // Implementation of AbstractAssembler -+diff --git openjdk.orig/hotspot/src/share/vm/asm/assembler.hpp openjdk/hotspot/src/share/vm/asm/assembler.hpp -+index c25aa3f..4f77825 100644 -+--- openjdk.orig/hotspot/src/share/vm/asm/assembler.hpp -++++ openjdk/hotspot/src/share/vm/asm/assembler.hpp -+@@ -51,6 +51,10 @@ -+ # include "register_ppc.hpp" -+ # include "vm_version_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "register_aarch64.hpp" -++# include "vm_version_aarch64.hpp" -++#endif -+ -+ // This file contains platform-independent assembler declarations. -+ -+@@ -459,6 +463,9 @@ class AbstractAssembler : public ResourceObj { -+ #ifdef TARGET_ARCH_ppc -+ # include "assembler_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "assembler_aarch64.hpp" -++#endif -+ -+ -+ #endif // SHARE_VM_ASM_ASSEMBLER_HPP -+diff --git openjdk.orig/hotspot/src/share/vm/asm/codeBuffer.hpp openjdk/hotspot/src/share/vm/asm/codeBuffer.hpp -+index 685297a..002faef 100644 -+--- openjdk.orig/hotspot/src/share/vm/asm/codeBuffer.hpp -++++ openjdk/hotspot/src/share/vm/asm/codeBuffer.hpp -+@@ -573,6 +573,9 @@ class CodeBuffer: public StackObj { -+ #ifdef TARGET_ARCH_ppc -+ # include "codeBuffer_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "codeBuffer_aarch64.hpp" -++#endif -+ -+ }; -+ -+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp openjdk/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp -+index c95a23c..2ec31e5 100644 -+--- openjdk.orig/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp -++++ openjdk/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp -+@@ -877,6 +877,13 @@ static bool match(UnsafeRawOp* x, -+ return false; -+ } -+ -++// AARCH64 cannot handle shifts which are not either 0, or log2 of the type size -++#ifdef AARCH64 -++ if (*log2_scale != 0 && -++ (1 << *log2_scale) != type2aelembytes(x->basic_type(), true)) -++ return false; -++#endif -++ -+ // If the value is pinned then it will be always be computed so -+ // there's no profit to reshaping the expression. -+ return !root->is_pinned(); -+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_Defs.hpp openjdk/hotspot/src/share/vm/c1/c1_Defs.hpp -+index bebb3b0..ddaceb7 100644 -+--- openjdk.orig/hotspot/src/share/vm/c1/c1_Defs.hpp -++++ openjdk/hotspot/src/share/vm/c1/c1_Defs.hpp -+@@ -41,6 +41,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "register_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "register_aarch64.hpp" -++#endif -+ -+ // set frame size and return address offset to these values in blobs -+ // (if the compiled frame uses ebp as link pointer on IA; otherwise, -+@@ -62,6 +65,9 @@ enum { -+ #ifdef TARGET_ARCH_ppc -+ # include "c1_Defs_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "c1_Defs_aarch64.hpp" -++#endif -+ -+ -+ // native word offsets from memory address -+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp openjdk/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp -+index a1e4c38..491b064 100644 -+--- openjdk.orig/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp -++++ openjdk/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp -+@@ -44,6 +44,9 @@ class FpuStackSim; -+ #ifdef TARGET_ARCH_ppc -+ # include "c1_FpuStackSim_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "c1_FpuStackSim_aarch64.hpp" -++#endif -+ -+ -+ #endif // SHARE_VM_C1_C1_FPUSTACKSIM_HPP -+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_FrameMap.cpp openjdk/hotspot/src/share/vm/c1/c1_FrameMap.cpp -+index ea50b27..6a3dc63 100644 -+--- openjdk.orig/hotspot/src/share/vm/c1/c1_FrameMap.cpp -++++ openjdk/hotspot/src/share/vm/c1/c1_FrameMap.cpp -+@@ -41,6 +41,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "vmreg_ppc.inline.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "vmreg_aarch64.inline.hpp" -++#endif -+ -+ -+ -+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_FrameMap.hpp openjdk/hotspot/src/share/vm/c1/c1_FrameMap.hpp -+index 288fc5c..e9a0250 100644 -+--- openjdk.orig/hotspot/src/share/vm/c1/c1_FrameMap.hpp -++++ openjdk/hotspot/src/share/vm/c1/c1_FrameMap.hpp -+@@ -93,6 +93,9 @@ class FrameMap : public CompilationResourceObj { -+ #endif -+ #ifdef TARGET_ARCH_ppc -+ # include "c1_FrameMap_ppc.hpp" -++#endif -++#ifdef TARGET_ARCH_aarch64 -++# include "c1_FrameMap_aarch64.hpp" -+ #endif -+ -+ -+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LIR.cpp openjdk/hotspot/src/share/vm/c1/c1_LIR.cpp -+index 776a6a3..6e1a362 100644 -+--- openjdk.orig/hotspot/src/share/vm/c1/c1_LIR.cpp -++++ openjdk/hotspot/src/share/vm/c1/c1_LIR.cpp -+@@ -67,7 +67,7 @@ FloatRegister LIR_OprDesc::as_double_reg() const { -+ -+ #endif -+ -+-#ifdef ARM -++#if defined(ARM) || defined (TARGET_ARCH_aarch64) -+ -+ FloatRegister LIR_OprDesc::as_float_reg() const { -+ return as_FloatRegister(fpu_regnr()); -+@@ -147,7 +147,11 @@ void LIR_Address::verify() const { -+ #endif -+ #ifdef _LP64 -+ assert(base()->is_cpu_register(), "wrong base operand"); -++#ifndef TARGET_ARCH_aarch64 -+ assert(index()->is_illegal() || index()->is_double_cpu(), "wrong index operand"); -++#else -++ assert(index()->is_illegal() || index()->is_double_cpu() || index()->is_single_cpu(), "wrong index operand"); -++#endif -+ assert(base()->type() == T_OBJECT || base()->type() == T_LONG, -+ "wrong type for addresses"); -+ #else -+@@ -545,7 +549,7 @@ void LIR_OpVisitState::visit(LIR_Op* op) { -+ assert(opConvert->_info == NULL, "must be"); -+ if (opConvert->_opr->is_valid()) do_input(opConvert->_opr); -+ if (opConvert->_result->is_valid()) do_output(opConvert->_result); -+-#ifdef PPC -++#if defined(PPC) || defined(TARGET_ARCH_aarch64) -+ if (opConvert->_tmp1->is_valid()) do_temp(opConvert->_tmp1); -+ if (opConvert->_tmp2->is_valid()) do_temp(opConvert->_tmp2); -+ #endif -+@@ -1468,6 +1472,11 @@ void LIR_OprDesc::print(outputStream* out) const { -+ out->print("fpu%d", fpu_regnr()); -+ } else if (is_double_fpu()) { -+ out->print("fpu%d", fpu_regnrLo()); -++#elif defined(AARCH64) -++ } else if (is_single_fpu()) { -++ out->print("fpu%d", fpu_regnr()); -++ } else if (is_double_fpu()) { -++ out->print("fpu%d", fpu_regnrLo()); -+ #elif defined(ARM) -+ } else if (is_single_fpu()) { -+ out->print("s%d", fpu_regnr()); -+@@ -1836,7 +1845,7 @@ void LIR_OpConvert::print_instr(outputStream* out) const { -+ print_bytecode(out, bytecode()); -+ in_opr()->print(out); out->print(" "); -+ result_opr()->print(out); out->print(" "); -+-#ifdef PPC -++#if defined(PPC) || defined(TARGET_ARCH_aarch64) -+ if(tmp1()->is_valid()) { -+ tmp1()->print(out); out->print(" "); -+ tmp2()->print(out); out->print(" "); -+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LIR.hpp openjdk/hotspot/src/share/vm/c1/c1_LIR.hpp -+index f8589c3..eb3383f 100644 -+--- openjdk.orig/hotspot/src/share/vm/c1/c1_LIR.hpp -++++ openjdk/hotspot/src/share/vm/c1/c1_LIR.hpp -+@@ -437,8 +437,8 @@ class LIR_OprDesc: public CompilationResourceObj { -+ XMMRegister as_xmm_double_reg() const; -+ // for compatibility with RInfo -+ int fpu () const { return lo_reg_half(); } -+-#endif // X86 -+-#if defined(SPARC) || defined(ARM) || defined(PPC) -++#endif -++#if defined(SPARC) || defined(ARM) || defined(PPC) || defined(AARCH64) -+ FloatRegister as_float_reg () const; -+ FloatRegister as_double_reg () const; -+ #endif -+@@ -526,7 +526,7 @@ class LIR_Address: public LIR_OprPtr { -+ , _type(type) -+ , _disp(0) { verify(); } -+ -+-#if defined(X86) || defined(ARM) -++#if defined(X86) || defined(ARM) || defined(AARCH64) -+ LIR_Address(LIR_Opr base, LIR_Opr index, Scale scale, intx disp, BasicType type): -+ _base(base) -+ , _index(index) -+@@ -601,7 +601,7 @@ class LIR_OprFact: public AllStatic { -+ LIR_OprDesc::fpu_register | -+ LIR_OprDesc::double_size); } -+ #endif -+-#ifdef X86 -++#if defined(X86) || defined(AARCH64) -+ static LIR_Opr double_fpu(int reg) { return (LIR_Opr)(intptr_t)((reg << LIR_OprDesc::reg1_shift) | -+ (reg << LIR_OprDesc::reg2_shift) | -+ LIR_OprDesc::double_type | -+@@ -1398,7 +1398,7 @@ class LIR_OpConvert: public LIR_Op1 { -+ private: -+ Bytecodes::Code _bytecode; -+ ConversionStub* _stub; -+-#ifdef PPC -++#if defined(PPC) || defined(TARGET_ARCH_aarch64) -+ LIR_Opr _tmp1; -+ LIR_Opr _tmp2; -+ #endif -+@@ -1413,7 +1413,7 @@ class LIR_OpConvert: public LIR_Op1 { -+ #endif -+ , _bytecode(code) {} -+ -+-#ifdef PPC -++#if defined(PPC) || defined(TARGET_ARCH_aarch64) -+ LIR_OpConvert(Bytecodes::Code code, LIR_Opr opr, LIR_Opr result, ConversionStub* stub -+ ,LIR_Opr tmp1, LIR_Opr tmp2) -+ : LIR_Op1(lir_convert, opr, result) -+@@ -1425,7 +1425,7 @@ class LIR_OpConvert: public LIR_Op1 { -+ -+ Bytecodes::Code bytecode() const { return _bytecode; } -+ ConversionStub* stub() const { return _stub; } -+-#ifdef PPC -++#if defined(PPC) || defined(TARGET_ARCH_aarch64) -+ LIR_Opr tmp1() const { return _tmp1; } -+ LIR_Opr tmp2() const { return _tmp2; } -+ #endif -+@@ -1973,7 +1973,14 @@ class LIR_List: public CompilationResourceObj { -+ #ifdef PPC -+ void convert(Bytecodes::Code code, LIR_Opr left, LIR_Opr dst, LIR_Opr tmp1, LIR_Opr tmp2) { append(new LIR_OpConvert(code, left, dst, NULL, tmp1, tmp2)); } -+ #endif -++#if defined (TARGET_ARCH_aarch64) -++ void convert(Bytecodes::Code code, LIR_Opr left, LIR_Opr dst, -++ ConversionStub* stub = NULL, LIR_Opr tmp1 = LIR_OprDesc::illegalOpr()) { -++ append(new LIR_OpConvert(code, left, dst, stub, tmp1, LIR_OprDesc::illegalOpr())); -++ } -++#else -+ void convert(Bytecodes::Code code, LIR_Opr left, LIR_Opr dst, ConversionStub* stub = NULL/*, bool is_32bit = false*/) { append(new LIR_OpConvert(code, left, dst, stub)); } -++#endif -+ -+ void logical_and (LIR_Opr left, LIR_Opr right, LIR_Opr dst) { append(new LIR_Op2(lir_logic_and, left, right, dst)); } -+ void logical_or (LIR_Opr left, LIR_Opr right, LIR_Opr dst) { append(new LIR_Op2(lir_logic_or, left, right, dst)); } -+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp openjdk/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp -+index 528f21e..4d83fca 100644 -+--- openjdk.orig/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp -++++ openjdk/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp -+@@ -50,6 +50,10 @@ -+ # include "nativeInst_ppc.hpp" -+ # include "vmreg_ppc.inline.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "nativeInst_aarch64.hpp" -++# include "vmreg_aarch64.inline.hpp" -++#endif -+ -+ -+ void LIR_Assembler::patching_epilog(PatchingStub* patch, LIR_PatchCode patch_code, Register obj, CodeEmitInfo* info) { -+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp openjdk/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp -+index 58adf59..f4a49b3 100644 -+--- openjdk.orig/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp -++++ openjdk/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp -+@@ -261,6 +261,9 @@ class LIR_Assembler: public CompilationResourceObj { -+ #ifdef TARGET_ARCH_ppc -+ # include "c1_LIRAssembler_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "c1_LIRAssembler_aarch64.hpp" -++#endif -+ -+ }; -+ -+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LinearScan.cpp openjdk/hotspot/src/share/vm/c1/c1_LinearScan.cpp -+index aaae71d..93f9f5f 100644 -+--- openjdk.orig/hotspot/src/share/vm/c1/c1_LinearScan.cpp -++++ openjdk/hotspot/src/share/vm/c1/c1_LinearScan.cpp -+@@ -47,6 +47,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "vmreg_ppc.inline.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "vmreg_aarch64.inline.hpp" -++#endif -+ -+ -+ #ifndef PRODUCT -+@@ -2190,7 +2193,7 @@ LIR_Opr LinearScan::color_lir_opr(LIR_Opr opr, int op_id, LIR_OpVisitState::OprM -+ -+ LIR_Opr res = operand_for_interval(interval); -+ -+-#ifdef X86 -++#if defined(X86) || defined(AARCH64) -+ // new semantic for is_last_use: not only set on definite end of interval, -+ // but also before hole -+ // This may still miss some cases (e.g. for dead values), but it is not necessary that the -+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LinearScan.hpp openjdk/hotspot/src/share/vm/c1/c1_LinearScan.hpp -+index 0c06f1b..a152328 100644 -+--- openjdk.orig/hotspot/src/share/vm/c1/c1_LinearScan.hpp -++++ openjdk/hotspot/src/share/vm/c1/c1_LinearScan.hpp -+@@ -985,6 +985,9 @@ class LinearScanTimers : public StackObj { -+ #ifdef TARGET_ARCH_ppc -+ # include "c1_LinearScan_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "c1_LinearScan_aarch64.hpp" -++#endif -+ -+ -+ #endif // SHARE_VM_C1_C1_LINEARSCAN_HPP -+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp openjdk/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp -+index 55d9803..eda2174 100644 -+--- openjdk.orig/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp -++++ openjdk/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp -+@@ -41,6 +41,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "assembler_ppc.inline.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "assembler_aarch64.inline.hpp" -++#endif -+ -+ class CodeEmitInfo; -+ -+@@ -73,6 +76,9 @@ class C1_MacroAssembler: public MacroAssembler { -+ #ifdef TARGET_ARCH_ppc -+ # include "c1_MacroAssembler_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "c1_MacroAssembler_aarch64.hpp" -++#endif -+ -+ }; -+ -+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_Runtime1.cpp openjdk/hotspot/src/share/vm/c1/c1_Runtime1.cpp -+index 765dec4..f0b3aae 100644 -+--- openjdk.orig/hotspot/src/share/vm/c1/c1_Runtime1.cpp -++++ openjdk/hotspot/src/share/vm/c1/c1_Runtime1.cpp -+@@ -1103,6 +1103,7 @@ JRT_END -+ // completes we can check for deoptimization. This simplifies the -+ // assembly code in the cpu directories. -+ // -++#ifndef TARGET_ARCH_aarch64 -+ int Runtime1::move_klass_patching(JavaThread* thread) { -+ // -+ // NOTE: we are still in Java -+@@ -1150,6 +1151,7 @@ int Runtime1::access_field_patching(JavaThread* thread) { -+ -+ return caller_is_deopted(); -+ JRT_END -++#endif -+ -+ -+ JRT_LEAF(void, Runtime1::trace_block_entry(jint block_id)) -+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_Runtime1.hpp openjdk/hotspot/src/share/vm/c1/c1_Runtime1.hpp -+index 2032564..19261be 100644 -+--- openjdk.orig/hotspot/src/share/vm/c1/c1_Runtime1.hpp -++++ openjdk/hotspot/src/share/vm/c1/c1_Runtime1.hpp -+@@ -159,6 +159,9 @@ class Runtime1: public AllStatic { -+ static int move_klass_patching(JavaThread* thread); -+ -+ static void patch_code(JavaThread* thread, StubID stub_id); -++#ifdef TARGET_ARCH_aarch64 -++ static void patch_code_aarch64(JavaThread* thread, StubID stub_id); -++#endif -+ -+ public: -+ // initialization -+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_globals.hpp openjdk/hotspot/src/share/vm/c1/c1_globals.hpp -+index 15f3cc1..4143a87 100644 -+--- openjdk.orig/hotspot/src/share/vm/c1/c1_globals.hpp -++++ openjdk/hotspot/src/share/vm/c1/c1_globals.hpp -+@@ -38,6 +38,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "c1_globals_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "c1_globals_aarch64.hpp" -++#endif -+ #ifdef TARGET_OS_FAMILY_linux -+ # include "c1_globals_linux.hpp" -+ #endif -+diff --git openjdk.orig/hotspot/src/share/vm/classfile/classFileStream.hpp openjdk/hotspot/src/share/vm/classfile/classFileStream.hpp -+index cf6f0e5..b128b3a 100644 -+--- openjdk.orig/hotspot/src/share/vm/classfile/classFileStream.hpp -++++ openjdk/hotspot/src/share/vm/classfile/classFileStream.hpp -+@@ -41,6 +41,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "bytes_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "bytes_aarch64.hpp" -++#endif -+ -+ // Input stream for reading .class file -+ // -+diff --git openjdk.orig/hotspot/src/share/vm/classfile/stackMapTable.hpp openjdk/hotspot/src/share/vm/classfile/stackMapTable.hpp -+index f876029..ac415b6 100644 -+--- openjdk.orig/hotspot/src/share/vm/classfile/stackMapTable.hpp -++++ openjdk/hotspot/src/share/vm/classfile/stackMapTable.hpp -+@@ -46,6 +46,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "bytes_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "bytes_aarch64.hpp" -++#endif -+ -+ class StackMapReader; -+ -+diff --git openjdk.orig/hotspot/src/share/vm/classfile/verifier.cpp openjdk/hotspot/src/share/vm/classfile/verifier.cpp -+index c5c5e11..9c22a21 100644 -+--- openjdk.orig/hotspot/src/share/vm/classfile/verifier.cpp -++++ openjdk/hotspot/src/share/vm/classfile/verifier.cpp -+@@ -60,6 +60,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "bytes_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "bytes_aarch64.hpp" -++#endif -+ -+ #define NOFAILOVER_MAJOR_VERSION 51 -+ -+diff --git openjdk.orig/hotspot/src/share/vm/code/codeBlob.cpp openjdk/hotspot/src/share/vm/code/codeBlob.cpp -+index 244c320..429e0be 100644 -+--- openjdk.orig/hotspot/src/share/vm/code/codeBlob.cpp -++++ openjdk/hotspot/src/share/vm/code/codeBlob.cpp -+@@ -54,6 +54,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "nativeInst_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "nativeInst_aarch64.hpp" -++#endif -+ #ifdef COMPILER1 -+ #include "c1/c1_Runtime1.hpp" -+ #endif -+diff --git openjdk.orig/hotspot/src/share/vm/code/compiledIC.hpp openjdk/hotspot/src/share/vm/code/compiledIC.hpp -+index fe1cfb3..c9f6a2e 100644 -+--- openjdk.orig/hotspot/src/share/vm/code/compiledIC.hpp -++++ openjdk/hotspot/src/share/vm/code/compiledIC.hpp -+@@ -44,6 +44,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "nativeInst_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "nativeInst_aarch64.hpp" -++#endif -+ -+ //----------------------------------------------------------------------------- -+ // The CompiledIC represents a compiled inline cache. -+diff --git openjdk.orig/hotspot/src/share/vm/code/icBuffer.cpp openjdk/hotspot/src/share/vm/code/icBuffer.cpp -+index ed70457..d022482 100644 -+--- openjdk.orig/hotspot/src/share/vm/code/icBuffer.cpp -++++ openjdk/hotspot/src/share/vm/code/icBuffer.cpp -+@@ -52,6 +52,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "assembler_ppc.inline.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "assembler_aarch64.inline.hpp" -++#endif -+ -+ -+ DEF_STUB_INTERFACE(ICStub); -+diff --git openjdk.orig/hotspot/src/share/vm/code/relocInfo.cpp openjdk/hotspot/src/share/vm/code/relocInfo.cpp -+index 4fd82df..78310e6 100644 -+--- openjdk.orig/hotspot/src/share/vm/code/relocInfo.cpp -++++ openjdk/hotspot/src/share/vm/code/relocInfo.cpp -+@@ -49,6 +49,10 @@ -+ # include "assembler_ppc.inline.hpp" -+ # include "nativeInst_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "assembler_aarch64.inline.hpp" -++# include "nativeInst_aarch64.hpp" -++#endif -+ -+ -+ const RelocationHolder RelocationHolder::none; // its type is relocInfo::none -+diff --git openjdk.orig/hotspot/src/share/vm/code/relocInfo.hpp openjdk/hotspot/src/share/vm/code/relocInfo.hpp -+index 1d14b44..3823889 100644 -+--- openjdk.orig/hotspot/src/share/vm/code/relocInfo.hpp -++++ openjdk/hotspot/src/share/vm/code/relocInfo.hpp -+@@ -435,6 +435,9 @@ class relocInfo VALUE_OBJ_CLASS_SPEC { -+ #endif -+ #ifdef TARGET_ARCH_ppc -+ # include "relocInfo_ppc.hpp" -++#endif -++#ifdef TARGET_ARCH_aarch64 -++# include "relocInfo_aarch64.hpp" -+ #endif -+ -+ -+diff --git openjdk.orig/hotspot/src/share/vm/code/vmreg.hpp openjdk/hotspot/src/share/vm/code/vmreg.hpp -+index d57e6f8..1c18e47 100644 -+--- openjdk.orig/hotspot/src/share/vm/code/vmreg.hpp -++++ openjdk/hotspot/src/share/vm/code/vmreg.hpp -+@@ -42,6 +42,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "register_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "register_aarch64.hpp" -++#endif -+ #ifdef COMPILER2 -+ #include "opto/adlcVMDeps.hpp" -+ #include "utilities/ostream.hpp" -+@@ -63,6 +66,9 @@ -+ #ifdef TARGET_ARCH_MODEL_ppc -+ # include "adfiles/adGlobals_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_MODEL_aarch64 -++# include "adfiles/adGlobals_aarch64.hpp" -++#endif -+ #endif -+ -+ //------------------------------VMReg------------------------------------------ -+@@ -182,6 +188,9 @@ public: -+ #ifdef TARGET_ARCH_ppc -+ # include "vmreg_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "vmreg_aarch64.hpp" -++#endif -+ -+ -+ }; -+diff --git openjdk.orig/hotspot/src/share/vm/compiler/disassembler.cpp openjdk/hotspot/src/share/vm/compiler/disassembler.cpp -+index 9603e86..3a67259 100644 -+--- openjdk.orig/hotspot/src/share/vm/compiler/disassembler.cpp -++++ openjdk/hotspot/src/share/vm/compiler/disassembler.cpp -+@@ -47,6 +47,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "depChecker_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "depChecker_aarch64.hpp" -++#endif -+ #ifdef SHARK -+ #include "shark/sharkEntry.hpp" -+ #endif -+diff --git openjdk.orig/hotspot/src/share/vm/compiler/disassembler.hpp openjdk/hotspot/src/share/vm/compiler/disassembler.hpp -+index a70b8cc..4c90c9a 100644 -+--- openjdk.orig/hotspot/src/share/vm/compiler/disassembler.hpp -++++ openjdk/hotspot/src/share/vm/compiler/disassembler.hpp -+@@ -78,6 +78,9 @@ class Disassembler { -+ #endif -+ #ifdef TARGET_ARCH_ppc -+ # include "disassembler_ppc.hpp" -++#endif -++#ifdef TARGET_ARCH_aarch64 -++# include "disassembler_aarch64.hpp" -+ #endif -+ -+ -+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp -+index d23f37a..24ca30e 100644 -+--- openjdk.orig/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp -++++ openjdk/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp -+@@ -44,6 +44,9 @@ -+ #ifdef TARGET_ARCH_MODEL_ppc -+ # include "interp_masm_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_MODEL_aarch64 -++# include "interp_masm_aarch64.hpp" -++#endif -+ #ifdef TARGET_OS_FAMILY_linux -+ # include "thread_linux.inline.hpp" -+ #endif -+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/bytecode.hpp openjdk/hotspot/src/share/vm/interpreter/bytecode.hpp -+index 107161a..205d0f7 100644 -+--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecode.hpp -++++ openjdk/hotspot/src/share/vm/interpreter/bytecode.hpp -+@@ -43,6 +43,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "bytes_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "bytes_aarch64.hpp" -++#endif -+ -+ class ciBytecodeStream; -+ -+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp -+index e637414..308ad3b 100644 -+--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp -++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp -+@@ -47,6 +47,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "bytes_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "bytes_aarch64.hpp" -++#endif -+ -+ #ifdef CC_INTERP -+ -+@@ -618,6 +621,9 @@ void print(); -+ #ifdef TARGET_ARCH_ppc -+ # include "bytecodeInterpreter_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "bytecodeInterpreter_aarch64.hpp" -++#endif -+ -+ -+ }; // BytecodeInterpreter -+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp -+index 3715a52..0d6a8aa 100644 -+--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp -++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp -+@@ -58,6 +58,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "bytecodeInterpreter_ppc.inline.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "bytecodeInterpreter_aarch64.inline.hpp" -++#endif -+ -+ #endif // CC_INTERP -+ -+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeStream.hpp openjdk/hotspot/src/share/vm/interpreter/bytecodeStream.hpp -+index 6106eac..f3dee0a 100644 -+--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeStream.hpp -++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeStream.hpp -+@@ -43,6 +43,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "bytes_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "bytes_aarch64.hpp" -++#endif -+ -+ // A BytecodeStream is used for fast iteration over the bytecodes -+ // of a methodOop. -+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/bytecodes.cpp openjdk/hotspot/src/share/vm/interpreter/bytecodes.cpp -+index 04f3f64..48ef30e 100644 -+--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodes.cpp -++++ openjdk/hotspot/src/share/vm/interpreter/bytecodes.cpp -+@@ -41,6 +41,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "bytes_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "bytes_aarch64.hpp" -++#endif -+ -+ -+ #if defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER < 1600)) -+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/cppInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/cppInterpreter.hpp -+index e3a9f2e..8347473 100644 -+--- openjdk.orig/hotspot/src/share/vm/interpreter/cppInterpreter.hpp -++++ openjdk/hotspot/src/share/vm/interpreter/cppInterpreter.hpp -+@@ -101,6 +101,9 @@ class CppInterpreter: public AbstractInterpreter { -+ #ifdef TARGET_ARCH_ppc -+ # include "cppInterpreter_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "cppInterpreter_aarch64.hpp" -++#endif -+ -+ -+ }; -+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp openjdk/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp -+index c27805e..272f6e8 100644 -+--- openjdk.orig/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp -++++ openjdk/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp -+@@ -59,6 +59,9 @@ class CppInterpreterGenerator: public AbstractInterpreterGenerator { -+ #ifdef TARGET_ARCH_ppc -+ # include "cppInterpreterGenerator_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "cppInterpreterGenerator_aarch64.hpp" -++#endif -+ -+ }; -+ -+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/interpreter.hpp openjdk/hotspot/src/share/vm/interpreter/interpreter.hpp -+index 0ab0be7..6a6822f 100644 -+--- openjdk.orig/hotspot/src/share/vm/interpreter/interpreter.hpp -++++ openjdk/hotspot/src/share/vm/interpreter/interpreter.hpp -+@@ -158,6 +158,9 @@ class Interpreter: public CC_INTERP_ONLY(CppInterpreter) NOT_CC_INTERP(TemplateI -+ #ifdef TARGET_ARCH_ppc -+ # include "interpreter_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "interpreter_aarch64.hpp" -++#endif -+ -+ }; -+ -+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp openjdk/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp -+index 7bc43ec..0434ca3 100644 -+--- openjdk.orig/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp -++++ openjdk/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp -+@@ -56,6 +56,9 @@ InterpreterGenerator(StubQueue* _code); -+ #ifdef TARGET_ARCH_ppc -+ # include "interpreterGenerator_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "interpreterGenerator_aarch64.hpp" -++#endif -+ -+ -+ }; -+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp openjdk/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp -+index e451c04..37700fb 100644 -+--- openjdk.orig/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp -++++ openjdk/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp -+@@ -71,6 +71,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "vm_version_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "vm_version_aarch64.hpp" -++#endif -+ #ifdef COMPILER2 -+ #include "opto/runtime.hpp" -+ #endif -+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp openjdk/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp -+index 93c1a9e..425400e 100644 -+--- openjdk.orig/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp -++++ openjdk/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp -+@@ -164,6 +164,9 @@ class InterpreterRuntime: AllStatic { -+ #endif -+ #ifdef TARGET_ARCH_ppc -+ # include "interpreterRT_ppc.hpp" -++#endif -++#ifdef TARGET_ARCH_aarch64 -++# include "interpreterRT_aarch64.hpp" -+ #endif -+ -+ -+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/templateInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/templateInterpreter.hpp -+index 25d74f7..f78a16e 100644 -+--- openjdk.orig/hotspot/src/share/vm/interpreter/templateInterpreter.hpp -++++ openjdk/hotspot/src/share/vm/interpreter/templateInterpreter.hpp -+@@ -198,6 +198,9 @@ class TemplateInterpreter: public AbstractInterpreter { -+ #ifdef TARGET_ARCH_ppc -+ # include "templateInterpreter_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "templateInterpreter_aarch64.hpp" -++#endif -+ -+ -+ }; -+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp openjdk/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp -+index fb7bdc5..6007630 100644 -+--- openjdk.orig/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp -++++ openjdk/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp -+@@ -101,6 +101,9 @@ class TemplateInterpreterGenerator: public AbstractInterpreterGenerator { -+ #ifdef TARGET_ARCH_ppc -+ # include "templateInterpreterGenerator_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "templateInterpreterGenerator_aarch64.hpp" -++#endif -+ -+ -+ }; -+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/templateTable.hpp openjdk/hotspot/src/share/vm/interpreter/templateTable.hpp -+index 5d2a7e8..c5e0f0a 100644 -+--- openjdk.orig/hotspot/src/share/vm/interpreter/templateTable.hpp -++++ openjdk/hotspot/src/share/vm/interpreter/templateTable.hpp -+@@ -43,6 +43,9 @@ -+ #ifdef TARGET_ARCH_MODEL_ppc -+ # include "interp_masm_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_MODEL_aarch64 -++# include "interp_masm_aarch64.hpp" -++#endif -+ -+ #ifndef CC_INTERP -+ // All the necessary definitions used for (bytecode) template generation. Instead of -+@@ -373,6 +376,9 @@ class TemplateTable: AllStatic { -+ #ifdef TARGET_ARCH_MODEL_ppc -+ # include "templateTable_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_MODEL_aarch64 -++# include "templateTable_aarch64.hpp" -++#endif -+ -+ }; -+ #endif /* !CC_INTERP */ -+diff --git openjdk.orig/hotspot/src/share/vm/oops/constantPoolOop.hpp openjdk/hotspot/src/share/vm/oops/constantPoolOop.hpp -+index c2f985d..3d0d0fc 100644 -+--- openjdk.orig/hotspot/src/share/vm/oops/constantPoolOop.hpp -++++ openjdk/hotspot/src/share/vm/oops/constantPoolOop.hpp -+@@ -45,6 +45,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "bytes_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "bytes_aarch64.hpp" -++#endif -+ -+ // A constantPool is an array containing class constants as described in the -+ // class file. -+diff --git openjdk.orig/hotspot/src/share/vm/oops/oop.inline.hpp openjdk/hotspot/src/share/vm/oops/oop.inline.hpp -+index db14b2e..c8b326f 100644 -+--- openjdk.orig/hotspot/src/share/vm/oops/oop.inline.hpp -++++ openjdk/hotspot/src/share/vm/oops/oop.inline.hpp -+@@ -58,6 +58,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "bytes_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "bytes_aarch64.hpp" -++#endif -+ -+ // Implementation of all inlined member functions defined in oop.hpp -+ // We need a separate file to avoid circular references -+diff --git openjdk.orig/hotspot/src/share/vm/opto/buildOopMap.cpp openjdk/hotspot/src/share/vm/opto/buildOopMap.cpp -+index fc73160..2c5ec41 100644 -+--- openjdk.orig/hotspot/src/share/vm/opto/buildOopMap.cpp -++++ openjdk/hotspot/src/share/vm/opto/buildOopMap.cpp -+@@ -47,6 +47,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "vmreg_ppc.inline.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "vmreg_aarch64.inline.hpp" -++#endif -+ -+ // The functions in this file builds OopMaps after all scheduling is done. -+ // -+diff --git openjdk.orig/hotspot/src/share/vm/opto/c2_globals.hpp openjdk/hotspot/src/share/vm/opto/c2_globals.hpp -+index f73dcbd..462c875 100644 -+--- openjdk.orig/hotspot/src/share/vm/opto/c2_globals.hpp -++++ openjdk/hotspot/src/share/vm/opto/c2_globals.hpp -+@@ -35,6 +35,9 @@ -+ #ifdef TARGET_ARCH_arm -+ # include "c2_globals_arm.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "c2_globals_aarch64.hpp" -++#endif -+ #ifdef TARGET_OS_FAMILY_linux -+ # include "c2_globals_linux.hpp" -+ #endif -+diff --git openjdk.orig/hotspot/src/share/vm/opto/c2compiler.cpp openjdk/hotspot/src/share/vm/opto/c2compiler.cpp -+index 713e3f1..948e447 100644 -+--- openjdk.orig/hotspot/src/share/vm/opto/c2compiler.cpp -++++ openjdk/hotspot/src/share/vm/opto/c2compiler.cpp -+@@ -43,6 +43,9 @@ -+ #ifdef TARGET_ARCH_MODEL_ppc -+ # include "adfiles/ad_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_MODEL_aarch64 -++# include "adfiles/ad_aarch64.hpp" -++#endif -+ -+ -+ volatile int C2Compiler::_runtimes = uninitialized; -+diff --git openjdk.orig/hotspot/src/share/vm/opto/compile.cpp openjdk/hotspot/src/share/vm/opto/compile.cpp -+index a7ee07a..91dc290 100644 -+--- openjdk.orig/hotspot/src/share/vm/opto/compile.cpp -++++ openjdk/hotspot/src/share/vm/opto/compile.cpp -+@@ -80,6 +80,9 @@ -+ #ifdef TARGET_ARCH_MODEL_ppc -+ # include "adfiles/ad_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_MODEL_aarch64 -++# include "adfiles/ad_aarch64.hpp" -++#endif -+ -+ -+ // -------------------- Compile::mach_constant_base_node ----------------------- -+diff --git openjdk.orig/hotspot/src/share/vm/opto/gcm.cpp openjdk/hotspot/src/share/vm/opto/gcm.cpp -+index 8b8f311..4deb0b4 100644 -+--- openjdk.orig/hotspot/src/share/vm/opto/gcm.cpp -++++ openjdk/hotspot/src/share/vm/opto/gcm.cpp -+@@ -53,6 +53,9 @@ -+ #ifdef TARGET_ARCH_MODEL_ppc -+ # include "adfiles/ad_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_MODEL_aarch64 -++# include "adfiles/ad_aarch64.hpp" -++#endif -+ -+ // Portions of code courtesy of Clifford Click -+ -+diff --git openjdk.orig/hotspot/src/share/vm/opto/lcm.cpp openjdk/hotspot/src/share/vm/opto/lcm.cpp -+index aee6123..4b9aaed 100644 -+--- openjdk.orig/hotspot/src/share/vm/opto/lcm.cpp -++++ openjdk/hotspot/src/share/vm/opto/lcm.cpp -+@@ -48,6 +48,9 @@ -+ #ifdef TARGET_ARCH_MODEL_ppc -+ # include "adfiles/ad_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_MODEL_aarch64 -++# include "adfiles/ad_aarch64.hpp" -++#endif -+ -+ // Optimization - Graph Style -+ -+diff --git openjdk.orig/hotspot/src/share/vm/opto/locknode.hpp openjdk/hotspot/src/share/vm/opto/locknode.hpp -+index 91b99bc..665594f 100644 -+--- openjdk.orig/hotspot/src/share/vm/opto/locknode.hpp -++++ openjdk/hotspot/src/share/vm/opto/locknode.hpp -+@@ -46,6 +46,9 @@ -+ #ifdef TARGET_ARCH_MODEL_ppc -+ # include "adfiles/ad_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_MODEL_aarch64 -++# include "adfiles/ad_aarch64.hpp" -++#endif -+ -+ //------------------------------BoxLockNode------------------------------------ -+ class BoxLockNode : public Node { -+diff --git openjdk.orig/hotspot/src/share/vm/opto/matcher.cpp openjdk/hotspot/src/share/vm/opto/matcher.cpp -+index ca2d4e3..d0f55c5 100644 -+--- openjdk.orig/hotspot/src/share/vm/opto/matcher.cpp -++++ openjdk/hotspot/src/share/vm/opto/matcher.cpp -+@@ -55,6 +55,9 @@ -+ #ifdef TARGET_ARCH_MODEL_ppc -+ # include "adfiles/ad_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_MODEL_aarch64 -++# include "adfiles/ad_aarch64.hpp" -++#endif -+ -+ OptoReg::Name OptoReg::c_frame_pointer; -+ -+diff --git openjdk.orig/hotspot/src/share/vm/opto/output.hpp openjdk/hotspot/src/share/vm/opto/output.hpp -+index 50b6e76..6a920b2 100644 -+--- openjdk.orig/hotspot/src/share/vm/opto/output.hpp -++++ openjdk/hotspot/src/share/vm/opto/output.hpp -+@@ -45,6 +45,9 @@ -+ #ifdef TARGET_ARCH_MODEL_ppc -+ # include "adfiles/ad_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_MODEL_aarch64 -++# include "adfiles/ad_aarch64.hpp" -++#endif -+ -+ class Arena; -+ class Bundle; -+diff --git openjdk.orig/hotspot/src/share/vm/opto/regmask.cpp openjdk/hotspot/src/share/vm/opto/regmask.cpp -+index ce220f0..20c6028 100644 -+--- openjdk.orig/hotspot/src/share/vm/opto/regmask.cpp -++++ openjdk/hotspot/src/share/vm/opto/regmask.cpp -+@@ -43,6 +43,9 @@ -+ #ifdef TARGET_ARCH_MODEL_ppc -+ # include "adfiles/ad_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_MODEL_aarch64 -++# include "adfiles/ad_aarch64.hpp" -++#endif -+ -+ #define RM_SIZE _RM_SIZE /* a constant private to the class RegMask */ -+ -+diff --git openjdk.orig/hotspot/src/share/vm/opto/regmask.hpp openjdk/hotspot/src/share/vm/opto/regmask.hpp -+index e50ff84..26c6854 100644 -+--- openjdk.orig/hotspot/src/share/vm/opto/regmask.hpp -++++ openjdk/hotspot/src/share/vm/opto/regmask.hpp -+@@ -46,6 +46,9 @@ -+ #ifdef TARGET_ARCH_MODEL_ppc -+ # include "adfiles/adGlobals_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_MODEL_aarch64 -++# include "adfiles/adGlobals_aarch64.hpp" -++#endif -+ -+ // Some fun naming (textual) substitutions: -+ // -+diff --git openjdk.orig/hotspot/src/share/vm/opto/runtime.cpp openjdk/hotspot/src/share/vm/opto/runtime.cpp -+index d315f10..11a58b1 100644 -+--- openjdk.orig/hotspot/src/share/vm/opto/runtime.cpp -++++ openjdk/hotspot/src/share/vm/opto/runtime.cpp -+@@ -86,6 +86,9 @@ -+ #ifdef TARGET_ARCH_MODEL_ppc -+ # include "adfiles/ad_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_MODEL_aarch64 -++# include "adfiles/ad_aarch64.hpp" -++#endif -+ -+ -+ // For debugging purposes: -+diff --git openjdk.orig/hotspot/src/share/vm/prims/jniCheck.cpp openjdk/hotspot/src/share/vm/prims/jniCheck.cpp -+index 3bf4ecd..2ad9014 100644 -+--- openjdk.orig/hotspot/src/share/vm/prims/jniCheck.cpp -++++ openjdk/hotspot/src/share/vm/prims/jniCheck.cpp -+@@ -51,6 +51,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "jniTypes_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "jniTypes_aarch64.hpp" -++#endif -+ -+ -+ // Heap objects are allowed to be directly referenced only in VM code, -+diff --git openjdk.orig/hotspot/src/share/vm/prims/jni_md.h openjdk/hotspot/src/share/vm/prims/jni_md.h -+index 7fa5829..3bd4e31 100644 -+--- openjdk.orig/hotspot/src/share/vm/prims/jni_md.h -++++ openjdk/hotspot/src/share/vm/prims/jni_md.h -+@@ -39,6 +39,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "jni_ppc.h" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "jni_aarch64.h" -++#endif -+ -+ -+ /* -+diff --git openjdk.orig/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp openjdk/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp -+index 97dd154..fd1fa43 100644 -+--- openjdk.orig/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp -++++ openjdk/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp -+@@ -43,6 +43,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "bytes_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "bytes_aarch64.hpp" -++#endif -+ // FIXME: add Deprecated, LVTT attributes -+ // FIXME: fix Synthetic attribute -+ // FIXME: per Serguei, add error return handling for constantPoolOopDesc::copy_cpool_bytes() -+diff --git openjdk.orig/hotspot/src/share/vm/prims/methodHandles.hpp openjdk/hotspot/src/share/vm/prims/methodHandles.hpp -+index 514ba6a..ea747d0 100644 -+--- openjdk.orig/hotspot/src/share/vm/prims/methodHandles.hpp -++++ openjdk/hotspot/src/share/vm/prims/methodHandles.hpp -+@@ -738,6 +738,9 @@ public: -+ #ifdef TARGET_ARCH_ppc -+ # include "methodHandles_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "methodHandles_aarch64.hpp" -++#endif -+ }; -+ -+ -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/atomic.cpp openjdk/hotspot/src/share/vm/runtime/atomic.cpp -+index 80780d7..5a34f15 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/atomic.cpp -++++ openjdk/hotspot/src/share/vm/runtime/atomic.cpp -+@@ -60,6 +60,9 @@ -+ #ifdef TARGET_OS_ARCH_linux_ppc -+ # include "atomic_linux_ppc.inline.hpp" -+ #endif -++#ifdef TARGET_OS_ARCH_linux_aarch64 -++# include "atomic_linux_aarch64.inline.hpp" -++#endif -+ #ifdef TARGET_OS_ARCH_bsd_x86 -+ # include "atomic_bsd_x86.inline.hpp" -+ #endif -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/deoptimization.cpp openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp -+index 4735588..4e7958a 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/deoptimization.cpp -++++ openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp -+@@ -65,6 +65,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "vmreg_ppc.inline.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "vmreg_aarch64.inline.hpp" -++#endif -+ #ifdef COMPILER2 -+ #ifdef TARGET_ARCH_MODEL_x86_32 -+ # include "adfiles/ad_x86_32.hpp" -+@@ -84,6 +87,9 @@ -+ #ifdef TARGET_ARCH_MODEL_ppc -+ # include "adfiles/ad_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_MODEL_aarch64 -++# include "adfiles/ad_aarch64.hpp" -++#endif -+ #endif -+ -+ bool DeoptimizationMarker::_is_active = false; -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/dtraceJSDT.hpp openjdk/hotspot/src/share/vm/runtime/dtraceJSDT.hpp -+index bff4310..1129cd6 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/dtraceJSDT.hpp -++++ openjdk/hotspot/src/share/vm/runtime/dtraceJSDT.hpp -+@@ -41,6 +41,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "nativeInst_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "nativeInst_aarch64.hpp" -++#endif -+ -+ class RegisteredProbes; -+ typedef jlong OpaqueProbes; -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/frame.cpp openjdk/hotspot/src/share/vm/runtime/frame.cpp -+index 7ae9aa8..6654714 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/frame.cpp -++++ openjdk/hotspot/src/share/vm/runtime/frame.cpp -+@@ -59,6 +59,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "nativeInst_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "nativeInst_aarch64.hpp" -++#endif -+ -+ RegisterMap::RegisterMap(JavaThread *thread, bool update_map) { -+ _thread = thread; -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/frame.hpp openjdk/hotspot/src/share/vm/runtime/frame.hpp -+index c55380e..c13caae 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/frame.hpp -++++ openjdk/hotspot/src/share/vm/runtime/frame.hpp -+@@ -50,6 +50,9 @@ -+ #ifdef TARGET_ARCH_MODEL_ppc -+ # include "adfiles/adGlobals_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_MODEL_aarch64 -++# include "adfiles/adGlobals_aarch64.hpp" -++#endif -+ #endif -+ #ifdef ZERO -+ #ifdef TARGET_ARCH_zero -+@@ -491,6 +494,9 @@ class frame VALUE_OBJ_CLASS_SPEC { -+ #ifdef TARGET_ARCH_ppc -+ # include "frame_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "frame_aarch64.hpp" -++#endif -+ -+ }; -+ -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/frame.inline.hpp openjdk/hotspot/src/share/vm/runtime/frame.inline.hpp -+index b80b042..f6e1b0e 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/frame.inline.hpp -++++ openjdk/hotspot/src/share/vm/runtime/frame.inline.hpp -+@@ -46,6 +46,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "jniTypes_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "jniTypes_aarch64.hpp" -++#endif -+ #ifdef ZERO -+ #ifdef TARGET_ARCH_zero -+ # include "entryFrame_zero.hpp" -+@@ -100,6 +103,9 @@ inline bool frame::is_first_frame() const { -+ #ifdef TARGET_ARCH_ppc -+ # include "frame_ppc.inline.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "frame_aarch64.inline.hpp" -++#endif -+ -+ -+ #endif // SHARE_VM_RUNTIME_FRAME_INLINE_HPP -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp openjdk/hotspot/src/share/vm/runtime/globals.hpp -+index 10d74cd..4cc5dfb 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp -++++ openjdk/hotspot/src/share/vm/runtime/globals.hpp -+@@ -52,6 +52,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "globals_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "globals_aarch64.hpp" -++#endif -+ #ifdef TARGET_OS_FAMILY_linux -+ # include "globals_linux.hpp" -+ #endif -+@@ -88,6 +91,9 @@ -+ #ifdef TARGET_OS_ARCH_linux_ppc -+ # include "globals_linux_ppc.hpp" -+ #endif -++#ifdef TARGET_OS_ARCH_linux_aarch64 -++# include "globals_linux_aarch64.hpp" -++#endif -+ #ifdef TARGET_OS_ARCH_bsd_x86 -+ # include "globals_bsd_x86.hpp" -+ #endif -+@@ -107,6 +113,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "c1_globals_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "c1_globals_aarch64.hpp" -++#endif -+ #ifdef TARGET_OS_FAMILY_linux -+ # include "c1_globals_linux.hpp" -+ #endif -+@@ -130,6 +139,9 @@ -+ #ifdef TARGET_ARCH_arm -+ # include "c2_globals_arm.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "c2_globals_aarch64.hpp" -++#endif -+ #ifdef TARGET_OS_FAMILY_linux -+ # include "c2_globals_linux.hpp" -+ #endif -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/icache.hpp openjdk/hotspot/src/share/vm/runtime/icache.hpp -+index d460a0f..9a3b9c8 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/icache.hpp -++++ openjdk/hotspot/src/share/vm/runtime/icache.hpp -+@@ -83,6 +83,9 @@ class AbstractICache : AllStatic { -+ #ifdef TARGET_ARCH_ppc -+ # include "icache_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "icache_aarch64.hpp" -++#endif -+ -+ -+ -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/java.cpp openjdk/hotspot/src/share/vm/runtime/java.cpp -+index fc3b67a..46794b0 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/java.cpp -++++ openjdk/hotspot/src/share/vm/runtime/java.cpp -+@@ -78,6 +78,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "vm_version_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "vm_version_aarch64.hpp" -++#endif -+ #ifdef TARGET_OS_FAMILY_linux -+ # include "thread_linux.inline.hpp" -+ #endif -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/javaCalls.hpp openjdk/hotspot/src/share/vm/runtime/javaCalls.hpp -+index d4f8595..bc2ca9b 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/javaCalls.hpp -++++ openjdk/hotspot/src/share/vm/runtime/javaCalls.hpp -+@@ -45,6 +45,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "jniTypes_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "jniTypes_aarch64.hpp" -++#endif -+ #ifdef TARGET_OS_FAMILY_linux -+ # include "thread_linux.inline.hpp" -+ #endif -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp openjdk/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp -+index 8374aa2..6be5f79 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp -++++ openjdk/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp -+@@ -47,6 +47,9 @@ -+ #ifdef TARGET_OS_ARCH_linux_arm -+ # include "orderAccess_linux_arm.inline.hpp" -+ #endif -++#ifdef TARGET_OS_ARCH_linux_aarch64 -++# include "orderAccess_linux_aarch64.inline.hpp" -++#endif -+ #ifdef TARGET_OS_ARCH_linux_ppc -+ # include "orderAccess_linux_ppc.inline.hpp" -+ #endif -+@@ -121,6 +124,9 @@ friend class JavaCallWrapper; -+ #ifdef TARGET_ARCH_ppc -+ # include "javaFrameAnchor_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "javaFrameAnchor_aarch64.hpp" -++#endif -+ -+ -+ public: -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/os.hpp openjdk/hotspot/src/share/vm/runtime/os.hpp -+index 5867deb..0f1fbb4 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/os.hpp -++++ openjdk/hotspot/src/share/vm/runtime/os.hpp -+@@ -719,6 +719,9 @@ class os: AllStatic { -+ #ifdef TARGET_OS_ARCH_linux_ppc -+ # include "os_linux_ppc.hpp" -+ #endif -++#ifdef TARGET_OS_ARCH_linux_aarch64 -++# include "os_linux_aarch64.hpp" -++#endif -+ #ifdef TARGET_OS_ARCH_bsd_x86 -+ # include "os_bsd_x86.hpp" -+ #endif -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/registerMap.hpp openjdk/hotspot/src/share/vm/runtime/registerMap.hpp -+index 5dd677a..7bd425f 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/registerMap.hpp -++++ openjdk/hotspot/src/share/vm/runtime/registerMap.hpp -+@@ -42,6 +42,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "register_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "register_aarch64.hpp" -++#endif -+ -+ class JavaThread; -+ -+@@ -150,6 +153,9 @@ class RegisterMap : public StackObj { -+ #ifdef TARGET_ARCH_ppc -+ # include "registerMap_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "registerMap_aarch64.hpp" -++#endif -+ -+ }; -+ -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/relocator.hpp openjdk/hotspot/src/share/vm/runtime/relocator.hpp -+index c34866f..790bd80 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/relocator.hpp -++++ openjdk/hotspot/src/share/vm/runtime/relocator.hpp -+@@ -42,6 +42,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "bytes_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "bytes_aarch64.hpp" -++#endif -+ -+ // This code has been converted from the 1.1E java virtual machine -+ // Thanks to the JavaTopics group for using the code -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/safepoint.cpp openjdk/hotspot/src/share/vm/runtime/safepoint.cpp -+index c29d257..a842bb3 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/safepoint.cpp -++++ openjdk/hotspot/src/share/vm/runtime/safepoint.cpp -+@@ -70,6 +70,10 @@ -+ # include "nativeInst_ppc.hpp" -+ # include "vmreg_ppc.inline.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "nativeInst_aarch64.hpp" -++# include "vmreg_aarch64.inline.hpp" -++#endif -+ #ifdef TARGET_OS_FAMILY_linux -+ # include "thread_linux.inline.hpp" -+ #endif -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/sharedRuntime.cpp openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp -+index c25dcfe..aa7caff 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/sharedRuntime.cpp -++++ openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp -+@@ -76,6 +76,10 @@ -+ # include "nativeInst_ppc.hpp" -+ # include "vmreg_ppc.inline.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "nativeInst_aarch64.hpp" -++# include "vmreg_aarch64.inline.hpp" -++#endif -+ #ifdef COMPILER1 -+ #include "c1/c1_Runtime1.hpp" -+ #endif -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/stackValueCollection.cpp openjdk/hotspot/src/share/vm/runtime/stackValueCollection.cpp -+index 110f712..779f994 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/stackValueCollection.cpp -++++ openjdk/hotspot/src/share/vm/runtime/stackValueCollection.cpp -+@@ -39,6 +39,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "jniTypes_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "jniTypes_aarch64.hpp" -++#endif -+ -+ jint StackValueCollection::int_at(int slot) const { -+ intptr_t val = at(slot)->get_int(); -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/statSampler.cpp openjdk/hotspot/src/share/vm/runtime/statSampler.cpp -+index 0b24def..c82a214 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/statSampler.cpp -++++ openjdk/hotspot/src/share/vm/runtime/statSampler.cpp -+@@ -48,6 +48,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "vm_version_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "vm_version_aarch64.hpp" -++#endif -+ -+ // -------------------------------------------------------- -+ // StatSamplerTask -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp openjdk/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp -+index b6068a5..4ef7e38 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp -++++ openjdk/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp -+@@ -42,6 +42,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "assembler_ppc.inline.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "assembler_aarch64.inline.hpp" -++#endif -+ -+ -+ // Implementation of StubCodeDesc -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/stubRoutines.hpp openjdk/hotspot/src/share/vm/runtime/stubRoutines.hpp -+index 8481dce..f233b56 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/stubRoutines.hpp -++++ openjdk/hotspot/src/share/vm/runtime/stubRoutines.hpp -+@@ -46,6 +46,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "nativeInst_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "nativeInst_aarch64.hpp" -++#endif -+ -+ // StubRoutines provides entry points to assembly routines used by -+ // compiled code and the run-time system. Platform-specific entry -+@@ -116,6 +119,9 @@ class StubRoutines: AllStatic { -+ #endif -+ #ifdef TARGET_ARCH_MODEL_ppc -+ # include "stubRoutines_ppc.hpp" -++#endif -++#ifdef TARGET_ARCH_MODEL_aarch64 -++# include "stubRoutines_aarch64.hpp" -+ #endif -+ -+ -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/thread.hpp openjdk/hotspot/src/share/vm/runtime/thread.hpp -+index 7846cc0..6964c22 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/thread.hpp -++++ openjdk/hotspot/src/share/vm/runtime/thread.hpp -+@@ -1651,6 +1651,9 @@ public: -+ #ifdef TARGET_OS_ARCH_linux_ppc -+ # include "thread_linux_ppc.hpp" -+ #endif -++#ifdef TARGET_OS_ARCH_linux_aarch64 -++# include "thread_linux_aarch64.hpp" -++#endif -+ #ifdef TARGET_OS_ARCH_bsd_x86 -+ # include "thread_bsd_x86.hpp" -+ #endif -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/threadLocalStorage.hpp openjdk/hotspot/src/share/vm/runtime/threadLocalStorage.hpp -+index c2f7a9e..26ef559 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/threadLocalStorage.hpp -++++ openjdk/hotspot/src/share/vm/runtime/threadLocalStorage.hpp -+@@ -68,6 +68,9 @@ class ThreadLocalStorage : AllStatic { -+ #ifdef TARGET_OS_ARCH_linux_ppc -+ # include "threadLS_linux_ppc.hpp" -+ #endif -++#ifdef TARGET_OS_ARCH_linux_aarch64 -++# include "threadLS_linux_aarch64.hpp" -++#endif -+ #ifdef TARGET_OS_ARCH_bsd_x86 -+ # include "threadLS_bsd_x86.hpp" -+ #endif -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/vmStructs.cpp openjdk/hotspot/src/share/vm/runtime/vmStructs.cpp -+index 8afd933..359f9fc 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/vmStructs.cpp -++++ openjdk/hotspot/src/share/vm/runtime/vmStructs.cpp -+@@ -125,6 +125,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "vmStructs_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "vmStructs_aarch64.hpp" -++#endif -+ #ifdef TARGET_OS_FAMILY_linux -+ # include "thread_linux.inline.hpp" -+ #endif -+@@ -161,6 +164,9 @@ -+ #ifdef TARGET_OS_ARCH_linux_ppc -+ # include "vmStructs_linux_ppc.hpp" -+ #endif -++#ifdef TARGET_OS_ARCH_linux_aarch64 -++# include "vmStructs_linux_aarch64.hpp" -++#endif -+ #ifdef TARGET_OS_ARCH_bsd_x86 -+ # include "vmStructs_bsd_x86.hpp" -+ #endif -+@@ -221,6 +227,9 @@ -+ #ifdef TARGET_ARCH_MODEL_ppc -+ # include "adfiles/adGlobals_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_MODEL_aarch64 -++# include "adfiles/adGlobals_aarch64.hpp" -++#endif -+ #endif -+ -+ // Note: the cross-product of (c1, c2, product, nonproduct, ...), -+diff --git openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp openjdk/hotspot/src/share/vm/runtime/vm_version.cpp -+index 2d51b67..bba9b01 100644 -+--- openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp -++++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp -+@@ -41,6 +41,9 @@ -+ #ifdef TARGET_ARCH_ppc -+ # include "vm_version_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "vm_version_aarch64.hpp" -++#endif -+ -+ const char* Abstract_VM_Version::_s_vm_release = Abstract_VM_Version::vm_release(); -+ const char* Abstract_VM_Version::_s_internal_vm_info_string = Abstract_VM_Version::internal_vm_info_string(); -+@@ -185,6 +188,7 @@ const char* Abstract_VM_Version::jre_release_version() { -+ AMD64_ONLY("amd64") \ -+ ARM_ONLY("arm") \ -+ PPC_ONLY("ppc") \ -++ AARCH64_ONLY("aarch64") \ -+ SPARC_ONLY("sparc") -+ #endif // ZERO -+ -+diff --git openjdk.orig/hotspot/src/share/vm/utilities/copy.hpp openjdk/hotspot/src/share/vm/utilities/copy.hpp -+index 3dcbfee..198590f 100644 -+--- openjdk.orig/hotspot/src/share/vm/utilities/copy.hpp -++++ openjdk/hotspot/src/share/vm/utilities/copy.hpp -+@@ -337,6 +337,9 @@ class Copy : AllStatic { -+ #ifdef TARGET_ARCH_ppc -+ # include "copy_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "copy_aarch64.hpp" -++#endif -+ -+ }; -+ -+diff --git openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions.hpp openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp -+index b55b0ac..5d11e26 100644 -+--- openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions.hpp -++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp -+@@ -346,6 +346,9 @@ extern int LogMinObjAlignmentInBytes; -+ #ifdef TARGET_ARCH_ppc -+ # include "globalDefinitions_ppc.hpp" -+ #endif -++#ifdef TARGET_ARCH_aarch64 -++# include "globalDefinitions_aarch64.hpp" -++#endif -+ -+ -+ // The byte alignment to be used by Arena::Amalloc. See bugid 4169348. -+diff --git openjdk.orig/hotspot/src/share/vm/utilities/macros.hpp openjdk/hotspot/src/share/vm/utilities/macros.hpp -+index 003f2af..2aa7f87 100644 -+--- openjdk.orig/hotspot/src/share/vm/utilities/macros.hpp -++++ openjdk/hotspot/src/share/vm/utilities/macros.hpp -+@@ -261,6 +261,14 @@ -+ #define NOT_ARM(code) code -+ #endif -+ -++#ifdef AARCH64 -++#define AARCH64_ONLY(code) code -++#define NOT_AARCH64(code) -++#else -++#define AARCH64_ONLY(code) -++#define NOT_AARCH64(code) code -++#endif -++ -+ #ifdef JAVASE_EMBEDDED -+ #define EMBEDDED_ONLY(code) code -+ #define NOT_EMBEDDED(code) --- -2.26.2 - diff --git a/gnu/packages/patches/jacal-fix-texinfo.patch b/gnu/packages/patches/jacal-fix-texinfo.patch deleted file mode 100644 index 83e44a3164..0000000000 --- a/gnu/packages/patches/jacal-fix-texinfo.patch +++ /dev/null @@ -1,92 +0,0 @@ -Fix the broken Texinfo in the Jacal package documentation - ---- jacal/jacal.texi,orig 2017-02-23 20:35:55.303980444 +0100 -+++ jacal/jacal.texi 2017-02-23 20:53:14.539024674 +0100 -@@ -343,7 +343,7 @@ - - With the standard input grammar, the precedence of @samp{-} as a prefix - behaves strangely. @code{a^-b*c} becomes @code{a^(-b*c)} while --@code{@result{a^b*c} (a^b)*c}. -+@code{a^b*c @result{} (a^b)*c}. - - Using @code{divide} to divide a polynomial by an integer does not work. - -@@ -675,8 +675,9 @@ - e1: --------- - a - @end example -+@end deffn - --@deffnx Command suchthat var exp -+@deffn Command suchthat var exp - - If an expression rather than an equation is given to @code{suchthat}, it - is as though the equation @code{@var{exp}=0} was given. -@@ -688,8 +689,9 @@ - e2: --------- - a - @end example -+@end deffn - --@deffnx Operator | var exp_or_eqn -+@deffn Operator | var exp_or_eqn - - An alternative infix notation is also available for @code{suchthat}. - -@@ -857,8 +859,9 @@ - - Returns the degree of polynomial or equation @var{poly} in variable - @var{var}. -+@end deffn - --@deffnx Operator degree poly -+@deffn Operator degree poly - - Returns the total-degree, the degree of its highest degree monomial, - of polynomial or equation @var{poly}. -@@ -1016,10 +1019,12 @@ - Returns @var{poly1} reduced with respect to @var{poly2} (or @var{eqn}) - and @var{var}. If @var{poly2} is univariate, the third argument is not - needed. -+@end deffn - --@deffnx Command mod poly1 n -+@deffn Command mod poly1 n - Returns @var{poly1} with all the coefficients taken modulo @var{n}. --@deffnx Command mod poly1 -+@end deffn -+@deffn Command mod poly1 - Returns @var{poly1} with all the coefficients taken modulo the - current modulus. - -@@ -1220,8 +1225,9 @@ - e1: -1 2 3 5 - @end group - @end example -+@end deffn - --@deffnx Command factor polyratio -+@deffn Command factor polyratio - Given a univariate ratio of polynomials @var{polyratio}, returns a - matrix of factors and exponents. - -@@ -2028,7 +2034,7 @@ - formed from the pair-wise products of components of the inputs. For - example, for the input tensors @code{x[a,b]} and @code{y[c]} - @example --@result{z:tmult(x,y);} z[a,b,c] = x[a,b]*y[c] -+z:tmult(x,y); @result{} z[a,b,c] = x[a,b]*y[c] - @end example - - With an additional argument, @code{tmult} will produce the inner product -@@ -2464,8 +2470,9 @@ - If you do not wish to return to Jacal but really want to terminate the - session and return to the operating system, then after typing - @code{qed();}, type @code{(slib:exit)} or use @code{quit}. -+@end deffn - --@deffnx Command quit -+@deffn Command quit - Exit directly from Jacal to the operating system. You will not be able - to continue your Jacal session. - diff --git a/gnu/packages/patches/jami-fix-crash-on-quit.patch b/gnu/packages/patches/jami-fix-crash-on-quit.patch new file mode 100644 index 0000000000..c25bce588a --- /dev/null +++ b/gnu/packages/patches/jami-fix-crash-on-quit.patch @@ -0,0 +1,34 @@ +Retrieved from: +https://git.jami.net/savoirfairelinux/jami-client-qt/-/commit/83f68573324a453a6d26e025fd6439f175a79d1b.diff. + +With the 'client-qt' prefix added to match the file hierarchy of the release tarball. + +diff --git a/client-qt/src/mainapplication.cpp b/client-qt/src/mainapplication.cpp +index 0c3209fc6fa7c528bec197f1cf9332758170441c..278f19287b86dd2c916935ab0930cbe0abb35d26 100644 +--- a/client-qt/src/mainapplication.cpp ++++ b/client-qt/src/mainapplication.cpp +@@ -155,7 +155,11 @@ MainApplication::MainApplication(int& argc, char** argv) + QObject::connect(this, &QApplication::aboutToQuit, [this] { cleanup(); }); + } + +-MainApplication::~MainApplication() {} ++MainApplication::~MainApplication() ++{ ++ engine_.reset(); ++ lrcInstance_.reset(); ++} + + bool + MainApplication::init() +diff --git a/src/mainapplication.h b/src/mainapplication.h +index 51306be829478b9fbc1c61a08aeb96938be26dac..4047e3abb3cfd3e6250387a37fa5a896e9bc4161 100644 +--- a/client-qt/src/mainapplication.h ++++ b/client-qt/src/mainapplication.h +@@ -80,7 +80,6 @@ private: + private: + QScopedPointer<QFile> debugFile_; + QScopedPointer<QQmlApplicationEngine> engine_; +- + QScopedPointer<LRCInstance> lrcInstance_; + + QScopedPointer<ConnectivityMonitor> connectivityMonitor_; diff --git a/gnu/packages/patches/libsequoia-fix-ffi-Makefile.patch b/gnu/packages/patches/libsequoia-fix-ffi-Makefile.patch new file mode 100644 index 0000000000..21f5a1e4df --- /dev/null +++ b/gnu/packages/patches/libsequoia-fix-ffi-Makefile.patch @@ -0,0 +1,32 @@ +From ed641d2048d131e077f54043764741b7e7b7fe03 Mon Sep 17 00:00:00 2001 +From: Hartmut Goebel <[email protected]> +Date: Tue, 7 Dec 2021 16:42:43 +0100 +Subject: [PATCH] ffi: Update Makefile, remove rule remaining from store + removal. + +--- + ffi/Makefile | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/ffi/Makefile b/ffi/Makefile +index a5540db3..07328589 100644 +--- a/ffi/Makefile ++++ b/ffi/Makefile +@@ -62,7 +62,6 @@ build-release: + $(CARGO) build $(CARGO_FLAGS) --release --package sequoia-ffi + $(MAKE) -Clang/python build-release + $(call sequoia_pc,$(CARGO_TARGET_DIR)/release,true) +- $(MAKE) -C../store build-release + + .PHONY: install + install: build-release +@@ -82,7 +82,6 @@ install: build-release + $(DESTDIR)$(PREFIX)/lib/libsequoia_ffi.$(_SEQ_LIB_EXT) + $(INSTALL) $(CARGO_TARGET_DIR)/release/libsequoia_ffi.a \ + $(DESTDIR)$(PREFIX)/lib/libsequoia_ffi.a +- $(MAKE) -C../store install + # Now the bindings. + $(MAKE) -Clang/python install + +-- + diff --git a/gnu/packages/patches/libsequoia-remove-store.patch b/gnu/packages/patches/libsequoia-remove-store.patch new file mode 100644 index 0000000000..e7e1a91ee3 --- /dev/null +++ b/gnu/packages/patches/libsequoia-remove-store.patch @@ -0,0 +1,432 @@ +Shortend version of +From 351ad5e5e2dd67f427b7eb2e4d5d0b35d90ffaf7 Mon Sep 17 00:00:00 2001 +From: Justus Winter <[email protected]> +Date: Wed, 24 Nov 2021 15:09:34 +0100 +Subject: [PATCH] store: Drop crate. + + - The store has never been really used, and never reached a maturity + where it was useful. And, we're on the verge of replacing it with + the Shared PGP Certificate Directory. +--- + Cargo.toml | 1 - + ffi/Cargo.toml | 4 +- + ffi/include/sequoia.h | 1 - + ffi/include/sequoia/store.h | 409 ------ + ffi/lang/python/sequoia/__init__.py | 1 - + ffi/lang/python/sequoia/prelude.py | 1 - + ffi/lang/python/sequoia/sequoia_build.py | 3 +- + ffi/lang/python/sequoia/store.py | 246 ---- + ffi/lang/python/tests/test_store.py | 47 - + ffi/src/lib.rs | 2 - + ffi/src/store.rs | 659 ---------- + 25 files changed, 3 insertions(+), 5064 deletions(-) + delete mode 100644 ffi/include/sequoia/store.h + delete mode 100644 ffi/lang/python/sequoia/store.py + delete mode 100644 ffi/lang/python/tests/test_store.py + delete mode 100644 ffi/src/store.rs + +diff --git a/Cargo.toml b/Cargo.toml +index a4f48520..a573ddbf 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -10,7 +10,6 @@ members = [ + "openpgp", + "openpgp-ffi", + "sq", +- "store", + ] + + [profile.release] +diff --git a/ffi/Cargo.toml b/ffi/Cargo.toml +index 53ddaf68..2ec84e6e 100644 +--- a/ffi/Cargo.toml ++++ b/ffi/Cargo.toml +@@ -24,7 +24,6 @@ maintenance = { status = "actively-developed" } + [dependencies] + sequoia-ffi-macros = { path = "../ffi-macros", version = "0.22" } + sequoia-openpgp = { path = "../openpgp", version = "1.0.0", default-features = false } +-sequoia-store = { path = "../store", version = "0.22", default-features = false } + sequoia-net = { path = "../net", version = "0.23", default-features = false } + sequoia-ipc = { path = "../ipc", version = "0.26", default-features = false } + anyhow = "1.0.18" +@@ -42,10 +41,9 @@ crate-type = ["cdylib", "staticlib"] + bench = false + + [features] +-default = ["sequoia-openpgp/default", "sequoia-store/default"] ++default = ["sequoia-openpgp/default"] + crypto-nettle = ["sequoia-openpgp/crypto-nettle"] + crypto-cng = ["sequoia-openpgp/crypto-cng"] + compression = ["sequoia-openpgp/compression"] + compression-deflate = ["sequoia-openpgp/compression-deflate"] + compression-bzip2 = ["sequoia-openpgp/compression-bzip2"] +-background-services = ["sequoia-store/background-services"] +diff --git a/ffi/include/sequoia.h b/ffi/include/sequoia.h +index 8c62ba8f..c32a2f3e 100644 +--- a/ffi/include/sequoia.h ++++ b/ffi/include/sequoia.h +@@ -5,6 +5,5 @@ + #include <sequoia/core.h> + #include <sequoia/openpgp.h> + #include <sequoia/net.h> +-#include <sequoia/store.h> + + #endif +diff --git a/ffi/lang/python/sequoia/__init__.py b/ffi/lang/python/sequoia/__init__.py +index 4f84346e..fc170e20 100644 +--- a/ffi/lang/python/sequoia/__init__.py ++++ b/ffi/lang/python/sequoia/__init__.py +@@ -4,5 +4,4 @@ from . import ( + openpgp, + core, + net, +- store, + ) +diff --git a/ffi/lang/python/sequoia/prelude.py b/ffi/lang/python/sequoia/prelude.py +index 42b0156a..61efbab0 100644 +--- a/ffi/lang/python/sequoia/prelude.py ++++ b/ffi/lang/python/sequoia/prelude.py +@@ -3,4 +3,3 @@ from .error import * + from .openpgp import * + from .core import * + from .net import * +-from .store import * +diff --git a/ffi/lang/python/sequoia/sequoia_build.py b/ffi/lang/python/sequoia/sequoia_build.py +index a3ce2786..058f1380 100644 +--- a/ffi/lang/python/sequoia/sequoia_build.py ++++ b/ffi/lang/python/sequoia/sequoia_build.py +@@ -14,8 +14,7 @@ defs = "".join(l + open(join(pgp_inc, "openpgp/serialize.h")).readlines(), + open(join(pgp_inc, "openpgp.h")).readlines(), + open(join(sq_inc, "core.h")).readlines(), +- open(join(sq_inc, "net.h")).readlines(), +- open(join(sq_inc, "store.h")).readlines()) ++ open(join(sq_inc, "net.h")).readlines()) + if not l.startswith('#')) + + defs = defs.replace("INT_MAX", "{}".format(1<<31)) +diff --git a/ffi/lang/python/sequoia/store.py b/ffi/lang/python/sequoia/store.py +deleted file mode 100644 +index 57d1b18f..00000000 +--- a/ffi/lang/python/sequoia/store.py ++++ /dev/null +@@ -1,246 +0,0 @@ +-from _sequoia import ffi, lib +- +-from .error import Error +-from .glue import _str, _static_str, SQObject, sq_iterator, sq_time +-from .net import NetworkPolicy +-from .openpgp import Fingerprint, Cert +- +-class Store(object): +- @classmethod +- def log(cls, ctx): +- yield from sq_iterator( +- ffi.gc( +- lib.sq_store_server_log(ctx.ref()), +- lib.sq_log_iter_free), +- lib.sq_log_iter_next, +- lambda x: Log(x, context=ctx)) +- +- @classmethod +- def list_keys(cls, ctx): +- def next_fn(i): +- fpp = ffi.new("pgp_fingerprint_t[1]") +- key = lib.sq_key_iter_next(i, fpp) +- if key == ffi.NULL: +- return ffi.NULL +- else: +- return (Fingerprint(fpp[0], ctx), +- Key(key, ctx)) +- +- yield from sq_iterator( +- ffi.gc( +- lib.sq_store_list_keys(ctx.ref()), +- lib.sq_key_iter_free), +- next_fn) +- +-class Mapping(SQObject): +- _del = lib.sq_mapping_free +- +- # Keys used for communications. +- REALM_CONTACTS = _static_str(lib.SQ_REALM_CONTACTS) +- +- # Keys used for signing software updates. +- REALM_SOFTWARE_UPDATES = _static_str(lib.SQ_REALM_SOFTWARE_UPDATES) +- +- @classmethod +- def open(cls, ctx, network_policy=NetworkPolicy.Encrypted, realm=REALM_CONTACTS, name="default"): +- return Mapping(lib.sq_mapping_open(ctx.ref(), network_policy.value, +- realm.encode(), name.encode()), +- context=ctx) +- +- +- def add(self, label, fingerprint): +- return Binding(lib.sq_mapping_add(self.context().ref(), self.ref(), +- label.encode(), fingerprint.ref()), +- context=self.context()) +- +- def import_(self, label, cert): +- return Cert(lib.sq_mapping_import(self.context().ref(), self.ref(), +- label.encode(), cert.ref()), +- context=self.context()) +- +- def lookup(self, label): +- return Binding(lib.sq_mapping_lookup(self.context().ref(), self.ref(), +- label.encode()), +- self.context()) +- +- def delete(self): +- if lib.sq_mapping_delete(self.ref()): +- raise Error._last(self.context()) +- super(Mapping, self)._delete(skip_free=True) +- +- def iter(self): +- def next_fn(i): +- labelp = ffi.new("char *[1]") +- fpp = ffi.new("pgp_fingerprint_t[1]") +- binding = lib.sq_binding_iter_next(i, labelp, fpp) +- if binding == ffi.NULL: +- return ffi.NULL +- else: +- return (_str(labelp[0]), +- Fingerprint(fpp[0], self.context()), +- Binding(binding, self.context())) +- +- yield from sq_iterator( +- ffi.gc( +- lib.sq_mapping_iter(self.context().ref(), self.ref()), +- lib.sq_binding_iter_free), +- next_fn) +- +- def log(self): +- yield from sq_iterator( +- ffi.gc( +- lib.sq_mapping_log(self.context().ref(), self.ref()), +- lib.sq_log_iter_free), +- lib.sq_log_iter_next, +- lambda x: Log(x, context=self.context())) +- +-class Binding(SQObject): +- _del = lib.sq_binding_free +- +- def stats(self): +- return Stats(lib.sq_binding_stats(self.context().ref(), self.ref()), +- self.context()) +- +- def key(self): +- return Key(lib.sq_binding_key(self.context().ref(), self.ref()), +- self.context()) +- +- def cert(self): +- return Cert(lib.sq_binding_cert(self.context().ref(), self.ref()), +- self.context()) +- +- def import_(self, cert): +- return Cert(lib.sq_binding_import(self.context().ref(), self.ref(), cert), +- self.context()) +- +- def rotate(self, cert): +- return Cert(lib.sq_binding_rotate(self.context().ref(), self.ref(), cert), +- self.context()) +- +- def delete(self): +- if lib.sq_binding_delete(self.ref()): +- raise Error._last(self.context()) +- super(Binding, self)._delete(skip_free=True) +- +- def log(self): +- yield from sq_iterator( +- ffi.gc( +- lib.sq_binding_log(self.context().ref(), self.ref()), +- lib.sq_log_iter_free), +- lib.sq_log_iter_next, +- lambda x: Log(x, context=self.context())) +- +-class Key(SQObject): +- _del = lib.sq_key_free +- +- def stats(self): +- return Stats(lib.sq_key_stats(self.context().ref(), self.ref()), +- self.context()) +- +- def cert(self): +- return Cert(lib.sq_key_cert(self.context().ref(), self.ref()), +- self.context()) +- +- def import_(self, cert): +- return Cert(lib.sq_key_import(self.context().ref(), self.ref(), cert), +- self.context()) +- +- def log(self): +- yield from sq_iterator( +- ffi.gc( +- lib.sq_key_log(self.context().ref(), self.ref()), +- lib.sq_log_iter_free), +- lib.sq_log_iter_next) +- +- +-class Stats(SQObject): +- _del = lib.sq_stats_free +- def __init__(self, o, context=None): +- super(Stats, self).__init__(o, context=context) +- self.encryption = Stamps(ffi.addressof(o, "encryption")) +- self.verification = Stamps(ffi.addressof(o, "verification")) +- +- @property +- def created(self): +- return sq_time(self.ref().created) +- +- @property +- def updated(self): +- return sq_time(self.ref().updated) +- +- def __str__(self): +- return \ +- "Stats{{created={}, updated={}, encryption={}, verification={}}}" \ +- .format(self.created, self.updated, self.encryption, +- self.verification) +- +-class Stamps(SQObject): +- @property +- def count(self): +- return self.ref().count +- +- @property +- def first(self): +- return sq_time(self.ref().first) +- +- @property +- def last(self): +- return sq_time(self.ref().last) +- +- def __str__(self): +- return "Stamps{{count={}, first={}, last={}}}".format( +- self.count, self.first, self.last) +- +-class Log(SQObject): +- _del = lib.sq_log_free +- +- @property +- def timestamp(self): +- return sq_time(self.ref().timestamp) +- +- @property +- def store(self): +- if self.ref().store == ffi.NULL: +- return None +- else: +- return Store(self.ref().store, context=self.context(), +- owner=self) +- +- @property +- def binding(self): +- if self.ref().binding == ffi.NULL: +- return None +- else: +- return Binding(self.ref().binding, context=self.context(), +- owner=self) +- +- @property +- def key(self): +- if self.ref().key == ffi.NULL: +- return None +- else: +- return Key(self.ref().key, context=self.context(), +- owner=self) +- +- @property +- def slug(self): +- return ffi.string(self.ref().slug).decode() +- +- @property +- def status(self): +- return ffi.string(self.ref().status).decode() +- +- @property +- def error(self): +- if self.ref().error == ffi.NULL: +- return None +- else: +- return ffi.string(self.ref().error).decode() +- +- def __str__(self): +- if self.error: +- return "{}: {}: {}: {}".format( +- self.timestamp, self.slug, self.status, self.error) +- else: +- return "{}: {}: {}".format( +- self.timestamp, self.slug, self.status) +diff --git a/ffi/lang/python/tests/test_store.py b/ffi/lang/python/tests/test_store.py +deleted file mode 100644 +index 7b06cc1a..00000000 +--- a/ffi/lang/python/tests/test_store.py ++++ /dev/null +@@ -1,47 +0,0 @@ +-from sequoia.prelude import Context, Store, Mapping, Fingerprint +- +-def test_open(): +- c = Context(ephemeral=True) +- Mapping.open(c) +- +-def test_add(): +- c = Context(ephemeral=True) +- s = Mapping.open(c) +- fp = Fingerprint.from_hex("7DCA58B54EB143169DDEE15F247F6DABC84914FE") +- s.add("Ἀριστοτέλης", fp) +- +-def test_iterate(): +- c = Context(ephemeral=True) +- s = Mapping.open(c) +- fp = Fingerprint.from_hex("7DCA58B54EB143169DDEE15F247F6DABC84914FE") +- s.add("Ἀριστοτέλης", fp) +- l = list(s.iter()) +- assert len(l) == 1 +- l = list(Store.list_keys(c)) +- assert len(l) == 1 +- fpi, key = l[0] +- assert fpi == fp +- +-def test_logs(): +- c = Context(ephemeral=True) +- s = Mapping.open(c) +- fp = Fingerprint.from_hex("7DCA58B54EB143169DDEE15F247F6DABC84914FE") +- b = s.add("Ἀριστοτέλης", fp) +- l = list(s.iter()) +- assert len(l) == 1 +- +- # global logs +- logs = list(Store.log(c)) +- assert len(logs) > 0 +- +- # per store logs +- logs = list(s.log()) +- assert len(logs) > 0 +- +- # per binding logs +- logs = list(b.log()) +- assert len(logs) > 0 +- +- # per key logs +- logs = list(b.key().log()) +- assert len(logs) > 0 +diff --git a/ffi/src/lib.rs b/ffi/src/lib.rs +index 40e3672e..9b4577eb 100644 +--- a/ffi/src/lib.rs ++++ b/ffi/src/lib.rs +@@ -130,7 +130,6 @@ pub(crate) use crate::openpgp::{ + MoveResultIntoRaw, + Maybe, + maybe_time, +- to_time_t, + }; + + /* Error handling with implicit context. */ +@@ -146,5 +145,4 @@ macro_rules! ffi_make_fry_from_ctx { + pub mod core; + pub mod error; + pub mod net; +-pub mod store; + +GitLab + diff --git a/gnu/packages/patches/libsigrokdecode-python3.9-fix.patch b/gnu/packages/patches/libsigrokdecode-python3.9-fix.patch new file mode 100644 index 0000000000..4a6e1223ec --- /dev/null +++ b/gnu/packages/patches/libsigrokdecode-python3.9-fix.patch @@ -0,0 +1,19 @@ +From: Dan Horák <[email protected]> +Subject: Add support for Python 3.9 + +Origin: upstream, https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=commitdiff;h=9b0ad5177bd692f7556a4756bdbd2da81d9c34ce +Bug-Debian: https://bugs.debian.org/972769 + +diff --git a/configure.ac b/configure.ac +index f9958b3..2917cb3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -100,7 +100,7 @@ SR_PKG_CHECK_SUMMARY([srd_pkglibs_summary]) + # first, since usually only that variant will add "-lpython3.8". + # https://docs.python.org/3/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build + SR_PKG_CHECK([python3], [SRD_PKGLIBS], +- [python-3.8-embed], [python-3.8 >= 3.8], [python-3.7 >= 3.7], [python-3.6 >= 3.6], [python-3.5 >= 3.5], [python-3.4 >= 3.4], [python-3.3 >= 3.3], [python-3.2 >= 3.2], [python3 >= 3.2]) ++ [python-3.9-embed], [python-3.8-embed], [python-3.8 >= 3.8], [python-3.7 >= 3.7], [python-3.6 >= 3.6], [python-3.5 >= 3.5], [python-3.4 >= 3.4], [python-3.3 >= 3.3], [python-3.2 >= 3.2], [python3 >= 3.2]) + AS_IF([test "x$sr_have_python3" = xno], + [AC_MSG_ERROR([Cannot find Python 3 development headers.])]) + diff --git a/gnu/packages/patches/libtool-skip-tests2.patch b/gnu/packages/patches/libtool-skip-tests2.patch index c9d61e3b41..3f86191b4f 100644 --- a/gnu/packages/patches/libtool-skip-tests2.patch +++ b/gnu/packages/patches/libtool-skip-tests2.patch @@ -1,4 +1,4 @@ -Skip the nopic test on ARM and MIPS systems. +Skip the nopic test on ARM, MIPS and RISC-V systems. --- libtool-2.4.6/tests/demo.at.orig 2015-01-16 13:52:04.000000000 -0500 +++ libtool-2.4.6/tests/demo.at 2015-02-16 10:48:51.435851966 -0500 @@ -7,7 +7,7 @@ Skip the nopic test on ARM and MIPS systems. AT_CHECK([case $host in -hppa*|x86_64*|s390*) -+hppa*|x86_64*|s390*|arm*|mips*) ++hppa*|x86_64*|s390*|arm*|mips*|riscv*) # These hosts cannot use non-PIC shared libs exit 77 ;; *-solaris*|*-sunos*) @@ -18,7 +18,7 @@ Skip the nopic test on ARM and MIPS systems. { set +x $as_echo "$at_srcdir/demo.at:535: case \$host in -hppa*|x86_64*|s390*) -+hppa*|x86_64*|s390*|arm*|mips*) ++hppa*|x86_64*|s390*|arm*|mips*|riscv*) # These hosts cannot use non-PIC shared libs exit 77 ;; *-solaris*|*-sunos*) @@ -27,7 +27,7 @@ Skip the nopic test on ARM and MIPS systems. at_fn_check_prepare_notrace 'a `...` command substitution' "demo.at:535" ( $at_check_trace; case $host in -hppa*|x86_64*|s390*) -+hppa*|x86_64*|s390*|arm*|mips*) ++hppa*|x86_64*|s390*|arm*|mips*|riscv*) # These hosts cannot use non-PIC shared libs exit 77 ;; *-solaris*|*-sunos*) diff --git a/gnu/packages/patches/linuxdcpp-openssl-1.1.patch b/gnu/packages/patches/linuxdcpp-openssl-1.1.patch new file mode 100644 index 0000000000..6f9912afd8 --- /dev/null +++ b/gnu/packages/patches/linuxdcpp-openssl-1.1.patch @@ -0,0 +1,26 @@ +--- a/dcpp/CryptoManager.cpp.orig 2011-04-17 17:57:09 UTC ++++ b/dcpp/CryptoManager.cpp +@@ -107,12 +107,20 @@ CryptoManager::CryptoManager() + }; + + if(dh) { +- dh->p = BN_bin2bn(dh4096_p, sizeof(dh4096_p), 0); +- dh->g = BN_bin2bn(dh4096_g, sizeof(dh4096_g), 0); ++ BIGNUM *p, *g; + +- if (!dh->p || !dh->g) { ++ p = BN_bin2bn(dh4096_p, sizeof(dh4096_p), 0); ++ g = BN_bin2bn(dh4096_g, sizeof(dh4096_g), 0); ++ ++ if (!p || !g) { + dh.reset(); + } else { ++#if OPENSSL_VERSION_NUMBER < 0x10100005L ++ dh->p = p; ++ dh->g = g; ++#else ++ DH_set0_pqg(dh, p, NULL, g); ++#endif + SSL_CTX_set_options(serverContext, SSL_OP_SINGLE_DH_USE); + SSL_CTX_set_options(serverVerContext, SSL_OP_SINGLE_DH_USE); + SSL_CTX_set_tmp_dh(serverContext, (DH*)dh); diff --git a/gnu/packages/patches/lua-5.4-liblua-so.patch b/gnu/packages/patches/lua-5.4-liblua-so.patch new file mode 100644 index 0000000000..93dd011143 --- /dev/null +++ b/gnu/packages/patches/lua-5.4-liblua-so.patch @@ -0,0 +1,33 @@ +Patch the makefile to create liblua.so. + +--- a/src/Makefile 2021-02-09 18:47:17.000000000 +0000 ++++ b/src/Makefile 2022-01-03 11:30:36.964501941 +0000 +@@ -33,6 +33,7 @@ + PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw posix solaris + + LUA_A= liblua.a ++LUA_SO= liblua.so + CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o + LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o + BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS) +@@ -44,7 +45,7 @@ + LUAC_O= luac.o + + ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) +-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) ++ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO) + ALL_A= $(LUA_A) + + # Targets start here. +@@ -56,6 +57,11 @@ + + a: $(ALL_A) + ++$(LUA_SO): $(CORE_O) $(LIB_O) ++ $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS) ++ ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V) ++ ln -sf $(LUA_SO).$(R) $(LUA_SO) ++ + $(LUA_A): $(BASE_O) + $(AR) $@ $(BASE_O) + $(RANLIB) $@ diff --git a/gnu/packages/patches/lua-5.4-pkgconfig.patch b/gnu/packages/patches/lua-5.4-pkgconfig.patch new file mode 100644 index 0000000000..eb42633585 --- /dev/null +++ b/gnu/packages/patches/lua-5.4-pkgconfig.patch @@ -0,0 +1,110 @@ +Enables generating Lua's pkg-config file. + +http://lua-users.org/lists/lua-l/2015-03/msg00338.html + +--- a/Makefile 2022-01-03 12:06:37.760402709 +0000 ++++ b/Makefile 2022-01-03 12:06:49.568402167 +0000 +@@ -14,6 +14,7 @@ + INSTALL_BIN= $(INSTALL_TOP)/bin + INSTALL_INC= $(INSTALL_TOP)/include + INSTALL_LIB= $(INSTALL_TOP)/lib ++INSTALL_PC= $(INSTALL_LIB)/pkgconfig + INSTALL_MAN= $(INSTALL_TOP)/man/man1 + INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V + INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V +@@ -39,9 +40,12 @@ + PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw posix solaris + + # What to install. +-TO_BIN= lua luac ++INTERPRETER= lua ++COMPILER= luac ++TO_BIN= $(INTERPRETER) $(COMPILER) + TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp +-TO_LIB= liblua.a ++TO_LIB= liblua.a liblua.so liblua.so.${V} ++TO_PC= lua-$(V).pc + TO_MAN= lua.1 luac.1 + + # Lua version and release. +@@ -51,20 +55,26 @@ + # Targets start here. + all: $(PLAT) + +-$(PLATS) help test clean: +- @cd src && $(MAKE) $@ ++$(PLATS): ++ @cd src && $(MAKE) $@ V=$(V) R=$(R) + +-install: dummy +- cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) ++clean: ++ cd src && $(MAKE) $@ ++ $(RM) $(TO_PC) ++ ++install: dummy $(TO_PC) ++ cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_PC) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) + cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) + cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) +- cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) ++ cd src && $(INSTALL_EXEC) $(TO_LIB) $(INSTALL_LIB) ++ cd src && $(INSTALL_DATA) ../$(TO_PC) $(INSTALL_PC) + cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) + + uninstall: + cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN) + cd src && cd $(INSTALL_INC) && $(RM) $(TO_INC) + cd src && cd $(INSTALL_LIB) && $(RM) $(TO_LIB) ++ cd src && cd $(INSTALL_PC) && $(RM) $(TO_PC) + cd doc && cd $(INSTALL_MAN) && $(RM) $(TO_MAN) + + local: +@@ -82,11 +92,13 @@ + @echo "TO_BIN= $(TO_BIN)" + @echo "TO_INC= $(TO_INC)" + @echo "TO_LIB= $(TO_LIB)" ++ @echo "TO_PC= $(TO_PC)" + @echo "TO_MAN= $(TO_MAN)" + @echo "INSTALL_TOP= $(INSTALL_TOP)" + @echo "INSTALL_BIN= $(INSTALL_BIN)" + @echo "INSTALL_INC= $(INSTALL_INC)" + @echo "INSTALL_LIB= $(INSTALL_LIB)" ++ @echo "INSTALL_PC= $(INSTALL_PC)" + @echo "INSTALL_MAN= $(INSTALL_MAN)" + @echo "INSTALL_LMOD= $(INSTALL_LMOD)" + @echo "INSTALL_CMOD= $(INSTALL_CMOD)" +@@ -95,12 +107,29 @@ + + # Echo pkg-config data. + pc: +- @echo "version=$R" +- @echo "prefix=$(INSTALL_TOP)" +- @echo "libdir=$(INSTALL_LIB)" +- @echo "includedir=$(INSTALL_INC)" ++ @echo 'prefix=$(INSTALL_TOP)' ++ @echo 'libdir=$(INSTALL_LIB)' ++ @echo 'includedir=$(INSTALL_INC)' ++ @echo 'bindir=$(INSTALL_BIN)' ++ @echo ++ @echo 'INSTALL_LMOD=$(INSTALL_LMOD)' ++ @echo 'INSTALL_CMOD=$(INSTALL_CMOD)' ++ @echo 'INTERPRETER=$${bindir}/$(INTERPRETER)' ++ @echo 'COMPILER=$${bindir}/$(COMPILER)' ++ @echo ++ @echo 'Name: Lua' ++ @echo 'Description: A powerful, fast, lightweight, embeddable scripting language' ++ @echo 'Version: $(R)' ++ @echo ++ @echo 'Libs: -L$${libdir} -llua -lm' ++ @echo 'Cflags: -I$${includedir}' ++ ++pkg-config: $(TO_PC) ++$(TO_PC): ++ @$(MAKE) -s pc > $@ ++ + + # Targets that do not create files (not all makes understand .PHONY). +-.PHONY: all $(PLATS) help test clean install uninstall local dummy echo pc ++.PHONY: all $(PLATS) help test clean install uninstall local dummy echo pc pkg-config + + # (end of Makefile) diff --git a/gnu/packages/patches/nautilus-add-libportal-gtk3.patch b/gnu/packages/patches/nautilus-add-libportal-gtk3.patch new file mode 100644 index 0000000000..cefa47cc64 --- /dev/null +++ b/gnu/packages/patches/nautilus-add-libportal-gtk3.patch @@ -0,0 +1,61 @@ +From 55cfd66ccca391fc144f5863ff6bfc1f3b137e2d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ant=C3=B3nio=20Fernandes?= <[email protected]> +Date: Tue, 21 Dec 2021 17:42:27 +0000 +Subject: [PATCH] general: Add libportal-gtk3 dependency + +The portal-gtk3.h header has been moved into a separate library which +binds gtk3 explicitly. + +https://github.com/flatpak/libportal/pull/53 +--- + build-aux/flatpak/org.gnome.Nautilus.json | 5 +++-- ;; Changes removed in Guix + build-aux/flatpak/org.gnome.Nautilus.yml | 3 ++- ;; Changes removed in Guix + meson.build | 4 +++- + src/meson.build | 1 + + src/nautilus-files-view.c | 2 +- + 5 files changed, 10 insertions(+), 5 deletions(-) + +diff --git a/meson.build b/meson.build +index 927216636..4626fa0bb 100644 +--- a/meson.build ++++ b/meson.build +@@ -122,8 +122,10 @@ gnome_desktop = dependency('gnome-desktop-3.0', version: '>= 3.0.0') + gtk = dependency('gtk+-3.0', version: '>= 3.22.27') + libhandy = dependency('libhandy-1', version: '>= 1.1.90') + libportal = [] ++libportal_gtk3 = [] + if get_option('libportal') +- libportal = dependency('libportal', version: '>= 0.3') ++ libportal = dependency('libportal', version: '>= 0.5') ++ libportal_gtk3 = dependency('libportal-gtk3', version: '>= 0.5') + endif + selinux = [] + if get_option('selinux') +diff --git a/src/meson.build b/src/meson.build +index 682d6f3a3..d7fb76d53 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -285,6 +285,7 @@ nautilus_deps = [ + libgd_dep, + libhandy, + libportal, ++ libportal_gtk3, + nautilus_extension, + selinux, + tracker_sparql, +diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c +index dfb7fb26c..a24005a11 100644 +--- a/src/nautilus-files-view.c ++++ b/src/nautilus-files-view.c +@@ -93,7 +93,7 @@ + + #ifdef HAVE_LIBPORTAL + #include <libportal/portal.h> +-#include <libportal/portal-gtk3.h> ++#include <libportal-gtk3/portal-gtk3.h> + #endif + + /* Minimum starting update inverval */ +-- +GitLab + diff --git a/gnu/packages/patches/nix-dont-build-html-doc.diff b/gnu/packages/patches/nix-dont-build-html-doc.diff new file mode 100644 index 0000000000..79142bc215 --- /dev/null +++ b/gnu/packages/patches/nix-dont-build-html-doc.diff @@ -0,0 +1,26 @@ +"--enable-doc-gen" configure flag will enable HTML document generation that requires mdbook. +We can't simply disable it because we need manpages. + +Author: Zhu Zihao <[email protected]> + +diff --git a/doc/manual/local.mk b/doc/manual/local.mk +index e43d9f2fb..c323d1847 100644 +--- a/doc/manual/local.mk ++++ b/doc/manual/local.mk +@@ -69,8 +69,6 @@ $(d)/builtins.json: $(bindir)/nix + $(trace-gen) $(dummy-env) NIX_PATH=nix/corepkgs=corepkgs $(bindir)/nix __dump-builtins > [email protected] + @mv [email protected] $@ + +-# Generate the HTML manual. +-install: $(docdir)/manual/index.html + + # Generate 'nix' manpages. + install: $(mandir)/man1/nix3-manpages +@@ -94,7 +92,5 @@ doc/manual/generated/man1/nix3-manpages: $(d)/src/command-ref/new-cli + done + @touch $@ + +-$(docdir)/manual/index.html: $(MANUAL_SRCS) $(d)/book.toml $(d)/custom.css $(d)/src/SUMMARY.md $(d)/src/command-ref/new-cli $(d)/src/command-ref/conf-file.md $(d)/src/expressions/builtins.md $(call rwildcard, $(d)/src, *.md) +- $(trace-gen) RUST_LOG=warn mdbook build doc/manual -d $(DESTDIR)$(docdir)/manual + + endif diff --git a/gnu/packages/patches/opencv-fix-build-of-grfmt_jpeg2000.cpp.patch b/gnu/packages/patches/opencv-fix-build-of-grfmt_jpeg2000.cpp.patch deleted file mode 100644 index 8deb60296a..0000000000 --- a/gnu/packages/patches/opencv-fix-build-of-grfmt_jpeg2000.cpp.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Tobias Geerinckx-Rice <[email protected]> -Date: Thu, 13 Aug 2020 15:21:30 +0200 -Subject: [PATCH] gnu: opencv: Fix build with Jasper 2.0.19. - -Taken verbatim from upstream: <https://github.com/opencv/opencv/issues/17984>. - -From f66fc199a20882c546fa31142e9c0f5a8b3cf983 Mon Sep 17 00:00:00 2001 -From: Florian Jung <[email protected]> -Date: Wed, 29 Jul 2020 18:51:55 +0200 -Subject: [PATCH] Fix build of grfmt_jpeg2000.cpp - -libjasper has recently changed `jas_matrix_get` from a macro to an inline function -(389951d071 in https://github.com/jasper-software/jasper), causing the build to fail. ---- - modules/imgcodecs/src/grfmt_jpeg2000.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules/imgcodecs/src/grfmt_jpeg2000.cpp b/modules/imgcodecs/src/grfmt_jpeg2000.cpp -index fe69f80c86f..0f4d28d6f4d 100644 ---- a/modules/imgcodecs/src/grfmt_jpeg2000.cpp -+++ b/modules/imgcodecs/src/grfmt_jpeg2000.cpp -@@ -377,7 +377,7 @@ bool Jpeg2KDecoder::readComponent8u( uchar *data, void *_buffer, - - for( y = 0; y < yend - ystart; ) - { -- jas_seqent_t* pix_row = &jas_matrix_get( buffer, y / ystep, 0 ); -+ jas_seqent_t* pix_row = jas_matrix_getref( buffer, y / ystep, 0 ); - uchar* dst = data + (y - yoffset) * step - xoffset; - - if( xstep == 1 ) -@@ -443,7 +443,7 @@ bool Jpeg2KDecoder::readComponent16u( unsigned short *data, void *_buffer, - - for( y = 0; y < yend - ystart; ) - { -- jas_seqent_t* pix_row = &jas_matrix_get( buffer, y / ystep, 0 ); -+ jas_seqent_t* pix_row = jas_matrix_getref( buffer, y / ystep, 0 ); - ushort* dst = data + (y - yoffset) * step - xoffset; - - if( xstep == 1 ) diff --git a/gnu/packages/patches/opencv-rgbd-aarch64-test-fix.patch b/gnu/packages/patches/opencv-rgbd-aarch64-test-fix.patch deleted file mode 100644 index 7792f8d1bf..0000000000 --- a/gnu/packages/patches/opencv-rgbd-aarch64-test-fix.patch +++ /dev/null @@ -1,40 +0,0 @@ -https://github.com/opencv/opencv_contrib/commit/8aaa91c3dc835690477d7777e66948dbf5a87edc.patch - -From 8aaa91c3dc835690477d7777e66948dbf5a87edc Mon Sep 17 00:00:00 2001 -From: Tomoaki Teshima <[email protected]> -Date: Mon, 5 Nov 2018 20:32:23 +0900 -Subject: [PATCH] avoid test failing on Aarch64 * loosen the threshold in - Rgbd_Normals.compute * make the minimum tvec larger in - RGBD_Odometry_Rgbd.algorithmic - ---- - modules/rgbd/test/test_normal.cpp | 2 +- - modules/rgbd/test/test_odometry.cpp | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules/rgbd/test/test_normal.cpp b/modules/rgbd/test/test_normal.cpp -index f2233553a7..ed54f2cd98 100644 ---- a/modules/rgbd/test/test_normal.cpp -+++ b/modules/rgbd/test/test_normal.cpp -@@ -211,7 +211,7 @@ class CV_RgbdNormalsTest: public cvtest::BaseTest - std::cout << std::endl << "*** FALS" << std::endl; - errors[0][0] = 0.006f; - errors[0][1] = 0.03f; -- errors[1][0] = 0.00008f; -+ errors[1][0] = 0.0001f; - errors[1][1] = 0.02f; - break; - case 1: -diff --git a/modules/rgbd/test/test_odometry.cpp b/modules/rgbd/test/test_odometry.cpp -index 62b654a1ec..f5a2084504 100644 ---- a/modules/rgbd/test/test_odometry.cpp -+++ b/modules/rgbd/test/test_odometry.cpp -@@ -213,7 +213,7 @@ void CV_OdometryTest::generateRandomTransformation(Mat& rvec, Mat& tvec) - normalize(rvec, rvec, rng.uniform(0.007f, maxRotation)); - - randu(tvec, Scalar(-1000), Scalar(1000)); -- normalize(tvec, tvec, rng.uniform(0.007f, maxTranslation)); -+ normalize(tvec, tvec, rng.uniform(0.008f, maxTranslation)); - } - - void CV_OdometryTest::run(int) diff --git a/gnu/packages/patches/openrgb-unbundle-hueplusplus.patch b/gnu/packages/patches/openrgb-unbundle-hueplusplus.patch new file mode 100644 index 0000000000..7454e1efbe --- /dev/null +++ b/gnu/packages/patches/openrgb-unbundle-hueplusplus.patch @@ -0,0 +1,58 @@ +Remove references to hueplusplus in order to unbundle and use the input package. + +diff --git a/OpenRGB.pro b/OpenRGB.pro +index 61758892..8702d998 100644 +--- a/OpenRGB.pro ++++ b/OpenRGB.pro +@@ -493,35 +493,6 @@ SOURCES += + dependencies/Swatches/swatches.cpp \ + dependencies/dmiinfo.cpp \ + dependencies/ColorWheel/ColorWheel.cpp \ +- dependencies/hueplusplus-1.0.0/src/Action.cpp \ +- dependencies/hueplusplus-1.0.0/src/APICache.cpp \ +- dependencies/hueplusplus-1.0.0/src/BaseDevice.cpp \ +- dependencies/hueplusplus-1.0.0/src/BaseHttpHandler.cpp \ +- dependencies/hueplusplus-1.0.0/src/Bridge.cpp \ +- dependencies/hueplusplus-1.0.0/src/BridgeConfig.cpp \ +- dependencies/hueplusplus-1.0.0/src/CLIPSensors.cpp \ +- dependencies/hueplusplus-1.0.0/src/ColorUnits.cpp \ +- dependencies/hueplusplus-1.0.0/src/EntertainmentMode.cpp \ +- dependencies/hueplusplus-1.0.0/src/ExtendedColorHueStrategy.cpp \ +- dependencies/hueplusplus-1.0.0/src/ExtendedColorTemperatureStrategy.cpp \ +- dependencies/hueplusplus-1.0.0/src/Group.cpp \ +- dependencies/hueplusplus-1.0.0/src/HueCommandAPI.cpp \ +- dependencies/hueplusplus-1.0.0/src/HueDeviceTypes.cpp \ +- dependencies/hueplusplus-1.0.0/src/HueException.cpp \ +- dependencies/hueplusplus-1.0.0/src/Light.cpp \ +- dependencies/hueplusplus-1.0.0/src/ModelPictures.cpp \ +- dependencies/hueplusplus-1.0.0/src/NewDeviceList.cpp \ +- dependencies/hueplusplus-1.0.0/src/Scene.cpp \ +- dependencies/hueplusplus-1.0.0/src/Schedule.cpp \ +- dependencies/hueplusplus-1.0.0/src/Sensor.cpp \ +- dependencies/hueplusplus-1.0.0/src/SimpleBrightnessStrategy.cpp \ +- dependencies/hueplusplus-1.0.0/src/SimpleColorHueStrategy.cpp \ +- dependencies/hueplusplus-1.0.0/src/SimpleColorTemperatureStrategy.cpp \ +- dependencies/hueplusplus-1.0.0/src/StateTransaction.cpp \ +- dependencies/hueplusplus-1.0.0/src/TimePattern.cpp \ +- dependencies/hueplusplus-1.0.0/src/UPnP.cpp \ +- dependencies/hueplusplus-1.0.0/src/Utils.cpp \ +- dependencies/hueplusplus-1.0.0/src/ZLLSensors.cpp \ + dependencies/libe131/src/e131.c \ + dependencies/libcmmk/src/libcmmk.c \ + main.cpp \ +@@ -1188,6 +1159,7 @@ unix:!macx { + -lmbedx509 \ + -lmbedtls \ + -lmbedcrypto \ ++ -lhueplusplusshared \ + + COMPILER_VERSION = $$system($$QMAKE_CXX " -dumpversion") + if (!versionAtLeast(COMPILER_VERSION, "9")) { +@@ -1218,7 +1190,6 @@ unix:!macx { + } + + SOURCES += \ +- dependencies/hueplusplus-1.0.0/src/LinHttpHandler.cpp \ + i2c_smbus/i2c_smbus_linux.cpp \ + serial_port/find_usb_serial_port_linux.cpp \ + AutoStart/AutoStart-Linux.cpp \ diff --git a/gnu/packages/patches/password-store-tree-compat.patch b/gnu/packages/patches/password-store-tree-compat.patch new file mode 100644 index 0000000000..ce8de8f27c --- /dev/null +++ b/gnu/packages/patches/password-store-tree-compat.patch @@ -0,0 +1,29 @@ +Tree 2.0 and later will unconditionally ignore all options and write +JSON data on file descriptor 3 when available, which causes problems +for the test harness and other scripts that use FD 3. Work around by +closing descriptor 3 for the 'tree' command. + +Taken from upstream: + https://git.zx2c4.com/password-store/commit/?id=eea24967a002a2a81ae9b97a1fe972b5287f3a09 + +diff --git a/src/password-store.sh b/src/password-store.sh +--- a/src/password-store.sh ++++ b/src/password-store.sh +@@ -402,7 +402,7 @@ cmd_show() { + else + echo "${path%\/}" + fi +- tree -N -C -l --noreport "$PREFIX/$path" | tail -n +2 | sed -E 's/\.gpg(\x1B\[[0-9]+m)?( ->|$)/\1\2/g' # remove .gpg at end of line, but keep colors ++ tree -N -C -l --noreport "$PREFIX/$path" 3>&- | tail -n +2 | sed -E 's/\.gpg(\x1B\[[0-9]+m)?( ->|$)/\1\2/g' # remove .gpg at end of line, but keep colors + elif [[ -z $path ]]; then + die "Error: password store is empty. Try \"pass init\"." + else +@@ -414,7 +414,7 @@ cmd_find() { + [[ $# -eq 0 ]] && die "Usage: $PROGRAM $COMMAND pass-names..." + IFS="," eval 'echo "Search Terms: $*"' + local terms="*$(printf '%s*|*' "$@")" +- tree -N -C -l --noreport -P "${terms%|*}" --prune --matchdirs --ignore-case "$PREFIX" | tail -n +2 | sed -E 's/\.gpg(\x1B\[[0-9]+m)?( ->|$)/\1\2/g' ++ tree -N -C -l --noreport -P "${terms%|*}" --prune --matchdirs --ignore-case "$PREFIX" 3>&- | tail -n +2 | sed -E 's/\.gpg(\x1B\[[0-9]+m)?( ->|$)/\1\2/g' + } + + cmd_grep() { diff --git a/gnu/packages/patches/passwordsafe-meson-remove-extra-argument.patch b/gnu/packages/patches/passwordsafe-meson-remove-extra-argument.patch new file mode 100644 index 0000000000..3cb61a364a --- /dev/null +++ b/gnu/packages/patches/passwordsafe-meson-remove-extra-argument.patch @@ -0,0 +1,20 @@ +diff --git a/data/meson.build b/data/meson.build +index 46f6373..26a2c18 100644 +--- a/data/meson.build ++++ b/data/meson.build +@@ -35,7 +35,6 @@ if get_option('profile') == 'development' + endif + desktop_conf.set('ICON', application_id) + desktop = i18n.merge_file( +- 'desktop', + input: configure_file( + input: files('org.gnome.PasswordSafe.desktop.in.in'), + output: 'org.gnome.PasswordSafe.desktop.in', +@@ -65,7 +64,6 @@ if get_option('profile') == 'development' + endif + appdata_conf.set('APPID', application_id) + appdata = i18n.merge_file( +- 'appdata', + input: configure_file( + input: files('org.gnome.PasswordSafe.appdata.xml.in.in'), + output: 'org.gnome.PasswordSafe.appdata.xml.in', diff --git a/gnu/packages/patches/pjproject-correct-the-cflags-field.patch b/gnu/packages/patches/pjproject-correct-the-cflags-field.patch deleted file mode 100644 index 8bc503580d..0000000000 --- a/gnu/packages/patches/pjproject-correct-the-cflags-field.patch +++ /dev/null @@ -1,121 +0,0 @@ -From 44f8f6c1c71bec6bf00269b075a2dc801ae6fd45 Mon Sep 17 00:00:00 2001 -From: Vladimir Stoiakin <[email protected]> -Date: Thu, 23 Apr 2020 14:06:40 +0300 -Subject: [PATCH 1/2] libpjproject.pc: correct the field 'cflags' - ---- - Makefile | 6 ++---- - aconfigure | 4 ++++ - aconfigure.ac | 3 +++ - build.mak.in | 7 +++---- - libpjproject.pc.in | 4 ++-- - 5 files changed, 14 insertions(+), 10 deletions(-) - -diff --git a/Makefile b/Makefile -index ffaf638dd..3fd5cab40 100644 ---- a/Makefile -+++ b/Makefile -@@ -132,10 +132,8 @@ install: - sed -e "s!@INCLUDEDIR@!$(includedir)!" | \ - sed -e "s!@LIBDIR@!$(libdir)!" | \ - sed -e "s/@PJ_VERSION@/$(PJ_VERSION)/" | \ -- sed -e "s!@PJ_LDLIBS@!!" | \ -- sed -e "s!@PJ_LDXXLIBS@!$(PJ_LDXXLIBS)!" | \ -- sed -e "s!@PJ_INSTALL_CFLAGS@!!" | \ -- sed -e "s!@PJ_INSTALL_CXXFLAGS@!$(PJ_INSTALL_CXXFLAGS)!" > $(DESTDIR)/$(libdir)/pkgconfig/libpjproject.pc -+ sed -e "s!@PJ_INSTALL_LDFLAGS@!$(PJ_INSTALL_LDFLAGS)!" | \ -+ sed -e "s!@PJ_INSTALL_CFLAGS@!$(PJ_INSTALL_CFLAGS)!" > $(DESTDIR)/$(libdir)/pkgconfig/libpjproject.pc - - uninstall: - $(RM) $(DESTDIR)$(libdir)/pkgconfig/libpjproject.pc -diff --git a/aconfigure b/aconfigure -index 2abbcf533..1ab932bda 100755 ---- a/aconfigure -+++ b/aconfigure -@@ -706,6 +706,7 @@ GREP - CPP - ac_cross_compile - ac_shlib_suffix -+ac_cflags - ac_build_mak_vars - ac_pjdir - CC_CFLAGS -@@ -3952,6 +3953,7 @@ if test "$CC_CFLAGS" = ""; then CC_CFLAGS="-Wall"; fi - - - -+ - case $host in - *mingw* | *cygw* | *win32* | *w32* ) - if pwd -W 2&> /dev/null; then -@@ -5138,8 +5140,10 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - - if test "x$ac_cv_c_bigendian" = "xyes"; then - CFLAGS="$CFLAGS -DPJ_IS_BIG_ENDIAN=1 -DPJ_IS_LITTLE_ENDIAN=0" -+ ac_cflags="$ac_cflags -DPJ_IS_BIG_ENDIAN=1 -DPJ_IS_LITTLE_ENDIAN=0" - else - CFLAGS="$CFLAGS -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1" -+ ac_cflags="$ac_cflags -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1" - fi - - -diff --git a/aconfigure.ac b/aconfigure.ac -index 83d3559ed..b1d493c08 100644 ---- a/aconfigure.ac -+++ b/aconfigure.ac -@@ -71,6 +71,7 @@ AC_SUBST(CC_CFLAGS) - - AC_SUBST(ac_pjdir) - AC_SUBST(ac_build_mak_vars) -+AC_SUBST(ac_cflags) - - case $host in - *mingw* | *cygw* | *win32* | *w32* ) -@@ -144,8 +145,10 @@ AC_C_BIGENDIAN - - if test "x$ac_cv_c_bigendian" = "xyes"; then - CFLAGS="$CFLAGS -DPJ_IS_BIG_ENDIAN=1 -DPJ_IS_LITTLE_ENDIAN=0" -+ ac_cflags="$ac_cflags -DPJ_IS_BIG_ENDIAN=1 -DPJ_IS_LITTLE_ENDIAN=0" - else - CFLAGS="$CFLAGS -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1" -+ ac_cflags="$ac_cflags -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1" - fi - - dnl -diff --git a/build.mak.in b/build.mak.in -index abc0c4fa0..a9078bb25 100644 ---- a/build.mak.in -+++ b/build.mak.in -@@ -299,7 +299,7 @@ export APP_LDXXLIBS := $(PJSUA2_LIB_LDLIB) \ - -lstdc++ \ - $(APP_LDLIBS) - --# Here are the variabels to use if application is using the library -+# Here are the variables to use if application is using the library - # from within the source distribution - export PJ_CC := $(APP_CC) - export PJ_CXX := $(APP_CXX) -@@ -317,6 +317,5 @@ export PJ_LIBXX_FILES := $(APP_LIBXX_FILES) - export PJ_INSTALL_DIR := @prefix@ - export PJ_INSTALL_INC_DIR := @includedir@ - export PJ_INSTALL_LIB_DIR := @libdir@ --export PJ_INSTALL_CFLAGS := -I$(PJ_INSTALL_INC_DIR) -DPJ_AUTOCONF=1 @CFLAGS@ --export PJ_INSTALL_CXXFLAGS := @CXXFLAGS@ $(PJ_INSTALL_CFLAGS) --export PJ_INSTALL_LDFLAGS := -L$(PJ_INSTALL_LIB_DIR) $(APP_LDLIBS) -+export PJ_INSTALL_CFLAGS := -I$(PJ_INSTALL_INC_DIR) -DPJ_AUTOCONF=1 @ac_cflags@ -+export PJ_INSTALL_LDFLAGS := -L$(PJ_INSTALL_LIB_DIR) $(APP_LDXXLIBS) -diff --git a/libpjproject.pc.in b/libpjproject.pc.in -index fa8d39114..30ea05c07 100644 ---- a/libpjproject.pc.in -+++ b/libpjproject.pc.in -@@ -9,5 +9,5 @@ Name: libpjproject - Description: Multimedia communication library - URL: http://www.pjsip.org - Version: @PJ_VERSION@ --Libs: -L${libdir} @PJ_LDXXLIBS@ --Cflags: -I${includedir} @PJ_INSTALL_CXXFLAGS@ -+Libs: @PJ_INSTALL_LDFLAGS@ -+Cflags: @PJ_INSTALL_CFLAGS@ --- -2.27.0 - diff --git a/gnu/packages/patches/pjproject-fix-pkg-config-ldflags.patch b/gnu/packages/patches/pjproject-fix-pkg-config-ldflags.patch deleted file mode 100644 index 1199d82f1e..0000000000 --- a/gnu/packages/patches/pjproject-fix-pkg-config-ldflags.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 9bcba7fb28055550961b134e517b695a8cd05b2a Mon Sep 17 00:00:00 2001 -From: Maxim Cournoyer <[email protected]> -Date: Mon, 3 Aug 2020 17:43:19 -0400 -Subject: [PATCH] libpjproject.pc: Move external libraries to Libs.private. - -This is done so users of a shared pjproject library do not get link -directives (provided via pkg-config file of pjproject) to link against -pjproject's own library dependencies. - -Static linking with pjproject is preserved by moving the external -libraries link directives to the Libs.private field, which is -specifically intended for this purpose, via for example: - - $ pkg-config --static --libs libpjproject - -* build.mak.in (PJ_INSTALL_LDFLAGS_PRIVATE): New variable. -(PJ_INSTALL_LDFLAGS): Filter out PJ_INSTALL_LDFLAGS_PRIVATE entries. -* libpjproject.pc.in (Libs.private): New field. -* Makefile: Substitute PJ_INSTALL_LDFLAGS_PRIVATE as the value for the -Libs.private field. ---- - Makefile | 5 +++-- - build.mak.in | 3 ++- - libpjproject.pc.in | 1 + - 3 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/Makefile b/Makefile -index 3fd5cab40..d67badfa4 100644 ---- a/Makefile -+++ b/Makefile -@@ -54,14 +54,14 @@ doc: - exit 1; \ - fi; \ - done -- -+ - LIBS = pjlib/lib/libpj-$(TARGET_NAME).a \ - pjlib-util/lib/libpjlib-util-$(TARGET_NAME).a \ - pjnath/lib/libpjnath-$(TARGET_NAME).a \ - pjmedia/lib/libpjmedia-$(TARGET_NAME).a \ - pjmedia/lib/libpjmedia-audiodev-$(TARGET_NAME).a \ - pjmedia/lib/libpjmedia-codec-$(TARGET_NAME).a \ -- pjsip/lib/libpjsip-$(TARGET_NAME).a \ -+ pjsip/lib/libpjsip-$(TARGET_NAME).a \ - pjsip/lib/libpjsip-ua-$(TARGET_NAME).a \ - pjsip/lib/libpjsip-simple-$(TARGET_NAME).a \ - pjsip/lib/libpjsua-$(TARGET_NAME).a -@@ -133,6 +133,7 @@ install: - sed -e "s!@LIBDIR@!$(libdir)!" | \ - sed -e "s/@PJ_VERSION@/$(PJ_VERSION)/" | \ - sed -e "s!@PJ_INSTALL_LDFLAGS@!$(PJ_INSTALL_LDFLAGS)!" | \ -+ sed -e "s!@PJ_INSTALL_LDFLAGS_PRIVATE@!$(PJ_INSTALL_LDFLAGS_PRIVATE)!" | \ - sed -e "s!@PJ_INSTALL_CFLAGS@!$(PJ_INSTALL_CFLAGS)!" > $(DESTDIR)/$(libdir)/pkgconfig/libpjproject.pc - - uninstall: -diff --git a/build.mak.in b/build.mak.in -index a9078bb25..1a18a8513 100644 ---- a/build.mak.in -+++ b/build.mak.in -@@ -318,4 +318,5 @@ export PJ_INSTALL_DIR := @prefix@ - export PJ_INSTALL_INC_DIR := @includedir@ - export PJ_INSTALL_LIB_DIR := @libdir@ - export PJ_INSTALL_CFLAGS := -I$(PJ_INSTALL_INC_DIR) -DPJ_AUTOCONF=1 @ac_cflags@ --export PJ_INSTALL_LDFLAGS := -L$(PJ_INSTALL_LIB_DIR) $(APP_LDXXLIBS) -+export PJ_INSTALL_LDFLAGS_PRIVATE := $(APP_THIRD_PARTY_LIBS) $(APP_THIRD_PARTY_EXT) @LIBS@ -+export PJ_INSTALL_LDFLAGS := -L$(PJ_INSTALL_LIB_DIR) $(filter-out $(PJ_INSTALL_LDFLAGS_PRIVATE),$(APP_LDXXLIBS)) -diff --git a/libpjproject.pc.in b/libpjproject.pc.in -index 30ea05c07..4372d5016 100644 ---- a/libpjproject.pc.in -+++ b/libpjproject.pc.in -@@ -10,4 +10,5 @@ Description: Multimedia communication library - URL: http://www.pjsip.org - Version: @PJ_VERSION@ - Libs: @PJ_INSTALL_LDFLAGS@ -+Libs.private: @PJ_INSTALL_LDFLAGS_PRIVATE@ - Cflags: @PJ_INSTALL_CFLAGS@ --- -2.27.0 - diff --git a/gnu/packages/patches/pjproject-install-libpjsua2.patch b/gnu/packages/patches/pjproject-install-libpjsua2.patch new file mode 100644 index 0000000000..ef9b0de91f --- /dev/null +++ b/gnu/packages/patches/pjproject-install-libpjsua2.patch @@ -0,0 +1,19 @@ +# Retrieved from upstream: +# https://github.com/pjsip/pjproject/commit/742f7dc252ded778a8b677937791c02e2fbc0dde +diff --git a/Makefile b/Makefile +index 31a6d39d4..74e246a44 100644 +--- a/Makefile ++++ b/Makefile +@@ -121,9 +121,10 @@ cmp_wav: + + install: + mkdir -p $(DESTDIR)$(libdir)/ +- cp -af $(APP_LIB_FILES) $(DESTDIR)$(libdir)/ + if [ "$(PJ_EXCLUDE_PJSUA2)x" = "x" ] ; then \ +- cp -af $(PJ_DIR)/pjsip/lib/libpjsua2-$(LIB_SUFFIX) $(DESTDIR)$(libdir)/; \ ++ cp -af $(APP_LIBXX_FILES) $(DESTDIR)$(libdir)/; \ ++ else \ ++ cp -af $(APP_LIB_FILES) $(DESTDIR)$(libdir)/; \ + fi + mkdir -p $(DESTDIR)$(includedir)/ + for d in pjlib pjlib-util pjnath pjmedia pjsip; do \ diff --git a/gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch b/gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch index 3a5ae1a2cd..93996b52a7 100644 --- a/gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch +++ b/gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch @@ -1,4 +1,4 @@ -From 942730ce7148cd54a30d4a606ce71a2654c8a2e0 Mon Sep 17 00:00:00 2001 +From debc32a287209e1d1bb6fedb479bd923fd016399 Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler <[email protected]> Date: Sat, 5 Jun 2021 22:47:00 -0400 Subject: [PATCH] ppsspp: Remove upgrade code and gold support. @@ -6,27 +6,46 @@ Subject: [PATCH] ppsspp: Remove upgrade code and gold support. Original patch from Liliana Marie Prikler. Rebased on master (commit 69fa20744958aef8da9ca052ba7675fdc1636e46) by Maxim Cournoyer. +Revised once again by Liliana Marie Prikler for version 1.12.3. --- - Core/Config.cpp | 11 ------ + Common/System/System.h | 1 - + Core/Config.cpp | 12 ------- Core/Config.h | 2 -- Qt/QtMain.cpp | 6 ---- + Qt/mainwindow.cpp | 6 ---- + Qt/mainwindow.h | 1 - SDL/SDLMain.cpp | 6 ---- UI/DevScreens.cpp | 3 -- - UI/GameSettingsScreen.cpp | 2 -- + UI/GameSettingsScreen.cpp | 4 +-- UI/MainScreen.cpp | 70 +------------------------------------ + UI/MemStickScreen.cpp | 8 ----- UI/MiscScreens.cpp | 31 ++-------------- UWP/PPSSPP_UWPMain.cpp | 6 ---- - Windows/MainWindowMenu.cpp | 2 +- + Windows/MainWindowMenu.cpp | 8 +---- + Windows/WindowsHost.cpp | 4 --- Windows/main.cpp | 6 ---- + Windows/resource.h | 1 - android/jni/app-android.cpp | 6 ---- ios/main.mm | 6 ---- - 13 files changed, 5 insertions(+), 152 deletions(-) + 19 files changed, 6 insertions(+), 181 deletions(-) +diff --git a/Common/System/System.h b/Common/System/System.h +index 09560191e..5df68a120 100644 +--- a/Common/System/System.h ++++ b/Common/System/System.h +@@ -83,7 +83,6 @@ enum SystemProperty { + SYSPROP_DISPLAY_SAFE_INSET_BOTTOM, + + SYSPROP_DEVICE_TYPE, +- SYSPROP_APP_GOLD, // To avoid having #ifdef GOLD other than in main.cpp and similar. + + // Exposed on Android. Choosing the optimal sample rate for audio + // will result in lower latencies. Buffer size is automatically matched diff --git a/Core/Config.cpp b/Core/Config.cpp -index 74be99d75..b14aa22c7 100644 +index 305098f47..9c28a3315 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp -@@ -467,7 +467,6 @@ static ConfigSetting generalSettings[] = { +@@ -512,7 +512,6 @@ static ConfigSetting generalSettings[] = { ConfigSetting("IgnoreBadMemAccess", &g_Config.bIgnoreBadMemAccess, true, true), ConfigSetting("CurrentDirectory", &g_Config.currentDirectory, ""), ConfigSetting("ShowDebuggerOnLoad", &g_Config.bShowDebuggerOnLoad, false), @@ -34,7 +53,7 @@ index 74be99d75..b14aa22c7 100644 ConfigSetting("Language", &g_Config.sLanguageIni, &DefaultLangRegion), ConfigSetting("ForceLagSync2", &g_Config.bForceLagSync, false, true, true), ConfigSetting("DiscordPresence", &g_Config.bDiscordPresence, true, true, false), // Or maybe it makes sense to have it per-game? Race conditions abound... -@@ -1323,16 +1322,6 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) { +@@ -1395,17 +1394,6 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) { upgradeMessage = ""; } @@ -43,8 +62,9 @@ index 74be99d75..b14aa22c7 100644 - // splash screen quickly), but then we'll just show the notification next time instead, we store the - // upgrade number in the ini. - if (iRunCount % 10 == 0 && bCheckForNewVersion) { -- std::shared_ptr<http::Download> dl = g_DownloadManager.StartDownloadWithCallback( -- "http://www.ppsspp.org/version.json", Path(), &DownloadCompletedCallback); +- const char *versionUrl = "http://www.ppsspp.org/version.json"; +- const char *acceptMime = "application/json, text/*; q=0.9, */*; q=0.8"; +- auto dl = g_DownloadManager.StartDownloadWithCallback(versionUrl, Path(), &DownloadCompletedCallback, acceptMime); - dl->SetHidden(true); - } - @@ -52,10 +72,10 @@ index 74be99d75..b14aa22c7 100644 bSaveSettings = true; diff --git a/Core/Config.h b/Core/Config.h -index 79323eefc..d47bec0c7 100644 +index 7bbbf2798..1bc1c2296 100644 --- a/Core/Config.h +++ b/Core/Config.h -@@ -103,7 +103,6 @@ struct Config { +@@ -109,7 +109,6 @@ struct Config { bool bFastMemory; int iCpuCore; @@ -63,7 +83,7 @@ index 79323eefc..d47bec0c7 100644 bool bForceLagSync; bool bFuncReplacements; bool bHideSlowWarnings; -@@ -542,4 +541,3 @@ std::string CreateRandMAC(); +@@ -562,4 +561,3 @@ std::string CreateRandMAC(); // TODO: Find a better place for this. extern http::Downloader g_DownloadManager; extern Config g_Config; @@ -85,6 +105,42 @@ index b642f7442..a880d7c94 100644 case SYSPROP_CAN_JIT: return true; default: +diff --git a/Qt/mainwindow.cpp b/Qt/mainwindow.cpp +index 1f56e0e76..0b7680427 100644 +--- a/Qt/mainwindow.cpp ++++ b/Qt/mainwindow.cpp +@@ -413,11 +413,6 @@ void MainWindow::forumAct() + QDesktopServices::openUrl(QUrl("https://forums.ppsspp.org/")); + } + +-void MainWindow::goldAct() +-{ +- QDesktopServices::openUrl(QUrl("https://central.ppsspp.org/buygold")); +-} +- + void MainWindow::gitAct() + { + QDesktopServices::openUrl(QUrl("https://github.com/hrydgard/ppsspp/")); +@@ -666,7 +661,6 @@ void MainWindow::createMenus() + MenuTree* helpMenu = new MenuTree(this, menuBar(), QT_TR_NOOP("&Help")); + helpMenu->add(new MenuAction(this, SLOT(websiteAct()), QT_TR_NOOP("Visit www.&ppsspp.org"))); + helpMenu->add(new MenuAction(this, SLOT(forumAct()), QT_TR_NOOP("PPSSPP &forums"))); +- helpMenu->add(new MenuAction(this, SLOT(goldAct()), QT_TR_NOOP("Buy &Gold"))); + helpMenu->add(new MenuAction(this, SLOT(gitAct()), QT_TR_NOOP("Git&Hub"))); + helpMenu->add(new MenuAction(this, SLOT(discordAct()), QT_TR_NOOP("Discord"))); + helpMenu->addSeparator(); +diff --git a/Qt/mainwindow.h b/Qt/mainwindow.h +index 99c9fc3ad..8cd6cbf79 100644 +--- a/Qt/mainwindow.h ++++ b/Qt/mainwindow.h +@@ -197,7 +197,6 @@ private slots: + // Help + void websiteAct(); + void forumAct(); +- void goldAct(); + void gitAct(); + void discordAct(); + void aboutAct(); diff --git a/SDL/SDLMain.cpp b/SDL/SDLMain.cpp index f0f74f979..f963f36e9 100644 --- a/SDL/SDLMain.cpp @@ -103,10 +159,10 @@ index f0f74f979..f963f36e9 100644 return true; default: diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp -index 29baf2f2e..926692363 100644 +index 389fdf096..8442ee8c6 100644 --- a/UI/DevScreens.cpp +++ b/UI/DevScreens.cpp -@@ -635,9 +635,6 @@ void SystemInfoScreen::CreateViews() { +@@ -649,9 +649,6 @@ void SystemInfoScreen::CreateViews() { #ifdef _M_SSE buildConfig->Add(new InfoItem("_M_SSE", StringFromFormat("0x%x", _M_SSE))); #endif @@ -117,23 +173,32 @@ index 29baf2f2e..926692363 100644 ViewGroup *cpuExtensionsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT)); cpuExtensionsScroll->SetTag("DevSystemInfoCPUExt"); diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp -index 393e33cd9..d07d00d45 100644 +index 99fb151b9..90f26d5dc 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp -@@ -922,8 +922,6 @@ void GameSettingsScreen::CreateViews() { +@@ -1023,7 +1023,6 @@ void GameSettingsScreen::CreateViews() { } } #endif - systemSettings->Add(new CheckBox(&g_Config.bCheckForNewVersion, sy->T("VersionCheck", "Check for new versions of PPSSPP"))); -- + systemSettings->Add(new Choice(sy->T("Restore Default Settings")))->OnClick.Handle(this, &GameSettingsScreen::OnRestoreDefaultSettings); systemSettings->Add(new CheckBox(&g_Config.bEnableStateUndo, sy->T("Savestate slot backups"))); - static const char *autoLoadSaveStateChoices[] = { "Off", "Oldest Save", "Newest Save", "Slot 1", "Slot 2", "Slot 3", "Slot 4", "Slot 5" }; +@@ -2076,8 +2075,7 @@ void GestureMappingScreen::CreateViews() { + vert->Add(new PopupMultiChoice(&g_Config.iSwipeRight, mc->T("Swipe Right"), gestureButton, 0, ARRAY_SIZE(gestureButton), mc->GetName(), screenManager()))->SetEnabledPtr(&g_Config.bGestureControlEnabled); + vert->Add(new PopupSliderChoiceFloat(&g_Config.fSwipeSensitivity, 0.01f, 1.0f, co->T("Swipe sensitivity"), 0.01f, screenManager(), "x"))->SetEnabledPtr(&g_Config.bGestureControlEnabled); + vert->Add(new PopupSliderChoiceFloat(&g_Config.fSwipeSmoothing, 0.0f, 0.95f, co->T("Swipe smoothing"), 0.05f, screenManager(), "x"))->SetEnabledPtr(&g_Config.bGestureControlEnabled); +- ++ + vert->Add(new ItemHeader(co->T("Double tap"))); + vert->Add(new PopupMultiChoice(&g_Config.iDoubleTapGesture, mc->T("Double tap button"), gestureButton, 0, ARRAY_SIZE(gestureButton), mc->GetName(), screenManager()))->SetEnabledPtr(&g_Config.bGestureControlEnabled); + } +- diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp -index f88509276..51b21b640 100644 +index 4e86ac1ab..be49c3add 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp -@@ -1080,11 +1080,7 @@ void MainScreen::CreateViews() { +@@ -1100,11 +1100,7 @@ void MainScreen::CreateViews() { sprintf(versionString, "%s", PPSSPP_GIT_VERSION); rightColumnItems->SetSpacing(0.0f); AnchorLayout *logos = new AnchorLayout(new AnchorLayoutParams(FILL_PARENT, 60.0f, false)); @@ -146,19 +211,19 @@ index f88509276..51b21b640 100644 logos->Add(new ImageView(ImageID("I_LOGO"), "PPSSPP", IS_DEFAULT, new AnchorLayoutParams(180, 64, 64, -5.0f, NONE, NONE, false))); #if !defined(MOBILE_DEVICE) -@@ -1107,11 +1103,6 @@ void MainScreen::CreateViews() { +@@ -1127,11 +1123,6 @@ void MainScreen::CreateViews() { rightColumnItems->Add(new Choice(mm->T("Game Settings", "Settings")))->OnClick.Handle(this, &MainScreen::OnGameSettings); rightColumnItems->Add(new Choice(mm->T("Credits")))->OnClick.Handle(this, &MainScreen::OnCredits); rightColumnItems->Add(new Choice(mm->T("www.ppsspp.org")))->OnClick.Handle(this, &MainScreen::OnPPSSPPOrg); - if (!System_GetPropertyBool(SYSPROP_APP_GOLD)) { - Choice *gold = rightColumnItems->Add(new Choice(mm->T("Buy PPSSPP Gold"))); - gold->OnClick.Handle(this, &MainScreen::OnSupport); -- gold->SetIcon(ImageID("I_ICONGOLD")); +- gold->SetIcon(ImageID("I_ICONGOLD"), 0.5f); - } #if !PPSSPP_PLATFORM(UWP) // Having an exit button is against UWP guidelines. -@@ -1136,32 +1127,6 @@ void MainScreen::CreateViews() { +@@ -1156,32 +1147,6 @@ void MainScreen::CreateViews() { } else if (tabHolder_->GetVisibility() != V_GONE) { root_->SetDefaultFocusView(tabHolder_); } @@ -191,7 +256,7 @@ index f88509276..51b21b640 100644 } UI::EventReturn MainScreen::OnAllowStorage(UI::EventParams &e) { -@@ -1169,30 +1134,6 @@ UI::EventReturn MainScreen::OnAllowStorage(UI::EventParams &e) { +@@ -1189,30 +1154,6 @@ UI::EventReturn MainScreen::OnAllowStorage(UI::EventParams &e) { return UI::EVENT_DONE; } @@ -222,7 +287,7 @@ index f88509276..51b21b640 100644 void MainScreen::sendMessage(const char *message, const char *value) { // Always call the base class method first to handle the most common messages. UIScreenWithBackground::sendMessage(message, value); -@@ -1396,15 +1337,6 @@ UI::EventReturn MainScreen::OnCredits(UI::EventParams &e) { +@@ -1386,15 +1327,6 @@ UI::EventReturn MainScreen::OnCredits(UI::EventParams &e) { return UI::EVENT_DONE; } @@ -238,11 +303,47 @@ index f88509276..51b21b640 100644 UI::EventReturn MainScreen::OnPPSSPPOrg(UI::EventParams &e) { LaunchBrowser("https://www.ppsspp.org"); return UI::EVENT_DONE; +diff --git a/UI/MemStickScreen.cpp b/UI/MemStickScreen.cpp +index ef617c5b5..664614c62 100644 +--- a/UI/MemStickScreen.cpp ++++ b/UI/MemStickScreen.cpp +@@ -157,23 +157,16 @@ static void AddExplanation(UI::ViewGroup *viewGroup, MemStickScreen::Choice choi + case MemStickScreen::CHOICE_STORAGE_ROOT: + // Old school choice + holder->Add(new TextView(iz->T("DataWillStay", "Data will stay even if you uninstall PPSSPP"), flags, false))->SetBullet(true); +- holder->Add(new TextView(iz->T("DataCanBeShared", "Data can be shared between PPSSPP regular/Gold"), flags, false))->SetBullet(true); + holder->Add(new TextView(iz->T("EasyUSBAccess", "Easy USB access"), flags, false))->SetBullet(true); + break; + case MemStickScreen::CHOICE_BROWSE_FOLDER: + holder->Add(new TextView(iz->T("DataWillStay", "Data will stay even if you uninstall PPSSPP"), flags, false))->SetBullet(true); +- holder->Add(new TextView(iz->T("DataCanBeShared", "Data can be shared between PPSSPP regular/Gold"), flags, false))->SetBullet(true); + holder->Add(new TextView(iz->T("EasyUSBAccess", "Easy USB access"), flags, false))->SetBullet(true); + break; + case MemStickScreen::CHOICE_PRIVATE_DIRECTORY: + // Consider https://www.compart.com/en/unicode/U+26A0 (unicode warning sign?)? or a graphic? + holder->Add(new TextView(iz->T("DataWillBeLostOnUninstall", "Warning! Data will be lost when you uninstall PPSSPP!"), flags, false))->SetBullet(true); +- holder->Add(new TextView(iz->T("DataCannotBeShared", "Data CANNOT be shared between PPSSPP regular/Gold!"), flags, false))->SetBullet(true); +-#if GOLD +- holder->Add(new TextView(iz->T("USBAccessThroughGold", "USB access through Android/data/org.ppsspp.ppssppgold/files"), flags, false))->SetBullet(true); +-#else + holder->Add(new TextView(iz->T("USBAccessThrough", "USB access through Android/data/org.ppsspp.ppsspp/files"), flags, false))->SetBullet(true); +-#endif + break; + case MemStickScreen::CHOICE_SET_MANUAL: + default: +@@ -243,7 +236,6 @@ void MemStickScreen::CreateViews() { + } else { + leftColumn->Add(new RadioButton(&choice_, CHOICE_SET_MANUAL, iz->T("Manually specify PSP folder")))->OnClick.Handle(this, &MemStickScreen::OnChoiceClick); + leftColumn->Add(new TextView(iz->T("DataWillStay", "Data will stay even if you uninstall PPSSPP.")))->SetBullet(true); +- leftColumn->Add(new TextView(iz->T("DataCanBeShared", "Data can be shared between PPSSPP regular/Gold.")))->SetBullet(true); + // TODO: Show current folder here if we have one set. + } + if (choice_ == CHOICE_BROWSE_FOLDER || choice_ == CHOICE_SET_MANUAL) { diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp -index 901a5fb09..9d067aee6 100644 +index 04e5df6c3..fb6c29725 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp -@@ -661,11 +661,7 @@ void LogoScreen::render() { +@@ -769,11 +769,7 @@ void LogoScreen::render() { char temp[256]; // Manually formatting UTF-8 is fun. \xXX doesn't work everywhere. snprintf(temp, sizeof(temp), "%s Henrik Rydg%c%crd", cr->T("created", "Created by"), 0xC3, 0xA5); @@ -255,7 +356,7 @@ index 901a5fb09..9d067aee6 100644 dc.Draw()->DrawImage(ImageID("I_LOGO"), bounds.centerX() + 40, bounds.centerY() - 30, 1.5f, textColor, ALIGN_CENTER); //dc.Draw()->DrawTextShadow(UBUNTU48, "PPSSPP", bounds.w / 2, bounds.h / 2 - 30, textColor, ALIGN_CENTER); dc.SetFontScale(1.0f, 1.0f); -@@ -701,10 +697,6 @@ void CreditsScreen::CreateViews() { +@@ -809,10 +805,6 @@ void CreditsScreen::CreateViews() { // Really need to redo this whole layout with some linear layouts... int rightYOffset = 0; @@ -266,7 +367,7 @@ index 901a5fb09..9d067aee6 100644 root_->Add(new Button(cr->T("PPSSPP Forums"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 158, false)))->OnClick.Handle(this, &CreditsScreen::OnForums); root_->Add(new Button(cr->T("Discord"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 232, false)))->OnClick.Handle(this, &CreditsScreen::OnDiscord); root_->Add(new Button("www.ppsspp.org", new AnchorLayoutParams(260, 64, 10, NONE, NONE, 10, false)))->OnClick.Handle(this, &CreditsScreen::OnPPSSPPOrg); -@@ -713,20 +705,7 @@ void CreditsScreen::CreateViews() { +@@ -821,20 +813,7 @@ void CreditsScreen::CreateViews() { #if PPSSPP_PLATFORM(ANDROID) || PPSSPP_PLATFORM(IOS) root_->Add(new Button(cr->T("Share PPSSPP"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, rightYOffset + 158, false)))->OnClick.Handle(this, &CreditsScreen::OnShare); #endif @@ -288,7 +389,7 @@ index 901a5fb09..9d067aee6 100644 } UI::EventReturn CreditsScreen::OnTwitter(UI::EventParams &e) { -@@ -916,11 +895,7 @@ void CreditsScreen::render() { +@@ -1024,11 +1003,7 @@ void CreditsScreen::render() { // TODO: This is kinda ugly, done on every frame... char temp[256]; @@ -319,10 +420,37 @@ index 29afda806..b7028fc0c 100644 return true; default: diff --git a/Windows/MainWindowMenu.cpp b/Windows/MainWindowMenu.cpp -index c0d790e06..e8de4f956 100644 +index 006fed4f4..4761171ff 100644 --- a/Windows/MainWindowMenu.cpp +++ b/Windows/MainWindowMenu.cpp -@@ -1395,7 +1395,7 @@ namespace MainWindow { +@@ -136,7 +136,6 @@ namespace MainWindow { + + const std::wstring visitMainWebsite = ConvertUTF8ToWString(des->T("www.ppsspp.org")); + const std::wstring visitForum = ConvertUTF8ToWString(des->T("PPSSPP Forums")); +- const std::wstring buyGold = ConvertUTF8ToWString(des->T("Buy Gold")); + const std::wstring gitHub = ConvertUTF8ToWString(des->T("GitHub")); + const std::wstring discord = ConvertUTF8ToWString(des->T("Discord")); + const std::wstring aboutPPSSPP = ConvertUTF8ToWString(des->T("About PPSSPP...")); +@@ -147,7 +146,6 @@ namespace MainWindow { + AppendMenu(helpMenu, MF_STRING | MF_BYCOMMAND, ID_HELP_OPENWEBSITE, visitMainWebsite.c_str()); + AppendMenu(helpMenu, MF_STRING | MF_BYCOMMAND, ID_HELP_OPENFORUM, visitForum.c_str()); + // Repeat the process for other languages, if necessary. +- AppendMenu(helpMenu, MF_STRING | MF_BYCOMMAND, ID_HELP_BUYGOLD, buyGold.c_str()); + AppendMenu(helpMenu, MF_STRING | MF_BYCOMMAND, ID_HELP_GITHUB, gitHub.c_str()); + AppendMenu(helpMenu, MF_STRING | MF_BYCOMMAND, ID_HELP_DISCORD, discord.c_str()); + AppendMenu(helpMenu, MF_SEPARATOR, 0, 0); +@@ -1015,10 +1013,6 @@ namespace MainWindow { + ShellExecute(NULL, L"open", L"https://www.ppsspp.org/", NULL, NULL, SW_SHOWNORMAL); + break; + +- case ID_HELP_BUYGOLD: +- ShellExecute(NULL, L"open", L"https://central.ppsspp.org/buygold", NULL, NULL, SW_SHOWNORMAL); +- break; +- + case ID_HELP_OPENFORUM: + ShellExecute(NULL, L"open", L"https://forums.ppsspp.org/", NULL, NULL, SW_SHOWNORMAL); + break; +@@ -1397,7 +1391,7 @@ namespace MainWindow { { W32Util::CenterWindow(hDlg); HWND versionBox = GetDlgItem(hDlg, IDC_VERSION); @@ -331,8 +459,24 @@ index c0d790e06..e8de4f956 100644 windowText.append(PPSSPP_GIT_VERSION); SetWindowText(versionBox, ConvertUTF8ToWString(windowText).c_str()); } +diff --git a/Windows/WindowsHost.cpp b/Windows/WindowsHost.cpp +index 610b79890..3d5926fce 100644 +--- a/Windows/WindowsHost.cpp ++++ b/Windows/WindowsHost.cpp +@@ -155,11 +155,7 @@ void WindowsHost::ShutdownGraphics() { + } + + void WindowsHost::SetWindowTitle(const char *message) { +-#ifdef GOLD +- const char *name = "PPSSPP Gold "; +-#else + const char *name = "PPSSPP "; +-#endif + std::wstring winTitle = ConvertUTF8ToWString(std::string(name) + PPSSPP_GIT_VERSION); + if (message != nullptr) { + winTitle.append(ConvertUTF8ToWString(" - ")); diff --git a/Windows/main.cpp b/Windows/main.cpp -index ecfe18fa4..3261151d2 100644 +index 9395233e2..90abec570 100644 --- a/Windows/main.cpp +++ b/Windows/main.cpp @@ -304,12 +304,6 @@ bool System_GetPropertyBool(SystemProperty prop) { @@ -348,13 +492,25 @@ index ecfe18fa4..3261151d2 100644 case SYSPROP_CAN_JIT: return true; default: +diff --git a/Windows/resource.h b/Windows/resource.h +index ce21b3a85..1f8002c10 100644 +--- a/Windows/resource.h ++++ b/Windows/resource.h +@@ -322,7 +322,6 @@ + // Dummy option to let the buffered rendering hotkey cycle through all the options. + #define ID_OPTIONS_BUFFEREDRENDERINGDUMMY 40500 + #define IDC_STEPOUT 40501 +-#define ID_HELP_BUYGOLD 40502 + + #define IDC_STATIC -1 + diff --git a/android/jni/app-android.cpp b/android/jni/app-android.cpp -index 2fad16224..8ed6dd9cd 100644 +index df395e304..cebdf5804 100644 --- a/android/jni/app-android.cpp +++ b/android/jni/app-android.cpp -@@ -490,12 +490,6 @@ bool System_GetPropertyBool(SystemProperty prop) { - case SYSPROP_HAS_FOLDER_BROWSER: - // Uses OPEN_DOCUMENT_TREE to let you select a folder. +@@ -458,12 +458,6 @@ bool System_GetPropertyBool(SystemProperty prop) { + // Doesn't actually mean it's usable though, in many early versions of Android + // this dialog is complete garbage and only lets you select subfolders of the Downloads folder. return androidVersion >= 21; // when ACTION_OPEN_DOCUMENT_TREE was added - case SYSPROP_APP_GOLD: -#ifdef GOLD @@ -383,5 +539,5 @@ index e53b7c7ab..fe69647ed 100644 return g_jitAvailable; -- -2.31.1 +2.34.0 diff --git a/gnu/packages/patches/pulseview-glib-2.68.patch b/gnu/packages/patches/pulseview-glib-2.68.patch new file mode 100644 index 0000000000..bb49b3656f --- /dev/null +++ b/gnu/packages/patches/pulseview-glib-2.68.patch @@ -0,0 +1,54 @@ +Taken from upstream: +https://github.com/sigrokproject/pulseview/pull/39/commits/fb89dd11f2a4a08b73c498869789e38677181a8d. + +From fb89dd11f2a4a08b73c498869789e38677181a8d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <[email protected]> +Date: Wed, 28 Apr 2021 02:14:47 +0200 +Subject: [PATCH] Fix broken build due to C++ template behind C linkage + +glib/gatomic.h since 2.68 includes type_traits, which causes a compilation +error: +In file included from /usr/include/glib-2.0/glib/gatomic.h:31, + from /usr/include/glib-2.0/glib/gthread.h:32, + from /usr/include/glib-2.0/glib/gasyncqueue.h:32, + from /usr/include/glib-2.0/glib.h:32, + from /usr/include/libsigrokdecode/libsigrokdecode.h:25, + from /home/abuild/rpmbuild/BUILD/pulseview-0.4.2/pv/data/decode/annotation.cpp:21: +/usr/include/c++/10/type_traits:2308:3: error: template with C linkage +2308 | template<typename _CTp, typename _Rp> + +As libsigrokdecode.h declares extern C linkage itself where necessary, +remove it from pulseviews include statements from the last two occasions. +--- + pv/data/decode/annotation.cpp | 2 -- + pv/views/trace/decodetrace.cpp | 2 -- + 2 files changed, 4 deletions(-) + +diff --git a/pv/data/decode/annotation.cpp b/pv/data/decode/annotation.cpp +index 7f233478..f8a5c47b 100644 +--- a/pv/data/decode/annotation.cpp ++++ b/pv/data/decode/annotation.cpp +@@ -17,9 +17,7 @@ + * along with this program; if not, see <http://www.gnu.org/licenses/>. + */ + +-extern "C" { + #include <libsigrokdecode/libsigrokdecode.h> +-} + + #include <cassert> + #include <vector> +diff --git a/pv/views/trace/decodetrace.cpp b/pv/views/trace/decodetrace.cpp +index 409f1d28..888064d0 100644 +--- a/pv/views/trace/decodetrace.cpp ++++ b/pv/views/trace/decodetrace.cpp +@@ -17,9 +17,7 @@ + * along with this program; if not, see <http://www.gnu.org/licenses/>. + */ + +-extern "C" { + #include <libsigrokdecode/libsigrokdecode.h> +-} + + #include <limits> + #include <mutex> diff --git a/gnu/packages/patches/python-pdoc3-tests.patch b/gnu/packages/patches/python-pdoc3-tests.patch new file mode 100644 index 0000000000..a411b300ee --- /dev/null +++ b/gnu/packages/patches/python-pdoc3-tests.patch @@ -0,0 +1,42 @@ +Taken from upstream: https://github.com/pdoc3/pdoc/commit/4aa70de2221a34a3003a7e5f52a9b91965f0e359.patch. + +From 4aa70de2221a34a3003a7e5f52a9b91965f0e359 Mon Sep 17 00:00:00 2001 +From: Spencer Baugh <[email protected]> +Date: Thu, 23 Sep 2021 09:00:25 -0400 +Subject: [PATCH] TST: use explicit ClassWithNew instead of typing.Generic + +typing.Generic doesn't have a __new__ method in 3.9. + +Fixes https://github.com/pdoc3/pdoc/issues/355 +--- + pdoc/test/__init__.py | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/pdoc/test/__init__.py b/pdoc/test/__init__.py +index e8c3d94..8b67ab7 100644 +--- a/pdoc/test/__init__.py ++++ b/pdoc/test/__init__.py +@@ -1043,16 +1043,20 @@ class C2: + + self.assertEqual(pdoc.Class('C2', mod, C2).params(), ['a', 'b', 'c=None', '*', 'd=1', 'e']) + +- class G(typing.Generic[T]): ++ class ClassWithNew: ++ def __new__(self, arg): ++ pass ++ ++ class G(ClassWithNew): + def __init__(self, a, b, c=100): + pass + + self.assertEqual(pdoc.Class('G', mod, G).params(), ['a', 'b', 'c=100']) + +- class G2(typing.Generic[T]): ++ class G2(ClassWithNew): + pass + +- self.assertEqual(pdoc.Class('G2', mod, G2).params(), ['*args', '**kwds']) ++ self.assertEqual(pdoc.Class('G2', mod, G2).params(), ['arg']) + + def test_url(self): + mod = pdoc.Module(EXAMPLE_MODULE) diff --git a/gnu/packages/patches/python-piexif-fix-tests-with-pillow-7.2.patch b/gnu/packages/patches/python-piexif-fix-tests-with-pillow-7.2.patch new file mode 100644 index 0000000000..874264dc25 --- /dev/null +++ b/gnu/packages/patches/python-piexif-fix-tests-with-pillow-7.2.patch @@ -0,0 +1,44 @@ +From 5209b53e9689ce28dcd045f384633378d619718f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan=20Wi=C5=9Bniewski?= <[email protected]> +Date: Thu, 5 Nov 2020 16:18:52 +0100 +Subject: [PATCH] convert IFDRational to tuples in tests + +This fixes tests with Pillow version >= 7.2.0 +--- + tests/s_test.py | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/tests/s_test.py b/tests/s_test.py +index 5d105de..a7cad54 100644 +--- a/tests/s_test.py ++++ b/tests/s_test.py +*************** +*** 9,14 **** +--- 9,15 ---- + import time
+ import unittest
+
++ import PIL
+ from PIL import Image
+ import piexif
+ from piexif import _common, ImageIFD, ExifIFD, GPSIFD, TAGS, InvalidImageDataError
+*************** +*** 580,585 **** +--- 581,597 ---- + # test utility methods----------------------------------------------
+
+ def _compare_value(self, v1, v2):
++ if isinstance(v2, PIL.TiffImagePlugin.IFDRational):
++ v2 = (v2.numerator, v2.denominator)
++ if isinstance(v2, tuple):
++ converted_v2 = []
++ for el in v2:
++ if isinstance(el, PIL.TiffImagePlugin.IFDRational):
++ converted_v2.append((el.numerator, el.denominator))
++ else:
++ converted_v2.append(el)
++ v2 = tuple(converted_v2)
++
+ if type(v1) != type(v2):
+ if isinstance(v1, tuple):
+ self.assertEqual(pack_byte(*v1), v2)
diff --git a/gnu/packages/patches/python-pydot-regression-test.patch b/gnu/packages/patches/python-pydot-regression-test.patch deleted file mode 100644 index d2f0f5996e..0000000000 --- a/gnu/packages/patches/python-pydot-regression-test.patch +++ /dev/null @@ -1,79 +0,0 @@ -This patch is taken from the upstream repository -https://github.com/pydot/pydot/commit/a10ced4d132361027a545a471af4541dea8c5cf5.patch -It should be included in the 1.4.2 release. - - -From a10ced4d132361027a545a471af4541dea8c5cf5 Mon Sep 17 00:00:00 2001 -From: Peter Nowee <[email protected]> -Date: Wed, 26 Jun 2019 15:43:38 +0800 -Subject: [PATCH] Fix multi.dot Graphviz regression test - -Commit d6602ad of 2018-12-01 fixed the regression test broken by commit -2d55978 of 2016-07-01. This revealed that `test/graphs/multi.dot` was -failing. - -`multi.dot` was introduced in commit 2b3f088 of 2010-11-07 together -with many of the other tests still here today. It has not been touched -since. It is a DOT-file containing two digraphs. The regression test -compares the JPEG images rendered from the DOT-file by pydot with those -rendered by Graphviz's dot directly. - -Commit 66734d2 of 2016-07-01 is the actual cause of the failure. It -changed one of the render methods of the regression test, -`_render_with_pydot`, from calculating a single hash for all the JPEG -images to calculating separate hashes for each JPEG image and then -concatenating those hashes in one long string. The other render method, -`_render_with_graphviz`, still calculates a single hash over all data. -For DOT-files that generate only one image the end result is the same, -but because `multi.dot` has two graphs, it produces two images and this -leads to comparing a string of two hashes with one single hash. - -I do not think the change in generating the hash was intentional, for -the following reasons: -- Commit 66734d2 states that its purpose was to adapt the test to an - API change in pydot. It does not mention a deliberate choice to - change the testing method. -- There was no effort to change `_render_with_graphviz` to also produce - multiple hashes. -- Except for easier debugging in case of a failing test with multiple - images (AFAICT, only `multi.dot`), I do not see much added benefit in - checking a concatenation of the hashes of all images vs. checking one - hash of all images together: In both cases the test will fail if one - or more images is rendered differently. -- Given that there were many commits authored that same hour, including - commit 2d55978 which broke the regression tests, I suspect the author - did not run the tests for each individual commit, but only at the end - of that batch, and was therefore also not alerted of this change by - the test suite. - -Assuming that the change was not intended, this commit will now revert -`_render_with_pydot` to the old behavior of calculating a single hash -from all JPEG image data. - -Tested with Debian 9.9, Graphviz 2.38.0-17, Python 2.7.13-2 and 3.5.3-1. - -Fixes https://github.com/pydot/pydot/issues/204. ---- - test/pydot_unittest.py | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/test/pydot_unittest.py b/test/pydot_unittest.py -index 881ee16..64aa856 100644 ---- a/test/pydot_unittest.py -+++ b/test/pydot_unittest.py -@@ -194,11 +194,11 @@ def _render_with_graphviz(self, filename, encoding): - - def _render_with_pydot(self, filename, encoding): - c = pydot.graph_from_dot_file(filename, encoding=encoding) -- sha = '' -+ jpe_data = bytearray() - for g in c: -- jpe_data = g.create(prog=TEST_PROGRAM, format='jpe', encoding=encoding) -- sha += sha256(jpe_data).hexdigest() -- return sha -+ jpe_data.extend(g.create(prog=TEST_PROGRAM, format='jpe', -+ encoding=encoding)) -+ return sha256(jpe_data).hexdigest() - - def test_my_regression_tests(self): - path = os.path.join(test_dir, TESTS_DIR_1) diff --git a/gnu/packages/patches/qemu-CVE-2021-20203.patch b/gnu/packages/patches/qemu-CVE-2021-20203.patch deleted file mode 100644 index 9d2ceaa649..0000000000 --- a/gnu/packages/patches/qemu-CVE-2021-20203.patch +++ /dev/null @@ -1,172 +0,0 @@ -From mboxrd@z Thu Jan 1 00:00:00 1970 -Return-Path: <SRS0=i+5i=HB=nongnu.org=qemu-devel-bounces+qemu-devel=archiver.kernel.org@kernel.org> -X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on - aws-us-west-2-korg-lkml-1.web.codeaurora.org -X-Spam-Level: -X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_INVALID, - DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, - MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNWANTED_LANGUAGE_BODY, - URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 -Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) - by smtp.lore.kernel.org (Postfix) with ESMTP id 87556C433E0 - for <[email protected]>; Sat, 30 Jan 2021 13:20:40 +0000 (UTC) -Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) - (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) - (No client certificate requested) - by mail.kernel.org (Postfix) with ESMTPS id EF26964DE1 - for <[email protected]>; Sat, 30 Jan 2021 13:20:39 +0000 (UTC) -DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF26964DE1 -Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com -Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org -Received: from localhost ([::1]:42488 helo=lists1p.gnu.org) - by lists.gnu.org with esmtp (Exim 4.90_1) - (envelope-from <[email protected]>) - id 1l5qB3-0008CX-02 - for [email protected]; Sat, 30 Jan 2021 08:20:37 -0500 -Received: from eggs.gnu.org ([2001:470:142:3::10]:45174) - by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) - (Exim 4.90_1) (envelope-from <[email protected]>) - id 1l5q9q-0007ld-1c - for [email protected]; Sat, 30 Jan 2021 08:19:22 -0500 -Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:42898) - by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) - (Exim 4.90_1) (envelope-from <[email protected]>) - id 1l5q9k-0007Ia-TV - for [email protected]; Sat, 30 Jan 2021 08:19:21 -0500 -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; - s=mimecast20190719; t=1612012753; - h=from:from:reply-to:subject:subject:date:date:message-id:message-id: - to:to:cc:cc:mime-version:mime-version:content-type:content-type: - content-transfer-encoding:content-transfer-encoding; - bh=7vu4z8M+bFjhFzEuAYsQG4i3APx7aMqv7tFxRRO5+8Q=; - b=egCsTdgVBnRlHnVN84HsSpNOUl/NkqEnGuv9rRdG2AZ1Fee5ZatpJm5zJ7YUW2HvzB4rtO - EaDIKaN1wzf/yHf0CsJ60TPGG3DqQSC/EsTSr2l/GNGq4prDYTXVrS3rXFu9ofByUVvzwU - q9Iy1X1Bh3S21m7jXY0AYx4Tu9Ikq9w= -Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com - [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id - us-mta-588-1JF7mzMfP1KpRpNKj4cAWQ-1; Sat, 30 Jan 2021 08:19:08 -0500 -X-MC-Unique: 1JF7mzMfP1KpRpNKj4cAWQ-1 -Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com - [10.5.11.22]) - (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) - (No client certificate requested) - by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8F0F439380; - Sat, 30 Jan 2021 13:19:07 +0000 (UTC) -Received: from localhost.localdomain (unknown [10.33.36.2]) - by smtp.corp.redhat.com (Postfix) with ESMTPS id 17D581002C11; - Sat, 30 Jan 2021 13:19:04 +0000 (UTC) -From: P J P <[email protected]> -To: Dmitry Fleytman <[email protected]> -Subject: [PATCH] net: vmxnet3: validate configuration values during activate - (CVE-2021-20203) -Date: Sat, 30 Jan 2021 18:46:52 +0530 -Message-Id: <[email protected]> -MIME-Version: 1.0 -X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 -Authentication-Results: relay.mimecast.com; - auth=pass smtp.auth=CUSA124A263 [email protected] -X-Mimecast-Spam-Score: 0 -X-Mimecast-Originator: redhat.com -Content-Transfer-Encoding: 8bit -Content-Type: text/plain; charset="US-ASCII" -Received-SPF: pass client-ip=63.128.21.124; [email protected]; - helo=us-smtp-delivery-124.mimecast.com -X-Spam_score_int: -30 -X-Spam_score: -3.1 -X-Spam_bar: --- -X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.255, - DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, - RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, - SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no -X-Spam_action: no action -X-BeenThere: [email protected] -X-Mailman-Version: 2.1.23 -Precedence: list -List-Id: <qemu-devel.nongnu.org> -List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, - <mailto:[email protected]?subject=unsubscribe> -List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> -List-Post: <mailto:[email protected]> -List-Help: <mailto:[email protected]?subject=help> -List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, - <mailto:[email protected]?subject=subscribe> -Cc: Gaoning Pan <[email protected]>, QEMU Developers <[email protected]>, - Prasad J Pandit <[email protected]> -Errors-To: [email protected] -Sender: "Qemu-devel" -Archived-At: <https://lore.kernel.org/qemu-devel/[email protected]/> -List-Archive: <https://lore.kernel.org/qemu-devel/> - -From: Prasad J Pandit <[email protected]> - -While activating device in vmxnet3_acticate_device(), it does not -validate guest supplied configuration values against predefined -minimum - maximum limits. This may lead to integer overflow or -OOB access issues. Add checks to avoid it. - -Fixes: CVE-2021-20203 -Buglink: https://bugs.launchpad.net/qemu/+bug/1913873 -Reported-by: Gaoning Pan <[email protected]> -Signed-off-by: Prasad J Pandit <[email protected]> ---- - hw/net/vmxnet3.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c -index eff299f629..4a910ca971 100644 ---- a/hw/net/vmxnet3.c -+++ b/hw/net/vmxnet3.c -@@ -1420,6 +1420,7 @@ static void vmxnet3_activate_device(VMXNET3State *s) - vmxnet3_setup_rx_filtering(s); - /* Cache fields from shared memory */ - s->mtu = VMXNET3_READ_DRV_SHARED32(d, s->drv_shmem, devRead.misc.mtu); -+ assert(VMXNET3_MIN_MTU <= s->mtu && s->mtu < VMXNET3_MAX_MTU); - VMW_CFPRN("MTU is %u", s->mtu); - - s->max_rx_frags = -@@ -1473,6 +1474,9 @@ static void vmxnet3_activate_device(VMXNET3State *s) - /* Read rings memory locations for TX queues */ - pa = VMXNET3_READ_TX_QUEUE_DESCR64(d, qdescr_pa, conf.txRingBasePA); - size = VMXNET3_READ_TX_QUEUE_DESCR32(d, qdescr_pa, conf.txRingSize); -+ if (size > VMXNET3_TX_RING_MAX_SIZE) { -+ size = VMXNET3_TX_RING_MAX_SIZE; -+ } - - vmxnet3_ring_init(d, &s->txq_descr[i].tx_ring, pa, size, - sizeof(struct Vmxnet3_TxDesc), false); -@@ -1483,6 +1487,9 @@ static void vmxnet3_activate_device(VMXNET3State *s) - /* TXC ring */ - pa = VMXNET3_READ_TX_QUEUE_DESCR64(d, qdescr_pa, conf.compRingBasePA); - size = VMXNET3_READ_TX_QUEUE_DESCR32(d, qdescr_pa, conf.compRingSize); -+ if (size > VMXNET3_TC_RING_MAX_SIZE) { -+ size = VMXNET3_TC_RING_MAX_SIZE; -+ } - vmxnet3_ring_init(d, &s->txq_descr[i].comp_ring, pa, size, - sizeof(struct Vmxnet3_TxCompDesc), true); - VMXNET3_RING_DUMP(VMW_CFPRN, "TXC", i, &s->txq_descr[i].comp_ring); -@@ -1524,6 +1531,9 @@ static void vmxnet3_activate_device(VMXNET3State *s) - /* RX rings */ - pa = VMXNET3_READ_RX_QUEUE_DESCR64(d, qd_pa, conf.rxRingBasePA[j]); - size = VMXNET3_READ_RX_QUEUE_DESCR32(d, qd_pa, conf.rxRingSize[j]); -+ if (size > VMXNET3_RX_RING_MAX_SIZE) { -+ size = VMXNET3_RX_RING_MAX_SIZE; -+ } - vmxnet3_ring_init(d, &s->rxq_descr[i].rx_ring[j], pa, size, - sizeof(struct Vmxnet3_RxDesc), false); - VMW_CFPRN("RX queue %d:%d: Base: %" PRIx64 ", Size: %d", -@@ -1533,6 +1543,9 @@ static void vmxnet3_activate_device(VMXNET3State *s) - /* RXC ring */ - pa = VMXNET3_READ_RX_QUEUE_DESCR64(d, qd_pa, conf.compRingBasePA); - size = VMXNET3_READ_RX_QUEUE_DESCR32(d, qd_pa, conf.compRingSize); -+ if (size > VMXNET3_RC_RING_MAX_SIZE) { -+ size = VMXNET3_RC_RING_MAX_SIZE; -+ } - vmxnet3_ring_init(d, &s->rxq_descr[i].comp_ring, pa, size, - sizeof(struct Vmxnet3_RxCompDesc), true); - VMW_CFPRN("RXC queue %d: Base: %" PRIx64 ", Size: %d", i, pa, size); --- -2.29.2 - - - diff --git a/gnu/packages/patches/quassel-qt-514-compat.patch b/gnu/packages/patches/quassel-qt-514-compat.patch deleted file mode 100644 index 7a0c42e8aa..0000000000 --- a/gnu/packages/patches/quassel-qt-514-compat.patch +++ /dev/null @@ -1,130 +0,0 @@ -https://github.com/quassel/quassel/commit/579e559a6322209df7cd51c34801fecff5fe734b.patch - -Based on the above patch, with some changes due to how the code has changed -in the time since 0.13.1 was released. - -https://git.archlinux.org/svntogit/community.git/plain/trunk/quassel-0.13.1-qt5.14.patch?h=packages/quassel - -From 579e559a6322209df7cd51c34801fecff5fe734b Mon Sep 17 00:00:00 2001 -From: Manuel Nickschas <[email protected]> -Date: Tue, 7 Jan 2020 18:34:54 +0100 -Subject: [PATCH] common: Disable enum type stream operators for Qt >= 5.14 - -Starting from version 5.14, Qt provides stream operators for enum -types, which collide with the ones we ship in types.h. Disable -Quassel's stream operators when compiling against Qt 5.14 or later. - -Add a unit test that ensures that enum serialization honors the width -of the underlying type. ---- - src/common/types.h | 2 + - tests/common/CMakeLists.txt | 2 + - tests/common/typestest.cpp | 79 +++++++++++++++++++++++++++++++++++++ - 3 files changed, 83 insertions(+) - create mode 100644 tests/common/typestest.cpp - -diff --git a/src/common/types.h b/src/common/types.h -index d3742b788..e2a9aab5e 100644 ---- a/src/common/types.h -+++ b/src/common/types.h -@@ -140,6 +140,7 @@ Q_DECLARE_METATYPE(QHostAddress) - typedef QList<MsgId> MsgIdList; - typedef QList<BufferId> BufferIdList; - -+#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - /** - * Catch-all stream serialization operator for enum types. - * -@@ -169,6 +170,7 @@ QDataStream &operator>>(QDataStream &in, T &value) { - value = static_cast<T>(v); - return in; - } -+#endif - - // Exceptions - -diff --git a/tests/common/typestest.cpp b/tests/common/typestest.cpp -new file mode 100644 -index 000000000..04031c299 ---- /dev/null -+++ b/tests/common/typestest.cpp -@@ -0,0 +1,79 @@ -+/*************************************************************************** -+ * Copyright (C) 2005-2020 by the Quassel Project * -+ * [email protected] * -+ * * -+ * This program 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 2 of the License, or * -+ * (at your option) version 3. * -+ * * -+ * This program 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 program; if not, write to the * -+ * Free Software Foundation, Inc., * -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * -+ ***************************************************************************/ -+ -+#include <cstdint> -+ -+#include <QByteArray> -+#include <QDataStream> -+#include <QObject> -+ -+#include "testglobal.h" -+#include "types.h" -+ -+using namespace ::testing; -+ -+class EnumHolder -+{ -+ Q_GADGET -+ -+public: -+ enum class Enum16 : uint16_t {}; -+ enum class Enum32 : uint32_t {}; -+ -+ enum class EnumQt16 : uint16_t {}; -+ Q_ENUM(EnumQt16) -+ enum class EnumQt32 : uint32_t {}; -+ Q_ENUM(EnumQt32) -+}; -+ -+// Verify that enums are (de)serialized as their underlying type -+TEST(TypesTest, enumSerialization) -+{ -+ QByteArray data; -+ QDataStream out(&data, QIODevice::WriteOnly); -+ -+ // Serialize -+ out << EnumHolder::Enum16(0xabcd); -+ ASSERT_THAT(data.size(), Eq(2)); -+ out << EnumHolder::Enum32(0x123456); -+ ASSERT_THAT(data.size(), Eq(6)); -+ out << EnumHolder::EnumQt16(0x4321); -+ ASSERT_THAT(data.size(), Eq(8)); -+ out << EnumHolder::Enum32(0xfedcba); -+ ASSERT_THAT(data.size(), Eq(12)); -+ ASSERT_THAT(out.status(), Eq(QDataStream::Status::Ok)); -+ -+ // Deserialize -+ QDataStream in(data); -+ EnumHolder::Enum16 enum16; -+ EnumHolder::Enum32 enum32; -+ EnumHolder::EnumQt16 enumQt16; -+ EnumHolder::EnumQt32 enumQt32; -+ in >> enum16 >> enum32 >> enumQt16 >> enumQt32; -+ ASSERT_THAT(in.status(), Eq(QDataStream::Status::Ok)); -+ EXPECT_TRUE(in.atEnd()); -+ -+ EXPECT_THAT((int)enum16, Eq(0xabcd)); -+ EXPECT_THAT((int)enum32, Eq(0x123456)); -+ EXPECT_THAT((int)enumQt16, Eq(0x4321)); -+ EXPECT_THAT((int)enumQt32, Eq(0xfedcba)); -+} -+ -+#include "typestest.moc" diff --git a/gnu/packages/patches/r-httpuv-1.5.5-unvendor-libuv.patch b/gnu/packages/patches/r-httpuv-1.5.5-unvendor-libuv.patch index 0947718059..30c6425477 100644 --- a/gnu/packages/patches/r-httpuv-1.5.5-unvendor-libuv.patch +++ b/gnu/packages/patches/r-httpuv-1.5.5-unvendor-libuv.patch @@ -20,7 +20,7 @@ Removes references to bundled libuv. # To avoid spurious warnings from `R CMD check --as-cran`, about compiler # warning flags like -Werror. -@@ -43,35 +43,5 @@ +@@ -43,49 +43,5 @@ # PKG_CPPFLAGS += -D_GLIBCXX_ASSERTIONS @@ -32,10 +32,18 @@ Removes references to bundled libuv. -libuv/m4/lt~obsolete.m4: libuv/m4/lt_obsolete.m4 - cp -p -f libuv/m4/lt_obsolete.m4 libuv/m4/lt~obsolete.m4 - --# Run ./configure. We need to touch various autotools-related files to avoid --# it trying to run autotools programs again. We also need to make sure --# configure is executable, because on some platforms, calling unzip() in R --# does not preserve the executable bit. +-# Run ./configure to create the Makefile. +-# +-# On systems that do _not_ have automake installed, we need to make sure that +-# configure does not try to run automake, because it will fail. To do that, we +-# we need to touch various autotools-related files so it doesn't try to run +-# autotools programs again. We also need to make sure configure is executable, +-# because on some platforms, calling unzip() in R does not preserve the +-# executable bit. +-# +-# If the system does have automake, then we'll run autogen.sh before configure, +-# as per the official build instructions for libuv. autogen.sh will in turn run +-# aclocal, autoconf, and automake. -# -# It's VERY IMPORTANT that mtime(aclocal.m4) <= mtime(configure), and also -# mtime(aclocal.m4) <= mtime(Makefile.in). On some platforms, passing multiple @@ -45,11 +53,17 @@ Removes references to bundled libuv. -# use "-r aclocal.m4" to ensure that all three files are guaranteed to have -# precisely the same timestamp value. -libuv/Makefile: libuv/m4/lt~obsolete.m4 -- (cd libuv \ -- && touch aclocal.m4 \ -- && touch -r aclocal.m4 configure Makefile.in \ -- && chmod +x configure \ -- && CC="$(CC)" CFLAGS="$(CFLAGS) $(CPICFLAGS) $(C_VISIBILITY)" AR="$(AR)" RANLIB="$(RANLIB)" LDFLAGS="$(LDFLAGS)" ./configure $(CONFIGURE_FLAGS)) +- cd libuv; \ +- if ! command -v automake >/dev/null 2>&1 ; then \ +- echo "automake not found. Touching files so configure will not try to run automake."; \ +- touch aclocal.m4; \ +- touch -r aclocal.m4 configure Makefile.in; \ +- else \ +- echo "automake found. Running autogen.sh."; \ +- sh autogen.sh; \ +- fi; \ +- chmod +x configure; \ +- CC="$(CC)" CFLAGS="$(CFLAGS) $(CPICFLAGS) $(C_VISIBILITY)" AR="$(AR)" RANLIB="$(RANLIB)" LDFLAGS="$(LDFLAGS)" ./configure $(CONFIGURE_FLAGS) - -libuv/.libs/libuv.a: libuv/Makefile - $(MAKE) --directory=libuv \ diff --git a/gnu/packages/patches/ragel-char-signedness.patch b/gnu/packages/patches/ragel-char-signedness.patch new file mode 100644 index 0000000000..b3b2bf958a --- /dev/null +++ b/gnu/packages/patches/ragel-char-signedness.patch @@ -0,0 +1,42 @@ +From 2e638fccd81e96ce09841adc4b295b5ce694ea73 Mon Sep 17 00:00:00 2001 +From: Adrian Thurston <[email protected]> +Date: Sat, 6 Nov 2021 12:20:05 -0700 +Subject: [PATCH] C char type: decide signedness of char based on CHAR_MIN + +Previously had char fixed to signed char, this is not useful on ARM as it does +not align with the host type. Instead, decide at runtime (or probably compile +time) if char is signed or not. +--- + ragel/common.cpp | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/ragel/common.cpp b/ragel/common.cpp +index 8e9f8ed0..55875c06 100644 +--- a/ragel/common.cpp ++++ b/ragel/common.cpp +@@ -27,14 +27,14 @@ + + HostType hostTypesC[] = + { +- { "char", 0, "char", true, true, false, CHAR_MIN, CHAR_MAX, 0, 0, sizeof(char) }, +- { "unsigned", "char", "uchar", false, true, false, 0, 0, 0, UCHAR_MAX, sizeof(unsigned char) }, +- { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, 0, 0, sizeof(short) }, +- { "unsigned", "short", "ushort", false, true, false, 0, 0, 0, USHRT_MAX, sizeof(unsigned short) }, +- { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, 0, 0, sizeof(int) }, +- { "unsigned", "int", "uint", false, true, false, 0, 0, 0, UINT_MAX, sizeof(unsigned int) }, +- { "long", 0, "long", true, true, false, LONG_MIN, LONG_MAX, 0, 0, sizeof(long) }, +- { "unsigned", "long", "ulong", false, true, false, 0, 0, 0, ULONG_MAX, sizeof(unsigned long) } ++ { "char", 0, "char", (CHAR_MIN != 0), true, false, SCHAR_MIN, SCHAR_MAX, 0, UCHAR_MAX, sizeof(char) }, ++ { "unsigned", "char", "uchar", false, true, false, 0, 0, 0, UCHAR_MAX, sizeof(unsigned char) }, ++ { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, 0, 0, sizeof(short) }, ++ { "unsigned", "short", "ushort", false, true, false, 0, 0, 0, USHRT_MAX, sizeof(unsigned short) }, ++ { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, 0, 0, sizeof(int) }, ++ { "unsigned", "int", "uint", false, true, false, 0, 0, 0, UINT_MAX, sizeof(unsigned int) }, ++ { "long", 0, "long", true, true, false, LONG_MIN, LONG_MAX, 0, 0, sizeof(long) }, ++ { "unsigned", "long", "ulong", false, true, false, 0, 0, 0, ULONG_MAX, sizeof(unsigned long) } + }; + + #define S8BIT_MIN -128 +-- +2.33.1 + diff --git a/gnu/packages/patches/shadow-hurd-pctrl.patch b/gnu/packages/patches/shadow-hurd-pctrl.patch deleted file mode 100644 index 2e376e19a9..0000000000 --- a/gnu/packages/patches/shadow-hurd-pctrl.patch +++ /dev/null @@ -1,16 +0,0 @@ -Avoid including sys/prctl.h on the Hurd. - -Upstream status: Not submitted. - ---- shadow-4.8.1/libmisc/idmapping.c.orig 2020-03-07 16:32:05.000000000 -0500 -+++ shadow-4.8.1/libmisc/idmapping.c 2020-03-07 16:32:27.000000000 -0500 -@@ -36,8 +36,8 @@ - #include <stdio.h> - #include "prototypes.h" - #include "idmapping.h" --#include <sys/prctl.h> - #if HAVE_SYS_CAPABILITY_H -+#include <sys/prctl.h> - #include <sys/capability.h> - #endif - diff --git a/gnu/packages/patches/sssd-fix-samba-4.15.3.patch b/gnu/packages/patches/sssd-fix-samba-4.15.3.patch new file mode 100644 index 0000000000..731daa0ed9 --- /dev/null +++ b/gnu/packages/patches/sssd-fix-samba-4.15.3.patch @@ -0,0 +1,523 @@ +From 3ba88c317fd64b69b000adbdf881c88383f325d1 Mon Sep 17 00:00:00 2001 +From: Noel Power <[email protected]> +Date: Tue, 24 Mar 2020 13:37:07 +0000 +Subject: [PATCH] Use ndr_pull_steal_switch_value for modern samba versions +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +commit bc56b10aea999284458dcc293b54cf65288e325d attempted to +fix the build error resulting from removal of 'ndr_pull_get_switch' + +This change uses the new replacement method +'ndr_pull_steal_switch_value' however depending on the samba version +the ndr_pull_steal_switch_value abi is different. + +Note: ndr_pull_steal_switch_value is used since samba 4.10 for + the affected methods + +Note: the following methods have been refreshed from samba-4.12 generated + code; + + o ndr_pull_security_ace_object_type + o ndr_pull_security_ace_object_inherited_type + o ndr_pull_security_ace_object_ctr + +Signed-off-by: Noel Power <[email protected]> + +Reviewed-by: Pavel Březina <[email protected]> +(cherry picked from commit 1fdd8fa2fded1985fbfc6aa67394eebcdbb6a2fc) + +Reviewed-by: Pavel Březina <[email protected]> +--- + src/external/samba.m4 | 9 ++++++- + src/providers/ad/ad_gpo_ndr.c | 45 ++++++++++++++++++++--------------- + 2 files changed, 34 insertions(+), 20 deletions(-) + +diff --git a/src/external/samba.m4 b/src/external/samba.m4 +index 089f602a60..8e06174ead 100644 +--- a/src/external/samba.m4 ++++ b/src/external/samba.m4 +@@ -132,8 +132,15 @@ int main(void) + AC_DEFINE_UNQUOTED(SMB_IDMAP_DOMAIN_HAS_DOM_SID, 1, + [Samba's struct idmap_domain has dom_sid member]) + AC_MSG_NOTICE([Samba's struct idmap_domain has dom_sid member]) ++ if test $samba_minor_version -ge 12 ; then ++ AC_DEFINE_UNQUOTED(SMB_HAS_NEW_NDR_PULL_STEAL_SWITCH, 1, ++ [Samba's new push/pull switch functions]) ++ AC_MSG_NOTICE([Samba has support for new ndr_push_steal_switch_value and ndr_pull_steal_switch_value functions]) ++ else ++ AC_MSG_NOTICE([Samba supports old ndr_pull_steal_switch_value and ndr_pull_steal_switch_value functions]) ++ fi + else + AC_MSG_NOTICE([Samba's struct idmap_domain does not have dom_sid member]) ++ AC_MSG_NOTICE([Samba supports old ndr_pull_steal_switch_value and ndr_pull_steal_switch_value functions]) + fi +- + fi + + SAVE_CFLAGS=$CFLAGS +diff --git a/src/providers/ad/ad_gpo_ndr.c b/src/providers/ad/ad_gpo_ndr.c +index 49c49d71b2..3d389e513d 100644 +--- a/src/providers/ad/ad_gpo_ndr.c ++++ b/src/providers/ad/ad_gpo_ndr.c +@@ -105,9 +105,14 @@ ndr_pull_security_ace_object_type(struct ndr_pull *ndr, + union security_ace_object_type *r) + { + uint32_t level; +- level = ndr_token_peek(&ndr->switch_list, r); + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags); + if (ndr_flags & NDR_SCALARS) { ++ /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */ ++#ifdef SMB_HAS_NEW_NDR_PULL_STEAL_SWITCH ++ NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level)); ++#else ++ level = ndr_pull_steal_switch_value(ndr, r); ++#endif + NDR_CHECK(ndr_pull_union_align(ndr, 4)); + switch (level) { + case SEC_ACE_OBJECT_TYPE_PRESENT: { +@@ -117,14 +122,6 @@ ndr_pull_security_ace_object_type(struct ndr_pull *ndr, + break; } + } + } +- if (ndr_flags & NDR_BUFFERS) { +- switch (level) { +- case SEC_ACE_OBJECT_TYPE_PRESENT: +- break; +- default: +- break; +- } +- } + return NDR_ERR_SUCCESS; + } + +@@ -135,9 +132,14 @@ ndr_pull_security_ace_object_inherited_type(struct ndr_pull *ndr, + union security_ace_object_inherited_type *r) + { + uint32_t level; +- level = ndr_token_peek(&ndr->switch_list, r); + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags); + if (ndr_flags & NDR_SCALARS) { ++ /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */ ++#ifdef SMB_HAS_NEW_NDR_PULL_STEAL_SWITCH ++ NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level)); ++#else ++ level = ndr_pull_steal_switch_value(ndr, r); ++#endif + NDR_CHECK(ndr_pull_union_align(ndr, 4)); + switch (level) { + case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT: { +@@ -149,14 +151,6 @@ ndr_pull_security_ace_object_inherited_type(struct ndr_pull *ndr, + break; } + } + } +- if (ndr_flags & NDR_BUFFERS) { +- switch (level) { +- case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT: +- break; +- default: +- break; +- } +- } + return NDR_ERR_SUCCESS; + } + +@@ -198,9 +192,14 @@ ndr_pull_security_ace_object_ctr(struct ndr_pull *ndr, + union security_ace_object_ctr *r) + { + uint32_t level; +- level = ndr_token_peek(&ndr->switch_list, r); + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags); + if (ndr_flags & NDR_SCALARS) { ++ /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */ ++#ifdef SMB_HAS_NEW_NDR_PULL_STEAL_SWITCH ++ NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level)); ++#else ++ level = ndr_pull_steal_switch_value(ndr, r); ++#endif + NDR_CHECK(ndr_pull_union_align(ndr, 4)); + switch (level) { + case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT: { +@@ -224,6 +223,14 @@ ndr_pull_security_ace_object_ctr(struct ndr_pull *ndr, + } + } + if (ndr_flags & NDR_BUFFERS) { ++ if (!(ndr_flags & NDR_SCALARS)) { ++ /* We didn't get it above, and the token is not needed after this. */ ++#ifdef SMB_HAS_NEW_NDR_PULL_STEAL_SWITCH ++ NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level)); ++#else ++ level = ndr_pull_steal_switch_value(ndr, r); ++#endif ++ } + switch (level) { + case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT: + NDR_CHECK(ndr_pull_security_ace_object +From 5285a1896ee19bb8f1ff752380547bc6d7a43334 Mon Sep 17 00:00:00 2001 +From: Noel Power <[email protected]> +Date: Tue, 24 Mar 2020 18:14:34 +0000 +Subject: [PATCH] ad_gpo_ndr.c: refresh ndr_ methods from samba-4.12 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Noel Power <[email protected]> + +Reviewed-by: Pavel Březina <[email protected]> +(cherry picked from commit c031adde4f532f39845a0efd78693600f1f8b2f4) + +Reviewed-by: Pavel Březina <[email protected]> +--- + src/providers/ad/ad_gpo_ndr.c | 201 ++++++++++++++++++---------------- + 1 file changed, 106 insertions(+), 95 deletions(-) + +diff --git a/src/providers/ad/ad_gpo_ndr.c b/src/providers/ad/ad_gpo_ndr.c +index 3d389e513d..a64b1a0f84 100644 +--- a/src/providers/ad/ad_gpo_ndr.c ++++ b/src/providers/ad/ad_gpo_ndr.c +@@ -177,8 +177,16 @@ ndr_pull_security_ace_object(struct ndr_pull *ndr, + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); + } + if (ndr_flags & NDR_BUFFERS) { ++ NDR_CHECK(ndr_pull_set_switch_value ++ (ndr, ++ &r->type, ++ r->flags & SEC_ACE_OBJECT_TYPE_PRESENT)); + NDR_CHECK(ndr_pull_security_ace_object_type + (ndr, NDR_BUFFERS, &r->type)); ++ NDR_CHECK(ndr_pull_set_switch_value ++ (ndr, ++ &r->inherited_type, ++ r->flags & SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT)); + NDR_CHECK(ndr_pull_security_ace_object_inherited_type + (ndr, NDR_BUFFERS, &r->inherited_type)); + } +@@ -342,7 +350,7 @@ ndr_pull_security_acl(struct ndr_pull *ndr, + (ndr, NDR_SCALARS, &r->revision)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_aces)); +- if (r->num_aces > 1000) { ++ if (r->num_aces > 2000) { + return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); + } + size_aces_0 = r->num_aces; +@@ -408,107 +416,110 @@ ad_gpo_ndr_pull_security_descriptor(struct ndr_pull *ndr, + TALLOC_CTX *_mem_save_sacl_0; + uint32_t _ptr_dacl; + TALLOC_CTX *_mem_save_dacl_0; +- uint32_t _flags_save_STRUCT = ndr->flags; +- uint32_t _relative_save_offset; +- +- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN); +- NDR_PULL_CHECK_FLAGS(ndr, ndr_flags); +- if (ndr_flags & NDR_SCALARS) { +- NDR_CHECK(ndr_pull_align(ndr, 5)); +- NDR_CHECK(ndr_pull_security_descriptor_revision(ndr, ++ { ++ uint32_t _flags_save_STRUCT = ndr->flags; ++ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN); ++ NDR_PULL_CHECK_FLAGS(ndr, ndr_flags); ++ if (ndr_flags & NDR_SCALARS) { ++ NDR_CHECK(ndr_pull_align(ndr, 5)); ++ NDR_CHECK(ndr_pull_security_descriptor_revision(ndr, ++ NDR_SCALARS, ++ &r->revision)); ++ NDR_CHECK(ndr_pull_security_descriptor_type(ndr, + NDR_SCALARS, +- &r->revision)); +- NDR_CHECK(ndr_pull_security_descriptor_type(ndr, +- NDR_SCALARS, +- &r->type)); +- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_owner_sid)); +- if (_ptr_owner_sid) { +- NDR_PULL_ALLOC(ndr, r->owner_sid); +- NDR_CHECK(ndr_pull_relative_ptr1(ndr, +- r->owner_sid, +- _ptr_owner_sid)); +- } else { +- r->owner_sid = NULL; +- } +- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_sid)); +- if (_ptr_group_sid) { +- NDR_PULL_ALLOC(ndr, r->group_sid); +- NDR_CHECK(ndr_pull_relative_ptr1(ndr, +- r->group_sid, +- _ptr_group_sid)); +- } else { +- r->group_sid = NULL; +- } +- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sacl)); +- if (_ptr_sacl) { +- NDR_PULL_ALLOC(ndr, r->sacl); +- NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->sacl, _ptr_sacl)); +- } else { +- r->sacl = NULL; +- } +- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dacl)); +- if (_ptr_dacl) { +- NDR_PULL_ALLOC(ndr, r->dacl); +- NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dacl, _ptr_dacl)); +- } else { +- r->dacl = NULL; +- } +- NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); +- } +- if (ndr_flags & NDR_BUFFERS) { +- if (r->owner_sid) { +- _relative_save_offset = ndr->offset; +- NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->owner_sid)); +- _mem_save_owner_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); +- NDR_PULL_SET_MEM_CTX(ndr, r->owner_sid, 0); +- NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->owner_sid)); +- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_owner_sid_0, 0); +- if (ndr->offset > ndr->relative_highest_offset) { +- ndr->relative_highest_offset = ndr->offset; ++ &r->type)); ++ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_owner_sid)); ++ if (_ptr_owner_sid) { ++ NDR_PULL_ALLOC(ndr, r->owner_sid); ++ NDR_CHECK(ndr_pull_relative_ptr1(ndr, ++ r->owner_sid, ++ _ptr_owner_sid)); ++ } else { ++ r->owner_sid = NULL; + } +- ndr->offset = _relative_save_offset; +- } +- if (r->group_sid) { +- _relative_save_offset = ndr->offset; +- NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->group_sid)); +- _mem_save_group_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); +- NDR_PULL_SET_MEM_CTX(ndr, r->group_sid, 0); +- NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->group_sid)); +- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_sid_0, 0); +- if (ndr->offset > ndr->relative_highest_offset) { +- ndr->relative_highest_offset = ndr->offset; ++ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_sid)); ++ if (_ptr_group_sid) { ++ NDR_PULL_ALLOC(ndr, r->group_sid); ++ NDR_CHECK(ndr_pull_relative_ptr1(ndr, ++ r->group_sid, ++ _ptr_group_sid)); ++ } else { ++ r->group_sid = NULL; + } +- ndr->offset = _relative_save_offset; +- } +- if (r->sacl) { +- _relative_save_offset = ndr->offset; +- NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->sacl)); +- _mem_save_sacl_0 = NDR_PULL_GET_MEM_CTX(ndr); +- NDR_PULL_SET_MEM_CTX(ndr, r->sacl, 0); +- NDR_CHECK(ndr_pull_security_acl(ndr, +- NDR_SCALARS|NDR_BUFFERS, +- r->sacl)); +- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sacl_0, 0); +- if (ndr->offset > ndr->relative_highest_offset) { +- ndr->relative_highest_offset = ndr->offset; ++ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sacl)); ++ if (_ptr_sacl) { ++ NDR_PULL_ALLOC(ndr, r->sacl); ++ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->sacl, _ptr_sacl)); ++ } else { ++ r->sacl = NULL; + } +- ndr->offset = _relative_save_offset; ++ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dacl)); ++ if (_ptr_dacl) { ++ NDR_PULL_ALLOC(ndr, r->dacl); ++ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dacl, _ptr_dacl)); ++ } else { ++ r->dacl = NULL; ++ } ++ NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); + } +- if (r->dacl) { +- _relative_save_offset = ndr->offset; +- NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dacl)); +- _mem_save_dacl_0 = NDR_PULL_GET_MEM_CTX(ndr); +- NDR_PULL_SET_MEM_CTX(ndr, r->dacl, 0); +- NDR_CHECK(ndr_pull_security_acl(ndr, +- NDR_SCALARS|NDR_BUFFERS, +- r->dacl)); +- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dacl_0, 0); +- if (ndr->offset > ndr->relative_highest_offset) { +- ndr->relative_highest_offset = ndr->offset; ++ if (ndr_flags & NDR_BUFFERS) { ++ if (r->owner_sid) { ++ uint32_t _relative_save_offset; ++ _relative_save_offset = ndr->offset; ++ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->owner_sid)); ++ _mem_save_owner_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); ++ NDR_PULL_SET_MEM_CTX(ndr, r->owner_sid, 0); ++ NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->owner_sid)); ++ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_owner_sid_0, 0); ++ if (ndr->offset > ndr->relative_highest_offset) { ++ ndr->relative_highest_offset = ndr->offset; ++ } ++ ndr->offset = _relative_save_offset; ++ } ++ if (r->group_sid) { ++ uint32_t _relative_save_offset; ++ _relative_save_offset = ndr->offset; ++ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->group_sid)); ++ _mem_save_group_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); ++ NDR_PULL_SET_MEM_CTX(ndr, r->group_sid, 0); ++ NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->group_sid)); ++ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_sid_0, 0); ++ if (ndr->offset > ndr->relative_highest_offset) { ++ ndr->relative_highest_offset = ndr->offset; ++ } ++ ndr->offset = _relative_save_offset; ++ } ++ if (r->sacl) { ++ uint32_t _relative_save_offset; ++ _relative_save_offset = ndr->offset; ++ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->sacl)); ++ _mem_save_sacl_0 = NDR_PULL_GET_MEM_CTX(ndr); ++ NDR_PULL_SET_MEM_CTX(ndr, r->sacl, 0); ++ NDR_CHECK(ndr_pull_security_acl(ndr, ++ NDR_SCALARS|NDR_BUFFERS, ++ r->sacl)); ++ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sacl_0, 0); ++ if (ndr->offset > ndr->relative_highest_offset) { ++ ndr->relative_highest_offset = ndr->offset; ++ } ++ ndr->offset = _relative_save_offset; ++ } ++ if (r->dacl) { ++ uint32_t _relative_save_offset; ++ _relative_save_offset = ndr->offset; ++ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dacl)); ++ _mem_save_dacl_0 = NDR_PULL_GET_MEM_CTX(ndr); ++ NDR_PULL_SET_MEM_CTX(ndr, r->dacl, 0); ++ NDR_CHECK(ndr_pull_security_acl(ndr, ++ NDR_SCALARS|NDR_BUFFERS, ++ r->dacl)); ++ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dacl_0, 0); ++ if (ndr->offset > ndr->relative_highest_offset) { ++ ndr->relative_highest_offset = ndr->offset; ++ } ++ ndr->offset = _relative_save_offset; + } +- ndr->offset = _relative_save_offset; + } +- + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +From d5809f6f41ec0dc3fd38f9e4ae917a38bf7dfa43 Mon Sep 17 00:00:00 2001 +From: Sumit Bose <[email protected]> +Date: Thu, 28 May 2020 15:02:43 +0200 +Subject: [PATCH] ad_gpo_ndr.c: more ndr updates +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This patch add another update to the ndr code which was previously +updated by commit c031adde4f532f39845a0efd78693600f1f8b2f4 and +1fdd8fa2fded1985fbfc6aa67394eebcdbb6a2fc. + +As missing update in ndr_pull_security_ace() cased +a failure in ad_gpo_parse_sd(). A unit-test for ad_gpo_parse_sd() was +added to prevent similar issues in future. + +Resolves: https://github.com/SSSD/sssd/issues/5183 + +Reviewed-by: Pavel Březina <[email protected]> +(cherry picked from commit a7c755672cd277497da3df4714f6d9457b6ac5ae) + +Reviewed-by: Pavel Březina <[email protected]> +--- + src/providers/ad/ad_gpo_ndr.c | 1 + + src/tests/cmocka/test_ad_gpo.c | 57 ++++++++++++++++++++++++++++++++++ + 2 files changed, 58 insertions(+) + +diff --git a/src/providers/ad/ad_gpo_ndr.c b/src/providers/ad/ad_gpo_ndr.c +index a64b1a0f84..9f040dfb03 100644 +--- a/src/providers/ad/ad_gpo_ndr.c ++++ b/src/providers/ad/ad_gpo_ndr.c +@@ -317,6 +317,7 @@ ndr_pull_security_ace(struct ndr_pull *ndr, + ndr->offset += pad; + } + if (ndr_flags & NDR_BUFFERS) { ++ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->object, r->type)); + NDR_CHECK(ndr_pull_security_ace_object_ctr + (ndr, NDR_BUFFERS, &r->object)); + } +diff --git a/src/tests/cmocka/test_ad_gpo.c b/src/tests/cmocka/test_ad_gpo.c +index 0589adcc3d..97dbe01794 100644 +--- a/src/tests/cmocka/test_ad_gpo.c ++++ b/src/tests/cmocka/test_ad_gpo.c +@@ -329,6 +329,60 @@ void test_ad_gpo_ace_includes_client_sid_false(void **state) + ace_dom_sid, false); + } + ++uint8_t test_sid_data[] = { ++0x01, 0x00, 0x04, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++0x14, 0x00, 0x00, 0x00, 0x04, 0x00, 0x34, 0x01, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, ++0xbd, 0x00, 0x0e, 0x00, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x15, 0x00, 0x00, 0x00, ++0xda, 0x0e, 0xba, 0x60, 0x0f, 0xa2, 0xf4, 0x55, 0xb5, 0x57, 0x47, 0xf8, 0x00, 0x02, 0x00, 0x00, ++0x00, 0x0a, 0x24, 0x00, 0xff, 0x00, 0x0f, 0x00, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, ++0x15, 0x00, 0x00, 0x00, 0xda, 0x0e, 0xba, 0x60, 0x0f, 0xa2, 0xf4, 0x55, 0xb5, 0x57, 0x47, 0xf8, ++0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0xbd, 0x00, 0x0e, 0x00, 0x01, 0x05, 0x00, 0x00, ++0x00, 0x00, 0x00, 0x05, 0x15, 0x00, 0x00, 0x00, 0xda, 0x0e, 0xba, 0x60, 0x0f, 0xa2, 0xf4, 0x55, ++0xb5, 0x57, 0x47, 0xf8, 0x07, 0x02, 0x00, 0x00, 0x00, 0x0a, 0x24, 0x00, 0xff, 0x00, 0x0f, 0x00, ++0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x15, 0x00, 0x00, 0x00, 0xda, 0x0e, 0xba, 0x60, ++0x0f, 0xa2, 0xf4, 0x55, 0xb5, 0x57, 0x47, 0xf8, 0x07, 0x02, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, ++0xbd, 0x00, 0x0e, 0x00, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x15, 0x00, 0x00, 0x00, ++0xda, 0x0e, 0xba, 0x60, 0x0f, 0xa2, 0xf4, 0x55, 0xb5, 0x57, 0x47, 0xf8, 0x00, 0x02, 0x00, 0x00, ++0x00, 0x0a, 0x14, 0x00, 0xff, 0x00, 0x0f, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, ++0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x14, 0x00, 0xff, 0x00, 0x0f, 0x00, 0x01, 0x01, 0x00, 0x00, ++0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x02, 0x14, 0x00, 0x94, 0x00, 0x02, 0x00, ++0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0b, 0x00, 0x00, 0x00, 0x05, 0x02, 0x28, 0x00, ++0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x8f, 0xfd, 0xac, 0xed, 0xb3, 0xff, 0xd1, 0x11, ++0xb4, 0x1d, 0x00, 0xa0, 0xc9, 0x68, 0xf9, 0x39, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, ++0x0b, 0x00, 0x00, 0x00, 0x00, 0x02, 0x14, 0x00, 0x94, 0x00, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, ++0x00, 0x00, 0x00, 0x05, 0x09, 0x00, 0x00, 0x00 ++}; ++ ++void test_ad_gpo_parse_sd(void **state) ++{ ++ int ret; ++ struct security_descriptor *sd = NULL; ++ ++ ret = ad_gpo_parse_sd(test_ctx, NULL, 0, &sd); ++ assert_int_equal(ret, EINVAL); ++ ++ ret = ad_gpo_parse_sd(test_ctx, test_sid_data, sizeof(test_sid_data), &sd); ++ assert_int_equal(ret, EOK); ++ assert_non_null(sd); ++ assert_int_equal(sd->revision, 1); ++ assert_int_equal(sd->type, 39940); ++ assert_null(sd->owner_sid); ++ assert_null(sd->group_sid); ++ assert_null(sd->sacl); ++ assert_non_null(sd->dacl); ++ assert_int_equal(sd->dacl->revision, 4); ++ assert_int_equal(sd->dacl->size, 308); ++ assert_int_equal(sd->dacl->num_aces, 10); ++ assert_int_equal(sd->dacl->aces[0].type, 0); ++ assert_int_equal(sd->dacl->aces[0].flags, 0); ++ assert_int_equal(sd->dacl->aces[0].size, 36); ++ assert_int_equal(sd->dacl->aces[0].access_mask, 917693); ++ /* There are more components and ACEs in the security_descriptor struct ++ * which are not checked here. */ ++ ++ talloc_free(sd); ++} ++ + int main(int argc, const char *argv[]) + { + poptContext pc; +@@ -364,6 +418,9 @@ int main(int argc, const char *argv[]) + cmocka_unit_test_setup_teardown(test_ad_gpo_ace_includes_client_sid_false, + ad_gpo_test_setup, + ad_gpo_test_teardown), ++ cmocka_unit_test_setup_teardown(test_ad_gpo_parse_sd, ++ ad_gpo_test_setup, ++ ad_gpo_test_teardown), + }; + + /* Set debug level to invalid value so we can decide if -d 0 was used. */ diff --git a/gnu/packages/patches/supertux-unbundle-squirrel.patch b/gnu/packages/patches/supertux-unbundle-squirrel.patch index 054183b75f..f504aacfdd 100644 --- a/gnu/packages/patches/supertux-unbundle-squirrel.patch +++ b/gnu/packages/patches/supertux-unbundle-squirrel.patch @@ -1,9 +1,8 @@ -diff -ur a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt 2019-05-24 17:58:19.693090158 -0400 -+++ b/CMakeLists.txt 2019-05-24 17:57:43.349473252 -0400 -@@ -375,44 +375,15 @@ - - include(ConfigureChecks) +--- a/CMakeLists.txt 2022-01-05 18:51:17.828392874 +0100 ++++ b/CMakeLists.txt 2022-01-05 18:54:50.826717830 +0100 +@@ -487,48 +487,15 @@ + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/ppc) + endif() - -## Also build external/squirrel @@ -15,6 +14,9 @@ diff -ur a/CMakeLists.txt b/CMakeLists.txt set(SQUIRREL_PREFIX ${CMAKE_BINARY_DIR}/squirrel/ex) -ExternalProject_Add(squirrel - SOURCE_DIR "${CMAKE_SOURCE_DIR}/external/squirrel/" +- BUILD_BYPRODUCTS +- "${SQUIRREL_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}sqstdlib_static${CMAKE_STATIC_LIBRARY_SUFFIX}" +- "${SQUIRREL_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}squirrel_static${CMAKE_STATIC_LIBRARY_SUFFIX}" - CMAKE_ARGS - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} @@ -22,7 +24,8 @@ diff -ur a/CMakeLists.txt b/CMakeLists.txt - -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} - -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} - -DCMAKE_INSTALL_PREFIX=${SQUIRREL_PREFIX} -- -DINSTALL_INC_DIR=include) +- -DINSTALL_INC_DIR=include +- -DCMAKE_POSITION_INDEPENDENT_CODE=ON) - -if(WIN32) - add_library(squirrel_lib SHARED IMPORTED) diff --git a/gnu/packages/patches/tensorflow-c-api-fix.patch b/gnu/packages/patches/tensorflow-c-api-fix.patch new file mode 100644 index 0000000000..7f39b9f60f --- /dev/null +++ b/gnu/packages/patches/tensorflow-c-api-fix.patch @@ -0,0 +1,312 @@ +From eb61daae91432be0b07bb2f6854887bedfa6fc95 Mon Sep 17 00:00:00 2001 +From: Asim Shankar <[email protected]> +Date: Tue, 26 Jun 2018 00:57:33 -0700 +Subject: [PATCH] [C API]: Bugfix for TF_AddGradients. + +TF_AddGradients could create nodes in the graph with names that conflicted with +other nodes in the graph. This would most clearly happen if TF_AddGradients() +was called twice on the same graph, and could also happen if there were other +nodes in the graph that happened to have "gradients" as a prefix of their name. + +Fix that. + +The added test in c_api_test.cc would fail in the call to TF_SessionRun() with + Node 'gradients/OnesLike' is not unique +without the changes to c_api.cc and c_api_internal.h + +While at it, also fixed a possible name collision bug when using the C++ API +to constructor graphs (using Scope). + +Thanks @karllessard for pointing this out. + +PiperOrigin-RevId: 202087996 +--- + tensorflow/c/c_api.cc | 13 ++++- + tensorflow/c/c_api_test.cc | 65 ++++++++++++++++++++++-- + tensorflow/c/c_test_util.cc | 7 +++ + tensorflow/c/c_test_util.h | 3 ++ + tensorflow/cc/framework/scope.cc | 30 ++++++++--- + tensorflow/cc/framework/scope_internal.h | 3 +- + tensorflow/cc/framework/scope_test.cc | 10 ++++ + 7 files changed, 116 insertions(+), 15 deletions(-) + +diff --git a/tensorflow/c/c_api.cc b/tensorflow/c/c_api.cc +index 09a03639d6fa3..37c8302e08bc3 100644 +--- a/tensorflow/c/c_api.cc ++++ b/tensorflow/c/c_api.cc +@@ -2414,7 +2414,18 @@ void TF_AddGradients(TF_Graph* g, TF_Output* y, int ny, TF_Output* x, int nx, + for (int i = first_new_node_id; i < g->graph.num_node_ids(); ++i) { + Node* n = g->graph.FindNodeId(i); + if (n == nullptr) continue; +- g->name_map[n->name()] = n; ++ // We have a convoluted scheme here: Using the C++ graph construction API ++ // to add potentially many nodes to the graph without running the checks ++ // (such as uniqueness of the names of nodes) we run with other functions ++ // that add a node to the graph (like TF_FinishOperation). ++ if (!g->name_map.insert(std::make_pair(n->name(), n)).second) { ++ status->status = tensorflow::errors::Internal( ++ "BUG: The API allowed construction of a graph with duplicate node " ++ "names (", ++ n->name(), ++ "). This is a bug. Please file an issue at " ++ "https://github.com/tensorflow/tensorflow/issues."); ++ } + } + } + +diff --git a/tensorflow/c/c_api_test.cc b/tensorflow/c/c_api_test.cc +index 577f10c5e69ea..bc04b53fbb7fa 100644 +--- a/tensorflow/c/c_api_test.cc ++++ b/tensorflow/c/c_api_test.cc +@@ -1160,7 +1160,7 @@ TEST(CAPI, GetOpDef) { + } + + void StringVectorToArrays(const std::vector<string>& v, +- std::unique_ptr<const void* []>* ptrs, ++ std::unique_ptr<const void*[]>* ptrs, + std::unique_ptr<size_t[]>* lens) { + ptrs->reset(new const void*[v.size()]); + lens->reset(new size_t[v.size()]); +@@ -1196,7 +1196,7 @@ class CApiColocationTest : public ::testing::Test { + + void SetViaStringList(TF_OperationDescription* desc, + const std::vector<string>& list) { +- std::unique_ptr<const void* []> list_ptrs; ++ std::unique_ptr<const void*[]> list_ptrs; + std::unique_ptr<size_t[]> list_lens; + StringVectorToArrays(list, &list_ptrs, &list_lens); + TF_SetAttrStringList(desc, tensorflow::kColocationAttrName, list_ptrs.get(), +@@ -1700,6 +1700,61 @@ TEST_F(CApiGradientsTest, OpWithNoGradientRegistered_NoGradInputs) { + TestGradientsError(false); + } + ++void ScalarFloatFromTensor(const TF_Tensor* t, float* f) { ++ ASSERT_TRUE(t != nullptr); ++ ASSERT_EQ(TF_FLOAT, TF_TensorType(t)); ++ ASSERT_EQ(0, TF_NumDims(t)); ++ ASSERT_EQ(4, TF_TensorByteSize(t)); ++ float* p = static_cast<float*>(TF_TensorData(t)); ++ *f = *p; ++} ++ ++TEST_F(CApiGradientsTest, MultipleCallsToAddGradients) { ++ const float X = 3.0f, Y = 7.0f; ++ TF_Operation* x = Placeholder(graph_, s_, "x", TF_FLOAT); ++ TF_Operation* y = Placeholder(graph_, s_, "y", TF_FLOAT); ++ TF_Operation* xy = Mul(x, y, graph_, s_, "xy"); ++ TF_Output dxy_dx, dxy_dy; ++ ++ TF_Output outputs[1] = {{xy, 0}}; ++ TF_Output inputs[1] = {{x, 0}}; ++ TF_AddGradients(graph_, outputs, 1, inputs, 1, nullptr, s_, &dxy_dx); ++ ASSERT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_); ++ ++ inputs[0] = {y, 0}; ++ TF_AddGradients(graph_, outputs, 1, inputs, 1, nullptr, s_, &dxy_dy); ++ ASSERT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_); ++ ++ TF_SessionOptions* opts = TF_NewSessionOptions(); ++ TF_Session* sess = TF_NewSession(graph_, opts, s_); ++ TF_DeleteSessionOptions(opts); ++ ASSERT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_); ++ ++ TF_Output feeds[] = {{x, 0}, {y, 0}}; ++ TF_Tensor* feedValues[] = {FloatTensor(X), FloatTensor(Y)}; ++ TF_Output fetches[] = {dxy_dx, dxy_dy}; ++ TF_Tensor* fetchValues[] = {nullptr, nullptr}; ++ ++ TF_SessionRun(sess, nullptr /* run_options */, feeds, feedValues, 2, fetches, ++ fetchValues, 2, nullptr /* target_opers */, 0, ++ nullptr /* run_metadata */, s_); ++ TF_DeleteTensor(feedValues[0]); ++ TF_DeleteTensor(feedValues[1]); ++ ASSERT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_); ++ TF_DeleteSession(sess, s_); ++ ASSERT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_); ++ ++ float dxy_dxValue = 0.0f, dxy_dyValue = 0.0f; ++ ScalarFloatFromTensor(fetchValues[0], &dxy_dxValue); ++ EXPECT_EQ(Y, dxy_dxValue); ++ ++ ScalarFloatFromTensor(fetchValues[1], &dxy_dyValue); ++ EXPECT_EQ(X, dxy_dyValue); ++ ++ TF_DeleteTensor(fetchValues[0]); ++ TF_DeleteTensor(fetchValues[1]); ++} ++ + // REGISTER_OP for CApiAttributesTest test cases. + // Registers two ops, each with a single attribute called 'v'. + // The attribute in one op will have a type 'type', the other +@@ -1784,7 +1839,7 @@ TEST_F(CApiAttributesTest, String) { + + TEST_F(CApiAttributesTest, StringList) { + std::vector<string> list = {"bugs", "bunny", "duck"}; +- std::unique_ptr<const void* []> list_ptrs; ++ std::unique_ptr<const void*[]> list_ptrs; + std::unique_ptr<size_t[]> list_lens; + StringVectorToArrays(list, &list_ptrs, &list_lens); + int list_total_size = 0; +@@ -1800,7 +1855,7 @@ TEST_F(CApiAttributesTest, StringList) { + ASSERT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_); + + EXPECT_TF_META("v", list.size(), TF_ATTR_STRING, list_total_size); +- std::unique_ptr<void* []> values(new void*[list.size()]); ++ std::unique_ptr<void*[]> values(new void*[list.size()]); + std::unique_ptr<size_t[]> lens(new size_t[list.size()]); + std::unique_ptr<char[]> storage(new char[list_total_size]); + TF_OperationGetAttrStringList(oper, "v", values.get(), lens.get(), +@@ -2025,7 +2080,7 @@ TEST_F(CApiAttributesTest, TensorShapeProtoList) { + tensorflow::PartialTensorShape(pts2).AsProto(&proto); + proto.SerializeToString(&bytes2); + +- std::unique_ptr<const void* []> list_ptrs; ++ std::unique_ptr<const void*[]> list_ptrs; + std::unique_ptr<size_t[]> list_lens; + const std::vector<string> list = {bytes1, bytes2}; + StringVectorToArrays(list, &list_ptrs, &list_lens); +diff --git a/tensorflow/c/c_test_util.cc b/tensorflow/c/c_test_util.cc +index f3b28c1708129..24eb6c069b213 100644 +--- a/tensorflow/c/c_test_util.cc ++++ b/tensorflow/c/c_test_util.cc +@@ -216,6 +216,13 @@ TF_Operation* Min(TF_Operation* l, TF_Operation* r, TF_Graph* graph, + return MinWithDevice(l, r, graph, /*op_device=*/"", s, name); + } + ++TF_Operation* Mul(TF_Operation* l, TF_Operation* r, TF_Graph* graph, ++ TF_Status* s, const char* name) { ++ TF_Operation* op; ++ BinaryOpHelper("Mul", l, r, graph, s, name, &op, "", true); ++ return op; ++} ++ + TF_Operation* Add(TF_Output l, TF_Output r, TF_Graph* graph, TF_Status* s, + const char* name) { + TF_OperationDescription* desc = TF_NewOperation(graph, "AddN", name); +diff --git a/tensorflow/c/c_test_util.h b/tensorflow/c/c_test_util.h +index c16aba666ee69..38313d647ca93 100644 +--- a/tensorflow/c/c_test_util.h ++++ b/tensorflow/c/c_test_util.h +@@ -80,6 +80,9 @@ TF_Operation* Add(TF_Output l, TF_Output r, TF_Graph* graph, TF_Status* s, + TF_Operation* Min(TF_Operation* l, TF_Operation* r, TF_Graph* graph, + TF_Status* s, const char* name = "min"); + ++TF_Operation* Mul(TF_Operation* l, TF_Operation* r, TF_Graph* graph, ++ TF_Status* s, const char* name = "mul"); ++ + // If `op_device` is non-empty, set the created op on that device. + TF_Operation* MinWithDevice(TF_Operation* l, TF_Operation* r, TF_Graph* graph, + const string& op_device, TF_Status* s, +diff --git a/tensorflow/cc/framework/scope.cc b/tensorflow/cc/framework/scope.cc +index 62a889181e787..8c886f31711eb 100644 +--- a/tensorflow/cc/framework/scope.cc ++++ b/tensorflow/cc/framework/scope.cc +@@ -37,6 +37,11 @@ Scope& Scope::operator=(const Scope& other) { + return *this; + } + ++namespace { ++const char kScopeSeparator[] = "/"; ++const char kSuffixSeparator[] = "_"; ++} // namespace ++ + Scope::Impl::Impl(Graph* graph, Status* status, NameMap* name_map, + ShapeRefiner* refiner, bool disable_shape_inference) + : graph_(graph), +@@ -308,19 +313,23 @@ string Scope::Impl::GetUniqueName(const string& prefix, + return prefix; + } + auto entry = name_map_->find(prefix); +- string unique_name = prefix; + if (entry == name_map_->end()) { + name_map_->insert({prefix, 0}); +- } else { +- unique_name = strings::StrCat(unique_name, "_", ++entry->second); ++ return prefix; + } ++ string unique_name; ++ do { ++ unique_name = strings::StrCat(prefix, kSuffixSeparator, ++entry->second); ++ } while (name_map_->find(unique_name) != name_map_->end()); ++ name_map_->insert({unique_name, 0}); + return unique_name; + } + + string Scope::Impl::GetNameForOp(const string& default_name) const { + const string unique_name = + GetUniqueName(default_name, true /* check_single_use */); +- const string sep = name_.empty() || unique_name.empty() ? "" : "/"; ++ const string sep = ++ name_.empty() || unique_name.empty() ? "" : kScopeSeparator; + return strings::StrCat(name_, sep, unique_name); + } + +@@ -345,7 +354,8 @@ Scope Scope::NewSubScope(const string& child_scope_name) const { + } + const string unique_name = + impl()->GetUniqueName(child_scope_name, false /* check_single_use */); +- const string sep = impl()->name_.empty() || unique_name.empty() ? "" : "/"; ++ const string sep = ++ impl()->name_.empty() || unique_name.empty() ? "" : kScopeSeparator; + return Scope(new Impl(*this, Impl::Tags::ScopeName(), + strings::StrCat(impl()->name_, sep, unique_name), + false /* copy_names */)); +@@ -412,7 +422,7 @@ CompositeOpScopes Scope::GetCompositeOpScopes( + if (!impl()->single_use_scope()) { + Scope child = NewSubScope(impl()->op_name_.empty() ? composite_op_name + : impl()->op_name_); +- const string child_op_sep = impl()->name_.empty() ? "" : "_"; ++ const string child_op_sep = impl()->name_.empty() ? "" : kSuffixSeparator; + const string child_name = + strings::StrCat(impl()->name_, child_op_sep, child.impl()->name_); + return {child, +@@ -435,7 +445,13 @@ class InternalScope { + static Scope NewScope(Graph* graph, Status* status, ShapeRefiner* refiner) { + Scope::Impl::NameMap* name_map = new Scope::Impl::NameMap; + for (const Node* node : graph->nodes()) { +- (*name_map)[node->name()] = 0; ++ const string& name = node->name(); ++ (*name_map)[name] = 0; ++ // Add all name prefixes ('/' separated). ++ size_t idx = -1; ++ while ((idx = name.find(kScopeSeparator, idx + 1)) != string::npos) { ++ (*name_map)[name.substr(0, idx)] = 0; ++ } + } + // We provide null destructors for these shared ptrs (except for name_map) + // since the caller owns them and doesn't want the scope to destroy them. +diff --git a/tensorflow/cc/framework/scope_internal.h b/tensorflow/cc/framework/scope_internal.h +index 8efcfed20d0b8..58adaef2e942a 100644 +--- a/tensorflow/cc/framework/scope_internal.h ++++ b/tensorflow/cc/framework/scope_internal.h +@@ -34,8 +34,7 @@ class Scope::Impl { + // name that has not been used so far in a scope will get no suffix. Later + // uses of the same name will get suffixes _1, _2, _3, etc. Multiple scopes + // can share the same NameMap. For instance, a new scope created using +- // WithControlDependencies() should would share the same NameMap with the +- // parent. ++ // WithControlDependencies() would share the same NameMap with the parent. + typedef std::unordered_map<string, int> NameMap; + + Impl(const std::shared_ptr<Graph>& graph, +diff --git a/tensorflow/cc/framework/scope_test.cc b/tensorflow/cc/framework/scope_test.cc +index 9eca9d3face34..b40b345eb8423 100644 +--- a/tensorflow/cc/framework/scope_test.cc ++++ b/tensorflow/cc/framework/scope_test.cc +@@ -26,6 +26,16 @@ TEST(ScopeTest, BasicNames) { + EXPECT_EQ(root.GetUniqueNameForOp("mul"), "mul"); + } + ++TEST(ScopeTest, OpAndScopeNameCollision) { ++ Scope root = Scope::NewRootScope(); ++ EXPECT_EQ(root.GetUniqueNameForOp("foo"), "foo"); ++ EXPECT_EQ(root.GetUniqueNameForOp("foo"), "foo_1"); ++ EXPECT_EQ(root.GetUniqueNameForOp("foo_1"), "foo_1_1"); ++ EXPECT_EQ(root.GetUniqueNameForOp("foo_2"), "foo_2"); ++ EXPECT_EQ(root.GetUniqueNameForOp("foo"), "foo_3"); ++ EXPECT_EQ(root.GetUniqueNameForOp("foo_2"), "foo_2_1"); ++} ++ + TEST(ScopeTest, HierarchicalNames) { + Scope root = Scope::NewRootScope(); + Scope child = root.NewSubScope("child"); diff --git a/gnu/packages/patches/tootle-glib-object-naming.patch b/gnu/packages/patches/tootle-glib-object-naming.patch new file mode 100644 index 0000000000..08ee23dd8f --- /dev/null +++ b/gnu/packages/patches/tootle-glib-object-naming.patch @@ -0,0 +1,66 @@ +From 0816105028c26965e37c9afc7c598854f3fecde1 Mon Sep 17 00:00:00 2001 +From: Clayton Craft <[email protected]> +Date: Tue, 26 Oct 2021 15:03:25 -0700 +Subject: [PATCH] Adhere to GLib.Object naming conventions for properties + +Vala now validates property names against GLib.Object conventions, this +fixes a compilation error as a result of this enforcement: + +../src/API/Status.vala:27.5-27.23: error: Name `_url' is not valid for a GLib.Object property + public string? _url { get; set; } + ^^^^^^^^^^^^^^^^^^^ + +Relevant Vala change: +https://gitlab.gnome.org/GNOME/vala/-/commit/38d61fbff037687ea4772e6df85c7e22a74b335e + +fixes #337 + +Signed-off-by: Clayton Craft <[email protected]> +--- + src/API/Attachment.vala | 6 +++--- + src/API/Status.vala | 8 ++++---- + 2 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/src/API/Attachment.vala b/src/API/Attachment.vala +index 88bc5bb..35c4018 100644 +--- a/src/API/Attachment.vala ++++ b/src/API/Attachment.vala +@@ -4,10 +4,10 @@ public class Tootle.API.Attachment : Entity, Widgetizable { + public string kind { get; set; default = "unknown"; } + public string url { get; set; } + public string? description { get; set; } +- public string? _preview_url { get; set; } ++ private string? t_preview_url { get; set; } + public string? preview_url { +- set { this._preview_url = value; } +- get { return (this._preview_url == null || this._preview_url == "") ? url : _preview_url; } ++ set { this.t_preview_url = value; } ++ get { return (this.t_preview_url == null || this.t_preview_url == "") ? url : t_preview_url; } + } + + public File? source_file { get; set; } +diff --git a/src/API/Status.vala b/src/API/Status.vala +index 4f92cdb..00e8a9f 100644 +--- a/src/API/Status.vala ++++ b/src/API/Status.vala +@@ -28,16 +28,16 @@ public class Tootle.API.Status : Entity, Widgetizable { + public ArrayList<API.Mention>? mentions { get; set; default = null; } + public ArrayList<API.Attachment>? media_attachments { get; set; default = null; } + +- public string? _url { get; set; } ++ private string? t_url { get; set; } + public string url { + owned get { return this.get_modified_url (); } +- set { this._url = value; } ++ set { this.t_url = value; } + } + string get_modified_url () { +- if (this._url == null) { ++ if (this.t_url == null) { + return this.uri.replace ("/activity", ""); + } +- return this._url; ++ return this.t_url; + } + + public Status formal { diff --git a/gnu/packages/patches/tootle-reason-phrase.patch b/gnu/packages/patches/tootle-reason-phrase.patch new file mode 100644 index 0000000000..72a1d1ecfa --- /dev/null +++ b/gnu/packages/patches/tootle-reason-phrase.patch @@ -0,0 +1,48 @@ +From 858ee78fbebe161a4cdd707a469dc0f045211a51 Mon Sep 17 00:00:00 2001 +From: Max Harmathy <[email protected]> +Date: Wed, 25 Aug 2021 13:05:58 +0200 +Subject: [PATCH] Use reason_phrase instead of get_phrase + +--- + src/Services/Cache.vala | 2 +- + src/Services/Network.vala | 7 +------ + 2 files changed, 2 insertions(+), 7 deletions(-) + +diff --git a/src/Services/Cache.vala b/src/Services/Cache.vala +index 2251697..2ed314e 100644 +--- a/src/Services/Cache.vala ++++ b/src/Services/Cache.vala +@@ -88,7 +88,7 @@ public class Tootle.Cache : GLib.Object { + try { + var code = msg.status_code; + if (code != Soup.Status.OK) { +- var error = network.describe_error (code); ++ var error = msg.reason_phrase; + throw new Oopsie.INSTANCE (@"Server returned $error"); + } + +diff --git a/src/Services/Network.vala b/src/Services/Network.vala +index fa2839c..d0143b0 100644 +--- a/src/Services/Network.vala ++++ b/src/Services/Network.vala +@@ -56,7 +56,7 @@ public class Tootle.Network : GLib.Object { + else if (status == Soup.Status.CANCELLED) + debug ("Message is cancelled. Ignoring callback invocation."); + else +- ecb ((int32) status, describe_error ((int32) status)); ++ ecb ((int32) status, msg.reason_phrase); + }); + } + catch (Error e) { +@@ -65,11 +65,6 @@ public class Tootle.Network : GLib.Object { + } + } + +- public string describe_error (uint code) { +- var reason = Soup.Status.get_phrase (code); +- return @"$code: $reason"; +- } +- + public void on_error (int32 code, string message) { + warning (message); + app.toast (message); diff --git a/gnu/packages/patches/tremc-fix-decodestring.patch b/gnu/packages/patches/tremc-fix-decodestring.patch new file mode 100644 index 0000000000..346f65e611 --- /dev/null +++ b/gnu/packages/patches/tremc-fix-decodestring.patch @@ -0,0 +1,25 @@ +From 79995bc82e81f0429222aab4d90a03440feef057 Mon Sep 17 00:00:00 2001 +From: Matan Ziv-Av <[email protected]> +Date: Mon, 29 Jun 2020 15:18:03 +0300 +Subject: [PATCH] Use base64.decodebytes. + +Based on upstream commit 79995bc82e81f0429222aab4d90a03440feef057 which +confuses several unrelated changes. + +--- + tremc | 29 ++++++++++++++++++++++++++++- + 1 file changed, 28 insertions(+), 1 deletion(-) + +diff --git a/tremc b/tremc +index b47f012..c626fde 100755 +--- a/tremc ++++ b/tremc +@@ -440,7 +443,7 @@ class Transmission(object): + # TAG_TORRENT_DETAILS, but just passing seems to help.(?) + try: + torrent_details = response['arguments']['torrents'][0] +- torrent_details['pieces'] = base64.decodestring(bytes(torrent_details['pieces'], ENCODING)) ++ torrent_details['pieces'] = base64.decodebytes(bytes(torrent_details['pieces'], ENCODING)) + self.torrent_details_cache = torrent_details + self.upgrade_peerlist() + except IndexError: diff --git a/gnu/packages/patches/ungoogled-chromium-system-ffmpeg.patch b/gnu/packages/patches/ungoogled-chromium-system-ffmpeg.patch new file mode 100644 index 0000000000..1472206b02 --- /dev/null +++ b/gnu/packages/patches/ungoogled-chromium-system-ffmpeg.patch @@ -0,0 +1,18 @@ +Alias the av_stream_get_first_dts definition added by Chromium in +their bundled fork. + +Taken from Arch Linux: + + https://github.com/archlinux/svntogit-packages/blob/38fd5d2f2e0ade932aa7a80b7dea26215fc41854/trunk/unbundle-ffmpeg-av_stream_get_first_dts.patch + +diff --git a/build/linux/unbundle/ffmpeg.gn b/build/linux/unbundle/ffmpeg.gn +--- a/build/linux/unbundle/ffmpeg.gn ++++ b/build/linux/unbundle/ffmpeg.gn +@@ -12,6 +12,7 @@ pkg_config("system_ffmpeg") { + "libavformat", + "libavutil", + ] ++ defines = [ "av_stream_get_first_dts(stream)=stream->first_dts" ] + } + + buildflag_header("ffmpeg_features") { diff --git a/gnu/packages/patches/widelands-add-missing-map-include.patch b/gnu/packages/patches/widelands-add-missing-map-include.patch new file mode 100644 index 0000000000..633731bea2 --- /dev/null +++ b/gnu/packages/patches/widelands-add-missing-map-include.patch @@ -0,0 +1,28 @@ +From 316eaea209754368a57f445ea4dd016ecf8eded6 Mon Sep 17 00:00:00 2001 +From: matthiakl <[email protected]> +Date: Sat, 14 Aug 2021 19:24:08 +0200 +Subject: [PATCH] Added missing direct incude (#5025) + +--- +This patch is from +https://github.com/widelands/widelands/pull/5025 +which has been merged after the release of Widelands 1.0. + + src/network/bufferedconnection.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/network/bufferedconnection.h b/src/network/bufferedconnection.h +index fe974b9e..7e1ecf87 100644 +--- a/src/network/bufferedconnection.h ++++ b/src/network/bufferedconnection.h +@@ -20,6 +20,7 @@ + #ifndef WL_NETWORK_BUFFEREDCONNECTION_H + #define WL_NETWORK_BUFFEREDCONNECTION_H + ++#include <map> + #include <memory> + #include <mutex> + #include <thread> +-- +2.30.2 + diff --git a/gnu/packages/patches/wpa-supplicant-CVE-2021-27803.patch b/gnu/packages/patches/wpa-supplicant-CVE-2021-27803.patch deleted file mode 100644 index 1942bb3d55..0000000000 --- a/gnu/packages/patches/wpa-supplicant-CVE-2021-27803.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 8460e3230988ef2ec13ce6b69b687e941f6cdb32 Mon Sep 17 00:00:00 2001 -From: Jouni Malinen <[email protected]> -Date: Tue, 8 Dec 2020 23:52:50 +0200 -Subject: [PATCH] P2P: Fix a corner case in peer addition based on PD Request - -p2p_add_device() may remove the oldest entry if there is no room in the -peer table for a new peer. This would result in any pointer to that -removed entry becoming stale. A corner case with an invalid PD Request -frame could result in such a case ending up using (read+write) freed -memory. This could only by triggered when the peer table has reached its -maximum size and the PD Request frame is received from the P2P Device -Address of the oldest remaining entry and the frame has incorrect P2P -Device Address in the payload. - -Fix this by fetching the dev pointer again after having called -p2p_add_device() so that the stale pointer cannot be used. - -Fixes: 17bef1e97a50 ("P2P: Add peer entry based on Provision Discovery Request") -Signed-off-by: Jouni Malinen <[email protected]> ---- - src/p2p/p2p_pd.c | 12 +++++------- - 1 file changed, 5 insertions(+), 7 deletions(-) - -diff --git a/src/p2p/p2p_pd.c b/src/p2p/p2p_pd.c -index 3994ec03f86b..05fd593494ef 100644 ---- a/src/p2p/p2p_pd.c -+++ b/src/p2p/p2p_pd.c -@@ -595,14 +595,12 @@ void p2p_process_prov_disc_req(struct p2p_data *p2p, const u8 *sa, - goto out; - } - -+ dev = p2p_get_device(p2p, sa); - if (!dev) { -- dev = p2p_get_device(p2p, sa); -- if (!dev) { -- p2p_dbg(p2p, -- "Provision Discovery device not found " -- MACSTR, MAC2STR(sa)); -- goto out; -- } -+ p2p_dbg(p2p, -+ "Provision Discovery device not found " -+ MACSTR, MAC2STR(sa)); -+ goto out; - } - } else if (msg.wfd_subelems) { - wpabuf_free(dev->info.wfd_subelems); --- -2.25.1 - diff --git a/gnu/packages/patches/wpa-supplicant-CVE-2021-30004.patch b/gnu/packages/patches/wpa-supplicant-CVE-2021-30004.patch deleted file mode 100644 index 8c8ba93355..0000000000 --- a/gnu/packages/patches/wpa-supplicant-CVE-2021-30004.patch +++ /dev/null @@ -1,115 +0,0 @@ -From a0541334a6394f8237a4393b7372693cd7e96f15 Mon Sep 17 00:00:00 2001 -From: Jouni Malinen <[email protected]> -Date: Sat, 13 Mar 2021 18:19:31 +0200 -Subject: ASN.1: Validate DigestAlgorithmIdentifier parameters - -The supported hash algorithms do not use AlgorithmIdentifier parameters. -However, there are implementations that include NULL parameters in -addition to ones that omit the parameters. Previous implementation did -not check the parameters value at all which supported both these cases, -but did not reject any other unexpected information. - -Use strict validation of digest algorithm parameters and reject any -unexpected value when validating a signature. This is needed to prevent -potential forging attacks. - -Signed-off-by: Jouni Malinen <[email protected]> ---- - src/tls/pkcs1.c | 21 +++++++++++++++++++++ - src/tls/x509v3.c | 20 ++++++++++++++++++++ - 2 files changed, 41 insertions(+) - -diff --git a/src/tls/pkcs1.c b/src/tls/pkcs1.c -index bbdb0d7..5761dfe 100644 ---- a/src/tls/pkcs1.c -+++ b/src/tls/pkcs1.c -@@ -244,6 +244,8 @@ int pkcs1_v15_sig_ver(struct crypto_public_key *pk, - os_free(decrypted); - return -1; - } -+ wpa_hexdump(MSG_MSGDUMP, "PKCS #1: DigestInfo", -+ hdr.payload, hdr.length); - - pos = hdr.payload; - end = pos + hdr.length; -@@ -265,6 +267,8 @@ int pkcs1_v15_sig_ver(struct crypto_public_key *pk, - os_free(decrypted); - return -1; - } -+ wpa_hexdump(MSG_MSGDUMP, "PKCS #1: DigestAlgorithmIdentifier", -+ hdr.payload, hdr.length); - da_end = hdr.payload + hdr.length; - - if (asn1_get_oid(hdr.payload, hdr.length, &oid, &next)) { -@@ -273,6 +277,23 @@ int pkcs1_v15_sig_ver(struct crypto_public_key *pk, - os_free(decrypted); - return -1; - } -+ wpa_hexdump(MSG_MSGDUMP, "PKCS #1: Digest algorithm parameters", -+ next, da_end - next); -+ -+ /* -+ * RFC 5754: The correct encoding for the SHA2 algorithms would be to -+ * omit the parameters, but there are implementation that encode these -+ * as a NULL element. Allow these two cases and reject anything else. -+ */ -+ if (da_end > next && -+ (asn1_get_next(next, da_end - next, &hdr) < 0 || -+ !asn1_is_null(&hdr) || -+ hdr.payload + hdr.length != da_end)) { -+ wpa_printf(MSG_DEBUG, -+ "PKCS #1: Unexpected digest algorithm parameters"); -+ os_free(decrypted); -+ return -1; -+ } - - if (!asn1_oid_equal(&oid, hash_alg)) { - char txt[100], txt2[100]; -diff --git a/src/tls/x509v3.c b/src/tls/x509v3.c -index a8944dd..df337ec 100644 ---- a/src/tls/x509v3.c -+++ b/src/tls/x509v3.c -@@ -1964,6 +1964,7 @@ int x509_check_signature(struct x509_certificate *issuer, - os_free(data); - return -1; - } -+ wpa_hexdump(MSG_MSGDUMP, "X509: DigestInfo", hdr.payload, hdr.length); - - pos = hdr.payload; - end = pos + hdr.length; -@@ -1985,6 +1986,8 @@ int x509_check_signature(struct x509_certificate *issuer, - os_free(data); - return -1; - } -+ wpa_hexdump(MSG_MSGDUMP, "X509: DigestAlgorithmIdentifier", -+ hdr.payload, hdr.length); - da_end = hdr.payload + hdr.length; - - if (asn1_get_oid(hdr.payload, hdr.length, &oid, &next)) { -@@ -1992,6 +1995,23 @@ int x509_check_signature(struct x509_certificate *issuer, - os_free(data); - return -1; - } -+ wpa_hexdump(MSG_MSGDUMP, "X509: Digest algorithm parameters", -+ next, da_end - next); -+ -+ /* -+ * RFC 5754: The correct encoding for the SHA2 algorithms would be to -+ * omit the parameters, but there are implementation that encode these -+ * as a NULL element. Allow these two cases and reject anything else. -+ */ -+ if (da_end > next && -+ (asn1_get_next(next, da_end - next, &hdr) < 0 || -+ !asn1_is_null(&hdr) || -+ hdr.payload + hdr.length != da_end)) { -+ wpa_printf(MSG_DEBUG, -+ "X509: Unexpected digest algorithm parameters"); -+ os_free(data); -+ return -1; -+ } - - if (x509_sha1_oid(&oid)) { - if (signature->oid.oid[6] != 5 /* sha-1WithRSAEncryption */) { --- -cgit v0.12 - diff --git a/gnu/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch b/gnu/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch new file mode 100644 index 0000000000..b499a039e8 --- /dev/null +++ b/gnu/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch @@ -0,0 +1,28 @@ +From 3121eeb5e68bedd6e2398f35b9bd60b69709a47e Mon Sep 17 00:00:00 2001 +From: Josselin Poiret <[email protected]> +Date: Tue, 14 Dec 2021 18:49:54 +0100 +Subject: [PATCH] Replace hardcoded command length + +--- + src/screenshot/screenshot.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/screenshot/screenshot.c b/src/screenshot/screenshot.c +index 9df0ea7..5f27681 100644 +--- a/src/screenshot/screenshot.c ++++ b/src/screenshot/screenshot.c +@@ -42,8 +42,9 @@ static bool exec_screenshooter_interactive(const char *path) { + perror("fork"); + return false; + } else if (pid == 0) { +- char cmd[strlen(path) + 25]; +- snprintf(cmd, sizeof(cmd), "grim -g \"$(slurp)\" -- %s", path); ++ const char cmd_fmt[] = "grim -g \"$(slurp)\" -- %s"; ++ char cmd[strlen(path) + sizeof(cmd_fmt)]; ++ snprintf(cmd, sizeof(cmd), cmd_fmt, path); + execl("/bin/sh", "/bin/sh", "-c", cmd, NULL); + perror("execl"); + exit(127); +-- +2.34.0 + diff --git a/gnu/packages/patches/xgboost-use-system-dmlc-core.patch b/gnu/packages/patches/xgboost-use-system-dmlc-core.patch index c654694fec..6b2a1651a5 100644 --- a/gnu/packages/patches/xgboost-use-system-dmlc-core.patch +++ b/gnu/packages/patches/xgboost-use-system-dmlc-core.patch @@ -1,34 +1,35 @@ -From 34167cc105e47589b86b6f62da76e0ab744002dd Mon Sep 17 00:00:00 2001 -From: Vinicius Monego <[email protected]> -Date: Tue, 11 May 2021 19:35:30 -0300 -Subject: [PATCH] Use dmlc-core from Guix. - ---- -This patch is a subset of the following Debian patch: https://sources.debian.org/src/xgboost/1.2.1-1/debian/patches/cmake.patch/ - -Rabit is now developed as part of xgboost, so we don't build it separately. - - CMakeLists.txt | 8 +++----- - 1 file changed, 3 insertions(+), 5 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6cc19fbd..3b42bc17 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -150,11 +150,9 @@ endif (USE_OPENMP) +# This patch was imported from Debian: https://sources.debian.org/src/xgboost/1.5.1-1/debian/patches/cmake-dmlc-core.patch/ +Index: xgboost/CMakeLists.txt +=================================================================== +--- xgboost.orig/CMakeLists.txt ++++ xgboost/CMakeLists.txt +@@ -164,7 +164,9 @@ endif (USE_NCCL) + # dmlc-core msvc_use_static_runtime() -add_subdirectory(${xgboost_SOURCE_DIR}/dmlc-core) --set_target_properties(dmlc PROPERTIES -- CXX_STANDARD 14 -- CXX_STANDARD_REQUIRED ON -- POSITION_INDEPENDENT_CODE ON) +add_library(dmlc SHARED IMPORTED) +find_library(DMLC_LIBRARY dmlc) +set_property(TARGET dmlc PROPERTY IMPORTED_LOCATION "${DMLC_LIBRARY}") + if (MSVC) - target_compile_options(dmlc PRIVATE - -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE) --- -2.31.1 + if (TARGET dmlc_unit_tests) +@@ -222,7 +224,7 @@ set_target_properties(runxgboost PROPERT + #-- End CLI for xgboost + + # Common setup for all targets +-foreach(target xgboost objxgboost dmlc runxgboost) ++foreach(target xgboost objxgboost runxgboost) + xgboost_target_properties(${target}) + xgboost_target_link_libraries(${target}) + xgboost_target_defs(${target}) +@@ -273,7 +275,7 @@ install(DIRECTORY ${xgboost_SOURCE_DIR}/ + # + # https://github.com/dmlc/xgboost/issues/6085 + if (BUILD_STATIC_LIB) +- set(INSTALL_TARGETS xgboost runxgboost objxgboost dmlc) ++ set(INSTALL_TARGETS xgboost runxgboost objxgboost) + else (BUILD_STATIC_LIB) + set(INSTALL_TARGETS xgboost runxgboost) + endif (BUILD_STATIC_LIB) diff --git a/gnu/packages/patches/xmonad-next-dynamic-linking.patch b/gnu/packages/patches/xmonad-next-dynamic-linking.patch new file mode 100644 index 0000000000..a1d71825b6 --- /dev/null +++ b/gnu/packages/patches/xmonad-next-dynamic-linking.patch @@ -0,0 +1,16 @@ +This patch is required for xmonad to make use of shared libraries. +Without it, xmonad will not work since we do not (by default) use +statically linked Haskell libraries. + +index 46a0939..5ad4f8f 100644 +--- a/src/XMonad/Core.hs ++++ b/src/XMonad/Core.hs +@@ -664,6 +664,8 @@ compile dirs method = + where + ghcArgs = [ "--make" + , "xmonad.hs" ++ , "-dynamic" ++ , "-fPIC" + , "-i" -- only look in @lib@ + , "-ilib" + , "-fforce-recomp" diff --git a/gnu/packages/patches/xpra-4.2-install_libs.patch b/gnu/packages/patches/xpra-4.2-install_libs.patch new file mode 100644 index 0000000000..65d489a3b8 --- /dev/null +++ b/gnu/packages/patches/xpra-4.2-install_libs.patch @@ -0,0 +1,29 @@ +This workaround for Gentoo interferes with our use of --no-compile during +the 'install stage. + +--- a/setup.py 2022-01-04 10:10:05.039825000 +0100 ++++ b/setup.py 2022-01-06 15:10:31.952656039 +0100 +@@ -589,8 +589,6 @@ + }) + + def add_cython_ext(*args, **kwargs): +- if "--no-compile" in sys.argv and not ("build" in sys.argv and "install" in sys.argv): +- return + assert cython_ENABLED, "cython compilation is disabled" + if cython_tracing_ENABLED: + kwargs["define_macros"] = [ +@@ -1703,14 +1701,6 @@ + if uinput_ENABLED: + add_data_files("lib/udev/rules.d/", ["fs/lib/udev/rules.d/71-xpra-virtual-pointer.rules"]) + +- #gentoo does weird things, calls --no-compile with build *and* install +- #then expects to find the cython modules!? ie: +- #> python2.7 setup.py build -b build-2.7 install --no-compile \ +- # --root=/var/tmp/portage/x11-wm/xpra-0.7.0/temp/images/2.7 +- #otherwise we use the flags to skip pkgconfig +- if ("--no-compile" in sys.argv or "--skip-build" in sys.argv) and not ("build" in sys.argv and "install" in sys.argv): +- pkgconfig = no_pkgconfig +- + if OSX and "py2app" in sys.argv: + import py2app #@UnresolvedImport + assert py2app is not None diff --git a/gnu/packages/patches/zig-disable-libc-note-test.patch b/gnu/packages/patches/zig-disable-libc-note-test.patch index 4d76139efb..4508cee200 100644 --- a/gnu/packages/patches/zig-disable-libc-note-test.patch +++ b/gnu/packages/patches/zig-disable-libc-note-test.patch @@ -1,14 +1,14 @@ This test fails with "error.CompilationIncorrectlySucceeded". diff --git a/test/compile_errors.zig b/test/compile_errors.zig -index fd1255c..20d5548 100644 +index b1eaa0302..621f9db0a 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig -@@ -2751,15 +2751,15 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { +@@ -2943,15 +2943,15 @@ pub fn addCases(ctx: *TestContext) !void { "tmp.zig:3:5: error: dependency on libc must be explicitly specified in the build command", }); - -- cases.addTest("libc headers note", + +- ctx.testErrStage1("libc headers note", - \\const c = @cImport(@cInclude("stdio.h")); - \\export fn entry() void { - \\ _ = c.printf("hello, world!\n"); @@ -17,15 +17,15 @@ index fd1255c..20d5548 100644 - "tmp.zig:1:11: error: C import failed", - "tmp.zig:1:11: note: libc headers not available; compilation does not link against libc", - }); -+// cases.addTest("libc headers note", -+// \\const c = @cImport(@cInclude("stdio.h")); -+// \\export fn entry() void { -+// \\ _ = c.printf("hello, world!\n"); -+// \\} -+// , &[_][]const u8{ -+// "tmp.zig:1:11: error: C import failed", -+// "tmp.zig:1:11: note: libc headers not available; compilation does not link against libc", -+// }); ++ // ctx.testErrStage1("libc headers note", ++ // \\const c = @cImport(@cInclude("stdio.h")); ++ // \\export fn entry() void { ++ // \\ _ = c.printf("hello, world!\n"); ++ // \\} ++ // , &[_][]const u8{ ++ // "tmp.zig:1:11: error: C import failed", ++ // "tmp.zig:1:11: note: libc headers not available; compilation does not link against libc", ++ // }); } - - cases.addTest("comptime vector overflow shows the index", + + ctx.testErrStage1("comptime vector overflow shows the index", diff --git a/gnu/packages/patches/zig-use-system-paths.patch b/gnu/packages/patches/zig-use-system-paths.patch index 33b7da1e0d..a008beafc2 100644 --- a/gnu/packages/patches/zig-use-system-paths.patch +++ b/gnu/packages/patches/zig-use-system-paths.patch @@ -2,142 +2,147 @@ This patch replaces the OS-specific detection mechanism by one that solely relies on environment variables. This has the benefit that said environment variables can be used as search paths in Guix. -Index: zig-0.8.1/lib/std/zig/system.zig -=================================================================== ---- zig-0.8.1.orig/lib/std/zig/system.zig -+++ zig-0.8.1/lib/std/zig/system.zig -@@ -39,101 +39,57 @@ pub const NativePaths = struct { - }; - errdefer self.deinit(); - -- var is_nix = false; -- if (process.getEnvVarOwned(allocator, "NIX_CFLAGS_COMPILE")) |nix_cflags_compile| { -- defer allocator.free(nix_cflags_compile); +diff --git a/lib/std/zig/system/NativePaths.zig b/lib/std/zig/system/NativePaths.zig +index 8e3e46e48..1ed9d3206 100644 +--- a/lib/std/zig/system/NativePaths.zig ++++ b/lib/std/zig/system/NativePaths.zig +@@ -26,73 +26,42 @@ pub fn detect(allocator: Allocator, native_info: NativeTargetInfo) !NativePaths + }; + errdefer self.deinit(); + +- var is_nix = false; +- if (process.getEnvVarOwned(allocator, "NIX_CFLAGS_COMPILE")) |nix_cflags_compile| { +- defer allocator.free(nix_cflags_compile); - -- is_nix = true; -- var it = mem.tokenize(nix_cflags_compile, " "); -+ // TODO: Support cross-compile paths? -+ if (process.getEnvVarOwned(allocator, "C_INCLUDE_PATH")) |c_include_path| { -+ defer allocator.free(c_include_path); -+ var it = mem.tokenize(c_include_path, ":"); - while (true) { -- const word = it.next() orelse break; -- if (mem.eql(u8, word, "-isystem")) { -- const include_path = it.next() orelse { -- try self.addWarning("Expected argument after -isystem in NIX_CFLAGS_COMPILE"); -- break; -- }; -- try self.addIncludeDir(include_path); -- } else { -- if (mem.startsWith(u8, word, "-frandom-seed=")) { -- continue; -- } -- try self.addWarningFmt("Unrecognized C flag from NIX_CFLAGS_COMPILE: {s}", .{word}); +- is_nix = true; +- var it = mem.tokenize(u8, nix_cflags_compile, " "); ++ // TODO: Support cross-compile paths? ++ if (process.getEnvVarOwned(allocator, "C_INCLUDE_PATH")) |c_include_path| { ++ defer allocator.free(c_include_path); ++ var it = mem.tokenize(u8, c_include_path, ":"); + while (true) { +- const word = it.next() orelse break; +- if (mem.eql(u8, word, "-isystem")) { +- const include_path = it.next() orelse { +- try self.addWarning("Expected argument after -isystem in NIX_CFLAGS_COMPILE"); +- break; +- }; +- try self.addIncludeDir(include_path); +- } else { +- if (mem.startsWith(u8, word, "-frandom-seed=")) { +- continue; - } -+ const dir = it.next() orelse break; -+ try self.addIncludeDir(dir); - } - } else |err| switch (err) { - error.InvalidUtf8 => {}, - error.EnvironmentVariableNotFound => {}, - error.OutOfMemory => |e| return e, +- try self.addWarningFmt("Unrecognized C flag from NIX_CFLAGS_COMPILE: {s}", .{word}); +- } ++ const dir = it.next() orelse break; ++ try self.addIncludeDir(dir); } -- if (process.getEnvVarOwned(allocator, "NIX_LDFLAGS")) |nix_ldflags| { -- defer allocator.free(nix_ldflags); - -- is_nix = true; -- var it = mem.tokenize(nix_ldflags, " "); -+ if (process.getEnvVarOwned(allocator, "CPLUS_INCLUDE_PATH")) |cplus_include_path| { -+ defer allocator.free(cplus_include_path); -+ var it = mem.tokenize(cplus_include_path, ":"); - while (true) { -- const word = it.next() orelse break; -- if (mem.eql(u8, word, "-rpath")) { -- const rpath = it.next() orelse { -- try self.addWarning("Expected argument after -rpath in NIX_LDFLAGS"); -- break; -- }; -- try self.addRPath(rpath); -- } else if (word.len > 2 and word[0] == '-' and word[1] == 'L') { -- const lib_path = word[2..]; -- try self.addLibDir(lib_path); -- } else { -- try self.addWarningFmt("Unrecognized C flag from NIX_LDFLAGS: {s}", .{word}); + } else |err| switch (err) { + error.InvalidUtf8 => {}, + error.EnvironmentVariableNotFound => {}, + error.OutOfMemory => |e| return e, + } +- if (process.getEnvVarOwned(allocator, "NIX_LDFLAGS")) |nix_ldflags| { +- defer allocator.free(nix_ldflags); +- +- is_nix = true; +- var it = mem.tokenize(u8, nix_ldflags, " "); ++ if (process.getEnvVarOwned(allocator, "CPLUS_INCLUDE_PATH")) |cplus_include_path| { ++ defer allocator.free(cplus_include_path); ++ var it = mem.tokenize(u8, cplus_include_path, ":"); + while (true) { +- const word = it.next() orelse break; +- if (mem.eql(u8, word, "-rpath")) { +- const rpath = it.next() orelse { +- try self.addWarning("Expected argument after -rpath in NIX_LDFLAGS"); - break; -- } -+ const dir = it.next() orelse break; -+ try self.addIncludeDir(dir); - } - } else |err| switch (err) { - error.InvalidUtf8 => {}, - error.EnvironmentVariableNotFound => {}, - error.OutOfMemory => |e| return e, +- }; +- try self.addRPath(rpath); +- } else if (word.len > 2 and word[0] == '-' and word[1] == 'L') { +- const lib_path = word[2..]; +- try self.addLibDir(lib_path); +- } else { +- try self.addWarningFmt("Unrecognized C flag from NIX_LDFLAGS: {s}", .{word}); +- break; +- } ++ const dir = it.next() orelse break; ++ try self.addIncludeDir(dir); } -- if (is_nix) { -- return self; -- } + } else |err| switch (err) { + error.InvalidUtf8 => {}, + error.EnvironmentVariableNotFound => {}, + error.OutOfMemory => |e| return e, + } +- if (is_nix) { +- return self; +- } - -- if (comptime Target.current.isDarwin()) { -- try self.addIncludeDir("/usr/include"); -- try self.addIncludeDir("/usr/local/include"); - -- try self.addLibDir("/usr/lib"); -- try self.addLibDir("/usr/local/lib"); +- if (comptime builtin.target.isDarwin()) { +- try self.addIncludeDir("/usr/include"); +- try self.addIncludeDir("/usr/local/include"); - -- try self.addFrameworkDir("/Library/Frameworks"); -- try self.addFrameworkDir("/System/Library/Frameworks"); +- try self.addLibDir("/usr/lib"); +- try self.addLibDir("/usr/local/lib"); - -- return self; -+ if (process.getEnvVarOwned(allocator, "LIBRARY_PATH")) |library_path| { -+ defer allocator.free(library_path); -+ var it = mem.tokenize(library_path, ":"); -+ while (true) { -+ const dir = it.next() orelse break; -+ try self.addLibDir(dir); -+ } -+ } else |err| switch (err) { -+ error.InvalidUtf8 => {}, -+ error.EnvironmentVariableNotFound => {}, -+ error.OutOfMemory => |e| return e, - } - -- if (native_target.os.tag != .windows) { -- const triple = try native_target.linuxTriple(allocator); -- const qual = native_target.cpu.arch.ptrBitWidth(); +- try self.addFrameworkDir("/Library/Frameworks"); +- try self.addFrameworkDir("/System/Library/Frameworks"); - -- // TODO: $ ld --verbose | grep SEARCH_DIR -- // the output contains some paths that end with lib64, maybe include them too? -- // TODO: what is the best possible order of things? -- // TODO: some of these are suspect and should only be added on some systems. audit needed. +- return self; ++ if (process.getEnvVarOwned(allocator, "LIBRARY_PATH")) |library_path| { ++ defer allocator.free(library_path); ++ var it = mem.tokenize(u8, library_path, ":"); ++ while (true) { ++ const dir = it.next() orelse break; ++ try self.addLibDir(dir); ++ } ++ } else |err| switch (err) { ++ error.InvalidUtf8 => {}, ++ error.EnvironmentVariableNotFound => {}, ++ error.OutOfMemory => |e| return e, + } + + if (comptime native_target.os.tag == .solaris) { +@@ -106,32 +75,17 @@ pub fn detect(allocator: Allocator, native_info: NativeTargetInfo) !NativePaths + return self; + } + +- if (native_target.os.tag != .windows) { +- const triple = try native_target.linuxTriple(allocator); +- const qual = native_target.cpu.arch.ptrBitWidth(); - -- try self.addIncludeDir("/usr/local/include"); -- try self.addLibDirFmt("/usr/local/lib{d}", .{qual}); -- try self.addLibDir("/usr/local/lib"); +- // TODO: $ ld --verbose | grep SEARCH_DIR +- // the output contains some paths that end with lib64, maybe include them too? +- // TODO: what is the best possible order of things? +- // TODO: some of these are suspect and should only be added on some systems. audit needed. - -- try self.addIncludeDirFmt("/usr/include/{s}", .{triple}); -- try self.addLibDirFmt("/usr/lib/{s}", .{triple}); +- try self.addIncludeDir("/usr/local/include"); +- try self.addLibDirFmt("/usr/local/lib{d}", .{qual}); +- try self.addLibDir("/usr/local/lib"); - -- try self.addIncludeDir("/usr/include"); -- try self.addLibDirFmt("/lib{d}", .{qual}); -- try self.addLibDir("/lib"); -- try self.addLibDirFmt("/usr/lib{d}", .{qual}); -- try self.addLibDir("/usr/lib"); +- try self.addIncludeDirFmt("/usr/include/{s}", .{triple}); +- try self.addLibDirFmt("/usr/lib/{s}", .{triple}); - -- // example: on a 64-bit debian-based linux distro, with zlib installed from apt: -- // zlib.h is in /usr/include (added above) -- // libz.so.1 is in /lib/x86_64-linux-gnu (added here) -- try self.addLibDirFmt("/lib/{s}", .{triple}); -+ if (process.getEnvVarOwned(allocator, "DYLD_FRAMEWORK_PATH")) |dyld_framework_path| { -+ defer allocator.free(dyld_framework_path); -+ var it = mem.tokenize(dyld_framework_path, ":"); -+ while (true) { -+ const dir = it.next() orelse break; -+ try self.addFrameworkDir(dir); -+ } -+ } else |err| switch (err) { -+ error.InvalidUtf8 => {}, -+ error.EnvironmentVariableNotFound => {}, -+ error.OutOfMemory => |e| return e, - } - - return self; +- try self.addIncludeDir("/usr/include"); +- try self.addLibDirFmt("/lib{d}", .{qual}); +- try self.addLibDir("/lib"); +- try self.addLibDirFmt("/usr/lib{d}", .{qual}); +- try self.addLibDir("/usr/lib"); +- +- // example: on a 64-bit debian-based linux distro, with zlib installed from apt: +- // zlib.h is in /usr/include (added above) +- // libz.so.1 is in /lib/x86_64-linux-gnu (added here) +- try self.addLibDirFmt("/lib/{s}", .{triple}); ++ if (process.getEnvVarOwned(allocator, "DYLD_FRAMEWORK_PATH")) |dyld_framework_path| { ++ defer allocator.free(dyld_framework_path); ++ var it = mem.tokenize(u8, dyld_framework_path, ":"); ++ while (true) { ++ const dir = it.next() orelse break; ++ try self.addFrameworkDir(dir); ++ } ++ } else |err| switch (err) { ++ error.InvalidUtf8 => {}, ++ error.EnvironmentVariableNotFound => {}, ++ error.OutOfMemory => |e| return e, + } + + return self; |