Nixpkgs: mosh fails to build when installing bash completions

Created on 23 Apr 2020  路  4Comments  路  Source: NixOS/nixpkgs

Describe the bug
A clear and concise description of what the bug is.
The mosh package fails to build. It errors out during the installation of bash completions with "Permissions denied".

/nix/store/ca9mkrf8sa8md8pv61jslhcnfk9mmg4p-coreutils-8.31/bin/install: cannot create regular file '/nix/store/9w74w172vnlm6x6pg5cdd86mnq3rmvbb-bash-completion-2.10/share/bash-completion/completions/mosh': Permission denied

To Reproduce
Steps to reproduce the behavior:

  1. nix-build -A mosh

Expected behavior
Successful build

Notify maintainers
@viric

Metadata
on 324dd670139e8e9e8b8612750c679f3fd210a298

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: mosh
# a list of nixos modules affected by the problem
module:
bug regression

Most helpful comment

I think removing this patch was correct, as the functionality introduced in that patch was added to bash-completion 2.10, however a program needs to define datadir instead of prefix when reading completionsdir variable, which may necessitate patches (which could be upstreamed).

It's unfortunate that the upstream decided on different approach than what was done previously, but trying to preserve the old behaviour would cause more issues in long-term. Let's not overcomplicate things when some of upstream projects already have code that uses datadir when using bash-completions >= 2.10.

I imagine this is the line that needs changing: https://github.com/mobile-shell/mosh/blob/0cc492dbae2f6aaef9a54dc2a8ba3222868b150f/configure.ac#L516

All 4 comments

The breaking commit is the bash-completion update from 2.9 to 2.10: d0b9212338b18b3c70b30b8cef8ae7736eafa6c5.

@peti @xfix

Any idea how to resolve this?

I think you meant to link 0d120b1f2514c8f9698edc0a7680a2d4fd77b37c.

Seems to be a regression from #84485 incorrectly dropping 0001-Revert-build-Do-cmake-pc-and-profile-variable-replac.patch by @FRidh (added in 061c6b80240e1ff4157e8964154e45c7258cf057).

The "wrong" prefix comes from ${bash-completion}/share/pkgconfig/bash-completion.pc.

A possible alternative would be to drop the dependency on bash-completion for mosh (if there's a correct fallback - since we don't actually the prefix from bash-completion anyway).

I think removing this patch was correct, as the functionality introduced in that patch was added to bash-completion 2.10, however a program needs to define datadir instead of prefix when reading completionsdir variable, which may necessitate patches (which could be upstreamed).

It's unfortunate that the upstream decided on different approach than what was done previously, but trying to preserve the old behaviour would cause more issues in long-term. Let's not overcomplicate things when some of upstream projects already have code that uses datadir when using bash-completions >= 2.10.

I imagine this is the line that needs changing: https://github.com/mobile-shell/mosh/blob/0cc492dbae2f6aaef9a54dc2a8ba3222868b150f/configure.ac#L516

@xfix sorry, my assumption about the patch was wrong then :o And thanks for the fix :)
Edit: And I agree that we should follow upstream then.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yawnt picture yawnt  路  3Comments

copumpkin picture copumpkin  路  3Comments

edolstra picture edolstra  路  3Comments

vaibhavsagar picture vaibhavsagar  路  3Comments

ghost picture ghost  路  3Comments