On Fri, Sep 01, 2017 at 05:35:40PM +0200, Andreas Reichel wrote:

Actually it is PATCH v2, not RFC v2. But asking for comments
despite :)

> From: Reichel Andreas <[email protected]>
> 
> Differences to last RFC:
> * use ln -f in first commit
> * build tests always, use make check to run them
> * env backends: remove logic from configure.ac, let linker
>   handle conflicts
> * Use journal in bg_setenv tool instead of a temporary env,
>   i.e. store actions instead of a differential state.
> 
> In this patch series the following is adressed:
> 
> * When building and the link `bg_printenv` already exists,
>   an error is produced. Fix that.
> * To maintain continuous tests, tests are compiled by default.
>   To run the tests, use `make check`.
> * For better usability, `bg_setenv`'s parameter -f was changed
>   from `--file` to `--filepath` and now accepts a path, where
>   `BGENV.DAT` is created so that it can be directly applied to
>   the real environment location. Also, internal logic was changed
>   to work with a journal of actions to perform instead of a temporary
>   environment as a differential state.
> * The environment API consisted of two static libraries of which
>   one was used by the tools and one was for external applications.
>   This API was refactored to one library only and also with respect
>   to better file naming. FAT implementation specific stuff goes into
>   env_api_fat.c and generic stuff into env_api.c.
> * The option for different environment storage backends is given by
>   the configure option --with-env-type, which currently only supports
>   FAT.
> * The number of environment partitions is now configurable with
>   --with-num-config-parts, where the minimum amount is 1.
> * The complicated mapping between `boot_once` and `testing` flags
>   and `ustate` is removed and a real `ustate` struct member is
>   introduced. This significantly improves API usage as only two
>   functions `set_global_state` and `get_global_state` are needed
>   to get the update status instead of six different functions with
>   a specific order.
> * Add support for user variables. From the API the user can insert
>   all kind of binary data into the environment by defining user
>   specific types, stored as `char *`. It is completely up to the user
>   to interpret the stored data. From the tools side, a standard
>   data type is defined as String and stores `char *` character arrays
>   into the user variable space of the environment. Single variables
>   can be set via `bg_setenv -x KEY=VAL`, where the -x option can be
>   repeated multiple times. `bg_printenv` shows a list of all set
>   user variables and prints their values if their type is of `String`.
>   Variables can be deleted by omitting `VAL`.
> * Fix a problem with crc32 testing of environment tools: When the
>   tools are compiled for a different size of user variable space,
>   the position of the crc32 value changes. If it is not read correctly,
>   tools must reinitialize the working copy of the environment to
>   remain usable.
> * Documentation is updated.
> * Tests are updated.
> * docs/TODO.md is updated.
> 
> Signed-off-by: Andreas Reichel <[email protected]>
> 
> Reichel Andreas (12):
>   Makefile.am: Bugfix for bg_printenv symlink
>   tests: Build tests always, run tests on 'make check'
>   bg_setenv: Specify output path with --filepath
>   env: Rename environment API files
>   env: Make backend for environment storage configurable
>   env: Make number of config partitions configurable
>   ustate: Refactor state variable
>   swupdate-adapter: Simplify API
>   Combine libraries to one API
>   env_api_fat: Fix problem with crc32 testing
>   env: Add user variables
>   bg_setenv: Use task list instead of virtual environment
> 
>  Makefile.am                           |  40 +--
>  configure.ac                          |  59 +++-
>  docs/COMPILE.md                       |   6 +-
>  docs/TODO.md                          |  24 --
>  docs/TOOLS.md                         |  16 +-
>  docs/UPDATE.md                        |  35 ++-
>  docs/USAGE.md                         |  12 +-
>  env/env_api.c                         | 217 +++++++++++++++
>  tools/bg_utils.c => env/env_api_fat.c | 349 ++++++++++++++++--------
>  env/fatvars.c                         |  54 ++--
>  env/uservars.c                        | 266 ++++++++++++++++++
>  include/ebgdefs.h                     |  20 --
>  include/ebgenv.h                      |  93 +++++++
>  {tools => include}/ebgpart.h          |   0
>  tools/bg_utils.h => include/env_api.h |  44 ++-
>  include/envdata.h                     |  16 +-
>  {tools => include}/test-interface.h   |   2 +-
>  include/uservars.h                    |  37 +++
>  swupdate-adapter/ebgenv.c             | 458 -------------------------------
>  swupdate-adapter/ebgenv.h             |  90 -------
>  swupdate-adapter/swupdate.md          | 216 +--------------
>  tools/bg_setenv.c                     | 494 
> ++++++++++++++++++++++------------
>  tools/tests/Makefile                  |  43 +--
>  tools/tests/test_api.c                | 222 +++++++++++----
>  tools/tests/test_environment.c        |   7 +-
>  tools/tests/test_partitions.c         |  42 +--
>  26 files changed, 1566 insertions(+), 1296 deletions(-)
>  create mode 100644 env/env_api.c
>  rename tools/bg_utils.c => env/env_api_fat.c (57%)
>  create mode 100644 env/uservars.c
>  delete mode 100644 include/ebgdefs.h
>  create mode 100644 include/ebgenv.h
>  rename {tools => include}/ebgpart.h (100%)
>  rename tools/bg_utils.h => include/env_api.h (58%)
>  rename {tools => include}/test-interface.h (96%)
>  create mode 100644 include/uservars.h
>  delete mode 100644 swupdate-adapter/ebgenv.c
>  delete mode 100644 swupdate-adapter/ebgenv.h
> 
> -- 
> 2.14.1
> 

-- 
Andreas Reichel
Dipl.-Phys. (Univ.)
Software Consultant

[email protected], +49-174-3180074
TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterfoehring
Geschaeftsfuehrer: Henrik Klagges, Dr. Robert Dahlke, Gerhard Mueller
Sitz: Unterfoehring * Amtsgericht Muenchen * HRB 135082

-- 
You received this message because you are subscribed to the Google Groups "EFI 
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/efibootguard-dev/20170901153857.GA11275%40iiotirae.
For more options, visit https://groups.google.com/d/optout.

Reply via email to