Bug 200418 - [revive port] net-mgmt/pktstat: Network traffic viewer
Summary: [revive port] net-mgmt/pktstat: Network traffic viewer
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dmitry Marakasov
URL:
Keywords: needs-patch, needs-qa, patch
Depends on:
Blocks:
 
Reported: 2015-05-23 21:58 UTC by mq
Modified: 2015-05-31 14:07 UTC (History)
2 users (show)

See Also:


Attachments
Shar file for net-mgmt/pktstat. (1.99 KB, text/plain)
2015-05-23 21:58 UTC, mq
koobs: maintainer-approval-
Details
2nd attempt for a acceptable pktstat shar file (14.15 KB, text/plain)
2015-05-28 21:21 UTC, mq
no flags Details
3rd attempt for pktstat shar (2.27 KB, text/plain)
2015-05-29 22:34 UTC, mq
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description mq 2015-05-23 21:58:46 UTC
Created attachment 157088 [details]
Shar file for net-mgmt/pktstat.

Reanimated net-mgmt/pktstat: Network traffic viewer


The program pktstat is missing in the ports collection.
In the past,  there was a  port but it was removed due to unavailable
distfiles [0].
I have taken the latest port building rules [1] and I have updated them.
Now netmgmt/pktstat is working again :-)
You can find the shar file in the attachment.

Can you re-activate this port in the ports collection?

Cheers,
Martin


