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 WITH_MICROG setting #460

Closed
wants to merge 4 commits into from
Closed

Conversation

Lanchon
Copy link

@Lanchon Lanchon commented Aug 2, 2023

Introduce WITH_MICROG to replace use of WITH_GMS. Fixes #358.

PLEASE NOTE: i don't know the first thing about docker, so i didn't test this at all: i wouldn't know how to. so this might work or not, somebody else would have to test.

clearly builds not having spare space is causing many issues. there was discussions of configuring the extra space manually, which for me makes a lot of sense. unfortunately for blind batch building, it's hard to know how much spare space to allocate for each device. this patch sidesteps the issue by using whatever LOS uses (but after adding microG; hopefully it's small enough to not cause overflows).

in addition to this patch, maybe a specific setting could be added which would allow overriding the default extra space with an exact value. los4mg official builds wouldn't use it, but others might.

@petefoth
Copy link
Contributor

petefoth commented Aug 2, 2023

Thanks for this PR. Looking at #358, the discussion has not reached a conclusion over

  1. whether our use of WITH_GMS actually needs to change and
  2. if it does how best to change it.

Your approach might work, but would need to be fully tested before merging it to master. I know from experience that building without the WITH_GMS flag will cause builds to break for some devices.

See also this comment from me in the discussion of #358, for the other reasons why I won't be merging any PRs daeling with this issue anytime soon.

I am inclined to close this PR, unless anyone feels strongly that it should be kept open

@Lanchon
Copy link
Author

Lanchon commented Aug 2, 2023

See also this comment from me

i replied in that thread.

Your approach might work, but would need to be fully tested before merging it to master.

of course. it has had zero testing on my side since i don't know any docker. it's a basis, and i thought it would be quicker for los4mg to test since i assume you have tests set up for something like this. for now this patch is like code scribbled on a napkin: zero testing done.

I know from experience that building without the WITH_GMS flag will cause builds to break for some devices.

where is that info? it is strange given that los4mg used to run their builds without it before 2022. i suppose the issue to expect would be that maybe on a few devices lineagos+microg+free space might not fit in system. but crippling all devices disallowing usage of their space just because some old device doesn't have enough space seems hardly a good solution. (you could enable WITH_GMS only for those devices, but that is not the best solution either.) other than possibly this, what other issues where encountered?

@bananer and others:

WITH_MICROG builds probably fail if PRODUCT_IS_ATV or PRODUCT_IS_AUTO is defined, and the same should happen with WITH_GMS. don't test this, i'll provide an alternative.

@Lanchon Lanchon marked this pull request as draft August 2, 2023 17:22
Introduce 'WITH_MICROG' to replace use of 'WITH_GMS'. Fixes lineageos4microg#358.
@Lanchon
Copy link
Author

Lanchon commented Aug 2, 2023

@bananer

patch the inherit-product-if-exists line into common.mk with a distinct flag (i.e. WITH_MICROG). We might also rename the repo/path to vendor_partner_microg to be consistent and avoid conflicts.

yes, vendor/partner_microg/products/microg.mk is a better idea, if someone ever wants to go through the trouble. at that time, WITH_GMS should stop bundling microg, so an intermediate solution such as this one deprecating WITH_GMS but keeping it functional makes sense to have for a while.

regarding builds that reportedly fail without WITH_GMS (apparently one device, probably because a partition runs out of space with the space reserve+microg), they can be blacklisted, or built with WITH_GMS (breaks migration above), or a better solution could be found once we know which particular device it is.

an much better generic idea is to reduce the free space normally reserved by LOS builds without WITH_GMS by an amount higher than what microg uses for all partitions microg adds to (only system?), assuring that los4mg will not brake the build due eager space reservation.

for testing, i'd test one build on a real device and if ok i'd launch a build of the full roster to see what needs to be fixed if anything.

@Lanchon Lanchon marked this pull request as ready for review August 2, 2023 19:23
@Lanchon
Copy link
Author

Lanchon commented Aug 2, 2023

WITH_MICROG builds probably fail if PRODUCT_IS_ATV or PRODUCT_IS_AUTO is defined, and the same should happen with WITH_GMS. don't test this, i'll provide an alternative.

i forgot to say that i've fixed this now.

Lanchon added 3 commits August 3, 2023 03:08
This reverts commit 838ab90.

The commit would require an new 'ENV WITH_GMS false' definition.
@Lanchon
Copy link
Author

Lanchon commented Aug 4, 2023

i think here is a bug:

https://github.com/lineageos4microg/docker-lineage-cicd/blob/master/src/build.sh#L198-L200

that should be conditional to WITH_GMS (or WITH_MICROG) being true.

EDIT: or maybe to SIGNATURE_SPOOFING != no. i don't know which, i haven't looked.

@petefoth
Copy link
Contributor

petefoth commented Aug 5, 2023

Added 'Not a bug` and 'Wont merge' labels

See #358 (comment)

@petefoth
Copy link
Contributor

Closing this and issue #358

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MicroG should *not* set WITH_GMS = true
2 participants