SELinux Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/2] userspace: Fix DEBUG=1 build
@ 2020-02-06 13:18 Ondrej Mosnacek
  2020-02-06 13:19 ` [PATCH 1/2] libsemanage: preserve parent Makefile's flags in debug mode Ondrej Mosnacek
  2020-02-06 13:19 ` [PATCH 2/2] Travis-CI: test that DEBUG build works Ondrej Mosnacek
  0 siblings, 2 replies; 5+ messages in thread
From: Ondrej Mosnacek @ 2020-02-06 13:18 UTC (permalink / raw)
  To: selinux

...and add it to the Travis CI matrix.

Passed Travis: https://travis-ci.org/WOnder93/selinux/builds/646830495
Failed new test without the fix: https://travis-ci.org/WOnder93/selinux/builds/646833909

Ondrej Mosnacek (2):
  libsemanage: preserve parent Makefile's flags in debug mode
  Travis-CI: test that DEBUG build works

 .travis.yml              | 3 +++
 libsemanage/src/Makefile | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

-- 
2.24.1


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

* [PATCH 1/2] libsemanage: preserve parent Makefile's flags in debug mode
  2020-02-06 13:18 [PATCH 0/2] userspace: Fix DEBUG=1 build Ondrej Mosnacek
@ 2020-02-06 13:19 ` Ondrej Mosnacek
  2020-02-06 13:19 ` [PATCH 2/2] Travis-CI: test that DEBUG build works Ondrej Mosnacek
  1 sibling, 0 replies; 5+ messages in thread
From: Ondrej Mosnacek @ 2020-02-06 13:19 UTC (permalink / raw)
  To: selinux

Do not override CFLAGS and LDFLAGS in libsemange Makefile under DEBUG=1,
to make it possible to build the whole tree using the root Makefile with
DEBUG=1.

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
---
 libsemanage/src/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile
index 8a9570c7..f6780dc6 100644
--- a/libsemanage/src/Makefile
+++ b/libsemanage/src/Makefile
@@ -22,8 +22,8 @@ RUBYINSTALL ?= $(shell $(RUBY) -e 'puts RbConfig::CONFIG["vendorarchdir"]')
 DEFAULT_SEMANAGE_CONF_LOCATION=/etc/selinux/semanage.conf
 
 ifeq ($(DEBUG),1)
-	export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -Werror
-	export LDFLAGS = -g
+	export CFLAGS ?= -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -Werror
+	export LDFLAGS ?= -g
 endif
 
 LEX = flex
-- 
2.24.1


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

* [PATCH 2/2] Travis-CI: test that DEBUG build works
  2020-02-06 13:18 [PATCH 0/2] userspace: Fix DEBUG=1 build Ondrej Mosnacek
  2020-02-06 13:19 ` [PATCH 1/2] libsemanage: preserve parent Makefile's flags in debug mode Ondrej Mosnacek
@ 2020-02-06 13:19 ` Ondrej Mosnacek
  2020-02-07 21:27   ` Stephen Smalley
  1 sibling, 1 reply; 5+ messages in thread
From: Ondrej Mosnacek @ 2020-02-06 13:19 UTC (permalink / raw)
  To: selinux

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
---
 .travis.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index e9f86baa..918958ac 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,6 +13,7 @@ env:
     # Test the last version of Python and Ruby together, with some linkers
     - PYVER=python3.7 RUBYLIBVER=2.6
     - PYVER=python3.7 RUBYLIBVER=2.6 TEST_FLAGS_OVERRIDE=1
+    - PYVER=python3.7 RUBYLIBVER=2.6 TEST_DEBUG=1
     - PYVER=python3.7 RUBYLIBVER=2.6 LINKER=gold
     - PYVER=python3.7 RUBYLIBVER=2.6 LINKER=bfd
 
@@ -116,6 +117,8 @@ before_script:
 
   # If TEST_FLAGS_OVERRIDE is defined, test that overriding CFLAGS, LDFLAGS and other variables works fine
   - if [ -n "$TEST_FLAGS_OVERRIDE" ]; then EXPLICIT_MAKE_VARS="CFLAGS=-I$DESTDIR/usr/include LDFLAGS=-L$DESTDIR/usr/lib LDLIBS= CPPFLAGS=" ; fi
+  # If TEST_DEBUG is defined, test that debug build works fine
+  - if [ -n "$TEST_DEBUG" ]; then EXPLICIT_MAKE_VARS="$EXPLICIT_MAKE_VARS DEBUG=1" ; fi
 
 script:
   # Start by installing everything into $DESTDIR
-- 
2.24.1


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

* Re: [PATCH 2/2] Travis-CI: test that DEBUG build works
  2020-02-06 13:19 ` [PATCH 2/2] Travis-CI: test that DEBUG build works Ondrej Mosnacek
