pmbootstrap kconfig check: add iwd check (MR 2133)

iwd seems like a promising alternative to wpa_supplicant. It uses crypto
implementations from the kernel, so let's make kconfig check aware of
the options it needs.
This commit is contained in:
Oliver Smith 2021-10-21 09:41:13 +02:00
parent d856e21673
commit aead36d5ac
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
4 changed files with 38 additions and 0 deletions

View File

@ -352,6 +352,34 @@ necessary_kconfig_options_apparmor = {
},
}
# Necessary iwd kernel config options (inet wireless daemon)
# Obtained from 'grep ADD_MISSING src/main.c' in iwd.git
necessary_kconfig_options_iwd = {
">=0.0.0": { # all versions
"all": { # all arches
"ASYMMETRIC_KEY_TYPE": True,
"ASYMMETRIC_PUBLIC_KEY_SUBTYPE": True,
"CRYPTO_AES": True,
"CRYPTO_CBC": True,
"CRYPTO_CMAC": True,
"CRYPTO_DES": True,
"CRYPTO_ECB": True,
"CRYPTO_HMAC": True,
"CRYPTO_MD5": True,
"CRYPTO_SHA1": True,
"CRYPTO_SHA256": True,
"CRYPTO_SHA512": True,
"CRYPTO_USER_API_HASH": True,
"CRYPTO_USER_API_SKCIPHER": True,
"KEYS": True,
"KEY_DH_OPERATIONS": True,
"PKCS7_MESSAGE_PARSER": True,
"PKCS8_PRIVATE_KEY_PARSER": True,
"X509_CERTIFICATE_PARSER": True,
},
},
}
# Necessary nftables kernel config options (firewall)
necessary_kconfig_options_nftables = {
">=3.13.0": { # nftables support introduced here

View File

@ -404,6 +404,7 @@ def kconfig(args):
args, package,
force_anbox_check=args.anbox,
force_apparmor_check=args.apparmor,
force_iwd_check=args.iwd,
force_nftables_check=args.nftables,
force_containers_check=args.containers,
force_zram_check=args.zram,

View File

@ -436,6 +436,8 @@ def arguments_kconfig(subparser):
" options needed for anbox too")
check.add_argument("--apparmor", action="store_true", help="check"
" options needed for apparmor too")
check.add_argument("--iwd", action="store_true", help="check"
" options needed for iwd too")
check.add_argument("--nftables", action="store_true", help="check"
" options needed for nftables too")
check.add_argument("--containers", action="store_true",

View File

@ -87,6 +87,7 @@ def check_option(component, details, config, config_path_pretty, option,
def check_config(config_path, config_path_pretty, config_arch, pkgver,
anbox=False,
apparmor=False,
iwd=False,
nftables=False,
containers=False,
zram=False,
@ -100,6 +101,8 @@ def check_config(config_path, config_path_pretty, config_arch, pkgver,
components["anbox"] = pmb.config.necessary_kconfig_options_anbox
if apparmor:
components["apparmor"] = pmb.config.necessary_kconfig_options_apparmor
if iwd:
components["iwd"] = pmb.config.necessary_kconfig_options_iwd
if nftables:
components["nftables"] = pmb.config.necessary_kconfig_options_nftables
if containers:
@ -152,6 +155,7 @@ def check_config_options_set(config, config_path_pretty, config_arch, options,
def check(args, pkgname,
force_anbox_check=False,
force_apparmor_check=False,
force_iwd_check=False,
force_nftables_check=False,
force_containers_check=False,
force_zram_check=False,
@ -178,6 +182,8 @@ def check(args, pkgname,
"pmb:kconfigcheck-anbox" in apkbuild["options"])
check_apparmor = force_apparmor_check or (
"pmb:kconfigcheck-apparmor" in apkbuild["options"])
check_iwd = force_iwd_check or (
"pmb:kconfigcheck-iwd" in apkbuild["options"])
check_nftables = force_nftables_check or (
"pmb:kconfigcheck-nftables" in apkbuild["options"])
check_containers = force_containers_check or (
@ -193,6 +199,7 @@ def check(args, pkgname,
pkgver,
anbox=check_anbox,
apparmor=check_apparmor,
iwd=check_iwd,
nftables=check_nftables,
containers=check_containers,
zram=check_zram,