Accepting request 1223264 from devel:languages:javascript

- Update vendored dependencies with patch ./zeromq-update.patch
  * this fixes build where zeromq is not compatible with the new 'static
    types from futures-util
- Fix aarch64 builds with ./deno-v8-arm.patch
- Replace ./rusty_v8-0.106.0.tar.gz with ./rusty_v8-0.106.0.tar.zst
- Fix ./compiler-rt-adjust-paths.patch
  * Update ./compiler-rt-adjust-paths.patch for clang19 pathing.
- Add back registry.tar.zst.
- Do not depend on rusty_v8 from openSUSE:Factory.
  * deno has changed how they ship the v8 crate.
  * will request a deletion to v8 from openSUSE:Factory.
  * removing it from BuildRequires
- Apply patch directly to vendored v8 with ./compiler-rt-adjust-paths.patch.
- Update to version 2.0.6:
  * Revert "perf(upgrade): cache downloaded binaries in DENO_DIR"
  * perf(upgrade): cache downloaded binaries in DENO_DIR
  * fix: performance.timeOrigin
  * fix(install): cache jsr deps from all workspace config files
  * feat(ext/http): abort event when request is cancelled
  * fix(ext/cache): don't panic when creating cache
  * chore: make commandWithCwdIsAsync test less flaky
  * feat(ext/http): abort signal when request is cancelled
  * chore: serve node headers from a test server to fix flaky `node-gyp` test
  * refactor: use concrete error type for remaining ops
  * refactor(ext/net): Use hickory dns instead of unmaintained trust-dns
  * fix(node:zlib): gzip & gzipSync should accept ArrayBuffer
  * fix(ext/node): better inspector support
  * fix(fmt): don't use self-closing tags in HTML
  * feat(lsp): auto-import completions from byonm dependencies

OBS-URL: https://build.opensuse.org/request/show/1223264
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/deno?expand=0&rev=55
This commit is contained in:
Dominique Leuenberger 2024-11-11 12:46:30 +00:00 committed by Git OBS Bridge
commit f35f9f4965
12 changed files with 194 additions and 24 deletions

View File

@ -8,21 +8,38 @@
<param name="url">https://github.com/denoland/deno</param> <param name="url">https://github.com/denoland/deno</param>
<!-- param name="versionformat">@PARENT_TAG@+git@TAG_OFFSET@</param --> <!-- param name="versionformat">@PARENT_TAG@+git@TAG_OFFSET@</param -->
<param name="versionformat">@PARENT_TAG@</param> <param name="versionformat">@PARENT_TAG@</param>
<param name="revision">v2.0.5</param> <param name="revision">v2.0.6</param>
<param name="versionrewrite-pattern">v(.*)</param> <param name="versionrewrite-pattern">v(.*)</param>
<param name="versionrewrite-replacement">\1</param> <param name="versionrewrite-replacement">\1</param>
<param name="changesgenerate">enable</param> <param name="changesgenerate">enable</param>
</service> </service>
<service mode="manual" name="set_version"/>
<service name="obs_scm" mode="manual">
<param name="url">https://github.com/denoland/rusty_v8</param>
<param name="scm">git</param>
<param name="revision">v0.106.0</param>
<param name="version">0.106.0</param>
<param name="exclude">.git</param>
<param name="exclude">.github</param>
<param name="exclude">.gitignore</param>
<param name="exclude">.prettierrc.json</param>
<param name="exclude">.rustfmt.toml</param>
</service>
<service name="cargo_vendor" mode="manual"> <service name="cargo_vendor" mode="manual">
<param name="update">false</param> <param name="update">true</param>
<param name="respect-lockfile">true</param> <param name="respect-lockfile">false</param>
<param name="method">registry</param> <param name="method">registry</param>
<param name="src">deno</param> <param name="src">deno</param>
</service> </service>
<service mode="manual" name="set_version"/>
<service name="roast" mode="manual"> <service name="roast" mode="manual">
<param name="target">deno</param> <param name="target">deno</param>
<param name="outfile">deno-2.0.5.tar.zst</param> <param name="outfile">deno-2.0.6.tar.zst</param>
<param name="preserve-root">true</param>
<param name="reproducible">true</param>
</service>
<service name="roast" mode="manual">
<param name="target">rusty_v8</param>
<param name="outfile">rusty_v8-0.106.0.tar.zst</param>
<param name="preserve-root">true</param> <param name="preserve-root">true</param>
<param name="reproducible">true</param> <param name="reproducible">true</param>
</service> </service>

