Merge pull request #30035 from keszybz/buid-sys-cleanups
Build system cleanups
This commit is contained in:
+13
-19
@@ -2,31 +2,25 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
from csv import reader
|
||||
from enum import Enum
|
||||
|
||||
def read_table(a):
|
||||
|
||||
table = []
|
||||
|
||||
with open(a, newline='') as csvfile:
|
||||
for row in reader(csvfile):
|
||||
if row[0] == "Company":
|
||||
# Skip header
|
||||
continue
|
||||
table.append(row)
|
||||
# pylint: disable=consider-using-with
|
||||
|
||||
def read_table(filename):
|
||||
table = list(reader(open(filename, newline='')))
|
||||
table = table[1:] # Skip header
|
||||
table.sort(key=lambda x: x[1])
|
||||
|
||||
for row in table:
|
||||
# Some IDs end with whitespace, while they didn't in the old HTML table, so it's probably
|
||||
# a mistake, strip it.
|
||||
print("\nacpi:{0}*:\n ID_VENDOR_FROM_DATABASE={1}".format(row[1].strip(), row[0].strip()))
|
||||
print(f'\nacpi:{row[1].strip()}*:\n ID_VENDOR_FROM_DATABASE={row[0].strip()}')
|
||||
|
||||
print('# This file is part of systemd.\n'
|
||||
'#\n'
|
||||
'# Data imported from:\n'
|
||||
'# https://uefi.org/uefi-pnp-export\n'
|
||||
'# https://uefi.org/uefi-acpi-export')
|
||||
print('''\
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# Data imported from:
|
||||
# https://uefi.org/uefi-pnp-export
|
||||
# https://uefi.org/uefi-acpi-export''')
|
||||
|
||||
read_table("acpi_id_registry.html")
|
||||
read_table("pnp_id_registry.html")
|
||||
read_table('acpi_id_registry.csv')
|
||||
read_table('pnp_id_registry.csv')
|
||||
|
||||
@@ -46,11 +46,7 @@ else
|
||||
endif
|
||||
|
||||
fuzz_c_args = get_option('c_args')
|
||||
if cxx_cmd != ''
|
||||
fuzz_cpp_args = get_option('cpp_args')
|
||||
else
|
||||
fuzz_cpp_args = []
|
||||
endif
|
||||
fuzz_cpp_args = cxx_cmd != '' ? get_option('cpp_args') : []
|
||||
|
||||
sanitize_address_undefined = custom_target(
|
||||
'sanitize-address-undefined-fuzzers',
|
||||
|
||||
@@ -21,8 +21,8 @@ if [ "${2:-}" != "-n" ]; then (
|
||||
curl --fail -L -o ma-large.txt 'http://standards-oui.ieee.org/oui/oui.txt'
|
||||
curl --fail -L -o ma-medium.txt 'http://standards-oui.ieee.org/oui28/mam.txt'
|
||||
curl --fail -L -o ma-small.txt 'http://standards-oui.ieee.org/oui36/oui36.txt'
|
||||
curl --fail -L -o pnp_id_registry.html 'https://uefi.org/uefi-pnp-export'
|
||||
curl --fail -L -o acpi_id_registry.html 'https://uefi.org/uefi-acpi-export'
|
||||
curl --fail -L -o pnp_id_registry.csv 'https://uefi.org/uefi-pnp-export'
|
||||
curl --fail -L -o acpi_id_registry.csv 'https://uefi.org/uefi-acpi-export'
|
||||
) fi
|
||||
|
||||
set -x
|
||||
|
||||
Reference in New Issue
Block a user