Skip to content
Snippets Groups Projects
Unverified Commit 5c677795 authored by tho3.nguyen's avatar tho3.nguyen Committed by Khem Raj
Browse files

atop: upgrade 2.4.0 -> 2.11.0


Drop patch already merged
Add patch to fix build with gcc-15

Signed-off-by: default avatartho3.nguyen <tho3.nguyen@lge.com>
Signed-off-by: default avatarKhem Raj <raj.khem@gmail.com>
parent c53717dd
No related branches found
No related tags found
No related merge requests found
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
...@@ -8,24 +8,32 @@ everyone could read. ...@@ -8,24 +8,32 @@ everyone could read.
Upstream-Status: Inappropriate [embedded specific] Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Tho Dat Nguyen <tho3.nguyen@lge.com>
--- ---
Makefile | 10 +++++----- Makefile | 16 ++++++++--------
1 file changed, 5 insertions(+), 5 deletions(-) 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile diff --git a/Makefile b/Makefile
index 3bf5929..1221ee4 100644 index a6f196b..7786f93 100644
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -72,7 +72,7 @@ systemdinstall: genericinstall @@ -77,7 +77,7 @@ install: genericinstall
chmod 0644 $(DESTDIR)$(SYSDPATH)/atopacct.service cp atopacct.service $(DESTDIR)$(SYSDPATH)
cp atop.cronsystemd $(DESTDIR)$(CRNPATH)/atop chmod 0644 $(DESTDIR)$(SYSDPATH)/atopacct.service
cp atop-pm.sh $(DESTDIR)$(PMPATHD) cp atop-pm.sh $(DESTDIR)$(PMPATHD)
- chmod 0711 $(DESTDIR)$(PMPATHD)/atop-pm.sh - chmod 0711 $(DESTDIR)$(PMPATHD)/atop-pm.sh
+ chmod 0755 $(DESTDIR)$(PMPATHD)/atop-pm.sh + chmod 0755 $(DESTDIR)$(PMPATHD)/atop-pm.sh
# #
# only when making on target system: # only when making on target system:
# #
@@ -97,11 +97,11 @@ sysvinstall: genericinstall @@ -107,17 +107,17 @@ sysvinstall: genericinstall
cp atopacct.init $(DESTDIR)$(INIPATH)/atopacct
cp atop.cronsysv $(DESTDIR)$(CRNPATH)/atop
cp atop.daily $(DESTDIR)$(SCRPATH)
- chmod 0711 $(DESTDIR)$(SCRPATH)/atop.daily
+ chmod 0755 $(DESTDIR)$(SCRPATH)/atop.daily
touch $(DESTDIR)$(LOGPATH)/dummy_before
touch $(DESTDIR)$(LOGPATH)/dummy_after
# #
if [ -d $(DESTDIR)$(PMPATH1) ]; \ if [ -d $(DESTDIR)$(PMPATH1) ]; \
then cp 45atoppm $(DESTDIR)$(PMPATH1); \ then cp 45atoppm $(DESTDIR)$(PMPATH1); \
...@@ -39,21 +47,27 @@ index 3bf5929..1221ee4 100644 ...@@ -39,21 +47,27 @@ index 3bf5929..1221ee4 100644
fi fi
# #
# #
@@ -145,7 +145,7 @@ genericinstall: atop atopacctd atopconvert @@ -160,7 +160,7 @@ genericinstall: atop atopacctd atopconvert atopcat atophide
chmod 644 $(DESTDIR)$(DEFPATH)/atop
# #
cp atop $(DESTDIR)$(BINPATH)/atop cp atop $(DESTDIR)$(BINPATH)/atop
chown root $(DESTDIR)$(BINPATH)/atop - chmod 0711 $(DESTDIR)$(BINPATH)/atop
- chmod 04711 $(DESTDIR)$(BINPATH)/atop
+ chmod 0755 $(DESTDIR)$(BINPATH)/atop + chmod 0755 $(DESTDIR)$(BINPATH)/atop
ln -sf atop $(DESTDIR)$(BINPATH)/atopsar ln -sf atop $(DESTDIR)$(BINPATH)/atopsar
cp atopacctd $(DESTDIR)$(SBINPATH)/atopacctd cp atopacctd $(DESTDIR)$(SBINPATH)/atopacctd
chown root $(DESTDIR)$(SBINPATH)/atopacctd chmod 0700 $(DESTDIR)$(SBINPATH)/atopacctd
@@ -159,7 +159,7 @@ genericinstall: atop atopacctd atopconvert @@ -169,11 +169,11 @@ genericinstall: atop atopacctd atopconvert atopcat atophide
chown root $(DESTDIR)$(BINPATH)/atopconvert cp atop $(DESTDIR)$(BINPATH)/atop-$(VERS)
chmod 0711 $(DESTDIR)$(BINPATH)/atopconvert ln -sf atop-$(VERS) $(DESTDIR)$(BINPATH)/atopsar-$(VERS)
cp atop.daily $(DESTDIR)$(SCRPATH) cp atopconvert $(DESTDIR)$(BINPATH)/atopconvert
- chmod 0711 $(DESTDIR)$(SCRPATH)/atop.daily - chmod 0711 $(DESTDIR)$(BINPATH)/atopconvert
+ chmod 0755 $(DESTDIR)$(SCRPATH)/atop.daily + chmod 0755 $(DESTDIR)$(BINPATH)/atopconvert
cp atopcat $(DESTDIR)$(BINPATH)/atopcat
- chmod 0711 $(DESTDIR)$(BINPATH)/atopcat
+ chmod 0755 $(DESTDIR)$(BINPATH)/atopcat
cp atophide $(DESTDIR)$(BINPATH)/atophide
- chmod 0711 $(DESTDIR)$(BINPATH)/atophide
+ chmod 0755 $(DESTDIR)$(BINPATH)/atophide
cp man/atop.1 $(DESTDIR)$(MAN1PATH) cp man/atop.1 $(DESTDIR)$(MAN1PATH)
cp man/atopsar.1 $(DESTDIR)$(MAN1PATH) cp man/atopsar.1 $(DESTDIR)$(MAN1PATH)
cp man/atopconvert.1 $(DESTDIR)$(MAN1PATH) cp man/atopconvert.1 $(DESTDIR)$(MAN1PATH)
...@@ -13,20 +13,23 @@ SECTION = "console/utils" ...@@ -13,20 +13,23 @@ SECTION = "console/utils"
LICENSE = "GPL-2.0-only" LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
DEPENDS = "ncurses zlib" inherit pkgconfig
DEPENDS = "ncurses zlib glib-2.0"
SRC_URI = "http://www.atoptool.nl/download/${BP}.tar.gz \ 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)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'file://volatiles.atop.conf', 'file://volatiles.99_atop', d)} \
file://fix-permissions.patch \ file://fix-permissions.patch \
file://sysvinit-implement-status.patch \ file://sysvinit-implement-status.patch \
file://0001-atop.daily-atop.init-atop-pm.sh-Avoid-using-bash.patch \ file://0001-Redefine-function-prototypes-solves-issue-322.patch \
" "
SRC_URI[sha256sum] = "be1c010a77086b7d98376fce96514afcd73c3f20a8d1fe01520899ff69a73d69" SRC_URI[sha256sum] = "9b94c666602efff7bf402ecce706c347f38c39cb63498f9d39626861e5646e20"
UPSTREAM_CHECK_URI = "https://atoptool.nl/downloadatop.php" UPSTREAM_CHECK_URI = "https://atoptool.nl/downloadatop.php"
UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+).tar" UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+).tar"
CVE_STATUS[CVE-2011-3618] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." CVE_STATUS[CVE-2011-3618] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions."
TARGET_CC_ARCH += "${LDFLAGS}"
do_compile() { do_compile() {
oe_runmake all oe_runmake all
...@@ -35,7 +38,7 @@ do_compile() { ...@@ -35,7 +38,7 @@ do_compile() {
do_install() { do_install() {
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
make DESTDIR=${D} VERS=${PV} SYSDPATH=${systemd_system_unitdir} \ make DESTDIR=${D} VERS=${PV} SYSDPATH=${systemd_system_unitdir} \
PMPATHD=${systemd_unitdir}/system-sleep systemdinstall PMPATHD=${systemd_unitdir}/system-sleep install
install -d ${D}${sysconfdir}/tmpfiles.d install -d ${D}${sysconfdir}/tmpfiles.d
install -m 644 ${UNPACKDIR}/volatiles.atop.conf ${D}${sysconfdir}/tmpfiles.d/atop.conf install -m 644 ${UNPACKDIR}/volatiles.atop.conf ${D}${sysconfdir}/tmpfiles.d/atop.conf
rm -f ${D}${systemd_system_unitdir}/atopacct.service rm -f ${D}${systemd_system_unitdir}/atopacct.service
...@@ -56,9 +59,9 @@ do_install() { ...@@ -56,9 +59,9 @@ do_install() {
inherit systemd inherit systemd
SYSTEMD_SERVICE:${PN} = "atop.service atopgpu.service" SYSTEMD_SERVICE:${PN} = "atop.service atopgpu.service atop-rotate.service"
SYSTEMD_AUTO_ENABLE = "disable" SYSTEMD_AUTO_ENABLE = "disable"
FILES:${PN} += "${systemd_unitdir}/system-sleep" FILES:${PN} += "${systemd_unitdir}/system-sleep ${systemd_system_unitdir}/atop-rotate.timer"
RDEPENDS:${PN} = "procps" RDEPENDS:${PN} = "procps"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment