mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
This reverts commit 535ed8a337
.
CHANGELOG_BEGIN
CHANGELOG_END
This commit is contained in:
parent
3e8d474b4b
commit
550aa48fc5
@ -1,19 +1,16 @@
|
||||
# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
load("@os_info//:os_info.bzl", "is_linux", "is_windows")
|
||||
load("@os_info//:os_info.bzl", "is_windows")
|
||||
|
||||
sh_binary(
|
||||
name = "package-app",
|
||||
srcs = ["package-app.sh"],
|
||||
data = [
|
||||
"@gzip_dev_env//:gzip",
|
||||
"@tar_dev_env//:tar",
|
||||
"//bazel_tools/sh:mktgz",
|
||||
] + ([
|
||||
"@patchelf_nix//:bin/patchelf",
|
||||
] if not is_windows else []) +
|
||||
(["@glibc_locales//:locale-archive"] if is_linux else []),
|
||||
"@gzip_dev_env//:gzip",
|
||||
"@tar_dev_env//:tar",
|
||||
"//bazel_tools/sh:mktgz",
|
||||
] + (["@patchelf_nix//:bin/patchelf"] if not is_windows else []),
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["@bazel_tools//tools/bash/runfiles"],
|
||||
)
|
||||
|
@ -46,12 +46,6 @@ if [[ -n ${RUNFILES_MANIFEST_FILE:-} ]]; then
|
||||
export RUNFILES_DIR=$(abspath $RUNFILES_MANIFEST_FILE)
|
||||
fi
|
||||
|
||||
case "$(uname -s)" in
|
||||
Linux)
|
||||
locale_archive=$(abspath $(rlocation glibc_locales/lib/locale/locale-archive))
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$(uname -s)" in
|
||||
Darwin|Linux)
|
||||
tar=$(abspath $(rlocation tar_dev_env/tar))
|
||||
@ -135,9 +129,6 @@ if [ "$(uname -s)" == "Linux" ]; then
|
||||
# Copy the binary's dynamic library dependencies.
|
||||
copy_deps "$binary" "$WORKDIR/$NAME/lib"
|
||||
|
||||
# Copy nix's locale-archive
|
||||
cp $locale_archive "$WORKDIR/$NAME/lib/locale-archive"
|
||||
|
||||
# Workaround for dynamically loaded name service switch libraries
|
||||
(shopt -s nullglob
|
||||
for rpath in $rpaths_binary; do
|
||||
@ -161,7 +152,6 @@ if [ "$(uname -s)" == "Linux" ]; then
|
||||
#!/usr/bin/env sh
|
||||
SOURCE_DIR="\$(cd \$(dirname \$(readlink -f "\$0")); pwd)"
|
||||
LIB_DIR="\$SOURCE_DIR/lib"
|
||||
export LOCALE_ARCHIVE="\$SOURCE_DIR/lib/locale-archive"
|
||||
# Execute the wrapped application through the provided dynamic linker
|
||||
exec \$LIB_DIR/ld-linux-x86-64.so.2 --library-path "\$LIB_DIR" "\$LIB_DIR/$NAME" "\$@"
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user