Skip to content

install: install -D replaces symlink path components with real directories breaks our build system #11469

Description

@mkocher

install -D in uutils 0.7.0 replaces symlink components in the destination path with real directories, instead of following them as GNU coreutils does. This was introduced by #10140 (fix for #10013).

Reproduction

mkdir -p /tmp/target
ln -s /tmp/target /tmp/link
echo hello > /tmp/file.txt
install -D -m 644 /tmp/file.txt /tmp/link/subdir/file.txt
GNU coreutils 8.32: /tmp/link remains a symlink. file.txt is written to /tmp/target/subdir/file.txt.

uutils 0.7.0: /tmp/link is replaced with a real directory. /tmp/target is untouched. file.txt is written to the new real directory at /tmp/link/subdir/file.txt.

Impact
This breaks any workflow where the install prefix is a symlink. In our case, the BOSH deployment tool sets up INSTALL_PREFIX as a symlink to a persistent disk directory, then runs packaging scripts that call make install (which uses install -D internally). The compiled output silently goes to the wrong filesystem, producing empty packages.

This likely affects any make install on a symlinked prefix, which is a common pattern (e.g. Homebrew, Nix, stow).

Possibly related to #11363.

/cc @abendrothj

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions