From 250a51839dd1346d49bc64909a660b00bc2ac7af Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 26 Sep 2012 16:32:08 -0400 Subject: move ~lukeshu/codeanalyst to ~/lukeshu/not-working/codeanalyst --- ~lukeshu/codeanalyst/PKGBUILD | 91 ---------------------- ~lukeshu/codeanalyst/codeanalyst.desktop | 9 --- ~lukeshu/codeanalyst/codeanalyst.install | 29 ------- ~lukeshu/codeanalyst/codeanalyst.sudo | 1 - ~lukeshu/codeanalyst/codeanalyst.svg | 59 -------------- ~lukeshu/codeanalyst/gcc47.patch | 72 ----------------- ~lukeshu/codeanalyst/kernel3.4.patch | 72 ----------------- ~lukeshu/codeanalyst/skipSetup.patch | 68 ---------------- ~lukeshu/not-working/codeanalyst/PKGBUILD | 91 ++++++++++++++++++++++ .../not-working/codeanalyst/codeanalyst.desktop | 9 +++ .../not-working/codeanalyst/codeanalyst.install | 29 +++++++ ~lukeshu/not-working/codeanalyst/codeanalyst.sudo | 1 + ~lukeshu/not-working/codeanalyst/codeanalyst.svg | 59 ++++++++++++++ ~lukeshu/not-working/codeanalyst/gcc47.patch | 72 +++++++++++++++++ ~lukeshu/not-working/codeanalyst/kernel3.4.patch | 72 +++++++++++++++++ ~lukeshu/not-working/codeanalyst/skipSetup.patch | 68 ++++++++++++++++ 16 files changed, 401 insertions(+), 401 deletions(-) delete mode 100755 ~lukeshu/codeanalyst/PKGBUILD delete mode 100755 ~lukeshu/codeanalyst/codeanalyst.desktop delete mode 100755 ~lukeshu/codeanalyst/codeanalyst.install delete mode 100755 ~lukeshu/codeanalyst/codeanalyst.sudo delete mode 100755 ~lukeshu/codeanalyst/codeanalyst.svg delete mode 100755 ~lukeshu/codeanalyst/gcc47.patch delete mode 100644 ~lukeshu/codeanalyst/kernel3.4.patch delete mode 100755 ~lukeshu/codeanalyst/skipSetup.patch create mode 100755 ~lukeshu/not-working/codeanalyst/PKGBUILD create mode 100755 ~lukeshu/not-working/codeanalyst/codeanalyst.desktop create mode 100755 ~lukeshu/not-working/codeanalyst/codeanalyst.install create mode 100755 ~lukeshu/not-working/codeanalyst/codeanalyst.sudo create mode 100755 ~lukeshu/not-working/codeanalyst/codeanalyst.svg create mode 100755 ~lukeshu/not-working/codeanalyst/gcc47.patch create mode 100644 ~lukeshu/not-working/codeanalyst/kernel3.4.patch create mode 100755 ~lukeshu/not-working/codeanalyst/skipSetup.patch (limited to '~lukeshu') diff --git a/~lukeshu/codeanalyst/PKGBUILD b/~lukeshu/codeanalyst/PKGBUILD deleted file mode 100755 index 885e06f0e..000000000 --- a/~lukeshu/codeanalyst/PKGBUILD +++ /dev/null @@ -1,91 +0,0 @@ -# Maintainer (Parabola): Luke Shumaker -# Maintainer (AUR): Felipe Bugno - -# A note about the oprofile fork: -# The docs claim that the fork is just for adding support for -# processors that aren't upstream yet (at the time, they are now that -# 0.9.7 is out). So, shouldn't we just link against 0.9.7? Well: -# * AMD also added a bunch of CodeAnalyst-specific code. -# * Several external variables/types have different names; the API is -# incompatible. -# * [extra]/oprofile-0.9.7-3 only includes about half of the headers. - -pkgbase=CodeAnalyst -pkgname=(codeanalyst codeanalyst-cakm) -pkgver=3.3.18.0361 -_pkgver="${pkgver//./_}" -pkgrel=4.1 -pkgdesc="AMD performance profiler. Includes a fork of oprofile." -url="http://developer.amd.com/tools/${pkgbase}/" -arch=('i686' 'x86_64') -license=('GPL') -depends=('gcc' 'qt>=4.1' 'libdwarf') -makedepends=('linux-headers' 'elfutils' 'findutils' 'file') -options=('!strip') -install=codeanalyst.install -source=("http://download2-developer.amd.com/amd/${pkgbase}/${pkgbase}${_pkgver}Public.tar.gz" - 'gcc47.patch' - 'skipSetup.patch' - 'kernel3.4.patch' - 'codeanalyst.sudo' - 'codeanalyst.desktop' - 'codeanalyst.svg') - -build() { - build_codeanalyst - build_codeanalyst-cakm -} - -build_codeanalyst() { - cd "${srcdir}/${pkgbase}-${_pkgver}-Public" - patch -Np1 -i "${srcdir}/gcc47.patch" - patch -Np1 -i "${srcdir}/skipSetup.patch" - rm -rf src/dwarf-* # easiest way to ensure using the system install - - ./autogen.sh - ./configure --prefix=/usr \ - --with-libdwarf-includes=/usr/include/libdwarf \ - --with-libdwarf-libraries=/usr/lib - make -} - -build_codeanalyst-cakm() { - cd "${srcdir}/${pkgbase}-${_pkgver}-Public"/src/cakm - cp -r kernel2.6.38 kernel3.4 - cd kernel3.4 - patch -Np1 -i "${srcdir}/kernel3.4.patch" - make -} - -package_codeanalyst() { - provides=('oprofile=0.9.6cvs') - conflicts=('oprofile') - - cd "${srcdir}/${pkgbase}-${_pkgver}-Public" - make DESTDIR="${pkgdir}" install - rm -f "${pkgdir}/usr/sbin/ca_user_manager" # either codeanalyst.install does this, or it is trivial - - find "${pkgdir}"/usr/{bin,sbin} -type f -exec file '{}' +|sed -n 's/:\s*ELF .*//p'|xargs strip - - cd "${srcdir}" - install -D -m644 codeanalyst.sudo "${pkgdir}/etc/sudoers.d/codeanalyst" - install -D -m644 codeanalyst.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/codeanalyst.svg" - install -D -m644 codeanalyst.desktop "${pkgdir}/usr/share/applications/codeanalyst.desktop" -} - -package_codeanalyst-cakm() { - pkgdesc="CodeAnalyst kernel module, oprofile-ca.ko, a replacement for oprofile.ko" - depends=(codeanalyst) - provides=() - - cd "${srcdir}/${pkgbase}-${_pkgver}-Public"/src/cakm/kernel3.4 - install -D -m644 oprofile.ko "${pkgdir}/lib/modules/`uname -r`/kernel/arch/x86/oprofile/oprofile-ca.ko" -} - -md5sums=('f1e29bc7c7da259df228ce59281ee1d7' - '063d0fc9680641a92ce5e310ffe1c9c0' - 'ce549e59c4a5916fd19e8d085e863627' - '3a5d820a43a0360d561bb0c4d67d9735' - '3cc8f64fe84c5a886d0172ee8d99f690' - '3a18d3f7fb01f199a8ed5ae2908c18e4' - '1822a4157b82904b82e72fc1e9bcbd42') diff --git a/~lukeshu/codeanalyst/codeanalyst.desktop b/~lukeshu/codeanalyst/codeanalyst.desktop deleted file mode 100755 index 56d54f884..000000000 --- a/~lukeshu/codeanalyst/codeanalyst.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=AMD CodeAnalyst -Comment=AMD profiler and performance analyzer -Exec=/usr/bin/CodeAnalyst -Icon=codeanalyst -Terminal=false -Encoding=UTF-8 -Type=Application -Categories=Development; diff --git a/~lukeshu/codeanalyst/codeanalyst.install b/~lukeshu/codeanalyst/codeanalyst.install deleted file mode 100755 index 6ed1ac841..000000000 --- a/~lukeshu/codeanalyst/codeanalyst.install +++ /dev/null @@ -1,29 +0,0 @@ -post_install() { - getent group amdca &>/dev/null || groupadd amdca &>/dev/null - echo " ==> To use CodeAnalyst as non-root, you must be in the 'amdca' group" - echo " ie: gpasswd -a USERNAME amdca" - - chown root:amdca /usr/bin/calog_report - chown root:amdca /usr/bin/capackage.sh - chown root:amdca /usr/bin/careport.sh - chown root:amdca /usr/bin/cgreport - chown root:amdca /usr/bin/CodeAnalyst - chown root:amdca /usr/bin/opannotate - chown root:amdca /usr/bin/oparchive - chown root:amdca /usr/bin/opcontrol - chown root:amdca /usr/bin/opgprof - chown root:amdca /usr/bin/ophelp - chown root:amdca /usr/bin/opimport - chown root:amdca /usr/bin/opjitconv - chown root:amdca /usr/bin/opreport - chown root:amdca /usr/bin/oprofiled - chown root:amdca /usr/sbin/ca_oprofile_controller - #chown root:amdca /usr/sbin/ca_user_manager - - update-desktop-database -q -} - -post_remove() { - getent group amdca &>/dev/null && groupdel amdca &>/dev/null - update-desktop-database -q -} diff --git a/~lukeshu/codeanalyst/codeanalyst.sudo b/~lukeshu/codeanalyst/codeanalyst.sudo deleted file mode 100755 index 1c3173bdb..000000000 --- a/~lukeshu/codeanalyst/codeanalyst.sudo +++ /dev/null @@ -1 +0,0 @@ -%amdca ALL= NOPASSWD: /usr/sbin/ca_oprofile_controller diff --git a/~lukeshu/codeanalyst/codeanalyst.svg b/~lukeshu/codeanalyst/codeanalyst.svg deleted file mode 100755 index 8febf725b..000000000 --- a/~lukeshu/codeanalyst/codeanalyst.svg +++ /dev/null @@ -1,59 +0,0 @@ - - - -image/svg+xml - - - - - - \ No newline at end of file diff --git a/~lukeshu/codeanalyst/gcc47.patch b/~lukeshu/codeanalyst/gcc47.patch deleted file mode 100755 index dfec4a0c4..000000000 --- a/~lukeshu/codeanalyst/gcc47.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca/cg/Makefile.am CodeAnalyst-3_3_18_0361-Public/src/ca/cg/Makefile.am -*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca/cg/Makefile.am 2012-04-13 02:41:43.000000000 -0300 ---- CodeAnalyst-3_3_18_0361-Public/src/ca/cg/Makefile.am 2012-04-22 17:55:01.227439003 -0300 -*************** -*** 25,31 **** - cgcvt.cpp - - -! cgreport_LDFLAGS = -Wl -fPIC @QT_LDFLAGS@ - - AM_CPPFLAGS= $(INCLUDES) $(more_flags) \ - $(FLAG64) -Wno-unused -Wno-parentheses \ ---- 25,31 ---- - cgcvt.cpp - - -! cgreport_LDFLAGS = -fPIC @QT_LDFLAGS@ - - AM_CPPFLAGS= $(INCLUDES) $(more_flags) \ - $(FLAG64) -Wno-unused -Wno-parentheses \ -diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca/gui/MonitorDockView.cpp CodeAnalyst-3_3_18_0361-Public/src/ca/gui/MonitorDockView.cpp -*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca/gui/MonitorDockView.cpp 2012-04-13 02:41:43.000000000 -0300 ---- CodeAnalyst-3_3_18_0361-Public/src/ca/gui/MonitorDockView.cpp 2012-04-22 17:38:14.884058192 -0300 -*************** -*** 17,22 **** ---- 17,23 ---- - */ - - #include -+ #include - - #include "MonitorDockView.h" - -diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca/libs/libca/dwarfengine.cpp CodeAnalyst-3_3_18_0361-Public/src/ca/libs/libca/dwarfengine.cpp -*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca/libs/libca/dwarfengine.cpp 2012-04-13 02:41:43.000000000 -0300 ---- CodeAnalyst-3_3_18_0361-Public/src/ca/libs/libca/dwarfengine.cpp 2012-04-22 17:34:45.670714989 -0300 -*************** -*** 21,26 **** ---- 21,27 ---- - #include - #include - #include -+ #include - - #include "dwarfengine.h" - #define DWARF_DEBUG 0 -diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca/libs/libopdata/opdata_handler.cpp CodeAnalyst-3_3_18_0361-Public/src/ca/libs/libopdata/opdata_handler.cpp -*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca/libs/libopdata/opdata_handler.cpp 2012-04-13 02:41:43.000000000 -0300 ---- CodeAnalyst-3_3_18_0361-Public/src/ca/libs/libopdata/opdata_handler.cpp 2012-04-22 17:32:30.780708624 -0300 -*************** -*** 29,34 **** ---- 29,35 ---- - #include - #include - #include -+ #include - - // CodeAnalyst headers - #include "CaProfileWriter.h" -diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca_agent/libCAagent/slock.cpp CodeAnalyst-3_3_18_0361-Public/src/ca_agent/libCAagent/slock.cpp -*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca_agent/libCAagent/slock.cpp 2012-04-13 02:41:43.000000000 -0300 ---- CodeAnalyst-3_3_18_0361-Public/src/ca_agent/libCAagent/slock.cpp 2012-04-22 17:26:58.424026278 -0300 -*************** -*** 13,18 **** ---- 13,19 ---- - #include - #include - #include -+ #include - - #include "slock.h" - #include "smm.h" diff --git a/~lukeshu/codeanalyst/kernel3.4.patch b/~lukeshu/codeanalyst/kernel3.4.patch deleted file mode 100644 index 589abc800..000000000 --- a/~lukeshu/codeanalyst/kernel3.4.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff -ru kernel2.6.38/Makefile kernel3.4/Makefile ---- kernel2.6.38/Makefile 2012-04-13 01:41:43.000000000 -0400 -+++ kernel3.4/Makefile 2012-07-11 11:32:27.000000000 -0400 -@@ -1,6 +1,6 @@ - TARGET = oprofile.ko - --MDIR = $(if $(shell uname -m | grep x86_64),arch/x86/oprofile,arch/x86/oprofile) -+MDIR = arch/x86/oprofile - - DRIVER_OBJS = oprof.o cpu_buffer.o buffer_sync.o \ - event_buffer.o oprofile_files.o \ -@@ -16,7 +16,8 @@ - CURRENT = $(shell uname -r) - ARCH = $(if $(shell uname -m | grep x86_64),64,32) - KERN_ARCH = $(if $(shell uname -m | grep x86_64),x86_64,i386) --KDIR = /lib/modules/$(CURRENT)/build -+SYS_KDIR = /lib/modules/$(CURRENT)/build -+KDIR = $(PWD)/../build - PWD = $(shell pwd) - DEST = /lib/modules/$(CURRENT)/kernel/$(MDIR) - USE_INTERNAL_ERRATA = $(if $(shell ls ../internal/errata.h 2> /dev/null),1,0) -@@ -39,6 +40,8 @@ - all: default - - default: -+ rm -rf $(KDIR) -+ cp -r $(SYS_KDIR)/ $(KDIR) - make -C $(KDIR) SUBDIRS=$(PWD) CFLAGS_MODULE+="-DMODULE -DUSE_INTERNAL_ERRATA=$(USE_INTERNAL_ERRATA)" modules ARCH=$(KERN_ARCH) - - install: -@@ -52,13 +55,12 @@ - - uninstall: - @echo "... Restore original oprofile.ko." -- @mv -v $(DEST)/$(TARGET).orig $(DEST)/$(TARGET) -+ @mv -v $(DEST)/$(TARGET).orig $(DEST)/$(TARGET) - - clean: - rm -f *.o oprofile.ko .*.cmd .*.flags *.mod.c - - prebuild: - cp $(TARGET) ../prebuilds/$(CURRENT)_$(ARCH).ko -- - ---include $(KDIR)/Rules.make -+-include $(SYS_KDIR)/Rules.make -Only in kernel3.4/: modules.order -Only in kernel3.4/: Module.symvers -diff -ru kernel2.6.38/nmi_int.c kernel3.4/nmi_int.c ---- kernel2.6.38/nmi_int.c 2012-04-13 01:41:43.000000000 -0400 -+++ kernel3.4/nmi_int.c 2012-07-11 11:32:27.000000000 -0400 -@@ -16,7 +16,6 @@ - #include - #include - #include "oprofile.h" --#include - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0) - #include - #endif -diff -ru kernel2.6.38/oprofilefs.c kernel3.4/oprofilefs.c ---- kernel2.6.38/oprofilefs.c 2012-04-13 01:41:43.000000000 -0400 -+++ kernel3.4/oprofilefs.c 2012-07-11 11:32:27.000000000 -0400 -@@ -244,7 +244,7 @@ - return -ENOMEM; - root_inode->i_op = &simple_dir_inode_operations; - root_inode->i_fop = &simple_dir_operations; -- root_dentry = d_alloc_root(root_inode); -+ root_dentry = d_make_root(root_inode); - if (!root_dentry) { - iput(root_inode); - return -ENOMEM; -Only in kernel3.4/: .tmp_versions diff --git a/~lukeshu/codeanalyst/skipSetup.patch b/~lukeshu/codeanalyst/skipSetup.patch deleted file mode 100755 index fdc9bf42f..000000000 --- a/~lukeshu/codeanalyst/skipSetup.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca/Makefile.am CodeAnalyst-3_3_18_0361-Public/src/ca/Makefile.am -*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca/Makefile.am 2012-04-13 02:41:43.000000000 -0300 ---- CodeAnalyst-3_3_18_0361-Public/src/ca/Makefile.am 2012-04-22 20:44:07.437917684 -0300 -*************** -*** 8,19 **** - # FIXME [3.0] diffgui \ - # $(CA_RELEASE_TYPE) - -! install-exec-hook: -! @if test -e "scripts/Setup.sh"; then \ -! scripts/Setup.sh $(DESTDIR)$(prefix); \ -! fi - -! uninstall-hook: -! @if test -e "scripts/Uninstall.sh"; then \ -! scripts/Uninstall.sh $(DESTDIR)$(prefix);\ -! fi ---- 8,19 ---- - # FIXME [3.0] diffgui \ - # $(CA_RELEASE_TYPE) - -! #install-exec-hook: -! # @if test -e "scripts/Setup.sh"; then \ -! # scripts/Setup.sh $(DESTDIR)$(prefix); \ -! # fi - -! #uninstall-hook: -! # @if test -e "scripts/Uninstall.sh"; then \ -! # scripts/Uninstall.sh $(DESTDIR)$(prefix);\ -! # fi -diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca_agent/jvmpi/Makefile.am CodeAnalyst-3_3_18_0361-Public/src/ca_agent/jvmpi/Makefile.am -*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca_agent/jvmpi/Makefile.am 2012-04-13 02:41:43.000000000 -0300 ---- CodeAnalyst-3_3_18_0361-Public/src/ca_agent/jvmpi/Makefile.am 2012-04-22 20:47:21.604593511 -0300 -*************** -*** 15,20 **** - libCAJVMPIA_so_SOURCES = \ - jpa.cpp - -! install-exec-hook: -! @/sbin/ldconfig - ---- 15,20 ---- - libCAJVMPIA_so_SOURCES = \ - jpa.cpp - -! #install-exec-hook: -! # @/sbin/ldconfig - -diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/Makefile.am CodeAnalyst-3_3_18_0361-Public/src/Makefile.am -*** CodeAnalyst-3_3_18_0361-Public.orig/src/Makefile.am 2012-04-13 02:41:43.000000000 -0300 ---- CodeAnalyst-3_3_18_0361-Public/src/Makefile.am 2012-04-22 20:44:57.674586720 -0300 -*************** -*** 8,21 **** - install-exec-hook: - @if test -e "${LIBDWARF_DIR}libdwarf.so"; then \ - install -pD -m 755 ${LIBDWARF_DIR}libdwarf.so $(DESTDIR)$(prefix)/lib/libdwarf.so ; \ -- /sbin/ldconfig ;\ - fi - - uninstall-hook: - @if test -e "${LIBDWARF_DIR}libdwarf.so"; then \ - if test -e "$(DESTDIR)$(prefix)/lib/libdwarf.so"; then \ - rm -f $(DESTDIR)$(prefix)/lib/libdwarf.so ; \ -- /sbin/ldconfig ; \ - fi ; \ - fi - ---- 8,19 ---- diff --git a/~lukeshu/not-working/codeanalyst/PKGBUILD b/~lukeshu/not-working/codeanalyst/PKGBUILD new file mode 100755 index 000000000..885e06f0e --- /dev/null +++ b/~lukeshu/not-working/codeanalyst/PKGBUILD @@ -0,0 +1,91 @@ +# Maintainer (Parabola): Luke Shumaker +# Maintainer (AUR): Felipe Bugno + +# A note about the oprofile fork: +# The docs claim that the fork is just for adding support for +# processors that aren't upstream yet (at the time, they are now that +# 0.9.7 is out). So, shouldn't we just link against 0.9.7? Well: +# * AMD also added a bunch of CodeAnalyst-specific code. +# * Several external variables/types have different names; the API is +# incompatible. +# * [extra]/oprofile-0.9.7-3 only includes about half of the headers. + +pkgbase=CodeAnalyst +pkgname=(codeanalyst codeanalyst-cakm) +pkgver=3.3.18.0361 +_pkgver="${pkgver//./_}" +pkgrel=4.1 +pkgdesc="AMD performance profiler. Includes a fork of oprofile." +url="http://developer.amd.com/tools/${pkgbase}/" +arch=('i686' 'x86_64') +license=('GPL') +depends=('gcc' 'qt>=4.1' 'libdwarf') +makedepends=('linux-headers' 'elfutils' 'findutils' 'file') +options=('!strip') +install=codeanalyst.install +source=("http://download2-developer.amd.com/amd/${pkgbase}/${pkgbase}${_pkgver}Public.tar.gz" + 'gcc47.patch' + 'skipSetup.patch' + 'kernel3.4.patch' + 'codeanalyst.sudo' + 'codeanalyst.desktop' + 'codeanalyst.svg') + +build() { + build_codeanalyst + build_codeanalyst-cakm +} + +build_codeanalyst() { + cd "${srcdir}/${pkgbase}-${_pkgver}-Public" + patch -Np1 -i "${srcdir}/gcc47.patch" + patch -Np1 -i "${srcdir}/skipSetup.patch" + rm -rf src/dwarf-* # easiest way to ensure using the system install + + ./autogen.sh + ./configure --prefix=/usr \ + --with-libdwarf-includes=/usr/include/libdwarf \ + --with-libdwarf-libraries=/usr/lib + make +} + +build_codeanalyst-cakm() { + cd "${srcdir}/${pkgbase}-${_pkgver}-Public"/src/cakm + cp -r kernel2.6.38 kernel3.4 + cd kernel3.4 + patch -Np1 -i "${srcdir}/kernel3.4.patch" + make +} + +package_codeanalyst() { + provides=('oprofile=0.9.6cvs') + conflicts=('oprofile') + + cd "${srcdir}/${pkgbase}-${_pkgver}-Public" + make DESTDIR="${pkgdir}" install + rm -f "${pkgdir}/usr/sbin/ca_user_manager" # either codeanalyst.install does this, or it is trivial + + find "${pkgdir}"/usr/{bin,sbin} -type f -exec file '{}' +|sed -n 's/:\s*ELF .*//p'|xargs strip + + cd "${srcdir}" + install -D -m644 codeanalyst.sudo "${pkgdir}/etc/sudoers.d/codeanalyst" + install -D -m644 codeanalyst.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/codeanalyst.svg" + install -D -m644 codeanalyst.desktop "${pkgdir}/usr/share/applications/codeanalyst.desktop" +} + +package_codeanalyst-cakm() { + pkgdesc="CodeAnalyst kernel module, oprofile-ca.ko, a replacement for oprofile.ko" + depends=(codeanalyst) + provides=() + + cd "${srcdir}/${pkgbase}-${_pkgver}-Public"/src/cakm/kernel3.4 + install -D -m644 oprofile.ko "${pkgdir}/lib/modules/`uname -r`/kernel/arch/x86/oprofile/oprofile-ca.ko" +} + +md5sums=('f1e29bc7c7da259df228ce59281ee1d7' + '063d0fc9680641a92ce5e310ffe1c9c0' + 'ce549e59c4a5916fd19e8d085e863627' + '3a5d820a43a0360d561bb0c4d67d9735' + '3cc8f64fe84c5a886d0172ee8d99f690' + '3a18d3f7fb01f199a8ed5ae2908c18e4' + '1822a4157b82904b82e72fc1e9bcbd42') diff --git a/~lukeshu/not-working/codeanalyst/codeanalyst.desktop b/~lukeshu/not-working/codeanalyst/codeanalyst.desktop new file mode 100755 index 000000000..56d54f884 --- /dev/null +++ b/~lukeshu/not-working/codeanalyst/codeanalyst.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=AMD CodeAnalyst +Comment=AMD profiler and performance analyzer +Exec=/usr/bin/CodeAnalyst +Icon=codeanalyst +Terminal=false +Encoding=UTF-8 +Type=Application +Categories=Development; diff --git a/~lukeshu/not-working/codeanalyst/codeanalyst.install b/~lukeshu/not-working/codeanalyst/codeanalyst.install new file mode 100755 index 000000000..6ed1ac841 --- /dev/null +++ b/~lukeshu/not-working/codeanalyst/codeanalyst.install @@ -0,0 +1,29 @@ +post_install() { + getent group amdca &>/dev/null || groupadd amdca &>/dev/null + echo " ==> To use CodeAnalyst as non-root, you must be in the 'amdca' group" + echo " ie: gpasswd -a USERNAME amdca" + + chown root:amdca /usr/bin/calog_report + chown root:amdca /usr/bin/capackage.sh + chown root:amdca /usr/bin/careport.sh + chown root:amdca /usr/bin/cgreport + chown root:amdca /usr/bin/CodeAnalyst + chown root:amdca /usr/bin/opannotate + chown root:amdca /usr/bin/oparchive + chown root:amdca /usr/bin/opcontrol + chown root:amdca /usr/bin/opgprof + chown root:amdca /usr/bin/ophelp + chown root:amdca /usr/bin/opimport + chown root:amdca /usr/bin/opjitconv + chown root:amdca /usr/bin/opreport + chown root:amdca /usr/bin/oprofiled + chown root:amdca /usr/sbin/ca_oprofile_controller + #chown root:amdca /usr/sbin/ca_user_manager + + update-desktop-database -q +} + +post_remove() { + getent group amdca &>/dev/null && groupdel amdca &>/dev/null + update-desktop-database -q +} diff --git a/~lukeshu/not-working/codeanalyst/codeanalyst.sudo b/~lukeshu/not-working/codeanalyst/codeanalyst.sudo new file mode 100755 index 000000000..1c3173bdb --- /dev/null +++ b/~lukeshu/not-working/codeanalyst/codeanalyst.sudo @@ -0,0 +1 @@ +%amdca ALL= NOPASSWD: /usr/sbin/ca_oprofile_controller diff --git a/~lukeshu/not-working/codeanalyst/codeanalyst.svg b/~lukeshu/not-working/codeanalyst/codeanalyst.svg new file mode 100755 index 000000000..8febf725b --- /dev/null +++ b/~lukeshu/not-working/codeanalyst/codeanalyst.svg @@ -0,0 +1,59 @@ + + + +image/svg+xml + + + + + + \ No newline at end of file diff --git a/~lukeshu/not-working/codeanalyst/gcc47.patch b/~lukeshu/not-working/codeanalyst/gcc47.patch new file mode 100755 index 000000000..dfec4a0c4 --- /dev/null +++ b/~lukeshu/not-working/codeanalyst/gcc47.patch @@ -0,0 +1,72 @@ +diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca/cg/Makefile.am CodeAnalyst-3_3_18_0361-Public/src/ca/cg/Makefile.am +*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca/cg/Makefile.am 2012-04-13 02:41:43.000000000 -0300 +--- CodeAnalyst-3_3_18_0361-Public/src/ca/cg/Makefile.am 2012-04-22 17:55:01.227439003 -0300 +*************** +*** 25,31 **** + cgcvt.cpp + + +! cgreport_LDFLAGS = -Wl -fPIC @QT_LDFLAGS@ + + AM_CPPFLAGS= $(INCLUDES) $(more_flags) \ + $(FLAG64) -Wno-unused -Wno-parentheses \ +--- 25,31 ---- + cgcvt.cpp + + +! cgreport_LDFLAGS = -fPIC @QT_LDFLAGS@ + + AM_CPPFLAGS= $(INCLUDES) $(more_flags) \ + $(FLAG64) -Wno-unused -Wno-parentheses \ +diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca/gui/MonitorDockView.cpp CodeAnalyst-3_3_18_0361-Public/src/ca/gui/MonitorDockView.cpp +*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca/gui/MonitorDockView.cpp 2012-04-13 02:41:43.000000000 -0300 +--- CodeAnalyst-3_3_18_0361-Public/src/ca/gui/MonitorDockView.cpp 2012-04-22 17:38:14.884058192 -0300 +*************** +*** 17,22 **** +--- 17,23 ---- + */ + + #include ++ #include + + #include "MonitorDockView.h" + +diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca/libs/libca/dwarfengine.cpp CodeAnalyst-3_3_18_0361-Public/src/ca/libs/libca/dwarfengine.cpp +*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca/libs/libca/dwarfengine.cpp 2012-04-13 02:41:43.000000000 -0300 +--- CodeAnalyst-3_3_18_0361-Public/src/ca/libs/libca/dwarfengine.cpp 2012-04-22 17:34:45.670714989 -0300 +*************** +*** 21,26 **** +--- 21,27 ---- + #include + #include + #include ++ #include + + #include "dwarfengine.h" + #define DWARF_DEBUG 0 +diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca/libs/libopdata/opdata_handler.cpp CodeAnalyst-3_3_18_0361-Public/src/ca/libs/libopdata/opdata_handler.cpp +*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca/libs/libopdata/opdata_handler.cpp 2012-04-13 02:41:43.000000000 -0300 +--- CodeAnalyst-3_3_18_0361-Public/src/ca/libs/libopdata/opdata_handler.cpp 2012-04-22 17:32:30.780708624 -0300 +*************** +*** 29,34 **** +--- 29,35 ---- + #include + #include + #include ++ #include + + // CodeAnalyst headers + #include "CaProfileWriter.h" +diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca_agent/libCAagent/slock.cpp CodeAnalyst-3_3_18_0361-Public/src/ca_agent/libCAagent/slock.cpp +*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca_agent/libCAagent/slock.cpp 2012-04-13 02:41:43.000000000 -0300 +--- CodeAnalyst-3_3_18_0361-Public/src/ca_agent/libCAagent/slock.cpp 2012-04-22 17:26:58.424026278 -0300 +*************** +*** 13,18 **** +--- 13,19 ---- + #include + #include + #include ++ #include + + #include "slock.h" + #include "smm.h" diff --git a/~lukeshu/not-working/codeanalyst/kernel3.4.patch b/~lukeshu/not-working/codeanalyst/kernel3.4.patch new file mode 100644 index 000000000..589abc800 --- /dev/null +++ b/~lukeshu/not-working/codeanalyst/kernel3.4.patch @@ -0,0 +1,72 @@ +diff -ru kernel2.6.38/Makefile kernel3.4/Makefile +--- kernel2.6.38/Makefile 2012-04-13 01:41:43.000000000 -0400 ++++ kernel3.4/Makefile 2012-07-11 11:32:27.000000000 -0400 +@@ -1,6 +1,6 @@ + TARGET = oprofile.ko + +-MDIR = $(if $(shell uname -m | grep x86_64),arch/x86/oprofile,arch/x86/oprofile) ++MDIR = arch/x86/oprofile + + DRIVER_OBJS = oprof.o cpu_buffer.o buffer_sync.o \ + event_buffer.o oprofile_files.o \ +@@ -16,7 +16,8 @@ + CURRENT = $(shell uname -r) + ARCH = $(if $(shell uname -m | grep x86_64),64,32) + KERN_ARCH = $(if $(shell uname -m | grep x86_64),x86_64,i386) +-KDIR = /lib/modules/$(CURRENT)/build ++SYS_KDIR = /lib/modules/$(CURRENT)/build ++KDIR = $(PWD)/../build + PWD = $(shell pwd) + DEST = /lib/modules/$(CURRENT)/kernel/$(MDIR) + USE_INTERNAL_ERRATA = $(if $(shell ls ../internal/errata.h 2> /dev/null),1,0) +@@ -39,6 +40,8 @@ + all: default + + default: ++ rm -rf $(KDIR) ++ cp -r $(SYS_KDIR)/ $(KDIR) + make -C $(KDIR) SUBDIRS=$(PWD) CFLAGS_MODULE+="-DMODULE -DUSE_INTERNAL_ERRATA=$(USE_INTERNAL_ERRATA)" modules ARCH=$(KERN_ARCH) + + install: +@@ -52,13 +55,12 @@ + + uninstall: + @echo "... Restore original oprofile.ko." +- @mv -v $(DEST)/$(TARGET).orig $(DEST)/$(TARGET) ++ @mv -v $(DEST)/$(TARGET).orig $(DEST)/$(TARGET) + + clean: + rm -f *.o oprofile.ko .*.cmd .*.flags *.mod.c + + prebuild: + cp $(TARGET) ../prebuilds/$(CURRENT)_$(ARCH).ko +- + +--include $(KDIR)/Rules.make ++-include $(SYS_KDIR)/Rules.make +Only in kernel3.4/: modules.order +Only in kernel3.4/: Module.symvers +diff -ru kernel2.6.38/nmi_int.c kernel3.4/nmi_int.c +--- kernel2.6.38/nmi_int.c 2012-04-13 01:41:43.000000000 -0400 ++++ kernel3.4/nmi_int.c 2012-07-11 11:32:27.000000000 -0400 +@@ -16,7 +16,6 @@ + #include + #include + #include "oprofile.h" +-#include + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0) + #include + #endif +diff -ru kernel2.6.38/oprofilefs.c kernel3.4/oprofilefs.c +--- kernel2.6.38/oprofilefs.c 2012-04-13 01:41:43.000000000 -0400 ++++ kernel3.4/oprofilefs.c 2012-07-11 11:32:27.000000000 -0400 +@@ -244,7 +244,7 @@ + return -ENOMEM; + root_inode->i_op = &simple_dir_inode_operations; + root_inode->i_fop = &simple_dir_operations; +- root_dentry = d_alloc_root(root_inode); ++ root_dentry = d_make_root(root_inode); + if (!root_dentry) { + iput(root_inode); + return -ENOMEM; +Only in kernel3.4/: .tmp_versions diff --git a/~lukeshu/not-working/codeanalyst/skipSetup.patch b/~lukeshu/not-working/codeanalyst/skipSetup.patch new file mode 100755 index 000000000..fdc9bf42f --- /dev/null +++ b/~lukeshu/not-working/codeanalyst/skipSetup.patch @@ -0,0 +1,68 @@ +diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca/Makefile.am CodeAnalyst-3_3_18_0361-Public/src/ca/Makefile.am +*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca/Makefile.am 2012-04-13 02:41:43.000000000 -0300 +--- CodeAnalyst-3_3_18_0361-Public/src/ca/Makefile.am 2012-04-22 20:44:07.437917684 -0300 +*************** +*** 8,19 **** + # FIXME [3.0] diffgui \ + # $(CA_RELEASE_TYPE) + +! install-exec-hook: +! @if test -e "scripts/Setup.sh"; then \ +! scripts/Setup.sh $(DESTDIR)$(prefix); \ +! fi + +! uninstall-hook: +! @if test -e "scripts/Uninstall.sh"; then \ +! scripts/Uninstall.sh $(DESTDIR)$(prefix);\ +! fi +--- 8,19 ---- + # FIXME [3.0] diffgui \ + # $(CA_RELEASE_TYPE) + +! #install-exec-hook: +! # @if test -e "scripts/Setup.sh"; then \ +! # scripts/Setup.sh $(DESTDIR)$(prefix); \ +! # fi + +! #uninstall-hook: +! # @if test -e "scripts/Uninstall.sh"; then \ +! # scripts/Uninstall.sh $(DESTDIR)$(prefix);\ +! # fi +diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca_agent/jvmpi/Makefile.am CodeAnalyst-3_3_18_0361-Public/src/ca_agent/jvmpi/Makefile.am +*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca_agent/jvmpi/Makefile.am 2012-04-13 02:41:43.000000000 -0300 +--- CodeAnalyst-3_3_18_0361-Public/src/ca_agent/jvmpi/Makefile.am 2012-04-22 20:47:21.604593511 -0300 +*************** +*** 15,20 **** + libCAJVMPIA_so_SOURCES = \ + jpa.cpp + +! install-exec-hook: +! @/sbin/ldconfig + +--- 15,20 ---- + libCAJVMPIA_so_SOURCES = \ + jpa.cpp + +! #install-exec-hook: +! # @/sbin/ldconfig + +diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/Makefile.am CodeAnalyst-3_3_18_0361-Public/src/Makefile.am +*** CodeAnalyst-3_3_18_0361-Public.orig/src/Makefile.am 2012-04-13 02:41:43.000000000 -0300 +--- CodeAnalyst-3_3_18_0361-Public/src/Makefile.am 2012-04-22 20:44:57.674586720 -0300 +*************** +*** 8,21 **** + install-exec-hook: + @if test -e "${LIBDWARF_DIR}libdwarf.so"; then \ + install -pD -m 755 ${LIBDWARF_DIR}libdwarf.so $(DESTDIR)$(prefix)/lib/libdwarf.so ; \ +- /sbin/ldconfig ;\ + fi + + uninstall-hook: + @if test -e "${LIBDWARF_DIR}libdwarf.so"; then \ + if test -e "$(DESTDIR)$(prefix)/lib/libdwarf.so"; then \ + rm -f $(DESTDIR)$(prefix)/lib/libdwarf.so ; \ +- /sbin/ldconfig ; \ + fi ; \ + fi + +--- 8,19 ---- -- cgit v1.2.3