All of lore.kernel.org
 help / color / mirror / Atom feed
* Using "override CFLAGS += -I$(PREFIX)/include" in mcstrans?
@ 2016-11-16 22:17 Nicolas Iooss
  2016-11-17 13:50 ` Stephen Smalley
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Iooss @ 2016-11-16 22:17 UTC (permalink / raw)
  To: selinux

[-- Attachment #1: Type: text/plain, Size: 1557 bytes --]

Hello,

A few weeks ago I configured Travis-CI to build the SELinux userspace
projects with several configurations (gcc and clang compilers, several
Python and Ruby versions...). Since the merge of splitpolicycoreutils the
builds I have done failed because of at least two things (cf. [1] for the
raw result):

- sandbox test contains "if selinux.security_getenforce() == 1:" to skip
the test on systems where SELinux is in enforcing mode. This fails with a
FileNotFoundError on a system without SELinux (like Travis-CI build
environments). To fix this I wrote a patch [1] that I'll send once I get
the tests running fine again.

- When building mcstrans with a "make install" in the root directory, the
compiler complains with "fatal error: selinux/selinux.h: No such file or
directory". Other subdirectories have "override CFLAGS +=
-I$(PREFIX)/include" to include files installed in $DESTDIR. This makes
"make DESTDIR=/tmp/xxxx install" work on systems without SELinux. Moreover
mcstrans/src/Makefile uses "override CFLAGS += -I../include" but
mcstrans/include/ does not exist. I feel like this line should be modified
to "...-I$(PREFIX)..." but it makes me quite uneasy so before writing a
patch, I would like to be sure I am not missing something I have not seen
in my quick reading of the files. This is why I am writing this email:
could you please take a look at mcstrans Makefiles?

Thanks,
Nicolas

[1] https://travis-ci.org/fishilico/selinux/jobs/176506142
[2]
https://github.com/fishilico/selinux/commit/1c3cae4a984a6dc9a5ba5190a69bf4e7a2362623

[-- Attachment #2: Type: text/html, Size: 1968 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Using "override CFLAGS += -I$(PREFIX)/include" in mcstrans?
  2016-11-16 22:17 Using "override CFLAGS += -I$(PREFIX)/include" in mcstrans? Nicolas Iooss
@ 2016-11-17 13:50 ` Stephen Smalley
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Smalley @ 2016-11-17 13:50 UTC (permalink / raw)
  To: Nicolas Iooss, selinux

On 11/16/2016 05:17 PM, Nicolas Iooss wrote:
> Hello,
> 
> A few weeks ago I configured Travis-CI to build the SELinux userspace
> projects with several configurations (gcc and clang compilers, several
> Python and Ruby versions...). Since the merge of splitpolicycoreutils
> the builds I have done failed because of at least two things (cf. [1]
> for the raw result):
> 
> - sandbox test contains "if selinux.security_getenforce() == 1:" to skip
> the test on systems where SELinux is in enforcing mode. This fails with
> a FileNotFoundError on a system without SELinux (like Travis-CI build
> environments). To fix this I wrote a patch [1] that I'll send once I get
> the tests running fine again.
> 
> - When building mcstrans with a "make install" in the root directory,
> the compiler complains with "fatal error: selinux/selinux.h: No such
> file or directory". Other subdirectories have "override CFLAGS +=
> -I$(PREFIX)/include" to include files installed in $DESTDIR. This makes
> "make DESTDIR=/tmp/xxxx install" work on systems without SELinux.
> Moreover mcstrans/src/Makefile uses "override CFLAGS += -I../include"
> but mcstrans/include/ does not exist. I feel like this line should be
> modified to "...-I$(PREFIX)..." but it makes me quite uneasy so before
> writing a patch, I would like to be sure I am not missing something I
> have not seen in my quick reading of the files. This is why I am writing
> this email: could you please take a look at mcstrans Makefiles?

Changing it to -I$(PREFIX)/include sounds right to me.

> 
> Thanks,
> Nicolas
> 
> [1] https://travis-ci.org/fishilico/selinux/jobs/176506142
> [2] https://github.com/fishilico/selinux/commit/1c3cae4a984a6dc9a5ba5190a69bf4e7a2362623

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-17 13:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-16 22:17 Using "override CFLAGS += -I$(PREFIX)/include" in mcstrans? Nicolas Iooss
2016-11-17 13:50 ` Stephen Smalley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.