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

Fix reproducible builds #9709

Merged
merged 1 commit into from Jan 24, 2023
Merged

Fix reproducible builds #9709

merged 1 commit into from Jan 24, 2023

Conversation

Stypox
Copy link
Member

@Stypox Stypox commented Jan 20, 2023

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

We want to have reproducible builds on F-Droid so that they can ship our own APK signed with our keys, which would prevent some uninstalling and reinstalling when users switch sources.
All credits for the fix go to @obfusk, also see https://issuetracker.google.com/issues/231837768. It has been confirmed that this works here.

Fixes the following issue(s)

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.

Due diligence

@sonarcloud
Copy link

sonarcloud bot commented Jan 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@SameenAhnaf SameenAhnaf added the meta Related to the project but not strictly to code label Jan 20, 2023
Copy link
Member

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! I don't have time to check this, but I you guys found a fix, I am more than happy!

@obfusk
Copy link

obfusk commented Jan 20, 2023

I'm fairly confident the fix works correctly as it simply reuses the relevant AGP code (and I've tested it works).

I can't guarantee it won't break if something changes in AGP though.

And it's a bit ugly since it uses some kotlin functions/variables marked internal (which the JVM doesn't enforce, so I can).

I'm also not that familiar with groovy, so the code could probably be written more idiomatically.

@opusforlife2
Copy link
Collaborator

@obfusk Are the Reproducible Builds people aware of this? They might want to take it up with Google.

@Stypox
Copy link
Member Author

Stypox commented Jan 21, 2023

He posted the fix in the Google issue tracker: https://issuetracker.google.com/issues/231837768

@obfusk
Copy link

obfusk commented Jan 21, 2023

@obfusk Are the Reproducible Builds people aware of this?

We are ;p

@opusforlife2
Copy link
Collaborator

Nice to see that there is some personnel overlap between the two projects!

@obfusk
Copy link

obfusk commented Jan 22, 2023

He posted the fix in the Google issue tracker: https://issuetracker.google.com/issues/231837768

I posted my workaround there and told them exactly what & where the problem in the AGP code is.
So it should be trivial to fix now. Hopefully they'll do that soon.

Also: who's "he"? If you meant me, I use "they"(/them) :)

@obfusk
Copy link

obfusk commented Jan 23, 2023

So it should be trivial to fix now. Hopefully they'll do that soon.

They fixed it.

Not sure when it'll be part of a new AGP release; that'll take a while longer I expect.

@Stypox
Copy link
Member Author

Stypox commented Jan 23, 2023

Sorry about the "He", I sometimes forget to use "They" for people I don't know ;-)

@obfusk
Copy link

obfusk commented Jan 24, 2023

Not sure when it'll be part of a new AGP release; that'll take a while longer I expect.

The .profm fix will be in AGP 8.1.0-alpha03; so I guess we'll probably need the workaround for a while.

@TobiGr TobiGr merged commit 444ac5f into TeamNewPipe:dev Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Related to the project but not strictly to code
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

doesn't build reproducibly (due to bug in coreLibraryDesugaring)
5 participants