Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: mjeanson@efficios.com (Michael Jeanson)
Subject: [lttng-dev] [PATCH lttng-modules stable-2.x 1/2] Fix: Allow alphanumeric characters in SLE version
Date: Thu,  9 Aug 2018 11:56:55 -0400	[thread overview]
Message-ID: <20180809155656.7287-1-mjeanson@efficios.com> (raw)

Allow alphanumeric characters in the long version string before
extracting specific version numbers. This prevents failure in detecting
a SuSE kernel when the version string was customized by the end user.

Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
---
 abi-sle-version.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/abi-sle-version.sh b/abi-sle-version.sh
index 0bd65b1..59e7d67 100755
--- a/abi-sle-version.sh
+++ b/abi-sle-version.sh
@@ -22,7 +22,7 @@ if [ ! -f "${KPATH}/include/generated/utsrelease.h" ]; then
 	exit 0
 fi
 
-SLE_RELEASE="$(sed -rn 's/^#define UTS_RELEASE "(.*)-([0-9\.]+)-(.*)"/\2/p' "${KPATH}/include/generated/utsrelease.h")"
+SLE_RELEASE="$(sed -rn 's/^#define UTS_RELEASE "(.*)-([0-9a-zA-Z\.]+)-(.*)"/\2/p' "${KPATH}/include/generated/utsrelease.h")"
 
 SLE_RELEASE_MAJOR="$(echo "${SLE_RELEASE}" | sed -rn 's/^([0-9]+)(.*)$/\1/p')"
 SLE_RELEASE_MINOR="$(echo "${SLE_RELEASE}" | sed -rn 's/^([0-9]+)\.([0-9]+)(.*)$/\2/p')"
-- 
2.17.1



             reply	other threads:[~2018-08-09 15:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-09 15:56 Michael Jeanson [this message]
2018-08-09 15:56 ` [lttng-dev] [PATCH lttng-modules stable-2.x 2/2] Fix: adjust SLE version ranges to build with SP2 and SP3 Michael Jeanson
2018-08-09 19:11 ` [lttng-dev] [PATCH lttng-modules stable-2.x 1/2] Fix: Allow alphanumeric characters in SLE version Mathieu Desnoyers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180809155656.7287-1-mjeanson@efficios.com \
    --to=mjeanson@efficios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox