frida 17.5.1 → 17.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/Makefile CHANGED
@@ -2,8 +2,8 @@ PYTHON ?= $(shell which python3 >/dev/null && echo python3 || echo python)
2
2
 
3
3
  all $(MAKECMDGOALS):
4
4
  @$(PYTHON) \
5
- -c "import sys; sys.path.insert(0, r'/home/runner/work/frida/frida/subprojects/frida-node'); from releng.meson_make import main; main()" \
6
- /home/runner/work/frida/frida/subprojects/frida-node \
5
+ -c "import sys; sys.path.insert(0, r'/home/runner/work/frida-node/frida-node'); from releng.meson_make import main; main()" \
6
+ /home/runner/work/frida-node/frida-node \
7
7
  . \
8
8
  $(MAKECMDGOALS)
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frida",
3
- "version": "17.5.1",
3
+ "version": "17.5.2",
4
4
  "authors": [
5
5
  "Frida Developers"
6
6
  ],
@@ -4,6 +4,7 @@ import argparse
4
4
  from dataclasses import dataclass
5
5
  import os
6
6
  from pathlib import Path
7
+ import re
7
8
  import subprocess
8
9
  import sys
9
10
  from typing import List
@@ -40,31 +41,66 @@ def detect(repo: Path) -> FridaVersion:
40
41
  nano = 0
41
42
  commit = ""
42
43
 
43
- if (repo / ".git").exists():
44
- description = subprocess.run(["git", "describe", "--tags", "--always", "--long"],
45
- cwd=repo,
46
- capture_output=True,
47
- encoding="utf-8").stdout
48
-
49
- tokens = description.strip().replace("-", ".").split(".")
50
- if len(tokens) > 1:
51
- (raw_major, raw_minor, raw_micro, raw_nano, commit) = tokens
52
- major = int(raw_major)
53
- minor = int(raw_minor)
54
- micro = int(raw_micro)
55
- nano = int(raw_nano)
56
- if nano > 0:
57
- micro += 1
58
-
59
- if nano == 0:
60
- version_name = f"{major}.{minor}.{micro}"
61
- else:
62
- version_name = f"{major}.{minor}.{micro}-dev.{nano - 1}"
44
+ if not (repo / ".git").exists():
45
+ return FridaVersion(version_name, major, minor, micro, nano, commit)
46
+
47
+ proc = subprocess.run(
48
+ ["git", "describe", "--tags", "--always", "--long"],
49
+ cwd=repo,
50
+ capture_output=True,
51
+ encoding="utf-8",
52
+ check=False,
53
+ )
54
+ description = proc.stdout.strip()
55
+
56
+ if "-" not in description:
57
+ commit = description
58
+ return FridaVersion(version_name, major, minor, micro, nano, commit)
59
+
60
+ parts = description.rsplit("-", 2)
61
+ if len(parts) != 3:
62
+ raise VersionParseError(f"Unexpected format from git describe: {description!r}")
63
+
64
+ tag_part, distance_str, commit_part = parts
65
+ commit = commit_part.lstrip("g")
66
+
67
+ try:
68
+ distance = int(distance_str)
69
+ except ValueError as exc:
70
+ raise VersionParseError(f"Invalid distance in {description!r}") from exc
71
+
72
+ nano = distance
73
+
74
+ m = re.match(r"^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$", tag_part)
75
+ if m is None:
76
+ raise VersionParseError(
77
+ f"Tag does not match expected semver pattern: {tag_part!r}"
78
+ )
79
+
80
+ major = int(m.group(1))
81
+ minor = int(m.group(2))
82
+ micro = int(m.group(3))
83
+ suffix = m.group(4)
84
+
85
+ if suffix is None:
86
+ if distance == 0:
87
+ version_name = f"{major}.{minor}.{micro}"
63
88
  else:
64
- commit = tokens[0]
89
+ micro += 1
90
+ version_name = f"{major}.{minor}.{micro}-dev.{distance - 1}"
91
+ else:
92
+ base = f"{major}.{minor}.{micro}-{suffix}"
93
+ if distance == 0:
94
+ version_name = base
95
+ else:
96
+ version_name = f"{base}-dev.{distance - 1}"
65
97
 
66
98
  return FridaVersion(version_name, major, minor, micro, nano, commit)
67
99
 
68
100
 
101
+ class VersionParseError(Exception):
102
+ pass
103
+
104
+
69
105
  if __name__ == "__main__":
70
106
  main(sys.argv)
@@ -50,13 +50,18 @@ class SwiftCompiler(Compiler):
50
50
  def get_dependency_gen_args(self, outtarget: str, outfile: str) -> T.List[str]:
51
51
  return ['-emit-dependencies']
52
52
 
53
+ def get_dependency_compile_args(self, dep: 'Dependency') -> T.List[str]:
54
+ return [arg for arg in dep.get_compile_args() if arg != "-pthread"]
55
+
53
56
  def get_dependency_link_args(self, dep: 'Dependency') -> T.List[str]:
54
57
  result = []
55
58
  for arg in dep.get_link_args():
56
59
  if arg.startswith("-Wl,"):
57
60
  for flag in arg[4:].split(","):
58
61
  result += ["-Xlinker", flag]
59
- else:
62
+ elif arg != '-pthread':
63
+ if arg.endswith('.a'):
64
+ result.append('-Xlinker')
60
65
  result.append(arg)
61
66
  return result
62
67
 
@@ -843,7 +843,7 @@ class Interpreter(InterpreterBase, HoldableObject):
843
843
  a = os.path.join(srcdir, self.subdir, a)
844
844
  self.add_build_def_file(a)
845
845
 
846
- return RunProcess(cmd, expanded_args, env, srcdir, builddir, self.subdir,
846
+ return RunProcess(cmd, expanded_args, env, srcdir, builddir, self.relative_builddir_path_for(self.subdir),
847
847
  self.environment.get_build_command() + ['introspect'],
848
848
  in_builddir=in_builddir, check=check, capture=capture)
849
849
 
@@ -1,6 +1,6 @@
1
1
  [wrap-git]
2
2
  url = https://github.com/frida/frida-core.git
3
- revision = 17.5.1
3
+ revision = 17.5.2
4
4
  depth = 1
5
5
 
6
6
  [provide]