Re: [PATCH] perf: install trace-event plugins

2014-06-03 Thread Josh Boyer
On Mon, Jun 2, 2014 at 3:11 PM, Kyle McMartin kmcma...@redhat.com wrote:
 perf hardcodes $libdir to be lib for all but x86_64, so kludge around it
 until upstream gets their act together.

Nice.  Thanks Kyle.  I'll get this in today.

josh


 --kyle

 diff --git a/kernel.spec b/kernel.spec
 index fbfa738..bee43f2 100644
 --- a/kernel.spec
 +++ b/kernel.spec
 @@ -641,6 +641,8 @@ Patch25071: 
 s390-appldata-add-slab.h-for-kzalloc-kfree.patch
  # CVE-2014-3917 rhbz 1102571 1102715
  Patch25093: auditsc-audit_krule-mask-accesses-need-bounds-checking.patch

 +Patch26000: perf-lib64.patch
 +
  # END OF PATCH DEFINITIONS

  %endif
 @@ -723,7 +725,7 @@ This package provides debug information for the perf 
 package.
  # symlinks because of the trailing nonmatching alternation and
  # the leading .*, because of find-debuginfo.sh's buggy handling
  # of matching the pattern against the symlinks file.
 -%{expand:%%global debuginfo_args %{?debuginfo_args} -p 
 '.*%%{_bindir}/perf(\.debug)?|.*%%{_libexecdir}/perf-core/.*|XXX' -o 
 perf-debuginfo.list}
 +%{expand:%%global debuginfo_args %{?debuginfo_args} -p 
 '.*%%{_bindir}/perf(\.debug)?|.*%%{_libexecdir}/perf-core/.*|.*%%{_libdir}/traceevent/plugins/.*|XXX'
  -o perf-debuginfo.list}

  %package -n python-perf
  Summary: Python bindings for apps which will manipulate perf events
 @@ -1358,6 +1360,8 @@ ApplyPatch 
 s390-appldata-add-slab.h-for-kzalloc-kfree.patch
  # CVE-2014-3917 rhbz 1102571 1102715
  ApplyPatch auditsc-audit_krule-mask-accesses-need-bounds-checking.patch

 +ApplyPatch perf-lib64.patch
 +
  # END OF PATCH APPLICATIONS

  %endif
 @@ -1893,7 +1897,7 @@ find $RPM_BUILD_ROOT/usr/include \

  %if %{with_perf}
  # perf tool binary and supporting scripts/binaries
 -%{perf_make} DESTDIR=$RPM_BUILD_ROOT install-bin
 +%{perf_make} DESTDIR=$RPM_BUILD_ROOT MULTILIBDIR=%{_lib} install-bin 
 install-traceevent-plugins
  # remove the 'trace' symlink.
  rm -f %{buildroot}%{_bindir}/trace

 @@ -2092,6 +2096,8 @@ fi
  %files -n perf
  %defattr(-,root,root)
  %{_bindir}/perf
 +%dir %{_libdir}/traceevent/plugins
 +%{_libdir}/traceevent/plugins/*
  %dir %{_libexecdir}/perf-core
  %{_libexecdir}/perf-core/*
  %{_mandir}/man[1-8]/perf*
 diff --git a/perf-lib64.patch b/perf-lib64.patch
 new file mode 100644
 index 000..3e3a33e
 --- /dev/null
 +++ b/perf-lib64.patch
 @@ -0,0 +1,17 @@
 +diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
 +index 802cf54..7f30bfa 100644
 +--- a/tools/perf/config/Makefile
  b/tools/perf/config/Makefile
 +@@ -621,8 +621,12 @@ endif
 + ifeq ($(IS_X86_64),1)
 + lib = lib64
 + else
 ++ifdef MULTILIBDIR
 ++lib = $(MULTILIBDIR)
 ++else
 + lib = lib
 + endif
 ++endif
 + libdir = $(prefix)/$(lib)
 +
 + # Shell quote (do not use $(call) to accommodate ancient setups);
 ___
 kernel mailing list
 kernel@lists.fedoraproject.org
 https://admin.fedoraproject.org/mailman/listinfo/kernel
___
kernel mailing list
kernel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/kernel

Re: [PATCH] perf: install trace-event plugins

2014-06-03 Thread Kyle McMartin
On Tue, Jun 03, 2014 at 07:54:03AM -0400, Josh Boyer wrote:
 On Mon, Jun 2, 2014 at 3:11 PM, Kyle McMartin kmcma...@redhat.com wrote:
  perf hardcodes $libdir to be lib for all but x86_64, so kludge around it
  until upstream gets their act together.
 
 Nice.  Thanks Kyle.  I'll get this in today.
 

I'll try to dream up something saner for upstream... Basically all this
perf machinery is junk and they've gone and reinvented autoconf with
less features... I don't know for example how Debian which installs into
multilib triplet dirs /usr/lib/i386-linux-gnu/*.so is going to handle
this besides doing something similar... :/

--Kyle

 josh
 
 
  --kyle
 
  diff --git a/kernel.spec b/kernel.spec
  index fbfa738..bee43f2 100644
  --- a/kernel.spec
  +++ b/kernel.spec
  @@ -641,6 +641,8 @@ Patch25071: 
  s390-appldata-add-slab.h-for-kzalloc-kfree.patch
   # CVE-2014-3917 rhbz 1102571 1102715
   Patch25093: auditsc-audit_krule-mask-accesses-need-bounds-checking.patch
 
  +Patch26000: perf-lib64.patch
  +
   # END OF PATCH DEFINITIONS
 
   %endif
  @@ -723,7 +725,7 @@ This package provides debug information for the perf 
  package.
   # symlinks because of the trailing nonmatching alternation and
   # the leading .*, because of find-debuginfo.sh's buggy handling
   # of matching the pattern against the symlinks file.
  -%{expand:%%global debuginfo_args %{?debuginfo_args} -p 
  '.*%%{_bindir}/perf(\.debug)?|.*%%{_libexecdir}/perf-core/.*|XXX' -o 
  perf-debuginfo.list}
  +%{expand:%%global debuginfo_args %{?debuginfo_args} -p 
  '.*%%{_bindir}/perf(\.debug)?|.*%%{_libexecdir}/perf-core/.*|.*%%{_libdir}/traceevent/plugins/.*|XXX'
   -o perf-debuginfo.list}
 
   %package -n python-perf
   Summary: Python bindings for apps which will manipulate perf events
  @@ -1358,6 +1360,8 @@ ApplyPatch 
  s390-appldata-add-slab.h-for-kzalloc-kfree.patch
   # CVE-2014-3917 rhbz 1102571 1102715
   ApplyPatch auditsc-audit_krule-mask-accesses-need-bounds-checking.patch
 
  +ApplyPatch perf-lib64.patch
  +
   # END OF PATCH APPLICATIONS
 
   %endif
  @@ -1893,7 +1897,7 @@ find $RPM_BUILD_ROOT/usr/include \
 
   %if %{with_perf}
   # perf tool binary and supporting scripts/binaries
  -%{perf_make} DESTDIR=$RPM_BUILD_ROOT install-bin
  +%{perf_make} DESTDIR=$RPM_BUILD_ROOT MULTILIBDIR=%{_lib} install-bin 
  install-traceevent-plugins
   # remove the 'trace' symlink.
   rm -f %{buildroot}%{_bindir}/trace
 
  @@ -2092,6 +2096,8 @@ fi
   %files -n perf
   %defattr(-,root,root)
   %{_bindir}/perf
  +%dir %{_libdir}/traceevent/plugins
  +%{_libdir}/traceevent/plugins/*
   %dir %{_libexecdir}/perf-core
   %{_libexecdir}/perf-core/*
   %{_mandir}/man[1-8]/perf*
  diff --git a/perf-lib64.patch b/perf-lib64.patch
  new file mode 100644
  index 000..3e3a33e
  --- /dev/null
  +++ b/perf-lib64.patch
  @@ -0,0 +1,17 @@
  +diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
  +index 802cf54..7f30bfa 100644
  +--- a/tools/perf/config/Makefile
   b/tools/perf/config/Makefile
  +@@ -621,8 +621,12 @@ endif
  + ifeq ($(IS_X86_64),1)
  + lib = lib64
  + else
  ++ifdef MULTILIBDIR
  ++lib = $(MULTILIBDIR)
  ++else
  + lib = lib
  + endif
  ++endif
  + libdir = $(prefix)/$(lib)
  +
  + # Shell quote (do not use $(call) to accommodate ancient setups);
  ___
  kernel mailing list
  kernel@lists.fedoraproject.org
  https://admin.fedoraproject.org/mailman/listinfo/kernel
___
kernel mailing list
kernel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/kernel

Re: [PATCH] perf: install trace-event plugins

2014-06-03 Thread Don Zickus
On Mon, Jun 02, 2014 at 03:11:01PM -0400, Kyle McMartin wrote:
 perf hardcodes $libdir to be lib for all but x86_64, so kludge around it
 until upstream gets their act together.

Did you post this upstream too?

Cheers,
Don

 
 --kyle
 
 diff --git a/kernel.spec b/kernel.spec
 index fbfa738..bee43f2 100644
 --- a/kernel.spec
 +++ b/kernel.spec
 @@ -641,6 +641,8 @@ Patch25071: 
 s390-appldata-add-slab.h-for-kzalloc-kfree.patch
  # CVE-2014-3917 rhbz 1102571 1102715
  Patch25093: auditsc-audit_krule-mask-accesses-need-bounds-checking.patch
  
 +Patch26000: perf-lib64.patch
 +
  # END OF PATCH DEFINITIONS
  
  %endif
 @@ -723,7 +725,7 @@ This package provides debug information for the perf 
 package.
  # symlinks because of the trailing nonmatching alternation and
  # the leading .*, because of find-debuginfo.sh's buggy handling
  # of matching the pattern against the symlinks file.
 -%{expand:%%global debuginfo_args %{?debuginfo_args} -p 
 '.*%%{_bindir}/perf(\.debug)?|.*%%{_libexecdir}/perf-core/.*|XXX' -o 
 perf-debuginfo.list}
 +%{expand:%%global debuginfo_args %{?debuginfo_args} -p 
 '.*%%{_bindir}/perf(\.debug)?|.*%%{_libexecdir}/perf-core/.*|.*%%{_libdir}/traceevent/plugins/.*|XXX'
  -o perf-debuginfo.list}
  
  %package -n python-perf
  Summary: Python bindings for apps which will manipulate perf events
 @@ -1358,6 +1360,8 @@ ApplyPatch 
 s390-appldata-add-slab.h-for-kzalloc-kfree.patch
  # CVE-2014-3917 rhbz 1102571 1102715
  ApplyPatch auditsc-audit_krule-mask-accesses-need-bounds-checking.patch
  
 +ApplyPatch perf-lib64.patch
 +
  # END OF PATCH APPLICATIONS
  
  %endif
 @@ -1893,7 +1897,7 @@ find $RPM_BUILD_ROOT/usr/include \
  
  %if %{with_perf}
  # perf tool binary and supporting scripts/binaries
 -%{perf_make} DESTDIR=$RPM_BUILD_ROOT install-bin
 +%{perf_make} DESTDIR=$RPM_BUILD_ROOT MULTILIBDIR=%{_lib} install-bin 
 install-traceevent-plugins
  # remove the 'trace' symlink.
  rm -f %{buildroot}%{_bindir}/trace
  
 @@ -2092,6 +2096,8 @@ fi
  %files -n perf
  %defattr(-,root,root)
  %{_bindir}/perf
 +%dir %{_libdir}/traceevent/plugins
 +%{_libdir}/traceevent/plugins/*
  %dir %{_libexecdir}/perf-core
  %{_libexecdir}/perf-core/*
  %{_mandir}/man[1-8]/perf*
 diff --git a/perf-lib64.patch b/perf-lib64.patch
 new file mode 100644
 index 000..3e3a33e
 --- /dev/null
 +++ b/perf-lib64.patch
 @@ -0,0 +1,17 @@
 +diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
 +index 802cf54..7f30bfa 100644
 +--- a/tools/perf/config/Makefile
  b/tools/perf/config/Makefile
 +@@ -621,8 +621,12 @@ endif
 + ifeq ($(IS_X86_64),1)
 + lib = lib64
 + else
 ++ifdef MULTILIBDIR
 ++lib = $(MULTILIBDIR)
 ++else
 + lib = lib
 + endif
 ++endif
 + libdir = $(prefix)/$(lib)
 + 
 + # Shell quote (do not use $(call) to accommodate ancient setups);
 ___
 kernel mailing list
 kernel@lists.fedoraproject.org
 https://admin.fedoraproject.org/mailman/listinfo/kernel
___
kernel mailing list
kernel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/kernel

Re: [PATCH] perf: install trace-event plugins

2014-06-03 Thread Josh Boyer
On Tue, Jun 3, 2014 at 2:45 PM, Don Zickus dzic...@redhat.com wrote:
 On Mon, Jun 02, 2014 at 03:11:01PM -0400, Kyle McMartin wrote:
 perf hardcodes $libdir to be lib for all but x86_64, so kludge around it
 until upstream gets their act together.

 Did you post this upstream too?

Read later in the thread.  He said he wants to come up with something
better for upstream.

josh
___
kernel mailing list
kernel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/kernel

Re: [PATCH] perf: install trace-event plugins

2014-06-03 Thread Kyle McMartin
On Tue, Jun 03, 2014 at 03:28:41PM -0400, Don Zickus wrote:
 On Tue, Jun 03, 2014 at 02:46:39PM -0400, Josh Boyer wrote:
  On Tue, Jun 3, 2014 at 2:45 PM, Don Zickus dzic...@redhat.com wrote:
   On Mon, Jun 02, 2014 at 03:11:01PM -0400, Kyle McMartin wrote:
   perf hardcodes $libdir to be lib for all but x86_64, so kludge around it
   until upstream gets their act together.
  
   Did you post this upstream too?
  
  Read later in the thread.  He said he wants to come up with something
  better for upstream.
 
 I saw the part about 'dreaming up something better' and figured if a
 couple of beers can't conjure up an idea, Kyle would move on to more
 exciting things. :-p
 
 I figured if he poked upstream about it, they might be able to fix it
 faster.
 
 Regardless, I poked Jiri Olsa about it and he isn't familar enough with
 multilib to know how to fix it correctly.  There isn't some doc floating
 around with best multilib practices or something is there?
 

Well, the canonical answer would be to stop trying to poorly reinvent
something awful, ie: autoconf, which already allows distros to set all
this stuff in a standard way... For example, the stuff in
/usr/lib/rpm/redhat/macros:%configure which lets us muck with $libdir
and jazz.

libdir is really the only thing with variation across distros that can't
be handled in other ways, since the paths get hardcoded.

--Kyle
___
kernel mailing list
kernel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/kernel