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

add mainline kernel mirror support #5633

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

amazingfate
Copy link
Contributor

Description

Mainline mirror is not supported since armbian-next. Current code support google, tuna and bfsu as mainline kernel source: https://github.com/armbian/build/blob/main/lib/functions/configuration/main-config.sh#L170-L187. We have to use kernel source from git.kernel.org to support curl.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

  • Build with MAINLINE_MIRROR=tuna

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@amazingfate amazingfate requested a review from a team as a code owner August 23, 2023 03:53
@hzyitc
Copy link
Member

hzyitc commented Aug 23, 2023

Not a good idea.

It will get wrong data when sync in progress.

@amazingfate
Copy link
Contributor Author

Not a good idea.

It will get wrong data when sync in progress.

We use mirror for fast speed, not for up-to-date data.

@amazingfate
Copy link
Contributor Author

We will first get commit sha1 from mirror source, and then download the Makefile from git.kernel.org:

--> (2) INFO: Producing new & caching [ GIT_INFO_KERNEL ]

--> (2) INFO: Fetching SHA1 of 'branch' 'refs/heads/linux-6.4.y' [ https://mirrors.tuna.tsinghua.edu.cn/git/linux-stable.git ]

--> (2) INFO: SHA1 of branch refs/heads/linux-6.4.y [ 'eb3cdb587879a7794c7f649011c565d7a94f3e2e' ]

--> (2) DEBUG: Fetching Makefile body [ linux-6.4.y ]

--> (2) DEBUG: Fetching Makefile via HTTP [ https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/plain/Makefile?h=eb3cdb587879a7794c7f649011c565d7a94f3e2e ]

--> (6) DEBUG: Fetched Makefile from URL [ https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/plain/Makefile?h=eb3cdb587879a7794c7f649011c565d7a94f3e2e ]

So we will always get correct data @hzyitc

@rpardini
Copy link
Member

Well -- if the mirror is lagging behind, the SHA1 returned will be old, but will still exist on git.kernel.org, and although there is a chance you'll get an older version, it will work.
The alternative would be to do the main SHA1 lookup on kernel.org, then try to use the mirror, which would not have that SHA1 and fail.

@igorpecovnik igorpecovnik added the Ready to merge Reviewed, tested and ready for merge label Aug 23, 2023
@igorpecovnik igorpecovnik merged commit 1eaf25a into armbian:main Aug 23, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready to merge Reviewed, tested and ready for merge
Development

Successfully merging this pull request may close these issues.

None yet

4 participants