Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 457826 - net-misc/batman-adv-2013.0.0-r1 - add fixes that have not been realeased yet
Summary: net-misc/batman-adv-2013.0.0-r1 - add fixes that have not been realeased yet
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michael Weber (RETIRED)
URL:
Whiteboard:
Keywords: EBUILD, PATCH
Depends on:
Blocks:
 
Reported: 2013-02-16 13:20 UTC by Antonio Quartulli
Modified: 2013-02-17 21:57 UTC (History)
0 users

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


Attachments
new ebuild (batman-adv-2013.0.0-r1.ebuild,1.43 KB, text/plain)
2013-02-16 13:20 UTC, Antonio Quartulli
Details
0001-batman-adv-fix-skb-leak-in-batadv_dat_snoop_incoming.patch (0001-batman-adv-fix-skb-leak-in-batadv_dat_snoop_incoming.patch,1.12 KB, patch)
2013-02-16 13:20 UTC, Antonio Quartulli
Details | Diff
0002-batman-adv-check-for-more-types-of-invalid-IP-addres.patch (0002-batman-adv-check-for-more-types-of-invalid-IP-addres.patch,1.41 KB, patch)
2013-02-16 13:21 UTC, Antonio Quartulli
Details | Diff
0003-batman-adv-filter-ARP-packets-with-invalid-MAC-addre.patch (0003-batman-adv-filter-ARP-packets-with-invalid-MAC-addre.patch,1.65 KB, patch)
2013-02-16 13:21 UTC, Antonio Quartulli
Details | Diff
0004-batman-adv-Fix-NULL-pointer-dereference-in-DAT-hash-.patch (0004-batman-adv-Fix-NULL-pointer-dereference-in-DAT-hash-.patch,1.50 KB, patch)
2013-02-16 13:21 UTC, Antonio Quartulli
Details | Diff
batman-adv-2013.0.0-r1.ebuild (batman-adv-2013.0.0-r1.ebuild,1.40 KB, text/plain)
2013-02-17 21:38 UTC, Antonio Quartulli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Quartulli 2013-02-16 13:20:12 UTC
Created attachment 339056 [details]
new ebuild

With this ebuild I'd like to add 4 patches that are fixing important bugs in the 2013.0.0 release.
This patches have been merged upstream and are going to be released with linux-3.8. However they will not appear in any batman-adv stable release before 2013.1.0.

For this reason I think it is worth merging this patches now as they are solving important issues.

p.s. I wanted to use PATCHES=() but I couldn't find any reference explaining me how to do so
Comment 1 Antonio Quartulli 2013-02-16 13:20:57 UTC
Created attachment 339058 [details, diff]
0001-batman-adv-fix-skb-leak-in-batadv_dat_snoop_incoming.patch
Comment 2 Antonio Quartulli 2013-02-16 13:21:19 UTC
Created attachment 339060 [details, diff]
0002-batman-adv-check-for-more-types-of-invalid-IP-addres.patch
Comment 3 Antonio Quartulli 2013-02-16 13:21:37 UTC
Created attachment 339062 [details, diff]
0003-batman-adv-filter-ARP-packets-with-invalid-MAC-addre.patch
Comment 4 Antonio Quartulli 2013-02-16 13:21:56 UTC
Created attachment 339064 [details, diff]
0004-batman-adv-Fix-NULL-pointer-dereference-in-DAT-hash-.patch
Comment 5 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-02-16 21:40:43 UTC
> p.s. I wanted to use PATCHES=() but I couldn't find any reference explaining me how to do so
It's a bash array, you just add patches to it as you go, eg: PATCHES=( "${FILESDIR}"/0001-batman-adv-fix-skb-leak-in-batadv_dat_snoop_incoming.patch )
Comment 6 Antonio Quartulli 2013-02-17 16:33:08 UTC
(In reply to comment #5)
> > p.s. I wanted to use PATCHES=() but I couldn't find any reference explaining me how to do so
> It's a bash array, you just add patches to it as you go, eg: PATCHES=(
> "${FILESDIR}"/0001-batman-adv-fix-skb-leak-in-batadv_dat_snoop_incoming.
> patch )

