Bug 483615 - Review Request: CodeAnalyst-gui - Performance Analysis Suite for AMD-based System (based on Oprofile)
Review Request: CodeAnalyst-gui - Performance Analysis Suite for AMD-based Sy...
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Parag AN(पराग)
Fedora Extras Quality Assurance
:
: 483320 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-02 11:25 EST by Suravee Suthikulpanit
Modified: 2009-07-08 12:37 EDT (History)
4 users (show)

See Also:
Fixed In Version: 2.8.38-9.fc10
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-03-16 16:57:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
panemade: fedora‑review+
tibbs: fedora‑cvs-


Attachments (Terms of Use)
Spec file for CodeAnalyst-gui-2.8.38-5.fc11 (5.38 KB, application/octet-stream)
2009-03-05 02:35 EST, Suravee Suthikulpanit
no flags Details

  None (edit)
Description Suravee Suthikulpanit 2009-02-02 11:25:32 EST
Spec URL: Need hosting space
SRPM URL: Need hosting space
Description:
CodeAnalyst is a performance analysis suite. It provids graphical 
utilitys for running Oprofile, and analyzing result on AMD-based systems. 
CodeAnalyst includes several features to aid profile analysis such as 
inline-function analysis, code-block analysis, and a utility for 
profile comparison, DiffAnalayst.

This is my first package, and I am seeking a sponsor.
Comment 2 Parag AN(पराग) 2009-02-03 00:00:10 EST
Welcome to Fedora Project.
You first need to learn Fedora Packaging Guidelines. See http://fedoraproject.org/wiki/PackagingGuidelines

Read this carefully and you will find many changed needed to your SPEC to follow fedora packaging guidelines.
Feel free to ask any questions on #fedora-devel on Freenode or fedora-devel mailing list or ask here.

Also, you should look into
http://fedoraproject.org/wiki/PackageMaintainers/HowToGetSponsored

You need to do 2 things
1) submit some more packages with enough packaging quality.
2) start doing pre-reviews of packages from queue
http://fedoraproject.org/PackageReviewStatus/NEW.html
  Note that as you are not sponsored yet, you should only do unofficial
pre-reviews where you only comments review and can not able to accept package.
  This will ensure that you have got sufficient understanding of rpm packaging
and also review process.
  Don't forget to comment bug numbers here when you do some pre-reviews.

Take help of following links while posting reviews.
http://fedoraproject.org/wiki/Packaging/ReviewGuidelines
http://fedoraproject.org/wiki/PackagingGuidelines
Comment 3 Susi Lehtola 2009-02-03 04:36:48 EST
*** Bug 483320 has been marked as a duplicate of this bug. ***
Comment 4 Suravee Suthikulpanit 2009-02-10 18:39:03 EST
I have posted the new SRPM and specfile here:

Spec URL:
http://ftp-developer.amd.com/user/ssuthiku/CodeAnalyst-2.8.38-0.fc10/CodeAnalyst-gui.spec

SRPM URL:
http://ftp-developer.amd.com/user/ssuthiku/CodeAnalyst-2.8.38-0.fc10/CodeAnalyst-gui-2.8.38-0.fc10.src.rpm

In this revision, I have made several changes to comply with the Fedora Packaging Guideline.

# rpmlint ~/rpmbuild/SRPMS/CodeAnalyst-gui-2.8.38-0.fc10.src.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

I am in the process of uploading the tarballs (CodeAnalyst-gui-2.8.38.tar.gz)and md5sum (CodeAnalyst-gui-2.8.38.md5), and licensing file onto the AMD Developer Central (as upstream code). I will notify once the action is complete.
Comment 5 Parag AN(पराग) 2009-02-12 05:52:04 EST
1)Avoid use of hash in spec file it looks complicated to me.
2)desktop file should be installed using desktop-file-install command
remove desktop-file-validate command lines in SPEC

3) .so files must go to separate -devel subpackage. See 
http://fedoraproject.org/wiki/PackagingGuidelines#Devel_Packages

4) buildroot value not as per given at http://fedoraproject.org/wiki/PackagingGuidelines#BuildRoot_tag

