From 93a36a1724d39e7071cfea4a07bb4cb915ca0f7957863862c175795735931d6a Mon Sep 17 00:00:00 2001 From: Avindra Goolcharan Date: Tue, 26 Jan 2021 16:32:04 +0000 Subject: [PATCH] Accepting request 866954 from home:avindra:devel:languages:javascript +deno OBS-URL: https://build.opensuse.org/request/show/866954 OBS-URL: https://build.opensuse.org/package/show/devel:languages:javascript/deno?expand=0&rev=1 --- .gitattributes | 23 +++++++ .gitignore | 1 + _constraints | 28 +++++++++ _service | 144 ++++++++++++++++++++++++++++++++++++++++++ deno-1.7.0.tar.xz | 3 + deno.changes | 153 +++++++++++++++++++++++++++++++++++++++++++++ deno.spec | 79 +++++++++++++++++++++++ revendor_source.sh | 63 +++++++++++++++++++ vendor.tar.xz | 3 + 9 files changed, 497 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _constraints create mode 100644 _service create mode 100644 deno-1.7.0.tar.xz create mode 100644 deno.changes create mode 100644 deno.spec create mode 100644 revendor_source.sh create mode 100644 vendor.tar.xz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..fdca2df --- /dev/null +++ b/_constraints @@ -0,0 +1,28 @@ + + + + + + 4 + + + 9 + + + 1 + + + + + aarch64 + + + + 15 + + + + diff --git a/_service b/_service new file mode 100644 index 0000000..790436f --- /dev/null +++ b/_service @@ -0,0 +1,144 @@ + + + + + + git + https://github.com/denoland/deno + ffb4b32e9246dec2d452f81d530e8738e19e5a4e + 1.7.0 + + + docs + Releases.md + CODE*.md + */README.md + **/*/*.md + + .editorconfig + .github + .gitattributes + tools + third_party + cli/tests + test_util/wpt + std/wasi/testdata + core/examples + runtime/examples + + + git + https://github.com/denoland/rusty_v8 + v0.16.0 + 0.16.0 + .github + + + *.settings + *.txt + AUTHORS + build/android + build/chromeos + build/fuchsia + + + + + + + + buildtools/checkdeps + buildtools/clang_format + buildtools/third_party/libc++/trunk/benchmarks + buildtools/third_party/libc++/trunk/docs + buildtools/third_party/libc++/trunk/lib + buildtools/third_party/libc++/trunk/test + buildtools/third_party/libc++/trunk/utils + buildtools/third_party/libc++/trunk/www + buildtools/third_party/libc++abi/trunk/test + v8/ChangeLog + v8/benchmarks/ + v8/docs/ + v8/samples + + + + v8/tools/*.js + v8/tools/*.mjs + v8/tools/*.html + v8/tools/turbolizer + v8/tools/clusterfuzz + + + + + + + *.tar + xz + + + diff --git a/deno-1.7.0.tar.xz b/deno-1.7.0.tar.xz new file mode 100644 index 0000000..5210858 --- /dev/null +++ b/deno-1.7.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41f946875a6ee772ae6db55e1bde4be5382c8d24ea9e429a6487c5fa9cd05c4b +size 2100776 diff --git a/deno.changes b/deno.changes new file mode 100644 index 0000000..0a8cd70 --- /dev/null +++ b/deno.changes @@ -0,0 +1,153 @@ +------------------------------------------------------------------- +Wed Jan 20 14:08:20 UTC 2021 - Avindra Goolcharan + +- update to v1.7.0 + * upgrade: rusty_v8 0.16.0, v8 8.9.255.3 + * upgrade: tokio 1.0 + * upgrade: Rust 1.49.0 + * upgrade: deno_doc, deno_lint, dprint, swc_ecmascript, swc_bundler + * upgrade: deno_lint to 0.2.16 + * upgrade: swc_bundler 0.19.2 + * BREAKING(std/wasi): hide implementation details + * BREAKING(std/wasi): return exit code from start + * BREAKING(unstable): Use hosts for net allowlists + * BREAKING(unstable): remove CreateHttpClientOptions.caFile + * feat(std/wasi): allow stdio resources to be specified + * feat(unstable): add Deno.resolveDns API + * feat(unstable): runtime compiler APIs consolidated to Deno.emit() + * feat: Add WorkerOptions interface to type declarations + * feat: Add configurable permissions for Workers + * feat: Standalone lite binaries and cross compilation + * feat: add --location= and globalThis.location + * feat: add global tls session cache + * feat: add markdown support to deno fmt + * feat: add utf-16 and big5 to TextEncoder/TextDecoder + * feat: denort binary + * feat: stabilize Deno.shutdown() and Conn#closeWrite() + * feat: support data urls + * feat: support runtime flags for deno compile + * feat: upload release zips to dl.deno.land + * fix(cli): dispatch unload on exit + * fix(cli): print a newline after help and version + * fix(coverage): do not store source inline in raw reports + * fix(coverage): merge duplicate reports + * fix(coverage): report partial lines as uncovered + * fix(inspector): kill child process after test + * fix(install): fix cached-only flag + * fix(lsp): Add textDocument/implementation + * fix(lsp): Respect client capabilities for config and dynamic registration + * fix(lsp): support specifying a tsconfig file + * fix(op_crates/fetch): add back ReadableStream.getIterator and deprecate + * fix(op_crates/fetch): align streams to spec + * fix(op_crates/fetch): correct regexp for fetch header + * fix(op_crates/fetch): req streaming + 0-copy resp streaming + * fix(op_crates/web) let TextEncoder#encodeInto accept detached ArrayBuffers + * fix(op_crates/web): Use WorkerLocation for location in workers + * fix(op_crates/web): fix atob to throw spec aligned DOMException + * fix(op_crates/websocket): respond to ping with pong + * fix(std): Don't use JSDoc syntax for browser-compatibility headers + * fix(std/http): Use ES private fields in server + * fix(std/http): parsing of HTTP version header + * fix(std/node): resolve files in symlinked directories + * fix(watcher): keep working even when imported file has invalid syntax + * fix: Use "none" instead of false to sandbox Workers + * fix: Worker hangs when posting "undefined" as message + * fix: align DOMException API to the spec and add web platform testing of it. + * fix: don't error on version and help flag + * fix: don't swallow customInspect exceptions + * fix: enable WPT tests + * fix: full commit hash in canary compile download + * fix: ignore "use asm" + * fix: implement DOMException#code + * fix: incremental build for deno declaration files + * fix: panic during deno compile with no args + * fix: panic on invalid file:// module specifier + * fix: race condition in file watcher + * fix: redirect in --location relative fetch + * fix: stronger input checking for setTimeout; add function overload + * fix: use inline source maps when present in js + * fix: use tokio for async fs ops + * refactor(cli): remove 'js' module, simplify compiler snapshot + * refactor(op_crates/crypto): Prefix ops with "op_crypto_" + * refactor(op_crates/websocket): refactor event loop + * refactor: Print cause chain when downcasting AnyError fails + * refactor: make Process#kill() throw sensible errors on Windows + * refactor: move WebSocket API to an op_crate +- pass -s to link flags to strip debug symbols from binary +- revendor: apply mktemp fix from Matthias Eliasson (re: boo#1180782) + +------------------------------------------------------------------- +Thu Dec 31 20:57:31 UTC 2020 - Avindra Goolcharan + +- update to v1.6.3 + * upgrade: rusty_v8 0.15.0, v8 8.8.294 + * upgrade: dprint, swc_bundler, swc_common, swc_ecmascript + * feat(lsp): Add cache command + * feat(lsp): Implement textDocument/rename + * feat(std/node): adds fs.mkdtemp & fs.mkdtempSync + * feat(unstable): collect coverage from the run command + * fix(core): Fix incorrect index in Promise.all error reporting + * fix(lsp): handle ts debug errors better + * fix(lsp): provide diagnostics for unresolved modules + * fix(std/http): Don't expose ServerRequest::done as Deferred + * fix: fetch bad URL will not panic + * fix: info does not panic on missing modules + +------------------------------------------------------------------- +Mon Dec 28 05:46:18 UTC 2020 - Avindra Goolcharan + +- Build from the 2 source repos (deno and rusty_v8) + * No need to depend on published crate +- Add revendor_source.sh to carry the bucket for "cargo vendor" +- Remove ninja/gn env vars (fix upstreamed) +- Optimize exclusions (including removal of winapi binaries) + +------------------------------------------------------------------- +Fri Dec 25 20:04:58 UTC 2020 - Avindra Goolcharan + +- update to v1.6.2 + * upgrade TypeScript to 4.1.3 + * feat(lsp): support the unstable setting + * feat(std/node): Added os.type + * feat(unstable): record raw coverage into a directory + * feat(unstable): support in memory certificate data for Deno.createHttpClient + * fix: atomically write files to $DENO_DIR + * fix: implement ReadableStream fetch body handling + * fix: make DNS resolution async + * fix: make dynamic import errors catchable + * fix: respect enable flag for requests in lsp + * refactor: optimise static assets in lsp + * refactor: rename runtime/rt to runtime/js + * refactor: rewrite lsp to be async + * refactor: rewrite ops to use ResourceTable2 + +------------------------------------------------------------------- +Sun Dec 20 11:30:43 UTC 2020 - Avindra Goolcharan + +- Build completely from source +- Dropped librusty_v8_release_x86_64-unknown-linux-gnu.a + +------------------------------------------------------------------- +Sat Dec 19 08:57:04 UTC 2020 - Avindra Goolcharan + +- update to v1.6.1 + * upgrade: swc_ecmascript to 0.15.0 + * feat(lsp): support import maps + * fix(compile): error when the output path already exists + * fix(lsp): only resolve sources with supported schemas + * fix(op_crates/fetch): support non-ascii response headers value + * fix(repl): recover from invalid input + * fix: show canary string in long version + * fix: zsh completions + * refactor: deno_runtime crate +- includes v1.6.0 + * rusty_v8 updated to 0.14.0 + * break: std/bytes changes + * break: isolatedModules non-configurable +- add _constraints to request memory for build +- cleanup description + +------------------------------------------------------------------- +Fri Dec 4 02:20:19 UTC 2020 - Avindra Goolcharan + +- init pkg at v1.5.4 diff --git a/deno.spec b/deno.spec new file mode 100644 index 0000000..54dfcfb --- /dev/null +++ b/deno.spec @@ -0,0 +1,79 @@ +# +# spec file for package deno +# +# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2020-2021 Avindra Goolcharan +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: deno +Version: 1.7.0 +Release: 0 +Summary: A secure JavaScript and TypeScript runtime +License: MIT +Group: Productivity/Other +URL: https://github.com/denoland/deno +Source0: %{name}-%{version}.tar.xz +Source1: vendor.tar.xz +Source99: revendor_source.sh +BuildRequires: clang +BuildRequires: gn +BuildRequires: lld +BuildRequires: llvm +BuildRequires: ninja +BuildRequires: pkgconfig +BuildRequires: python +BuildRequires: python2-setuptools +BuildRequires: rust-packaging +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gmodule-2.0) +BuildRequires: pkgconfig(gobject-2.0) +BuildRequires: pkgconfig(gthread-2.0) +# deno does not build on 32-bit archs +ExclusiveArch: x86_64 aarch64 ppc64 ppc64le s390x + +%description +A JavaSript platform built on V8 with built-in TypeScript, with +secure, sandboxed defaults. + +Supports and uses ES modules. Remote code is fetched and cached +on first execution, and only updated when deno run is called +with --reload. + +%prep +%autosetup -a1 -p1 +%define cargo_registry $(pwd)/vendor +%{cargo_prep} + +%build +export V8_FROM_SOURCE=1 +export CLANG_BASE_PATH=%{_prefix} +# https://www.chromium.org/developers/gn-build-configuration +export GN_ARGS="enable_nacl = false blink_symbol_level = 0" +# enable binary stripping +export RUSTFLAGS="%{__global_rustflags} -Clink-arg=-s" +%{cargo_build} + +%install +# place deno cli manually (cannot cargo install) +mkdir -p %{buildroot}%{_bindir} +cp target/release/{deno,denort} %{buildroot}%{_bindir} + +%files +%license LICENSE.md +%doc README.md +%{_bindir}/%{name} +%{_bindir}/%{name}rt + +%changelog diff --git a/revendor_source.sh b/revendor_source.sh new file mode 100644 index 0000000..2c4da53 --- /dev/null +++ b/revendor_source.sh @@ -0,0 +1,63 @@ +#!/bin/sh +set -euo pipefail + +# packaging helper to workaround: +# https://github.com/rust-lang/cargo/issues/9054 +# https://github.com/rust-lang/cargo/issues/7058#issuecomment-751589229 + +# This script merges rusty_v8 into place from source, +# and nukes superfluous source objects. +# +# output is a single, merged vendor tarball + +wd="$(mktemp -d /tmp/revendor.XXXXX)" + +# take what we need into the build +cp rusty_v8*xz $wd +cp vendor*xz $wd + +cd $wd + +echo -n "Extracting vendor..." +tar xf vendor*xz +echo "done" + +echo -n "Extracting rusty_v8..." +tar xf rusty*xz \ + --exclude="Cargo.toml" \ + --exclude="Cargo.lock" +echo " done" + +# take vendored Cargo toml and lock which +# can still be used +cp vendor/rusty_v8/{Cargo.*,.cargo*} . + +# get rid of everything else +rm -fr vendor/rusty_v8 + +# drop version prefix +target=$(find . -name "rusty_v8-*" -type d) +mv $target rusty_v8 + +# insert proper files +mv Cargo.* .cargo* rusty_v8 +echo "Check final rusty_v8 root:" +ls -la rusty_v8 +mv rusty_v8 vendor + +# extra: workaround winapi bloat +# by ejecting it from the build +# +# https://github.com/rust-lang/cargo/issues/7058 +echo -n "Pruning winapi bloat... " +rm -fr vendor/winapi*gnu*/lib/*.a +echo "done" + +# remake tarball +echo -n "Compressing archive... " +tar -cf - vendor/ | xz -6 -c - > vendor-merged.tar.xz +echo "done" + +echo "Inspect the tarball and replace the" +echo "existing one if it's ok. Should be under 30MB." +ls -lh "$wd/vendor-merged.tar.xz" diff --git a/vendor.tar.xz b/vendor.tar.xz new file mode 100644 index 0000000..19b36b2 --- /dev/null +++ b/vendor.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49beaaae71fed5cdf69ac2daebad5ff2f82122ea8152be5891aedafc81b9ce41 +size 34556068