Bug 1182615 - dnstop no IPv6 support - problem building with IPv6 support
Summary: dnstop no IPv6 support - problem building with IPv6 support
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: dnstop
Version: el6
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Greg Bailey
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-15 14:56 UTC by Kostas Zorbadelos
Modified: 2015-05-10 20:37 UTC (History)
3 users (show)

Fixed In Version: dnstop-20140915-1.el6.1
Clone Of:
Environment:
Last Closed: 2015-05-10 20:37:57 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Kostas Zorbadelos 2015-01-15 14:56:22 UTC
Description of problem:

The dnstop package lacks IPv6 support. You need to enable it with configure --enable-ipv6 (by default seems to be disabled). In order to rebuild the package when you change the spec file 

%build
%configure --enable-ipv6
..

the hardening stuff below 

# to allow overriding those for hardening
sed -i "s/CFLAGS=/CFLAGS?=/" Makefile
sed -i "s/LDFLAGS=/LDFLAGS?=/" Makefile
# hardening macro not in el6
export LDFLAGS="-Wl,-z,relro,-z,now"
export CFLAGS="$RPM_OPT_FLAGS $OPTFLAGS -fPIE -pie"

do not let the -DUSE_IPV6=1 flag in the Makefile to pass in the building process. Unfortunately I do not know the "right way" to fix the hardening stuff so I commented them out to fix the problem.

Version-Release number of selected component (if applicable):

20140915-1.el6

How reproducible:

Always

Steps to Reproduce:
1. Change the spec file to include %configure --enable-ipv6 and build 
2. The flags passed do not include -DUSE_IPV6=1
3.

Actual results:

No IPv6 support in dnstop, after building with %configure --enable-ipv6 in spec file

Expected results:

Passing arguments to configure that affect CFLAGS should propagate normally in the package building

Additional info:

It would be nice to have IPv6 support enabled by default in the dnstop package

Comment 1 Greg Bailey 2015-04-22 20:21:39 UTC
It appears that "-DUSE_IPV6=1" is assigned to OPTFLAGS in the generated Makefile.

I think the problem is that the new value of CFLAGS as set in the dnstop.spec file no longer includes $OPTFLAGS, so USE_IPV6 is no longer defined.

I believe the following patch should suffice (in the el6 branch):

diff --git a/dnstop.spec b/dnstop.spec
index d6b361e..4a4dc3a 100644
--- a/dnstop.spec
+++ b/dnstop.spec
@@ -40,7 +40,7 @@ sed -i "s/CFLAGS=/CFLAGS?=/" Makefile
 sed -i "s/LDFLAGS=/LDFLAGS?=/" Makefile
 # hardening macro not in el6
 export LDFLAGS="-Wl,-z,relro,-z,now"
-export CFLAGS="$RPM_OPT_FLAGS -fPIE -pie"
+export CFLAGS='${RPM_OPT_FLAGS} -fPIE -pie ${OPTFLAGS}'
 make %{?_smp_mflags}
 
 %install

(Note the single quotes vs. double quotes there...)

With this patch, the build is made with -DUSE_IPV6=1

I'm a Fedora package maintainer so if one of the maintainers would like to add me as a co-maintainer, I'm happy to check in this patch and push it through...

Comment 2 Conrad Meyer 2015-04-22 20:39:11 UTC
Not sure why I'm marked assignee on this. I don't use/maintain EL. @Greg, if you want to request maintainership in the database, and if it lets me, I'd be happy to approve you.

Re: the patch, why the single quotes? Seems like we want the variables expanded, no?

Thanks.

Comment 3 Greg Bailey 2015-04-22 20:54:35 UTC
(In reply to Conrad Meyer from comment #2)
> Not sure why I'm marked assignee on this. I don't use/maintain EL. @Greg, if
> you want to request maintainership in the database, and if it lets me, I'd
> be happy to approve you.

I requested commit access; it currently shows "Awaiting Review".  I assume you should be able to approve since you're listed as the package administrator.

> Re: the patch, why the single quotes? Seems like we want the variables
> expanded, no?

We do want the variables expanded, but not when it's evaluated by rpmbuild.  Instead, $OPTFLAGS is expanded by make, and not by rpmbuild.  And make is the process that has $OPTFLAGS defined (from reading the Makefile), not rpmbuild...

thanks!

Comment 4 Conrad Meyer 2015-04-22 20:59:32 UTC
You're approved, go wild! :-)

Comment 5 Greg Bailey 2015-04-22 21:02:02 UTC
(In reply to Conrad Meyer from comment #4)
> You're approved, go wild! :-)

thanks for your help!

Comment 6 Fedora Update System 2015-04-22 23:35:57 UTC
dnstop-20140915-1.el6.1 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/dnstop-20140915-1.el6.1

Comment 7 Fedora Update System 2015-04-23 19:03:19 UTC
Package dnstop-20140915-1.el6.1:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing dnstop-20140915-1.el6.1'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-5947/dnstop-20140915-1.el6.1
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2015-05-10 20:37:57 UTC
dnstop-20140915-1.el6.1 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.