Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

Reproducible build fails

Open expiringplatform opened this issue 1 year ago • 1 comments

  • [x] I have searched open and closed issues for duplicates
  • [x] I am submitting a bug report for existing functionality that does not work as intended
  • [x] I have read https://github.com/signalapp/Signal-Android/wiki/Submitting-useful-bug-reports
  • [x] This isn't a feature request or a discussion topic

Bug description

When trying to build version 7.2.1 using the instructions from https://github.com/signalapp/Signal-Android/blob/main/reproducible-builds/README.md the build fails with the error show below. A similar looking issue is described in the community forum The automated pipeline for reproducible builds seems to be failing since some weeks.

Error message:

> Configure project :Signal-Android
fatal: detected dubious ownership in repository at '/project'
To add an exception for this directory, call:

	git config --global --add safe.directory /project

FAILURE: Build failed with an exception.

* Where:
Build file '/project/app/build.gradle.kts' line: 617

* What went wrong:
Process 'command 'git'' finished with non-zero exit value 128

Steps to reproduce

  • Clone the repo
  • Checkout v7.2.1
  • Following the reproducible build instructions build the docker image and run the build

Actual result: The build fails with the above error message Expected result: The build finishes successfully

Screenshots

Device info

Device: n/a Android version: n/a Signal version: 7.2.1

Link to debug log

Full output: https://gist.github.com/expiringplatform/652befb79f309daee9a26083b26957e1

expiringplatform avatar Apr 01 '24 13:04 expiringplatform

I have the same issue for version v7.1.3.

However, adding git config --global --add safe.directory /project to the reproducible-builds/Dockerfile seems to work as a workaround for me at the time.

e.g.:

diff --git a/reproducible-builds/Dockerfile b/reproducible-builds/Dockerfile
index 80c01db1bd..90ed823cf3 100644
--- a/reproducible-builds/Dockerfile
+++ b/reproducible-builds/Dockerfile
@@ -32,3 +32,5 @@ RUN yes | sdkmanager --sdk_root="${ANDROID_HOME}" "platforms;${ANDROID_API_LEVEL
 RUN yes | sdkmanager --licenses --sdk_root="${ANDROID_HOME}"
 
 RUN rm -rf ${ANDROID_HOME}/tools
+
+RUN git config --global --add safe.directory /project

ElNatcho avatar Apr 15 '24 15:04 ElNatcho

I'll be working on solving this issue. Contributing to this open source project for a school assignment.

dalamsya50 avatar May 01 '24 15:05 dalamsya50