Skip to content

Conversation

@mjcheetham
Copy link
Contributor

@mjcheetham mjcheetham commented Nov 18, 2021

The Debian package build script incorrectly copies the containing directory to the destination tree rather than just the contents recursively. We also create extra symlinks for the UI helpers which isn't needed.

This means we end up with:

usr └── local ├── bin *-> │   ├── Atlassian.Bitbucket.UI -> ../share/gcm-core/Atlassian.Bitbucket.UI *-> │   ├── git-credential-manager-core -> ../share/gcm-core/git-credential-manager-core │   └── GitHub.UI -> ../share/gcm-core/GitHub.UI └── share └── gcm-core ** ---> └── Release ├── Atlassian.Bitbucket.UI ├── git-credential-manager-core ├── GitHub.UI ├── libHarfBuzzSharp.so ├── libSkiaSharp.so └── NOTICE 

..rather than:

usr └── local ├── bin │   └── git-credential-manager-core -> ../share/gcm-core/git-credential-manager-core └── share └── gcm-core ├── Atlassian.Bitbucket.UI ├── git-credential-manager-core ├── GitHub.UI ├── libHarfBuzzSharp.so ├── libSkiaSharp.so └── NOTICE 

Since the symlinks are wrong, the installation is broken.

The Debian package build script incorrectly copies the containing directory to the destination tree rather than just the contents recursively. This means we end up with: usr └── local ├── bin │   ├── Atlassian.Bitbucket.UI -> ../share/gcm-core/Atlassian.Bitbucket.UI │   ├── git-credential-manager-core -> ../share/gcm-core/git-credential-manager-core │   └── GitHub.UI -> ../share/gcm-core/GitHub.UI └── share └── gcm-core ** ---> └── Release ├── Atlassian.Bitbucket.UI ├── git-credential-manager-core ├── GitHub.UI ├── libHarfBuzzSharp.so ├── libSkiaSharp.so └── NOTICE ..rather than: usr └── local ├── bin │   ├── Atlassian.Bitbucket.UI -> ../share/gcm-core/Atlassian.Bitbucket.UI │   ├── git-credential-manager-core -> ../share/gcm-core/git-credential-manager-core │   └── GitHub.UI -> ../share/gcm-core/GitHub.UI └── share └── gcm-core ├── Atlassian.Bitbucket.UI ├── git-credential-manager-core ├── GitHub.UI ├── libHarfBuzzSharp.so ├── libSkiaSharp.so └── NOTICE Since the symlinks are wrong, the installation is broken.
@mjcheetham mjcheetham requested a review from dscho November 18, 2021 11:19
Copy link
Contributor

@dscho dscho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least you have a way to work around it, but I agree that it is annoying.

@mjcheetham
Copy link
Contributor Author

mjcheetham commented Nov 18, 2021

Yeah the workaround would be one of:

  1. Move the files: sudo mv /usr/local/share/gcm-core/Release/* /usr/local/share/gcm-core
  2. Recreate the symlink: sudo rm /usr/local/bin/git-credential-manager-core && sudo ln -s /usr/local/share/gcm-core/Release/git-credential-manager-core /usr/local/bin/git-credential-manager-core
  3. Configure GCM using the full path: /usr/local/share/gcm-core/Release/git-credential-manager-core configure
Remove the symlinks to the GitHub and Bitbucket UI helpers in /usr/local/bin. These are not required to have the core GCM application locate the helpers and just create more noise in the user's $PATH.
@mjcheetham
Copy link
Contributor Author

Note that I'm merging this without the CodeQL task completing. It appears to be stuck (over 5 hours!)

@mjcheetham mjcheetham merged commit f1a07b1 into git-ecosystem:main Nov 18, 2021
@mjcheetham mjcheetham deleted the deb-fix branch November 18, 2021 17:29
@dscho
Copy link
Contributor

dscho commented Nov 19, 2021

Note that I'm merging this without the CodeQL task completing. It appears to be stuck (over 5 hours!)

I believe that @ldennington has fixed this by removing the CodeQL definition and adding it back. At least the latest build succeeded, after you merged: https://github.com/GitCredentialManager/git-credential-manager/actions/runs/1479362393


# Copy all binaries and shared libraries to target installation location
cp -R "$PAYLOAD" "$INSTALL_TO" || exit 1
cp -R "$PAYLOAD"/* "$INSTALL_TO" || exit 1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/

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

Labels

None yet

4 participants