Fedora Account System
Red Hat Associate
Red Hat Customer
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
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...
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.
(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!
You're approved, go wild! :-)
(In reply to Conrad Meyer from comment #4) > You're approved, go wild! :-) thanks for your help!
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
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).
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.