[arch-commits] Commit in iftop/trunk (PKGBUILD mac-address-fix.patch)

Felix Yan felixonmars at gemini.archlinux.org
Thu Aug 25 20:32:59 UTC 2022


    Date: Thursday, August 25, 2022 @ 20:32:59
  Author: felixonmars
Revision: 1280246

upgpkg: iftop 1.0pre4-5: add a patch for FS#75357

Added:
  iftop/trunk/mac-address-fix.patch
Modified:
  iftop/trunk/PKGBUILD

-----------------------+
 PKGBUILD              |   15 +++++++++++----
 mac-address-fix.patch |   11 +++++++++++
 2 files changed, 22 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-08-25 20:32:47 UTC (rev 1280245)
+++ PKGBUILD	2022-08-25 20:32:59 UTC (rev 1280246)
@@ -6,14 +6,23 @@
 
 pkgname=iftop
 pkgver=1.0pre4
-pkgrel=4
+pkgrel=5
 pkgdesc="Display bandwidth usage on an interface"
 arch=('x86_64')
 url="http://www.ex-parrot.com/~pdw/iftop/"
 license=('GPL')
 depends=('libpcap' 'ncurses')
-source=("http://www.ex-parrot.com/~pdw/$pkgname/download/$pkgname-$pkgver.tar.gz")
+source=("http://www.ex-parrot.com/~pdw/$pkgname/download/$pkgname-$pkgver.tar.gz"
+        mac-address-fix.patch)
+sha512sums=('abd74e8025bb82fef9ebab4997b1d018201a523d47c0128128ca37797490046538d74758dc4471735c22b890e5bd238ad6b2a30776d465138ede367cdd263d22'
+            '6906bae0eb6beb2e8245648a74601af3024b82d7e826fe49c40a272f98a14b52c39e3caf5985b5f16c460e3096bf6d87e6eb84c166e577f67596f887d997250c')
 
+prepare() {
+  cd $pkgname-$pkgver
+  # FS#75357
+  patch -p0 -i ../mac-address-fix.patch
+}
+
 build() {
   cd $pkgname-$pkgver
 
@@ -28,5 +37,3 @@
 
   make DESTDIR="$pkgdir" install
 }
-
-sha512sums=('abd74e8025bb82fef9ebab4997b1d018201a523d47c0128128ca37797490046538d74758dc4471735c22b890e5bd238ad6b2a30776d465138ede367cdd263d22')

Added: mac-address-fix.patch
===================================================================
--- mac-address-fix.patch	                        (rev 0)
+++ mac-address-fix.patch	2022-08-25 20:32:59 UTC (rev 1280246)
@@ -0,0 +1,11 @@
+--- iftop.c.old 2014-01-20 04:21:19.000000000 +0800
++++ iftop.c 2014-03-03 12:49:57.383335066 +0800
+@@ -713,7 +713,7 @@ void packet_init() {
+     if(have_hw_addr) {
+       fprintf(stderr, "MAC address is:");
+       for (i = 0; i < 6; ++i)
+-	fprintf(stderr, "%c%02x", i ? ':' : ' ', (unsigned int)if_hw_addr[i]);
++	fprintf(stderr, "%c%02x", i ? ':' : ' ', (unsigned char)if_hw_addr[i]);
+       fprintf(stderr, "\n");
+     }
+ 



More information about the arch-commits mailing list