Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvidia-470-glx-driver: Add appstream metainfo #527

Merged
merged 1 commit into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
268 changes: 49 additions & 219 deletions packages/n/nvidia-470-glx-driver/abi_used_symbols

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="addon">
<id>nvidia-470-glx-driver-32bit</id>
<name>32bit libraries for NVIDIA 470.xx Binary Driver</name>
<summary>32bit libraries for NVIDIA 470.xx series Binary Driver. Generally required by older games.</summary>
<url type="homepage">http://www.nvidia.com/</url>
<url type="bugtracker">https://github.com/getsolus/packages</url>
<metadata_license>CC0-1.0</metadata_license>
<project_license>LicenseRef-proprietary:NVIDIA</project_license>
<extends>nvidia-470-glx-driver-current</extends>
<extends>nvidia-470-glx-driver</extends>
</component>
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="driver">
<id>nvidia-470-glx-driver-current</id>
<name>NVIDIA 470.xx Graphics Driver (Current Kernel)</name>
<summary>NVIDIA 470.xx series accelerated Linux Graphics Driver for the -current kernel</summary>
<description>
<p>
The NVIDIA Accelerated Linux Graphics Driver brings accelerated 2D
functionality and high-performance OpenGL support to Linux with the
use of NVIDIA graphics processing units.
</p>
<p>
These drivers provide optimized hardware acceleration for OpenGL and X
applications and support nearly all recent NVIDIA GPU products.
The NVIDIA graphics driver uses a Unified Driver Architecture: the single
graphics driver supports all modern NVIDIA GPUs.
</p>
</description>
<url type="homepage">http://www.nvidia.com/</url>
<icon type="stock">nvidia</icon>
<metadata_license>CC0-1.0</metadata_license>
<project_license>LicenseRef-proprietary:NVIDIA</project_license>
<developer_name>NVIDIA Corporation</developer_name>
<requires>
<kernel version="9.99" compare="eq">Linux</kernel>
</requires>
<keywords>
<keyword>CUDA</keyword>
<keyword>GeForce</keyword>
<keyword>NVIDIA</keyword>
<keyword>OpenGL</keyword>
<keyword>Quadro</keyword>
<keyword>Tesla</keyword>
<keyword>Video</keyword>
<keyword>Vulkan</keyword>
<keyword>av1</keyword>
<keyword>avc</keyword>
<keyword>driver</keyword>
<keyword>h264</keyword>
<keyword>h265</keyword>
<keyword>hevc</keyword>
<keyword>jpeg</keyword>
<keyword>mpeg2</keyword>
<keyword>vaapi</keyword>
<keyword>vc-1</keyword>
<keyword>vp8</keyword>
<keyword>vp9</keyword>
</keywords>
<url type="bugtracker">https://github.com/getsolus/packages</url>
<update_contact>releng@getsol.us</update_contact>
</component>
51 changes: 51 additions & 0 deletions packages/n/nvidia-470-glx-driver/files/nvidia-470-lts.metainfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="driver">
<id>nvidia-470-glx-driver-lts</id>
<name>NVIDIA 470.xx Graphics Driver (LTS Kernel)</name>
<summary>NVIDIA 470.xx series accelerated Linux Graphics Driver for the -lts kernel</summary>
<description>
<p>
The NVIDIA Accelerated Linux Graphics Driver brings accelerated 2D
functionality and high-performance OpenGL support to Linux with the
use of NVIDIA graphics processing units.
</p>
<p>
These drivers provide optimized hardware acceleration for OpenGL and X
applications and support nearly all recent NVIDIA GPU products.
The NVIDIA graphics driver uses a Unified Driver Architecture: the single
graphics driver supports all modern NVIDIA GPUs.
</p>
</description>
<url type="homepage">http://www.nvidia.com/</url>
<icon type="stock">nvidia</icon>
<metadata_license>CC0-1.0</metadata_license>
<project_license>LicenseRef-proprietary:NVIDIA</project_license>
<developer_name>NVIDIA Corporation</developer_name>
<requires>
<kernel version="9.99" compare="eq">Linux</kernel>
</requires>
<keywords>
<keyword>CUDA</keyword>
<keyword>GeForce</keyword>
<keyword>NVIDIA</keyword>
<keyword>OpenGL</keyword>
<keyword>Quadro</keyword>
<keyword>Tesla</keyword>
<keyword>Video</keyword>
<keyword>Vulkan</keyword>
<keyword>av1</keyword>
<keyword>avc</keyword>
<keyword>driver</keyword>
<keyword>h264</keyword>
<keyword>h265</keyword>
<keyword>hevc</keyword>
<keyword>jpeg</keyword>
<keyword>mpeg2</keyword>
<keyword>vaapi</keyword>
<keyword>vc-1</keyword>
<keyword>vp8</keyword>
<keyword>vp9</keyword>
</keywords>
<url type="bugtracker">https://github.com/getsolus/packages</url>
<update_contact>releng@getsol.us</update_contact>
</component>
34 changes: 34 additions & 0 deletions packages/n/nvidia-470-glx-driver/files/parse-supported-gpus.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 Simone Caronni <negativo17@gmail.com>
# Licensed under the GNU General Public License Version or later

# Simply reads the supported-gpus.json file and feeds it into the appstream xml file.

import json
import sys

def main():
if len(sys.argv) != 2:
print("usage: %s supported-gpus.json" % sys.argv[0])
return 1

f = open(sys.argv[1])
gpus_raw = json.load(f)
legacy = 'legacybranch'
devids = []

for product in gpus_raw["chips"]:

if legacy not in product.keys():

devid = int(product["devid"], 16)
if not devid in devids:
devids.append(devid)

for devid in devids:
print("pci:v000010DEd%08Xsv*sd*bc*sc*i*" % (devid))

if __name__ == "__main__":
main()
29 changes: 25 additions & 4 deletions packages/n/nvidia-470-glx-driver/package.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name : nvidia-470-glx-driver
version : 470.223.02
release : 60
release : 61
source :
- https://us.download.nvidia.com/XFree86/Linux-x86_64/470.223.02/NVIDIA-Linux-x86_64-470.223.02.run : b36862d5336cc3e6ebe8ec3ab4f885b183da258f1dfb1e05ae406b3f6c4d44f8
extract : no
homepage : https://nvidia.com
license :

Check warning on line 8 in packages/n/nvidia-470-glx-driver/package.yml

View workflow job for this annotation

GitHub Actions / Checks

invalid license identifier: 'EULA'
- EULA
summary :
- NVIDIA 470.xx Binary Driver (LTS Kernel)
Expand Down Expand Up @@ -61,16 +61,23 @@
- modaliases :
- /usr/share/doflicky/modaliases
- /usr/share/linux-driver-management/modaliases
- 32bit : /usr/lib32
- main : /lib/modules/*.lts
- current : /lib/modules/*.current
- 32bit :
- /usr/lib32
- /usr/share/metainfo/nvidia-470-32bit.metainfo.xml
- main :
- /lib/modules/*.lts
- /usr/share/metainfo/nvidia-470-lts.metainfo.xml
- current :
- /lib/modules/*.current
- /usr/share/metainfo/nvidia-470-current.metainfo.xml
strip : no
debug : no
builddeps :
- pkgconfig(gtk+-2.0)
- pkgconfig(gtk+-3.0)
- pkgconfig(libelf)
- pkgconfig(xorg-server)
- appstream-glib
- libglvnd-32bit
- linux-current
- linux-current-headers
Expand Down Expand Up @@ -158,6 +165,20 @@
install -D -m 00644 nvidia-settings.png $installdir/usr/share/pixmaps/nvidia-settings.png
install -D -m 00644 nvidia.icd $installdir/usr/share/OpenCL/vendors/nvidia.icd

# Set required kernel in appstream files
curmajkernelv=$(echo %kernel_version_current% | cut -d '.' -f 1,2)
ltsmajkernelv=$(echo %kernel_version_lts% | cut -d '.' -f 1,2)
# FIXME: use xmllint
sed -i "s/9.99/${curmajkernelv}/" $pkgfiles/nvidia-470-current.metainfo.xml
sed -i "s/9.99/${ltsmajkernelv}/" $pkgfiles/nvidia-470-lts.metainfo.xml
# Appstream metainfo
install -Dm00644 $pkgfiles/nvidia-470-current.metainfo.xml $installdir/usr/share/metainfo/nvidia-470-current.metainfo.xml
install -Dm00644 $pkgfiles/nvidia-470-lts.metainfo.xml $installdir/usr/share/metainfo/nvidia-470-lts.metainfo.xml
install -Dm00644 $pkgfiles/nvidia-470-32bit.metainfo.xml $installdir/usr/share/metainfo/nvidia-470-32bit.metainfo.xml
# Add modalias provides to appstream metainfo
python3 $pkgfiles/parse-supported-gpus.py supported-gpus/supported-gpus.json | xargs appstream-util add-provide $installdir/usr/share/metainfo/nvidia-470-current.metainfo.xml modalias
python3 $pkgfiles/parse-supported-gpus.py supported-gpus/supported-gpus.json | xargs appstream-util add-provide $installdir/usr/share/metainfo/nvidia-470-lts.metainfo.xml modalias

# Vulkan
install -D -m 00644 nvidia_icd.json $installdir/usr/share/vulkan/icd.d/10_nvidia.json
sed -e 's@__NV_VK_ICD__@libGLX_nvidia.so.0@' -i $installdir/usr/share/vulkan/icd.d/10_nvidia.json
Expand Down
21 changes: 12 additions & 9 deletions packages/n/nvidia-470-glx-driver/pspec_x86_64.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<Name>nvidia-470-glx-driver</Name>
<Homepage>https://nvidia.com</Homepage>
<Packager>
<Name>Reilly Brogan</Name>
<Email>solus@reillybrogan.com</Email>
<Name>Joey Riches</Name>
<Email>josephriches@gmail.com</Email>
</Packager>
<License>EULA</License>
<PartOf>kernel.drivers</PartOf>
Expand All @@ -18,14 +18,15 @@
<Description xml:lang="en">NVIDIA 470.xx Binary Driver (LTS Kernel)</Description>
<PartOf>kernel.drivers</PartOf>
<RuntimeDependencies>
<Dependency releaseFrom="60">nvidia-470-glx-driver-common</Dependency>
<Dependency releaseFrom="61">nvidia-470-glx-driver-common</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="data">/lib/modules/5.15.147-229.lts/kernel/drivers/video/nvidia-drm.ko.zst</Path>
<Path fileType="data">/lib/modules/5.15.147-229.lts/kernel/drivers/video/nvidia-modeset.ko.zst</Path>
<Path fileType="data">/lib/modules/5.15.147-229.lts/kernel/drivers/video/nvidia-peermem.ko.zst</Path>
<Path fileType="data">/lib/modules/5.15.147-229.lts/kernel/drivers/video/nvidia-uvm.ko.zst</Path>
<Path fileType="data">/lib/modules/5.15.147-229.lts/kernel/drivers/video/nvidia.ko.zst</Path>
<Path fileType="data">/usr/share/metainfo/nvidia-470-lts.metainfo.xml</Path>
</Files>
<Conflicts>
<Package>nvidia-390-glx-driver</Package>
Expand All @@ -40,7 +41,7 @@
<Description xml:lang="en">32-bit libraries for NVIDIA 470.xx Binary Driver</Description>
<PartOf>xorg.driver</PartOf>
<RuntimeDependencies>
<Dependency releaseFrom="60">nvidia-470-glx-driver-common</Dependency>
<Dependency releaseFrom="61">nvidia-470-glx-driver-common</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="library">/usr/lib32/libEGL_nvidia.so</Path>
Expand Down Expand Up @@ -100,6 +101,7 @@
<Path fileType="library">/usr/lib32/vdpau/libvdpau_nvidia.so</Path>
<Path fileType="library">/usr/lib32/vdpau/libvdpau_nvidia.so.1</Path>
<Path fileType="library">/usr/lib32/vdpau/libvdpau_nvidia.so.470.223.02</Path>
<Path fileType="data">/usr/share/metainfo/nvidia-470-32bit.metainfo.xml</Path>
</Files>
<Conflicts>
<Package>nvidia-390-glx-driver-32bit</Package>
Expand Down Expand Up @@ -245,14 +247,15 @@
<Description xml:lang="en">NVIDIA 470.xx Binary Driver (Current Kernel)</Description>
<PartOf>kernel.drivers</PartOf>
<RuntimeDependencies>
<Dependency releaseFrom="60">nvidia-470-glx-driver-common</Dependency>
<Dependency releaseFrom="61">nvidia-470-glx-driver-common</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="data">/lib/modules/6.6.12-271.current/kernel/drivers/video/nvidia-drm.ko.zst</Path>
<Path fileType="data">/lib/modules/6.6.12-271.current/kernel/drivers/video/nvidia-modeset.ko.zst</Path>
<Path fileType="data">/lib/modules/6.6.12-271.current/kernel/drivers/video/nvidia-peermem.ko.zst</Path>
<Path fileType="data">/lib/modules/6.6.12-271.current/kernel/drivers/video/nvidia-uvm.ko.zst</Path>
<Path fileType="data">/lib/modules/6.6.12-271.current/kernel/drivers/video/nvidia.ko.zst</Path>
<Path fileType="data">/usr/share/metainfo/nvidia-470-current.metainfo.xml</Path>
</Files>
<Conflicts>
<Package>nvidia-390-glx-driver-current</Package>
Expand All @@ -272,12 +275,12 @@
</Files>
</Package>
<History>
<Update release="60">
<Date>2024-01-19</Date>
<Update release="61">
<Date>2024-01-21</Date>
<Version>470.223.02</Version>
<Comment>Packaging update</Comment>
<Name>Reilly Brogan</Name>
<Email>solus@reillybrogan.com</Email>
<Name>Joey Riches</Name>
<Email>josephriches@gmail.com</Email>
</Update>
</History>
</PISI>