William Cohen | 14 Mar 2012 21:21
Picon
Favicon

Revisions to the libpfm rpm spec file

Hi,

I took a look at the rpm spec file for libpfm in the libpfm-4.2.0.tar.gz. Attached is the revised version:

-Allow the python support to be include or excluded from rpmbuild
-change spec file name to libpfm.spec (no need for the '4' in there)
-adjust summary and line lengths (no '.' and limit length of lines)
-allow parallel makes of libpfm
-avoid having libpfm-devel own man3 directory
-proper version information in changelog

-Will
%{!?with_python: %global with_python 1}
%define python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")
%define python_prefix %(python -c "import sys; print sys.prefix")

Name:		libpfm
Version:	4.2.0
Release:	2%{?dist}

Summary:	Library to encode performance events for use by perf tool

Group:		System Environment/Libraries
License:	MIT
URL:		http://perfmon2.sourceforge.net/
Source0:	http://sourceforge.net/projects/perfmon2/files/libpfm4/%{name}-%{version}.tar.gz
%if %{with_python}
BuildRequires:	python-devel
(Continue reading)

stephane eranian | 15 Mar 2012 17:51

Re: Revisions to the libpfm rpm spec file

Patch applied.
Please pull and verifies that it works for you.
Thanks.

On Wed, Mar 14, 2012 at 9:21 PM, William Cohen <wcohen <at> redhat.com> wrote:
> Hi,
>
> I took a look at the rpm spec file for libpfm in the libpfm-4.2.0.tar.gz. Attached is the revised version:
>
> -Allow the python support to be include or excluded from rpmbuild
> -change spec file name to libpfm.spec (no need for the '4' in there)
> -adjust summary and line lengths (no '.' and limit length of lines)
> -allow parallel makes of libpfm
> -avoid having libpfm-devel own man3 directory
> -proper version information in changelog
>
> -Will
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> perfmon2-devel mailing list
> perfmon2-devel <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perfmon2-devel
>

------------------------------------------------------------------------------
(Continue reading)

William Cohen | 15 Mar 2012 19:37
Picon
Favicon

Re: Revisions to the libpfm rpm spec file

On 03/15/2012 12:51 PM, stephane eranian wrote:
> Patch applied.
> Please pull and verifies that it works for you.
> Thanks.
> 
> On Wed, Mar 14, 2012 at 9:21 PM, William Cohen <wcohen <at> redhat.com> wrote:
>> Hi,
>>
>> I took a look at the rpm spec file for libpfm in the libpfm-4.2.0.tar.gz. Attached is the revised version:
>>
>> -Allow the python support to be include or excluded from rpmbuild
>> -change spec file name to libpfm.spec (no need for the '4' in there)
>> -adjust summary and line lengths (no '.' and limit length of lines)
>> -allow parallel makes of libpfm
>> -avoid having libpfm-devel own man3 directory
>> -proper version information in changelog
>>
>> -Will

Hi Stephane,

The spec file change works fine.  I was able to build the rpms with:

git archive --prefix=libpfm-4.2.0/ --format=tar HEAD | gzip > libpfm-4.2.0.tar.gz
rpmbuild -ta libpfm-4.2.0.tar.gz

-Will

------------------------------------------------------------------------------
This SF email is sponsosred by:
(Continue reading)

William Cohen | 28 Mar 2012 22:56
Picon
Favicon

Re: Revisions to the libpfm rpm spec file

On 03/15/2012 02:37 PM, William Cohen wrote:
> On 03/15/2012 12:51 PM, stephane eranian wrote:
>> Patch applied.
>> Please pull and verifies that it works for you.
>> Thanks.
>>
>> On Wed, Mar 14, 2012 at 9:21 PM, William Cohen <wcohen <at> redhat.com> wrote:
>>> Hi,
>>>
>>> I took a look at the rpm spec file for libpfm in the libpfm-4.2.0.tar.gz. Attached is the revised version:
>>>
>>> -Allow the python support to be include or excluded from rpmbuild
>>> -change spec file name to libpfm.spec (no need for the '4' in there)
>>> -adjust summary and line lengths (no '.' and limit length of lines)
>>> -allow parallel makes of libpfm
>>> -avoid having libpfm-devel own man3 directory
>>> -proper version information in changelog
>>>
>>> -Will
> 
> Hi Stephane,
> 
> The spec file change works fine.  I was able to build the rpms with:
> 
> git archive --prefix=libpfm-4.2.0/ --format=tar HEAD | gzip > libpfm-4.2.0.tar.gz
> rpmbuild -ta libpfm-4.2.0.tar.gz
> 
> 
> -Will

