add libaudit and enable 'perf trace'
cover add libaudit and enable 'perf trace'
From: Tom Zanussi <[email protected]>
'perf-trace' is a new perf subcommand available in the 3.8 kernel - this patchset enables it. 'perf trace' requires libaudit, which is added as a new recipe.
Build-tested on all arches and run-tested on all that would boot at the time, including real hardware such as crownbay. Build-tested with 3.4 kernel as well.
The following changes since commit d7b248e715d99766bf8602ff9f038f8b0afa5e78:
augeas: change SRC_URI (2013-02-26 08:02:29 -0800)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib.git tzanussi/perf-trace-v1
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/perf-trace-v1
Tom Zanussi (3):
libaudit: new package
perf: add perf-trace feature
perf: enable perf-trace feature
meta/recipes-kernel/perf/perf.inc | 3 +- meta/recipes-kernel/perf/perf_3.4.bb | 7 +- .../libaudit/libaudit/build-lib-only.patch | 33 ++ .../libaudit/libaudit/fix-host-gen.patch | 461 +++++++++++++++++++++ meta/recipes-support/libaudit/libaudit_2.2.2.bb | 25 ++ 5 files changed, 526 insertions(+), 3 deletions(-) create mode 100644 meta/recipes-support/libaudit/libaudit/build-lib-only.patch create mode 100644 meta/recipes-support/libaudit/libaudit/fix-host-gen.patch create mode 100644 meta/recipes-support/libaudit/libaudit_2.2.2.bb
Signature · 1 line
1.7.11.4
PATCH 1/3 libaudit: new package
From: Tom Zanussi <[email protected]>
Add libaudit, used by system call auditing applications. From the sources:
"The audit package contains the user space utilities for storing and searching the audit records generate by the audit subsystem in the Linux 2.6 kernel."
--- .../libaudit/libaudit/build-lib-only.patch | 33 ++ .../libaudit/libaudit/fix-host-gen.patch | 461 +++++++++++++++++++++ meta/recipes-support/libaudit/libaudit_2.2.2.bb | 25 ++ 3 files changed, 519 insertions(+) create mode 100644 meta/recipes-support/libaudit/libaudit/build-lib-only.patch create mode 100644 meta/recipes-support/libaudit/libaudit/fix-host-gen.patch create mode 100644 meta/recipes-support/libaudit/libaudit_2.2.2.bb
meta/recipes-support/libaudit/libaudit/build-lib-only.patch new file +33 -0
@@ -0,0 +1,33 @@ +Currently we need only the libaudit shared library, which is a +dependency for certain other packages such as 'perf-trace' and +'perf-script'. We don't need all the other tools, daemons, or plugins +that come with the audit code. + +Signed-off-by: Tom Zanussi <[email protected]> + +Upstream-Status: Inappropriate [embedded-specific] + +Index: audit-2.2.2/Makefile.in +=================================================================== +--- audit-2.2.2.orig/Makefile.in ++++ audit-2.2.2/Makefile.in +@@ -112,8 +112,7 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGE + distdir dist dist-all distcheck + ETAGS = etags + CTAGS = ctags +-DIST_SUBDIRS = lib auparse src/mt src/libev src audisp tools bindings \ +- init.d docs swig ++DIST_SUBDIRS = lib + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + distdir = $(PACKAGE)-$(VERSION) + top_distdir = $(distdir) +@@ -287,8 +286,7 @@ target_vendor = @target_vendor@ + top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-SUBDIRS = lib auparse src/mt src/libev src audisp tools bindings \ +- init.d docs $(am__append_1) ++SUBDIRS = lib + EXTRA_DIST = ChangeLog AUTHORS NEWS README INSTALL audit.spec \ + contrib/capp.rules contrib/nispom.rules contrib/lspp.rules \ + contrib/stig.rules contrib/skeleton.c contrib/avc_snap \
meta/recipes-support/libaudit/libaudit/fix-host-gen.patch new file +461 -0
461 lines not on this page · raw message
meta/recipes-support/libaudit/libaudit_2.2.2.bb new file +25 -0
@@ -0,0 +1,25 @@ +DESCRIPTION = "libaudit is the dynamic library needed for applications to use the audit framework." +SECTION = "libs" +AUTHOR = "Steve Grubb <[email protected]>" +HOMEPAGE = "http://people.redhat.com/sgrubb/audit/" +LICENSE = "LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" +PR = "r0" + +SRC_URI = "http://people.redhat.com/sgrubb/audit/audit-${PV}.tar.gz \ + file://build-lib-only.patch \ + file://fix-host-gen.patch \ + " + +SRC_URI[md5sum] = "6641fde111cf5dfda6d4282ab8410df5" +SRC_URI[sha256sum] = "8bc2b45a5f08f5df6cebcd5543f24b7e68e28b64da4b23f08de2c6616384302b" + +S = "${WORKDIR}/audit-${PV}" + +inherit autotools + +EXTRA_OECONF = "--disable-dependency-tracking --disable-listener" + +do_configure() { + oe_runconf +}
Signature · 1 line
1.7.11.4
PATCH 2/3 perf: add perf-trace feature
From: Tom Zanussi <[email protected]>
Add a new feature named 'perf-trace'. Adding this into the PERF_FEATURES variable in perf.inc will enable 'perf trace' support on the target. 'perf trace' is meant to be perf's 'strace on steroids' utility, and it also adds libaudit to the image, if perf is included in an image.
If 'perf-trace' isn't named as a feature (the default), 'perf trace' support will be disabled and unavailable.
--- meta/recipes-kernel/perf/perf_3.4.bb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
meta/recipes-kernel/perf/perf_3.4.bb +5 -2
@@ -9,7 +9,7 @@ as well." LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" -PR = "r8" +PR = "r9" require perf.inc
@@ -17,6 +17,7 @@ BUILDPERF_libc-uclibc = "no" TUI_DEPENDS = "${@perf_feature_enabled('perf-tui', 'libnewt', '',d)}" SCRIPTING_DEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl python', '',d)}" +TRACE_DEPENDS = "${@perf_feature_enabled('perf-trace', 'libaudit', '',d)}" DEPENDS = "virtual/kernel \ virtual/${MLPREFIX}libc \
@@ -24,6 +25,7 @@ DEPENDS = "virtual/kernel \ ${MLPREFIX}binutils \ ${TUI_DEPENDS} \ ${SCRIPTING_DEPENDS} \ + ${TRACE_DEPENDS} \ bison flex \ "
@@ -54,6 +56,7 @@ B = "${WORKDIR}/${BPN}-${PV}" SCRIPTING_DEFINES = "${@perf_feature_enabled('perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}" TUI_DEFINES = "${@perf_feature_enabled('perf-tui', '', 'NO_NEWT=1',d)}" +TRACE_DEFINES = "${@perf_feature_enabled('perf-trace', '', 'NO_LIBAUDIT=1',d)}" export LDFLAGS = "-ldl -lutil" EXTRA_OEMAKE = \
@@ -64,7 +67,7 @@ EXTRA_OEMAKE = \ CC="${CC}" \ AR="${AR}" \ perfexecdir=${libexecdir} \ - NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${SCRIPTING_DEFINES} \ + NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${SCRIPTING_DEFINES} ${TRACE_DEFINES} \ ' # We already pass the correct arguments to our compiler for the CFLAGS (if we
Signature · 1 line
1.7.11.4
PATCH 3/3 perf: enable perf-trace feature
In reply to [email protected]From: Tom Zanussi <[email protected]>
Add an entry enabling the new perf-trace perf subcommand.
--- meta/recipes-kernel/perf/perf.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-kernel/perf/perf.inc +2 -1
@@ -1,4 +1,4 @@ -PERF_FEATURES_ENABLE ?= "perf-scripting perf-tui" +PERF_FEATURES_ENABLE ?= "perf-scripting perf-tui perf-trace" def perf_feature_enabled(feature, trueval, falseval, d): """
@@ -14,6 +14,7 @@ def perf_feature_enabled(feature, trueval, falseval, d): Available perf features: perf-scripting: enable support for Perl and Python bindings perf-tui: enable support for the perf TUI (via libnewt) + perf-trace: enable support for 'perf trace' """ enabled_features = d.getVar("PERF_FEATURES_ENABLE", True) or ""
Signature · 1 line
1.7.11.4
Re: [PATCH 1/3] libaudit: new package
In reply to [email protected]Quoted 20 lines · On 02/27/2013 07:00 AM, [email protected] wrote:
From: Tom Zanussi <[email protected]>
Add libaudit, used by system call auditing applications. From the sources:
"The audit package contains the user space utilities for storing and searching the audit records generate by the audit subsystem in the Linux 2.6 kernel."
Signed-off-by Tom Zanussi <[email protected]>--- .../libaudit/libaudit/build-lib-only.patch | 33 ++ .../libaudit/libaudit/fix-host-gen.patch | 461 +++++++++++++++++++++ meta/recipes-support/libaudit/libaudit_2.2.2.bb | 25 ++ 3 files changed, 519 insertions(+)create mode 100644
meta/recipes-support/libaudit/libaudit/build-lib-only.patchcreate mode 100644meta/recipes-support/libaudit/libaudit/fix-host-gen.patchcreate mode 100644 meta/recipes-support/libaudit/libaudit_2.2.2.bb
<SNIP>
Quoted 22 lines
meta/recipes-support/libaudit/libaudit_2.2.2.bb new file +15
-0@@ -0,0 +1,25 @@ +DESCRIPTION = "libaudit is the dynamic library needed for applications to use the audit framework." +SECTION = "libs" +AUTHOR = "Steve Grubb <[email protected]>" +HOMEPAGE = "http://people.redhat.com/sgrubb/audit/" +LICENSE = "LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" +PR = "r0" + +SRC_URI = "http://people.redhat.com/sgrubb/audit/audit-${PV}.tar.gz \ + file://build-lib-only.patch \ + file://fix-host-gen.patch \ + " + +SRC_URI[md5sum] = "6641fde111cf5dfda6d4282ab8410df5" +SRC_URI[sha256sum] = "8bc2b45a5f08f5df6cebcd5543f24b7e68e28b64da4b23f08de2c6616384302b"
meta/recipes-support/libaudit/libaudit_2.2.2.bb line 25
Quoted 10 lines
meta/recipes-support/libaudit/libaudit_2.2.2.bb new file +10
-0+ +S = "${WORKDIR}/audit-${PV}" + +inherit autotools + +EXTRA_OECONF = "--disable-dependency-tracking --disable-listener" + +do_configure() { + oe_runconf +}
Is this do_configure really needed? Does the autotools default not work correctly? And if not why not?
Sau!
Re: [PATCH 1/3] libaudit: new package
Quoted 50 lines · Saul Wold
Quoted 20 lines · On 02/27/2013 07:00 AM, [email protected] wrote:
From: Tom Zanussi <[email protected]>
Add libaudit, used by system call auditing applications. From the sources:
"The audit package contains the user space utilities for storing and searching the audit records generate by the audit subsystem in the Linux 2.6 kernel."
Signed-off-by Tom Zanussi <[email protected]>--- .../libaudit/libaudit/build-lib-only.patch | 33 ++ .../libaudit/libaudit/fix-host-gen.patch | 461 +++++++++++++++++++++ meta/recipes-support/libaudit/libaudit_2.2.2.bb | 25 ++ 3 files changed, 519 insertions(+)create mode 100644
meta/recipes-support/libaudit/libaudit/build-lib-only.patchcreate mode 100644meta/recipes-support/libaudit/libaudit/fix-host-gen.patchcreate mode 100644 meta/recipes-support/libaudit/libaudit_2.2.2.bb<SNIP>
Quoted 26 lines
meta/recipes-support/libaudit/libaudit_2.2.2.bb new file +20
-0@@ -0,0 +1,25 @@ +DESCRIPTION = "libaudit is the dynamic library needed for applications to use the audit framework." +SECTION = "libs" +AUTHOR = "Steve Grubb <[email protected]>" +HOMEPAGE = "http://people.redhat.com/sgrubb/audit/" +LICENSE = "LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" +PR = "r0" + +SRC_URI = "http://people.redhat.com/sgrubb/audit/audit-${PV}.tar.gz \ + file://build-lib-only.patch \ + file://fix-host-gen.patch \ + " + +SRC_URI[md5sum] = "6641fde111cf5dfda6d4282ab8410df5" +SRC_URI[sha256sum] = "8bc2b45a5f08f5df6cebcd5543f24b7e68e28b64da4b23f08de2c6616384302b" + +S = "${WORKDIR}/audit-${PV}" + +inherit autotools +
Quoted 8 lines
meta/recipes-support/libaudit/libaudit_2.2.2.bb line 25
Quoted 6 lines
meta/recipes-support/libaudit/libaudit_2.2.2.bb new file +5
-0+EXTRA_OECONF = "--disable-dependency-tracking --disable-listener" + +do_configure() { + oe_runconf +}Is this
do_configurereally needed? Does the autotools default not work correctly? And if not why not?
This is to avoid the autoreconf step, which ends up overwriting the lib/Makefile.in changes when it regenerates it from lib/Makefile.am.
The Makefile.in is shipped with the source tarball, so I modified it directly instead of complicating things by trying to get autoreconf to generate the correct Makefile for the target part of the build vs these specific changes to Makefile.in for the set of programs generated to run on the host.
Tom
Quoted 3 lines
Sau!
Re: [PATCH 1/3] libaudit: new package
Quoted 60 lines · Tom Zanussi
Quoted 50 lines · Saul Wold
Quoted 20 lines · On 02/27/2013 07:00 AM, [email protected] wrote:
From: Tom Zanussi <[email protected]>
Add libaudit, used by system call auditing applications. From the sources:
"The audit package contains the user space utilities for storing and searching the audit records generate by the audit subsystem in the Linux 2.6 kernel."
Signed-off-by Tom Zanussi <[email protected]>--- .../libaudit/libaudit/build-lib-only.patch | 33 ++ .../libaudit/libaudit/fix-host-gen.patch | 461 +++++++++++++++++++++ meta/recipes-support/libaudit/libaudit_2.2.2.bb | 25 ++ 3 files changed, 519 insertions(+)create mode 100644
meta/recipes-support/libaudit/libaudit/build-lib-only.patchcreate mode 100644meta/recipes-support/libaudit/libaudit/fix-host-gen.patchcreate mode 100644 meta/recipes-support/libaudit/libaudit_2.2.2.bb<SNIP>
Quoted 26 lines
meta/recipes-support/libaudit/libaudit_2.2.2.bb new file +20
-0@@ -0,0 +1,25 @@ +DESCRIPTION = "libaudit is the dynamic library needed for applications to use the audit framework." +SECTION = "libs" +AUTHOR = "Steve Grubb <[email protected]>" +HOMEPAGE = "http://people.redhat.com/sgrubb/audit/" +LICENSE = "LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" +PR = "r0" + +SRC_URI = "http://people.redhat.com/sgrubb/audit/audit-${PV}.tar.gz \ + file://build-lib-only.patch \ + file://fix-host-gen.patch \ + " + +SRC_URI[md5sum] = "6641fde111cf5dfda6d4282ab8410df5" +SRC_URI[sha256sum] = "8bc2b45a5f08f5df6cebcd5543f24b7e68e28b64da4b23f08de2c6616384302b" + +S = "${WORKDIR}/audit-${PV}" + +inherit autotools +Quoted 8 lines
meta/recipes-support/libaudit/libaudit_2.2.2.bb line 25
Quoted 6 lines
meta/recipes-support/libaudit/libaudit_2.2.2.bb new file +5
-0+EXTRA_OECONF = "--disable-dependency-tracking --disable-listener" + +do_configure() { + oe_runconf +}Is this
do_configurereally needed? Does the autotools default not work correctly? And if not why not?
Quoted 9 lines
This is to avoid the autoreconf step, which ends up overwriting the
lib/Makefile.inchanges when it regenerates it fromlib/Makefile.am.The Makefile.in is shipped with the source tarball, so I modified it directly instead of complicating things by trying to get autoreconf to generate the correct
Makefilefor the target part of the build vs these specific changes to Makefile.in for the set of programs generated to run on the host.
Tom,
I understand your approach here and while it has good intentions, is not the right way to go about this. We want to enable upstream packages to cross compile (if they are open to the idea). So changing the Makefile.am would be the right way to do this and allow the standard automake and autoreconf to do their work. This would also allow the patches to be possibly accepted up stream.
I understand there are examples of this type of patching in OE-Core, that does not mean they are good examples and they should probably be looked into for fixing also.
I know you have put effort in here, and we want to make sure the patches are correct and good example moving forward.
For example in the first build-lib-only patch you can just edit the SUBDIRS line to include lib.
For the larger patch, are you selectively changing CCLD and CFLAGS or is it through out? You should probably build these -native and use them instead of trying to tweak around the target build.
We can discuss it further as needed.
Thanks
Sau!
Quoted 9 lines
Tom
Quoted 3 lines
Sau!
Re: [PATCH 1/3] libaudit: new package
Quoted 71 lines · Saul Wold
Quoted 60 lines · Tom Zanussi
Quoted 50 lines · Saul Wold
Quoted 20 lines · On 02/27/2013 07:00 AM, [email protected] wrote:
From: Tom Zanussi <[email protected]>
Add libaudit, used by system call auditing applications. From the sources:
"The audit package contains the user space utilities for storing and searching the audit records generate by the audit subsystem in the Linux 2.6 kernel."
Signed-off-by Tom Zanussi <[email protected]>--- .../libaudit/libaudit/build-lib-only.patch | 33 ++ .../libaudit/libaudit/fix-host-gen.patch | 461 +++++++++++++++++++++ meta/recipes-support/libaudit/libaudit_2.2.2.bb | 25 ++ 3 files changed, 519 insertions(+)create mode 100644
meta/recipes-support/libaudit/libaudit/build-lib-only.patchcreate mode 100644meta/recipes-support/libaudit/libaudit/fix-host-gen.patchcreate mode 100644 meta/recipes-support/libaudit/libaudit_2.2.2.bb<SNIP>
Quoted 26 lines
meta/recipes-support/libaudit/libaudit_2.2.2.bb new file +20
-0@@ -0,0 +1,25 @@ +DESCRIPTION = "libaudit is the dynamic library needed for applications to use the audit framework." +SECTION = "libs" +AUTHOR = "Steve Grubb <[email protected]>" +HOMEPAGE = "http://people.redhat.com/sgrubb/audit/" +LICENSE = "LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" +PR = "r0" + +SRC_URI = "http://people.redhat.com/sgrubb/audit/audit-${PV}.tar.gz \ + file://build-lib-only.patch \ + file://fix-host-gen.patch \ + " + +SRC_URI[md5sum] = "6641fde111cf5dfda6d4282ab8410df5" +SRC_URI[sha256sum] = "8bc2b45a5f08f5df6cebcd5543f24b7e68e28b64da4b23f08de2c6616384302b" + +S = "${WORKDIR}/audit-${PV}" + +inherit autotools +Quoted 8 lines
meta/recipes-support/libaudit/libaudit_2.2.2.bb line 25
Quoted 6 lines
meta/recipes-support/libaudit/libaudit_2.2.2.bb new file +5
-0+EXTRA_OECONF = "--disable-dependency-tracking --disable-listener" + +do_configure() { + oe_runconf +}Is this
do_configurereally needed? Does the autotools default not work correctly? And if not why not?Quoted 9 lines
This is to avoid the autoreconf step, which ends up overwriting the
lib/Makefile.inchanges when it regenerates it fromlib/Makefile.am.The Makefile.in is shipped with the source tarball, so I modified it directly instead of complicating things by trying to get autoreconf to generate the correct
Makefilefor the target part of the build vs these specific changes to Makefile.in for the set of programs generated to run on the host.
Quoted 9 lines
Tom,
I understand your approach here and while it has good intentions, is not the right way to go about this. We want to enable upstream packages to cross compile (if they are open to the idea). So changing the Makefile.am would be the right way to do this and allow the standard automake and autoreconf to do their work. This would also allow the patches to be possibly accepted up stream.
OK, makes sense, I understand - I did actually try digging into this and to do it by targeting Makefile.am, but got bogged down in the details of figuring out how to get everything generated properly for the target and these special cases of these other programs generated for the host.
Also, any patch that would likely be accepted upstream would have to address everything in the audit package, not just the small libaudit
part that this recipe is interested in. It doesn't seem worth the work
to make it all cross-compileable it in order to simply to enable a single perf feature.
It may be that not much more is needed, but I did notice the same types of problems in other subdirs of the package when I neglected to filter them out. In any case, I will take another look and consider some of the things you mention below...
Quoted 10 lines
I understand there are examples of this type of patching in OE-Core, that does not mean they are good examples and they should probably be looked into for fixing also.
I know you have put effort in here, and we want to make sure the patches are correct and good example moving forward.
For example in the first build-lib-only patch you can just edit the SUBDIRS line to include lib.
Right, fixing the top-level Makefile.am was easy - changing the SUBDIRs line there was what I did in the -v0 branch, the more problematic case is the Makefile.am in /lib...
Quoted 4 lines
For the larger patch, are you selectively changing CCLD and CFLAGS or is it through out? You should probably build these -native and use them instead of trying to tweak around the target build.
Selectively, just for the gen_* programs which are used to generate tables and structs on the host.
I'll try the -native route instead, which does make sense as an alternative...
Thanks for the input..
Tom
Quoted 19 lines
We can discuss it further as needed.
Thanks
Sau!Quoted 9 lines
Tom
Quoted 3 lines
Sau!
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 1/3] libaudit: new package
Quoted 118 lines · Tom Zanussi
Quoted 71 lines · Saul Wold
Quoted 60 lines · Tom Zanussi
Quoted 50 lines · Saul Wold
Quoted 20 lines · On 02/27/2013 07:00 AM, [email protected] wrote:
From: Tom Zanussi <[email protected]>
Add libaudit, used by system call auditing applications. From the sources:
"The audit package contains the user space utilities for storing and searching the audit records generate by the audit subsystem in the Linux 2.6 kernel."
Signed-off-by Tom Zanussi <[email protected]>--- .../libaudit/libaudit/build-lib-only.patch | 33 ++ .../libaudit/libaudit/fix-host-gen.patch | 461 +++++++++++++++++++++ meta/recipes-support/libaudit/libaudit_2.2.2.bb | 25 ++ 3 files changed, 519 insertions(+)create mode 100644
meta/recipes-support/libaudit/libaudit/build-lib-only.patchcreate mode 100644meta/recipes-support/libaudit/libaudit/fix-host-gen.patchcreate mode 100644 meta/recipes-support/libaudit/libaudit_2.2.2.bb<SNIP>
Quoted 26 lines
meta/recipes-support/libaudit/libaudit_2.2.2.bb new file +20
-0@@ -0,0 +1,25 @@ +DESCRIPTION = "libaudit is the dynamic library needed for applications to use the audit framework." +SECTION = "libs" +AUTHOR = "Steve Grubb <[email protected]>" +HOMEPAGE = "http://people.redhat.com/sgrubb/audit/" +LICENSE = "LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" +PR = "r0" + +SRC_URI = "http://people.redhat.com/sgrubb/audit/audit-${PV}.tar.gz \ + file://build-lib-only.patch \ + file://fix-host-gen.patch \ + " + +SRC_URI[md5sum] = "6641fde111cf5dfda6d4282ab8410df5" +SRC_URI[sha256sum] = "8bc2b45a5f08f5df6cebcd5543f24b7e68e28b64da4b23f08de2c6616384302b" + +S = "${WORKDIR}/audit-${PV}" + +inherit autotools +Quoted 8 lines
meta/recipes-support/libaudit/libaudit_2.2.2.bb line 25
Quoted 6 lines
meta/recipes-support/libaudit/libaudit_2.2.2.bb new file +5
-0+EXTRA_OECONF = "--disable-dependency-tracking --disable-listener" + +do_configure() { + oe_runconf +}Is this
do_configurereally needed? Does the autotools default not work correctly? And if not why not?Quoted 9 lines
This is to avoid the autoreconf step, which ends up overwriting the
lib/Makefile.inchanges when it regenerates it fromlib/Makefile.am.The Makefile.in is shipped with the source tarball, so I modified it directly instead of complicating things by trying to get autoreconf to generate the correct
Makefilefor the target part of the build vs these specific changes to Makefile.in for the set of programs generated to run on the host.Quoted 9 lines
Tom,
I understand your approach here and while it has good intentions, is not the right way to go about this. We want to enable upstream packages to cross compile (if they are open to the idea). So changing the Makefile.am would be the right way to do this and allow the standard automake and autoreconf to do their work. This would also allow the patches to be possibly accepted up stream.
OK, makes sense, I understand - I did actually try digging into this and to do it by targeting Makefile.am, but got bogged down in the details of figuring out how to get everything generated properly for the target and these special cases of these other programs generated for the host.
Also, any patch that would likely be accepted upstream would have to address everything in the audit package, not just the small libaudit
part that this recipe is interested in. It doesn't seem worth the work
to make it all cross-compileable it in order to simply to enable a single perf feature.It may be that not much more is needed, but I did notice the same types of problems in other subdirs of the package when I neglected to filter them out. In any case, I will take another look and consider some of the things you mention below...
Quoted 10 lines
I understand there are examples of this type of patching in OE-Core, that does not mean they are good examples and they should probably be looked into for fixing also.
I know you have put effort in here, and we want to make sure the patches are correct and good example moving forward.
For example in the first build-lib-only patch you can just edit the SUBDIRS line to include lib.
Right, fixing the top-level Makefile.am was easy - changing the SUBDIRs line there was what I did in the -v0 branch, the more problematic case is the Makefile.am in /lib...
Quoted 4 lines
For the larger patch, are you selectively changing CCLD and CFLAGS or is it through out? You should probably build these -native and use them instead of trying to tweak around the target build.
Quoted 7 lines
Selectively, just for the gen_* programs which are used to generate tables and structs on the host.
I'll try the -native route instead, which does make sense as an alternative...
Thanks for the input..
Firstly, let me back Saul here, I am not taking changes to Makefile.in files which can't be generated from Makefile.am. Its a world of pain later and causes other problems. We're not going there.
Secondly, let me point you at the _FOR_BUILD macros. I've cc'd Ross who is probably our resident expert in this. And no, I've didn't know he could run like that either ;-).
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=85bfe3c931d7ef5ee461251abb6772564733e072
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=7ea8496ce085d507166efbd3a5e4d20444d3c35f
We fixed some issues in mesa-dri and gtk+ using techniques with these variables (all of which are now upstream in the appropriate sources).
Cheers,
Richard
Re: [PATCH 1/3] libaudit: new package
Quoted 135 lines · Richard Purdie
Quoted 118 lines · Tom Zanussi
Quoted 71 lines · Saul Wold
Quoted 60 lines · Tom Zanussi
Quoted 50 lines · Saul Wold
Quoted 20 lines · On 02/27/2013 07:00 AM, [email protected] wrote:
From: Tom Zanussi <[email protected]>
Add libaudit, used by system call auditing applications. From the sources:
"The audit package contains the user space utilities for storing and searching the audit records generate by the audit subsystem in the Linux 2.6 kernel."
Signed-off-by Tom Zanussi <[email protected]>--- .../libaudit/libaudit/build-lib-only.patch | 33 ++ .../libaudit/libaudit/fix-host-gen.patch | 461 +++++++++++++++++++++ meta/recipes-support/libaudit/libaudit_2.2.2.bb | 25 ++ 3 files changed, 519 insertions(+)create mode 100644
meta/recipes-support/libaudit/libaudit/build-lib-only.patchcreate mode 100644meta/recipes-support/libaudit/libaudit/fix-host-gen.patchcreate mode 100644 meta/recipes-support/libaudit/libaudit_2.2.2.bb<SNIP>
Quoted 26 lines
meta/recipes-support/libaudit/libaudit_2.2.2.bb new file +20
-0@@ -0,0 +1,25 @@ +DESCRIPTION = "libaudit is the dynamic library needed for applications to use the audit framework." +SECTION = "libs" +AUTHOR = "Steve Grubb <[email protected]>" +HOMEPAGE = "http://people.redhat.com/sgrubb/audit/" +LICENSE = "LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" +PR = "r0" + +SRC_URI = "http://people.redhat.com/sgrubb/audit/audit-${PV}.tar.gz \ + file://build-lib-only.patch \ + file://fix-host-gen.patch \ + " + +SRC_URI[md5sum] = "6641fde111cf5dfda6d4282ab8410df5" +SRC_URI[sha256sum] = "8bc2b45a5f08f5df6cebcd5543f24b7e68e28b64da4b23f08de2c6616384302b" + +S = "${WORKDIR}/audit-${PV}" + +inherit autotools +Quoted 8 lines
meta/recipes-support/libaudit/libaudit_2.2.2.bb line 25
Quoted 6 lines
meta/recipes-support/libaudit/libaudit_2.2.2.bb new file +5
-0+EXTRA_OECONF = "--disable-dependency-tracking --disable-listener" + +do_configure() { + oe_runconf +}Is this
do_configurereally needed? Does the autotools default not work correctly? And if not why not?Quoted 9 lines
This is to avoid the autoreconf step, which ends up overwriting the
lib/Makefile.inchanges when it regenerates it fromlib/Makefile.am.The Makefile.in is shipped with the source tarball, so I modified it directly instead of complicating things by trying to get autoreconf to generate the correct
Makefilefor the target part of the build vs these specific changes to Makefile.in for the set of programs generated to run on the host.Quoted 9 lines
Tom,
I understand your approach here and while it has good intentions, is not the right way to go about this. We want to enable upstream packages to cross compile (if they are open to the idea). So changing the Makefile.am would be the right way to do this and allow the standard automake and autoreconf to do their work. This would also allow the patches to be possibly accepted up stream.
OK, makes sense, I understand - I did actually try digging into this and to do it by targeting Makefile.am, but got bogged down in the details of figuring out how to get everything generated properly for the target and these special cases of these other programs generated for the host.
Also, any patch that would likely be accepted upstream would have to address everything in the audit package, not just the small libaudit
part that this recipe is interested in. It doesn't seem worth the work
to make it all cross-compileable it in order to simply to enable a single perf feature.It may be that not much more is needed, but I did notice the same types of problems in other subdirs of the package when I neglected to filter them out. In any case, I will take another look and consider some of the things you mention below...
Quoted 10 lines
I understand there are examples of this type of patching in OE-Core, that does not mean they are good examples and they should probably be looked into for fixing also.
I know you have put effort in here, and we want to make sure the patches are correct and good example moving forward.
For example in the first build-lib-only patch you can just edit the SUBDIRS line to include lib.
Right, fixing the top-level Makefile.am was easy - changing the SUBDIRs line there was what I did in the -v0 branch, the more problematic case is the Makefile.am in /lib...
Quoted 4 lines
For the larger patch, are you selectively changing CCLD and CFLAGS or is it through out? You should probably build these -native and use them instead of trying to tweak around the target build.
Quoted 7 lines
Selectively, just for the gen_* programs which are used to generate tables and structs on the host.
I'll try the -native route instead, which does make sense as an alternative...
Thanks for the input..
Firstly, let me back Saul here, I am not taking changes to Makefile.in files which can't be generated from Makefile.am. Its a world of pain later and causes other problems. We're not going there.
Secondly, let me point you at the
_FOR_BUILDmacros. I've cc'd Ross who is probably our resident expert in this. And no, I've didn't know he could run like that either ;-).
Quoted 6 lines
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=85bfe3c931d7ef5ee461251abb6772564733e072
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=7ea8496ce085d507166efbd3a5e4d20444d3c35fWe fixed some issues in mesa-dri and gtk+ using techniques with these variables (all of which are now upstream in the appropriate sources).
OK, thanks for that info. I think I have enough to go on to try to turn this into something upstreamable now...
Tom
Quoted 10 lines
Cheers,
Richard
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 1/3] libaudit: new package
Quoted 2 lines · Tom Zanussi
OK, thanks for that info. I think I have enough to go on to try to turn this into something upstreamable now...
Interestingly it appears that if you can mandate a new-enough automake you can actually override CC per-target these days, which does make things a lot easier.
Ross
Re: [PATCH 1/3] libaudit: new package
In reply to Richard PurdieQuoted 2 lines · Richard Purdie
We fixed some issues in mesa-dri and gtk+ using techniques with these variables (all of which are now upstream in the appropriate sources).
For reference here's the gtk+ work he landed upstream:
Quoted 5 lines · On Wed, Feb 27, 2013 at 10:00 AM, <[email protected]> wrote:
From: Tom Zanussi <[email protected]>
'perf-trace' is a new perf subcommand available in the 3.8 kernel - this patchset enables it. 'perf trace' requires libaudit, which is added as a new recipe.
(I'm just getting used to this workflow, so sorry if I've messed something up on my end)
When I try to build with just the following added to my conf/local.conf
IMAGE_INSTALL_append = " perf"
I get the following error:
Build Configuration:
BB_VERSION = "1.17.1" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "SUSE-LINUX-12.2" TARGET_SYS = "i586-poky-linux" MACHINE = "qemux86" DISTRO = "poky" DISTRO_VERSION = "1.3+snapshot-20130227" TUNE_FEATURES = "m32 i586" TARGET_FPU = ""
meta
meta-yocto
meta-yocto-bsp =
"tzanussi/perf-trace-v1:9f91a3a29701218dd756380ebcd2a1a32ad40615"
Computing transaction...error: Can't install perf-3.4-r9@qemux86: no package provides /bin/bash
ERROR: Function failed: do_rootfs
A message that is not in the archive (sent off-list or not yet received): 1361988753.1704.4.camel@empanada
Quoted 1 line · Tom Zanussi
Which image are you building? I'm guessing core-image-minimal?
Yes.
Quoted 26 lines · Trevor Woerner
Quoted 5 lines · On Wed, Feb 27, 2013 at 10:00 AM, <[email protected]> wrote:
From: Tom Zanussi <[email protected]>
'perf-trace' is a new perf subcommand available in the 3.8 kernel - this patchset enables it. 'perf trace' requires libaudit, which is added as a new recipe.
(I'm just getting used to this workflow, so sorry if I've messed something up on my end)
When I try to build with just the following added to my
conf/local.conf
IMAGE_INSTALL_append= " perf"I get the following error:
Build Configuration:
BB_VERSION = "1.17.1" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "SUSE-LINUX-12.2" TARGET_SYS = "i586-poky-linux" MACHINE = "qemux86" DISTRO = "poky" DISTRO_VERSION = "1.3+snapshot-20130227" TUNE_FEATURES = "m32 i586" TARGET_FPU = ""
Quoted 9 lines
meta
meta-yocto
meta-yocto-bsp =
"tzanussi/perf-trace-v1:9f91a3a29701218dd756380ebcd2a1a32ad40615"Computing transaction...error: Can't install perf-3.4-r9@qemux86: no package provides
/bin/bash
ERROR: Function failed:do_rootfs
Hmm, I didn't realize perf required 'bash' to build. I always build core-image-sato with tools-profile or the sdk image, and haven't seen this.
Which image are you building? I'm guessing core-image-minimal?
I think if perf doesn't build without bash, it should be considered a bug - core-image-minimal should be able to use perf.
Tom
Quoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Quoted 2 lines · On Wed, Feb 27, 2013 at 10:00 AM, <[email protected]> wrote:
'perf-trace' is a new perf subcommand available in the 3.8 kernel - this patchset enables it.
Out of curiosity, from where can I find the recipe(s) for a 3.8 kernel?
My meta/recipes-kernel/linux/ only includes:
linux-dummy.bb
linux-yocto-dev.bb
linux-yocto-rt_3.0.bb
linux-yocto-rt_3.2.bb
linux-yocto-rt_3.4.bb
linux-yocto-tiny_3.2.bb
linux-yocto-tiny_3.4.bb
linux-yocto_3.0.bb
linux-yocto_3.2.bb
linux-yocto_3.4.bbQuoted 7 lines · Trevor Woerner
Quoted 2 lines · On Wed, Feb 27, 2013 at 10:00 AM, <[email protected]> wrote:
'perf-trace' is a new perf subcommand available in the 3.8 kernel - this patchset enables it.
Out of curiosity, from where can I find the recipe(s) for a 3.8 kernel?
My meta/recipes-kernel/linux/ only includes:
Quoted 11 lines
linux-dummy.bb
linux-yocto-dev.bb
linux-yocto-rt_3.0.bb
linux-yocto-rt_3.2.bb
linux-yocto-rt_3.4.bb
linux-yocto-tiny_3.2.bb
linux-yocto-tiny_3.4.bb
linux-yocto_3.0.bb
linux-yocto_3.2.bb
linux-yocto_3.4.bbThe 3.8 kernel recipes were posted last night and haven't been merged yet, so you'd have to apply them yourself..
Tom
Quoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Hello,
perf-trace requires libaudit, but there is still no support for it integrated into openembedded, although a patch has been suggested quite a while ago. It would still be great to see that being implemented.
Thanks
Christian