diff options
19 files changed, 117 insertions, 1722 deletions
diff --git a/dev-util/gitlab-ci-linter/files/gitlab-ci-linter-no-strip.patch b/dev-util/gitlab-ci-linter/files/gitlab-ci-linter-no-strip.patch deleted file mode 100644 index 95bb444ddc73..000000000000 --- a/dev-util/gitlab-ci-linter/files/gitlab-ci-linter-no-strip.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/Makefile b/Makefile -index 87b1456..832a1e1 100644 ---- a/Makefile -+++ b/Makefile -@@ -56,9 +56,7 @@ BUILDTIME?=$(shell date +%FT%T%z) - - MAIN_PACKAGE_PATH=$(shell go list . 2> /dev/null)/ - LDFLAGS+=-X $(MAIN_PACKAGE_PATH)config.VERSION=${VERSION} -X $(MAIN_PACKAGE_PATH)config.REVISION=${REVISION} -X $(MAIN_PACKAGE_PATH)config.BUILDTIME=${BUILDTIME} --ifeq ($(DEBUG),0) -- LDFLAGS+=-s -w --else -+ifneq ($(DEBUG),0) - LDFLAGS+=-X $(MAIN_PACKAGE_PATH)config.RELEASE=false - endif - CYCLOTHRESHOLD?=20 diff --git a/dev-util/perf/files/perf-6.11.7-annotate.patch b/dev-util/perf/files/perf-6.11.7-annotate.patch deleted file mode 100644 index ca6e7bb07cba..000000000000 --- a/dev-util/perf/files/perf-6.11.7-annotate.patch +++ /dev/null @@ -1,19 +0,0 @@ - -Fix for bug #943203. - -https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5363c306787c88d41a41493f81b4308643696f6e - -diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c -index a18927d792afc5..3bbf173ad822bc 100644 ---- a/tools/perf/util/symbol.c -+++ b/tools/perf/util/symbol.c -@@ -1931,6 +1931,9 @@ int dso__load(struct dso *dso, struct map *map) - if (next_slot) { - ss_pos++; - -+ if (dso__binary_type(dso) == DSO_BINARY_TYPE__NOT_FOUND) -+ dso__set_binary_type(dso, symtab_type); -+ - if (syms_ss && runtime_ss) - break; - } else { diff --git a/dev-util/perf/files/perf-6.4-libtracefs.patch b/dev-util/perf/files/perf-6.4-libtracefs.patch deleted file mode 100644 index e02e2db96677..000000000000 --- a/dev-util/perf/files/perf-6.4-libtracefs.patch +++ /dev/null @@ -1,23 +0,0 @@ -Let perf find libtraceevent headers when detecting libtracefs - ---- a/tools/build/feature/test-libtracefs.c -+++ b/tools/build/feature/test-libtracefs.c -@@ -1,5 +1,5 @@ - // SPDX-License-Identifier: GPL-2.0 --#include <tracefs/tracefs.h> -+#include <tracefs.h> - - int main(void) - { ---- a/tools/perf/Makefile.config -+++ b/tools/perf/Makefile.config -@@ -185,6 +185,9 @@ endif - FEATURE_CHECK_CFLAGS-libbabeltrace := $(LIBBABELTRACE_CFLAGS) - FEATURE_CHECK_LDFLAGS-libbabeltrace := $(LIBBABELTRACE_LDFLAGS) -lbabeltrace-ctf - -+FEATURE_CHECK_CFLAGS-libtracefs := $(shell $(PKG_CONFIG) --cflags libtracefs) -+FEATURE_CHECK_LDFLAGS-libtracefs := $(shell $(PKG_CONFIG) --libs libtracefs) -+ - ifdef LIBZSTD_DIR - LIBZSTD_CFLAGS := -I$(LIBZSTD_DIR)/lib - LIBZSTD_LDFLAGS := -L$(LIBZSTD_DIR)/lib diff --git a/dev-util/perf/files/perf-6.7-expr.patch b/dev-util/perf/files/perf-6.7-expr.patch deleted file mode 100644 index 84f90c9b9008..000000000000 --- a/dev-util/perf/files/perf-6.7-expr.patch +++ /dev/null @@ -1,24 +0,0 @@ -Ensure versions of libtraceevent and libtracefs have 3 components. - -Fixes: https://bugs.gentoo.org/917559 - ---- a/tools/perf/Makefile.config -+++ b/tools/perf/Makefile.config -@@ -1163,7 +1163,7 @@ ifneq ($(NO_LIBTRACEEVENT),1) - ifeq ($(feature-libtraceevent), 1) - CFLAGS += -DHAVE_LIBTRACEEVENT - EXTLIBS += -ltraceevent -- LIBTRACEEVENT_VERSION := $(shell $(PKG_CONFIG) --modversion libtraceevent) -+ LIBTRACEEVENT_VERSION := $(shell $(PKG_CONFIG) --modversion libtraceevent).0 - LIBTRACEEVENT_VERSION_1 := $(word 1, $(subst ., ,$(LIBTRACEEVENT_VERSION))) - LIBTRACEEVENT_VERSION_2 := $(word 2, $(subst ., ,$(LIBTRACEEVENT_VERSION))) - LIBTRACEEVENT_VERSION_3 := $(word 3, $(subst ., ,$(LIBTRACEEVENT_VERSION))) -@@ -1177,7 +1177,7 @@ ifneq ($(NO_LIBTRACEEVENT),1) - $(call feature_check,libtracefs) - ifeq ($(feature-libtracefs), 1) - EXTLIBS += -ltracefs -- LIBTRACEFS_VERSION := $(shell $(PKG_CONFIG) --modversion libtracefs) -+ LIBTRACEFS_VERSION := $(shell $(PKG_CONFIG) --modversion libtracefs).0 - LIBTRACEFS_VERSION_1 := $(word 1, $(subst ., ,$(LIBTRACEFS_VERSION))) - LIBTRACEFS_VERSION_2 := $(word 2, $(subst ., ,$(LIBTRACEFS_VERSION))) - LIBTRACEFS_VERSION_3 := $(word 3, $(subst ., ,$(LIBTRACEFS_VERSION))) diff --git a/dev-util/rbtools/files/rbtools-5.0-scmtool-crash.patch b/dev-util/rbtools/files/rbtools-5.0-scmtool-crash.patch deleted file mode 100644 index 28783545edef..000000000000 --- a/dev-util/rbtools/files/rbtools-5.0-scmtool-crash.patch +++ /dev/null @@ -1,483 +0,0 @@ -From 36efa0724e3b4d941aa0554b1d82934319d25ce3 Mon Sep 17 00:00:00 2001 -From: David Trowbridge <trowbrds@gmail.com> -Date: Tue, 11 Jun 2024 17:22:15 -0600 -Subject: [PATCH] Use SCMTool IDs to look up repositories when possible. - -Many versions of Review Board currently have a bug where sending an -unknown value in the tool= parameter to the repository list API would -cause a crash. We'll be shipping a fix for that, but unfortunately there -are a variety of released versions where the Git and Clearcase clients -can trigger this crash on servers that do not have Power Pack installed. - -This change fixes the RBTools side to not include the Power Pack SCMTool -names, which will avoid the problem for existing servers. For new -servers, we'll be shipping a server-side fix that fixes the crash, adds -the SCMTool IDs to the capabilities, and allows us to pass SCMTool IDs -rather than names to the repository list API. If we see the IDs in the -capability blob, we can assume that we can pass the IDs, including -potentially unknown IDs. - -This also fixes a problem where we were sometimes accessing the -repository list API twice with exactly the same parameters. - -Testing Done: -- Ran unit tests. -- Verified that the repository list API was accessed using SCMTool names - that did not include potentially missing ones when running against an - older server. -- Verified that the repository list API was accessed with SCMTool IDs - when running against a server with the new API fixes. - -Reviewed at https://reviews.reviewboard.org/r/13973/ ---- - rbtools/clients/base/scmclient.py | 59 +++++++++++++++++++++++++------ - rbtools/clients/bazaar.py | 1 + - rbtools/clients/clearcase.py | 10 +++++- - rbtools/clients/cvs.py | 1 + - rbtools/clients/git.py | 10 +++++- - rbtools/clients/mercurial.py | 1 + - rbtools/clients/perforce.py | 1 + - rbtools/clients/plastic.py | 1 + - rbtools/clients/svn.py | 1 + - rbtools/clients/tfs.py | 1 + - rbtools/commands/base/commands.py | 3 +- - rbtools/commands/setup_repo.py | 25 +++++++++---- - rbtools/utils/repository.py | 58 ++++++++++++++++++++++-------- - 13 files changed, 139 insertions(+), 33 deletions(-) - -diff --git a/rbtools/clients/base/scmclient.py b/rbtools/clients/base/scmclient.py -index c053b91b..9f56c084 100644 ---- a/rbtools/clients/base/scmclient.py -+++ b/rbtools/clients/base/scmclient.py -@@ -9,24 +9,24 @@ - import argparse - import logging - import re --from typing import (Any, Dict, List, Mapping, Optional, Tuple, Union, cast, -- TYPE_CHECKING) -+from typing import (Any, cast, ClassVar, Dict, List, Mapping, Optional, -+ TYPE_CHECKING, Tuple, Union) - - from typing_extensions import NotRequired, TypedDict, final - --from rbtools.api.capabilities import Capabilities --from rbtools.api.resource import (ItemResource, -- ListResource, -- ReviewRequestResource) - from rbtools.clients.base.patch import PatchAuthor, PatchResult --from rbtools.clients.base.repository import RepositoryInfo - from rbtools.clients.errors import SCMClientDependencyError, SCMError - from rbtools.deprecation import RemovedInRBTools50Warning --from rbtools.diffs.tools.base import BaseDiffTool - from rbtools.diffs.tools.registry import diff_tools_registry - from rbtools.utils.process import execute - - if TYPE_CHECKING: -+ from rbtools.api.capabilities import Capabilities -+ from rbtools.api.resource import (ItemResource, -+ ListResource, -+ ReviewRequestResource) -+ from rbtools.clients.base.repository import RepositoryInfo -+ from rbtools.diffs.tools.base import BaseDiffTool - from rbtools.config import RBToolsConfig - - -@@ -281,14 +281,27 @@ class BaseSCMClient(object): - #: str - name: str = '' - -- #: A comma-separated list of SCMClient names on the server -+ #: A comma-separated list of SCMClient names on the server. - #: - #: Version Added: - #: 3.0 - #: - #: Type: - #: str -- server_tool_names: Optional[str] = None -+ server_tool_names: ClassVar[Optional[str]] = None -+ -+ #: A comma-separated list of SCMClient IDs on the server. -+ #: -+ #: This supersedes :py:attr:`server_tool_names` when running on a version -+ #: of Review Board that supports passing tool IDs to the repositories -+ #: list API. -+ #: -+ #: Version Added: -+ #: 5.0.1 -+ #: -+ #: Type: -+ #: str -+ server_tool_ids: ClassVar[Optional[List[str]]] = None - - #: Whether this tool requires a command line diff tool. - #: -@@ -692,6 +705,32 @@ def get_diff_tool(self) -> Optional[BaseDiffTool]: - - return diff_tool - -+ def get_server_tool_names( -+ self, -+ capabilities: Optional[Capabilities], -+ ) -> Optional[str]: -+ """Return the list of supported tool names on the server. -+ -+ Version Added: -+ 5.0.1 -+ -+ Args: -+ capabilities (rbtools.api.capabilities.Capabilities): -+ The server capabilities, if present. -+ -+ Returns: -+ str: -+ A comma-separated list of server-side tool names to match with. -+ """ -+ if (capabilities is not None and -+ capabilities.get_capability('scmtools', 'supported_tools') and -+ self.server_tool_ids is not None): -+ # Versions of Review Board that have this capability allow us to -+ # pass SCMTool IDs rather than names. -+ return ','.join(self.server_tool_ids) -+ else: -+ return self.server_tool_names -+ - def find_matching_server_repository( - self, - repositories: ListResource, -diff --git a/rbtools/clients/bazaar.py b/rbtools/clients/bazaar.py -index 0e39315d..4174c010 100644 ---- a/rbtools/clients/bazaar.py -+++ b/rbtools/clients/bazaar.py -@@ -37,6 +37,7 @@ class BazaarClient(BaseSCMClient): - scmclient_id = 'bazaar' - name = 'Bazaar' - server_tool_names = 'Bazaar' -+ server_tool_ids = ['bazaar'] - supports_diff_exclude_patterns = True - supports_parent_diffs = True - can_branch = True -diff --git a/rbtools/clients/clearcase.py b/rbtools/clients/clearcase.py -index f9c8762e..e2c04633 100644 ---- a/rbtools/clients/clearcase.py -+++ b/rbtools/clients/clearcase.py -@@ -392,7 +392,15 @@ class ClearCaseClient(BaseSCMClient): - - scmclient_id = 'clearcase' - name = 'VersionVault / ClearCase' -- server_tool_names = 'ClearCase,VersionVault / ClearCase' -+ -+ # Review Board versions that use the old names-based repositories/?tool= -+ # API parameter also have a bug where a missing name could cause a -+ # server-side crash. This was making it so servers that did not have Power -+ # Pack were failing when we tried to make a query that included the -+ # VersionVault name. We therefore only include it when we know the server -+ # can use server_tool_ids instead. -+ server_tool_names = 'ClearCase' -+ server_tool_ids = ['clearcase', 'versionvault'] - - requires_diff_tool = True - -diff --git a/rbtools/clients/cvs.py b/rbtools/clients/cvs.py -index 98354e8b..dd2c72ef 100644 ---- a/rbtools/clients/cvs.py -+++ b/rbtools/clients/cvs.py -@@ -28,6 +28,7 @@ class CVSClient(BaseSCMClient): - scmclient_id = 'cvs' - name = 'CVS' - server_tool_names = 'CVS' -+ server_tool_ids = ['cvs'] - supports_diff_exclude_patterns = True - supports_patch_revert = True - -diff --git a/rbtools/clients/git.py b/rbtools/clients/git.py -index f4b96cb6..431fd7c6 100644 ---- a/rbtools/clients/git.py -+++ b/rbtools/clients/git.py -@@ -76,7 +76,15 @@ class GitClient(BaseSCMClient): - - scmclient_id = 'git' - name = 'Git' -- server_tool_names = 'Git,Perforce,Subversion,Team Foundation Server (git)' -+ -+ # Review Board versions that use the old names-based repositories/?tool= -+ # API parameter also have a bug where a missing name could cause a -+ # server-side crash. This was making it so servers that did not have Power -+ # Pack were failing when we tried to make a query that included the TFS-Git -+ # name. We therefore only include it when we know the server can use -+ # server_tool_ids instead. -+ server_tool_names = 'Git,Perforce,Subversion' -+ server_tool_ids = ['git', 'perforce', 'subversion', 'tfs_git'] - - supports_commit_history = True - supports_diff_exclude_patterns = True -diff --git a/rbtools/clients/mercurial.py b/rbtools/clients/mercurial.py -index 2ee473c9..6f1c5ea0 100644 ---- a/rbtools/clients/mercurial.py -+++ b/rbtools/clients/mercurial.py -@@ -64,6 +64,7 @@ class MercurialClient(BaseSCMClient): - scmclient_id = 'mercurial' - name = 'Mercurial' - server_tool_names = 'Mercurial,Subversion' -+ server_tool_ids = ['mercurial', 'subversion'] - - supports_commit_history = True - supports_diff_exclude_patterns = True -diff --git a/rbtools/clients/perforce.py b/rbtools/clients/perforce.py -index f5892073..4f5d7fb1 100644 ---- a/rbtools/clients/perforce.py -+++ b/rbtools/clients/perforce.py -@@ -445,6 +445,7 @@ class PerforceClient(BaseSCMClient): - scmclient_id = 'perforce' - name = 'Perforce' - server_tool_names = 'Perforce' -+ server_tool_ids = ['perforce'] - - requires_diff_tool = True - -diff --git a/rbtools/clients/plastic.py b/rbtools/clients/plastic.py -index c45c7abd..3bec215a 100644 ---- a/rbtools/clients/plastic.py -+++ b/rbtools/clients/plastic.py -@@ -28,6 +28,7 @@ class PlasticClient(BaseSCMClient): - scmclient_id = 'plastic' - name = 'Plastic' - server_tool_names = 'Plastic SCM' -+ server_tool_ids = ['plastic'] - supports_changesets = True - supports_patch_revert = True - -diff --git a/rbtools/clients/svn.py b/rbtools/clients/svn.py -index 34cdffcb..6d0352cc 100644 ---- a/rbtools/clients/svn.py -+++ b/rbtools/clients/svn.py -@@ -52,6 +52,7 @@ class SVNClient(BaseSCMClient): - scmclient_id = 'svn' - name = 'Subversion' - server_tool_names = 'Subversion' -+ server_tool_ids = ['subversion'] - - requires_diff_tool = True - -diff --git a/rbtools/clients/tfs.py b/rbtools/clients/tfs.py -index 2b70fae3..7b02d3de 100644 ---- a/rbtools/clients/tfs.py -+++ b/rbtools/clients/tfs.py -@@ -1321,6 +1321,7 @@ class TFSClient(BaseSCMClient): - scmclient_id = 'tfs' - name = 'Team Foundation Server' - server_tool_names = 'Team Foundation Server' -+ server_tool_ids = ['tfs'] - - requires_diff_tool = True - -diff --git a/rbtools/commands/base/commands.py b/rbtools/commands/base/commands.py -index 3313a689..d4e20f61 100644 ---- a/rbtools/commands/base/commands.py -+++ b/rbtools/commands/base/commands.py -@@ -939,7 +939,8 @@ def initialize(self) -> None: - api_root=self.api_root, - tool=tool, - repository_name=options.repository_name, -- repository_paths=repository_info.path) -+ repository_paths=repository_info.path, -+ capabilities=self.capabilities) - self.repository = repository - - if repository: -diff --git a/rbtools/commands/setup_repo.py b/rbtools/commands/setup_repo.py -index 615bc9e3..9905d1b5 100644 ---- a/rbtools/commands/setup_repo.py -+++ b/rbtools/commands/setup_repo.py -@@ -1,14 +1,20 @@ - """Implementation of rbt setup-repo.""" - -+from __future__ import annotations -+ - import difflib - import os - import textwrap -+from typing import Optional, TYPE_CHECKING, Union - - from rbtools.commands.base import BaseCommand, CommandError - from rbtools.config.loader import CONFIG_FILENAME - from rbtools.utils.console import confirm, confirm_select - from rbtools.utils.repository import get_repository_resource - -+if TYPE_CHECKING: -+ from rbtools.api.resource import ItemResource, RootResource -+ - - class SetupRepo(BaseCommand): - """Configure a repository to point to a Review Board server. -@@ -38,22 +44,27 @@ class SetupRepo(BaseCommand): - BaseCommand.tfs_options, - ] - -- def prompt_rb_repository(self, local_tool_name, server_tool_names, -- repository_paths, api_root): -+ def prompt_rb_repository( -+ self, -+ local_tool_name: str, -+ server_tool_names: Optional[str], -+ repository_paths: Optional[Union[str, list[str]]], -+ api_root: RootResource, -+ ) -> Optional[ItemResource]: - """Interactively prompt to select a matching repository. - - The user is prompted to choose a matching repository found on the - Review Board server. - - Args: -- local_tool_name (unicode): -+ local_tool_name (str): - The local name of the detected tool. - -- server_tool_names (unicode): -+ server_tool_names (str): - A comma-separated list of potentially matching SCMTool names in - the Review Board server. - -- repository_paths (list or unicode, optional): -+ repository_paths (list or str, optional): - A list of potential paths to match for the repository. - - api_root (rbtools.api.resource.RootResource): -@@ -192,9 +203,11 @@ def main(self, *args): - while True: - self.stdout.new_line() - self.stdout.write('Current server: %s' % server) -+ -+ tool_names = tool.get_server_tool_names(self.capabilities) - selected_repo = self.prompt_rb_repository( - local_tool_name=tool.name, -- server_tool_names=tool.server_tool_names, -+ server_tool_names=tool_names, - repository_paths=repository_info.path, - api_root=api_root) - -diff --git a/rbtools/utils/repository.py b/rbtools/utils/repository.py -index d30d2cc0..d3ec280d 100644 ---- a/rbtools/utils/repository.py -+++ b/rbtools/utils/repository.py -@@ -1,17 +1,34 @@ - """Utility functions for working with repositories.""" - -+from __future__ import annotations -+ -+from typing import Optional, TYPE_CHECKING, Union -+ - from rbtools.api.errors import APIError - -+if TYPE_CHECKING: -+ from rbtools.api.capabilities import Capabilities -+ from rbtools.api.resource import ItemResource, RootResource -+ from rbtools.clients.base.repository import RepositoryInfo -+ from rbtools.clients.base.scmclient import BaseSCMClient -+ - --def get_repository_resource(api_root, -- tool=None, -- repository_name=None, -- repository_paths=None): -+def get_repository_resource( -+ api_root: RootResource, -+ tool: Optional[BaseSCMClient] = None, -+ repository_name: Optional[str] = None, -+ repository_paths: Optional[Union[str, list[str]]] = None, -+ capabilities: Optional[Capabilities] = None, -+) -> tuple[Optional[ItemResource], Optional[ItemResource]]: - """Return the API resource for the matching repository on the server. - - Version Added: - 3.0 - -+ Version Changed: -+ 5.0.1: -+ Added the ``capabilities`` argument. -+ - Args: - api_root (rbtools.api.resource.RootResource): - The root resource for the API. -@@ -19,12 +36,15 @@ def get_repository_resource(api_root, - tool (rbtools.clients.base.BaseSCMClient, optional): - The SCM client corresponding to the local working directory. - -- repository_name (unicode, optional): -+ repository_name (str, optional): - An explicit repository name provided by the local configuration. - -- repository_paths (list or unicode, optional): -+ repository_paths (list or str, optional): - A list of potential paths to match for the repository. - -+ capabilities (rbtools.api.capabilities.Capabilities, optional): -+ The capabilities fetched from the server. -+ - Returns: - tuple of rbtools.api.resource.ItemResource: - A 2-tuple of :py:class:`~rbtools.api.resource.ItemResource`. The first -@@ -47,8 +67,11 @@ def _get_info(repository): - 'only_links': 'info,diff_file_attachments', - } - -- if tool and tool.server_tool_names: -- query['tool'] = tool.server_tool_names -+ if tool: -+ server_tool_names = tool.get_server_tool_names(capabilities) -+ -+ if server_tool_names: -+ query['tool'] = server_tool_names - - if repository_name: - query['name'] = repository_name -@@ -70,9 +93,12 @@ def _get_info(repository): - # configured path than the client. In that case, we want to try again - # without filtering by path, and ask each tool to match based on other - # conditions. -- query.pop('path', None) -+ if 'path' in query: -+ query.pop('path', None) - -- all_repositories = api_root.get_repositories(**query) -+ all_repositories = api_root.get_repositories(**query) -+ else: -+ all_repositories = repositories - - if all_repositories.total_results > 0 and tool: - repository, info = tool.find_matching_server_repository( -@@ -93,7 +119,11 @@ def _get_info(repository): - return None, None - - --def get_repository_id(repository_info, api_root, repository_name=None): -+def get_repository_id( -+ repository_info: RepositoryInfo, -+ api_root: RootResource, -+ repository_name: Optional[str] = None, -+) -> Optional[int]: - """Return the ID of a repository from the server. - - This will look up all accessible repositories on the server and try to -@@ -106,18 +136,18 @@ def get_repository_id(repository_info, api_root, repository_name=None): - api_root (rbtools.api.resource.RootResource): - The root resource for the API. - -- repository_name (unicode, optional): -+ repository_name (str, optional): - An explicit repository name provided by local configuration. - - Returns: - int: - The ID of the repository, or ``None`` if not found. - """ -- repository, info = get_repository_resource( -+ repository = get_repository_resource( - api_root, - tool=None, - repository_name=repository_name, -- repository_paths=repository_info.path) -+ repository_paths=repository_info.path)[0] - - if repository: - return repository.id diff --git a/dev-util/unicorn/files/unicorn-2.0.1-configure.patch b/dev-util/unicorn/files/unicorn-2.0.1-configure.patch deleted file mode 100644 index 57f945e08d37..000000000000 --- a/dev-util/unicorn/files/unicorn-2.0.1-configure.patch +++ /dev/null @@ -1,34 +0,0 @@ -From a78d690da54f3afbd3213502c997ba68b29aa404 Mon Sep 17 00:00:00 2001 -From: "Z. Liu" <zhixu.liu@gmail.com> -Date: Tue, 14 Jan 2025 08:47:54 +0800 -Subject: [PATCH] configure: add <sys/timex.h> for clock_adjtime on musl - (#2085) - -for glibc, if _GNU_SOURCE is defined, <time.h> will include <sys/timex.h> -but not for musl, so add "#include <sys/timex.h>" - -although `man clock_adjtime` said "#include <sys/timex.h>", but it won't -work for glibc w/o "#include <time.h>", I don't known why yet. - -PS it seems clock_adjtime is used nowhere? - -Signed-off-by: Z. Liu <zhixu.liu@gmail.com> ---- - qemu/configure | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/qemu/configure b/qemu/configure -index db820ca1..47d4a4c6 100755 ---- a/qemu/configure -+++ b/qemu/configure -@@ -1455,6 +1455,7 @@ fi - clock_adjtime=no - cat > $TMPC <<EOF - #include <time.h> -+#include <sys/timex.h> - - int main(void) - { --- -2.45.2 - diff --git a/dev-util/unicorn/files/unicorn-2.0.1-old-style-declaration.patch b/dev-util/unicorn/files/unicorn-2.0.1-old-style-declaration.patch deleted file mode 100644 index b63ffee0c096..000000000000 --- a/dev-util/unicorn/files/unicorn-2.0.1-old-style-declaration.patch +++ /dev/null @@ -1,45 +0,0 @@ -commit 9a2583e96710ba49a8fd2a4ab87db7212c1e887c -Upstream: https://github.com/unicorn-engine/unicorn/pull/1886 -Author: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de> -Date: Sun Oct 8 13:40:23 2023 +0200 - - fix deprecated storage-class declarations - ---- a/qemu/accel/tcg/cputlb.c -+++ b/qemu/accel/tcg/cputlb.c -@@ -1415,7 +1415,7 @@ load_memop(const void *haddr, MemOp op) - } - } - --static uint64_t inline -+static inline uint64_t - load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi, - uintptr_t retaddr, MemOp op, bool code_read, - FullLoadHelper *full_load) -@@ -1983,7 +1983,7 @@ uint64_t cpu_ldq_data(CPUArchState *env, target_ulong ptr) - * Store Helpers - */ - --static void inline -+static inline void - store_memop(void *haddr, uint64_t val, MemOp op) - { - switch (op) { -@@ -2014,7 +2014,7 @@ store_memop(void *haddr, uint64_t val, MemOp op) - } - } - --static void inline -+static inline void - store_helper(CPUArchState *env, target_ulong addr, uint64_t val, - TCGMemOpIdx oi, uintptr_t retaddr, MemOp op) - { -@@ -2343,7 +2343,7 @@ void helper_be_stq_mmu(CPUArchState *env, target_ulong addr, uint64_t val, - * Store Helpers for cpu_ldst.h - */ - --static void inline -+static inline void - cpu_store_helper(CPUArchState *env, target_ulong addr, uint64_t val, - int mmu_idx, uintptr_t retaddr, MemOp op) // qq - { diff --git a/dev-util/unicorn/files/unicorn-2.0.1-strict-prototypes.patch b/dev-util/unicorn/files/unicorn-2.0.1-strict-prototypes.patch deleted file mode 100644 index d8ae8677d837..000000000000 --- a/dev-util/unicorn/files/unicorn-2.0.1-strict-prototypes.patch +++ /dev/null @@ -1,299 +0,0 @@ -commit 5983b399d84c534ad2f19461dd38f69e70ea9cfb -Upstream: https://github.com/unicorn-engine/unicorn/pull/1886 -Author: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de> -Date: Sun Oct 8 13:39:13 2023 +0200 - - use full prototypes for functions without parameters - ---- a/bindings/ruby/unicorn_gem/ext/unicorn.c -+++ b/bindings/ruby/unicorn_gem/ext/unicorn.c -@@ -31,7 +31,7 @@ VALUE SavedContext = Qnil; - VALUE Hook = Qnil; - - --void Init_unicorn_engine() { -+void Init_unicorn_engine(void) { - rb_require("unicorn_engine/unicorn_const"); - UnicornModule = rb_define_module("UnicornEngine"); - UcError = rb_define_class_under(UnicornModule, "UcError", rb_eStandardError); ---- a/samples/mem_apis.c -+++ b/samples/mem_apis.c -@@ -193,7 +193,7 @@ static void do_nx_demo(bool cause_fault) - uc_close(uc); - } - --static void nx_test() -+static void nx_test(void) - { - printf("NX demo - step 1: show that code runs to completion\n"); - do_nx_demo(false); -@@ -276,7 +276,7 @@ static void do_perms_demo(bool change_perms) - uc_close(uc); - } - --static void perms_test() -+static void perms_test(void) - { - printf("Permissions demo - step 1: show that area is writeable\n"); - do_perms_demo(false); -@@ -355,7 +355,7 @@ static void do_unmap_demo(bool do_unmap) - uc_close(uc); - } - --static void unmap_test() -+static void unmap_test(void) - { - printf("Unmap demo - step 1: show that area is writeable\n"); - do_unmap_demo(false); ---- a/samples/sample_arm.c -+++ b/samples/sample_arm.c -@@ -366,7 +366,7 @@ static void test_thumb_ite_internal(bool step, uint32_t *r2_out, - *r3_out = r3; - } - --static void test_thumb_ite() -+static void test_thumb_ite(void) - { - uint32_t r2, r3; - uint32_t step_r2, step_r3; -@@ -390,7 +390,7 @@ static void test_thumb_ite() - } - } - --static void test_read_sctlr() -+static void test_read_sctlr(void) - { - uc_engine *uc; - uc_err err; ---- a/samples/sample_arm64.c -+++ b/samples/sample_arm64.c -@@ -197,7 +197,7 @@ static void test_arm64eb(void) - uc_close(uc); - } - --static void test_arm64_sctlr() -+static void test_arm64_sctlr(void) - { - uc_engine *uc; - uc_err err; -@@ -248,7 +248,7 @@ static uint32_t hook_mrs(uc_engine *uc, uc_arm64_reg reg, - return 1; - } - --static void test_arm64_hook_mrs() -+static void test_arm64_hook_mrs(void) - { - uc_engine *uc; - uc_err err; ---- a/samples/sample_batch_reg.c -+++ b/samples/sample_batch_reg.c -@@ -49,7 +49,7 @@ void hook_code(uc_engine *uc, uint64_t addr, uint32_t size, void *user_data) - printf("HOOK_CODE: 0x%" PRIx64 ", 0x%x\n", addr, size); - } - --int main() -+int main(void) - { - int i; - uc_hook sys_hook; ---- a/samples/sample_ctl.c -+++ b/samples/sample_ctl.c -@@ -79,7 +79,7 @@ static void trace_new_edge(uc_engine *uc, uc_tb *cur, uc_tb *prev, void *data) - prev->pc + prev->size - 1, cur->pc); - } - --void test_uc_ctl_exits() -+void test_uc_ctl_exits(void) - { - uc_engine *uc; - uc_err err; -@@ -193,7 +193,7 @@ double time_emulation(uc_engine *uc, uint64_t start, uint64_t end) - return (t2 - t1) * 1000.0 / CLOCKS_PER_SEC; - } - --static void test_uc_ctl_tb_cache() -+static void test_uc_ctl_tb_cache(void) - { - uc_engine *uc; - uc_err err; ---- a/samples/sample_x86.c -+++ b/samples/sample_x86.c -@@ -1240,7 +1240,7 @@ static void test_i386_invalid_mem_read_in_tb(void) - uc_close(uc); - } - --static void test_i386_smc_xor() -+static void test_i386_smc_xor(void) - { - uc_engine *uc; - uc_err err; -@@ -1319,7 +1319,7 @@ static void mmio_write_callback(uc_engine *uc, uint64_t offset, unsigned size, - return; - } - --static void test_i386_mmio() -+static void test_i386_mmio(void) - { - uc_engine *uc; - int r_ecx = 0xdeadbeef; -@@ -1392,7 +1392,7 @@ static bool test_i386_hook_mem_invalid_cb(uc_engine *uc, uc_mem_type type, - return true; - } - --static void test_i386_hook_mem_invalid() -+static void test_i386_hook_mem_invalid(void) - { - uc_engine *uc; - uc_hook hook; ---- a/samples/sample_x86_32_gdt_and_seg_regs.c -+++ b/samples/sample_x86_32_gdt_and_seg_regs.c -@@ -163,7 +163,7 @@ static void hex_dump(unsigned char *ptr, unsigned int len) - } - */ - --static void gdt_demo() -+static void gdt_demo(void) - { - uc_engine *uc; - uc_hook hook1, hook2; ---- a/tests/regress/00opcode_uc_crash.c -+++ b/tests/regress/00opcode_uc_crash.c -@@ -7,7 +7,7 @@ - #define X86_CODE32 "\x00" // add byte ptr ds:[eax],al - #define ADDRESS 0x1000000 - --static void VM_exec() -+static void VM_exec(void) - { - uc_engine *uc; - uc_err err; ---- a/tests/regress/arm_enable_vfp.c -+++ b/tests/regress/arm_enable_vfp.c -@@ -6,7 +6,7 @@ - #define ADDRESS 0x1000 - #define ARM_VMOV "\xC0\xEF\x10\x00" // VMOV.I32 D16, #0 ; Vector Move - --int main() -+int main(void) - { - uc_en |
