Gentoo Archives: gentoo-commits

From: Sergey Popov <pinkbyte@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-firewall/rtsp-conntrack/files/, net-firewall/rtsp-conntrack/
Date: Mon, 27 Aug 2018 10:04:19
Message-Id: 1535364236.6b2a4d2b552d8a3c3fcdc9bb75d074f153fdf34c.pinkbyte@gentoo
1 commit: 6b2a4d2b552d8a3c3fcdc9bb75d074f153fdf34c
2 Author: Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 27 10:01:35 2018 +0000
4 Commit: Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 27 10:03:56 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b2a4d2b
7
8 net-firewall/rtsp-conntrack: fix compatibility with kernel 4.18
9
10 Port compatibility patch to make package work with wider kernel range.
11 Bump to EAPI 7.
12
13 Reported-by: Toralf Förster <toralf <AT> gentoo.org>
14 Closes: https://bugs.gentoo.org/664368
15 Package-Manager: Portage-2.3.40, Repoman-2.3.9
16
17 .../files/rtsp-conntrack-3.7-linux-4.18.patch | 28 ++++++++++++++++++++++
18 .../rtsp-conntrack/rtsp-conntrack-3.7.ebuild | 17 ++++---------
19 2 files changed, 33 insertions(+), 12 deletions(-)
20
21 diff --git a/net-firewall/rtsp-conntrack/files/rtsp-conntrack-3.7-linux-4.18.patch b/net-firewall/rtsp-conntrack/files/rtsp-conntrack-3.7-linux-4.18.patch
22 new file mode 100644
23 index 00000000000..a10d994099f
24 --- /dev/null
25 +++ b/net-firewall/rtsp-conntrack/files/rtsp-conntrack-3.7-linux-4.18.patch
26 @@ -0,0 +1,28 @@
27 +Port of 4.18 patch[1] to version 3.7 of rtsp-conntrack
28 +
29 +[1] - https://github.com/maru-sama/rtsp-linux/pull/7
30 +
31 +--- a/nf_nat_rtsp.c 2018-08-27 12:53:39.991467210 +0300
32 ++++ b/nf_nat_rtsp.c 2018-08-27 12:53:56.087466258 +0300
33 +@@ -31,6 +31,7 @@
34 + */
35 +
36 + #include <linux/module.h>
37 ++#include <linux/version.h>
38 + #include <net/tcp.h>
39 + #include <net/netfilter/nf_nat.h>
40 + #include <net/netfilter/nf_nat_helper.h>
41 +@@ -430,7 +431,13 @@
42 +
43 + static void expected(struct nf_conn* ct, struct nf_conntrack_expect *exp)
44 + {
45 ++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0)
46 ++ struct nf_nat_range2 range;
47 ++ #elif LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) || LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
48 + struct nf_nat_range range;
49 ++ #else
50 ++ struct nf_nat_ipv4_range range;
51 ++ #endif
52 + union nf_inet_addr newdstip, newsrcip, newip;
53 +
54 + struct nf_conn *master = ct->master;
55
56 diff --git a/net-firewall/rtsp-conntrack/rtsp-conntrack-3.7.ebuild b/net-firewall/rtsp-conntrack/rtsp-conntrack-3.7.ebuild
57 index 51d0c0cf892..14fb40edd82 100644
58 --- a/net-firewall/rtsp-conntrack/rtsp-conntrack-3.7.ebuild
59 +++ b/net-firewall/rtsp-conntrack/rtsp-conntrack-3.7.ebuild
60 @@ -1,8 +1,8 @@
61 -# Copyright 1999-2013 Gentoo Foundation
62 +# Copyright 1999-2018 Gentoo Foundation
63 # Distributed under the terms of the GNU General Public License v2
64
65 -EAPI=5
66 -inherit eutils linux-mod versionator
67 +EAPI=7
68 +inherit linux-mod
69
70 DESCRIPTION="RTSP conntrack module for Netfilter"
71 HOMEPAGE="http://mike.it-loops.com/rtsp"
72 @@ -14,6 +14,8 @@ KEYWORDS="amd64 x86"
73
74 S="${WORKDIR}/rtsp"
75
76 +PATCHES=( "${FILESDIR}/${P}-linux-4.18.patch" )
77 +
78 BUILD_TARGETS="all"
79 MODULE_NAMES="
80 nf_conntrack_rtsp(net/netfilter::)
81 @@ -24,12 +26,3 @@ CONFIG_CHECK="NF_CONNTRACK"
82 WARNING_NF_CONNTRACK="You must enable NF_CONNTRACK in your kernel, otherwise ${PN} would not work"
83
84 BUILD_PARAMS="KERNELDIR=${KERNEL_DIR} V=1"
85 -
86 -pkg_setup() {
87 - linux-mod_pkg_setup
88 - kernel_is -lt $(get_version_components) && die "This version of ${PN} would not work on kernels <= ${PV}"
89 -}
90 -
91 -src_prepare() {
92 - epatch_user
93 -}