Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added code to set GIT_EXEC_PATH and the tests #83

Closed
wants to merge 2 commits into from

Conversation

tiff-ritz
Copy link

This is in response to Issue 137 in the heroku-buildpack-apt repo.

If git is in the project.toml file - make sure GIT_EXEC_PATH is correctly defined after successful installation or if it is already installed.

Added unit tests

@tiff-ritz tiff-ritz requested a review from a team as a code owner December 23, 2024 14:48
@tiff-ritz tiff-ritz marked this pull request as draft December 23, 2024 15:53
@tiff-ritz tiff-ritz marked this pull request as ready for review December 23, 2024 18:15
…omStr implementation to debian::MultiarchName in order to implement a unit test

document adding GIT_EXEC_PATH in the readme table of environment variables
@tiff-ritz
Copy link
Author

Adding each env var to the code is not a feasable approach long term. Kept this work in a branch in my fork

Closing this PR and am going to open a new one with my configurable environment variable solution.

@tiff-ritz tiff-ritz closed this Dec 27, 2024
@edmorley
Copy link
Member

Adding each env var to the code is not a feasable approach long term

So whilst normally I would agree, I think we do need to add handling in this CNB for commonly used packages (by setting specific env vars), since otherwise it leads to poor UX if such packages don't work out of the box.

@tiff-ritz
Copy link
Author

tiff-ritz commented Dec 27, 2024

Adding each env var to the code is not a feasable approach long term

So whilst normally I would agree, I think we do need to add handling in this CNB for commonly used packages (by setting specific env vars), since otherwise it leads to poor UX if such packages don't work out of the box.

In another PR, I extended the project.toml file:

[_]
schema-version = "0.2"

[com.heroku.buildpacks.deb-packages]
install = [
    { name = "git", 
      env = { "GIT_EXEC_PATH" = "{install_dir}/usr/lib/git-core", 
              "GIT_TEMPLATE_DIR" = "{install_dir}/usr/share/git-core/templates" }
    },
    { name = "babeld" },
    { name = "ghostscript",
      skip_dependencies = true,
      force = true,
      env = { "GS_LIB" = "{install_dir}/var/lib/ghostscript" }
    },
]

so these can be defined per package and added after the installation.

I understand what you are saying about working out of the box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants