* [ptxdist] Iteratively Make & Make Install Subpackages
@ 2019-03-12 10:56 Chin You Wen (WMSC-HW)
2019-03-12 11:45 ` Roland Hieber
2019-03-13 8:09 ` Michael Olbrich
0 siblings, 2 replies; 6+ messages in thread
From: Chin You Wen (WMSC-HW) @ 2019-03-12 10:56 UTC (permalink / raw)
To: ptxdist
[-- Attachment #1.1: Type: text/plain, Size: 945 bytes --]
Hello,
I am compiling the SELINUX userspace tools (
https://github.com/SELinuxProject/selinux) and I encountered this error.
load_policy.c:15:25: fatal error: sepol/sepol.h: No such file or directory
compilation terminated.
The sub-package libselinux depends on libsepol, but by default the PTXDist
rule file does not run makefile sections in sequential order, i.e. it
executes the compile section for all sub-packages first, followed by
install section. This results in the required libsepol dependencies to not
be found when libselinux needs it, and thus the above error.
Is there any way to accomplish this without splitting the sub-packages into
separate rule files? I am thinking of calling something like this:
@$(call compile, libsepol)
@$(call install, libsepol)
@$(call compile, libselinux)
@$(call install, libselinux)
but I am unsure if that is possible, or what the correct syntax is. Kindly
advise. Thanks.
Regards,
You Wen
[-- Attachment #1.2: Type: text/html, Size: 1559 bytes --]
[-- Attachment #2: Type: text/plain, Size: 91 bytes --]
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] Iteratively Make & Make Install Subpackages
2019-03-12 10:56 [ptxdist] Iteratively Make & Make Install Subpackages Chin You Wen (WMSC-HW)
@ 2019-03-12 11:45 ` Roland Hieber
2019-03-13 8:09 ` Michael Olbrich
1 sibling, 0 replies; 6+ messages in thread
From: Roland Hieber @ 2019-03-12 11:45 UTC (permalink / raw)
To: Chin You Wen (WMSC-HW); +Cc: ptxdist
Hi,
ptxdist respects the 'select' statements in Kconfig, so you should be
able to make ptxdist build libsepol before libselinux by adding a
"select LIBSEPOL" to your "config LIBSELINUX" entry in
rules/libselinux.in. You can look at many other packages as an example,
or at this section [1] in the docs. But make sure that the 'select' is
directly in the "config LIBSELINUX" option and not in a sub-option,
otherwise the dependency parser will not find it.
[1]: https://www.ptxdist.org/doc/dev_manual.html#managing-external-compile-time-dependencies
Hope that solves your problem?
- Roland
On Tue, Mar 12, 2019 at 06:56:24PM +0800, Chin You Wen (WMSC-HW) wrote:
> Hello,
>
> I am compiling the SELINUX userspace tools (
> https://github.com/SELinuxProject/selinux) and I encountered this error.
>
> load_policy.c:15:25: fatal error: sepol/sepol.h: No such file or directory
> compilation terminated.
>
> The sub-package libselinux depends on libsepol, but by default the PTXDist
> rule file does not run makefile sections in sequential order, i.e. it
> executes the compile section for all sub-packages first, followed by
> install section. This results in the required libsepol dependencies to not
> be found when libselinux needs it, and thus the above error.
>
> Is there any way to accomplish this without splitting the sub-packages into
> separate rule files? I am thinking of calling something like this:
>
> @$(call compile, libsepol)
> @$(call install, libsepol)
> @$(call compile, libselinux)
> @$(call install, libselinux)
>
> but I am unsure if that is possible, or what the correct syntax is. Kindly
> advise. Thanks.
>
>
> Regards,
> You Wen
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
--
Roland Hieber | r.hieber@pengutronix.de |
Pengutronix e.K. | https://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] Iteratively Make & Make Install Subpackages
2019-03-12 10:56 [ptxdist] Iteratively Make & Make Install Subpackages Chin You Wen (WMSC-HW)
2019-03-12 11:45 ` Roland Hieber
@ 2019-03-13 8:09 ` Michael Olbrich
2019-03-14 9:34 ` Chin You Wen (WMSC-HW)
1 sibling, 1 reply; 6+ messages in thread
From: Michael Olbrich @ 2019-03-13 8:09 UTC (permalink / raw)
To: ptxdist
Hi,
On Tue, Mar 12, 2019 at 06:56:24PM +0800, Chin You Wen (WMSC-HW) wrote:
> I am compiling the SELINUX userspace tools (
> https://github.com/SELinuxProject/selinux) and I encountered this error.
>
> load_policy.c:15:25: fatal error: sepol/sepol.h: No such file or directory
> compilation terminated.
>
> The sub-package libselinux depends on libsepol, but by default the PTXDist
> rule file does not run makefile sections in sequential order, i.e. it
> executes the compile section for all sub-packages first, followed by
> install section. This results in the required libsepol dependencies to not
> be found when libselinux needs it, and thus the above error.
>
> Is there any way to accomplish this without splitting the sub-packages into
> separate rule files? I am thinking of calling something like this:
>
> @$(call compile, libsepol)
> @$(call install, libsepol)
> @$(call compile, libselinux)
> @$(call install, libselinux)
>
> but I am unsure if that is possible, or what the correct syntax is. Kindly
> advise. Thanks.
Du you have any local changes to either package? PTXdist already has the
necessary dependencies and builds as expected last time I checked.
Michael
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] Iteratively Make & Make Install Subpackages
2019-03-13 8:09 ` Michael Olbrich
@ 2019-03-14 9:34 ` Chin You Wen (WMSC-HW)
2019-03-14 12:02 ` Michael Olbrich
0 siblings, 1 reply; 6+ messages in thread
From: Chin You Wen (WMSC-HW) @ 2019-03-14 9:34 UTC (permalink / raw)
To: ptxdist
[-- Attachment #1.1: Type: text/plain, Size: 291 bytes --]
Hi Roland/Michael,
I was able to compile it by separating the libraries (libselinux, libsepol,
libsemanag) into separate rule files and targetinstalled those dependencies
first.
However when using the repo url in a single rule file (as attached), I run
into the problem I described above.
[-- Attachment #1.2: Type: text/html, Size: 363 bytes --]
[-- Attachment #2: selinux.make --]
[-- Type: application/octet-stream, Size: 3818 bytes --]
# -*-makefile-*-
#
# Copyright (C) 2019 by WMSC
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#
#
# We provide this package
#
PACKAGES-$(PTXCONF_SELINUX) += selinux
#
# Paths and names
#
SELINUX_VERSION := 20180524
#SELINUX_MD5 := 9B392BB6457BFC9EE55B1AEA6BA72348
SELINUX_MD5 := c23711e19dd365c8ce16b2bb74379d7f
SELINUX := selinux-$(SELINUX_VERSION)
SELINUX_SUFFIX := tar.gz
SELINUX_URL := https://github.com/SELinuxProject/selinux/archive/$(SELINUX_VERSION).$(SELINUX_SUFFIX)
SELINUX_SOURCE := $(SRCDIR)/$(SELINUX).$(SELINUX_SUFFIX)
SELINUX_DIR := $(BUILDDIR)/$(SELINUX)
SELINUX_LICENSE := unknown
# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------
#$(SELINUX_SOURCE):
# @$(call targetinfo)
# @$(call get, SELINUX)
# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------
#SELINUX_CONF_ENV := $(CROSS_ENV)
#
# autoconf
#
SELINUX_CONF_TOOL := NO
SELINUX_MAKE_ENV := $(CROSS_ENV)
SELINUX_MAKE_OPT := \
"CFLAGS += -Wno-error"
#SELINUX_CONF_OPT := $(CROSS_AUTOCONF_USR)
#$(STATEDIR)/selinux.prepare:
# @$(call targetinfo)
# @$(call clean, $(SELINUX_DIR)/config.cache)
# cd $(SELINUX_DIR) && \
# $(SELINUX_PATH) $(SELINUX_ENV) \
# ./configure $(SELINUX_CONF_OPT)
# @$(call touch)
# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------
$(STATEDIR)/selinux.compile:
@$(call targetinfo)
@$(call world/compile, SELINUX)
@$(call touch)
# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------
$(STATEDIR)/selinux.install:
@$(call targetinfo)
@$(call world/install, SELINUX)
@$(call touch)
# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------
$(STATEDIR)/selinux.targetinstall:
@$(call targetinfo)
@$(call install_init, selinux)
@$(call install_fixup, selinux,PRIORITY,optional)
@$(call install_fixup, selinux,SECTION,base)
@$(call install_fixup, selinux,AUTHOR,"WMSC")
@$(call install_fixup, selinux,DESCRIPTION,missing)
#@$(call install_copy, selinux, 0, 0, 0755, $(SELINUX_DIR)/foobar, /dev/null)
@$(call install_lib, libselinux, 0, 0, 0644, libselinux)
@$(call install_lib, libsepol, 0, 0, 0644, libsepol)
@$(call install_lib, libsemanage, 0, 0, 0644, libsepol)
# @$(call install_copy, selinux, 0, 0, 0755, -, /usr/sbin/sestatus)
# @$(call install_copy, selinux, 0, 0, 0755, -, /usr/sbin/setenforce)
# @$(call install_copy, selinux, 0, 0, 0755, -, /usr/sbin/getenforce)
# @$(call install_copy, selinux, 0, 0, 0755, -, /usr/sbin/setsebool)
# @$(call install_copy, selinux, 0, 0, 0755, -, /usr/sbin/getsebool)
# @$(call install_copy, selinux, 0, 0, 0755, -, /usr/sbin/selinuxenabled)
# @$(call install_copy, selinux, 0, 0, 0755, -, /usr/sbin/matchpathcon)
# @$(call install_copy, selinux, 0, 0, 0755, -, /usr/sbin/loadpolicy)
# @$(call install_copy, selinux, 0, 0, 0755, -, /usr/sbin/sestatus)
@$(call install_copy, selinux, 0, 0, 0755, -, /usr/bin/checkmodule)
@$(call install_finish, selinux)
@$(call touch)
# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------
#$(STATEDIR)/selinux.clean:
# @$(call targetinfo)
# @$(call clean_pkg, SELINUX)
# vim: syntax=make
[-- Attachment #3: Type: text/plain, Size: 91 bytes --]
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] Iteratively Make & Make Install Subpackages
2019-03-14 9:34 ` Chin You Wen (WMSC-HW)
@ 2019-03-14 12:02 ` Michael Olbrich
2019-03-15 10:23 ` Chin You Wen (WMSC-HW)
0 siblings, 1 reply; 6+ messages in thread
From: Michael Olbrich @ 2019-03-14 12:02 UTC (permalink / raw)
To: ptxdist
Hi,
On Thu, Mar 14, 2019 at 05:34:37PM +0800, Chin You Wen (WMSC-HW) wrote:
> I was able to compile it by separating the libraries (libselinux, libsepol,
> libsemanag) into separate rule files and targetinstalled those dependencies
> first.
>
> However when using the repo url in a single rule file (as attached), I run
> into the problem I described above.
Please explain some more, what exactly you're doing. I expected that you
use the libsepol and libselinux packages that already exist in PTXdist
(although they are pretty old).
If you have your own rules then you need to follow the instructions that
Roland mentioned.
Michael
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] Iteratively Make & Make Install Subpackages
2019-03-14 12:02 ` Michael Olbrich
@ 2019-03-15 10:23 ` Chin You Wen (WMSC-HW)
0 siblings, 0 replies; 6+ messages in thread
From: Chin You Wen (WMSC-HW) @ 2019-03-15 10:23 UTC (permalink / raw)
To: ptxdist
[-- Attachment #1.1.1: Type: text/plain, Size: 1581 bytes --]
Hi,
I am using a very old version of PTXDist (2013.01) to add SELinux support
for an old distribution. As I understand, I need to download and compile
the userland packages on my own because busybox will complain about the
absence of the 2 libraries you mentioned. The SELinux repo provides not
only these 2 libraries but also other useful tools such as SEManage.
[image: image.png]
On Thu, Mar 14, 2019 at 8:03 PM Michael Olbrich <m.olbrich@pengutronix.de>
wrote:
> Hi,
>
> On Thu, Mar 14, 2019 at 05:34:37PM +0800, Chin You Wen (WMSC-HW) wrote:
> > I was able to compile it by separating the libraries (libselinux,
> libsepol,
> > libsemanag) into separate rule files and targetinstalled those
> dependencies
> > first.
> >
> > However when using the repo url in a single rule file (as attached), I
> run
> > into the problem I described above.
>
> Please explain some more, what exactly you're doing. I expected that you
> use the libsepol and libselinux packages that already exist in PTXdist
> (although they are pretty old).
> If you have your own rules then you need to follow the instructions that
> Roland mentioned.
>
> Michael
>
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
--
Regards,
You Wen
[-- Attachment #1.1.2: Type: text/html, Size: 2377 bytes --]
[-- Attachment #1.2: image.png --]
[-- Type: image/png, Size: 29150 bytes --]
[-- Attachment #2: Type: text/plain, Size: 91 bytes --]
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-03-15 10:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-12 10:56 [ptxdist] Iteratively Make & Make Install Subpackages Chin You Wen (WMSC-HW)
2019-03-12 11:45 ` Roland Hieber
2019-03-13 8:09 ` Michael Olbrich
2019-03-14 9:34 ` Chin You Wen (WMSC-HW)
2019-03-14 12:02 ` Michael Olbrich
2019-03-15 10:23 ` Chin You Wen (WMSC-HW)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox