Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 54192 - dnstracer-1.7-r1.ebuild (update)
Summary: dnstracer-1.7-r1.ebuild (update)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-17 03:15 UTC by Jonathan Stewart
Modified: 2004-07-05 02:41 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dnstracer-1.7-r1.ebuild (update) (dnstracer-1.7-r1.ebuild,701 bytes, text/plain)
2004-06-17 03:18 UTC, Jonathan Stewart
Details
dnstracer-1.7-r1.ebuild (dnstracer-1.7-r1.ebuild,648 bytes, text/plain)
2004-06-21 08:52 UTC, Eldad Zack (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Stewart 2004-06-17 03:15:58 UTC
This new ebuild checks for the presence of the 'ipv6' USE flag.  If not set, passes '--disable-ipv6' to configure before compiling the program.  The avoids the condition where dnstracer tries to query an IPv6 server but gives a address family not supported error because your system does not have IPv6 support.

The error looks like this:

reaper@darkstar reaper $ dnstracer www.janet.ac.uk
Tracing to www.janet.ac.uk via 127.0.0.1, timeout 15 seconds
127.0.0.1 (127.0.0.1)
 |\___ ns.uu.net [ac.uk] (137.39.1.3)
 |     |\___ ns3.ja.net [janet.ac.uk] (193.63.106.103) Got authoritative answer
 |     |\___ ns3.ja.net [janet.ac.uk] (2001:0630:0000:0048:0000:0000:0000:0067) create_socket/socket: Address family not supported by protocol
If this is an IPv6 problem, run configure with --disable-ipv6

This is my first attempt at an ebuild, it would be great if someone could look at it to make sure i did it properly.  I tested on x86 (P-III 700) with IPv4 only and it worked fine.
Comment 1 Jonathan Stewart 2004-06-17 03:18:39 UTC
Created attachment 33418 [details]
dnstracer-1.7-r1.ebuild (update)

Simple if then added to check for ipv6 USE flag.
Comment 2 Eldad Zack (RETIRED) gentoo-dev 2004-06-21 08:47:55 UTC
A few comments:

1. S=${WORKDIR}/${P} is redundant

2. you specified a src_compile without a make. the ebuild will do a make (because of the make install in src_install), but it is not proper.

3. if you need to disable or enable a configure switch according to a useflag use the following format: econf `use_enable ipv6`

Here is a revised src_compile:

src_compile () {
        econf `use_enable ipv6` || die
        emake || die
}
Comment 3 Eldad Zack (RETIRED) gentoo-dev 2004-06-21 08:50:42 UTC
Oh, and also don't forget to ~mask all the archs: x86 -> ~x86, etc. 

Comment 4 Eldad Zack (RETIRED) gentoo-dev 2004-06-21 08:52:53 UTC
Created attachment 33754 [details]
dnstracer-1.7-r1.ebuild
Comment 5 Jonathan Stewart 2004-06-22 23:51:21 UTC
Thanks for the improvements, Eldad.  Like i said, this is my first attempt, and i wasn't sure of the proper way to make an ebuild.  Your looks much nicer.  Can this improved ebuild be accepted then?
Comment 6 Eldad Zack (RETIRED) gentoo-dev 2004-06-23 07:15:31 UTC
Yep.

Also, you might want to check out these docs:
http://www.gentoo.org/doc/en/gentoo-howto.xml
http://www.gentoo.org/doc/en/ebuild-mistakes.xml
and maybe http://www.gentoo.org/doc/en/ebuild-submit.xml too.

and then there's "man 5 ebuild" to consult...

Comment 7 Eldad Zack (RETIRED) gentoo-dev 2004-07-05 02:41:02 UTC
in portage, thanks!