View File

@ -1,4 +1,4 @@
<servicedata> <servicedata>
<service name="tar_scm"> <service name="tar_scm">
<param name="url">https://github.com/denoland/deno</param> <param name="url">https://github.com/denoland/deno</param>
<param name="changesrevision">78a799b4947461eb5c6092295cbcdabfe94053f7</param></service></servicedata> <param name="changesrevision">8f59d18202e94e5c54ad7e5a79ec1383159e4a20</param></service></servicedata>

View File

@ -0,0 +1,33 @@
diff --git a/build/config/clang/BUILD.gn b/build/config/clang/BUILD.gn
index fcca59b0f..fdf14f306 100644
--- a/rusty_v8/build/config/clang/BUILD.gn
+++ b/rusty_v8/build/config/clang/BUILD.gn
@@ -192,12 +192,15 @@ template("clang_lib") {
} else if (is_linux || is_chromeos) {
if (current_cpu == "x64") {
_dir = "x86_64-unknown-linux-gnu"
+ _suffix = "-x86_64"
} else if (current_cpu == "x86") {
_dir = "i386-unknown-linux-gnu"
+ _suffix = "-i386"
} else if (current_cpu == "arm") {
_dir = "armv7-unknown-linux-gnueabihf"
} else if (current_cpu == "arm64") {
_dir = "aarch64-unknown-linux-gnu"
+ _suffix = "-aarch64"
} else {
assert(false) # Unhandled cpu type
}
@@ -228,6 +231,11 @@ template("clang_lib") {
assert(false) # Unhandled target platform
}
+ # Bit of a hack to make this find builtins from compiler-rt >= 16
+ if (is_linux || is_chromeos) {
+ _dir = "linux"
+ }
+
_clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib"
_lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}"
libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ]

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b262c7058246e86b133ad4807729022eb478ad748e649fe274acaa20ee72f584
size 98802962

3
deno-2.0.6.tar.zst Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:53e51c081706056cf849454d618c6593e3306e77cc578cf6818194510be19d65
size 99521336

23
deno-v8-arm.patch Normal file
View File

