meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: Ifc60fd8e7091d83202753a57f215667613f1691c
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/bmc/meson.build b/bmc/meson.build
index 62fbeec..cf7152b 100644
--- a/bmc/meson.build
+++ b/bmc/meson.build
@@ -1,7 +1,10 @@
conf = configuration_data()
# DBus information
-conf.set_quoted('BMC_INVENTORY_INTERFACE', 'xyz.openbmc_project.Inventory.Item.Bmc')
+conf.set_quoted(
+ 'BMC_INVENTORY_INTERFACE',
+ 'xyz.openbmc_project.Inventory.Item.Bmc',
+)
conf.set_quoted('BUSNAME_UPDATER', 'xyz.openbmc_project.Software.BMC.Updater')
conf.set_quoted('DOWNLOAD_BUSNAME', 'xyz.openbmc_project.Software.Download')
conf.set_quoted('FILEPATH_IFACE', 'xyz.openbmc_project.Common.FilePath')
@@ -15,8 +18,14 @@
conf.set_quoted('SYSTEMD_INTERFACE', 'org.freedesktop.systemd1.Manager')
conf.set_quoted('VERSION_BUSNAME', 'xyz.openbmc_project.Software.Version')
conf.set_quoted('VERSION_IFACE', 'xyz.openbmc_project.Software.Version')
-conf.set_quoted('EXTENDED_VERSION_IFACE', 'xyz.openbmc_project.Software.ExtendedVersion')
-conf.set_quoted('COMPATIBLE_IFACE', 'xyz.openbmc_project.Inventory.Decorator.Compatible')
+conf.set_quoted(
+ 'EXTENDED_VERSION_IFACE',
+ 'xyz.openbmc_project.Software.ExtendedVersion',
+)
+conf.set_quoted(
+ 'COMPATIBLE_IFACE',
+ 'xyz.openbmc_project.Inventory.Decorator.Compatible',
+)
# Names of the forward and reverse associations
conf.set_quoted('ACTIVATION_FWD_ASSOCIATION', 'inventory')
@@ -44,7 +53,10 @@
# Configurable features
conf.set('HOST_BIOS_UPGRADE', get_option('host-bios-upgrade').allowed())
conf.set('WANT_SIGNATURE_VERIFY', get_option('verify-signature').allowed())
-conf.set('START_UPDATE_DBUS_INTEFACE', get_option('software-update-dbus-interface').allowed())
+conf.set(
+ 'START_UPDATE_DBUS_INTEFACE',
+ get_option('software-update-dbus-interface').allowed(),
+)
# Configurable variables
conf.set('ACTIVE_BMC_MAX_ALLOWED', get_option('active-bmc-max-allowed'))
@@ -71,11 +83,14 @@
endif
if get_option('bmc-static-dual-image').allowed()
- conf.set('BMC_STATIC_DUAL_IMAGE', get_option('bmc-static-dual-image').allowed())
- conf.set_quoted('ALT_ROFS_DIR', get_option('alt-rofs-dir'))
- conf.set_quoted('ALT_RWFS', get_option('alt-rwfs-dir'))
+ conf.set(
+ 'BMC_STATIC_DUAL_IMAGE',
+ get_option('bmc-static-dual-image').allowed(),
+ )
+ conf.set_quoted('ALT_ROFS_DIR', get_option('alt-rofs-dir'))
+ conf.set_quoted('ALT_RWFS', get_option('alt-rwfs-dir'))
else
- conf.set_quoted('ALT_RWFS', '/media/alt/var/persist')
+ conf.set_quoted('ALT_RWFS', '/media/alt/var/persist')
endif
configure_file(output: 'config.h', configuration: conf)
@@ -87,29 +102,21 @@
'force-reboot.service.in',
'usr-local.mount.in',
'xyz.openbmc_project.Software.Download.service.in',
- 'xyz.openbmc_project.Software.Sync.service.in'
+ 'xyz.openbmc_project.Software.Sync.service.in',
]
-image_updater_sources = files(
- 'activation.cpp',
- 'images.cpp',
- 'item_updater.cpp',
- 'serialize.cpp',
- 'version.cpp',
- 'utils.cpp',
- 'msl_verify.cpp',
- 'update_manager.cpp'
-)
+image_updater_sources = files('activation.cpp', 'images.cpp', 'item_updater.cpp', 'msl_verify.cpp', 'serialize.cpp', 'update_manager.cpp'
+, 'utils.cpp', 'version.cpp')
if get_option('bmc-layout').contains('static')
image_updater_sources += files(
'static/flash.cpp',
- 'static/item_updater_helper.cpp'
+ 'static/item_updater_helper.cpp',
)
elif get_option('bmc-layout').contains('ubi')
image_updater_sources += files(
'ubi/flash.cpp',
- 'ubi/item_updater_helper.cpp'
+ 'ubi/item_updater_helper.cpp',
)
unit_files += [
@@ -120,12 +127,12 @@
'ubi/obmc-flash-bmc-ubiro-remove@.service.in',
'ubi/obmc-flash-bmc-ubirw.service.in',
'ubi/obmc-flash-bmc-ubirw-remove.service.in',
- 'ubi/obmc-flash-bmc-updateubootvars@.service.in'
+ 'ubi/obmc-flash-bmc-updateubootvars@.service.in',
]
elif get_option('bmc-layout').contains('mmc')
image_updater_sources += files(
'mmc/flash.cpp',
- 'mmc/item_updater_helper.cpp'
+ 'mmc/item_updater_helper.cpp',
)
unit_files += [
@@ -157,25 +164,21 @@
'sync_manager_main.cpp',
'sync_watch.cpp',
dependencies: deps,
- install: true
+ install: true,
)
- install_data('synclist',
- install_dir: get_option('sysconfdir')
- )
+ install_data('synclist', install_dir: get_option('sysconfdir'))
- install_data('sync-once.sh',
+ install_data(
+ 'sync-once.sh',
install_mode: 'rwxr-xr-x',
- install_dir: get_option('bindir')
+ install_dir: get_option('bindir'),
)
endif
if (get_option('verify-signature').allowed())
- image_updater_sources += files(
- 'utils.cpp',
- 'image_verify.cpp',
- 'openssl_alloc.cpp'
- )
+ image_updater_sources += files('image_verify.cpp', 'openssl_alloc.cpp'
+ , 'utils.cpp')
endif
executable(
@@ -183,12 +186,10 @@
'download_manager.cpp',
'download_manager_main.cpp',
dependencies: deps,
- install: true
+ install: true,
)
-software_common_sources = files(
- 'software_utils.cpp',
-)
+software_common_sources = files('software_utils.cpp')
if get_option('software-update-dbus-interface').allowed()
executable(
@@ -197,16 +198,14 @@
image_updater_sources,
software_common_sources,
dependencies: [deps, ssl],
- install: true
+ install: true,
)
- unit_files += [
- 'xyz.openbmc_project.Software.Manager.service.in'
- ]
+ unit_files += ['xyz.openbmc_project.Software.Manager.service.in']
else
- unit_files += [
+ unit_files += [
'xyz.openbmc_project.Software.BMC.Updater.service.in',
- 'xyz.openbmc_project.Software.Version.service.in'
- ]
+ 'xyz.openbmc_project.Software.Version.service.in',
+ ]
endif
executable(
@@ -215,7 +214,7 @@
software_common_sources,
'item_updater_main.cpp',
dependencies: [deps, ssl, boost_dep],
- install: true
+ install: true,
)
executable(
@@ -226,27 +225,28 @@
'watch.cpp',
software_common_sources,
dependencies: [deps, ssl],
- install: true
+ install: true,
)
-install_data('obmc-flash-bmc',
+install_data(
+ 'obmc-flash-bmc',
install_mode: 'rwxr-xr-x',
- install_dir: get_option('bindir')
+ install_dir: get_option('bindir'),
)
-install_data('detect-slot-aspeed',
+install_data(
+ 'detect-slot-aspeed',
install_mode: 'rwxr-xr-x',
- install_dir: get_option('bindir')
+ install_dir: get_option('bindir'),
)
-install_data('reset-cs0-aspeed',
+install_data(
+ 'reset-cs0-aspeed',
install_mode: 'rwxr-xr-x',
- install_dir: get_option('bindir')
+ install_dir: get_option('bindir'),
)
-install_data('software.conf',
- install_dir: '/usr/lib/tmpfiles.d/'
-)
+install_data('software.conf', install_dir: '/usr/lib/tmpfiles.d/')
foreach u : unit_files
configure_file(
@@ -261,21 +261,24 @@
# If test coverage of source files within the root directory are wanted,
# need to define and build the tests from here
if build_tests.allowed()
- gtest = dependency('gtest', main: true, disabler: true, required: build_tests)
- include_srcs = declare_dependency(sources: [
- 'utils.cpp',
- 'image_verify.cpp',
- 'images.cpp',
- 'version.cpp']
+ gtest = dependency(
+ 'gtest',
+ main: true,
+ disabler: true,
+ required: build_tests,
+ )
+ include_srcs = declare_dependency(
+ sources: ['utils.cpp', 'image_verify.cpp', 'images.cpp', 'version.cpp'],
)
- test('utest',
+ test(
+ 'utest',
executable(
'utest',
'./test/utest.cpp',
- dependencies: [deps, gtest, include_srcs, ssl]
- )
-)
+ dependencies: [deps, gtest, include_srcs, ssl],
+ ),
+ )
endif
if get_option('usb-code-update').allowed()
diff --git a/bmc/side-switch/meson.build b/bmc/side-switch/meson.build
index 9d6cbf0..4eda07a 100644
--- a/bmc/side-switch/meson.build
+++ b/bmc/side-switch/meson.build
@@ -1,23 +1,20 @@
-source = [
- 'side_switch.cpp',
- '../utils.cpp',
- ]
+source = ['side_switch.cpp', '../utils.cpp']
executable(
'phosphor-bmc-side-switch',
source,
include_directories: ['..'],
- dependencies: [
- phosphor_logging_dep,
- ],
+ dependencies: [phosphor_logging_dep],
install: true,
- install_dir: get_option('bindir')
+ install_dir: get_option('bindir'),
)
systemd_system_unit_dir = dependency('systemd').get_variable(
'systemdsystemunitdir',
- pkgconfig_define: ['prefix', get_option('prefix')])
+ pkgconfig_define: ['prefix', get_option('prefix')],
+)
install_data(
- 'phosphor-bmc-side-switch.service',
- install_dir: systemd_system_unit_dir)
+ 'phosphor-bmc-side-switch.service',
+ install_dir: systemd_system_unit_dir,
+)
diff --git a/bmc/usb/meson.build b/bmc/usb/meson.build
index 54be476..b90f370 100644
--- a/bmc/usb/meson.build
+++ b/bmc/usb/meson.build
@@ -6,11 +6,7 @@
sdeventplus_dep = dependency('sdeventplus')
-source = [
- 'usb_manager_main.cpp',
- 'usb_manager.cpp',
- '../utils.cpp',
- ]
+source = ['usb_manager_main.cpp', 'usb_manager.cpp', '../utils.cpp']
executable(
'phosphor-usb-code-update',
@@ -24,22 +20,21 @@
sdeventplus_dep,
],
install: true,
- install_dir: get_option('bindir')
+ install_dir: get_option('bindir'),
)
systemd_system_unit_dir = dependency('systemd').get_variable(
'systemdsystemunitdir',
- pkgconfig_define: ['prefix', get_option('prefix')])
+ pkgconfig_define: ['prefix', get_option('prefix')],
+)
udev_dir = dependency('udev').get_variable(
'udev_dir',
- pkgconfig_define: ['prefix', get_option('prefix')])
+ pkgconfig_define: ['prefix', get_option('prefix')],
+)
install_data(
'services/usb-code-update@.service',
- install_dir: systemd_system_unit_dir
+ install_dir: systemd_system_unit_dir,
)
-install_data(
- '70-bmc-usb.rules',
- install_dir: udev_dir / 'rules.d'
-)
+install_data('70-bmc-usb.rules', install_dir: udev_dir / 'rules.d')
diff --git a/common/pldm/meson.build b/common/pldm/meson.build
index 973dad2..b0eed1a 100644
--- a/common/pldm/meson.build
+++ b/common/pldm/meson.build
@@ -1,13 +1,9 @@
-libpldmutil = static_library('pldmpackageutil',
- 'package_parser.cpp',
- 'pldm_package_util.cpp',
- include_directories: ['.'],
- dependencies: [
- pdi_dep,
- phosphor_logging_dep,
- sdbusplus_dep,
- libpldm_dep,
- ],
- install: false,
+libpldmutil = static_library(
+ 'pldmpackageutil',
+ 'package_parser.cpp',
+ 'pldm_package_util.cpp',
+ include_directories: ['.'],
+ dependencies: [pdi_dep, phosphor_logging_dep, sdbusplus_dep, libpldm_dep],
+ install: false,
)
diff --git a/meson.build b/meson.build
index 74245c0..64a272f 100644
--- a/meson.build
+++ b/meson.build
@@ -1,13 +1,16 @@
-project('phosphor-bmc-code-mgmt', 'cpp',
+project(
+ 'phosphor-bmc-code-mgmt',
+ 'cpp',
default_options: [
'buildtype=debugoptimized',
'cpp_std=c++23',
'warning_level=3',
- 'werror=true'
+ 'werror=true',
],
meson_version: '>=1.1.1',
license: 'Apache-2.0',
- version: '1.0')
+ version: '1.0',
+)
add_project_arguments(
'-DBOOST_SYSTEM_NO_DEPRECATED',
@@ -36,24 +39,23 @@
'cereal/cereal.hpp',
'cereal::specialize',
dependencies: cereal_dep,
- required: false)
+ required: false,
+)
if not has_cereal
cereal_opts = import('cmake').subproject_options()
- cereal_opts.add_cmake_defines({'BUILD_TESTS': 'OFF', 'SKIP_PERFORMANCE_COMPARISON': 'ON'})
+ cereal_opts.add_cmake_defines(
+ {'BUILD_TESTS': 'OFF', 'SKIP_PERFORMANCE_COMPARISON': 'ON'},
+ )
cereal_proj = import('cmake').subproject(
'cereal',
options: cereal_opts,
- required: false)
+ required: false,
+ )
assert(cereal_proj.found(), 'cereal is required')
cereal_dep = cereal_proj.dependency('cereal')
endif
-deps = [
- cereal_dep,
- pdi_dep,
- phosphor_logging_dep,
- sdbusplus_dep,
-]
+deps = [cereal_dep, pdi_dep, phosphor_logging_dep, sdbusplus_dep]
ssl = dependency('openssl')
@@ -65,13 +67,13 @@
subdir('bmc')
if build_tests.allowed()
- libpldm_dep = dependency('libpldm')
+ libpldm_dep = dependency('libpldm')
endif
common_include = include_directories('.')
if build_tests.allowed()
- subdir('common')
- subdir('test')
+ subdir('common')
+ subdir('test')
endif
diff --git a/meson.options b/meson.options
index 605786d..0907c38 100644
--- a/meson.options
+++ b/meson.options
@@ -3,133 +3,175 @@
# - static: NOR flash configured with fixed-sized MTD partitions.
# - ubi: NOR flash device configured with UBI volumes.
# - mmc: eMMC flash device configured with ext4 filesystems.
-option('bmc-layout', type: 'combo',
+option(
+ 'bmc-layout',
+ type: 'combo',
choices: ['static', 'ubi', 'mmc'],
value: 'static',
- description: 'The BMC layout type.')
+ description: 'The BMC layout type.',
+)
# Features
-option('host-bios-upgrade', type: 'feature', value: 'enabled',
- description: 'Enable host bios upgrade support.')
+option(
+ 'host-bios-upgrade',
+ type: 'feature',
+ value: 'enabled',
+ description: 'Enable host bios upgrade support.',
+)
-option('sync-bmc-files', type: 'feature', value: 'enabled',
- description: 'Enable sync of filesystem files.')
+option(
+ 'sync-bmc-files',
+ type: 'feature',
+ value: 'enabled',
+ description: 'Enable sync of filesystem files.',
+)
option('tests', type: 'feature', description: 'Build tests')
-option('verify-signature', type: 'feature', value: 'enabled',
- description: 'Enable image signature validation.')
+option(
+ 'verify-signature',
+ type: 'feature',
+ value: 'enabled',
+ description: 'Enable image signature validation.',
+)
option(
- 'usb-code-update', type: 'feature', value: 'enabled',
+ 'usb-code-update',
+ type: 'feature',
+ value: 'enabled',
description: 'Firmware update via USB.',
)
-option('software-update-dbus-interface', type: 'feature', value: 'enabled',
+option(
+ 'software-update-dbus-interface',
+ type: 'feature',
+ value: 'enabled',
description: 'Implementation using software update D-Bus interface - https://github.com/openbmc/docs/blob/master/designs/code-update.md.',
)
option(
- 'side-switch-on-boot', type: 'feature', value: 'enabled',
+ 'side-switch-on-boot',
+ type: 'feature',
+ value: 'enabled',
description: 'Automatic flash side switch on boot',
)
# Variables
option(
- 'active-bmc-max-allowed', type: 'integer',
+ 'active-bmc-max-allowed',
+ type: 'integer',
value: 1,
description: 'The maximum allowed active BMC versions.',
)
option(
- 'hash-file-name', type: 'string',
+ 'hash-file-name',
+ type: 'string',
value: 'hashfunc',
description: 'The name of the hash file.',
)
option(
- 'img-upload-dir', type: 'string',
+ 'img-upload-dir',
+ type: 'string',
value: '/tmp/images',
description: 'Directory where downloaded software images are placed.',
)
option(
- 'manifest-file-name', type: 'string',
+ 'manifest-file-name',
+ type: 'string',
value: 'MANIFEST',
description: 'The name of the MANIFEST file.',
)
option(
- 'media-dir', type: 'string',
+ 'media-dir',
+ type: 'string',
value: '/run/media',
description: 'The base dir where all read-only partitions are mounted.',
)
option(
- 'optional-images', type: 'array',
+ 'optional-images',
+ type: 'array',
value: [],
description: 'A list of additional image files in the BMC tarball.',
)
option(
- 'publickey-file-name', type: 'string',
+ 'publickey-file-name',
+ type: 'string',
value: 'publickey',
description: 'The name of the public key file.',
)
option(
- 'signature-file-ext', type: 'string',
+ 'signature-file-ext',
+ type: 'string',
value: '.sig',
description: 'The extension of the Signature file.',
)
option(
- 'signed-image-conf-path', type: 'string',
+ 'signed-image-conf-path',
+ type: 'string',
value: '/etc/activationdata/',
description: 'Path of public key and hash function files.',
)
option(
- 'sync-list-dir-path', type: 'string',
+ 'sync-list-dir-path',
+ type: 'string',
value: '/etc/',
description: 'The path to the sync list file directory.',
)
option(
- 'sync-list-file-name', type: 'string',
+ 'sync-list-file-name',
+ type: 'string',
value: 'synclist',
description: 'The name of the sync list file.',
)
option(
- 'bmc-msl', type: 'string',
+ 'bmc-msl',
+ type: 'string',
value: '',
description: 'The BMC minimum ship level.',
)
option(
- 'regex-bmc-msl', type: 'string',
+ 'regex-bmc-msl',
+ type: 'string',
value: '',
description: 'The Regular expression to parse the MSL.',
)
option(
- 'bios-object-path', type: 'string',
+ 'bios-object-path',
+ type: 'string',
value: '/xyz/openbmc_project/software/bios_active',
description: 'The BIOS DBus object path.',
)
-option('bmc-static-dual-image', type: 'feature', value: 'enabled',
- description: 'Enable the dual image support for static layout.')
+option(
+ 'bmc-static-dual-image',
+ type: 'feature',
+ value: 'enabled',
+ description: 'Enable the dual image support for static layout.',
+)
option(
- 'alt-rofs-dir', type: 'string',
+ 'alt-rofs-dir',
+ type: 'string',
value: '/run/media/rofs-alt',
description: 'The base dir where all read-only partitions are mounted.',
)
option(
- 'alt-rwfs-dir', type: 'string',
+ 'alt-rwfs-dir',
+ type: 'string',
value: '/run/media/rwfs-alt/cow',
description: 'The dir for alt-rwfs partition.',
)
diff --git a/subprojects/packagefiles/boost/meson.build b/subprojects/packagefiles/boost/meson.build
index 2caabf5..6935475 100644
--- a/subprojects/packagefiles/boost/meson.build
+++ b/subprojects/packagefiles/boost/meson.build
@@ -1,11 +1,5 @@
-project('boost',
- 'cpp',
- version : '1.84.0',
- license : 'Boost'
-)
+project('boost', 'cpp', version: '1.84.0', license: 'Boost')
-boost_dep = declare_dependency(
- include_directories : include_directories('.'),
-)
+boost_dep = declare_dependency(include_directories: include_directories('.'))
meson.override_dependency('boost', boost_dep)
diff --git a/test/create_package/meson.build b/test/create_package/meson.build
index 44cc9fe..2c93372 100644
--- a/test/create_package/meson.build
+++ b/test/create_package/meson.build
@@ -1,12 +1,10 @@
-libpldmcreatepkg = static_library('pldmcreatepkg',
- 'create_pldm_fw_package.cpp',
- 'firmware_device_id_area.cpp',
- 'component_image_info_area.cpp',
- include_directories: ['.'],
- dependencies: [
- phosphor_logging_dep,
- libpldm_dep,
- ],
- install: false,
+libpldmcreatepkg = static_library(
+ 'pldmcreatepkg',
+ 'create_pldm_fw_package.cpp',
+ 'firmware_device_id_area.cpp',
+ 'component_image_info_area.cpp',
+ include_directories: ['.'],
+ dependencies: [phosphor_logging_dep, libpldm_dep],
+ install: false,
)