Bug 246187 - net/aslookup: fixes BROKEN -- provides working MASTER_SITES WWW
Summary: net/aslookup: fixes BROKEN -- provides working MASTER_SITES WWW
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Rene Ladan
URL:
Keywords: easy, patch, patch-ready
Depends on:
Blocks:
 
Reported: 2020-05-04 19:26 UTC by Chris Hutchinson
Modified: 2020-09-19 13:24 UTC (History)
3 users (show)

See Also:
jmohacsi: maintainer-feedback+
portmaster: maintainer-feedback?


Attachments
svn diff: changes MASTER_SITES WWW removes BROKEN (1.04 KB, patch)
2020-05-04 19:26 UTC, Chris Hutchinson
no flags Details | Diff
svn diff: changes MASTER_SITES WWW, upgrades to 0.13d (5.05 KB, patch)
2020-05-21 17:39 UTC, Chris Hutchinson
no flags Details | Diff
avn diff changes MAINTAINER MASTER_SITES WWW files/*, upgrades to 0.13d (5.09 KB, patch)
2020-05-22 06:35 UTC, Chris Hutchinson
no flags Details | Diff
patch (9.39 KB, patch)
2020-09-14 14:45 UTC, Dirk Meyer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Hutchinson 2020-05-04 19:26:57 UTC
Created attachment 214121 [details]
svn diff: changes MASTER_SITES WWW removes BROKEN

This port is currently marked BROKEN for nonworking
MASTER_SITES. The svn diff attached to this pr corrects
that.

CHANGES

Makefile
MASTER_SITES
BROKEN

pkg-descr
WWW

NOTE: Feel free to set me as maintainer if the
current maintainer is un(able|willing) to continue
maintaining this port.

That's it. Thanks!

--Chris
Comment 1 Janos Mohacsi 2020-05-06 14:32:20 UTC
Comment on attachment 214121 [details]
svn diff: changes MASTER_SITES WWW removes BROKEN

Thanks for the fix. 
I approve.
Comment 2 Rene Ladan freebsd_committer freebsd_triage 2020-05-07 20:16:02 UTC
How about updating it to version 0.13d?
Comment 3 Chris Hutchinson 2020-05-07 21:00:06 UTC
kuniaki kuniaki 21973 Dec  6  2005 aslookup-beta0.13c/aslookup.c
kuniaki kuniaki 21994 Sep 20  2009 aslookup-beta0.13d/aslookup.c

Yes. Please do. 13d is 4 years newer than 13c.
Comment 4 Rene Ladan freebsd_committer freebsd_triage 2020-05-20 19:42:56 UTC
I got version 0.13d to compile, but it does not run properly because the binary still references the old bvtest.bugest.net host for AS lookups, even from the *new* MASTER_SITE http://aslookup.bgpview.org/download :

> rene@e17:/usr/ports/net/aslookup % aslookup -r 8.8.8.8
> bvtest.bugest.net Unknown Host. FATAL Error 
> rene@e17:/usr/ports/net/aslookup % 

This can be fixed by changing the RADB define in aslookup.c to some working host, do we know a good one?
Comment 5 Chris Hutchinson 2020-05-21 04:03:38 UTC
(In reply to Rene Ladan from comment #4)
Hmm, a quick look around brought me to what looks like
an exact duplicate of the original authors web site:
aslookup.bgpview.org
The README seems to indicate that there are compile-time
options that use (quoted below)

At ASLOOKUP, it is possible to go to search whois database
of ARIN, JPNIC and APNIC by the compile option.

Please change CFLAGS of Makefile suitably.
In addition, when both JPNIC and APNIC are chosen, it
searches in the order of RADB, JPNIC, and APNIC. When All
of ARIN, JPNIC and APNIC are chosen, it searches in the
order of RADB, ARIN, and JPNIC or APNIC.

Following are compile option.

	ARIN	-DARINDB
	JPNIC	-DJPNICDB
	APNIC	-DAPNICDB

I haven't (yet) examined the code closely enough to
comment with any real authority. But just thought I'd
mention this in case it was of any relevance. I'll take
a look at the source.

--Chris
Comment 6 Chris Hutchinson 2020-05-21 16:57:05 UTC
(In reply to Rene Ladan from comment #4)
OK here's a list of which you may choose any
one you like -- they're *all* "good ones". :-)

http://www.irr.net/docs/list.html

I'll update the patch attached to this pr that
changes bvtest.bugest.net to one of these, and
submit it sometime today.

--Chris
Comment 7 Chris Hutchinson 2020-05-21 17:39:55 UTC
Created attachment 214732 [details]
svn diff: changes MASTER_SITES WWW, upgrades to 0.13d

OK updated patch:
changes MASTER_SITES && WWW
upgrades to 0.13d (changes both files in files/ as required)
bvtest.bugest.net ==> whois.epoch.net (among other things)

This should be all that's required to move
forward, and commit this.

Thanks!

--Chris
Comment 8 Janos Mohacsi 2020-05-22 04:06:24 UTC
Comment on attachment 214732 [details]
svn diff: changes MASTER_SITES WWW, upgrades to 0.13d

Thanks for the fix. If you prefer you can take maintainership.
Comment 9 Chris Hutchinson 2020-05-22 04:44:27 UTC
(In reply to Janos Mohacsi from comment #8)
Sue. I'll take it.
Thanks, Janos.
Comment 10 Chris Hutchinson 2020-05-22 06:35:40 UTC
Created attachment 214745 [details]
avn diff changes MAINTAINER MASTER_SITES WWW files/*, upgrades to 0.13d

OK this is the same patch as the last one, but also changes
MAINTAINER to me, as indicated by currently listed maintainer.

NOTE: As current maintainer passed maintainer. Maintainer
approval is implicit. :-)

That should be it.

Thanks! :-)

--Chris
Comment 11 Rene Ladan freebsd_committer freebsd_triage 2020-05-22 20:06:20 UTC
I made a few changes to the patch, mostly English fixes. Also per new tradition, I replaced the REINPLACE_CMD with an explicit patch since we were already patching Makefile (the one in wrksrc) anyway.

But I still cannot get it to run properly, truss shows it asks my home router (which does not speak BGP ;) ) and then times out.

Commands tried:

aslookup -r 82.161.212.209 <-- my outside IP
aslookup -r nu.nl <-- news website
aslookup 3265 <-- my ISPs AS number
Comment 12 Chris Hutchinson 2020-05-22 20:57:44 UTC
(In reply to Rene Ladan from comment #11)
Yes. I too was tempted to correct the english as
well. But had been submitting so many changes, I
decided I had to draw the line _somewhere_ ;-)

I'll take a closer look, myself, and see if I
can figure out _why_ it's not working for you. :-)

Thanks!

--Chris
Comment 13 Rene Ladan freebsd_committer freebsd_triage 2020-06-06 10:06:44 UTC
(In reply to Chris Hutchinson from comment #12)

Did you find out?
Comment 14 Chris Hutchinson 2020-06-11 22:11:11 UTC
(In reply to Rene Ladan from comment #13)
Sorry for the delayed response. I got sidelined by
some other pr's and life. :-(

No. I haven't yet. I did some additional testing
using/changing
#define RADB	"whois.epoch.net"
#define RADB	"localhost"

Using localhost *should* work. But didn't for me.
I'm going to need to spin up a test box without
pf(4). As all my other servers are production boxes,
and need the protection pf provides. Even tho I
could open the necessary port(s). I'd prefer to
use something closer to what the average user might
be using. I should have some useful results in the
next couple days.

--Chris
Comment 15 Dirk Meyer freebsd_committer freebsd_triage 2020-09-14 14:45:47 UTC
Created attachment 217955 [details]
patch

This patch updates to 0.13d

I moved the defines from the sources in the port.
activated all 3 whois Options
removed -DRALOCAL

I fixed some warnings in the code as well.

Build/package ok
Tested runtime with a few datasets wit AS from , us, jp
Comment 16 Rene Ladan freebsd_committer freebsd_triage 2020-09-19 09:26:37 UTC
(In reply to Dirk Meyer from comment #15)
Indeed, my three examples from #11 work fine now (at least they do not time out anymore, I'm not a real BGP expert ;) )
Comment 17 commit-hook freebsd_committer freebsd_triage 2020-09-19 09:35:34 UTC
A commit references this bug:

Author: rene
Date: Sat Sep 19 09:35:19 UTC 2020
New revision: 548951
URL: https://svnweb.freebsd.org/changeset/ports/548951

Log:
  net/aslookup: unexpire by updating to 0.13d

  - Various fixes are performed, by Chris, dinoex and myself.
  - MASTER_SITES and WWW changed to a new home.
  - AS queries are now ran against whois.epoch.net, the former server went
    offline.
  - Hand over maintainership to Chris

  PR:		246187
  Submitted by:	Chris Hutchinson
  Approved by:	previous maintainer
  MFH:		2020Q3

Changes:
  head/net/aslookup/Makefile
  head/net/aslookup/distinfo
  head/net/aslookup/files/patch-Makefile
  head/net/aslookup/files/patch-aslookup.c
  head/net/aslookup/pkg-descr
Comment 18 Rene Ladan freebsd_committer freebsd_triage 2020-09-19 09:36:46 UTC
I committed a mix of Chris' and Dirks patches, time to close this PR :)
Comment 19 commit-hook freebsd_committer freebsd_triage 2020-09-19 13:24:10 UTC
A commit references this bug:

Author: rene
Date: Sat Sep 19 13:23:32 UTC 2020
New revision: 548985
URL: https://svnweb.freebsd.org/changeset/ports/548985

Log:
  MFH: r548951

  net/aslookup: unexpire by updating to 0.13d

  - Various fixes are performed, by Chris, dinoex and myself.
  - MASTER_SITES and WWW changed to a new home.
  - AS queries are now ran against whois.epoch.net, the former server went
    offline.
  - Hand over maintainership to Chris

  PR:		246187
  Submitted by:	Chris Hutchinson
  Approved by:	previous maintainer

  Approved by:	ports-secteam (fluffy)

Changes:
_U  branches/2020Q3/
  branches/2020Q3/net/aslookup/Makefile
  branches/2020Q3/net/aslookup/distinfo
  branches/2020Q3/net/aslookup/files/patch-Makefile
  branches/2020Q3/net/aslookup/files/patch-aslookup.c
  branches/2020Q3/net/aslookup/pkg-descr