Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,876
    • Issues 4,876
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 458
    • Merge requests 458
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #21402
Closed
Open
Created Apr 19, 2022 by sterni@sternenseemann🌟

Alpine bindists installation breaks if the prefix contains "xxx"

Summary

When the Alpine bindists (tested with 8.10.2 and 9.2.2) are configured to have a --prefix containing xxx anywhere in the path, the installation will fail while trying to access paths that curiously contain 3 spaces instead of xxx.

This is because of the following snippet from its Makefile where xxx is used to temporarily sanitize three spaces:

PKG_CONFS = $(shell find "$(ActualLibsDir)/package.conf.d" -name '*.conf' | sed 's:   :xxx:g')
update_package_db: install_bin install_lib
        @echo "$(PKG_CONFS)"
        @echo "Updating the package DB"
        $(foreach p, $(PKG_CONFS),\
                $(call patchpackageconf,$(shell echo $(notdir $p) | sed 's/-\([0-9]*[0-9]\.\)*conf//g'),$(shell echo "$p" | sed 's:xxx:   :g'),$(docdir),$(shell mk/relpath.s
h "$(ActualLibsDir)" "$(docdir)")))
        '$(WrapperBinsDir)/$(CrossCompilePrefix)ghc-pkg' recache

Steps to reproduce

Use an Alpine bindist for either 8.10.2 or 9.2.2 (others likely also work) and select a prefix containing xxx for configure, then install.

Expected behavior

The installation works normally. Having xxx in prefix is rare, but can happen for Nix since x is part of the alphabet used for Nix's base32 hashes.

Environment

  • GHC version used: 9.2.2, 8.10.2

Optional:

  • Operating System: NixOS
  • System Architecture: x86_64-linux
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking