Discussion:
[whispersystems] Compiling source from zipfile
Johan Wevers
2016-03-28 12:19:37 UTC
Permalink
When I check out the Signal source with Git I can compile it fine with
Android Studio. However, I used to be able to compile the source just
from the downloaded zipfile. When I try that now, I get an error since
https://github.com/WhisperSystems/Signal-Android/commit/8704daa5f8e7949d70523bfd10e276df88800608
:

I get an error on getLastCommitTimestamp() in build.gradle, which is
used to determine when the binary should expire. Apparently the change
is there to prevent someobe from building Signal later and have it
expire later too. Not that I use it in my own builds, I hate such
planned expiration and remove the functionality entirely, but why was
this changed? When I reverse that change in build.gradle the project
builds fine from the zipfile.
--
Met vriendelijke groet,

Johan Wevers
Sam Lanning
2016-03-28 12:33:30 UTC
Permalink
Hi Johan,

This change is due to work towards making builds more
deterministic/reproducible. (so that other people can eventually verify the
play store builds etc). This is currently a Work in Progress.

Cheers,
Sam.
Post by Johan Wevers
When I check out the Signal source with Git I can compile it fine with
Android Studio. However, I used to be able to compile the source just
from the downloaded zipfile. When I try that now, I get an error since
https://github.com/WhisperSystems/Signal-Android/commit/8704daa5f8e7949d70523bfd10e276df88800608
I get an error on getLastCommitTimestamp() in build.gradle, which is
used to determine when the binary should expire. Apparently the change
is there to prevent someobe from building Signal later and have it
expire later too. Not that I use it in my own builds, I hate such
planned expiration and remove the functionality entirely, but why was
this changed? When I reverse that change in build.gradle the project
builds fine from the zipfile.
--
Met vriendelijke groet,
Johan Wevers
"Carey Metcalfe" (via whispersystems Mailing List)
2016-03-29 14:31:01 UTC
Permalink
Seems like the problem isn't anything to do with reproducible builds, but
that the system call to git isn't being checked for errors.

When downloading from the zip file, there is no ".git" folder so the "git
log" command that's being executed will return an error, breaking the build.

A simple fix is to wrap the call in a try/catch. This allows a fallback for
people who use the zip instead of cloning the repo.

Carey
Post by Sam Lanning
Hi Johan,
This change is due to work towards making builds more
deterministic/reproducible. (so that other people can eventually verify the
play store builds etc). This is currently a Work in Progress.
Cheers,
Sam.
Post by Johan Wevers
When I check out the Signal source with Git I can compile it fine with
Android Studio. However, I used to be able to compile the source just
from the downloaded zipfile. When I try that now, I get an error since
https://github.com/WhisperSystems/Signal-Android/commit/8704daa5f8e7949d70523bfd10e276df88800608
I get an error on getLastCommitTimestamp() in build.gradle, which is
used to determine when the binary should expire. Apparently the change
is there to prevent someobe from building Signal later and have it
expire later too. Not that I use it in my own builds, I hate such
planned expiration and remove the functionality entirely, but why was
this changed? When I reverse that change in build.gradle the project
builds fine from the zipfile.
--
Met vriendelijke groet,
Johan Wevers
"Carey Metcalfe" (via whispersystems Mailing List)
2016-03-31 14:13:44 UTC
Permalink
As a followup, I fixed the issue, but the patch wasn't accepted since
builds outside of git are no longer supported.

See https://github.com/WhisperSystems/Signal-Android/pull/5398
Post by "Carey Metcalfe" (via whispersystems Mailing List)
Seems like the problem isn't anything to do with reproducible builds, but
that the system call to git isn't being checked for errors.
When downloading from the zip file, there is no ".git" folder so the "git
log" command that's being executed will return an error, breaking the build.
A simple fix is to wrap the call in a try/catch. This allows a fallback
for people who use the zip instead of cloning the repo.
Carey
Post by Sam Lanning
Hi Johan,
This change is due to work towards making builds more
deterministic/reproducible. (so that other people can eventually verify the
play store builds etc). This is currently a Work in Progress.
Cheers,
Sam.
Post by Johan Wevers
When I check out the Signal source with Git I can compile it fine with
Android Studio. However, I used to be able to compile the source just
from the downloaded zipfile. When I try that now, I get an error since
https://github.com/WhisperSystems/Signal-Android/commit/8704daa5f8e7949d70523bfd10e276df88800608
I get an error on getLastCommitTimestamp() in build.gradle, which is
used to determine when the binary should expire. Apparently the change
is there to prevent someobe from building Signal later and have it
expire later too. Not that I use it in my own builds, I hate such
planned expiration and remove the functionality entirely, but why was
this changed? When I reverse that change in build.gradle the project
builds fine from the zipfile.
--
Met vriendelijke groet,
Johan Wevers
Loading...