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
Created attachment 339058 [details, diff] 0001-batman-adv-fix-skb-leak-in-batadv_dat_snoop_incoming.patch
Created attachment 339060 [details, diff] 0002-batman-adv-check-for-more-types-of-invalid-IP-addres.patch
Created attachment 339062 [details, diff] 0003-batman-adv-filter-ARP-packets-with-invalid-MAC-addre.patch
Created attachment 339064 [details, diff] 0004-batman-adv-Fix-NULL-pointer-dereference-in-DAT-hash-.patch
> 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 )
(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.
(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
ffr, please make a recognizeable mapping between attachments and filenames in ebuild.
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
(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!
(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)"
+*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. +