[PATCH 0/3] Change library versioning scheme

7 views
Skip to first unread message

Jan Kiszka

unread,
Apr 20, 2022, 8:37:41 AM4/20/22
to efibootg...@googlegroups.com, Christian Storm
Recent discussion on swupdate surfaced the issue that embedded the
release number into libebgenv is handy only from our perspective, not
for its consumers. So this performs the switch to the libtool versioning
scheme and a commitment to according interface maintenance.

Jan

Jan Kiszka (3):
Change versioning scheme of libebgenv.so
make_release: Add a reminder for library version updates
make_release: Update sub-shell invocations

Makefile.am | 3 +--
scripts/make_release | 16 ++++++++++++----
2 files changed, 13 insertions(+), 6 deletions(-)

--
2.34.1

Jan Kiszka

unread,
Apr 20, 2022, 8:37:42 AM4/20/22
to efibootg...@googlegroups.com, Christian Storm
From: Jan Kiszka <jan.k...@siemens.com>

Adopt the one that libtool is promoting [1], which first of all means a
switch from libebgenv-0.10.0.so to libebgenv.so.0.0.0. The goal is to
enable smoother tracking of our library release by downstream because
library interfaces are not expected to change frequently, specifically
not incompatibly.

[1] https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
Makefile.am | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 0506ea1..b593517 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -106,10 +106,9 @@ pkginclude_HEADERS = \
#
# Shared libraries
#
-LIBEBGENV_SO_VERSION = $(shell $(EGREP) -o '[0-9]+\.[0-9]+' $(top_srcdir)/VERSION)
lib_LTLIBRARIES = libebgenv.la
libebgenv_la_SOURCES = $(libebgenv_a_SOURCES)
-libebgenv_la_LDFLAGS = -release $(LIBEBGENV_SO_VERSION).0
+libebgenv_la_LDFLAGS = -version-info 0:0:0

#
# bg_setenv binary
--
2.34.1

Jan Kiszka

unread,
Apr 20, 2022, 8:37:42 AM4/20/22
to efibootg...@googlegroups.com, Christian Storm
From: Jan Kiszka <jan.k...@siemens.com>

Help the maintainer to not forget this step if needed.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
scripts/make_release | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/scripts/make_release b/scripts/make_release
index fc14e2f..1f10576 100755
--- a/scripts/make_release
+++ b/scripts/make_release
@@ -2,7 +2,7 @@
#
# EFI Boot Guard
#
-# Copyright (c) Siemens AG, 2014-2017
+# Copyright (c) Siemens AG, 2014-2022
#
# Authors:
# Jan Kiszka <jan.k...@siemens.com>
@@ -34,6 +34,14 @@ if [ -n "`git status -s -uno`" ]; then
exit 1
fi

+match=$(grep -e "-version-info" $(git rev-parse --show-toplevel)/Makefile.am)
+echo -e "Library version: ${match/*-version-info /}"
+echo -ne "Still accurate? (y/N) "
+read answer
+if [ "$answer" != "y" ]; then
+ exit 1
+fi
+
echo -e "Tag commit\n\n `git log -1 --oneline`"
echo -e "\nof branch\n\n `git branch | sed -n 's/^\* //p'`"
echo -ne "\nas $name? (y/N) "
--
2.34.1

Jan Kiszka

unread,
Apr 20, 2022, 8:37:43 AM4/20/22
to efibootg...@googlegroups.com, Christian Storm
From: Jan Kiszka <jan.k...@siemens.com>

Use $(command) consistently in the file.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
scripts/make_release | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/make_release b/scripts/make_release
index 1f10576..38a772f 100755
--- a/scripts/make_release
+++ b/scripts/make_release
@@ -29,7 +29,7 @@ if [ ! -f VERSION ] || [ ! -d .git ]; then
exit 1
fi

-if [ -n "`git status -s -uno`" ]; then
+if [ -n "$(git status -s -uno)" ]; then
echo "Working directory is dirty!"
exit 1
fi
@@ -42,8 +42,8 @@ if [ "$answer" != "y" ]; then
exit 1
fi

-echo -e "Tag commit\n\n `git log -1 --oneline`"
-echo -e "\nof branch\n\n `git branch | sed -n 's/^\* //p'`"
+echo -e "Tag commit\n\n $(git log -1 --oneline)"
+echo -e "\nof branch\n\n $(git branch | sed -n 's/^\* //p')"
echo -ne "\nas $name? (y/N) "
read answer
if [ "$answer" != "y" ]; then
--
2.34.1

Reply all
Reply to author
Forward
0 new messages