1 |
commit: 29fc9b2db792adbb2f739c5b9d7b2b9c6c644809 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 3 21:17:53 2020 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 3 21:18:07 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29fc9b2d |
7 |
|
8 |
net-analyzer/nmap: Version 7.90 |
9 |
|
10 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
11 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
12 |
|
13 |
net-analyzer/nmap/Manifest | 1 + |
14 |
.../nmap/files/nmap-7.90-no-FORTIFY_SOURCE.patch | 66 +++++++++++ |
15 |
net-analyzer/nmap/nmap-7.90.ebuild | 121 +++++++++++++++++++++ |
16 |
3 files changed, 188 insertions(+) |
17 |
|
18 |
diff --git a/net-analyzer/nmap/Manifest b/net-analyzer/nmap/Manifest |
19 |
index e34efcfd0b5..a93780188aa 100644 |
20 |
--- a/net-analyzer/nmap/Manifest |
21 |
+++ b/net-analyzer/nmap/Manifest |
22 |
@@ -1,2 +1,3 @@ |
23 |
DIST nmap-7.80.tar.bz2 10550327 BLAKE2B 513a5589f4dd72660d290cc03b8130da2c41e4620c5a82e125e4345259b8d0f6efa8bceef47d3c0d2b5b588888b716070e05105a09b0185622aed9268715ae2c SHA512 d4384d3ebf4f3abf3588eed5433f733874ecdceb9342a718dc36db19634b0cc819d73399974eb0a9a9c9dd9e5c88473e07644ec91db28b0c072552b54430be6b |
24 |
+DIST nmap-7.90.tar.bz2 10485842 BLAKE2B 96307cf51bdf24758f0ee77e29108c112fce49128f209f163a4fa38b5f4e0e1a820a08097ea9fa05cf1ce79604e7f30a4cdfd5b693e5dcf458e3a9955b527957 SHA512 b77c31ef43c9a069f0f63a3cc166021f714a8664cca4d51d1b8467cb166f5e3acb4a4bd0f2bdad7f87777a506ef56cc54fa094e664997c8e436b50208214e7c6 |
25 |
DIST nmap-logo-64.png 3289 BLAKE2B 9563f57d126e6fa38dc777391c2887112836b4f5b521311bde64d5c5a04c45a3f420abba0750f776658015c0018b2afeb381c691bc8784e4f39abc78b9c2d2c7 SHA512 fb102d12aaeebc8a97543ecd653a3606e86996ad679bc26d6e6e274ad05ec3e9f92521289d1a24153c521b699e8c0cfa65d8856bb49af53ee4837268bbc6b5d3 |
26 |
|
27 |
diff --git a/net-analyzer/nmap/files/nmap-7.90-no-FORTIFY_SOURCE.patch b/net-analyzer/nmap/files/nmap-7.90-no-FORTIFY_SOURCE.patch |
28 |
new file mode 100644 |
29 |
index 00000000000..b4c06be942e |
30 |
--- /dev/null |
31 |
+++ b/net-analyzer/nmap/files/nmap-7.90-no-FORTIFY_SOURCE.patch |
32 |
@@ -0,0 +1,66 @@ |
33 |
+--- a/nbase/Makefile.in |
34 |
++++ b/nbase/Makefile.in |
35 |
+@@ -12,7 +12,7 @@ |
36 |
+ CCOPT = |
37 |
+ DEFS = @DEFS@ |
38 |
+ # With GCC, add extra security checks to source code. |
39 |
+-DEFS += -D_FORTIFY_SOURCE=2 |
40 |
++DEFS += |
41 |
+ CPPFLAGS = @CPPFLAGS@ |
42 |
+ CFLAGS = @CFLAGS@ $(CCOPT) $(GLIB_CFLAGS) $(DEFS) $(INCLS) |
43 |
+ STATIC = |
44 |
+--- a/ncat/Makefile.in |
45 |
++++ b/ncat/Makefile.in |
46 |
+@@ -53,7 +53,7 @@ |
47 |
+ LIBS = @LIBS@ |
48 |
+ DEFS = @DEFS@ -DNCAT_DATADIR="\"$(pkgdatadir)\"" |
49 |
+ # With GCC, add extra security checks to source code. |
50 |
+-DEFS += -D_FORTIFY_SOURCE=2 |
51 |
++DEFS += |
52 |
+ INCLS = -I. -I.. -I../nsock/include/ -I$(NBASEDIR) |
53 |
+ RM = rm -f |
54 |
+ STRIP = @STRIP@ |
55 |
+--- a/nsock/src/Makefile.in |
56 |
++++ b/nsock/src/Makefile.in |
57 |
+@@ -13,7 +13,7 @@ |
58 |
+ CCOPT = |
59 |
+ DEFS = @DEFS@ -DNSOCK_VERSION=\"$(NSOCK_VERSION)\" |
60 |
+ # With GCC, add extra security checks to source code. |
61 |
+-DEFS += -D_FORTIFY_SOURCE=2 |
62 |
++DEFS += |
63 |
+ INCLS = -I../include |
64 |
+ CFLAGS = @CFLAGS@ $(CCOPT) |
65 |
+ # CFLAGS = -g -Wall $(DEFS) $(INCLS) |
66 |
+--- a/libnetutil/Makefile.in |
67 |
++++ b/libnetutil/Makefile.in |
68 |
+@@ -5,7 +5,7 @@ |
69 |
+ CXXFLAGS = @CXXFLAGS@ |
70 |
+ CPPFLAGS = @CPPFLAGS@ $(DEFS) |
71 |
+ DEFS = @DEFS@ |
72 |
+-DEFS += -D_FORTIFY_SOURCE=2 |
73 |
++DEFS += |
74 |
+ AR = ar |
75 |
+ RANLIB = @RANLIB@ |
76 |
+ |
77 |
+--- a/Makefile.in |
78 |
++++ b/Makefile.in |
79 |
+@@ -41,7 +41,7 @@ |
80 |
+ # http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html |
81 |
+ # Level 1 only makes changes that don't affect "conforming" programs, |
82 |
+ # while level 2 enforces additional restrictions. |
83 |
+-DEFS += -D_FORTIFY_SOURCE=2 |
84 |
++DEFS += |
85 |
+ # For mtrace debugging -- see MTRACE define in main.cc for instructions |
86 |
+ # Should only be enabled during debugging and not in any real release. |
87 |
+ # DEFS += -DMTRACE=1 |
88 |
+--- a/nping/Makefile.in |
89 |
++++ b/nping/Makefile.in |
90 |
+@@ -38,7 +38,7 @@ |
91 |
+ # http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html |
92 |
+ # Level 1 only makes changes that don't affect "conforming" programs, |
93 |
+ # while level 2 enforces additional restrictions. |
94 |
+-DEFS += -D_FORTIFY_SOURCE=2 |
95 |
++DEFS += |
96 |
+ # For mtrace debugging -- see MTRACE define in main.cc for instructions |
97 |
+ # Should only be enabled during debugging and not in any real release. |
98 |
+ # DEFS += -DMTRACE=1 |
99 |
|
100 |
diff --git a/net-analyzer/nmap/nmap-7.90.ebuild b/net-analyzer/nmap/nmap-7.90.ebuild |
101 |
new file mode 100644 |
102 |
index 00000000000..f9b6702ee09 |
103 |
--- /dev/null |
104 |
+++ b/net-analyzer/nmap/nmap-7.90.ebuild |
105 |
@@ -0,0 +1,121 @@ |
106 |
+# Copyright 1999-2020 Gentoo Authors |
107 |
+# Distributed under the terms of the GNU General Public License v2 |
108 |
+ |
109 |
+EAPI=7 |
110 |
+ |
111 |
+MY_P=${P/_beta/BETA} |
112 |
+inherit autotools desktop flag-o-matic toolchain-funcs user |
113 |
+ |
114 |
+DESCRIPTION="A utility for network discovery and security auditing" |
115 |
+HOMEPAGE="https://nmap.org/" |
116 |
+SRC_URI=" |
117 |
+ https://nmap.org/dist/${MY_P}.tar.bz2 |
118 |
+ https://dev.gentoo.org/~jer/nmap-logo-64.png |
119 |
+" |
120 |
+ |
121 |
+LICENSE="GPL-2" |
122 |
+SLOT="0" |
123 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
124 |
+IUSE="ipv6 libressl libssh2 ncat nping +nse ssl system-lua" |
125 |
+REQUIRED_USE="system-lua? ( nse )" |
126 |
+ |
127 |
+RDEPEND=" |
128 |
+ dev-libs/liblinear:= |
129 |
+ dev-libs/libpcre |
130 |
+ net-libs/libpcap |
131 |
+ libssh2? ( |
132 |
+ net-libs/libssh2[zlib] |
133 |
+ sys-libs/zlib |
134 |
+ ) |
135 |
+ nse? ( sys-libs/zlib ) |
136 |
+ ssl? ( |
137 |
+ !libressl? ( dev-libs/openssl:0= ) |
138 |
+ libressl? ( dev-libs/libressl:= ) |
139 |
+ ) |
140 |
+ system-lua? ( >=dev-lang/lua-5.2:*[deprecated] ) |
141 |
+" |
142 |
+DEPEND="${RDEPEND}" |
143 |
+ |
144 |
+PATCHES=( |
145 |
+ "${FILESDIR}"/${PN}-5.10_beta1-string.patch |
146 |
+ "${FILESDIR}"/${PN}-5.21-python.patch |
147 |
+ "${FILESDIR}"/${PN}-6.46-uninstaller.patch |
148 |
+ "${FILESDIR}"/${PN}-6.25-liblua-ar.patch |
149 |
+ "${FILESDIR}"/${PN}-7.25-CXXFLAGS.patch |
150 |
+ "${FILESDIR}"/${PN}-7.25-libpcre.patch |
151 |
+ "${FILESDIR}"/${PN}-7.31-libnl.patch |
152 |
+ "${FILESDIR}"/${PN}-7.80-ac-config-subdirs.patch |
153 |
+ "${FILESDIR}"/${PN}-7.90-no-FORTIFY_SOURCE.patch |
154 |
+) |
155 |
+S="${WORKDIR}/${MY_P}" |
156 |
+ |
157 |
+src_prepare() { |
158 |
+ rm -r liblinear/ libpcap/ libpcre/ libssh2/ libz/ || die |
159 |
+ |
160 |
+ cat "${FILESDIR}"/nls.m4 >> "${S}"/acinclude.m4 || die |
161 |
+ |
162 |
+ default |
163 |
+ |
164 |
+ sed -i \ |
165 |
+ -e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \ |
166 |
+ Makefile.in || die |
167 |
+ # Fix desktop files wrt bug #432714 |
168 |
+ sed -i \ |
169 |
+ -e 's|^Categories=.*|Categories=Network;System;Security;|g' \ |
170 |
+ zenmap/install_scripts/unix/zenmap-root.desktop \ |
171 |
+ zenmap/install_scripts/unix/zenmap.desktop || die |
172 |
+ |
173 |
+ cp libdnet-stripped/include/config.h.in{,.nmap-orig} || die |
174 |
+ |
175 |
+ eautoreconf |
176 |
+ |
177 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
178 |
+ # we need the original for a Darwin-specific fix, bug #604432 |
179 |
+ mv libdnet-stripped/include/config.h.in{.nmap-orig,} || die |
180 |
+ fi |
181 |
+} |
182 |
+ |
183 |
+src_configure() { |
184 |
+ # The bundled libdnet is incompatible with the version available in the |
185 |
+ # tree, so we cannot use the system library here. |
186 |
+ econf \ |
187 |
+ $(use_enable ipv6) \ |
188 |
+ $(use_with libssh2) \ |
189 |
+ $(use_with ncat) \ |
190 |
+ --without-ndiff \ |
191 |
+ $(use_with nping) \ |
192 |
+ $(use_with ssl openssl) \ |
193 |
+ --without-zenmap \ |
194 |
+ $(usex libssh2 --with-zlib) \ |
195 |
+ $(usex nse --with-zlib) \ |
196 |
+ $(usex nse --with-liblua=$(usex system-lua /usr included '' '') --without-liblua) \ |
197 |
+ --cache-file="${S}"/config.cache \ |
198 |
+ --with-libdnet=included \ |
199 |
+ --with-pcre=/usr |
200 |
+ # Commented out because configure does weird things |
201 |
+ # --with-liblinear=/usr \ |
202 |
+} |
203 |
+ |
204 |
+src_compile() { |
205 |
+ local directory |
206 |
+ for directory in . libnetutil nsock/src \ |
207 |
+ $(usex ncat ncat '') \ |
208 |
+ $(usex nping nping '') |
209 |
+ do |
210 |
+ emake -C "${directory}" makefile.dep |
211 |
+ done |
212 |
+ |
213 |
+ emake \ |
214 |
+ AR=$(tc-getAR) \ |
215 |
+ RANLIB=$(tc-getRANLIB) |
216 |
+} |
217 |
+ |
218 |
+src_install() { |
219 |
+ LC_ALL=C emake -j1 \ |
220 |
+ DESTDIR="${D}" \ |
221 |
+ STRIP=: \ |
222 |
+ nmapdatadir="${EPREFIX}"/usr/share/nmap \ |
223 |
+ install |
224 |
+ |
225 |
+ dodoc CHANGELOG HACKING docs/README docs/*.txt |
226 |
+} |