1 |
pinkbyte 12/12/29 18:18:05 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: xtables-addons-2.1.ebuild |
5 |
Log: |
6 |
Version bump, wrt bug #397749, thanks to Andreis Vinogradovs |
7 |
|
8 |
(Portage version: 2.2.0_alpha144/cvs/Linux x86_64, unsigned Manifest commit) |
9 |
|
10 |
Revision Changes Path |
11 |
1.32 net-firewall/xtables-addons/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/xtables-addons/ChangeLog?rev=1.32&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/xtables-addons/ChangeLog?rev=1.32&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/xtables-addons/ChangeLog?r1=1.31&r2=1.32 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-firewall/xtables-addons/ChangeLog,v |
20 |
retrieving revision 1.31 |
21 |
retrieving revision 1.32 |
22 |
diff -u -r1.31 -r1.32 |
23 |
--- ChangeLog 29 Dec 2012 17:12:26 -0000 1.31 |
24 |
+++ ChangeLog 29 Dec 2012 18:18:05 -0000 1.32 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for net-firewall/xtables-addons |
27 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-firewall/xtables-addons/ChangeLog,v 1.31 2012/12/29 17:12:26 pinkbyte Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/xtables-addons/ChangeLog,v 1.32 2012/12/29 18:18:05 pinkbyte Exp $ |
30 |
+ |
31 |
+*xtables-addons-2.1 (29 Dec 2012) |
32 |
+ |
33 |
+ 29 Dec 2012; Sergey Popov <pinkbyte@g.o> +xtables-addons-2.1.ebuild: |
34 |
+ Version bump, wrt bug #397749, thanks to Andreis Vinogradovs |
35 |
|
36 |
*xtables-addons-1.47.1 (29 Dec 2012) |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
1.1 net-firewall/xtables-addons/xtables-addons-2.1.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/xtables-addons/xtables-addons-2.1.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/xtables-addons/xtables-addons-2.1.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: xtables-addons-2.1.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2012 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/net-firewall/xtables-addons/xtables-addons-2.1.ebuild,v 1.1 2012/12/29 18:18:05 pinkbyte Exp $ |
51 |
|
52 |
EAPI="5" |
53 |
|
54 |
inherit eutils linux-info linux-mod multilib |
55 |
|
56 |
DESCRIPTION="extensions not yet accepted in the main kernel/iptables (patch-o-matic(-ng) successor)" |
57 |
HOMEPAGE="http://xtables-addons.sourceforge.net/" |
58 |
SRC_URI="mirror://sourceforge/xtables-addons/${P}.tar.xz" |
59 |
|
60 |
LICENSE="GPL-2" |
61 |
SLOT="0" |
62 |
KEYWORDS="~amd64 ~x86" |
63 |
IUSE="modules" |
64 |
|
65 |
MODULES="quota2 psd pknock lscan length2 ipv4options ipp2p iface gradm geoip fuzzy condition tarpit sysrq steal rawnat logmark ipmark echo dnetmap dhcpmac delude chaos account" |
66 |
|
67 |
for mod in ${MODULES}; do |
68 |
IUSE="${IUSE} xtables_addons_${mod}" |
69 |
done |
70 |
|
71 |
DEPEND=">=net-firewall/iptables-1.4.5" |
72 |
|
73 |
RDEPEND="${DEPEND} |
74 |
xtables_addons_geoip? ( |
75 |
app-arch/unzip |
76 |
dev-perl/Text-CSV_XS |
77 |
virtual/perl-Getopt-Long |
78 |
) |
79 |
" |
80 |
|
81 |
DEPEND="${DEPEND} |
82 |
virtual/linux-sources" |
83 |
|
84 |
SKIP_MODULES="" |
85 |
|
86 |
# XA_kernel_check tee "2 6 32" |
87 |
XA_check4internal_module() { |
88 |
local mod=${1} |
89 |
local version=${2} |
90 |
local kconfigname=${3} |
91 |
|
92 |
if use xtables_addons_${mod} && kernel_is -gt ${version}; then |
93 |
ewarn "${kconfigname} should be provided by the kernel. Skipping its build..." |
94 |
if ! linux_chkconfig_present ${kconfigname}; then |
95 |
ewarn "Please enable ${kconfigname} target in your kernel |
96 |
configuration or disable checksum module in ${PN}." |
97 |
fi |
98 |
# SKIP_MODULES in case we need to disable building of everything |
99 |
# like having this USE disabled |
100 |
SKIP_MODULES+=" ${mod}" |
101 |
fi |
102 |
} |
103 |
|
104 |
pkg_setup() { |
105 |
if use modules; then |
106 |
get_version |
107 |
check_modules_supported |
108 |
CONFIG_CHECK="NF_CONNTRACK NF_CONNTRACK_MARK ~CONNECTOR" |
109 |
ERROR_CONNECTOR="Please, enable CONFIG_CONNECTOR if you wish to receive userspace notifications from pknock through netlink/connector" |
110 |
linux-mod_pkg_setup |
111 |
|
112 |
if ! linux_chkconfig_present IPV6; then |
113 |
SKIP_IPV6_MODULES="ip6table_rawpost" |
114 |
ewarn "No IPV6 support in kernel. Disabling: ${SKIP_IPV6_MODULES}" |
115 |
fi |
116 |
kernel_is -lt 3 7 && die "${P} requires kernel version >= 3.7, if you have older kernel please use 1.x version instead" |
117 |
fi |
118 |
} |
119 |
|
120 |
# Helper for maintainer: cheks if all possible MODULES are listed. |
121 |
XA_qa_check() { |
122 |
local all_modules |
123 |
all_modules=$(sed -n '/^build_/{s/build_\(.*\)=.*/\L\1/;G;s/\n/ /;s/ $//;h}; ${x;p}' "${S}/mconfig") |
124 |
if [[ ${all_modules} != ${MODULES} ]]; then |
125 |
ewarn "QA: Modules in mconfig differ from \$MODULES in ebuild." |
126 |
ewarn "Please, update MODULES in ebuild." |
127 |
ewarn "'${all_modules}'" |
128 |
fi |
129 |
} |
130 |
|
131 |
# Is there any use flag set? |
132 |
XA_has_something_to_build() { |
133 |
local mod |
134 |
for mod in ${MODULES}; do |
135 |
use xtables_addons_${mod} && return |
136 |
done |
137 |
|
138 |
eerror "All modules are disabled. What do you want me to build?" |
139 |
eerror "Please, set XTABLES_ADDONS to any combination of" |
140 |
eerror "${MODULES}" |
141 |
die "All modules are disabled." |
142 |
} |
143 |
|
144 |
# Parse Kbuid files and generates list of sources |
145 |
XA_get_module_name() { |
146 |
[[ $# != 1 ]] && die "XA_get_sources_for_mod: needs exactly one argument." |
147 |
local mod objdir build_mod sources_list |
148 |
mod=${1} |
149 |
objdir=${S}/extensions |
150 |
# Take modules name from mconfig |
151 |
build_mod=$(sed -n "s/\(build_${mod}\)=.*/\1/Ip" "${S}/mconfig") |
152 |
# strip .o, = and everything before = and print |
153 |
sources_list=$(sed -n "/^obj-[$][{]${build_mod}[}]/\ |
154 |
{s:obj-[^+]\+ [+]=[[:space:]]*::;s:[.]o::g;p}" \ |
155 |
"${objdir}/Kbuild") |
156 |
|
157 |
if [[ -d ${S}/extensions/${sources_list} ]]; then |
158 |
objdir=${S}/extensions/${sources_list} |
159 |
sources_list=$(sed -n "/^obj-m/\ |
160 |
{s:obj-[^+]\+ [+]=[[:space:]]*::;s:[.]o::g;p}" \ |
161 |
"${objdir}/Kbuild") |
162 |
fi |
163 |
for mod_src in ${sources_list}; do |
164 |
has ${mod_src} ${SKIP_IPV6_MODULES} || \ |
165 |
echo " ${mod_src}(xtables_addons:${S}/extensions:${objdir})" |
166 |
done |
167 |
} |
168 |
|
169 |
src_prepare() { |
170 |
XA_qa_check |
171 |
XA_has_something_to_build |
172 |
|
173 |
local mod module_name |
174 |
if use modules; then |
175 |
MODULE_NAMES="compat_xtables(xtables_addons:${S}/extensions:)" |
176 |
fi |
177 |
for mod in ${MODULES}; do |
178 |
if ! has ${mod} ${SKIP_MODULES} && use xtables_addons_${mod}; then |
179 |
sed "s/\(build_${mod}=\).*/\1m/I" -i mconfig || die |
180 |
if use modules; then |
181 |
for module_name in $(XA_get_module_name ${mod}); do |
182 |
MODULE_NAMES+=" ${module_name}" |
183 |
done |
184 |
fi |
185 |
else |
186 |
sed "s/\(build_${mod}=\).*/\1n/I" -i mconfig || die |
187 |
fi |
188 |
done |
189 |
einfo "${MODULE_NAMES}" # for debugging |
190 |
|
191 |
sed -e 's/depmod -a/true/' -i Makefile.in || die |
192 |
sed -e '/^all-local:/{s: modules::}' \ |
193 |
-e '/^install-exec-local:/{s: modules_install::}' \ |
194 |
-i extensions/Makefile.in || die |
195 |
|
196 |
use xtables_addons_geoip || sed -e '/^SUBDIRS/{s/geoip//}' -i Makefile.in |
197 |
} |
198 |
|
199 |
src_configure() { |
200 |
set_arch_to_kernel # .. or it'll look for /arch/amd64/Makefile |
201 |
econf --prefix="${EPREFIX}/" \ |
202 |
--libexecdir="${EPREFIX}/$(get_libdir)/" \ |
203 |
--with-kbuild="${KV_DIR}" |
204 |
} |
205 |
|
206 |
src_compile() { |
207 |
emake CFLAGS="${CFLAGS}" CC="$(tc-getCC)" V=1 |
208 |
use modules && BUILD_TARGETS="modules" linux-mod_src_compile |
209 |
} |
210 |
|
211 |
src_install() { |
212 |
emake DESTDIR="${D}" install |
213 |
use modules && linux-mod_src_install |
214 |
dodoc -r README doc/* |
215 |
find "${ED}" -type f -name '*.la' -exec rm -rf '{}' '+' |
216 |
} |