[1/1] dpkg-raw: sort .install for reproducible meta-data

Message ID 20251109135102.3586598-2-cedric.hombourger@siemens.com
State Accepted, archived
Headers show
Series dpkg-raw: sort .install for reproducible meta-data | expand

Commit Message

Cedric Hombourger Nov. 9, 2025, 1:51 p.m. UTC
dpkg-raw creates a .install file listing files found in ${D},
the order in which files/directories are being listed is not
deterministic if they aren't sorted: apply "sort" to the
"find" command.

Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
---
 meta/classes/dpkg-raw.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/meta/classes/dpkg-raw.bbclass b/meta/classes/dpkg-raw.bbclass
index d4cb7d8a..ba756eef 100644
--- a/meta/classes/dpkg-raw.bbclass
+++ b/meta/classes/dpkg-raw.bbclass
@@ -23,7 +23,7 @@  do_prepare_build[cleandirs] += "${S}/debian"
 do_prepare_build() {
 	cd ${D}
 	find . -maxdepth 1 ! -name .. -and ! -name . -and ! -name debian | \
-		sed 's:^./::' > ${S}/debian/${PN}.install
+		sed 's:^./::' | sort > ${S}/debian/${PN}.install
 
 	deb_debianize