package/libsepol|libselinux: fix build on ancient distros
PATCH 1/1 package/libsepol|libselinux: fix build on ancient distros
Ancient distros (especially enterprise-grade still in use) do not accept ln --relative.
Revert the upstream commit, since the problem it was trying to fix is not applicable in the cntext of Buildroot (even with a merged /usr).
Signed-off-by "Yann E. MORIN" <[email protected]>
Cc Adam Duskett <[email protected]>
Cc Thomas Petazzoni <[email protected]>
--- package/libselinux/0003-revert-ln-relative.patch | 24 ++++++++++++++++++++++++ package/libsepol/0004-revert-ln-relative.patch | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 package/libselinux/0003-revert-ln-relative.patch create mode 100644 package/libsepol/0004-revert-ln-relative.patch
package/libselinux/0003-revert-ln-relative.patch new file +24 -0
@@ -0,0 +1,24 @@ +Makefile: revert libselinux: use ln --relative to create .so symlinks + +This reverts 71393a181d63c9baae5fe8dcaeb9411d1f253998 + +ln --relative is too recent to be available in all distributions, +especially enterprise-grade distros that can stick around as long as +they are maintained (up to 10 years in some cases?). + +For the sake of Buildroot, revert the upstream patch. + +Signed-off-by: "Yann E. MORIN" <[email protected]> + +diff -durN a/src/Makefile b/src/Makefile +--- a/src/Makefile ++++ b/src/Makefile +@@ -151,7 +151,7 @@ + install -m 755 $(LIBSO) $(SHLIBDIR) + test -d $(LIBDIR)/pkgconfig || install -m 755 -d $(LIBDIR)/pkgconfig + install -m 644 $(LIBPC) $(LIBDIR)/pkgconfig +- ln -sf --relative $(SHLIBDIR)/$(LIBSO) $(LIBDIR)/$(TARGET) ++ cd $(LIBDIR) && ln -sf ../../`basename $(SHLIBDIR)`/$(LIBSO) $(TARGET) + + install-pywrap: pywrap + test -d $(PYLIBDIR)/site-packages/selinux || install -m 755 -d $(PYLIBDIR)/site-packages/selinux
package/libsepol/0004-revert-ln-relative.patch new file +24 -0
@@ -0,0 +1,24 @@ +Makefile: revert libsepol: use ln --relative to create .so symlinks + +This reverts 71393a181d63c9baae5fe8dcaeb9411d1f253998 + +ln --relative is too recent to be available in all distributions, +especially enterprise-grade distros that can stick around as long as +they are maintained (up to 10 years in some cases?). + +For the sake of Buildroot, revert the upstream patch. + +Signed-off-by: "Yann E. MORIN" <[email protected]> + +diff -durN a/src/Makefile b/src/Makefile +--- a/src/Makefile ++++ b/src/Makefile +@@ -77,7 +77,7 @@ + ifeq ($(STATIC),) + test -d $(SHLIBDIR) || install -m 755 -d $(SHLIBDIR) + install -m 755 $(LIBSO) $(SHLIBDIR) +- ln -sf --relative $(SHLIBDIR)/$(LIBSO) $(LIBDIR)/$(TARGET) ++ cd $(LIBDIR) && ln -sf ../../`basename $(SHLIBDIR)`/$(LIBSO) $(TARGET) + endif + + relabel:
Signature · 1 line
2.7.4
Thomas Petazzoni
AppliedPATCH 1/1 package/libsepol|libselinux: fix build on ancient distros
Hello,
Quoted 9 lines · Yann E. MORIN
Ancient distros (especially enterprise-grade still in use) do not accept ln --relative.
Revert the upstream commit, since the problem it was trying to fix is not applicable in the cntext of Buildroot (even with a merged /usr).
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Adam Duskett <[email protected]>Cc Thomas Petazzoni <[email protected]>
Quoted 6 lines
--- package/libselinux/0003-revert-ln-relative.patch | 24 ++++++++++++++++++++++++ package/libsepol/0004-revert-ln-relative.patch | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 package/libselinux/0003-revert-ln-relative.patch create mode 100644 package/libsepol/0004-revert-ln-relative.patch
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com