5) any reason to change tarball name from CodeAnalyst to 
CodeAnalyst-gui?

6)You need to use any value from $RPM_OPT_FLAGS %{optflags} not both see http://fedoraproject.org/wiki/PackagingGuidelines#Using_.25.7Bbuildroot.7D_and_.25.7Boptflags.7D_vs_.24RPM_BUILD_ROOT_and_.24RPM_OPT_FLAGS

7) When I fix above problems locally on my machine and built rpm, I used rpmlint on binary package where I see some messages related to init script reported as
rpmlint -iv /usr/src/redhat/RPMS/i386/CodeAnalyst-gui-2.8.38-0.fc10.i386.rpm

CodeAnalyst-gui.i386: W: service-default-enabled /etc/rc.d/init.d/codeanalyst_init
===>The service is enabled by default after "chkconfig --add"; for security
reasons, most services should not be. Use "-" as the default runlevel in the
init script's "chkconfig:" line and/or remove the "Default-Start:" LSB keyword
to fix this if appropriate for this service.

CodeAnalyst-gui.i386: E: subsys-not-used /etc/rc.d/init.d/codeanalyst_init
===>While your daemon is running, you have to put a lock file in
/var/lock/subsys/. To see an example, look at this directory on your machine
and examine the corresponding init scripts.

CodeAnalyst-gui.i386: W: incoherent-init-script-name codeanalyst_init
==>The init script name should be the same as the package name in lower case, or
one with 'd' appended if it invokes a process by that name.

8)Every time you change in SPEC update Release to next number e.g. now you should change it to 1. Add changelog what you changed in SPEC for this -1 release
Then submit this new package for further review.
Comment 6 Suravee Suthikulpanit 2009-02-12 11:20:28 EST
Responding to Comment #5:

1) ### which were used to partition b/w different group of macro is now removed.

2) desktop-file-validate command has been removed

3) CodeAnalyst needs these .so files for running.  However, I will add the version for these shared library and clean up the installation.

4) The buildroot value is now fixed.

5) Generally, CodeAnalyst package (upstream) distributes not only the GUI, but also the modified-oprofile commandline tools and oprofile daemon.  Since the package here distributes only the GUI, the name is changed to communicate the difference.

6) We will be using only $RPM_OPT_FLAGS.

7) I will get back with the fix detail.

8) Bump the version due to changes in the CodeAnalyst and not just the packaging related changes.  From now on, I will keep the version number fixed until next version changes.

Thank you for your time.
Comment 7 Suravee Suthikulpanit 2009-02-12 15:24:02 EST
Responding to Comment #5

7) I have added the /var/lock/subsys/codeanalyst which is created after the service is started, and removed when stopped.  I also change the name of the service to "/etc/init.d/codeanalyst".

Regarding the warning "service-default-enabled", codeanalyst service requires root to start/stop.  Without the default runlevel information, non-root users cannot run the profile after the system is rebooted.  However, we do not attempt to start after the package installation or upgrade as stated in http://fedoraproject.org/wiki/Packaging/SysVInitScript#Why_don.27t_we....

Please let me know if this post a problem.

Suravee
Comment 8 Suravee Suthikulpanit 2009-02-16 15:46:20 EST
I have posted the new SRPM and specfile here:

Spec URL:
http://ftp-developer.amd.com/user/ssuthiku/CodeAnalyst-gui-2.8.38-1.fc10/CodeAnalyst-gui.spec

SRPM URL:
http://ftp-developer.amd.com/user/ssuthiku/CodeAnalyst-gui-2.8.38-1.fc10/CodeAnalyst-gui-2.8.38-1.fc10.src.rpm

I have added the suggestions in comment 5-7 in this release. Please see the changelog in spec file for more information.

Thank you,

Suravee
Comment 9 Suravee Suthikulpanit 2009-02-19 15:07:25 EST
I have posted the new SRPM and spec files here:

Spec URL:
http://ftp-developer.amd.com/user/ssuthiku/CodeAnalyst-gui-2.8.38-2.fc11/CodeAnalyst-gui.spec

