mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-09 17:03:35 -09:00
eaa81141919351a8adbe2db0bf20608e31c73785
TestGitHash and TestGitRefs are failing on Gitlab-CI since 2025-08-18 (first runtime-test failures report for master) [1] due a new Gitlab-CI security settings that prevents the any use of localhost (127.0.0.1) on the Gitlab-CI runner [2]: "To prevent exploitation of insecure internal web services, all webhook and integration requests to the following local network addresses are not allowed: Private network addresses, including 127.0.0.1, ::1, 0.0.0.0, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, and IPv6 site-local (ffc0::/10) addresses." Gitlab suggest using a second container as a Services [3] since each containers have access to one another and can communicate when running the job. But this is really not practical to run git daemon since the service is started before the Buildroot git tree is fetched and git daemon needs git-remote directory content. See [4]: "If you have your service that tries to write to CI_PROJECT_DIR immediately after it's started - it will not work and fail with an error like '/builds/nknapp/gitlab-ci-test/': No such file or directory error. Because that directory is most probably not there yet, as the job step that creates it is yet to be executed!" Also, using Gitlab-CI services requires to handle GitTestBase setUp differently on Gitlab-CI than local use of run-tests. So Gitlab-CI services is not an option. We could move support/testing/tests/download/git-remote to our Gitlab group (https://gitlab.com/buildroot.org) but since it's only intended for testing the git download backend, we don't really want to do that. So the only remaining choice to clone the repository from the Buildroot git tree (local machine). To do so, we have to do the following changes: - Replace all "git://localhost:$(GITREMOTE_PORT_NUMBER)" by "$(GITREMOTE_DIR)". GITREMOTE_DIR will contain the absolute path to tests/download/git-remote directory. - Force to use git download backend using "SITE_METHOD = git" otherwise the download infra will fall back using wget download backend. - Cloning a git repository with submodules using the "file://" protocol needs to be allowed from git config. It's disabled by default: "fatal: transport 'file' not allowed" Use a local gitconfig file generated by GitTestBase before starting TestGitHash and TestGitRefs with: [protocol "file"] allow = always This is considered safe since we are using a git repository from the Buildroot git tree. - Running TestGitHash and TestGitRefs on Gitlab-CI requires additional git config settings to disable ownership check of the git tree [5]. Thanks to Arnout for advices about GIT_CONFIG_GLOBAL. Runtime tested: https://gitlab.com/kubu93/buildroot/-/jobs/11428504450 (TestGitHash) https://gitlab.com/kubu93/buildroot/-/jobs/11428490035 (TestGitRefs) [1] https://lore.kernel.org/buildroot/68a3ee65.500a0220.397724.30db@mx.google.com/ [2] https://docs.gitlab.com/security/webhooks/#allow-requests-to-the-local-network-from-webhooks-and-integrations [3] https://docs.gitlab.com/ci/services/ [4] https://gitlab.com/gitlab-org/gitlab-runner/-/issues/25982#note_2139685797 [5]a016b693f7Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/11271124174 (TestGitHash) https://gitlab.com/buildroot.org/buildroot/-/jobs/11271124173 (TestGitRefs) Cc: Arnout Vandecappelle <arnout@rnout.be> Signed-off-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Julien Olivain <ju.o@free.fr> (cherry picked from commita367362af0) Signed-off-by: Thomas Perale <thomas.perale@mind.be>
…
…
…
Buildroot is a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-compilation. The documentation can be found in docs/manual. You can generate a text document with 'make manual-text' and read output/docs/manual/manual.text. Online documentation can be found at http://buildroot.org/docs.html To build and use the buildroot stuff, do the following: 1) run 'make menuconfig' 2) select the target architecture and the packages you wish to compile 3) run 'make' 4) wait while it compiles 5) find the kernel, bootloader, root filesystem, etc. in output/images You do not need to be root to build or run buildroot. Have fun! Buildroot comes with a basic configuration for a number of boards. Run 'make list-defconfigs' to view the list of provided configurations. Please feed suggestions, bug reports, insults, and bribes back to the buildroot mailing list: buildroot@buildroot.org You can also find us on #buildroot on OFTC IRC. If you would like to contribute patches, please read https://buildroot.org/manual.html#submitting-patches
Description
Languages
Makefile
62.6%
Python
18.8%
C
8.5%
Shell
6.1%
PHP
1.4%
Other
2.2%