Skip to content

Commit

Permalink
Merge pull request #1795 from kwilczynski/crio-v1.25-common-v0.52
Browse files Browse the repository at this point in the history
[release-0.52] [crio-1.25] Cherry-pick changes from containers/common/pull#1689
  • Loading branch information
openshift-merge-bot[bot] authored Jan 9, 2024
2 parents 0ba6d80 + 142ede1 commit 09a9a88
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/apparmor/apparmor_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 09a9a88

Please sign in to comment.