From b3be0ce99b29e5384969c7b3e5ff6f4b0f581c4b Mon Sep 17 00:00:00 2001 From: Levente Polyak Date: Mon, 11 May 2020 00:45:49 +0200 Subject: makepkg: deterministic PKGINFO libprovides for multiple library versions While iterating over the provides array, the find call for locating a shared library may result in listing multiple entries which by itself does not produce a stable deterministic order and may vary depending on the underlying filesystem. To provide a stable listing and a reproducible .PKGINFO file the result of find is piped to sort with a static LC_ALL=C localisation. Signed-off-by: Levente Polyak Signed-off-by: Allan McRae (cherry picked from commit 8ce142a2552418f64a74e773f659d92b065d6209) --- scripts/makepkg.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index dd9a592b..c928e562 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -526,7 +526,7 @@ find_libprovides() { missing=0 case "$p" in *.so) - mapfile -t filename < <(find "$pkgdir" -type f -name $p\*) + mapfile -t filename < <(find "$pkgdir" -type f -name $p\* | LC_ALL=C sort) if [[ $filename ]]; then # packages may provide multiple versions of the same library for fn in "${filename[@]}"; do -- cgit v1.2.3-24-g4f1b