summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Andrea Righi [Fri, 3 Feb 2023 10:55:55 +0000 (11:55 +0100)]
annotations: fix _remove_entry() logic
Drop unnecessary delete statements and fix the code to properly remove
the entry in _remove_entry().
Reported-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Tue, 31 Jan 2023 13:47:15 +0000 (14:47 +0100)]
annotations: do not drop undefined configs in derivatives
Prevent dropping configs that are undefined across all the supported
architectures in annotations that have includes, because we may want to
use them to override configs imported from other annotations.
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 30 Jan 2023 08:11:54 +0000 (09:11 +0100)]
annotations: make sure to always drop undefined configs
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Wed, 18 Jan 2023 15:49:02 +0000 (16:49 +0100)]
annotations: add CONFIG_GCC_VERSION to the list of skipped configs
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Tue, 3 Jan 2023 09:10:57 +0000 (10:10 +0100)]
annotations: remove configs that are undefined across all arches/flavours
Sometimes certain config options are removed in new kernels, so when
annotations is updated these options result to be undefined across all
architectures and flavours, in this case it's much more clean to simply
drop them from annotations (considering that the kernel doesn't support
them anymore).
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Thu, 15 Dec 2022 08:46:20 +0000 (09:46 +0100)]
annotations: compact same value across all flavour within the same arch
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Tue, 13 Dec 2022 15:45:51 +0000 (16:45 +0100)]
annotations: do not add constraints on toolchain
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 12 Dec 2022 16:06:02 +0000 (17:06 +0100)]
annotations: do not enforce toolchain versions
Allow to use different versions of gcc, as and ld in the build ppa,
respect to the version used to produce the kernel packages.
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Masahiro Yamada [Tue, 6 Dec 2022 00:43:50 +0000 (09:43 +0900)]
annotations: add missing CONFIG_ prefix in main()
This is common for do_query(), do_note(), do_write() (and whatever
command might be added in the future).
Move it to main().
Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 5 Dec 2022 17:06:38 +0000 (18:06 +0100)]
annotations: introduce --source
Add an option to jump to the definition of a specific config option in
the kernel source code (this requires a prior `make tags` to work).
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 5 Dec 2022 16:48:39 +0000 (17:48 +0100)]
annotations: add an option to enable config autocompletion in bash
Type `source <(annotations --autocomplete)` to enable auto-completion of
config options (without the CONFIG_ prefix) in bash when running
annotations script commands.
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 5 Dec 2022 15:38:13 +0000 (16:38 +0100)]
annotations: allow to specify --write and --note at the same time
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 5 Dec 2022 15:07:38 +0000 (16:07 +0100)]
annotations: prevent python broken pipe errors
Prevent broken pipe errors when showing output in pipe to other tools
(less for example).
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 5 Dec 2022 11:45:53 +0000 (12:45 +0100)]
annotations: prevent generating .pyc files on import
We may end up adding these files to our git repos by mistake, so simply
prevent generating them in advance.
There's a tiny performance penalty with this change, because python
needs to re-generate the bytecode on-the-fly every time the annotations
script is called, but this overhead is absolutely negligible compared
the rest of the kernel build time.
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 5 Dec 2022 08:06:53 +0000 (09:06 +0100)]
annotations: catch syntax errors in annotations
Trigger a syntax error when a policy or note rule is not properly
closed.
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 5 Dec 2022 07:35:16 +0000 (08:35 +0100)]
annotations: properly support multiple levels of inclusion
Moreover, do some refactoring to optimize parsing.
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 5 Dec 2022 06:53:20 +0000 (07:53 +0100)]
annotations: clarify error message with --import
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 5 Dec 2022 06:44:25 +0000 (07:44 +0100)]
annotations: accept config options with or without CONFIG_ prefix
Allow to specify config options with or without CONFIG_ prefix in the
commands --write and --note, to be consistent with --query that already
accepts both formats.
Reported-by: Masahiro Yamada <masahiro.yamada@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 5 Dec 2022 06:28:49 +0000 (07:28 +0100)]
annotations: properly merge configs with includes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Sat, 3 Dec 2022 12:06:03 +0000 (13:06 +0100)]
annotations: support flavour dependencies (flavour inheritance)
Allow to define flavour inheritance relationship in the annotations
file, such as:
# FLAVOUR_DEP: {'amd64-lowlatency': 'amd64-generic', 'arm64-lowlatency': 'arm64-generic', 'arm64-lowlatency-64k': 'arm64-lowlatency-64k'}
In this case, for example, -lowlatency flavours inherits the config
values from -generic (both for amd64 and arm64) and -lowlatency-64
inherits the value from -generic-64k (only on arm64).
This allows to strongly reduce the size of annotations and helps to
read and review changes in annotations.
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Thu, 1 Dec 2022 10:05:52 +0000 (11:05 +0100)]
annotations: allow to query CONFIG_<option> or just <option>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Thu, 1 Dec 2022 09:51:11 +0000 (10:51 +0100)]
annotations: allow to set notes directly and assume --query is the default command
Allow to set a note directly to a config option without changing any
value and also assume --query is the default command, so we don't have
to specify --query explicitly to query config options.
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Tue, 29 Nov 2022 08:13:44 +0000 (09:13 +0100)]
annotations: set and delete configs from command line
Allow to set and delete config options from command line using the
'annotations' script (instead of manually editing the annotations file).
This also provides an interface to manage the annotations file from
other scripts.
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 28 Nov 2022 10:37:38 +0000 (11:37 +0100)]
annotations: report config failures in alphabetical order
This allows to review config check failures across multiple
architectures.
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Fri, 18 Nov 2022 10:22:29 +0000 (11:22 +0100)]
annotations: provide --update command
Add a command to import a partial .config (instead of resycning a full
.config as --import does).
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Wed, 16 Nov 2022 08:57:04 +0000 (09:57 +0100)]
annotations: compact more redundant arch and flavours settings
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Tue, 15 Nov 2022 16:02:35 +0000 (17:02 +0100)]
doc: simplify commands in examples
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Tue, 15 Nov 2022 11:02:56 +0000 (12:02 +0100)]
annotations: avoid generating a KeyError exception
Always try to return None when a config is not defined in annotations
rather then throwing an exception.
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Tue, 15 Nov 2022 09:47:08 +0000 (10:47 +0100)]
annotations: allow to import/resync single config option
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Tue, 15 Nov 2022 07:58:43 +0000 (08:58 +0100)]
doc: update TODO list
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Tue, 15 Nov 2022 07:58:30 +0000 (08:58 +0100)]
annotations: properly handle dropped configs during import
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 14 Nov 2022 22:09:07 +0000 (23:09 +0100)]
annotations: check: catch options that are removed from the .config
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 14 Nov 2022 20:51:52 +0000 (21:51 +0100)]
annotations: make action argument mandatory
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 14 Nov 2022 20:49:36 +0000 (21:49 +0100)]
annotations: avoid converting null results to kconfig format
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 14 Nov 2022 19:01:43 +0000 (20:01 +0100)]
annotations: try to compact annotations before saving it
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 14 Nov 2022 18:00:54 +0000 (19:00 +0100)]
annotations: automatically detect annotations file location
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 14 Nov 2022 10:25:27 +0000 (11:25 +0100)]
doc: add a basic README.md
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 14 Nov 2022 10:25:20 +0000 (11:25 +0100)]
add a .gitignore
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andrea Righi [Mon, 14 Nov 2022 10:25:14 +0000 (11:25 +0100)]
initial version
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>