@ -0,0 +1,23 @@
--- a/rusty_v8/build.rs.orig 2024-06-27 14:26:40.281226961 +0200
+++ b/rusty_v8/build.rs 2024-06-27 14:28:10.388618455 +0200
@@ -200,16 +200,12 @@ fn build_v8(is_asan: bool) {
// cross-compilation setup
if target_arch == "aarch64" {
gn_args.push(r#"target_cpu="arm64""#.to_string());
- gn_args.push("use_sysroot=true".to_string());
- maybe_install_sysroot("arm64");
- maybe_install_sysroot("amd64");
+ gn_args.push("use_sysroot=false".to_string());
}
if target_arch == "arm" {
gn_args.push(r#"target_cpu="arm""#.to_string());
gn_args.push(r#"v8_target_cpu="arm""#.to_string());
- gn_args.push("use_sysroot=true".to_string());
- maybe_install_sysroot("i386");
- maybe_install_sysroot("arm");
+ gn_args.push("use_sysroot=false".to_string());
}
let target_triple = env::var("TARGET").unwrap();

View File

@ -1,3 +1,73 @@
-------------------------------------------------------------------
Mon Nov 11 02:12:08 UTC 2024 - Soc Virnyl Estela <uncomfyhalomacro@opensuse.org>
- Update vendored dependencies with patch ./zeromq-update.patch
* this fixes build where zeromq is not compatible with the new 'static
types from futures-util
-------------------------------------------------------------------
Sun Nov 10 12:46:52 UTC 2024 - Soc Virnyl Estela <uncomfyhalomacro@opensuse.org>
- Fix aarch64 builds with ./deno-v8-arm.patch
-------------------------------------------------------------------
Sun Nov 10 12:18:13 UTC 2024 - Soc Virnyl Estela <uncomfyhalomacro@opensuse.org>
- Replace ./rusty_v8-0.106.0.tar.gz with ./rusty_v8-0.106.0.tar.zst
- Fix ./compiler-rt-adjust-paths.patch
* Update ./compiler-rt-adjust-paths.patch for clang19 pathing.
- Add back registry.tar.zst.
-------------------------------------------------------------------
Sun Nov 10 09:23:10 UTC 2024 - Soc Virnyl Estela <uncomfyhalomacro@opensuse.org>
- Do not depend on rusty_v8 from openSUSE:Factory.
* deno has changed how they ship the v8 crate.
* will request a deletion to v8 from openSUSE:Factory.
* removing it from BuildRequires
- Apply patch directly to vendored v8 with ./compiler-rt-adjust-paths.patch.
-------------------------------------------------------------------
Sun Nov 10 06:13:41 UTC 2024 - Soc Virnyl Estela <uncomfyhalomacro@opensuse.org>
- Update to version 2.0.6:
* Revert "perf(upgrade): cache downloaded binaries in DENO_DIR"
* perf(upgrade): cache downloaded binaries in DENO_DIR
* fix: performance.timeOrigin
* fix(install): cache jsr deps from all workspace config files
* feat(ext/http): abort event when request is cancelled
* fix(ext/cache): don't panic when creating cache
* chore: make commandWithCwdIsAsync test less flaky
* feat(ext/http): abort signal when request is cancelled
* chore: serve node headers from a test server to fix flaky `node-gyp` test
* refactor: use concrete error type for remaining ops
* refactor(ext/net): Use hickory dns instead of unmaintained trust-dns
* fix(node:zlib): gzip & gzipSync should accept ArrayBuffer
* fix(ext/node): better inspector support
* fix(fmt): don't use self-closing tags in HTML
* feat(lsp): auto-import completions from byonm dependencies
- Replace registry.tar.zst to vendor.tar.zst
-------------------------------------------------------------------
Sun Nov 10 01:29:34 UTC 2024 - Soc Virnyl Estela <uncomfyhalomacro@opensuse.org>
- Revert passing --locked flag.
- Revert regenerating lockfile.
-------------------------------------------------------------------
Sun Nov 10 01:22:25 UTC 2024 - Soc Virnyl Estela <uncomfyhalomacro@opensuse.org>
- Pass --locked in cargo build.
- Regenerate lockfile on prep.
-------------------------------------------------------------------
Sun Nov 10 01:14:01 UTC 2024 - Soc Virnyl Estela <uncomfyhalomacro@opensuse.org>
- Limit to Rust tier 1 arches.
* I don't believe that we should eagerly take account
architectures that no one will use at home or during
development.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Nov 7 11:32:30 UTC 2024 - Soc Virnyl Estela <uncomfyhalomacro@opensuse.org> Thu Nov 7 11:32:30 UTC 2024 - Soc Virnyl Estela <uncomfyhalomacro@opensuse.org>

View File

@ -1,4 +1,4 @@
name: deno name: deno
version: 2.0.5 version: 2.0.6
mtime: 1730852345 mtime: 1731213491
commit: 78a799b4947461eb5c6092295cbcdabfe94053f7 commit: 8f59d18202e94e5c54ad7e5a79ec1383159e4a20

View File

@ -19,8 +19,9 @@
%global _lto_cflags %nil %global _lto_cflags %nil
%global _v8_version 0.106.0
Name: deno Name: deno
Version: 2.0.5 Version: 2.0.6
Release: 0 Release: 0
Summary: A secure JavaScript and TypeScript runtime Summary: A secure JavaScript and TypeScript runtime
License: MIT License: MIT
@ -28,6 +29,10 @@ Group: Productivity/Other
URL: https://github.com/denoland/deno URL: https://github.com/denoland/deno
Source0: %{name}-%{version}.tar.zst Source0: %{name}-%{version}.tar.zst
Source1: registry.tar.zst Source1: registry.tar.zst
Source2: rusty_v8-%{_v8_version}.tar.zst
Patch1: compiler-rt-adjust-paths.patch
Patch2: deno-v8-arm.patch
Patch3: zeromq-update.patch
BuildRequires: cargo-packaging BuildRequires: cargo-packaging
BuildRequires: clang BuildRequires: clang
# needed by `libz-ng-sys` after 1.36.1 # needed by `libz-ng-sys` after 1.36.1
@ -41,15 +46,13 @@ BuildRequires: llvm-gold
BuildRequires: ninja BuildRequires: ninja
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: python3-base BuildRequires: python3-base
BuildRequires: rusty_v8
BuildRequires: zstd BuildRequires: zstd
BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gmodule-2.0) BuildRequires: pkgconfig(gmodule-2.0)
BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(gthread-2.0) BuildRequires: pkgconfig(gthread-2.0)
BuildRequires: pkgconfig(protobuf) BuildRequires: pkgconfig(protobuf)
# deno does not build on 32-bit archs ExclusiveArch: %{rust_tier1_arches}
ExclusiveArch: x86_64 aarch64 ppc64 ppc64le s390x
# PATCH-FIX-OPENSUSE - Disable LTO (to reduce req memory) # PATCH-FIX-OPENSUSE - Disable LTO (to reduce req memory)
Patch10: deno-disable-lto.patch Patch10: deno-disable-lto.patch
@ -97,16 +100,25 @@ Remote code is fetched and cached on first execution, and only
updated with the --reload flag. updated with the --reload flag.
%prep %prep
%autosetup -a1 -p1 -n %{name} %autosetup -a2 -p1 -n %{name}
# From archlinux. We are using a patched v8 from our build # Extract vendor source
unlink $PWD/rusty_v8 || true tar xf %{SOURCE1}
ln -sf %{_libdir}/crates/rusty_v8 $PWD/rusty_v8 # Now we patch V8 or %%{SOURCE2}
echo -e "\n[patch.crates-io]\nv8 = { path = './rusty_v8' }" >> Cargo.toml echo -e "\n[patch.crates-io]\nv8 = { path = './rusty_v8' }" >> Cargo.toml
export CARGO_HOME=$PWD/.cargo pushd rusty_v8
# Keeping this ifarch in case someone tries to build 32 bit
# which is not our problem
%ifarch x86_64 || x86_64_v3 || aarch64
# lib to lib64
sed -i 's|lib/clang|lib64/clang|g' build/config/clang/BUILD.gn
%endif
popd
# Seems this causes builds to break?
rm .cargo/config.toml
%build %build
export CARGO_HOME=$PWD/.cargo export CARGO_HOME="$PWD/.cargo"
# Ensure that the clang version matches. This command came from Archlinux. Thanks. # Ensure that the clang version matches. This command came from Archlinux. Thanks.
export CLANG_VERSION=$(clang --version | grep -m1 version | sed 's/.* \([0-9]\+\).*/\1/') export CLANG_VERSION=$(clang --version | grep -m1 version | sed 's/.* \([0-9]\+\).*/\1/')
export V8_FROM_SOURCE=1 export V8_FROM_SOURCE=1

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:9b7e9d2c89d3377247e3d2b0cb0103bac699119eda65f6165b0d6bea35e08070 oid sha256:24a39a7e03dc6c7049371bb6b9a6fec546e2d506c69828300fb90df0859151d6
size 140558058 size 145061553

3
rusty_v8-0.106.0.tar.zst Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4bbdc154daf89cabfa796298714f20bf5df5ad8c238e774be0cd7f2979c2c79b
size 62136047

12
zeromq-update.patch Normal file
View File

@ -0,0 +1,12 @@
--- a/Cargo.toml.orig 2024-11-11 10:00:21.627172910 +0800
+++ b/Cargo.toml 2024-11-11 10:00:28.567190380 +0800
@@ -204,7 +204,7 @@
webpki-roots = "0.26"
which = "4.2.5"
yoke = { version = "0.7.4", features = ["derive"] }
-zeromq = { version = "=0.4.0", default-features = false, features = ["tcp-transport", "tokio-runtime"] }
+zeromq = { version = "=0.4.1", default-features = false, features = ["tcp-transport", "tokio-runtime"] }
zstd = "=0.12.4"
# crypto