Skip to contentSkip to conversation

rxvt-unicode: change virtual/x-terminal-emulator PROVIDES to RPROVIDES

PATCH Superseded Ross Burton 2 participants 10 messages Nov 8, 2024 – Nov 12, 2024 1 message not in the archive

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/8 rxvt-unicode: change virtual/x-terminal-emulator PROVIDES to RPROVIDES

The point of the virtual-x-terminal-emulator alternative was to provide a single binary that executes whatever terminal has been installed. This is a runtime choice, so should be RPROVIDES.

This doesn't need built-time PROVIDES, which actively get in the way when multiple recipes are being built with the same PROVIDES.

---
 meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc +1 -1
index 5193eebb0bc..2ee3edefa76 100644
@@ -15,7 +15,7 @@ SRC_URI = "http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-${PV}.tar.bz2
 
 inherit autotools pkgconfig update-alternatives
 
-PROVIDES = "virtual/x-terminal-emulator"
+RPROVIDES:${PN} = "virtual-x-terminal-emulator"
 ALTERNATIVE:${PN} = "x-terminal-emulator"
 ALTERNATIVE_TARGET[x-terminal-emulator] = "${bindir}/rxvt"
 
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/8 matchbox-terminal: add x-terminal-emulator RPROVIDES and alternative

Add a RPROVIDES for virtual-x-terminal-emulator, so that:
- Packages can RDEPEND on virtual-x-terminal-emulator and know that they have installed a terminal
- The x-terminal-emulator binary will (via alternatives) run a terminal

We don't bother with PROVIDES because nobody needs to DEPEND on a terminal, the entire point of this is that the actual binary is interchangable.

---
 .../matchbox-terminal/matchbox-terminal_0.2.bb             | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta/recipes-sato/matchbox-terminal/matchbox-terminal_0.2.bb +6 -1
index f91c593f784..c9b01b3cfd9 100644
@@ -16,6 +16,11 @@ PV = "0.2+git"
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig features_check
+inherit autotools pkgconfig features_check update-alternatives
 
 ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+RPROVIDES:${PN} = "virtual-x-terminal-emulator"
+ALTERNATIVE:${PN} = "x-terminal-emulator"
+ALTERNATIVE_TARGET[x-terminal-emulator] = "${bindir}/matchbox-terminal"
+ALTERNATIVE_PRIORITY[x-terminal-emulator] = "20"
Signature · 1 line
2.34.1
#2 lore raw

PATCH 3/8 default-providers.conf: add virtual-x-terminal-emulator

In reply to Ross Burton

We have multiple recipes in core that RPROVIDE virtual-x-terminal-emulator, so we should pick one to be the default for deterministic builds.

Pick rxvt, as it's the lightest. Sato can depend on matchbox-terminal explicitly and rxvt will not be added.

---
 meta/conf/distro/include/default-providers.inc | 2 ++
 1 file changed, 2 insertions(+)
meta/conf/distro/include/default-providers.inc +2 -0
index d18173c7449..b32c4e0d254 100644
@@ -59,3 +59,5 @@ PREFERRED_PROVIDER_pkgconfig-native ?= "pkgconfig-native"
 PREFERRED_RPROVIDER_initd-functions ?= "initscripts"
 
 PREFERRED_PROVIDER_nativesdk-mesa ?= "nativesdk-mesa"
+
+PREFERRED_RPROVIDER_virtual-x-terminal-emulator ?= "rxvt-unicode"
Signature · 1 line
2.34.1
#3 lore raw

PATCH 4/8 packagegroup-core-x11-base: use virtual-x-terminal-emulator

In reply to Ross Burton

Instead of depending on matchbox-terminal explicitly, just depend on the virtual name.

core-image-x11 then uses rxvt instead of matchbox-terminal, as that is the default, removing the entire GTK+ stack from the image.

core-image-sato and friends are unchanged as the sato packagegroup pulls in matchbox-terminal explicitly, so rxvt isn't needed.

---
 .../packagegroups/packagegroup-core-x11-base.bb                 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb +1 -1
index db6242af335..d82d318368e 100644
@@ -8,8 +8,8 @@ REQUIRED_DISTRO_FEATURES = "x11"
 RDEPENDS:${PN} = "\
     packagegroup-core-x11-xserver \
     packagegroup-core-x11-utils \
-    matchbox-terminal \
     matchbox-wm \
     mini-x-session \
+    virtual-x-terminal-emulator \
     liberation-fonts \
     "
Signature · 1 line
2.34.1
#4 lore raw

PATCH 5/8 xinit: use x-terminal-emulator as the fallback terminal

In reply to Ross Burton

Instead of using rxvt as the fallback terminal use x-terminal-emulator.

Also add a recommends on something providing that name, as previously it tried to use rxvt but that wasn't necessarily present.

---
 meta/recipes-graphics/xorg-app/xinit_1.4.2.bb | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
meta/recipes-graphics/xorg-app/xinit_1.4.2.bb +3 -4
index 82c0b0d8335..8a8367c6888 100644
@@ -18,9 +18,8 @@ SRC_URI_EXT = "xz"
 
 SRC_URI[sha256sum] = "b7d8dc8d22ef9f15985a10b606ee4f2aad6828befa437359934647e88d331f23"
 
