Commit graph

11 commits

Author SHA1 Message Date
John Johansen
958cc28876 libapparmor: Finish removing LD_RUN_PATH from Makefile.perl
commit 94dfe15b28 attempted to remove
LD_RUN_PATH unfortunately

   But all it actually does is cause the Makefile.perl to embed the rpath
    "" instead. Which is still an rpath, only I guess an even worse one.

    --
    Eli Schwartz
    Arch Linux Bug Wrangler and Trusted User

This is because it cleared the setting of the variable LD_RUN_PATH
which was expanded in the command

$(INST_DYNAMIC) : $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)$(DFSEP).exists $(EXPORT_LIST) $(PERL_ARCHIVEDEP) $(PERL_ARCHIVE_AFTER) $(INST_DYNAMIC_DEP)
	$(RM_F) $@
	 LD_RUN_PATH="$(LD_RUN_PATH)" $(LD)  $(LDDLFLAGS) $(LDFROM) $(OTHERLDFLAGS) -o $@ $(MYEXTLIB) \
	  $(PERL_ARCHIVE) $(LDLOADLIBS) $(PERL_ARCHIVE_AFTER) $(EXPORT_LIST) \
	  $(INST_DYNAMIC_FIX)
	$(CHMOD) $(PERM_RWX) $@

resulting in LD_RUN_PATH="" being passed to the command.

Finish removing LD_RUN_PATH from Makefile.perl by removing it from
the command invocation if it is present.

Note: we use \x24 instead of $ in the regex as there seems to be a bug
and no level of escaping $ would allow it to be used.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Christian Boltz <apparmor@cboltz.de>
2018-10-09 16:42:17 -07:00
Kees Cook
f5384469b5 pass LDFLAGS fully into build
Acked-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2017-01-19 23:04:34 +00:00
Steve Beattie
a72f0693f3 libapparmor: move public headers to separate directory
This patch moves the apparmor.h and aalogparse.h headers
from the libapparmor/src/ directory to a new directory
libapparmor/include/. The apparmor.h header is stored in a sys/
directory within libapparmor/include/ to match its usual install
location in /usr/include/sys/, simplifying the #include statements of
source that wishes to include either the in-tree or system installed
version of the header (i.e. #include <sys/apparmor.h> can be used
everywhere).

The patch size is inflated by the movements of the header files, which
are unchanged except for their locations. Otherwise, the rest of the
changes are to modify the include search path or to stop looking in
$CWD for one of the headers.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Tyler Hicks <tyhicks@canonical.com>
2014-01-06 14:08:55 -08:00
Tyler Hicks
a80c27ece3 LibAppArmor.pm: Adjust Makefile dependencies to support parallel builds
The libapparmor_wrap.c target generates libapparmor_wrap.c and
LibAppArmor.pm. The Perl module must exist before `perl Makefile.PL`
under the Makefile.perl target, otherwise the generated Makefile.perl
ends up with an empty $(TO_INST_PM) variable and the pm_to_blib target's
dependencies are incomplete. That results in the Perl module not getting
copied to the blib directory and a build that is missing LibAppArmor.pm.

A build missing LibAppArmor.pm only occurred while building with
multiple threads.

Thanks to Seth Arnold for the suggestion on how to best fix the
dependencies.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Steve Beattie <steve@nxnw.org>
2013-11-04 11:40:33 -08:00
Kees Cook
33557e22ed The m4 shipped to handle Python was incorrectly clearing
$CPPFLAGS. Additionally, do not repeat compiler flags for automake
targets that already include them, and pass more flags to the Perl build.

Signed-off-by: Kees Cook <kees@ubuntu.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-04-25 12:15:19 -07:00
Steve Beattie
94dfe15b28 From: Jeff Mahoney <jeffm@suse.com>
libapparmor: remove LD_RUN_PATH from swig generated makefile as it
results in an rpath binding in the library.
2011-02-08 09:27:32 -08:00
Steve Beattie
b403bbdf82 Fix perl swig bindings so that libapparmor can be built when configured
without perl. Thanks to Arkadiusz Miskiewicz <arekm at maven.pl>.
2010-03-16 15:00:26 -07:00
Jamie Strandboge
d4d9dda5cb libraries/libapparmor/swig/perl/examples/example.pl: more fixes 2010-01-12 09:52:00 -06:00
Jamie Strandboge
3fd950e823 libraries/libapparmor/swig/perl/examples/example.pl: fix so it works again 2010-01-11 20:54:54 -06:00
Steve Beattie
c3f9d75abe Submitted By: Mario Fetka (mario dot fetka at gmail dot com)
Acked-By: Steve Beattie <steve@nxnw.org>

This patch allows libapparmor to be built out of tree.
2009-05-12 21:56:56 +00:00
John Johansen
7d30be5087 move libapparmor into the libraries directory 2008-05-19 22:48:31 +00:00