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

Update submodules to version 33.0.3 #100

Merged
merged 1 commit into from
Nov 29, 2022
Merged

Conversation

Biswa96
Copy link
Collaborator

@Biswa96 Biswa96 commented Nov 29, 2022

Changes:

  • Add install path in CI.
  • Update patch in patches/native.
  • Add upstream patch in patches/core.
  • Define HAVE_REALLOCARRAY macro for libsepol in Linux.

Changes:
  * Add install path in CI.
  * Update patch in patches/native.
  * Add upstream patch in patches/core.
  * Define HAVE_REALLOCARRAY macro for libsepol in Linux.
@Biswa96 Biswa96 requested review from nmeum and anatol November 29, 2022 14:06
@nmeum
Copy link
Owner

nmeum commented Nov 29, 2022

Thanks a lot, should probably also add a sanity check to the build system or the CI to make sure that this doesn't happen again in the future.

@nmeum nmeum merged commit 692737d into nmeum:master Nov 29, 2022
@Biswa96 Biswa96 deleted the update-submodules branch November 29, 2022 14:48
@Biswa96
Copy link
Collaborator Author

Biswa96 commented Nov 29, 2022

should probably also add a sanity check to the build system or the CI

Is there any way do that? I have thought about some ways but there is always a catch. Thoughts

  1. Using a shell script with bunch of git clone --depth=1 <submodule url> <submodule path>. But shell script is not allowed and it may not 'validate' if the commit hash in submodule is right.
  2. Using FetchContent_Populate() with specific tag in cmake. But the gerrit provided tarball changes in every download. Also tried with https://github.com/aosp-mirror but not all repositories are not present there.
  3. Using git submodule set-branch -b platform-tools-33.0.3 with all submodules. But it may require to clone the entire repository to change the branch. With near GBs of repository, it'll hammer the storage drive :)

@Biswa96
Copy link
Collaborator Author

Biswa96 commented Nov 29, 2022

Someone suggested a link with dependabot with git submodules option https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem. I shall read the documentation and let you know.

Another idea is to remove the git submodule entirely and use a file with all submodules' SHA and a python script like this https://github.com/google/shaderc/blob/main/DEPS

@nmeum
Copy link
Owner

nmeum commented Dec 2, 2022

should probably also add a sanity check to the build system or the CI

Is there any way do that? I have thought about some ways but there is always a catch.

Maybe I am missing something here, but I think we can just use CMake to check that the current commit matches the tip of plattform-tools-${ANDROID_VERSION} branch/tag before we apply the patches in the for-loop in vendor/CMakeLists.txt:

foreach(v ${android-vendored})
file(GLOB patches ${ANDROID_PATCH_DIR}/${v}/*.patch)
if(patches)
message(STATUS "Applying patches for: ${v}")
execute_process(COMMAND git -C
${CMAKE_CURRENT_SOURCE_DIR}/${v} am ${patches}
RESULT_VARIABLE ret)
if(NOT "${ret}" STREQUAL "0")
message(FATAL_ERROR "Couldn't apply patches for ${v}")
endif()
endif(patches)
endforeach(v)

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.

2 participants