[PATCH 00/10] Add interface for running pb-plugins
Samuel Mendoza-Jonas
sam at mendozajonas.com
Fri Jun 23 16:26:59 AEST 2017
This is a cleaned up and improved version of the previous RFC.
With this series Petitboot can discover pb-plugin sources from
PXE-formatted files and present them to the user. From the new
nc-plugin screen the user can request that these plugins be installed
and then run.
The major change from the RFC is that plugins are now run synchronously.
This reduces the complexity of petitboot-nc handing over the display to
a separate program, and shouldn't have a user-visible impact.
One caveat is that in its current incarnation nc-plugin merely runs a
command described by the pb-plugin and displays the output. It does not
put the user in a usable shell.
While we can spawn a real shell and run the command in that, that may
have implications with work currently going on for secure/trusted boot.
A preferable solution could be to extend the pb-plugin ABI to include
command *arguments*, but that is not covered in this series.
Samuel Mendoza-Jonas (10):
utils/pb-plugin: Add non-interactive install
discover/pxe-parser: Recognise plugin sources
lib/process: Add raw stdout mode
utils: Add pb-exec wrapper
lib: Add plugin_option type and protocol
discover: Handle and track plugin_options
discover: Add 'plugin' user-event
discover: Handle plugin install request
ui/ncurses: Update cui_run_cmd() to pass display to command
ui/ncurses: Add plugin menu and nc-plugin screen
configure.ac | 2 +
discover/device-handler.c | 116 +++++++++++
discover/device-handler.h | 7 +
discover/discover-server.c | 67 ++++++-
discover/discover-server.h | 5 +
discover/event.c | 2 +
discover/event.h | 1 +
discover/pxe-parser.c | 19 +-
discover/user-event.c | 57 ++++++
lib/pb-protocol/pb-protocol.c | 117 ++++++++++-
lib/pb-protocol/pb-protocol.h | 9 +
lib/process/process.c | 7 +-
lib/process/process.h | 1 +
lib/system/system.c | 2 +
lib/system/system.h | 2 +
lib/types/types.h | 20 ++
test/parser/Makefile.am | 1 +
test/parser/handler.c | 6 +
test/parser/user-event.c | 13 ++
ui/common/discover-client.c | 48 +++++
ui/common/discover-client.h | 9 +
ui/ncurses/Makefile.am | 7 +-
ui/ncurses/nc-boot-editor.c | 3 +-
ui/ncurses/nc-cui.c | 328 +++++++++++++++++++++++++++++--
ui/ncurses/nc-cui.h | 22 ++-
ui/ncurses/nc-menu.c | 32 ++-
ui/ncurses/nc-menu.h | 3 +-
ui/ncurses/nc-plugin-help.c | 7 +
ui/ncurses/nc-plugin-menu-help.c | 7 +
ui/ncurses/nc-plugin.c | 406 +++++++++++++++++++++++++++++++++++++++
ui/ncurses/nc-plugin.h | 34 ++++
ui/ncurses/nc-scr.h | 1 +
utils/Makefile.am | 2 +-
utils/pb-exec | 15 ++
utils/pb-plugin | 36 ++--
35 files changed, 1368 insertions(+), 46 deletions(-)
create mode 100644 test/parser/user-event.c
create mode 100644 ui/ncurses/nc-plugin-help.c
create mode 100644 ui/ncurses/nc-plugin-menu-help.c
create mode 100644 ui/ncurses/nc-plugin.c
create mode 100644 ui/ncurses/nc-plugin.h
create mode 100755 utils/pb-exec
--
2.13.1
More information about the Petitboot
mailing list