summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-oe/recipes-support/atop
diff options
context:
space:
mode:
authorDave Cobbley <david.j.cobbley@linux.intel.com>2018-08-14 10:05:37 -0700
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-08-22 21:26:31 -0400
commiteb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch)
treede291a73dc37168da6370e2cf16c347d1eba9df8 /meta-openembedded/meta-oe/recipes-support/atop
parent9c3cf826d853102535ead04cebc2d6023eff3032 (diff)
downloadtalos-openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.gz
talos-openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.zip
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-support/atop')
-rw-r--r--meta-openembedded/meta-oe/recipes-support/atop/atop/0001-include-missing-header-files.patch97
-rw-r--r--meta-openembedded/meta-oe/recipes-support/atop/atop/fix-permissions.patch52
-rw-r--r--meta-openembedded/meta-oe/recipes-support/atop/atop/remove-bashisms.patch33
-rw-r--r--meta-openembedded/meta-oe/recipes-support/atop/atop/sysvinit-implement-status.patch27
-rw-r--r--meta-openembedded/meta-oe/recipes-support/atop/atop/volatiles.99_atop1
-rw-r--r--meta-openembedded/meta-oe/recipes-support/atop/atop/volatiles.atop.conf1
-rw-r--r--meta-openembedded/meta-oe/recipes-support/atop/atop_2.2.3.bb63
7 files changed, 274 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-support/atop/atop/0001-include-missing-header-files.patch b/meta-openembedded/meta-oe/recipes-support/atop/atop/0001-include-missing-header-files.patch
new file mode 100644
index 000000000..3708f60ba
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/atop/atop/0001-include-missing-header-files.patch
@@ -0,0 +1,97 @@
+From 7b651793269b6b86f12c43c30b751b86def27222 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 18 Mar 2017 17:56:40 -0700
+Subject: [PATCH] include missing header files
+
+fixes build with musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ deviate.c | 1 +
+ procdbase.c | 2 +-
+ showgeneric.c | 2 +-
+ showlinux.c | 2 +-
+ showprocs.c | 2 +-
+ showsys.c | 2 +-
+ 6 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/deviate.c b/deviate.c
+index 7cf1b49..8e615af 100644
+--- a/deviate.c
++++ b/deviate.c
+@@ -178,6 +178,7 @@ static const char rcsid[] = "$Id: deviate.c,v 1.45 2010/10/23 14:02:03 gerlof Ex
+ #include <stdio.h>
+ #include <errno.h>
+ #include <fcntl.h>
++#include <stdlib.h>
+ #include <unistd.h>
+ #include <limits.h>
+ #include <memory.h>
+diff --git a/procdbase.c b/procdbase.c
+index 9cab347..0487d26 100644
+--- a/procdbase.c
++++ b/procdbase.c
+@@ -67,7 +67,7 @@ static const char rcsid[] = "$Id: procdbase.c,v 1.8 2010/04/23 12:19:35 gerlof E
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <string.h>
+-#include <malloc.h>
++#include <stdlib.h>
+
+ #include "atop.h"
+ #include "photoproc.h"
+diff --git a/showgeneric.c b/showgeneric.c
+index 775afa8..3d5be0e 100644
+--- a/showgeneric.c
++++ b/showgeneric.c
+@@ -268,7 +268,7 @@ static const char rcsid[] = "$Id: showgeneric.c,v 1.71 2010/10/25 19:08:32 gerlo
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <string.h>
+-#include <termio.h>
++#include <termios.h>
+ #include <unistd.h>
+ #include <stdarg.h>
+ #include <curses.h>
+diff --git a/showlinux.c b/showlinux.c
+index 6e60754..aba2ee6 100644
+--- a/showlinux.c
++++ b/showlinux.c
+@@ -274,7 +274,7 @@ static const char rcsid[] = "$Id: showlinux.c,v 1.70 2010/10/23 14:04:12 gerlof
+ #include <string.h>
+ #include <errno.h>
+ #include <fcntl.h>
+-#include <termio.h>
++#include <termios.h>
+ #include <unistd.h>
+ #include <stdarg.h>
+ #include <curses.h>
+diff --git a/showprocs.c b/showprocs.c
+index 5194524..f0169ad 100644
+--- a/showprocs.c
++++ b/showprocs.c
+@@ -94,7 +94,7 @@ static const char rcsid[] = "$Id: showprocs.c,v 1.15 2011/09/05 11:44:16 gerlof
+ #include <string.h>
+ #include <errno.h>
+ #include <fcntl.h>
+-#include <termio.h>
++#include <termios.h>
+ #include <unistd.h>
+ #include <stdarg.h>
+ #include <curses.h>
+diff --git a/showsys.c b/showsys.c
+index 26331be..5a05fe5 100644
+--- a/showsys.c
++++ b/showsys.c
+@@ -80,7 +80,7 @@ static const char rcsid[] = "XXXXXX";
+ #include <string.h>
+ #include <errno.h>
+ #include <fcntl.h>
+-#include <termio.h>
++#include <termios.h>
+ #include <unistd.h>
+ #include <stdarg.h>
+ #include <curses.h>
+--
+2.12.0
+
diff --git a/meta-openembedded/meta-oe/recipes-support/atop/atop/fix-permissions.patch b/meta-openembedded/meta-oe/recipes-support/atop/atop/fix-permissions.patch
new file mode 100644
index 000000000..ee7419993
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/atop/atop/fix-permissions.patch
@@ -0,0 +1,52 @@
+Update permissions of executable files that remove setuid bit and make everyone
+could read.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff --git a/Makefile b/Makefile
+index a65b9b6..21d9828 100644
+--- a/Makefile
++++ b/Makefile
+@@ -66,7 +66,7 @@ systemdinstall: genericinstall
+ chmod 0644 $(DESTDIR)$(SYSDPATH)/atopacct.service
+ cp atop.cronsystemd $(DESTDIR)$(CRNPATH)/atop
+ cp atop-pm.sh $(DESTDIR)$(PMPATHD)
+- chmod 0711 $(DESTDIR)$(PMPATHD)/atop-pm.sh
++ chmod 0755 $(DESTDIR)$(PMPATHD)/atop-pm.sh
+ #
+ # only when making on target system:
+ #
+@@ -91,11 +91,11 @@ sysvinstall: genericinstall
+ #
+ if [ -d $(DESTDIR)$(PMPATH1) ]; \
+ then cp 45atoppm $(DESTDIR)$(PMPATH1); \
+- chmod 0711 $(DESTDIR)$(PMPATH1)/45atoppm; \
++ chmod 0755 $(DESTDIR)$(PMPATH1)/45atoppm; \
+ fi
+ if [ -d $(DESTDIR)$(PMPATH2) ]; \
+ then cp 45atoppm $(DESTDIR)$(PMPATH2); \
+- chmod 0711 $(DESTDIR)$(PMPATH2)/45atoppm; \
++ chmod 0755 $(DESTDIR)$(PMPATH2)/45atoppm; \
+ fi
+ #
+ #
+@@ -139,7 +139,7 @@ genericinstall: atop atopacctd
+ #
+ cp atop $(DESTDIR)$(BINPATH)/atop
+ chown root $(DESTDIR)$(BINPATH)/atop
+- chmod 04711 $(DESTDIR)$(BINPATH)/atop
++ chmod 0755 $(DESTDIR)$(BINPATH)/atop
+ ln -sf atop $(DESTDIR)$(BINPATH)/atopsar
+ cp atopacctd $(DESTDIR)$(SBINPATH)/atopacctd
+ chown root $(DESTDIR)$(SBINPATH)/atopacctd
+@@ -147,7 +147,7 @@ genericinstall: atop atopacctd
+ cp atop $(DESTDIR)$(BINPATH)/atop-$(VERS)
+ ln -sf atop-$(VERS) $(DESTDIR)$(BINPATH)/atopsar-$(VERS)
+ cp atop.daily $(DESTDIR)$(SCRPATH)
+- chmod 0711 $(DESTDIR)$(SCRPATH)/atop.daily
++ chmod 0755 $(DESTDIR)$(SCRPATH)/atop.daily
+ cp man/atop.1 $(DESTDIR)$(MAN1PATH)
+ cp man/atopsar.1 $(DESTDIR)$(MAN1PATH)
+ cp man/atoprc.5 $(DESTDIR)$(MAN5PATH)
diff --git a/meta-openembedded/meta-oe/recipes-support/atop/atop/remove-bashisms.patch b/meta-openembedded/meta-oe/recipes-support/atop/atop/remove-bashisms.patch
new file mode 100644
index 000000000..f1fcbfed7
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/atop/atop/remove-bashisms.patch
@@ -0,0 +1,33 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff --git a/atop-pm.sh b/atop-pm.sh
+index 7f41a86..3ff4ab5 100755
+--- a/atop-pm.sh
++++ b/atop-pm.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ case "$1" in
+ pre) /usr/bin/systemctl stop atop
+diff --git a/atop.daily b/atop.daily
+index 24d33bd..f29bd94 100755
+--- a/atop.daily
++++ b/atop.daily
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ CURDAY=`date +%Y%m%d`
+ LOGPATH=/var/log/atop
+@@ -16,7 +16,7 @@ then
+
+ while ps -p `cat $PIDFILE` > /dev/null
+ do
+- let CNT+=1
++ CNT=$((CNT+1))
+
+ if [ $CNT -gt 5 ]
+ then
diff --git a/meta-openembedded/meta-oe/recipes-support/atop/atop/sysvinit-implement-status.patch b/meta-openembedded/meta-oe/recipes-support/atop/atop/sysvinit-implement-status.patch
new file mode 100644
index 000000000..5994d3e08
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/atop/atop/sysvinit-implement-status.patch
@@ -0,0 +1,27 @@
+Implement the sub-command status.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff --git a/atop.init b/atop.init
+index 108bdc5..9f89fad 100755
+--- a/atop.init
++++ b/atop.init
+@@ -18,6 +18,8 @@
+ # Check existance of binaries
+ [ -f /usr/bin/atop ] || exit 0
+
++[ -f /etc/init.d/functions ] && . /etc/init.d/functions
++
+ PIDFILE=/var/run/atop.pid
+ RETVAL=0
+
+@@ -63,6 +65,7 @@ case "$1" in
+ ;;
+
+ status)
++ status atop
+ ;;
+
+ reload)
diff --git a/meta-openembedded/meta-oe/recipes-support/atop/atop/volatiles.99_atop b/meta-openembedded/meta-oe/recipes-support/atop/atop/volatiles.99_atop
new file mode 100644
index 000000000..24ea3f205
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/atop/atop/volatiles.99_atop
@@ -0,0 +1 @@
+d root root 0755 /var/volatile/log/atop none
diff --git a/meta-openembedded/meta-oe/recipes-support/atop/atop/volatiles.atop.conf b/meta-openembedded/meta-oe/recipes-support/atop/atop/volatiles.atop.conf
new file mode 100644
index 000000000..2f230004d
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/atop/atop/volatiles.atop.conf
@@ -0,0 +1 @@
+d /var/volatile/log/atop - - - -
diff --git a/meta-openembedded/meta-oe/recipes-support/atop/atop_2.2.3.bb b/meta-openembedded/meta-oe/recipes-support/atop/atop_2.2.3.bb
new file mode 100644
index 000000000..1ab9e7cf9
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/atop/atop_2.2.3.bb
@@ -0,0 +1,63 @@
+SUMMARY = "Monitor for system resources and process activity"
+DESCRIPTION = "Atop is an ASCII full-screen performance monitor for Linux that \
+is capable of reporting the activity of all processes (even if processes have \
+finished during the interval), daily logging of system and process activity for \
+long-term analysis, highlighting overloaded system resources by using colors, \
+etc. At regular intervals, it shows system-level activity related to the CPU, \
+memory, swap, disks (including LVM) and network layers, and for every process \
+(and thread) it shows e.g. the CPU utilization, memory growth, disk \
+utilization, priority, username, state, and exit code."
+HOMEPAGE = "http://www.atoptool.nl"
+SECTION = "console/utils"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
+
+DEPENDS = "ncurses zlib"
+
+ATOP_VER = "${@'-'.join(d.getVar('PV').rsplit('.', 1))}"
+
+SRC_URI = " \
+ http://www.atoptool.nl/download/${BPN}-${ATOP_VER}.tar.gz \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'file://volatiles.atop.conf', 'file://volatiles.99_atop', d)} \
+ file://0001-include-missing-header-files.patch \
+ file://remove-bashisms.patch \
+ file://fix-permissions.patch \
+ file://sysvinit-implement-status.patch \
+"
+
+SRC_URI[md5sum] = "034dc1544f2ec4e4d2c739d320dc326d"
+SRC_URI[sha256sum] = "c785b8a2355be28b3de6b58a8ea4c4fcab8fadeaa57a99afeb03c66fac8e055d"
+
+S = "${WORKDIR}/${BPN}-${ATOP_VER}"
+
+do_compile() {
+ oe_runmake all
+}
+
+do_install() {
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ make DESTDIR=${D} VERS=${ATOP_VER} SYSDPATH=${systemd_system_unitdir} \
+ PMPATHD=${systemd_unitdir}/system-sleep systemdinstall
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ install -m 644 ${WORKDIR}/volatiles.atop.conf ${D}${sysconfdir}/tmpfiles.d/atop.conf
+ rm -f ${D}${systemd_system_unitdir}/atopacct.service
+ else
+ make DESTDIR=${D} VERS=${ATOP_VER} sysvinstall
+ install -d ${D}${sysconfdir}/default/volatiles
+ install -m 644 ${WORKDIR}/volatiles.99_atop ${D}${sysconfdir}/default/volatiles/99_atop
+ rm -f ${D}${sysconfdir}/init.d/atopacct
+ fi
+
+ # remove atopacct related files
+ rm -rf ${D}${sbindir} ${D}${mandir}/man8
+}
+
+inherit systemd
+
+SYSTEMD_SERVICE_${PN} = "atop.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+FILES_${PN} += "${systemd_unitdir}/system-sleep"
+
+RDEPENDS_${PN} = "procps"
OpenPOWER on IntegriCloud