(Continue reading)

Arun Sharma | 20 Apr 2012 02:41

Re: Revisions to the libpfm rpm spec file

On Wed, Mar 28, 2012 at 1:56 PM, William Cohen <wcohen <at> redhat.com> wrote:
> libpfm-python.x86_64: E: non-executable-script
/usr/lib64/python2.6/site-packages/perfmon/pmu.py 0644L /usr/bin/env
> libpfm-python.x86_64: E: non-executable-script
/usr/lib64/python2.6/site-packages/perfmon/session.py 0644L /usr/bin/env
>
> Should those .py files in libpfm-4.2.0/python/src  be executable or should the /usr/bin/env be
removed from them?

session.py should not be executable.

pmu.py can be a useful script - we should probably move the "if
__name__ == '__main__':" hunk into a script of its own if you decide
to make it executable.

 -Arun

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel
stephane eranian | 24 Apr 2012 13:12

Re: Revisions to the libpfm rpm spec file

Arun, Will,

Please submit a patch to fix these Python issues.
thanks.

On Fri, Apr 20, 2012 at 2:41 AM, Arun Sharma <arun <at> sharma-home.net> wrote:
> On Wed, Mar 28, 2012 at 1:56 PM, William Cohen <wcohen <at> redhat.com> wrote:
>> libpfm-python.x86_64: E: non-executable-script
/usr/lib64/python2.6/site-packages/perfmon/pmu.py 0644L /usr/bin/env
>> libpfm-python.x86_64: E: non-executable-script
/usr/lib64/python2.6/site-packages/perfmon/session.py 0644L /usr/bin/env
>>
>> Should those .py files in libpfm-4.2.0/python/src  be executable or should the /usr/bin/env be
removed from them?
>
> session.py should not be executable.
>
> pmu.py can be a useful script - we should probably move the "if
> __name__ == '__main__':" hunk into a script of its own if you decide
> to make it executable.
>
>  -Arun
>
> ------------------------------------------------------------------------------
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> _______________________________________________
> perfmon2-devel mailing list
(Continue reading)

William Cohen | 24 Apr 2012 15:51
Picon
Favicon

Re: Revisions to the libpfm rpm spec file

On 04/19/2012 08:41 PM, Arun Sharma wrote:
> On Wed, Mar 28, 2012 at 1:56 PM, William Cohen <wcohen <at> redhat.com> wrote:
>> libpfm-python.x86_64: E: non-executable-script
/usr/lib64/python2.6/site-packages/perfmon/pmu.py 0644L /usr/bin/env
>> libpfm-python.x86_64: E: non-executable-script
/usr/lib64/python2.6/site-packages/perfmon/session.py 0644L /usr/bin/env
>>
>> Should those .py files in libpfm-4.2.0/python/src  be executable or should the /usr/bin/env be removed
from them?
> 
> session.py should not be executable.
> 
> pmu.py can be a useful script - we should probably move the "if
> __name__ == '__main__':" hunk into a script of its own if you decide
> to make it executable.
> 
>  -Arun

Hi Arun,

I don't have much experience with python and I am not that familiar with how these scripts are suppose to be
used.  Is there some description how these are suppose to be used?

-Will

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
(Continue reading)

Arun Sharma | 24 Apr 2012 22:12

Re: Revisions to the libpfm rpm spec file

On Tue, Apr 24, 2012 at 6:51 AM, William Cohen <wcohen <at> redhat.com> wrote:
> Hi Arun,
>
> I don't have much experience with python and I am not that familiar with how these scripts are suppose to be
used.  Is there some description how these are suppose to be used?

If everything works fine, you should be able to run:

cd python
./setup.py install
./self.py -> self counting
./sys.py  -> system wide counting

These are counting-only interfaces to perf_event_open() syscall, with
libpfm4 being used to fill up perf_event_attr.

Arnaldo (acme <at> redhat.com) has also been working on a python interface
to perf (tools/perf/python/twatch.py in the kernel git tree). That is
a higher level interface, but doesn't lookup libpfm4.

 -Arun

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
perfmon2-devel mailing list
(Continue reading)


Gmane