From: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v4 33/36] libselinux: rework host installation
Date: Wed, 5 Jul 2017 13:14:50 +0200 [thread overview]
Message-ID: <20170705111453.2284-34-arnout@mind.be> (raw)
In-Reply-To: <20170705111453.2284-1-arnout@mind.be>
libselinux has a pretty peculiar interpretation of DESTDIR and PREFIX.
PREFIX is not consistently used: some installation paths are forced to
$(DESTDIR)/usr/... . In other cases, PREFIX is indeed used. PREFIX
defaults to $(DESTDIR)/usr.
Try to be a little bit more correct by passing both DESTDIR and PREFIX,
both set to $(HOST_DIR). This is not a complete fix: man pages are
still installed in $(HOST_DIR)/usr - but we don't care about that.
Also simplify the symlink creation, like how it's done in libsepol.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
package/libselinux/libselinux.mk | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/package/libselinux/libselinux.mk b/package/libselinux/libselinux.mk
index 1698947184..f23eea4962 100644
--- a/package/libselinux/libselinux.mk
+++ b/package/libselinux/libselinux.mk
@@ -85,32 +85,31 @@ HOST_LIBSELINUX_PYINC = -I$(HOST_DIR)/include/python$(PYTHON_VERSION_MAJOR)/
HOST_LIBSELINUX_PYLIBVER = python$(PYTHON_VERSION_MAJOR)
endif
+# DESTDIR is needed during the compile to compute library and header paths.
HOST_LIBSELINUX_MAKE_OPTS = \
$(HOST_CONFIGURE_OPTS) \
+ DESTDIR=$(HOST_DIR) \
+ PREFIX=$(HOST_DIR) \
LDFLAGS="$(HOST_LDFLAGS) -lpcre -lpthread" \
PYINC="$(HOST_LIBSELINUX_PYINC)" \
PYSITEDIR="$(HOST_DIR)/lib/$(HOST_LIBSELINUX_PYLIBVER)/site-packages" \
SWIG_LIB="$(HOST_DIR)/share/swig/$(SWIG_VERSION)/"
define HOST_LIBSELINUX_BUILD_CMDS
- # DESTDIR is needed during the compile to compute library and
- # header paths.
$(HOST_MAKE_ENV) $(MAKE1) -C $(@D) \
- $(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) \
- SHLIBDIR=$(HOST_DIR)/lib all
+ $(HOST_LIBSELINUX_MAKE_OPTS) all
# Generate python interface wrapper
$(HOST_MAKE_ENV) $(MAKE1) -C $(@D) \
- $(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) swigify pywrap
+ $(HOST_LIBSELINUX_MAKE_OPTS) swigify pywrap
endef
define HOST_LIBSELINUX_INSTALL_CMDS
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) \
- $(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) \
- SHLIBDIR=$(HOST_DIR)/lib SBINDIR=$(HOST_DIR)/sbin install
- (cd $(HOST_DIR)/lib; $(HOSTLN) -sf libselinux.so.1 libselinux.so)
+ $(HOST_LIBSELINUX_MAKE_OPTS) install
+ ln -sf libselinux.so.1 $(HOST_DIR)/lib/libselinux.so
# Install python interface wrapper
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) \
- $(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) install-pywrap
+ $(HOST_LIBSELINUX_MAKE_OPTS) install-pywrap
endef
$(eval $(generic-package))
--
2.13.2
next prev parent reply other threads:[~2017-07-05 11:14 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-05 11:14 [Buildroot] [PATCH v4 00/36] Remove /usr component from HOST_DIR (continued) Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 01/36] generic packages: use $(HOST_DIR) instead of $(HOST_DIR)/usr as prefix Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 02/36] Globally replace $(HOST_DIR)/usr/bin with $(HOST_DIR)/bin Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 03/36] Globally replace $(HOST_DIR)/usr/sbin with $(HOST_DIR)/sbin Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 04/36] Globally replace $(HOST_DIR)/usr/lib with $(HOST_DIR)/lib Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 05/36] Globally replace $(HOST_DIR)/usr/include with $(HOST_DIR)/include Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 06/36] Globally replace $(HOST_DIR)/usr/share with $(HOST_DIR)/share Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 07/36] Globally replace $(HOST_DIR)/usr with $(HOST_DIR) Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 08/36] qt: fix up alignment after mechanical replacement Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 09/36] boards: replace $HOST_DIR/usr/ with $HOST_DIR/ in scripts Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 10/36] chromebook snow: remove $(HOST_DIR)/usr reference from README Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 11/36] warpboard: " Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 12/36] stm32f429-disco: replace $HOST_DIR/usr with $HOST_DIR in flash script Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 13/36] stm32f469-disco: " Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 14/36] eclipse-register-toolchain: toolchain is no longer installed in $(HOST_DIR)/usr Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 15/36] manual: remove references to host/usr paths Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 16/36] grub2: remove host/usr reference from help text Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 17/36] lttng-tools: " Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 18/36] mfgtools: remove host/usr reference from readme.txt Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 19/36] lesstif: remove host/usr reference from .mk comment Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 20/36] board/gdb/bfin-bf512: remove host/usr reference from readme.txt Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 21/36] board/csky: " Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 22/36] libffi: avoid $(HOST_DIR)/usr while moving headers Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 23/36] genromfs: use $(HOST_DIR) instead of $(HOST_DIR)/usr as prefix Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 24/36] libcap: use $(HOST_DIR) as prefix instead of DESTDIR Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 25/36] lzip: " Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 26/36] opkg-utils: use $(HOST_DIR) as PREFIX " Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 27/36] raspberrypi-usbboot: remove /usr from DESTDIR-based install commands Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 28/36] dos2unix: use prefix instead of DESTDIR for host installation Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 29/36] imx-uxb-loader: " Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 30/36] grub2: install in $(HOST_DIR) instead of $(HOST_DIR)/usr Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 31/36] sepolgen: strip /usr/ part from HOST_DIR Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 32/36] libsemanage: rework host installation Arnout Vandecappelle
2017-07-05 11:14 ` Arnout Vandecappelle [this message]
2017-07-05 11:14 ` [Buildroot] [PATCH v4 34/36] checkpolicy: " Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 35/36] policycoreutils: " Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 36/36] execline: remove --shebangdir configure option Arnout Vandecappelle
2017-07-05 14:31 ` [Buildroot] [PATCH v4 00/36] Remove /usr component from HOST_DIR (continued) Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170705111453.2284-34-arnout@mind.be \
--to=arnout@mind.be \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox