Skip to content

Commit 1125046

Browse files
authored
Fix the lib not overwritten issue in docker build #33
Fix the lib not overwritten issue in docker build, to fix the wrong libcrypto.so.1.1 in docker images. The timestamp in the changelog will be used if SOURCE_DATE_EPOCH not specified, we have some patches, but not change the timestamp, so need to increase it. See https://reproducible-builds.org/specs/source-date-epoch/ When the timestamp and the file size are the same, the old files will not be overwritten, even use "dpkg -i --force-all" in docker build. But if we install it manually, not by docker build, then it works fine. The PR only changes the timestamp of the libs. Before change: # ls /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 -rw-r--r-- 1 root root 3076992 Jun 24 20:22 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 After change: # ls -l /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 -rw-r--r-- 1 root root 3076992 Jun 25 20:22 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
2 parents ac25437 + 3a0539a commit 1125046

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ $(addprefix $(TARGET_PATH)/, $(MAIN_TARGETS)) : $(TARGET_PATH)/% : $$(addprefix
5050
# Merge the debian patches if not applied
5151
if [ -f $($*_SRC_PATH).patch/debian.patch/series ]; then
5252
LAST_PATCH=$$(tail -n1 $($*_SRC_PATH).patch/debian.patch/series)
53-
if ! grep -q $$LAST_PATCH $($*_SRC_PATH)/debian/patches/series 2>/null; then
53+
if ! grep -q $$LAST_PATCH $($*_SRC_PATH)/debian/patches/series 2>/dev/null; then
5454
echo "Applying patches for $($*_SRC_PATH)/debian/patches/"
5555
cat $($*_SRC_PATH).patch/debian.patch/series >> $($*_SRC_PATH)/debian/patches/series
5656
cp $($*_SRC_PATH).patch/debian.patch/*.patch $($*_SRC_PATH)/debian/patches/
@@ -66,6 +66,8 @@ $(addprefix $(TARGET_PATH)/, $(MAIN_TARGETS)) : $(TARGET_PATH)/% : $$(addprefix
6666
fi
6767
# Fix Misc/NEWS not found issue for python
6868
if [[ "$*" == python3* ]]; then touch Misc/NEWS; fi
69+
# Fix package overwrite issue, increase the timestamp
70+
export SOURCE_DATE_EPOCH="$$(($$(dpkg-parsechangelog -STimestamp) + 86400))"
6971
$($*_BUILD_OPTIONS) dpkg-buildpackage -b -d -rfakeroot -us -uc | tee $(DEST)/$*.log
7072
popd
7173
mkdir -p $(DEST)

rules/symcrypt-openssl.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SYMCRYPT_OPENSSL
22

3-
SYMCRYPT_OPENSSL_VERSION = 0.2
3+
SYMCRYPT_OPENSSL_VERSION = 0.3
44
SYMCRYPT_OPENSSL = symcrypt-openssl_$(SYMCRYPT_OPENSSL_VERSION)_$(ARCH).deb
55
$(SYMCRYPT_OPENSSL)_SRC_PATH = $(SRC_PATH)/SymCrypt-OpenSSL-Debian
66
$(SYMCRYPT_OPENSSL)_MAKEFILE = Makefile

0 commit comments

Comments
 (0)