Skip to content

Commit 497ef0c

Browse files
committed
chore: Attempt to make reproducible builds
Rustc still does not have complete support for fully reproducible builds (rust-lang/rust#75362). Attempt to narrow the gap by following the advice from (rust-lang/rust#102299) and overwrite all panic paths with a different, consistent value.
1 parent b42b5fd commit 497ef0c

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ strip = true
99
opt-level = "z" # Optimize for size.
1010
lto = true
1111
codegen-units = 1
12+
panic = "abort"

you-have-mail-android/app/build.gradle

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ android {
1313
applicationId "dev.lbeernaert.youhavemail"
1414
minSdk 29
1515
targetSdk 33
16-
versionCode 19
17-
versionName "0.7.1"
16+
versionCode 20
17+
versionName "0.7.2"
1818

1919
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2020
vectorDrawables {
@@ -89,6 +89,13 @@ cargo {
8989
/*features {
9090
defaultAnd("null_backend")
9191
}*/
92+
93+
// Ensure paths are consistent for reproducible builds.
94+
exec { spec, _ ->
95+
var home = "$System.env.HOME"
96+
var pwd = "$System.env.PWD"
97+
spec.environment("RUSTFLAGS", "--remap-path-prefix=${home}=/remap --remap-path-prefix=${pwd}=/remap --remap-path-prefix=/builds/AngryPixel/frdroid-data/build/dev.lbeernaert.youhavemail=/remap")
98+
}
9299
}
93100

94101
tasks.whenTaskAdded { task ->

you-have-mail-common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ secrecy = "0.8"
2222
crossbeam-channel = "0.5"
2323

2424
[dependencies.proton-api-rs]
25-
version = "0.8.0"
25+
version = "0.8.1"
2626
optional = true
2727
features = ["http-ureq"]
2828

0 commit comments

Comments
 (0)