Revert "fix: package locale-archive with binaries (#8609)" (#8621)

This reverts commit 535ed8a337.

CHANGELOG_BEGIN
CHANGELOG_END
This commit is contained in:
Robin Krom 2021-01-25 18:13:51 +01:00 committed by GitHub
parent 3e8d474b4b
commit 550aa48fc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 18 deletions

View File

@ -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"],
)

View File

@ -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