vendor latest c/common

Includes the default db backend changes.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2023-10-10 14:24:24 +02:00
parent 040a4e4b1e
commit 8a52e638e6
31 changed files with 953 additions and 192 deletions

View File

@@ -212,6 +212,11 @@ func parseAAParserVersion(output string) (int, error) {
words := strings.Split(lines[0], " ")
version := words[len(words)-1]
// trim "-beta1" suffix from version="3.0.0-beta1" if exists
version = strings.SplitN(version, "-", 2)[0]
// also trim "~..." suffix used historically (https://gitlab.com/apparmor/apparmor/-/commit/bca67d3d27d219d11ce8c9cc70612bd637f88c10)
version = strings.SplitN(version, "~", 2)[0]
// split by major minor version
v := strings.Split(version, ".")
if len(v) == 0 || len(v) > 3 {