[0] https://www.freshports.org/net-mgmt/pktstat/
[1] http://ftp.tw.freebsd.org/pub/FreeBSD/branches/-current/ports/net-mgmt/pktstat/
Comment 1 Dmitry Marakasov freebsd_committer freebsd_triage 2015-05-26 20:48:49 UTC
Are you willing to become maintainer of this port?
Comment 2 mq 2015-05-27 19:31:16 UTC
(In reply to Dmitry Marakasov from comment #1)


Yes, sure.  I can take care of net-mgmt/pktstat.
I like this little traffic viewer.  It runs nearly always in one of my terminals.
Comment 3 Dmitry Marakasov freebsd_committer freebsd_triage 2015-05-27 21:18:34 UTC
The port doesn't fetch, WWW is dead and it contains deprecated constructs (headers, MAN1, Author:). These should be fixed in order to resurrect the port.
Comment 4 mq 2015-05-28 21:21:04 UTC
Created attachment 157233 [details]
2nd attempt for a acceptable pktstat shar file
Comment 5 mq 2015-05-28 21:25:10 UTC
(In reply to Dmitry Marakasov from comment #3)

You can find the 2nd attempt for an acceptable pktstat shar file in the attachment.  At least portlint is happy now.


I see that the original pktstat source code source provider has some problems
with availability:

/usr/ports/net-mgmt/pktstat]$ make          
===>   pktstat-1.8.4 depends on file: /usr/local/sbin/pkg - found
=> pktstat-1.8.4.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch http://www.adaptive-enterprises.com.au/~d/software/pktstat/pktstat-1.8.4.tar.gz
fetch: http://www.adaptive-enterprises.com.au/~d/software/pktstat/pktstat-1.8.4.tar.gz: Operation timed out
=> Attempting to fetch http://distcache.FreeBSD.org/ports-distfiles/pktstat-1.8.4.tar.gz
pktstat-1.8.4.tar.gz                          100% of  116 kB 8287  Bps 00m14s
===> Fetching all distfiles required by pktstat-1.8.4 for building
[...]


What do you recommend for providing a reliable source for the pktstat source code?
Can we host it on a FreeBSD site?
Comment 6 Dmitry Marakasov freebsd_committer freebsd_triage 2015-05-29 19:18:26 UTC
> 2nd attempt for a acceptable pktstat shar file

Looks good, however in future please use tabs instead of spaces, and MAINTAINER should list your email.

> What do you recommend for providing a reliable source for the pktstat source code?

The distfile (newer version 1.8.5) is mirrored by gentoo (and that's the mirror arch linux also use): https://aur.archlinux.org/packages/pktstat/

Could use that, but I've found author's repository on GitHub:

https://github.com/dleonard0/pktstat

so we better use that.

Note that we generally prefer to not have ports with no upstream, as there's no one to fix security vulnerabilities, compatibility and other bugs, so just providing a mirror would not be enough. In this case, however, we have an upstream repo. I've also submitted fixes from the port there (https://github.com/dleonard0/pktstat/pull/1).
Comment 7 mq 2015-05-29 22:34:19 UTC
Created attachment 157259 [details]
3rd attempt for  pktstat shar
Comment 8 mq 2015-05-29 22:36:37 UTC
(In reply to Dmitry Marakasov from comment #6)

Hi Dmitry!


You can find my next attempt (3rd) in the attachment.
Now the port uses github and portlint is happy as well.

What do you think?
Comment 9 Dmitry Marakasov freebsd_committer freebsd_triage 2015-05-30 00:28:14 UTC
Not quite, we have USE_GITHUB for this. I've added all necessary changes, final patch follows. Final question: are you sure maintainer email is correct? MAINTAINER lists freebsd@sosend.de, while you've submitted from freebsd_bugs@sosend.de. To avoid inconvenience, these should match.

Index: Makefile
===================================================================
--- Makefile    (revision 273443)
+++ Makefile    (working copy)
@@ -1,25 +1,27 @@
-# New ports collection makefile for:   pktstat
-# Date created:                5 April 2007
-# Whom:                        Andrew Pantyukhin <infofarmer@FreeBSD.org>
-#
+# Created by: Andrew Pantyukhin <infofarmer@FreeBSD.org>
 # $FreeBSD$
-#
 
 PORTNAME=      pktstat
-PORTVERSION=   1.8.4
+PORTVERSION=   1.8.5
+DISTVERSIONPREFIX=     v
 CATEGORIES=    net-mgmt
-MASTER_SITES=  http://www.adaptive-enterprises.com.au/~d/software/pktstat/ CENKES

-MAINTAINER=    ports@FreeBSD.org
+MAINTAINER=    freebsd@sosend.de
 COMMENT=       Network traffic viewer

-DEPRECATED=     Upstream disapear and distfile is no more available
-EXPIRATION_DATE=        2011-05-01
+LICENSE=       PUBLIC_DOMAIN
+LICENSE_NAME=  Public Domain
+LICENSE_TEXT=  The principal author has placed the entire work (source) in the public domain, thus choosing to not exercise copyright control over it.
+LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept

+USE_GITHUB=    yes
+GH_ACCOUNT=    dleonard0
+
+USES=          autoreconf
 GNU_CONFIGURE= yes
-MAN1=          ${PORTNAME}.1
-PLIST_FILES=   bin/${PORTNAME}

+PLIST_FILES=   bin/${PORTNAME} man/man1/${PORTNAME}.1.gz
+
 post-patch:
        @${REINPLACE_CMD} '/struct arphdr/d' ${WRKSRC}/ether.c
        @${REINPLACE_CMD} -e 's/IPPORT_USERRESERVED/IPPORT_RESERVED/' ${WRKSRC}/tcp.c
Index: distinfo
===================================================================
--- distinfo    (revision 273443)
+++ distinfo    (working copy)
@@ -1,2 +1,2 @@
-SHA256 (pktstat-1.8.4.tar.gz) = 54a63270779ae619fd89d0cb9afcbdff29dc79deda959b0f7809b975fb670bc5
-SIZE (pktstat-1.8.4.tar.gz) = 119127
+SHA256 (dleonard0-pktstat-v1.8.5_GH0.tar.gz) = 9a365668d9c5d22484702a858ad1892ae6c7b904b5d0bc9ae075bd88a145b9cd
+SIZE (dleonard0-pktstat-v1.8.5_GH0.tar.gz) = 41971
Index: pkg-descr
===================================================================
--- pkg-descr   (revision 273443)
+++ pkg-descr   (working copy)
@@ -3,5 +3,4 @@
 (including FTP, HTTP, and X11) and adds a descriptive name next to the
 entry.

-WWW: http://www.adaptive-enterprises.com.au/~d/software/pktstat/
-Author: David Leonard <leonard at users.sourceforge.net>
+WWW: https://github.com/dleonard0/pktstat
Comment 10 mq 2015-05-30 20:32:54 UTC
(In reply to Dmitry Marakasov from comment #9)

Now I see that the porter's handbook contain a section about GIT_HUB.

Both e-mail addresses are fine but I prefer freebsd (at) sosend.de.

I have checked your patch and it works on my machine.
Thank you for being patient with me!
Comment 11 commit-hook freebsd_committer freebsd_triage 2015-05-31 14:04:43 UTC
A commit references this bug:

Author: amdmi3
Date: Sun May 31 14:03:59 UTC 2015
New revision: 388091
URL: https://svnweb.freebsd.org/changeset/ports/388091

Log:
  - Revive net-mgmt/pktstat
  - Update to 1.8.5
  - Use new upstream addresses
  - Add LICENSE
  - Pass maintainership to submitter

  Pktstat listens to the network and shows the bandwidth being consumed
  by packets of various kinds in realtime. It understands some protocols
  (including FTP, HTTP, and X11) and adds a descriptive name next to the
  entry.

  WWW: https://github.com/dleonard0/pktstat

  PR:		200418
  Submitted by:	freebsd@sosend.de

Changes:
  head/MOVED
  head/net-mgmt/Makefile
  head/net-mgmt/pktstat/
  head/net-mgmt/pktstat/Makefile
  head/net-mgmt/pktstat/distinfo
  head/net-mgmt/pktstat/pkg-descr
Comment 12 Dmitry Marakasov freebsd_committer freebsd_triage 2015-05-31 14:07:55 UTC
Then you could change your bugzilla email to the same thing. The port's been added, thanks for submission!