[4/7,releng] Cleanup ldconfig aux-cache

Message ID 20190907112240.1028433-5-git@esotericnonsense.com
State New
Headers show
Series
  • Making archiso deterministic
Related show

Commit Message

Daniel Edgecumbe Sept. 7, 2019, 11:22 a.m. UTC
This file appears to be generated non-deterministically. It's not
necessary, so just remove it.

Motivation: https://reproducible-builds.org

Signed-off-by: Daniel Edgecumbe <git@esotericnonsense.com>
---
 archiso/mkarchiso | 5 +++++
 1 file changed, 5 insertions(+)

Patch

diff --git a/archiso/mkarchiso b/archiso/mkarchiso
index 7b715ee..383a967 100755
--- a/archiso/mkarchiso
+++ b/archiso/mkarchiso
@@ -1,6 +1,7 @@ 
 #!/bin/bash
 # SPDX-License-Identifier: GPL-2.0
 # Copyright (C) 2005-2019 Arch Linux Release Engineering Team
+# Copyright (C) 2019 Daniel Edgecumbe <email@esotericnonsense.com>
 
 set -e -u
 
@@ -196,6 +197,10 @@  _cleanup () {
     if [[ -d "${work_dir}/airootfs/var/tmp" ]]; then
         find "${work_dir}/airootfs/var/tmp" -mindepth 1 -delete
     fi
+    # Reproducibility: delete ldconfig aux-cache
+    if [[ -f "${work_dir}/airootfs/var/cache/ldconfig/aux-cache" ]]; then
+        rm "${work_dir}/airootfs/var/cache/ldconfig/aux-cache"
+    fi
     # Delete package pacman related files.
     find "${work_dir}" \( -name "*.pacnew" -o -name "*.pacsave" -o -name "*.pacorig" \) -delete
     _msg_info "Done!"