Use POSIX Extended Regular Expression (ERE) instead of the GNU extension
\| in the install-exec-hook. This makes it create the symlink properly
with busybox sed built with musl libc. It will silently create a broken
symlink otherwise.
---
 Makefile.am | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 6679deb..4978b26 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -107,7 +107,8 @@ install-exec-hook:
        if test "$(libdir)" != "$(rootlibdir)"; then \
                $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
                so_img_name=$$(readlink $(DESTDIR)$(libdir)/libkmod.so) && \
-               so_img_rel_target_prefix=$$(echo $(libdir) | sed 
's,\(^/\|\)[^/][^/]*,..,g') && \
+               so_img_rel_target_prefix=$$(echo $(libdir) | sed -E 
's,(^/|)[^/][^/]*,..,g') && \
+
                ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name 
$(DESTDIR)$(libdir)/libkmod.so && \
                mv $(DESTDIR)$(libdir)/libkmod.so.* $(DESTDIR)$(rootlibdir); \
        fi
-- 
2.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in

Reply via email to