reproducible builds by obfusk · Pull Request #2390 · kivy/python-for-android (original) (raw)
NB: can be done in subsequent PRs.
NB: you need to export something like this in your build environment to get reproducible builds.
export LC_ALL := C export TZ := UTC export SOURCE_DATE_EPOCH := $(shell git log -1 --pretty=%ct) export PYTHONHASHSEED := $(SOURCE_DATE_EPOCH) export BUILD_DATE := (shellLCALL=CTZ=UTCdate+′(shell LC_ALL=C TZ=UTC date +'%b %e %Y' -d @(shellLCALL=CTZ=UTCdate+′(SOURCE_DATE_EPOCH)) export BUILD_TIME := (shellLCALL=CTZ=UTCdate+′(shell LC_ALL=C TZ=UTC date +'%H:%M:%S' -d @(shellLCALL=CTZ=UTCdate+′(SOURCE_DATE_EPOCH))
--- 1.apk
+++ 2.apk
├── zipinfo {}
│ @@ -1,17 +1,17 @@
│ -Zip file size: 86458780 bytes, number of entries: 15
│ +Zip file size: 86458783 bytes, number of entries: 15
│ -rw---- 0.0 fat 3848 b- defN 80-000-00 00:00 AndroidManifest.xml
│ -rw---- 2.4 fat 87 b- defN 80-000-00 00:00 META-INF/MANIFEST.MF
│ -rw---- 2.4 fat 83167080 bx stor 80-000-00 00:00 assets/private.mp3
│ -rw---- 2.4 fat 46652 b- defN 80-000-00 00:00 classes.dex
│ -rw---- 2.4 fat 3266024 b- defN 80-000-00 00:00 lib/arm64-v8a/libcrypto1.1.so
│ -rw---- 2.4 fat 55416 b- defN 80-000-00 00:00 lib/arm64-v8a/libffi.so
│ -rw---- 2.4 fat 18440 b- defN 80-000-00 00:00 lib/arm64-v8a/libmain.so
│ -rw---- 2.4 fat 739504 b- defN 80-000-00 00:00 lib/arm64-v8a/libpcre.so
│ -rw---- 2.4 fat 3239808 b- defN 80-000-00 00:00 lib/arm64-v8a/libpython3.9.so
│ -rw---- 2.4 fat 1215048 b- defN 80-000-00 00:00 lib/arm64-v8a/libsqlite3.so
│ -rw---- 2.4 fat 749216 b- defN 80-000-00 00:00 lib/arm64-v8a/libssl1.1.so
│ --rw---- 2.4 fat 11251 b- stor 80-000-00 00:00 res/drawable/icon.png
│ +-rw---- 2.4 fat 11251 bx stor 80-000-00 00:00 res/drawable/icon.png
│ -rw---- 2.4 fat 11584 bx stor 80-000-00 00:00 res/drawable/presplash.jpg
│ -rw---- 0.0 fat 544 b- defN 80-000-00 00:00 res/layout/main.xml
│ -rw---- 0.0 fat 1092 bx stor 80-000-00 00:00 resources.arsc
│ -15 files, 92525594 bytes uncompressed, 86456914 bytes compressed: 6.6%
│ +15 files, 92525594 bytes uncompressed, 86456903 bytes compressed: 6.6%
├── lib/arm64-v8a/libpython3.9.so
│ ├── objdump --line-numbers --disassemble --demangle --reloc --no-show-raw-insn --section=.text {}
│ │ @@ -190721,18 +190721,18 @@
│ │ sub w13, w10, #0x1
│ │ cmp w14, #0xff
│ │ b.ne 1b8ddc <PyUnicode_BuildEncodingMap@@Base+0x668> // b.any
│ │ add w16, w9, #0x1
│ │ strb w9, [x20, x15]
│ │ mov w14, w9
│ │ mov w9, w16
│ │ - and w12, w12, #0x7f
│ │ - and w14, w14, #0xff
│ │ - bfi w12, w14, #7, #8
│ │ - strb w13, [x21, w12, uxtw]
│ │ + and x12, x12, #0x7f
│ │ + and x14, x14, #0xff
│ │ + bfi x12, x14, #7, #8
│ │ + strb w13, [x21, x12]
│ │ sxtw x12, w10
│ │ cmp x25, x12
│ │ add w10, w10, #0x1
│ │ b.gt 1b8da0 <PyUnicode_BuildEncodingMap@@Base+0x62c>
│ │ b 1b87c4 <PyUnicode_BuildEncodingMap@@Base+0x50>
│ │
│ │ 00000000001b8e00 <_PyUnicode_EncodeCharmap@@Base>: