From 246072bd3e23736ab8e73474df2be336b6a303b5 Mon Sep 17 00:00:00 2001 From: Yoann Congal Date: Wed, 2 Apr 2025 00:12:49 +0200 Subject: cmatrix: Fix host-based non-reproducibility cmatrix configuration code choose where to install fonts based on what directory exists on build host. This is not reproducible[0]. Remove the existence check and change the lists to the ones matching OpenEmbedded paths. [0]: https://autobuilder.yoctoproject.org/valkyrie/#/builders/87/builds/38/steps/32/logs/stdio Signed-off-by: Yoann Congal Signed-off-by: Khem Raj --- ...lity-Prevent-configuration-from-reading-h.patch | 58 ++++++++++++++++++++++ meta-oe/recipes-extended/cmatrix/cmatrix_2.0.bb | 7 ++- 2 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 meta-oe/recipes-extended/cmatrix/cmatrix/0001-reproducibility-Prevent-configuration-from-reading-h.patch diff --git a/meta-oe/recipes-extended/cmatrix/cmatrix/0001-reproducibility-Prevent-configuration-from-reading-h.patch b/meta-oe/recipes-extended/cmatrix/cmatrix/0001-reproducibility-Prevent-configuration-from-reading-h.patch new file mode 100644 index 0000000000..5f23252605 --- /dev/null +++ b/meta-oe/recipes-extended/cmatrix/cmatrix/0001-reproducibility-Prevent-configuration-from-reading-h.patch @@ -0,0 +1,58 @@ +From f0a48c4e42819604063e6eacb7cdb4fa22331c77 Mon Sep 17 00:00:00 2001 +From: Yoann Congal +Date: Tue, 1 Apr 2025 23:42:39 +0200 +Subject: [PATCH] reproducibility: Prevent configuration from reading host + directories + +Current code choose where to install fonts based on what directory +exists on build host. This is not reproducible. + +Remove the existence check and change the lists to the one matching +OpenEmbedded paths. + +Upstream-Status: Inappropriate [embedded specific] +Signed-off-by: Yoann Congal +--- + CMakeLists.txt | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c5548b3..c9af31c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,8 +7,8 @@ set(VERSION "2.0") + + # These are relative to CMAKE_INSTALL_PREFIX + # which by default is "/usr/local" +-set(CONSOLE_FONTS_DIRS "share/consolefonts" "lib/kbd/consolefonts") +-set(X_FONTS_DIRS "lib/X11/fonts/misc" "X11R6/lib/X11/fonts/misc" "share/fonts/X11/misc") ++set(CONSOLE_FONTS_DIRS "share/consolefonts") ++set(X_FONTS_DIRS "lib/X11/fonts/misc" "share/fonts/X11/misc") + + set(MKFONTDIR "/usr/bin/mkfontdir") + +@@ -47,16 +47,13 @@ install(TARGETS cmatrix DESTINATION bin) + + if (UNIX) + foreach (CONSOLE_FONTS_DIR ${CONSOLE_FONTS_DIRS}) +- if (IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/${CONSOLE_FONTS_DIR}") + message(STATUS "Installing matrix console fonts to ${CMAKE_INSTALL_PREFIX}/${CONSOLE_FONTS_DIR}") + install(FILES + "${CMAKE_SOURCE_DIR}/matrix.fnt" + "${CMAKE_SOURCE_DIR}/matrix.psf.gz" + DESTINATION "${CONSOLE_FONTS_DIR}") +- endif () + endforeach () + foreach (X_FONTS_DIR ${X_FONTS_DIRS}) +- if (IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/${X_FONTS_DIR}") + message(STATUS "Installing matrix X window fonts to ${CMAKE_INSTALL_PREFIX}/${X_FONTS_DIR}") + install(FILES + "${CMAKE_SOURCE_DIR}/mtx.pcf" +@@ -67,7 +64,6 @@ if (UNIX) + "execute_process(COMMAND \"${MKFONTDIR}\" \"${CMAKE_INSTALL_PREFIX}/${X_FONTS_DIR}\")") + install(CODE + "message(STATUS \"If this is the first time you have installed CMatrix you will probably have to restart X window in order to use the mtx.pcf font.\")") +- endif () + endforeach () + endif () + diff --git a/meta-oe/recipes-extended/cmatrix/cmatrix_2.0.bb b/meta-oe/recipes-extended/cmatrix/cmatrix_2.0.bb index 6b6acf1be8..829e9588c8 100644 --- a/meta-oe/recipes-extended/cmatrix/cmatrix_2.0.bb +++ b/meta-oe/recipes-extended/cmatrix/cmatrix_2.0.bb @@ -3,7 +3,10 @@ SUMMARY = "Terminal based 'The Matrix' screen implementation" LICENSE = "GPL-3.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" -SRC_URI = "git://github.com/abishekvashok/cmatrix.git;branch=stable;protocol=https" +SRC_URI = " \ + git://github.com/abishekvashok/cmatrix.git;branch=stable;protocol=https \ + file://0001-reproducibility-Prevent-configuration-from-reading-h.patch \ +" SRCREV = "adfdf1656f23e5ab3b52c7d7edf91249a4477e8d" S = "${WORKDIR}/git" @@ -11,4 +14,4 @@ inherit cmake DEPENDS += "ncurses" -FILES:${PN} += "${datadir}/* ${libdir}/kbd/*" +FILES:${PN} += "${datadir}/* ${libdir}/kbd/* ${libdir}/X11/fonts/" -- cgit v1.2.3-54-g00ecf