start-update-interface: add software_utils
Refactor and move the common code into software_utils namespace. Add new
untar API which untars from a unix_fd. This change is based on -
https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/65738
https://gerrit.openbmc.org/c/openbmc/docs/+/65739
Change-Id: Ifcbf78a06ef482ca7c7765efd5c24a533399b979
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/meson.build b/meson.build
index 92db933..82326d8 100644
--- a/meson.build
+++ b/meson.build
@@ -157,7 +157,6 @@
'activation.cpp',
'images.cpp',
'item_updater.cpp',
- 'item_updater_main.cpp',
'serialize.cpp',
'version.cpp',
'utils.cpp',
@@ -249,20 +248,25 @@
install: true
)
+software_common_sources = files(
+ 'software_utils.cpp'
+)
+
executable(
'phosphor-image-updater',
image_updater_sources,
+ software_common_sources,
+ 'item_updater_main.cpp',
dependencies: [deps, ssl, boost_dep],
install: true
)
-software_manager_common_sources = files()
-
if get_option('software-update-dbus-interface').allowed()
executable(
'phosphor-software-manager',
'software_manager.cpp',
- software_manager_common_sources,
+ image_updater_sources,
+ software_common_sources,
dependencies: [deps, ssl],
install: true
)
@@ -277,7 +281,7 @@
'image_manager_main.cpp',
'version.cpp',
'watch.cpp',
- software_manager_common_sources,
+ software_common_sources,
dependencies: [deps, ssl],
install: true
)