SHA256
1
0
forked from pool/bitwarden

Accepting request 1129249 from home:dziobian:gulgul-ultron:19

OBS-URL: https://build.opensuse.org/request/show/1129249
OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/bitwarden?expand=0&rev=38
This commit is contained in:
Bruno Pitrus 2023-11-27 21:02:57 +00:00 committed by Git OBS Bridge
parent 24c7f27303
commit c30598b81a
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Nov 27 19:59:29 UTC 2023 - Bruno Pitrus <brunopitrus@hotmail.com>
- Fix FTBFS with npm21
-------------------------------------------------------------------
Tue Nov 7 11:56:22 UTC 2023 - Bruno Pitrus <brunopitrus@hotmail.com>

View File

@ -200,6 +200,7 @@ export ESBUILD_BINARY_PATH=/bin/true
export CFLAGS="%{optflags} -fpic -fno-semantic-interposition -fvisibility=hidden"
export CXXFLAGS="%{optflags} -fpic -fno-semantic-interposition -fvisibility=hidden"
export LDFLAGS="%{?build_ldflags}"
export MAKEFLAGS="%{_smp_mflags}"
%if 0%{?suse_version}
auditable='auditable -vv'
@ -223,7 +224,7 @@ cd build
mkdir -pv node_modules/@bitwarden/desktop-native
cp -plv ../desktop_native/{package.json,index.js} -t node_modules/@bitwarden/desktop-native
cp -plvT ../desktop_native/target/release/*.so node_modules/@bitwarden/desktop-native/desktop_native.node
rm -v ../../../node_modules/argon2/build-tmp-napi-v3/node_gyp_bins/python3
rm -fv ../../../node_modules/argon2/build-tmp-napi-v3/node_gyp_bins/python3
cp -plvr ../../../node_modules/argon2 -t node_modules/
cp -plvr '../../../node_modules/@phc' -t node_modules/
@ -293,14 +294,14 @@ find . -type d -empty -print -delete
%check
# Sanity check that we don't have unresolved symbols, and only call napi_* functions (which are ABI stable, unlike node_* ones)
cd %{buildroot}%{_libdir}/%{name}
pushd %{buildroot}%{_libdir}/%{name}
find . -name '*.node' -print0 | xargs -0 -t -IXXX sh -c '! ldd -d -r XXX | \
grep '\''^undefined symbol'\'' | \
grep -v '\''^undefined symbol: napi_'\'' '
# Check that all native modules are loadable.
find . -name '*.node' -print0 | xargs -0 -t -IXXX env ELECTRON_RUN_AS_NODE=1 %{_libdir}/electron/electron -e 'require("XXX")'
popd