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

build: export GIT_CEILING_DIRECTORIES for package builds #12710

Closed

Conversation

jefferyto
Copy link
Member

A package may run git as part of its build process, and if the package source code is not from a git checkout, then git may traverse up the directory tree to find buildroot's repository directory (.git).

For instance, Poetry Core, a Python build backend, will read the contents of .gitignore for paths to exclude when creating a Python package. If it finds buildroot's .gitignore file, then Poetry Core will exclude all of the package's files.

This exports GIT_CEILING_DIRECTORIES for both package and host builds so that git will not traverse beyond $(BUILD_DIR)/$(BUILD_DIR_HOST).

A package may run git as part of its build process, and if the package
source code is not from a git checkout, then git may traverse up the
directory tree to find buildroot's repository directory (.git).

For instance, Poetry Core, a Python build backend, will read the
contents of .gitignore for paths to exclude when creating a Python
package. If it finds buildroot's .gitignore file, then Poetry Core will
exclude all of the package's files[1].

This exports GIT_CEILING_DIRECTORIES for both package and host builds so
that git will not traverse beyond $(BUILD_DIR)/$(BUILD_DIR_HOST).

[1]: python-poetry/poetry#5547

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
@github-actions github-actions bot added the build/scripts/tools pull request/issues for build, scripts and tools related changes label May 23, 2023
@jefferyto
Copy link
Member Author

Would appreciate if someone can take a look at this - anyone trying to build a Poetry-dependent package (like python-dns and python-astral) using a git checkout of buildroot (not the sdk) will get an error: openwrt/packages#20994 (comment)

@1715173329
Copy link
Member

Ping @aparcar @PolynomialDivision

@aparcar aparcar self-assigned this May 31, 2023
@jefferyto
Copy link
Member Author

I sent this to the mailing list and it has been accepted (f597f34), closing.

@jefferyto jefferyto closed this May 31, 2023
@jefferyto jefferyto deleted the build-git-ceiling-directories branch May 31, 2023 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build/scripts/tools pull request/issues for build, scripts and tools related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants