diff options
| author | Yoann Congal <yoann.congal@smile.fr> | 2025-04-02 00:12:49 +0200 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-04-01 21:59:45 -0700 |
| commit | 246072bd3e23736ab8e73474df2be336b6a303b5 (patch) | |
| tree | 990ea5ee93f883636fa1d5a3055de7c516600431 | |
| parent | afe1c610c5538d4f3541c4167bee6b135e5985e6 (diff) | |
| download | meta-openembedded-246072bd3e23736ab8e73474df2be336b6a303b5.tar.gz | |
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 <yoann.congal@smile.fr>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-extended/cmatrix/cmatrix/0001-reproducibility-Prevent-configuration-from-reading-h.patch | 58 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/cmatrix/cmatrix_2.0.bb | 7 |
2 files changed, 63 insertions, 2 deletions
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 @@ | |||
| 1 | From f0a48c4e42819604063e6eacb7cdb4fa22331c77 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Yoann Congal <yoann.congal@smile.fr> | ||
| 3 | Date: Tue, 1 Apr 2025 23:42:39 +0200 | ||
| 4 | Subject: [PATCH] reproducibility: Prevent configuration from reading host | ||
| 5 | directories | ||
| 6 | |||
| 7 | Current code choose where to install fonts based on what directory | ||
| 8 | exists on build host. This is not reproducible. | ||
| 9 | |||
| 10 | Remove the existence check and change the lists to the one matching | ||
| 11 | OpenEmbedded paths. | ||
| 12 | |||
| 13 | Upstream-Status: Inappropriate [embedded specific] | ||
| 14 | Signed-off-by: Yoann Congal <yoann.congal@smile.fr> | ||
| 15 | --- | ||
| 16 | CMakeLists.txt | 8 ++------ | ||
| 17 | 1 file changed, 2 insertions(+), 6 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 20 | index c5548b3..c9af31c 100644 | ||
| 21 | --- a/CMakeLists.txt | ||
| 22 | +++ b/CMakeLists.txt | ||
| 23 | @@ -7,8 +7,8 @@ set(VERSION "2.0") | ||
| 24 | |||
| 25 | # These are relative to CMAKE_INSTALL_PREFIX | ||
| 26 | # which by default is "/usr/local" | ||
| 27 | -set(CONSOLE_FONTS_DIRS "share/consolefonts" "lib/kbd/consolefonts") | ||
| 28 | -set(X_FONTS_DIRS "lib/X11/fonts/misc" "X11R6/lib/X11/fonts/misc" "share/fonts/X11/misc") | ||
| 29 | +set(CONSOLE_FONTS_DIRS "share/consolefonts") | ||
| 30 | +set(X_FONTS_DIRS "lib/X11/fonts/misc" "share/fonts/X11/misc") | ||
| 31 | |||
| 32 | set(MKFONTDIR "/usr/bin/mkfontdir") | ||
| 33 | |||
| 34 | @@ -47,16 +47,13 @@ install(TARGETS cmatrix DESTINATION bin) | ||
| 35 | |||
| 36 | if (UNIX) | ||
| 37 | foreach (CONSOLE_FONTS_DIR ${CONSOLE_FONTS_DIRS}) | ||
| 38 | - if (IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/${CONSOLE_FONTS_DIR}") | ||
| 39 | message(STATUS "Installing matrix console fonts to ${CMAKE_INSTALL_PREFIX}/${CONSOLE_FONTS_DIR}") | ||
| 40 | install(FILES | ||
| 41 | "${CMAKE_SOURCE_DIR}/matrix.fnt" | ||
| 42 | "${CMAKE_SOURCE_DIR}/matrix.psf.gz" | ||
| 43 | DESTINATION "${CONSOLE_FONTS_DIR}") | ||
| 44 | - endif () | ||
| 45 | endforeach () | ||
| 46 | foreach (X_FONTS_DIR ${X_FONTS_DIRS}) | ||
| 47 | - if (IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/${X_FONTS_DIR}") | ||
| 48 | message(STATUS "Installing matrix X window fonts to ${CMAKE_INSTALL_PREFIX}/${X_FONTS_DIR}") | ||
| 49 | install(FILES | ||
| 50 | "${CMAKE_SOURCE_DIR}/mtx.pcf" | ||
| 51 | @@ -67,7 +64,6 @@ if (UNIX) | ||
| 52 | "execute_process(COMMAND \"${MKFONTDIR}\" \"${CMAKE_INSTALL_PREFIX}/${X_FONTS_DIR}\")") | ||
| 53 | install(CODE | ||
| 54 | "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.\")") | ||
| 55 | - endif () | ||
| 56 | endforeach () | ||
| 57 | endif () | ||
| 58 | |||
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" | |||
| 3 | LICENSE = "GPL-3.0-only" | 3 | LICENSE = "GPL-3.0-only" |
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" |
| 5 | 5 | ||
| 6 | SRC_URI = "git://github.com/abishekvashok/cmatrix.git;branch=stable;protocol=https" | 6 | SRC_URI = " \ |
| 7 | git://github.com/abishekvashok/cmatrix.git;branch=stable;protocol=https \ | ||
| 8 | file://0001-reproducibility-Prevent-configuration-from-reading-h.patch \ | ||
| 9 | " | ||
| 7 | SRCREV = "adfdf1656f23e5ab3b52c7d7edf91249a4477e8d" | 10 | SRCREV = "adfdf1656f23e5ab3b52c7d7edf91249a4477e8d" |
| 8 | S = "${WORKDIR}/git" | 11 | S = "${WORKDIR}/git" |
| 9 | 12 | ||
| @@ -11,4 +14,4 @@ inherit cmake | |||
| 11 | 14 | ||
| 12 | DEPENDS += "ncurses" | 15 | DEPENDS += "ncurses" |
| 13 | 16 | ||
| 14 | FILES:${PN} += "${datadir}/* ${libdir}/kbd/*" | 17 | FILES:${PN} += "${datadir}/* ${libdir}/kbd/* ${libdir}/X11/fonts/" |
