Date: Sunday, October 2, 2022 @ 20:41:15 Author: felixonmars Revision: 1320698
upgpkg: nvtop 2.0.4-1 Modified: nvtop/trunk/PKGBUILD Deleted: nvtop/trunk/format-security.patch -----------------------+ PKGBUILD | 12 +----- format-security.patch | 90 ------------------------------------------------ 2 files changed, 3 insertions(+), 99 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2022-10-02 20:06:07 UTC (rev 1320697) +++ PKGBUILD 2022-10-02 20:41:15 UTC (rev 1320698) @@ -2,7 +2,7 @@ # Contributor: Maxime Schmitt <[email protected]> pkgname=nvtop -pkgver=2.0.3 +pkgver=2.0.4 pkgrel=1 pkgdesc="An htop like monitoring tool for AMD and NVIDIA GPUs" arch=('x86_64') @@ -10,15 +10,9 @@ license=('GPL3') depends=('ncurses') makedepends=('cmake' 'libdrm') -source=("https://github.com/Syllo/nvtop/archive/$pkgver/$pkgname-$pkgver.tar.gz" - format-security.patch) -sha512sums=('ffd9d88898b7c6365d8bcff3c7b187760bc0036fba80ab6a0e3a586217ebf48b3377cdbe84f2fbbe10fb650f96de108973f95ccd29766e45da3901ee5d45f63c' - 'a388de418586c8569d119dbd6845e2257160a81e370ed75ba60a9823afb90267cb5522200a06925db9ce3ca39b8d589dd02b7ade47de712abe830b02fbd2bd6e') +source=("https://github.com/Syllo/nvtop/archive/$pkgver/$pkgname-$pkgver.tar.gz") +sha512sums=('75a97fdc961c86569e7255a5295a1280451540ed297170d9a72c6a755b8347dfd6a2c4f6bcd95a833afd64dd3f4c33aa5f0b2bbe7d5508abb65317ec60f5d580') -prepare() { - patch -d $pkgname-$pkgver -p1 < format-security.patch -} - build() { cd $pkgname-$pkgver Deleted: format-security.patch =================================================================== --- format-security.patch 2022-10-02 20:06:07 UTC (rev 1320697) +++ format-security.patch 2022-10-02 20:41:15 UTC (rev 1320698) @@ -1,90 +0,0 @@ -commit 663a69f1c9038eabdfc3155112fb9b8d662578aa -Author: Felix Yan <[email protected]> -Date: Fri Aug 26 21:00:38 2022 +0300 - - Fix format-security warnings - - nvtop 2.0.3 fails to build on Arch Linux with `-Werror=format-security` enabled. Let's fix it. - -diff --git a/src/interface.c b/src/interface.c -index 28bc2b2..3628e62 100644 ---- a/src/interface.c -+++ b/src/interface.c -@@ -256,35 +256,35 @@ static void initialize_gpu_mem_plot(struct plot_window *plot, struct window_posi - char *zeroSec = "0s"; - if (options->plot_left_to_right) { - char *toPrint = zeroSec; -- mvwprintw(plot->win, position->sizeY - 1, 4, toPrint); -+ mvwprintw(plot->win, position->sizeY - 1, 4, "%s", toPrint); - - int retval = snprintf(elapsedSeconds, 5, "%ds", options->update_interval * cols / 4 / column_divisor / 1000); - if (retval > 4) - toPrint = err; - else - toPrint = elapsedSeconds; -- mvwprintw(plot->win, position->sizeY - 1, 4 + cols / 4 - strlen(toPrint) / 2, toPrint); -+ mvwprintw(plot->win, position->sizeY - 1, 4 + cols / 4 - strlen(toPrint) / 2, "%s", toPrint); - - retval = snprintf(elapsedSeconds, 5, "%ds", options->update_interval * cols / 2 / column_divisor / 1000); - if (retval > 4) - toPrint = err; - else - toPrint = elapsedSeconds; -- mvwprintw(plot->win, position->sizeY - 1, 4 + cols / 2 - strlen(toPrint) / 2, toPrint); -+ mvwprintw(plot->win, position->sizeY - 1, 4 + cols / 2 - strlen(toPrint) / 2, "%s", toPrint); - - retval = snprintf(elapsedSeconds, 5, "%ds", options->update_interval * cols * 3 / 4 / column_divisor / 1000); - if (retval > 4) - toPrint = err; - else - toPrint = elapsedSeconds; -- mvwprintw(plot->win, position->sizeY - 1, 4 + cols * 3 / 4 - strlen(toPrint) / 2, toPrint); -+ mvwprintw(plot->win, position->sizeY - 1, 4 + cols * 3 / 4 - strlen(toPrint) / 2, "%s", toPrint); - - retval = snprintf(elapsedSeconds, 5, "%ds", options->update_interval * cols / column_divisor / 1000); - if (retval > 4) - toPrint = err; - else - toPrint = elapsedSeconds; -- mvwprintw(plot->win, position->sizeY - 1, 4 + cols - strlen(toPrint), toPrint); -+ mvwprintw(plot->win, position->sizeY - 1, 4 + cols - strlen(toPrint), "%s", toPrint); - } else { - char *toPrint; - int retval = snprintf(elapsedSeconds, 5, "%ds", options->update_interval * cols / column_divisor / 1000); -@@ -292,31 +292,31 @@ static void initialize_gpu_mem_plot(struct plot_window *plot, struct window_posi - toPrint = err; - else - toPrint = elapsedSeconds; -- mvwprintw(plot->win, position->sizeY - 1, 4, toPrint); -+ mvwprintw(plot->win, position->sizeY - 1, 4, "%s", toPrint); - - retval = snprintf(elapsedSeconds, 5, "%ds", options->update_interval * cols * 3 / 4 / column_divisor / 1000); - if (retval > 4) - toPrint = err; - else - toPrint = elapsedSeconds; -- mvwprintw(plot->win, position->sizeY - 1, 4 + cols / 4 - strlen(toPrint) / 2, toPrint); -+ mvwprintw(plot->win, position->sizeY - 1, 4 + cols / 4 - strlen(toPrint) / 2, "%s", toPrint); - - retval = snprintf(elapsedSeconds, 5, "%ds", options->update_interval * cols / 2 / column_divisor / 1000); - if (retval > 4) - toPrint = err; - else - toPrint = elapsedSeconds; -- mvwprintw(plot->win, position->sizeY - 1, 4 + cols / 2 - strlen(toPrint) / 2, toPrint); -+ mvwprintw(plot->win, position->sizeY - 1, 4 + cols / 2 - strlen(toPrint) / 2, "%s", toPrint); - - retval = snprintf(elapsedSeconds, 5, "%ds", options->update_interval * cols / 4 / column_divisor / 1000); - if (retval > 4) - toPrint = err; - else - toPrint = elapsedSeconds; -- mvwprintw(plot->win, position->sizeY - 1, 4 + cols * 3 / 4 - strlen(toPrint) / 2, toPrint); -+ mvwprintw(plot->win, position->sizeY - 1, 4 + cols * 3 / 4 - strlen(toPrint) / 2, "%s", toPrint); - - toPrint = zeroSec; -- mvwprintw(plot->win, position->sizeY - 1, 4 + cols - strlen(toPrint), toPrint); -+ mvwprintw(plot->win, position->sizeY - 1, 4 + cols - strlen(toPrint), "%s", toPrint); - } - wnoutrefresh(plot->win); - }
