[apparmor] [patch 01/13] parser - build against in-tree libapparmor

John Johansen john.johansen at canonical.com
Tue Oct 15 01:35:39 UTC 2013


On 10/14/2013 05:46 PM, John Johansen wrote:
> On 10/10/2013 01:46 PM, Steve Beattie wrote:
>> With trunk commit 2205 "use libapparmor's find mountpoint fn",
>> the parser now builds against and uses libapparmor at runtime. However,
>> it currently builds against the system installed libapparmor library and
>> header files, which fails if either aren't installed, and is thus
>> painful for bootstrapping in a new environment.
>>
>> Instead, the parser, like pam_apparmor and mod_apparmor, should build
>> against the in-tree libapparmor header and library. This patch does
>> that and adjusts the tests to point LD_LIBRARY_PATH at the location
>> of the built library as well.
>>
>> Signed-off-by: Steve Beattie <steve at nxnw.org>
> 
> So with my previous objection dropped as a manage my own patch queue
> better issue.
> 
> Acked-by: John Johansen <john.johansen at canonical.com>
> 
> But my other question still stands, do we not want libapparmor and
> libstdc++ being statically linked in. And yes I realize that I uh
> messed both those up and should be on the hook for the patch.
> 
> 

And that patch is below, sadly it ballons the parser a bit, from a
size of
  3696580 bytes  (803792 bytes stripped)
to
  4666902 bytes (1672648 bytes stripped)

---

--- Makefile.bak	2013-10-14 17:48:36.128747740 -0700
+++ Makefile	2013-10-14 18:28:10.524651367 -0700
@@ -86,8 +86,8 @@
 AAREDIR= libapparmor_re
 AAREOBJECT = ${AAREDIR}/libapparmor_re.a
 AAREOBJECTS = $(AAREOBJECT) libstdc++.a
-AARE_LDFLAGS=-static-libgcc -L. -L$(LIBAPPARMOR_PATH)/.libs/
-AALIB = -lapparmor
+AARE_LDFLAGS=-static-libgcc -static-libstdc++ -static -L. -L$(LIBAPPARMOR_PATH)/.libs/
+AALIB = -lapparmor -lpthread
 
 LEX_C_FILES	= parser_lex.c
 YACC_C_FILES	= parser_yacc.c parser_yacc.h




More information about the AppArmor mailing list