Hi Jan,
> >> Adapt the build system to build a shared library
> >> libebgenv-${EBG_VERSION}.so symlinked to by a
> >> libebgenv.so in addition to the static libebgenv.a.
> >>
> >> This shared library may be used by external software
> >> such as SWUpdate [1] wanting to modify EFI Boot Guard's
> >> environment without having to statically link against
> >> libebgenv.a, following the pattern of libubootenv [2].
> >>
> >> Note that the bg_setenv utility deliberately remains
> >> statically linked against libebgenv.a. for easy
> >> inclusion in initramfs or rescue media and to not
> >> break existing deployments. Alike, libebgenv.a is
> >> still installed via make install (though distributions
> >> may decide to not package it).
> >> This may be deprecated and removed in future versions.
> >>
> >> [1] https://github.com/sbabic/swupdate
> >> [2] https://github.com/sbabic/libubootenv
> >>
> >> Signed-off-by: Christian Storm <[email protected]>
> >> ---
> >> .gitignore | 5 +++++
> >> Makefile.am | 9 +++++++++
> >> configure.ac | 3 +++
> >> 3 files changed, 17 insertions(+)
> >>
> >> diff --git a/.gitignore b/.gitignore
> >> index 6433560..c8cb496 100644
> >> --- a/.gitignore
> >> +++ b/.gitignore
> >> @@ -23,6 +23,7 @@
> >> *.so
> >> *.so.*
> >> *.dylib
> >> +*.lai
> >>
> >> # EFI
> >> *.efi
> >> @@ -70,6 +71,7 @@ Makefile.in
> >> /config.status
> >> /config.sub
> >> /configure
> >> +/configure~
> >> /configure.scan
> >> /depcomp
> >> /install-sh
> >> @@ -78,4 +80,7 @@ Makefile.in
> >> /Makefile
> >> /tools/tests/Makefile
> >> .deps/
> >> +m4/libtool.m4
> >> +m4/lt*
> >> version.h
> >> +libtool
> >> diff --git a/Makefile.am b/Makefile.am
> >> index ee142d1..9a171fc 100644
> >> --- a/Makefile.am
> >> +++ b/Makefile.am
> >> @@ -90,6 +90,14 @@ libebgenv_a_CFLAGS = \
> >> pkginclude_HEADERS = \
> >> include/ebgenv.h
> >>
> >> +#
> >> +# Shared libraries
> >> +#
> >> +LIBEBGENV_SO_VERSION = $(shell $(EGREP) -o '[0-9]+\.[0-9]+' VERSION)
> >> +lib_LTLIBRARIES = libebgenv.la
> >> +libebgenv_la_SOURCES = $(libebgenv_a_SOURCES)
> >> +libebgenv_la_LDFLAGS = -release $(LIBEBGENV_SO_VERSION).0
> >> +
> >> #
> >> # bg_setenv binary
> >> #
> >> @@ -111,6 +119,7 @@ bg_setenv_DEPENDENCIES = \
> >> install-exec-hook:
> >> $(LN_S) -f bg_setenv$(EXEEXT) \
> >> $(DESTDIR)$(bindir)/bg_printenv$(EXEEXT)
> >> + $(RM) $(DESTDIR)$(libdir)/$(lib_LTLIBRARIES)
> >>
> >> #
> >> # EFI compilation
> >> diff --git a/configure.ac b/configure.ac
> >> index fd75cb8..b332c6a 100644
> >> --- a/configure.ac
> >> +++ b/configure.ac
> >> @@ -22,6 +22,8 @@ AC_INIT([efibootguard],
> >> [efibootguard],
> >> [])
> >>
> >> +LT_INIT
> >> +
> >> AC_CONFIG_SRCDIR([bootguard.c])
> >> AC_CONFIG_MACRO_DIR([m4])
> >> AC_CONFIG_HEADERS([config.h])
> >> @@ -49,6 +51,7 @@ AC_PROG_GCC_TRADITIONAL
> >> AC_PROG_MKDIR_P
> >> AC_PROG_RANLIB
> >> AC_PROG_LN_S
> >> +AC_PROG_EGREP
> >>
> >> AC_ARG_WITH([gnuefi-sys-dir],
> >> AS_HELP_STRING([--with-gnuefi-sys-dir=DIRECTORY],
> >>
> >
> > libtoolize: 'AC_PROG_RANLIB' is rendered obsolete by 'LT_INIT'
> >
> > I suspect there is room for cleanup.
> > Furthermore:
> >
> > configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
> > configure: error: cannot find install-sh, install.sh, or shtool in "."
> > "./.." "./../.."
> >
> > i.e. configure is now broken.
I did a clean
git clone https://github.com/siemens/efibootguard.git
cd ./efibootguard
git switch next
<apply patch>
autoreconf -fi && ./configure --prefix=$PWD/dist && make
as documented in [1] and it works, so: No, it's not untested!
[1] https://github.com/siemens/efibootguard/blob/master/docs/COMPILE.md
> diff --git a/Makefile.am b/Makefile.am
> index 9a171fc..f000d73 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -93,7 +93,7 @@ pkginclude_HEADERS = \
> #
> # Shared libraries
> #
> -LIBEBGENV_SO_VERSION = $(shell $(EGREP) -o '[0-9]+\.[0-9]+' VERSION)
> +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
> diff --git a/configure.ac b/configure.ac
> index b332c6a..6dcd386 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -22,14 +22,14 @@ AC_INIT([efibootguard],
> [efibootguard],
> [])
>
> -LT_INIT
> -
> AC_CONFIG_SRCDIR([bootguard.c])
> AC_CONFIG_MACRO_DIR([m4])
> AC_CONFIG_HEADERS([config.h])
> AC_CONFIG_AUX_DIR([build-aux])
> AC_PREFIX_DEFAULT([/usr])
>
> +LT_INIT
> +
LT_INIT needs to be after AC_INIT, which it is, and it works, see above.
If this works for you while the original patch doesn't, I put it here,
works for me as well.
> AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax
> no-dist-gzip dist-xz subdir-objects])
> AM_SILENT_RULES([yes])
>
> @@ -49,7 +49,6 @@ AM_PROG_CC_C_O
> AC_PROG_GCC_TRADITIONAL
>
> AC_PROG_MKDIR_P
> -AC_PROG_RANLIB
> AC_PROG_LN_S
> AC_PROG_EGREP
>
>
> How were you able to use your patch?
See above.
> Or was this untested?
No, see above.
Kind regards,
Christian
--
Dr. Christian Storm
Siemens AG, Technology, T RDA IOT SES-DE
Otto-Hahn-Ring 6, 81739 München, Germany
--
You received this message because you are subscribed to the Google Groups "EFI
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/efibootguard-dev/20210826081554.kexbi5i4ht3ocpq4%40MD1ZFJVC.ad001.siemens.net.