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: Allow fetching into directory outside build directory #1380

Draft
wants to merge 1 commit into
base: staging
Choose a base branch
from

Conversation

kubanrob
Copy link
Contributor

@kubanrob kubanrob commented Apr 9, 2024

Introduce an additional path (F, FETCH_BASE) that is used for fetch targets for the builds.

There are multiple motivations for using a distinct fetch base directory:

  • Reusing downloads shared by multiple builds (eg. musl).
  • Allow building without internet access (with populated fetch base).

Prerequisite checklist

  • Read the contribution guidelines regarding submitting new changes to the project;
  • Tested your changes against relevant architectures and platforms;
  • Ran the checkpatch.uk on your commit series before opening this PR;
  • Updated relevant documentation.

Base target

  • Architecture(s): N/A
  • Platform(s): N/A
  • Application(s): N/A

Additional configuration

Build the application with the desired target directory, for example:

make F=$(pwd)/../fetch-base

For testing purposes, fetching with wget can be disabled as following:

# instead of wget, call false, which always fails
make F=$(pwd)/../fetch-base WGET=false

Description of changes

Before, the buildsystem fetched archives into $BUILD_DIR/$LIBNAME. With this commit, archives are fetched into $FETCH_BASE/$LIBNAME. By default, $FETCH_BASE is set to $BUILD_DIR, resulting in the same behaviour as before.

Further details:

  • Checksums are checked same as before.
  • Incorrect checksums lead to the build failing, no retry.
  • $FETCH_BASE does not have an effect on clone rules.

Introduce an additional path (`F`, `FETCH_BASE`) that is used for fetch
targets for the builds.

There are multiple motivations for using a distinct fetch base directory:
- Reusing downloads shared by multiple builds (eg. musl).
- Allow building without internet access (with populated fetch base).

Before, the buildsystem fetched archives into `$BUILD_DIR/$LIBNAME`.
With this commit, archives are fetched into `$FETCH_BASE/$LIBNAME`.
By default, `$FETCH_BASE` is set to `$BUILD_DIR`, resulting in the same
behaviour as before.

Further details:
- Checksums are checked same as before.
- Incorrect checksums lead to the build failing, no retry.
- `$FETCH_BASE` does not have an effect on `clone` rules.

Signed-off-by: Robert Kuban <robert.kuban@opensynergy.com>
@github-actions github-actions bot added area/makefile Part of the Unikraft Makefile build system area/support Support scripts, tools, services. labels Apr 9, 2024
@razvand razvand self-assigned this Apr 22, 2024
@razvand razvand added this to the v0.17.0 (Calypso) milestone Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/makefile Part of the Unikraft Makefile build system area/support Support scripts, tools, services.
Projects
Status: 🏗 In Progress
Development

Successfully merging this pull request may close these issues.

None yet

2 participants