diff --git a/srcpkgs/atop/patches/atop-bb-compat.patch b/srcpkgs/atop/patches/atop-bb-compat.patch new file mode 100644 index 00000000000..d967423aac5 --- /dev/null +++ b/srcpkgs/atop/patches/atop-bb-compat.patch @@ -0,0 +1,35 @@ +diff --git atop.daily atop.daily +index c72214c..ac4b3b7 100755 +--- atop.daily ++++ atop.daily +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + CURDAY=`date +%Y%m%d` + LOGPATH=/var/log/atop + BINPATH=/usr/bin +@@ -7,15 +7,20 @@ INTERVAL=600 # interval 10 minutes + + # verify if atop still runs for daily logging + # +-if [ -e $PIDFILE ] && ps -p `cat $PIDFILE` | grep 'atop$' > /dev/null ++pid= ++if [ -e $PIDFILE ]; then ++ pid=$(cat $PIDFILE) ++fi ++ ++if [ -n "$pid" ] && [ -d /proc/$pid ] + then +- kill -USR2 `cat $PIDFILE` # final sample and terminate ++ kill -USR2 $pid # final sample and terminate + + CNT=0 + +- while ps -p `cat $PIDFILE` > /dev/null ++ while [ -d /proc/$pid ] + do +- let CNT+=1 ++ CNT=$(($CNT + 1)) + + if [ $CNT -gt 5 ] + then diff --git a/srcpkgs/atop/patches/musl-fix-includes.patch b/srcpkgs/atop/patches/musl-fix-includes.patch new file mode 100644 index 00000000000..f59880b15d1 --- /dev/null +++ b/srcpkgs/atop/patches/musl-fix-includes.patch @@ -0,0 +1,65 @@ +--- deviate.c.orig ++++ deviate.c +@@ -178,6 +178,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- procdbase.c.orig ++++ procdbase.c +@@ -67,7 +67,7 @@ + #include + #include + #include +-#include ++#include + + #include "atop.h" + #include "photoproc.h" +--- showgeneric.c.orig ++++ showgeneric.c +@@ -268,7 +268,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +--- showlinux.c.orig ++++ showlinux.c +@@ -274,7 +274,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +--- showprocs.c.orig ++++ showprocs.c +@@ -94,7 +94,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +--- showsys.c.orig ++++ showsys.c +@@ -80,7 +80,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include diff --git a/srcpkgs/atop/template b/srcpkgs/atop/template index 74ea6bc2443..0567858bf7c 100644 --- a/srcpkgs/atop/template +++ b/srcpkgs/atop/template @@ -1,7 +1,7 @@ # Template file for 'atop' pkgname=atop version=2.1 -revision=2 +revision=3 build_style=gnu-makefile makedepends="ncurses-devel zlib-devel" short_desc="A system and process level monitor"