Base: Remove /res/pci.ids and download at build time instead

This is an external file from https://pci-ids.ucw.cz that's being updated
daily, which was imported a while ago but probably shouldn't live in the
SerenityOS repository in the first place (or else would need manual
maintenance). The legal aspects of redistributing this file as we
currently do are not quite clear to me, they require either GPL (version
2 or later) or 3-clause BSD - Serenity is 2-clause BSD...

The current version we use is 2019.08.08, so quite outdated - and while
most of these devices are obviously not supported, we're still capable
of *listing* them, so having an up-to-date version with recent additions
and fixes would be nice.

This updates the root CMakeLists.txt to check for existence of the file
and download it if not found - effectively on every fresh build. Do note
that this is not a critical file, and the system runs just fine should
this ever fail. :^)
This commit is contained in:
Linus Groh 2021-02-07 00:52:40 +01:00 committed by Andreas Kling
parent ce1c8e0bde
commit dff808d087
Notes: sideshowbarker 2024-07-18 22:33:34 +09:00
2 changed files with 7 additions and 31871 deletions

File diff suppressed because it is too large Load diff

View file

@ -151,3 +151,10 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/Userland)
add_subdirectory(AK)
add_subdirectory(Kernel)
add_subdirectory(Userland)
set(PCI_IDS_URL https://pci-ids.ucw.cz/v2.2/pci.ids)
set(PCI_IDS_PATH ${CMAKE_INSTALL_DATAROOTDIR}/pci.ids)
if(NOT EXISTS ${PCI_IDS_PATH})
message(STATUS "Downloading PCI ID database from ${PCI_IDS_URL}...")
file(DOWNLOAD ${PCI_IDS_URL} ${PCI_IDS_PATH} INACTIVITY_TIMEOUT 10)
endif()