Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 175470 - Linux kernel >=2.6.20 has TCP-MD5 support built in, adjust quagga ebuild to take advantage
Summary: Linux kernel >=2.6.20 has TCP-MD5 support built in, adjust quagga ebuild to t...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Alin Năstac (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-21 17:12 UTC by Duncan Lockwood
Modified: 2007-05-05 13:34 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan Lockwood 2007-04-21 17:12:35 UTC
Kernel 2.6.20 saw the addition of the long awaited (at least by me anyway) TCP-MD5 support.

Quagga ebuild has a "tcpmd5" USE flag, which is for the old style way of doing it with Hasso's kernel patch. 

I have tweaked the ebuild to use the new method should your kernel be >=2.6.20

Reproducible: Always

Steps to Reproduce:




The new Quagga patch (as referenced in the quagga wiki) can be found here:-
http://www.solinno.co.uk/md5sig/quagga_linux-2.6.20_md5sig.diff 
(Thanks to Leigh Brown)

My diff from the current quagga-0.99.6-r1.ebuild can be found here:-
http://www.splurby.net/~dunc/quagga/quagga-0.99.6-r1.ebuild_2.6.20_md5sig.patch
Comment 1 Alin Năstac (RETIRED) gentoo-dev 2007-04-25 22:28:06 UTC
Fixed in 0.99.6-r2.
I've added the configure.ac part of the old MD5 patch to the new patch, in order --enable-tcp-md5 option to work.

Well done!
Comment 2 Duncan Lockwood 2007-04-28 17:17:44 UTC
Oh excellent news.

I'm glad to have been of some help even if it was in such a small way :-)
Comment 3 Erik Logtenberg 2007-05-01 19:10:34 UTC
Hi,

I like this new patch, however on one of my machines it won't compile. This box is a XEN host, where I haven't got a configured set of kernel sources (no .config file and the such), since this box doesn't compile its own kernel anyway.
But now this new version of quagga won't compile:

> !!! Unable to calculate Linux Kernel version
> !!! If you need support, post the topmost build error, and the call
>  stack if relevant.

Now I don't quite understand why it tries to calculate the kernel version to begin with, since - if I understand the .ebuild correctly - it only tries to figure this out "if use tcpmd5" is true, which is not the case in my config:

> [ebuild     U ] net-misc/quagga-0.99.6-r2 [0.99.6-r1] USE="pam snmp
>  -bgpclassless -ipv6 -multipath -ospfapi -realms -tcp-zebra -tcpmd5" 0 kB

This is what's in the .ebuild (twice)

>        if use tcpmd5 ; then
>                if kernel_is lt 2 6 20 ; then

I figure it shouldn't test the Linux kernel version when tcpmd5 isn't set, right?
So.. if not, then: is there a way to skip this test so that the package compiles without tcpmd5 support and so that I don't have to fake a configured kernel sourcetree?

Kind regards,

Erik.
Comment 4 Alin Năstac (RETIRED) gentoo-dev 2007-05-01 21:07:31 UTC
I didn't wanted to invent a tcpmd5-ver2 flag because it would be confusing, (not to mention the useless hassle suffered by the majority of quagga users, forced to switch to the new flag). Since only by knowing the kernel version I could correctly decide which patch should be applied, the only way to do that would be by using linux-info.eclass .

If you have a better idea how should be done, please share it here.

In the meantime, I've added pkg_setup function, replacing the default exported by linux-info. Now it uses the running kernel version when kernel source is not installed. On machines where is installed from a binary package, the worst thing that could happen would be wrong/misleading info messages displayed in pkg_postinst.
Comment 5 Erik Logtenberg 2007-05-05 13:34:30 UTC
Hi Alin,

Thanks for your update. I have no better idea how to handle this, but your latest patch compiles fine now.

Thanks again.