Telegram icon indicating copy to clipboard operation
Telegram copied to clipboard

Fix reproducible builds

Open BarbossHack opened this issue 4 months ago • 1 comments

Actually, Telegram builds are no longer reproducible, following these instructions: https://core.telegram.org/reproducible-builds#reproducible-builds-for-android

Why?

Telegram now releases new versions as a single squashed commit and no longer follows the internal upstream structure.

The official Telegram.apk contains a file named META-INF/version-control-info.textproto, whose contents for version 12.1.1_6211 is:

repositories {
  system: GIT
  local_root_path: "$PROJECT_DIR"
  revision: "2be8161b47effc4ba67ee8f230a252e50c8d3df4"
}

However, the commit 2be8161b47effc4ba67ee8f230a252e50c8d3df4 does not exists on this repository. When we build Telegram Android ourselves, the file contains:

repositories {
  system: GIT
  local_root_path: "$PROJECT_DIR"
  revision: "9cbf03332a5a68fce3e616852d7dc929022c8441"
}

which corresponds to the actual commit for version 12.1.1_6211

Solution

The solution is to add META-INF/version-control-info.textproto in the ignored files list in apkdiff.py

BarbossHack avatar Oct 21 '25 21:10 BarbossHack

or add into assemble configuration vcsInfo.include = false ¯_(ツ)_/¯

null-nick avatar Oct 22 '25 09:10 null-nick