Git Product home page Git Product logo

Comments (3)

amberkushwaha avatar amberkushwaha commented on July 18, 2024 1

The $prefix/bin/aws -> $prefix/lib/aws-cli/bin/aws symlink (and likewise for aws_completer)

The script interpreter of $prefix/lib/aws-cli/bin/aws (and likewise for aws_completer)
the script is being prepared in the same obligations and marks as used before formats.

Expected Behavior
The symlink created at $DESTDIR/$prefix/bin/aws should point to $prefix/lib/aws-cli/bin/aws.

The first line of $DESTDIR/$prefix/lib/aws-cli/bin/aws should be #!$prefix/lib/aws-cli/bin/python.

More generally, the contents of $DESTDIR should not themselves contain any references to $DESTDIR, so that it's possible to copy the contents of this directory to another machine's root filesystem (typically via a RPM/DEB/etc) and still end up with a working installation.

This code of conduct is still the in the initial stage so please do the needful for the coding ground formats and tempers.

from aws-cli.

tuananh avatar tuananh commented on July 18, 2024

I also faced this issue when trying to build from src.

from aws-cli.

Stealthii avatar Stealthii commented on July 18, 2024

For anyone looking towards a workaround for this issue until AWS fix it, you only need to redirect the symlinks and fix the shebangs to address the reference issue.

# Building package
build_dir="$(mktemp -d)"
target_dir="$(mktemp -d)"
tarball_uri="https://github.com/aws/aws-cli/archive/refs/tags/${awscli_version}.tar.gz"
# Download and extract tarball
curl -sL "${tarball_uri}" | tar -C "${build_dir}" -xz
# Configure and make install to target directory
(
        set -e
        cd "${build_dir}/aws-cli-${awscli_version}"
        export PYTHON="${python}"
        ./configure --prefix "/usr" --with-download-deps
        make
        make install DESTDIR="${target_dir}"
)

# Fix broken DESTDIR behaviour in aws-cli
for f in $(find "${target_dir}" -type l); do
        # Fix symlinks
        ln -sfn "$(readlink -f "${f}" | sed "s#${target_dir}##")" "${f}"
done
for f in $(grep -rl "${target_dir}" ${target_dir}); do
        # Fix shebangs
        sed -i "s|${target_dir}||g" $f
done

from aws-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.