SRPM URL:
http://ftp-developer.amd.com/user/ssuthiku/CodeAnalyst-gui-2.8.38-2.fc11/CodeAnalyst-gui-2.8.38-2.fc11.src.rpm
(From a scratch build against fc11 on Koji http://koji.fedoraproject.org/koji/taskinfo?taskID=1140372) 

rpmlint output:
# rpmlint CodeAnalyst-gui-2.8.38-2.fc11.src.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

# rpmlint CodeAnalyst-gui-2.8.38-2.fc11.x86_64.rpm 
CodeAnalyst-gui.x86_64: W: service-default-enabled /etc/rc.d/init.d/codeanalyst
CodeAnalyst-gui.x86_64: W: service-default-enabled /etc/rc.d/init.d/codeanalyst
CodeAnalyst-gui.x86_64: W: incoherent-init-script-name codeanalyst
1 packages and 0 specfiles checked; 0 errors, 3 warnings.

- The first two warnings is explained in "comment #5" above.
- The third warning complains about the naming of "/etc/rc.d/init.d/codeanalyst" script, and suggesting that it should be changed to "codeanalyst-gui" to match the package name.  However, I would like to keep this name as it does not make sense to name the script "codeanalyst-gui" to match the package name. This script is also used in the upstream CodeAnalyst distribution. The reason I name the package "CodeAnalyst-gui" is to differentiate the normal CodeAnalyst distribution which contains other components such as a modified version of Oprofile and the kernel modules.

- The upstream tarball is now available at (http://developer.amd.com/media/CALinuxSnapshot/CodeAnalyst-gui-2.8.38.tar.gz)

Thank you,

Suravee
Comment 10 Suravee Suthikulpanit 2009-03-02 00:29:46 EST
Help review Bug 487007 (https://bugzilla.redhat.com/show_bug.cgi?id=487007)
Comment 11 Suravee Suthikulpanit 2009-03-02 11:14:40 EST
Help review Bug 486584 (https://bugzilla.redhat.com/show_bug.cgi?id=486584)
Comment 12 Suravee Suthikulpanit 2009-03-02 13:22:59 EST
Help review BUG 487587 (https://bugzilla.redhat.com/show_bug.cgi?id=487587)
Comment 13 Suravee Suthikulpanit 2009-03-02 15:56:30 EST
Help review BUG 487067 (https://bugzilla.redhat.com/show_bug.cgi?id=487067)
Comment 14 Suravee Suthikulpanit 2009-03-02 19:22:56 EST
I have posted the new SRPM and spec files here:

Spec URL:
http://ftp-developer.amd.com/user/ssuthiku/CodeAnalyst-gui-2.8.38-3.fc11/CodeAnalyst-gui.spec

SRPM URL:
http://ftp-developer.amd.com/user/ssuthiku/CodeAnalyst-gui-2.8.38-3.fc11/CodeAnalyst-gui-2.8.38-3.fc11.src.rpm
(From a scratch build against fc11 on Koji
http://koji.fedoraproject.org/koji/taskinfo?taskID=1215141)

In this release, I have cleaned up spec file to make it easy to read and maintain.  Rpmlint output is still the same as in comment #9.
Comment 15 Parag AN(पराग) 2009-03-03 00:59:03 EST
Nice to see you are doing reviews. I will take 2 days to review your package. Till then keep reviewing. I will Sponsor you.
Comment 16 Suravee Suthikulpanit 2009-03-03 13:36:29 EST
Help review BUG 488198 (https://bugzilla.redhat.com/show_bug.cgi?id=488198)
Comment 17 Suravee Suthikulpanit 2009-03-03 17:30:51 EST
Parag,

Thank you for your time. I also found some useful tips in the Packaging Note on you wiki page.  One of them is using the $DESTDIR to specify the $RPM_BUILD_ROOT during installation.  Therefore, I am making some changes since this is much cleaner than the code in revision 3. I hope this would not interrupting your review.

I have posted the new SRPM and spec files here:

Spec URL:
http://ftp-developer.amd.com/user/ssuthiku/CodeAnalyst-gui-2.8.38-4.fc11/CodeAnalyst-gui.spec

SRPM URL:
http://ftp-developer.amd.com/user/ssuthiku/CodeAnalyst-gui-2.8.38-4.fc11/CodeAnalyst-gui-2.8.38-4.fc11.src.rpm
(From a scratch build against fc11 on Koji
http://koji.fedoraproject.org/koji/taskinfo?taskID=1217770)

Changes:
- Using "%configure" macro instead of "./configure".
- Using DESTDIR variable instead of the $prefix and $libdir variable during installation. This requires adding the patch01 (ca-destdir.patch).
- Clean up the file.
Comment 18 Parag AN(पराग) 2009-03-04 04:22:22 EST
* When using "cp" or "install" commands, add "-p" option
  to keep timestamps on installed files:
  https://fedoraproject.org/wiki/Packaging/Guidelines#Timestamps

* Any reason for not using service command to %preun?
 see https://fedoraproject.org/wiki/Packaging/SysVInitScripts#Initscripts_in_spec_file_scriptlets

* I see many files installed in /usr/share/codeanalyst/doc/cadoc
  how about creating new subpackage as given at http://fedoraproject.org/wiki/PackagingGuidelines#Documentation
Comment 19 Suravee Suthikulpanit 2009-03-04 15:14:56 EST
Parag, 

I will make the changes as you recommend in the first two issues.  For the third issue, I realized that these are mainly for documentation. However, the GUI has the "File->Help" in the menubar, which opens these files. If we separate these files into a different package, it might me missing. Unless if we make the CodeAnalyst-gui package requires the CodeAnalyst-doc package(i.e. adding "Requires : CodeAnalyst-doc" for CodeAnalyst-gui). Would you feel comfortable with this?
Comment 20 Parag AN(पराग) 2009-03-04 21:15:34 EST
better not to separate doc files in -doc package then.
Comment 21 Suravee Suthikulpanit 2009-03-05 02:21:29 EST
Updated spec file
-------------------------------
Summary:       CodeAnalyst is a Performance Analysis Suite for AMD-based System
Name:          CodeAnalyst-gui
Version:       2.8.38
Release:       5%{?dist}
License:       GPLv2
Group:         Development/System
URL:           http://developer.amd.com/cpu/CodeAnalyst/codeanalystlinux

Source0:       http://developer.amd.com/media/CALinuxSnapshot/%{name}-%{version}.tar.gz
Source1:       CodeAnalyst-gui.desktop
Source2:       DiffAnalyst-gui.desktop

# Use oprofile default cpu/watershed/event-buffer size
# since using stock oprofile daemon/driver
Patch0:        ca-use-oprofile-default-buffersize.patch

# This patch allows us to use the DESTDIR variable in install section.
Patch1:        ca-destdir.patch

Requires:      popt
Requires:      binutils
Requires:      elfutils-libelf
Requires:      qt3
Requires:      oprofile >= 0.9.4
Requires(pre): shadow-utils
Requires(post): chkconfig
Requires(preun): chkconfig 
# This is for /sbin/service
Requires(preun): initscripts
Requires(postun): initscripts

BuildRequires: automake
BuildRequires: libtool
BuildRequires: popt-devel
BuildRequires: binutils-devel
BuildRequires: elfutils-libelf-devel
BuildRequires: qt3-devel >= 3.3
BuildRequires: qt3-designer >= 3.3
BuildRequires: oprofile >= 0.9.4
BuildRequires: desktop-file-utils

BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

# Unsupported architecture list due to non-AMD based system.
ExcludeArch: ppc ppc64 s390 s390x alpha alphaev6 sparcv9 sparc64


%description
CodeAnalyst is a performance analysis suite. It provids graphical
utilitys for running Oprofile, and analyzing result on AMD-based systems.
CodeAnalyst includes several features to aid profile analysis such as
inline-function analysis, code-block analysis, and a utility for
profile comparison, DiffAnalayst.


%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .ca-use-oprofile-default-buffersize
%patch1 -p0 -b .ca-destdir


%build
./autogen.sh
%configure \
  --with-oprofile=%{_prefix} \
  --disable-oprofile-lib \
  --disable-static

make %{?_smp_mflags} all \
  CFLAGS="${RPM_OPT_FLAGS}" \
  CXXFLAGS="${RPM_OPT_FLAGS}"


%install
rm -rf ${RPM_BUILD_ROOT}

make -C src/ca/libs    install DESTDIR=${RPM_BUILD_ROOT}
make -C src/ca/gui     install DESTDIR=${RPM_BUILD_ROOT}
make -C src/ca/diffgui install DESTDIR=${RPM_BUILD_ROOT}
make -C src/ca/utils   install DESTDIR=${RPM_BUILD_ROOT}
make -C src/ca/scripts install DESTDIR=${RPM_BUILD_ROOT}

# These are help documents and images which
# the GUIs is using for the "Help" on toolbar.
# GUI will not run correctly if these are not available
make -C doc install DESTDIR=${RPM_BUILD_ROOT}

install -pD -m 755 src/ca/scripts/codeanalyst ${RPM_BUILD_ROOT}%{_initrddir}/codeanalyst

install -pD -m 755 careport.sh ${RPM_BUILD_ROOT}%{_bindir}/careport.sh

# Remove these unnecessary files from the installation
rm -rf ${RPM_BUILD_ROOT}%{_libdir}/lib*.{la,so}

# Install CodeAnalyst-gui.desktop file
desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE1}

# Install DiffAnalyst-gui.desktop file
desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE2}


%clean
rm -rf ${RPM_BUILD_ROOT}


%pre
# Adding "amdca" user group
getent group amdca >/dev/null || /usr/sbin/groupadd -r amdca
exit 0


%post
/sbin/ldconfig

# Install init script
/sbin/chkconfig --add codeanalyst


%preun
# Deinit 
if [ $1 = 0 ] ; then
    /sbin/service codeanalyst stop >/dev/null 2>&1
    /sbin/chkconfig --del codeanalyst
fi
exit 0


%postun
/sbin/ldconfig
if [ "$1" -ge "1" ] ; then
    /sbin/service codeanalyst condrestart >/dev/null 2>&1 || :
fi


%files
%defattr(-,root,root,-)
%doc README COPYING INSTALLATION
%{_bindir}/CodeAnalyst
%{_bindir}/DiffAnalyst
%{_bindir}/careport.sh
%{_bindir}/capackage.sh
%{_sbindir}/ca_user_manager
%{_sbindir}/ca_oprofile_controller
%{_libdir}/lib*.so.*
%dir %{_datadir}/codeanalyst
%{_datadir}/codeanalyst/*
%{_datadir}/applications/CodeAnalyst-gui.desktop
%{_datadir}/applications/DiffAnalyst-gui.desktop
%{_initrddir}/codeanalyst


%changelog
* Thu Mar 2 2009 - Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
- 2.8.38-5
- Usign "install -p"
- Using /sbin/service in preun and postun

* Thu Mar 2 2009 - Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
- 2.8.38-4
- Use "configure" macro instead of ./configure
- Add patch1:ca-destdir.patch and make use of DESTDIR variable.

* Thu Mar 2 2009 - Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
- 2.8.38-3
- Clean up and reorganize the spec file.
- Update "install -D -m 755"
- Explicitely declare /usr/share/codeanalyst directory in files section.
- Remove the echo in install section.

* Thu Feb 18 2009 - Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
- 2.8.38-2
- Use upstream URL for source

* Thu Feb 12 2009 - Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
- 2.8.38-1
- Using new buildroot string
- Remove #### partitioning lines
- Fixed the build flag (using $RPM_OPT_FLAGS)
- Change service name from codeanalyst_init to codeanalyst
- Add /var/lock/subsys/codeanalyst lock file for service start/stop
- Add version number to shared libraries (.so files)

* Thu Feb 05 2009 - Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
- 2.8.38-0
- Add patch0: ca-use-oprofile-default-buffersize.patch
- Clean up to meet Fedora Packaging Guideline
- Bump the version due to changes in the CodeAnalyst.

* Tue Jan 27 2009 - Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
- 2.8.37-1
- Initial revision
Comment 22 Parag AN(पराग) 2009-03-05 02:30:23 EST
did you see this Attachments above? if yes then you should have used that option.
or following url
https://bugzilla.redhat.com/attachment.cgi?bugid=483615&action=enter 
to submit SPEC.
Once problem gets fixed try to update SPEC and SRPM at usual place you used to update.
Comment 23 Suravee Suthikulpanit 2009-03-05 02:35:37 EST
Created attachment 334102 [details]
Spec file for CodeAnalyst-gui-2.8.38-5.fc11

Sorry, I misunderstood the email.
Comment 24 Suravee Suthikulpanit 2009-03-05 18:11:32 EST
I have posted the new SRPM and spec files here:

Spec URL:
http://ftp-developer.amd.com/user/ssuthiku/CodeAnalyst-gui-2.8.38-5.fc11/CodeAnalyst-gui.spec

SRPM URL:
http://ftp-developer.amd.com/user/ssuthiku/CodeAnalyst-gui-2.8.38-5.fc11/CodeAnalyst-gui-2.8.38-5.fc11.src.rpm
(From a scratch build against fc11 on Koji
http://koji.fedoraproject.org/koji/taskinfo?taskID=1225124)

Changes:
- Usign "install -p" as recommended in comment #18
- Using /sbin/service in preun as recommended in comment #18
- Add check for update case in postun section.
Comment 25 Parag AN(पराग) 2009-03-09 00:44:50 EDT
I will test functionality by installing this now.
Comment 26 Suravee Suthikulpanit 2009-03-09 20:08:14 EDT
I have posted the new SRPM and spec files here:

Spec URL:
http://ftp-developer.amd.com/user/ssuthiku/CodeAnalyst-gui-2.8.38-6.fc11/CodeAnalyst-gui.spec

SRPM URL:
http://ftp-developer.amd.com/user/ssuthiku/CodeAnalyst-gui-2.8.38-6.fc11/CodeAnalyst-gui-2.8.38-6.fc11.src.rpm
(From a scratch build against fc11 on Koji
http://koji.fedoraproject.org/koji/taskinfo?taskID=1233550)

Change Note:
- Updated the upstream download location for Source0 (http://developer.amd.com/Downloads/CodeAnalyst-gui-2.8.38.tar.gz)

md5sum:
2fb7944b3db827360d4d0e4b9355854c *CodeAnalyst-gui-2.8.38.tar.gz

The spec file is updated with the latest download information. Please see http://developer.amd.com/cpu/CodeAnalyst/codeanalystlinux for more info.
Comment 27 Parag AN(पराग) 2009-03-10 00:10:40 EDT
I have sponsored you now. Will do official review by tomorrow.
meanwhile you like to review some other new packages. Also, it will be good if you submit few more packages to Fedora.
Comment 28 Parag AN(पराग) 2009-03-10 04:14:15 EDT
unable to verify source
 wget http://developer.amd.com/Downloads/CodeAnalyst-gui-2.8.38.tar.gz not working and asking authentication.

I will also suggest to change following line in SPEC
%doc README COPYING INSTALLATION
to
%doc README COPYING INSTALLATION samples
Comment 30 Suravee Suthikulpanit 2009-03-10 15:45:59 EDT
I have investigated the issue where CodeAnalyst cannot generate profiling result, or imported the result generated by oprofile. I am able to reproduce the problem with the following system set up:
- Fedora10 i686
- oprofile-0.9.4-3.fc10.i386 package.

This is due to a bug in opreport utility which failed to generate XML output. CodeAnalyst uses opreport to generate the XML output before importing it and parse the information.  Please see the bug 489588 for more information.

However, this should work on Fedora10 x86_64 distribution.
Comment 31 Suravee Suthikulpanit 2009-03-12 00:45:51 EDT
I have posted the new SRPM and spec files here:

Spec URL:
http://ftp-developer.amd.com/user/ssuthiku/CodeAnalyst-gui-2.8.38-8.fc10/CodeAnalyst-gui.spec

SRPM URL:
http://ftp-developer.amd.com/user/ssuthiku/CodeAnalyst-gui-2.8.38-8.fc10/CodeAnalyst-gui-2.8.38-8.fc10.src.rpm

NOTE:
- Fixed Koji build error
- Add INSTALL="install -p"
Comment 32 Suravee Suthikulpanit 2009-03-12 18:09:53 EDT
I have posted the new SRPM and spec files here:

Spec URL:
http://ftp-developer.amd.com/user/ssuthiku/CodeAnalyst-gui-2.8.38-9.fc11/CodeAnalyst-gui.spec

SRPM URL:
http://ftp-developer.amd.com/user/ssuthiku/CodeAnalyst-gui-2.8.38-9.fc11/CodeAnalyst-gui-2.8.38-9.fc11.src.rpm

KOJI Build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=1238767

NOTE:
- This release added following:
   * Option --disable-dwarf since libdwarf is not yet available in Fedora.
   * Add new patch to fix build issue with --disable-libdwarf flag.

- We still have the problem with running functional test on 32-bit Fedora10 (see comment# 30)
Comment 33 Parag AN(पराग) 2009-03-13 00:31:22 EDT
Review:
+ package builds in mock (rawhide i586).
koji build => http://koji.fedoraproject.org/koji/taskinfo?taskID=1238767
+ rpmlint output for SRPM and RPM.
CodeAnalyst-gui.i386: W: service-default-enabled /etc/rc.d/init.d/codeanalyst
CodeAnalyst-gui.i386: W: service-default-enabled /etc/rc.d/init.d/codeanalyst
CodeAnalyst-gui.i386: W: incoherent-init-script-name codeanalyst
==> These can be ignored.
+ source files match upstream.
2fb7944b3db827360d4d0e4b9355854c  CodeAnalyst-gui-2.8.38.tar.gz
+ package meets naming and packaging guidelines.
+ specfile is properly named, is cleanly written
+ Spec file is written in American English.
+ Spec file is legible.
+ dist tag is present.
+ build root is correct.
+ license is open source-compatible.
+ License text is included in package.
+ %doc files are present.
+ BuildRequires are proper.
+ Compiler flags are honoured correctly.
+ defattr usage is correct.
+ %clean is present.
+ package installed properly.
+ Macro use appears rather consistent.
+ Package contains code.
+ no static libraries.
+ no .pc files are present.
+ no subpackage exists.
+ no .la files.
+ no translations are available.
+ Does owns the directories it creates.
+ no duplicates in %files.
+ file permissions are appropriate.
+ ldconfig, initscript, users and groups scriptlets are used.
+ package  CodeAnalyst-gui-2.8.38-9.fc11.i586 ->
  Provides: libCA.so.1 libCAbba.so.1 lib_tbp_output.so.1 libopdata.so.1
  Requires: /bin/bash /bin/sh libCA.so.1 libCAbba.so.1 lib_tbp_output.so.1 libbfd-2.19.51.0.2-16.fc11.so libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.1.3) libc.so.6(GLIBC_2.3.4) libc.so.6(GLIBC_2.4) libc.so.6(GLIBC_2.7) libdl.so.2 libelf.so.1 libelf.so.1(ELFUTILS_1.0) libgcc_s.so.1 libgcc_s.so.1(GCC_3.0) libgcc_s.so.1(GLIBC_2.0) libm.so.6 libm.so.6(GLIBC_2.0) libopdata.so.1 libpopt.so.0 libpopt.so.0(LIBPOPT_0) libpthread.so.0 libpthread.so.0(GLIBC_2.0) libqt-mt.so.3 libstdc++.so.6 libstdc++.so.6(CXXABI_1.3) libstdc++.so.6(CXXABI_1.3.1) libstdc++.so.6(GLIBCXX_3.4) libstdc++.so.6(GLIBCXX_3.4.9) rtld(GNU_HASH)

+ Desktop file installed correctly.
+ GUI App.

APPROVED.
Comment 34 Suravee Suthikulpanit 2009-03-13 01:18:44 EDT
New Package CVS Request
=======================
Package Name: CodeAnalyst-gui

Short Description: CodeAnalyst is a performance analysis suite. It provids graphical utilitys for running Oprofile, and analyzing result on AMD-based systems. CodeAnalyst includes several features to aid profile analysis such as 
inline-function analysis, code-block analysis, and a utility for 
profile comparison, DiffAnalayst.
 
Owners: Suravee Suthikulpanit (suravee.suthikulpanit@amd.com)

Branches: F-10 F-11

InitialCC: paragn
Comment 35 Suravee Suthikulpanit 2009-03-13 01:28:23 EDT
Fix Comment #34

New Package CVS Request
=======================
Package Name: CodeAnalyst-gui
Short Descriptions: A performance analysis for AMD-based system
Owners: suravee
Branches: F-10
InitialCC: paragn
Comment 36 Suravee Suthikulpanit 2009-03-13 01:30:02 EDT
Fix typo on Comment #35

New Package CVS Request
=======================
Package Name: CodeAnalyst-gui
Short Descriptions: A performance analysis tool suite for AMD-based system
Owners: suravee
Branches: F-10
InitialCC: paragn
Comment 37 Parag AN(पराग) 2009-03-13 01:37:00 EDT
thanks this looks ok now. you need to wait till someone from cvs-admin group creates new cvs module for your package.
then you need to follow from step 6 given at http://fedoraproject.org/wiki/Package_Review_Process

make make yourself familiar with koji as per given at http://fedoraproject.org/wiki/Using_the_Koji_build_system
Comment 38 Suravee Suthikulpanit 2009-03-13 01:43:02 EDT
I will do so. Thank you for all your help.
Comment 39 Kevin Fenzi 2009-03-15 22:20:09 EDT
cvs done.
Comment 40 Fedora Update System 2009-03-16 16:46:28 EDT
CodeAnalyst-gui-2.8.38-9.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/CodeAnalyst-gui-2.8.38-9.fc10
Comment 41 William Cohen 2009-03-17 10:22:57 EDT
Code Analyst currently only builds on x86 platforms and only supports AMD processors. This is overly restrictive. Both Fedora and OProfile supports a number of processors architectures. It would be very nice if the Code Analyst was a bit more flexible and would allow other developers to adapt it those processor architectures AMD doesn't support. At the very least should be able to fall back on the oprofile timer mechanism for unknown processors architectures.

There appears to be a few places with __asm__ code used to either read the timestamp counter or get the cpuid that would prevent the code from compiling on non-x86 processors.

$ find -type f -exec grep "__asm__" {} /dev/null \;|more
./src/ca/example/example.cpp:		__asm__ __volatile__ (
./src/ca/example/example.cpp:		__asm__ __volatile__ (
./src/ca/example/example.cpp:	__asm__ __volatile__ ( 	     
./src/ca/example/example.cpp:	__asm__ __volatile__ ( 	     
./src/ca/gui/auxil.cpp:	__asm__ __volatile__ (	     	     
./src/ca/libs/libca/xpwin.cpp:  __asm__ __volatile__ (	     
./src/ca/libs/libca/xpwin.cpp:	__asm__ __volatile__ (	    

These operations could be factored out and converted into defines located in an include file.

Is the cpuid being used for anything more complicated than just getting the model and family? Could most of this information be easily obtained from oprofile's /dev/oprofile/cpu_type or /proc/cpuinfo?
Comment 42 Fedora Update System 2009-03-18 14:59:25 EDT
CodeAnalyst-gui-2.8.38-9.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 43 Suravee Suthikulpanit 2009-07-08 11:59:12 EDT
Package Change Request
======================
Package Name: CodeAnalyst-gui
New Branches: F-11
Owners: suravee
Comment 44 Jason Tibbitts 2009-07-08 12:37:01 EDT
A populated F-11 branch already exists.  Don't forget to use "cvs update -d".

Note You need to log in before you can comment on or make changes to this bug.