Message ID | 20250401221249.2506503-1-yoann.congal@smile.fr |
---|---|
State | Accepted |
Headers | show |
Series | [meta-oe] cmatrix: Fix host-based non-reproducibility | expand |
This seems to cause: ERROR: QA Issue: lib32-cmatrix: Files/directories were installed but not shipped in any package: /usr/lib /usr/lib/X11 /usr/lib/X11/fonts /usr/lib/X11/fonts/misc /usr/lib/X11/fonts/misc/mtx.pcf Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install. lib32-cmatrix: 5 installed and not shipped files. [installed-vs-shipped] in cases where libdir isn't /usr/lib (e.g. /usr/lib32 or /usr/lib64). Even in builds without x11 in DISTRO_FEATUERS. On Wed, Apr 2, 2025 at 12:13 AM Yoann Congal via lists.openembedded.org <yoann.congal=smile.fr@lists.openembedded.org> wrote: > > From: Yoann Congal <yoann.congal@smile.fr> > > 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> > --- > ...Prevent-configuration-from-reading-h.patch | 58 +++++++++++++++++++ > .../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 <yoann.congal@smile.fr> > +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 <yoann.congal@smile.fr> > +--- > + 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/" > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#116489): https://lists.openembedded.org/g/openembedded-devel/message/116489 > Mute This Topic: https://lists.openembedded.org/mt/112036531/3617156 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [martin.jansa@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
Le mar. 8 avr. 2025 à 18:19, Martin Jansa <martin.jansa@gmail.com> a écrit : > > This seems to cause: > > ERROR: QA Issue: lib32-cmatrix: Files/directories were installed but > not shipped in any package: > /usr/lib > /usr/lib/X11 > /usr/lib/X11/fonts > /usr/lib/X11/fonts/misc > /usr/lib/X11/fonts/misc/mtx.pcf > Please set FILES such that these items are packaged. Alternatively if > they are unneeded, avoid installing them or delete them within > do_install. > lib32-cmatrix: 5 installed and not shipped files. [installed-vs-shipped] > > in cases where libdir isn't /usr/lib (e.g. /usr/lib32 or /usr/lib64). > Even in builds without x11 in DISTRO_FEATUERS. I will look into it. Thanks for the report! > > On Wed, Apr 2, 2025 at 12:13 AM Yoann Congal via > lists.openembedded.org <yoann.congal=smile.fr@lists.openembedded.org> > wrote: > > > > From: Yoann Congal <yoann.congal@smile.fr> > > > > 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> > > --- > > ...Prevent-configuration-from-reading-h.patch | 58 +++++++++++++++++++ > > .../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 <yoann.congal@smile.fr> > > +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 <yoann.congal@smile.fr> > > +--- > > + 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/" > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#116489): https://lists.openembedded.org/g/openembedded-devel/message/116489 > > Mute This Topic: https://lists.openembedded.org/mt/112036531/3617156 > > Group Owner: openembedded-devel+owner@lists.openembedded.org > > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [martin.jansa@gmail.com] > > -=-=-=-=-=-=-=-=-=-=-=- > >
On Tue, Apr 8, 2025 at 2:03 PM Yoann Congal via lists.openembedded.org <yoann.congal=smile.fr@lists.openembedded.org> wrote: > > Le mar. 8 avr. 2025 à 18:19, Martin Jansa <martin.jansa@gmail.com> a écrit : > > > > This seems to cause: > > > > ERROR: QA Issue: lib32-cmatrix: Files/directories were installed but > > not shipped in any package: > > /usr/lib > > /usr/lib/X11 > > /usr/lib/X11/fonts > > /usr/lib/X11/fonts/misc > > /usr/lib/X11/fonts/misc/mtx.pcf > > Please set FILES such that these items are packaged. Alternatively if > > they are unneeded, avoid installing them or delete them within > > do_install. > > lib32-cmatrix: 5 installed and not shipped files. [installed-vs-shipped] These files look arch independent, We can think of putting them into separate output packages and install them into ${datadir} and mark them allarch ideally. But I think that might require spinning it into two recipes. Otherwise using nonarch_libdir during install should work I guess. > > > > in cases where libdir isn't /usr/lib (e.g. /usr/lib32 or /usr/lib64). > > Even in builds without x11 in DISTRO_FEATUERS. > > I will look into it. Thanks for the report! > > > > > On Wed, Apr 2, 2025 at 12:13 AM Yoann Congal via > > lists.openembedded.org <yoann.congal=smile.fr@lists.openembedded.org> > > wrote: > > > > > > From: Yoann Congal <yoann.congal@smile.fr> > > > > > > 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> > > > --- > > > ...Prevent-configuration-from-reading-h.patch | 58 +++++++++++++++++++ > > > .../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 <yoann.congal@smile.fr> > > > +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 <yoann.congal@smile.fr> > > > +--- > > > + 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/" > > > > > > > > > > > > > -- > Yoann Congal > Smile ECS > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#116716): https://lists.openembedded.org/g/openembedded-devel/message/116716 > Mute This Topic: https://lists.openembedded.org/mt/112036531/1997914 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
Le mer. 9 avr. 2025 à 03:42, Khem Raj <raj.khem@gmail.com> a écrit : > > On Tue, Apr 8, 2025 at 2:03 PM Yoann Congal via lists.openembedded.org > <yoann.congal=smile.fr@lists.openembedded.org> wrote: > > > > Le mar. 8 avr. 2025 à 18:19, Martin Jansa <martin.jansa@gmail.com> a écrit : > > > > > > This seems to cause: > > > > > > ERROR: QA Issue: lib32-cmatrix: Files/directories were installed but > > > not shipped in any package: > > > /usr/lib > > > /usr/lib/X11 > > > /usr/lib/X11/fonts > > > /usr/lib/X11/fonts/misc > > > /usr/lib/X11/fonts/misc/mtx.pcf > > > Please set FILES such that these items are packaged. Alternatively if > > > they are unneeded, avoid installing them or delete them within > > > do_install. > > > lib32-cmatrix: 5 installed and not shipped files. [installed-vs-shipped] > > These files look arch independent, We can think of putting them into > separate output packages and install them into ${datadir} and mark them allarch > ideally. But I think that might require spinning it into two recipes. Otherwise > using nonarch_libdir during install should work I guess. Those files are fonts for X and the console. I've looked at other recipes writing such fonts and they seem to use subdirs of $libdir. I've tried to find an automated way for cmatrix to find the correct path to install its fonts but I did not find any obvious. I like the nonarch_libdir idea: My plan: * change the patch to set the path to a marker @BASE_PATH@ or something * in do_configure:prepend(), sed the correct path (nonarch_libdir) into the file * Update FILES:${PN} to include the font files Sounds good? > > > > > > in cases where libdir isn't /usr/lib (e.g. /usr/lib32 or /usr/lib64). > > > Even in builds without x11 in DISTRO_FEATUERS. > > > > I will look into it. Thanks for the report! > > > > > > > > On Wed, Apr 2, 2025 at 12:13 AM Yoann Congal via > > > lists.openembedded.org <yoann.congal=smile.fr@lists.openembedded.org> > > > wrote: > > > > > > > > From: Yoann Congal <yoann.congal@smile.fr> > > > > > > > > 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> > > > > --- > > > > ...Prevent-configuration-from-reading-h.patch | 58 +++++++++++++++++++ > > > > .../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 <yoann.congal@smile.fr> > > > > +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 <yoann.congal@smile.fr> > > > > +--- > > > > + 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/" > > > > > > > > > > > > > > > > > > > > -- > > Yoann Congal > > Smile ECS > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#116716): https://lists.openembedded.org/g/openembedded-devel/message/116716 > > Mute This Topic: https://lists.openembedded.org/mt/112036531/1997914 > > Group Owner: openembedded-devel+owner@lists.openembedded.org > > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com] > > -=-=-=-=-=-=-=-=-=-=-=- > >
On Wed, Apr 9, 2025 at 8:56 AM Yoann Congal <yoann.congal@smile.fr> wrote: > > Le mer. 9 avr. 2025 à 03:42, Khem Raj <raj.khem@gmail.com> a écrit : > > > > On Tue, Apr 8, 2025 at 2:03 PM Yoann Congal via lists.openembedded.org > > <yoann.congal=smile.fr@lists.openembedded.org> wrote: > > > > > > Le mar. 8 avr. 2025 à 18:19, Martin Jansa <martin.jansa@gmail.com> a écrit : > > > > > > > > This seems to cause: > > > > > > > > ERROR: QA Issue: lib32-cmatrix: Files/directories were installed but > > > > not shipped in any package: > > > > /usr/lib > > > > /usr/lib/X11 > > > > /usr/lib/X11/fonts > > > > /usr/lib/X11/fonts/misc > > > > /usr/lib/X11/fonts/misc/mtx.pcf > > > > Please set FILES such that these items are packaged. Alternatively if > > > > they are unneeded, avoid installing them or delete them within > > > > do_install. > > > > lib32-cmatrix: 5 installed and not shipped files. [installed-vs-shipped] > > > > These files look arch independent, We can think of putting them into > > separate output packages and install them into ${datadir} and mark them allarch > > ideally. But I think that might require spinning it into two recipes. Otherwise > > using nonarch_libdir during install should work I guess. > > Those files are fonts for X and the console. I've looked at other > recipes writing such fonts and they seem to use subdirs of $libdir. > I've tried to find an automated way for cmatrix to find the correct > path to install its fonts but I did not find any obvious. > > I like the nonarch_libdir idea: My plan: > * change the patch to set the path to a marker @BASE_PATH@ or something > * in do_configure:prepend(), sed the correct path (nonarch_libdir) into the file > * Update FILES:${PN} to include the font files > > Sounds good? Sounds good to me. FWIW: I don't use cmatrix it was just a new build failure shown in world builds now when the files got installed (before they probably weren't because there was no /usr/lib/X11 directory in our docker images used for OE builds). looking at meta-openembedded $ git grep fonts | grep FILES I guess using ${datadir}/fonts might be even easier option with -set(X_FONTS_DIRS "lib/X11/fonts/misc" "share/fonts/X11/misc") +set(X_FONTS_DIRS "share/fonts/misc") in your .patch as datadir will be the same with and without multilib. Cheers,
Le mer. 9 avr. 2025 à 09:11, Martin Jansa <martin.jansa@gmail.com> a écrit : > On Wed, Apr 9, 2025 at 8:56 AM Yoann Congal <yoann.congal@smile.fr> wrote: > > > > Le mer. 9 avr. 2025 à 03:42, Khem Raj <raj.khem@gmail.com> a écrit : > > > > > > On Tue, Apr 8, 2025 at 2:03 PM Yoann Congal via lists.openembedded.org > > > <yoann.congal=smile.fr@lists.openembedded.org> wrote: > > > > > > > > Le mar. 8 avr. 2025 à 18:19, Martin Jansa <martin.jansa@gmail.com> > a écrit : > > > > > > > > > > This seems to cause: > > > > > > > > > > ERROR: QA Issue: lib32-cmatrix: Files/directories were installed > but > > > > > not shipped in any package: > > > > > /usr/lib > > > > > /usr/lib/X11 > > > > > /usr/lib/X11/fonts > > > > > /usr/lib/X11/fonts/misc > > > > > /usr/lib/X11/fonts/misc/mtx.pcf > > > > > Please set FILES such that these items are packaged. Alternatively > if > > > > > they are unneeded, avoid installing them or delete them within > > > > > do_install. > > > > > lib32-cmatrix: 5 installed and not shipped files. > [installed-vs-shipped] > > > > > > These files look arch independent, We can think of putting them into > > > separate output packages and install them into ${datadir} and mark > them allarch > > > ideally. But I think that might require spinning it into two recipes. > Otherwise > > > using nonarch_libdir during install should work I guess. > > > > Those files are fonts for X and the console. I've looked at other > > recipes writing such fonts and they seem to use subdirs of $libdir. > > I've tried to find an automated way for cmatrix to find the correct > > path to install its fonts but I did not find any obvious. > > > > I like the nonarch_libdir idea: My plan: > > * change the patch to set the path to a marker @BASE_PATH@ or something > > * in do_configure:prepend(), sed the correct path (nonarch_libdir) into > the file > > * Update FILES:${PN} to include the font files > > > > Sounds good? > > Sounds good to me. > > FWIW: I don't use cmatrix it was just a new build failure shown in > world builds now when the files got installed (before they probably > weren't because there was no /usr/lib/X11 directory in our docker > images used for OE builds). > Yeah, that's the thing with improving reproducibility, sometimes, you get a reproducible... failure ^^ > looking at > meta-openembedded $ git grep fonts | grep FILES > > I guess using ${datadir}/fonts might be even easier option with > -set(X_FONTS_DIRS "lib/X11/fonts/misc" "share/fonts/X11/misc") > +set(X_FONTS_DIRS "share/fonts/misc") > in your .patch as datadir will be the same with and without multilib. > I changed the patch many times but finally found that the cmake class exports the paths we want, I sent a v2 with that. Thanks! > Cheers, >
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 <yoann.congal@smile.fr> +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 <yoann.congal@smile.fr> +--- + 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/"