I tried that, but I think i need to add something else in src_prepare() ? it seemed that the array got ignored.
Comment 7 Michael Weber (RETIRED) gentoo-dev 2013-02-17 21:26:58 UTC
(In reply to comment #6)
> I tried that, but I think i need to add something else in src_prepare() ? it
> seemed that the array got ignored.

Yes, you need to inherit an eclass that supports that, and make sure (either implicit or explicit) to call this eclass' src_prepare function.

grep -rl PATCHES /usr/portage/eclass
 -> base.eclass -> base_src_prepare
Comment 8 Michael Weber (RETIRED) gentoo-dev 2013-02-17 21:32:11 UTC
ffr, please make a recognizeable mapping between attachments and filenames in ebuild.
Comment 9 Antonio Quartulli 2013-02-17 21:38:21 UTC
Created attachment 339188 [details]
batman-adv-2013.0.0-r1.ebuild

Here the new ebuild using the PATCHES array. I also modified the description of the other attachments to reflect the name used in the ebuild itself
Comment 10 Antonio Quartulli 2013-02-17 21:41:59 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > I tried that, but I think i need to add something else in src_prepare() ? it
> > seemed that the array got ignored.
> 
> Yes, you need to inherit an eclass that supports that, and make sure (either
> implicit or explicit) to call this eclass' src_prepare function.
> 
> grep -rl PATCHES /usr/portage/eclass
>  -> base.eclass -> base_src_prepare

Thank you!
Comment 11 Michael Weber (RETIRED) gentoo-dev 2013-02-17 21:56:50 UTC
(In reply to comment #10)
> Thank you!
Your welcome. There is tons of information/docs inside the eclass files.

I decided to call this 2013.0.0_p20130215, to mark this as a patch-level of Feb 15th. I needed to work around some defaults, i.e. _p... is part of $PV -> $P -> $S -> linux-mod objdir.
So I comitted following ...


# diff -ru batman-adv-2013.0.0.ebuild batman-adv-2013.0.0_p20130215.ebuild                 
--- batman-adv-2013.0.0.ebuild  2013-01-14 12:08:42.000000000 +0100
+++ batman-adv-2013.0.0_p20130215.ebuild        2013-02-17 22:51:55.523000000 +0100
@@ -4,15 +4,17 @@
 
 EAPI=4
 
+MY_P=${PN}-2013.0.0
+S=${WORKDIR}/${MY_P}
 CONFIG_CHECK="~!CONFIG_BATMAN_ADV"
 MODULE_NAMES="${PN}(net:${S}:${S})"
 BUILD_TARGETS="all"
 
-inherit linux-mod
+inherit base linux-mod
 
 DESCRIPTION="Better approach to mobile Ad-Hoc networking on layer 2 kernel module"
 HOMEPAGE="http://www.open-mesh.org/"
-SRC_URI="http://downloads.open-mesh.org/batman/stable/sources/${PN}/${P}.tar.gz"
+SRC_URI="http://downloads.open-mesh.org/batman/stable/sources/${PN}/${MY_P}.tar.gz"
 
 LICENSE="GPL-2"
 SLOT="0"
@@ -22,6 +24,13 @@
 DEPEND=""
 RDEPEND=""
 
+PATCHES=(
+       "${FILESDIR}"/${MY_P}-0001-fix-skb-leak-in-batadv_dat_snoop_incoming.patch
+       "${FILESDIR}"/${MY_P}-0002-check-for-more-types-of-invalid-IP-addres.patch
+       "${FILESDIR}"/${MY_P}-0003-filter-ARP-packets-with-invalid-MAC-addre.patch
+       "${FILESDIR}"/${MY_P}-0004-Fix-NULL-pointer-dereference-in-DAT-hash-.patch
+)
+
 src_compile() {
        BUILD_PARAMS="CONFIG_BATMAN_ADV_DEBUG=$(use debug && echo y || echo n)"
        BUILD_PARAMS+=" CONFIG_BATMAN_ADV_BLA=$(use bla && echo y || echo n)"
Comment 12 Michael Weber (RETIRED) gentoo-dev 2013-02-17 21:57:00 UTC
+*batman-adv-2013.0.0_p20130215 (17 Feb 2013)
+
+  17 Feb 2013; Michael Weber <xmw@gentoo.org>
+  +batman-adv-2013.0.0_p20130215.ebuild,
+  +files/batman-adv-2013.0.0-0001-fix-skb-leak-in-batadv_dat_snoop_incoming.pat
+  ch,
+  +files/batman-adv-2013.0.0-0002-check-for-more-types-of-invalid-IP-addres.pat
+  ch,
+  +files/batman-adv-2013.0.0-0003-filter-ARP-packets-with-invalid-MAC-addre.pat
+  ch,
+  +files/batman-adv-2013.0.0-0004-Fix-NULL-pointer-dereference-in-DAT-hash-.pat
+  ch:
+  Version bump to patchset of Feb 15th. Thanks Antonio Quartulli, bug 457826.
+