[arch-commits] Commit in htop/repos (3 files)

Christian Hesse eworm at archlinux.org
Fri Aug 28 13:36:17 UTC 2020


    Date: Friday, August 28, 2020 @ 13:36:17
  Author: eworm
Revision: 394835

archrelease: copy trunk to testing-x86_64

Added:
  htop/repos/testing-x86_64/
  htop/repos/testing-x86_64/0001-Increae-the-size-of-sysfs-power-supply-path-buffers.patch
    (from rev 394834, htop/trunk/0001-Increae-the-size-of-sysfs-power-supply-path-buffers.patch)
  htop/repos/testing-x86_64/PKGBUILD
    (from rev 394834, htop/trunk/PKGBUILD)

----------------------------------------------------------------+
 0001-Increae-the-size-of-sysfs-power-supply-path-buffers.patch |   32 ++++++
 PKGBUILD                                                       |   47 ++++++++++
 2 files changed, 79 insertions(+)

Copied: htop/repos/testing-x86_64/0001-Increae-the-size-of-sysfs-power-supply-path-buffers.patch (from rev 394834, htop/trunk/0001-Increae-the-size-of-sysfs-power-supply-path-buffers.patch)
===================================================================
--- testing-x86_64/0001-Increae-the-size-of-sysfs-power-supply-path-buffers.patch	                        (rev 0)
+++ testing-x86_64/0001-Increae-the-size-of-sysfs-power-supply-path-buffers.patch	2020-08-28 13:36:17 UTC (rev 394835)
@@ -0,0 +1,32 @@
+From b992d52bcf8ff8c51c847cd4bbf33a7db441dbe9 Mon Sep 17 00:00:00 2001
+From: Nathan Scott <nathans at redhat.com>
+Date: Fri, 28 Aug 2020 16:57:21 +1000
+Subject: [PATCH] Increae the size of sysfs power supply path buffers
+
+Resolves https://github.com/htop-dev/htop/issues/15
+---
+ linux/Battery.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/linux/Battery.c b/linux/Battery.c
+index 4014a50..a8784da 100644
+--- a/linux/Battery.c
++++ b/linux/Battery.c
+@@ -107,7 +107,7 @@ static ACPresence procAcpiCheck() {
+       if (entryName[0] != 'A')
+          continue;
+ 
+-      char statePath[50];
++      char statePath[256];
+       xSnprintf((char *) statePath, sizeof statePath, "%s/%s/state", power_supplyPath, entryName);
+       FILE* file = fopen(statePath, "r");
+       if (!file) {
+@@ -191,7 +191,7 @@ static void Battery_getSysData(double* level, ACPresence* isOnAC) {
+       if (!dirEntry)
+          break;
+       char* entryName = (char *) dirEntry->d_name;
+-      const char filePath[50];
++      const char filePath[256];
+ 
+       xSnprintf((char *) filePath, sizeof filePath, SYS_POWERSUPPLY_DIR "/%s/type", entryName);
+       int fd1 = open(filePath, O_RDONLY);

Copied: htop/repos/testing-x86_64/PKGBUILD (from rev 394834, htop/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2020-08-28 13:36:17 UTC (rev 394835)
@@ -0,0 +1,47 @@
+# Maintainer: Christian Hesse <mail at eworm.de>
+# Maintainer: Angel Velasquez <angvp at archlinux.org>
+# Contributor: Eric Belanger <eric at archlinux.org>
+# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
+
+pkgname=htop
+pkgver=3.0.0
+pkgrel=2
+pkgdesc='Interactive process viewer'
+arch=('x86_64')
+url='https://htop.dev/'
+license=('GPL')
+depends=('ncurses' 'libncursesw.so' 'libnl')
+optdepends=('lsof: show files opened by a process'
+            'strace: attach to a running process')
+options=('!emptydirs')
+source=("https://github.com/htop-dev/htop/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz"
+        '0001-Increae-the-size-of-sysfs-power-supply-path-buffers.patch')
+sha256sums=('1c0661f0ae5f4e2874da250b60cd515e4ac4c041583221adfe95f10e18d1a4e6'
+            'e31d8ab3fc41048b9dce0016cbb8facb6d0e62cf4a91c295b99f268cf120f1fc')
+
+prepare() {
+  cd "$pkgname-$pkgver"
+
+  patch -Np1 < ../0001-Increae-the-size-of-sysfs-power-supply-path-buffers.patch
+
+  autoreconf -fi
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+
+  ./configure \
+      --prefix=/usr \
+      --sysconfdir=/etc \
+      --enable-cgroup \
+      --enable-delayacct \
+      --enable-openvz \
+      --enable-unicode \
+      --enable-vserver
+
+  make
+}
+
+package() {
+  make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
+}



More information about the arch-commits mailing list