-EXTRA_OECONF = "ac_cv_path_MCOOKIE=${bindir}/mcookie"
-
-PACKAGECONFIG ??= "rxvt"
-PACKAGECONFIG[rxvt] = "--with-xterm=rxvt,,,rxvt-unicode"
+EXTRA_OECONF = "ac_cv_path_MCOOKIE=${bindir}/mcookie \
+                --with-xterm=x-terminal-emulator"
 
 RDEPENDS:${PN} += "util-linux-mcookie"
+RRECOMMENDS:${PN} += "virtual-x-terminal-emulator"
Signature · 1 line
2.34.1
#5 lore raw

PATCH 6/8 builder: use x-terminal-emulator

In reply to Ross Burton

Don't hardcode matchbox-terminal, but use the alternative.

---
 meta/recipes-graphics/builder/files/builder_session.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/builder/files/builder_session.sh +1 -1
index 4e509a701ac..a59c5ce84b6 100644
@@ -30,4 +30,4 @@ fi
 cd /home/builder/poky
 . ./oe-init-build-env
 
-matchbox-terminal&
+x-terminal-emulator &
Signature · 1 line
2.34.1
#6 lore raw

PATCH 7/8 mini-x-session: use x-terminal-emulator

In reply to Ross Burton

Don't hardcode matchbox-terminal, but use the alternative.

---
 meta/recipes-graphics/mini-x-session/files/mini-x-session | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-graphics/mini-x-session/files/mini-x-session +2 -1
index dca655a9139..181e995337b 100644
@@ -35,5 +35,6 @@ xrandr -s 1024x768
 # Default files to run if $HOME/.mini_x/session or /etc/mini_x/session
 # dont exist. 
 
-matchbox-terminal&
+x-terminal-emulator &
+
 exec matchbox-window-manager
Signature · 1 line
2.34.1
#7 lore raw

PATCH 8/8 core-image-weston: use virtual-x-terminal-emulator instead of matchbox-terminal

In reply to Ross Burton

Don't hardcode matchbox-terminal, but use the alternative.

---
 meta/recipes-graphics/images/core-image-weston.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/images/core-image-weston.bb +1 -1
index 62305cc1cee..d5248cf480b 100644
@@ -7,6 +7,6 @@ LICENSE = "MIT"
 inherit core-image
 
 CORE_IMAGE_BASE_INSTALL += "gtk+3-demo"
-CORE_IMAGE_BASE_INSTALL += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'weston-xwayland matchbox-terminal', '', d)}"
+CORE_IMAGE_BASE_INSTALL += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'weston-xwayland virtual-x-terminal-emulator', '', d)}"
 
 QB_MEM = "-m 512"
Signature · 1 line
2.34.1
#8 lore raw

Re: [OE-core] [PATCH 8/8] core-image-weston: use virtual-x-terminal-emulator instead of matchbox-terminal

Quoted 17 lines · Ross Burton via lists.openembedded.org

Don't hardcode matchbox-terminal, but use the alternative.

---
 meta/recipes-graphics/images/core-image-weston.bb | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/images/core-image-weston.bb +0 -0
index 62305cc1cee..d5248cf480b 100644
@@ -7,6 +7,6 @@ LICENSE = "MIT"

 inherit core-image

 CORE_IMAGE_BASE_INSTALL += "gtk+3-demo"

meta/recipes-graphics/images/core-image-weston.bb +1 -1
-CORE_IMAGE_BASE_INSTALL += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'weston-xwayland matchbox-terminal', '', d)}"
+CORE_IMAGE_BASE_INSTALL += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'weston-xwayland virtual-x-terminal-emulator', '', d)}"
Quoted 3 lines


 QB_MEM = "-m 512"

This breaks one of the selftests:

https://valkyrie.yoctoproject.org/#/builders/54/builds/382/steps/14/logs/stdio

ERROR: core-image-weston-1.0-r0 do_rootfs: Package rxvt-unicode cannot be installed into the image because it has incompatible license(s): GPL-3.0-only

Cheers,

Richard

A message that is not in the archive (sent off-list or not yet received): [email protected]

#10 lore raw

Re: [OE-core] [PATCH 8/8] core-image-weston: use virtual-x-terminal-emulator instead of matchbox-terminal

Quoted 30 lines · Richard Purdie via lists.openembedded.org
Quoted 16 lines · Ross Burton via lists.openembedded.org

Don't hardcode matchbox-terminal, but use the alternative.

---
 meta/recipes-graphics/images/core-image-weston.bb | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/images/core-image-weston.bb +0 -0
index 62305cc1cee..d5248cf480b 100644
@@ -7,6 +7,6 @@ LICENSE = "MIT"

 inherit core-image

 CORE_IMAGE_BASE_INSTALL += "gtk+3-demo"

Quoted 9 lines

-CORE_IMAGE_BASE_INSTALL += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'weston-xwayland matchbox-terminal', '', d)}"
+CORE_IMAGE_BASE_INSTALL += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'weston-xwayland virtual-x-terminal-emulator', '', d)}"

 QB_MEM = "-m 512"

This breaks one of the selftests:

Quoted 5 lines

https://valkyrie.yoctoproject.org/#/builders/54/builds/382/steps/14/logs/stdio

ERROR: core-image-weston-1.0-r0 do_rootfs: Package rxvt-unicode cannot be installed into the image because it has incompatible license(s): GPL-3.0-only

Even with this patch dropped, the series still fails in the no-x11 build:

https://valkyrie.yoctoproject.org/#/builders/25/builds/411/steps/11/logs/stdio

Cheers,

Richard