main/atop: upgrade to 2.10.0

This commit is contained in:
Celeste 2024-01-05 03:01:08 +00:00 committed by J0WI
parent 48a480fc32
commit 5ae11b5e63
3 changed files with 5 additions and 94 deletions

View File

@ -1,21 +1,19 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=atop
pkgver=2.9.0
pkgrel=2
pkgver=2.10.0
pkgrel=0
pkgdesc="Resource-specific view of processes"
url="https://www.atoptool.nl/"
arch="all"
license="GPL-2.0-or-later"
makedepends="zlib-dev ncurses-dev linux-headers"
makedepends="glib-dev linux-headers ncurses-dev zlib-dev"
subpackages="$pkgname-doc $pkgname-openrc"
source="$pkgname-$pkgver.tgz::https://www.atoptool.nl/download/atop-$pkgver.tar.gz
atop-daily-bb.patch
atop-include-macros.patch
make-cron-background.patch
format-sec.patch
gcc13.patch
atop.initd
"
"
options="!check"
prepare() {
@ -42,11 +40,9 @@ package() {
}
sha512sums="
a79eb142b16c32d43ee3220bdaf3a1b3861b713bfd86f4e7d2241cadf84f5d09a054289442e4d91499852069735b8cd16760c6fc46f65639fe429ceb68534544 atop-2.9.0.tgz
72a9307ed0cfa9c0157c81e8acbb4850ae339b50481ce2e1b828cad4b3354bfc8f56866c9c4df72ea34941359719d088f7936182d1478a6ac8f4e1bdf4bee7f4 atop-2.10.0.tgz
664225450074962aac0e13484c9b2feaf08620bbe1e0f9c5dc1b02f1ecd315224cd04df53134f2d107210fc9223a64d8885ae70d33d0663c2335fa6d46f6ddfd atop-daily-bb.patch
f30c9e6051332af8c8cafcd881f89a0e2d2a8e1d84eee8ac0c8c6b58f3ae3431fcf9c40dea6d03e271f8969802de449d33b4323c13045bdb38a539732c81a8b6 atop-include-macros.patch
e563894eceadf63ff153714829218b8f78dd21a129b90817960bdb4452768f41ed884dc9967f94b979e42f04d6434fcbd423bcf1651976a5ad60c34b206ce7e9 make-cron-background.patch
808ea5991fdacd547124008ab47906461d27dbab4955de71ead1bc080796c8aef05cc16884456cf8c4b65ce205423f5a971b0d422e01286390ad3dc5b3cfe461 format-sec.patch
5727287f891ab9487a33b13754cd02468725aad5daef9e46aac507eef9871e8f9cfbfa546f47dbe25ee25e0924b773e5966f0d82a39947d0b8792e08260f1a7b gcc13.patch
efbf36d933a8be90ebf2fd54a188cd1c9bc9b8d87755625aba85831a83f3a087dbe6e953f7ce36b38d9909b9ab747e0e9186ad0e85382d5b4e8690c9cfdc0d40 atop.initd
"

View File

@ -1,10 +0,0 @@
--- a/photosyst.c
+++ b/photosyst.c
@@ -152,6 +152,7 @@
static const char rcsid[] = "$Id: photosyst.c,v 1.38 2010/11/19 07:40:40 gerlof Exp $";
#include <sys/types.h>
+#include <sys/sysmacros.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>

View File

@ -1,75 +0,0 @@
Patch-Source: https://github.com/Atoptool/atop/pull/262
--
From 957ff648436fa4a6f08ad9a8c5ea856a5f33ef5b Mon Sep 17 00:00:00 2001
From: BlackEagle <ike.devolder@gmail.com>
Date: Fri, 2 Jun 2023 19:49:51 +0200
Subject: [PATCH] Fix drawbar mvwprintw format-security error
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When building with `-Werror=format-security` there are some issues with
the use of mvwprintw in drawbar.c
```
export CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
-fstack-clash-protection -fcf-protection"
make
...
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -O2 -I. -Wall -Wno-stringop-truncation -Wmissing-prototypes -Wmissing-declarations -c -o drawbar.o drawbar.c
drawbar.c: In function drawevent:
drawbar.c:2058:9: error: format not a string literal and no format arguments [-Werror=format-security]
2058 | mvwprintw(w->win, line, column, text);
| ^~~~~~~~~
drawbar.c: In function headergetch:
drawbar.c:2108:17: error: format not a string literal and no format arguments [-Werror=format-security]
2108 | mvwprintw(headwin, 0, statcol, statusmsg);
| ^~~~~~~~~
drawbar.c: In function getwininput:
drawbar.c:2331:9: error: format not a string literal and no format arguments [-Werror=format-security]
2331 | mvwprintw(mywin, 1, 1, prompt);
| ^~~~~~~~~
cc1: some warnings being treated as errors
make: *** [<builtin>: drawbar.o] Error 1
```
By explicitly adding the format `"%s"` this error is fixed.
Signed-off-by: BlackEagle <ike.devolder@gmail.com>
---
drawbar.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drawbar.c b/drawbar.c
index 659ed6a..e013c6c 100644
--- a/drawbar.c
+++ b/drawbar.c
@@ -2055,7 +2055,7 @@ drawevent(struct perwindow *w, int line, int column, int color,
line -= 1;
wattron(w->win, A_BOLD);
- mvwprintw(w->win, line, column, text);
+ mvwprintw(w->win, line, column, "%s", text);
wattroff(w->win, A_BOLD);
colorswoff(w->win, color);
@@ -2105,7 +2105,7 @@ headergetch(time_t curtime, int nsecs, char *statusmsg, int statuscol)
{
colorswon(headwin, statuscol);
wattron(headwin, A_REVERSE);
- mvwprintw(headwin, 0, statcol, statusmsg);
+ mvwprintw(headwin, 0, statcol, "%s", statusmsg);
wattroff(headwin, A_REVERSE);
colorswoff(headwin, statuscol);
}
@@ -2328,7 +2328,7 @@ getwininput(char *prompt, char *answer, int maxanswer, char numerical)
// show the prompt
//
- mvwprintw(mywin, 1, 1, prompt);
+ mvwprintw(mywin, 1, 1, "%s", prompt);
// prepare reading input
//