@ 2020-02-07 21:27   ` Stephen Smalley
  2020-02-10 14:36     ` Stephen Smalley
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Smalley @ 2020-02-07 21:27 UTC (permalink / raw)
  To: Ondrej Mosnacek, selinux

On 2/6/20 8:19 AM, Ondrej Mosnacek wrote:
> Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>

Acked-by: Stephen Smalley <sds@tycho.nsa.gov>

> ---
>   .travis.yml | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/.travis.yml b/.travis.yml
> index e9f86baa..918958ac 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -13,6 +13,7 @@ env:
>       # Test the last version of Python and Ruby together, with some linkers
>       - PYVER=python3.7 RUBYLIBVER=2.6
>       - PYVER=python3.7 RUBYLIBVER=2.6 TEST_FLAGS_OVERRIDE=1
> +    - PYVER=python3.7 RUBYLIBVER=2.6 TEST_DEBUG=1
>       - PYVER=python3.7 RUBYLIBVER=2.6 LINKER=gold
>       - PYVER=python3.7 RUBYLIBVER=2.6 LINKER=bfd
>   
> @@ -116,6 +117,8 @@ before_script:
>   
>     # If TEST_FLAGS_OVERRIDE is defined, test that overriding CFLAGS, LDFLAGS and other variables works fine
>     - if [ -n "$TEST_FLAGS_OVERRIDE" ]; then EXPLICIT_MAKE_VARS="CFLAGS=-I$DESTDIR/usr/include LDFLAGS=-L$DESTDIR/usr/lib LDLIBS= CPPFLAGS=" ; fi
> +  # If TEST_DEBUG is defined, test that debug build works fine
> +  - if [ -n "$TEST_DEBUG" ]; then EXPLICIT_MAKE_VARS="$EXPLICIT_MAKE_VARS DEBUG=1" ; fi
>   
>   script:
>     # Start by installing everything into $DESTDIR
> 


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

* Re: [PATCH 2/2] Travis-CI: test that DEBUG build works
  2020-02-07 21:27   ` Stephen Smalley
@ 2020-02-10 14:36     ` Stephen Smalley
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Smalley @ 2020-02-10 14:36 UTC (permalink / raw)
  To: Ondrej Mosnacek, selinux

On 2/7/20 4:27 PM, Stephen Smalley wrote:
> On 2/6/20 8:19 AM, Ondrej Mosnacek wrote:
>> Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
> 
> Acked-by: Stephen Smalley <sds@tycho.nsa.gov>

Both patches applied.

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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-06 13:18 [PATCH 0/2] userspace: Fix DEBUG=1 build Ondrej Mosnacek
2020-02-06 13:19 ` [PATCH 1/2] libsemanage: preserve parent Makefile's flags in debug mode Ondrej Mosnacek
2020-02-06 13:19 ` [PATCH 2/2] Travis-CI: test that DEBUG build works Ondrej Mosnacek
2020-02-07 21:27   ` Stephen Smalley
2020-02-10 14:36     ` Stephen Smalley

SELinux Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/selinux/0 selinux/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 selinux selinux/ https://lore.kernel.org/selinux \
		selinux@vger.kernel.org
	public-inbox-index selinux

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.selinux


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git