added my Recipes
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
From ffc8ba8d324243a923abe48e9758adecb03d24a4 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Kjellerstedt <pkj@axis.com>
|
||||
Date: Tue, 12 Feb 2019 21:25:23 +0100
|
||||
Subject: [PATCH] atop.daily, atop.init, atop-pm.sh: Avoid using bash
|
||||
|
||||
Avoid using bash and bashisms when not necesary. On some systems,
|
||||
e.g., embedded products, bash may not be available by default.
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/Atoptool/atop/pull/50]
|
||||
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
|
||||
---
|
||||
atop-pm.sh | 2 +-
|
||||
atop.daily | 4 ++--
|
||||
atop.init | 4 ++--
|
||||
3 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
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 57a9507..fe5a11b 100755
|
||||
--- a/atop.daily
|
||||
+++ b/atop.daily
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/bin/sh
|
||||
|
||||
LOGOPTS="-R" # default options
|
||||
LOGINTERVAL=600 # default interval in seconds
|
||||
@@ -38,7 +38,7 @@ then
|
||||
|
||||
while ps -p `cat "$PIDFILE"` > /dev/null
|
||||
do
|
||||
- let CNT+=1
|
||||
+ CNT=$((CNT + 1))
|
||||
|
||||
if [ $CNT -gt 5 ]
|
||||
then
|
||||
diff --git a/atop.init b/atop.init
|
||||
index e6e11dc..03c3f02 100755
|
||||
--- a/atop.init
|
||||
+++ b/atop.init
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/bin/sh
|
||||
#
|
||||
# atop Startup script for the Atop process logging in background
|
||||
#
|
||||
@@ -47,7 +47,7 @@ case "$1" in
|
||||
|
||||
while ps -p `cat $PIDFILE` > /dev/null
|
||||
do
|
||||
- let CNT+=1
|
||||
+ CNT=$((CNT + 1))
|
||||
|
||||
if [ $CNT -gt 5 ]
|
||||
then
|
||||
--
|
||||
2.12.0
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
From d9498d10d0e8241749835dbc9fa229465d4fdfd7 Mon Sep 17 00:00:00 2001
|
||||
From: Kai Kang <kai.kang@windriver.com>
|
||||
Date: Wed, 6 Feb 2019 13:58:04 +0000
|
||||
Subject: [PATCH] Fix permissions
|
||||
|
||||
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>
|
||||
---
|
||||
Makefile | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 3bf5929..1221ee4 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -72,7 +72,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:
|
||||
#
|
||||
@@ -97,11 +97,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
|
||||
#
|
||||
#
|
||||
@@ -145,7 +145,7 @@ genericinstall: atop atopacctd atopconvert
|
||||
#
|
||||
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
|
||||
@@ -159,7 +159,7 @@ genericinstall: atop atopacctd atopconvert
|
||||
chown root $(DESTDIR)$(BINPATH)/atopconvert
|
||||
chmod 0711 $(DESTDIR)$(BINPATH)/atopconvert
|
||||
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/atopconvert.1 $(DESTDIR)$(MAN1PATH)
|
||||
@@ -0,0 +1,34 @@
|
||||
From bdd068873ed0979027c21773939bdb18046a8756 Mon Sep 17 00:00:00 2001
|
||||
From: Kai Kang <kai.kang@windriver.com>
|
||||
Date: Wed, 6 Feb 2019 13:58:04 +0000
|
||||
Subject: [PATCH] sysvinit: Implement status
|
||||
|
||||
Implement the sub-command status.
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Kai Kang <kai.kang@windriver.com>
|
||||
---
|
||||
atop.init | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/atop.init b/atop.init
|
||||
index e6e11dc..e7b226d 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)
|
||||
@@ -0,0 +1 @@
|
||||
d root root 0755 /var/volatile/log/atop none
|
||||
@@ -0,0 +1 @@
|
||||
d /var/volatile/log/atop - - - -
|
||||
64
meta-openembedded/meta-oe/recipes-support/atop/atop_2.4.0.bb
Normal file
64
meta-openembedded/meta-oe/recipes-support/atop/atop_2.4.0.bb
Normal file
@@ -0,0 +1,64 @@
|
||||
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 = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
|
||||
|
||||
DEPENDS = "ncurses zlib"
|
||||
|
||||
SRC_URI = "http://www.atoptool.nl/download/${BP}.tar.gz \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'file://volatiles.atop.conf', 'file://volatiles.99_atop', d)} \
|
||||
file://fix-permissions.patch \
|
||||
file://sysvinit-implement-status.patch \
|
||||
file://0001-atop.daily-atop.init-atop-pm.sh-Avoid-using-bash.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "1077da884ed94f2bc3c81ac3ab970436"
|
||||
SRC_URI[sha256sum] = "be1c010a77086b7d98376fce96514afcd73c3f20a8d1fe01520899ff69a73d69"
|
||||
|
||||
CVE_CHECK_IGNORE += "\
|
||||
CVE-2011-3618 \
|
||||
"
|
||||
|
||||
do_compile() {
|
||||
oe_runmake all
|
||||
}
|
||||
|
||||
do_install() {
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
||||
make DESTDIR=${D} VERS=${PV} 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=${PV} 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
|
||||
|
||||
# /var/log/atop will be created in runtime
|
||||
rm -rf ${D}${localstatedir}/log
|
||||
rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
|
||||
|
||||
# remove atopacct related files
|
||||
rm -rf ${D}${sbindir} ${D}${mandir}/man8
|
||||
}
|
||||
|
||||
inherit systemd
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "atop.service atopgpu.service"
|
||||
SYSTEMD_AUTO_ENABLE = "disable"
|
||||
|
||||
FILES:${PN} += "${systemd_unitdir}/system-sleep"
|
||||
|
||||
RDEPENDS:${PN} = "procps"
|
||||
Reference in New Issue
Block a user