* [PR PATCH] [RFC] libglvnd: depend on mesa
@ 2020-02-01 13:59 voidlinux-github
2020-02-01 14:01 ` voidlinux-github
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: voidlinux-github @ 2020-02-01 13:59 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1791 bytes --]
There is a new pull request by st3r4g against master on the void-packages repository
https://github.com/st3r4g/void-packages libglvnd-depend-on-mesa
https://github.com/void-linux/void-packages/pull/18712
[RFC] libglvnd: depend on mesa
`libglvnd` doesn't currently install any OpenGL implementation, which makes GL unavailable ootb until the mesa drivers (package `mesa-dri`) are installed. This happens when installing `xorg-minimal` (which doesn't pull in the graphics drivers) or a Wayland compositor. Previously, `libGL` shipped the software rendering driver, so that GL was available (but not optimal), and users were expected to install the `mesa-...-dri` matching their GPU. Now that all dri drivers are in a single package, it is possible to provide hardware acceleration by default as soon as any program which links with GL is installed.
This PR modifies dependencies so that:
GL app -> libglvnd -> mesa -> mesa-dri
Caveats:
- Due to how xbps-src works (i.e. to avoid loops), a second libglvnd package must be introduced specifically to compile mesa (and kept in sync with the other one)
- xbps-src is not currently trying to build dependencies of subpackages. If it is changed to do so, loops will happen again as `libglvnd` appears as dependency in some subpackages (maybe those deps can be removed?)
- This will pull in the drivers also when building GL programs in chroot, which is unnecessary. Can it be avoided?
I initially thought about making `libglvnd` depend on a virtual `gl-vendor` which would be provided by `mesa` and `nvidia*`, but the nvidia packages required non-trivial modifications. Nvidia-only users can uninstall the mesa drivers via `ignorepkg` anyway.
A patch file from https://github.com/void-linux/void-packages/pull/18712.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libglvnd-depend-on-mesa-18712.patch --]
[-- Type: text/x-diff, Size: 4563 bytes --]
From 07880b12e2facda4c6595fe68138569c03b8665f Mon Sep 17 00:00:00 2001
From: Stefano Ragni <st3r4g@protonmail.com>
Date: Sat, 1 Feb 2020 13:40:21 +0100
Subject: [PATCH 1/3] New package: libglvnd-core-devel-1.3.0
---
srcpkgs/libglvnd-core-devel/template | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 srcpkgs/libglvnd-core-devel/template
diff --git a/srcpkgs/libglvnd-core-devel/template b/srcpkgs/libglvnd-core-devel/template
new file mode 100644
index 00000000000..230fa3994c1
--- /dev/null
+++ b/srcpkgs/libglvnd-core-devel/template
@@ -0,0 +1,24 @@
+# Template file for 'libglvnd-core-devel'
+pkgname=libglvnd-core-devel
+version=1.3.0
+revision=1
+wrksrc="libglvnd-v${version}"
+build_style=meson
+configure_args="-Dasm=disabled -Dx11=disabled -Degl=false -Dglx=disabled
+ -Dgles1=false -Dgles2=false -Dheaders=false"
+short_desc="GL Vendor-Neutral Dispatch library - core headers for vendors"
+maintainer="Stefano Ragni <st3r4g@protonmail.com>"
+license="custom:MIT-alike"
+homepage="https://gitlab.freedesktop.org/glvnd/libglvnd"
+distfiles="https://gitlab.freedesktop.org/glvnd/libglvnd/-/archive/v${version}/libglvnd-v${version}.tar.gz"
+checksum=e336ac2340105c4f21412260e5b1db17a9ce1cef27aa708a63aed293c670c1b4
+
+conflicts="libglvnd libglvnd-devel"
+
+post_install() {
+ rm ${DESTDIR}/usr/lib/lib*.so*
+ rm ${DESTDIR}/usr/lib/pkgconfig/opengl.pc
+
+ grep -A 25 "Copyright (c) 2013, NVIDIA CORPORATION." README.md > LICENSE
+ vlicense LICENSE
+}
From 8a179dca8281385403cd1d4b0a3775330453d6cb Mon Sep 17 00:00:00 2001
From: Stefano Ragni <st3r4g@protonmail.com>
Date: Sat, 1 Feb 2020 13:42:50 +0100
Subject: [PATCH 2/3] mesa: adapt to be pulled by libglvnd
---
srcpkgs/mesa/template | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/mesa/template b/srcpkgs/mesa/template
index 56ef2db18f3..a1895db32e8 100644
--- a/srcpkgs/mesa/template
+++ b/srcpkgs/mesa/template
@@ -1,7 +1,7 @@
# Template file for 'mesa'
pkgname=mesa
version=19.3.3
-revision=1
+revision=2
wrksrc="mesa-${version}"
build_style=meson
configure_args="-Dglvnd=true -Dshared-glapi=true -Dgbm=true -Degl=true
@@ -16,8 +16,8 @@ makedepends="elfutils-devel expat-devel libXdamage-devel libXvMC-devel
libXxf86vm-devel libatomic-devel libdrm-devel libffi-devel libva-devel
libvdpau-devel libxshmfence-devel ncurses-devel talloc-devel zlib-devel
$(vopt_if wayland 'wayland-devel wayland-protocols') llvm
- libsensors-devel libXrandr-devel libglvnd-devel"
-depends="libglvnd"
+ libsensors-devel libXrandr-devel libglvnd-core-devel"
+depends="mesa-dri-${version}_${revision}"
short_desc="Graphics library similar to SGI's OpenGL"
maintainer="Juan RP <xtraeme@gmail.com>"
license="MIT, LGPL-2.1-or-later"
@@ -142,6 +142,8 @@ post_install() {
}
libglapi_package() {
+ # this is not a real dependency, just a hack for 32bit to allow the
+ # transition to libglvnd-32bit (e.g. for steam)
depends="libglvnd"
short_desc="Free implementation of the GL API - shared library"
pkg_install() {
@@ -198,7 +200,6 @@ mesa-opencl_package() {
mesa-dri_package() {
short_desc="Mesa DRI drivers"
- depends="mesa-${version}_${revision}"
shlib_provides="libgallium_dri.so" # workaround for mesa-dri-32bit
pkg_install() {
# Only strip each megadriver once, via its master filename
From 9edf4b939ba9798e49836865e8ce57112ad665d9 Mon Sep 17 00:00:00 2001
From: Stefano Ragni <st3r4g@protonmail.com>
Date: Sat, 1 Feb 2020 13:43:40 +0100
Subject: [PATCH 3/3] libglvnd: depend on mesa
Also grep license from README
---
srcpkgs/libglvnd/template | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/libglvnd/template b/srcpkgs/libglvnd/template
index b66208f2a3e..f28e51b8d11 100644
--- a/srcpkgs/libglvnd/template
+++ b/srcpkgs/libglvnd/template
@@ -1,11 +1,13 @@
# Template file for 'libglvnd'
+# on updates,'libglvnd-core-devel' must also be updated
pkgname=libglvnd
version=1.3.0
-revision=1
+revision=2
wrksrc="libglvnd-v${version}"
build_style=meson
hostmakedepends="pkg-config"
makedepends="libXext-devel libX11-devel xorgproto"
+depends="mesa"
short_desc="GL Vendor-Neutral Dispatch library"
maintainer="Stefano Ragni <st3r4g@protonmail.com>"
license="custom:MIT-alike"
@@ -27,7 +29,7 @@ case "$XBPS_TARGET_MACHINE" in
esac
post_install() {
- $XBPS_FETCH_CMD "https://git.archlinux.org/svntogit/packages.git/plain/trunk/LICENSE?h=packages/libglvnd>LICENSE"
+ grep -A 25 "Copyright (c) 2013, NVIDIA CORPORATION." README.md > LICENSE
vlicense LICENSE
}
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC] libglvnd: depend on mesa
2020-02-01 13:59 [PR PATCH] [RFC] libglvnd: depend on mesa voidlinux-github
@ 2020-02-01 14:01 ` voidlinux-github
2020-02-01 14:02 ` voidlinux-github
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: voidlinux-github @ 2020-02-01 14:01 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 192 bytes --]
New comment by xtraeme on void-packages repository
https://github.com/void-linux/void-packages/pull/18712#issuecomment-581032955
Comment:
Hmm relying in xbps.d(5) features sound weird to me
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC] libglvnd: depend on mesa
2020-02-01 13:59 [PR PATCH] [RFC] libglvnd: depend on mesa voidlinux-github
2020-02-01 14:01 ` voidlinux-github
@ 2020-02-01 14:02 ` voidlinux-github
2020-02-01 16:58 ` voidlinux-github
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: voidlinux-github @ 2020-02-01 14:02 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 193 bytes --]
New comment by xtraeme on void-packages repository
https://github.com/void-linux/void-packages/pull/18712#issuecomment-581032955
Comment:
Hmm relying in xbps.d(5) features sounds weird to me
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC] libglvnd: depend on mesa
2020-02-01 13:59 [PR PATCH] [RFC] libglvnd: depend on mesa voidlinux-github
2020-02-01 14:01 ` voidlinux-github
2020-02-01 14:02 ` voidlinux-github
@ 2020-02-01 16:58 ` voidlinux-github
2020-02-01 17:15 ` voidlinux-github
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: voidlinux-github @ 2020-02-01 16:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 530 bytes --]
New comment by st3r4g on void-packages repository
https://github.com/void-linux/void-packages/pull/18712#issuecomment-581048416
Comment:
what do you mean exactly with "relying"? I expect that 99% of nvidia users won't care about the wasted space of ~55MB mesa drivers (maybe a bit more due to deps) they don't actually use and they will just leave them installed. The 1% that cares can remove them via ignorepkg. I think that having `mesa` always installed with `libglvnd` is a good default and will simplify new installations.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC] libglvnd: depend on mesa
2020-02-01 13:59 [PR PATCH] [RFC] libglvnd: depend on mesa voidlinux-github
` (2 preceding siblings ...)
2020-02-01 16:58 ` voidlinux-github
@ 2020-02-01 17:15 ` voidlinux-github
2020-02-03 7:13 ` voidlinux-github
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: voidlinux-github @ 2020-02-01 17:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 528 bytes --]
New comment by st3r4g on void-packages repository
https://github.com/void-linux/void-packages/pull/18712#issuecomment-581048416
Comment:
what do you mean exactly by "relying"? I expect that 99% of nvidia users won't care about the wasted space of ~55MB mesa drivers (maybe a bit more due to deps) they don't actually use and they will just leave them installed. The 1% that cares can remove them via ignorepkg. I think that having `mesa` always installed with `libglvnd` is a good default and will simplify new installations.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC] libglvnd: depend on mesa
2020-02-01 13:59 [PR PATCH] [RFC] libglvnd: depend on mesa voidlinux-github
` (3 preceding siblings ...)
2020-02-01 17:15 ` voidlinux-github
@ 2020-02-03 7:13 ` voidlinux-github
2020-02-03 10:57 ` voidlinux-github
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: voidlinux-github @ 2020-02-03 7:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 195 bytes --]
New comment by xtraeme on void-packages repository
https://github.com/void-linux/void-packages/pull/18712#issuecomment-581270804
Comment:
This is too complex imho, there must be a simpler way.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC] libglvnd: depend on mesa
2020-02-01 13:59 [PR PATCH] [RFC] libglvnd: depend on mesa voidlinux-github
` (4 preceding siblings ...)
2020-02-03 7:13 ` voidlinux-github
@ 2020-02-03 10:57 ` voidlinux-github
2020-11-01 2:30 ` ericonr
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: voidlinux-github @ 2020-02-03 10:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 221 bytes --]
New comment by st3r4g on void-packages repository
https://github.com/void-linux/void-packages/pull/18712#issuecomment-581355708
Comment:
I wouldn't say too complex, but I agree that adding the duplicate package is ugly
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC] libglvnd: depend on mesa
2020-02-01 13:59 [PR PATCH] [RFC] libglvnd: depend on mesa voidlinux-github
` (5 preceding siblings ...)
2020-02-03 10:57 ` voidlinux-github
@ 2020-11-01 2:30 ` ericonr
2020-11-01 6:53 ` st3r4g
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: ericonr @ 2020-11-01 2:30 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 269 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/18712#issuecomment-720016855
Comment:
Now that we are using `libglvnd` to build `libva` without depending on Mesa, I don't think this PR makes sense anymore, does it?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC] libglvnd: depend on mesa
2020-02-01 13:59 [PR PATCH] [RFC] libglvnd: depend on mesa voidlinux-github
` (6 preceding siblings ...)
2020-11-01 2:30 ` ericonr
@ 2020-11-01 6:53 ` st3r4g
2020-11-02 0:12 ` ericonr
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: st3r4g @ 2020-11-01 6:53 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 659 bytes --]
New comment by st3r4g on void-packages repository
https://github.com/void-linux/void-packages/pull/18712#issuecomment-720044085
Comment:
Ah yes, this would reintroduce the build cycle. So maybe let's freeze the other PR until we arrive at a decision here.
Anyway, I don't like this PR. The alternative to solve this problem would be to make xbps-src "less strict" with rundeps. I have thought to make it build all rundeps after the dependant instead of before, but that is probably a too drastic change from current behaviour. Or maybe introduce some way to tell it to skip building when it's safe to do so, but it could be misused... what do you think?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC] libglvnd: depend on mesa
2020-02-01 13:59 [PR PATCH] [RFC] libglvnd: depend on mesa voidlinux-github
` (7 preceding siblings ...)
2020-11-01 6:53 ` st3r4g
@ 2020-11-02 0:12 ` ericonr
2021-01-04 13:55 ` st3r4g
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: ericonr @ 2020-11-02 0:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 424 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/18712#issuecomment-720175574
Comment:
I think either of those would still make bootstrapping pretty complicated. What we'd need is some way of saying that a certain dependency isn't necessary when the package is a makedeps, but when it's installed normally it should be there. This gets hairy pretty quick, unfortunately.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC] libglvnd: depend on mesa
2020-02-01 13:59 [PR PATCH] [RFC] libglvnd: depend on mesa voidlinux-github
` (8 preceding siblings ...)
2020-11-02 0:12 ` ericonr
@ 2021-01-04 13:55 ` st3r4g
2021-01-04 14:10 ` ericonr
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: st3r4g @ 2021-01-04 13:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 717 bytes --]
New comment by st3r4g on void-packages repository
https://github.com/void-linux/void-packages/pull/18712#issuecomment-753988157
Comment:
> I think either of those would still make bootstrapping pretty complicated.
Can you explain why the _build-rundep-after-dependant_ would make bootstrap complicated? I'll link again my proposal https://github.com/void-linux/void-packages/issues/20438#issuecomment-605719104 and following comments.
> What we'd need is some way of saying that a certain dependency isn't necessary when the package is a makedeps, but when it's installed normally it should be there. This gets hairy pretty quick, unfortunately.
Isn't that what `depends=` already is supposed to describe?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC] libglvnd: depend on mesa
2020-02-01 13:59 [PR PATCH] [RFC] libglvnd: depend on mesa voidlinux-github
` (9 preceding siblings ...)
2021-01-04 13:55 ` st3r4g
@ 2021-01-04 14:10 ` ericonr
2022-04-15 2:13 ` github-actions
2022-04-29 2:13 ` [PR PATCH] [Closed]: " github-actions
12 siblings, 0 replies; 14+ messages in thread
From: ericonr @ 2021-01-04 14:10 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 386 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/18712#issuecomment-753996091
Comment:
> Can you explain why the build-rundep-after-dependant would make bootstrap complicated? I'll link again my proposal #20438 (comment) and following comments.
Re-reading this and that proposal, I'm not sure on which point I disagreed with you.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC] libglvnd: depend on mesa
2020-02-01 13:59 [PR PATCH] [RFC] libglvnd: depend on mesa voidlinux-github
` (10 preceding siblings ...)
2021-01-04 14:10 ` ericonr
@ 2022-04-15 2:13 ` github-actions
2022-04-29 2:13 ` [PR PATCH] [Closed]: " github-actions
12 siblings, 0 replies; 14+ messages in thread
From: github-actions @ 2022-04-15 2:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/18712#issuecomment-1099786969
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PR PATCH] [Closed]: [RFC] libglvnd: depend on mesa
2020-02-01 13:59 [PR PATCH] [RFC] libglvnd: depend on mesa voidlinux-github
` (11 preceding siblings ...)
2022-04-15 2:13 ` github-actions
@ 2022-04-29 2:13 ` github-actions
12 siblings, 0 replies; 14+ messages in thread
From: github-actions @ 2022-04-29 2:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1626 bytes --]
There's a closed pull request on the void-packages repository
[RFC] libglvnd: depend on mesa
https://github.com/void-linux/void-packages/pull/18712
Description:
`libglvnd` doesn't currently install any OpenGL implementation, which makes GL unavailable ootb until the mesa drivers (package `mesa-dri`) are installed. This happens when installing `xorg-minimal` (which doesn't pull in the graphics drivers) or a Wayland compositor. Previously, `libGL` shipped the software rendering driver, so that GL was available (but not optimal), and users were expected to install the `mesa-...-dri` matching their GPU. Now that all dri drivers are in a single package, it is possible to provide hardware acceleration by default as soon as any program which links with GL is installed.
This PR modifies dependencies so that:
GL app -> libglvnd -> mesa -> mesa-dri
Caveats:
- Due to how xbps-src works (i.e. to avoid loops), a second libglvnd package must be introduced specifically to compile mesa (and kept in sync with the other one)
- xbps-src is not currently trying to build dependencies of subpackages. If it is changed to do so, loops will happen again as `libglvnd` appears as dependency in some subpackages (maybe those deps can be removed?)
- This will pull in the drivers also when building GL programs in chroot, which is unnecessary. Can it be avoided?
I initially thought about making `libglvnd` depend on a virtual `gl-vendor` which would be provided by `mesa` and `nvidia*`, but the nvidia packages required non-trivial modifications. Nvidia-only users can uninstall the mesa drivers via `ignorepkg` anyway.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2022-04-29 2:13 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-01 13:59 [PR PATCH] [RFC] libglvnd: depend on mesa voidlinux-github
2020-02-01 14:01 ` voidlinux-github
2020-02-01 14:02 ` voidlinux-github
2020-02-01 16:58 ` voidlinux-github
2020-02-01 17:15 ` voidlinux-github
2020-02-03 7:13 ` voidlinux-github
2020-02-03 10:57 ` voidlinux-github
2020-11-01 2:30 ` ericonr
2020-11-01 6:53 ` st3r4g
2020-11-02 0:12 ` ericonr
2021-01-04 13:55 ` st3r4g
2021-01-04 14:10 ` ericonr
2022-04-15 2:13 ` github-actions
2022-04-29 2:13 ` [PR PATCH] [Closed]: " github-actions
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).