From ab8d38d99b7c336389d9ab336a16d49f3da4f321 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Fri, 2 Oct 2026 12:40:11 +0200 Subject: [PATCH] restool: sort source files for reproducible builds Right now the list is generated by find, which order depends of the underlying filesystem. This causes reproducibility issues within the OpenWrt build system. Fix it by adding a deterministic sort. Sent to upstream via https://github.com/nxp-qoriq/restool/pull/3 Link: https://github.com/openwrt/openwrt/pull/25531 Signed-off-by: Paul Spooren --- .../network/utils/layerscape/restool/Makefile | 2 +- .../001-Makefile-sort-source-files.patch | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 package/network/utils/layerscape/restool/patches/001-Makefile-sort-source-files.patch diff --git a/package/network/utils/layerscape/restool/Makefile b/package/network/utils/layerscape/restool/Makefile index eecc8d5a0d8..f0a3a4625af 100644 --- a/package/network/utils/layerscape/restool/Makefile +++ b/package/network/utils/layerscape/restool/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=restool PKG_VERSION:=6.18.2.1.0.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/nxp-qoriq/restool diff --git a/package/network/utils/layerscape/restool/patches/001-Makefile-sort-source-files.patch b/package/network/utils/layerscape/restool/patches/001-Makefile-sort-source-files.patch new file mode 100644 index 00000000000..8f27a3f7eb1 --- /dev/null +++ b/package/network/utils/layerscape/restool/patches/001-Makefile-sort-source-files.patch @@ -0,0 +1,28 @@ +From 7eaf41b04bd2a2b8775c1feb91a631236182bf86 Mon Sep 17 00:00:00 2001 +From: Paul Spooren +Date: Fri, 2 Oct 2026 12:33:51 +0200 +Subject: [PATCH] Makefile: sort source files for reproducible builds + +Right now the list is generated by find, which order depends of the underlying +filesystem. This causes reproducibility issues within the OpenWrt build system. + +Fix it by adding a deterministic sort. + +Signed-off-by: Paul Spooren +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index a3d1599..461100d 100644 +--- a/Makefile ++++ b/Makefile +@@ -2,7 +2,7 @@ ifeq ($(origin CC),default) + CC := $(CROSS_COMPILE)gcc + endif + +-SRC = $(shell find . -name "*.c") ++SRC = $(sort $(shell find . -name "*.c")) + OBJ = $(patsubst %.c, %.o, $(SRC)) + MANPAGE ?= restool.1 + RESTOOL_SCRIPT_SYMLINKS = ls-addmux ls-addsw ls-addni ls-listni ls-listmac ls-delete