package/libselinux: add dependency on host-coreutils for ln --relative

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Adam Duskett <aduskett@gmail.com>
Cc: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
Cc: Matt Weber <matthew.weber@rockwellcollins.com>
Cc: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Yann E. MORIN 2019-12-18 21:39:06 +01:00 committed by Thomas Petazzoni
parent b0d94ad5ad
commit 2768a0eb41
3 changed files with 1 additions and 54 deletions

View file

@ -1,26 +0,0 @@
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" <yann.morin.1998@free.fr>
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Update for 2.8 (with assumption that SHLIBDIR=LIBDIR)]
diff -durNw libselinux-2.7.orig/src/Makefile libselinux-2.7/src/Makefile
--- libselinux-2.7.orig/src/Makefile 2018-01-15 20:53:50.168525700 +0100
+++ libselinux-2.7/src/Makefile 2018-01-15 20:55:27.061858005 +0100
@@ -181,7 +181,7 @@
install -m 755 $(LIBSO) $(DESTDIR)$(SHLIBDIR)
test -d $(DESTDIR)$(LIBDIR)/pkgconfig || install -m 755 -d $(DESTDIR)$(LIBDIR)/pkgconfig
install -m 644 $(LIBPC) $(DESTDIR)$(LIBDIR)/pkgconfig
- ln -sf --relative $(DESTDIR)$(SHLIBDIR)/$(LIBSO) $(DESTDIR)$(LIBDIR)/$(TARGET)
+ cd $(DESTDIR)$(LIBDIR) && ln -sf $(LIBSO) $(TARGET)
install-pywrap: pywrap
test -d $(DESTDIR)$(PYTHONLIBDIR)/selinux || install -m 755 -d $(DESTDIR)$(PYTHONLIBDIR)/selinux

View file

@ -1,27 +0,0 @@
From af2284b8510161e8742787a632ebb2aaef8fc045 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: Fri, 25 Oct 2019 13:36:29 +0200
Subject: [PATCH] Remove ln --relative usage in install-pywrap
[Upstream: https://github.com/SELinuxProject/selinux/pull/184]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
src/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Makefile b/src/Makefile
index 2b1696a0..799df2b0 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -175,7 +175,7 @@ install: all
install-pywrap: pywrap
$(PYTHON) setup.py install --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
install -m 644 $(SWIGPYOUT) $(DESTDIR)$(PYTHONLIBDIR)/selinux/__init__.py
- ln -sf --relative $(DESTDIR)$(PYTHONLIBDIR)/selinux/_selinux$(PYCEXT) $(DESTDIR)$(PYTHONLIBDIR)/_selinux$(PYCEXT)
+ cd $(DESTDIR)$(PYTHONLIBDIR) && ln -sf selinux/_selinux$(PYCEXT) _selinux$(PYCEXT)
install-rubywrap: rubywrap
test -d $(DESTDIR)$(RUBYINSTALL) || install -m 755 -d $(DESTDIR)$(RUBYINSTALL)
--
2.21.0

View file

@ -9,7 +9,7 @@ LIBSELINUX_SITE = https://github.com/SELinuxProject/selinux/releases/download/20
LIBSELINUX_LICENSE = Public Domain
LIBSELINUX_LICENSE_FILES = LICENSE
LIBSELINUX_DEPENDENCIES = libsepol pcre
LIBSELINUX_DEPENDENCIES = $(BR2_COREUTILS_HOST_DEPENDENCY) libsepol pcre
LIBSELINUX_INSTALL_STAGING = YES