Skip to content

Commit 210adf9

Browse files
committed
Remove nmap-update
This feature was never publicly released, and has not been distributed in our binary builds for a couple versions now. It needed to be removed in order to reduce the number of places Nmap looks for data files. See nmap#2051
1 parent 2520edd commit 210adf9

32 files changed

+18
-8411
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ stamp-h1
2929
/nsock/include/nsock_config.h
3030
/zenmap/build/
3131
/zenmap/INSTALLED_FILES
32-
/nmap-update/nmap-update
3332
TAGS
3433
autom4te.cache/
3534
/libpcap/*.3pcap

Makefile.in

+5-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Extract the version string from nmap.h.
22
export NMAP_VERSION := $(shell grep '^\#[ \t]*define[ \t]\+NMAP_VERSION' nmap.h | sed -e 's/.*"\(.*\)".*/\1/' -e 'q')
3-
export NMAP_UPDATE_CHANNEL := $(shell grep '^\#[ \t]*define[ \t]\+NMAP_UPDATE_CHANNEL' nmap.h | sed -e 's/.*"\(.*\)".*/\1/' -e 'q')
43
NMAP_PLATFORM=@host@
54
datarootdir = @datarootdir@
65
prefix = @prefix@
@@ -124,7 +123,7 @@ OBJS = charpool.o FingerPrintResults.o FPEngine.o FPModel.o idle_scan.o MACLooku
124123
# large for field of 2 bytes". Disable debugging for this one file.
125124
FPModel.o: CXXFLAGS += -g0
126125

127-
all: $(TARGET) $(BUILDZENMAP) $(BUILDNDIFF) $(BUILDNPING) $(BUILDNCAT) @NMAP_UPDATE_BUILD@
126+
all: $(TARGET) $(BUILDZENMAP) $(BUILDNDIFF) $(BUILDNPING) $(BUILDNCAT)
128127

129128
$(TARGET): build-netutil @LIBLINEAR_BUILD@ @PCAP_BUILD@ @LIBSSH2_BUILD@ @ZLIB_BUILD@ @PCRE_BUILD@ @NSOCK_BUILD@ @NBASE_BUILD@ @DNET_BUILD@ @LUA_BUILD@ \
130129
$(OBJS) main.o
@@ -170,8 +169,6 @@ build-liblinear: $(LIBLINEARDIR)/Makefile
170169
# -Wno-uninitialized avoids the warning "'Gnorm1_init' may be used uninitialized in this function"
171170
@echo Compiling liblinear; cd $(LIBLINEARDIR) && $(MAKE) liblinear.a CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS) -Wno-uninitialized"
172171

173-
build-nmap-update: nmap-update/default_channel.h
174-
175172
# This is the last one to ensure specific build targets are preferred
176173
build-%: %/Makefile
177174
cd $* && $(MAKE)
@@ -202,7 +199,7 @@ web:
202199

203200
clean: @LUA_CLEAN@ @LIBLINEAR_CLEAN@ @PCAP_CLEAN@ @PCRE_CLEAN@ @DNET_CLEAN@ @LIBSSH2_CLEAN@ @ZLIB_CLEAN@\
204201
clean-nsock clean-nbase clean-netutil @NPING_CLEAN@ @ZENMAP_CLEAN@ \
205-
@NCAT_CLEAN@ @NMAP_UPDATE_CLEAN@ @NDIFF_CLEAN@ clean-tests
202+
@NCAT_CLEAN@ @NDIFF_CLEAN@ clean-tests
206203
rm -f $(OBJS) main.o $(TARGET)
207204
# Who generates dependencies.mk? If it is generated by ./configure and
208205
# not by make it should be moved to distclean
@@ -213,7 +210,7 @@ debugclean:
213210

214211
distclean: @LUA_DIST_CLEAN@ @LIBLINEAR_DIST_CLEAN@ @PCAP_DIST_CLEAN@ @LIBSSH2_DIST_CLEAN@\
215212
@ZLIB_DIST_CLEAN@ @PCRE_DIST_CLEAN@ @DNET_DIST_CLEAN@ @NPING_DIST_CLEAN@ @ZENMAP_DIST_CLEAN@ \
216-
@NCAT_DIST_CLEAN@ @NMAP_UPDATE_DIST_CLEAN@ distclean-netutil \
213+
@NCAT_DIST_CLEAN@ distclean-netutil \
217214
distclean-nsock distclean-nbase @NDIFF_DIST_CLEAN@ clean debugclean
218215
rm -f Makefile Makefile.bak makefile.dep nmap_config.h stamp-h \
219216
stamp-h.in config.cache config.log config.status
@@ -354,10 +351,6 @@ $(NPINGDIR)/nping.h: nmap.h
354351
$(ZENMAPDIR)/zenmapCore/Version.py $(ZENMAPDIR)/share/zenmap/config/zenmap_version: nmap.h
355352
cd $(ZENMAPDIR) && $(PYTHON) install_scripts/utils/version_update.py "$(NMAP_VERSION)"
356353

357-
nmap-update/default_channel.h: nmap.h
358-
sed -e 's/^#[ \t]*define[ \t]\+DEFAULT_CHANNEL[ \t]\+\(".*"\)/#define DEFAULT_CHANNEL "$(NMAP_UPDATE_CHANNEL)"/' $@ > $@.tmp
359-
mv -f $@.tmp $@
360-
361354
tests/check_dns: $(OBJS)
362355
$(CXX) -o $@ $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $^ $(LIBS) tests/nmap_dns_test.cc
363356

@@ -422,10 +415,10 @@ install-%: build-% %/Makefile
422415
uninstall-%: %/Makefile
423416
cd $* && $(MAKE) uninstall
424417

425-
install: install-nmap $(INSTALLNSE) $(INSTALLZENMAP) @NCAT_INSTALL@ @NMAP_UPDATE_INSTALL@ $(INSTALLNDIFF) $(INSTALLNPING)
418+
install: install-nmap $(INSTALLNSE) $(INSTALLZENMAP) @NCAT_INSTALL@ $(INSTALLNDIFF) $(INSTALLNPING)
426419
@echo "NMAP SUCCESSFULLY INSTALLED"
427420

428-
uninstall: uninstall-nmap $(UNINSTALLZENMAP) @NCAT_UNINSTALL@ @NMAP_UPDATE_UNINSTALL@ $(UNINSTALLNDIFF) $(UNINSTALLNPING)
421+
uninstall: uninstall-nmap $(UNINSTALLZENMAP) @NCAT_UNINSTALL@ $(UNINSTALLNDIFF) $(UNINSTALLNPING)
429422

430423
uninstall-nmap:
431424
rm -f $(DESTDIR)$(bindir)/$(TARGET)

acinclude.m4

-203
Original file line numberDiff line numberDiff line change
@@ -106,209 +106,6 @@ AC_DEFUN([CHECK_IPV6_IPPROTO_RAW],
106106
esac
107107
])
108108

109-
dnl -------------------------------------------------------- -*- autoconf -*-
110-
dnl Licensed to the Apache Software Foundation (ASF) under one or more
111-
dnl contributor license agreements. See the NOTICE file distributed with
112-
dnl this work for additional information regarding copyright ownership.
113-
dnl The ASF licenses this file to You under the Apache License, Version 2.0
114-
dnl (the "License"); you may not use this file except in compliance with
115-
dnl the License. You may obtain a copy of the License at
116-
dnl
117-
dnl http://www.apache.org/licenses/LICENSE-2.0
118-
dnl
119-
dnl Unless required by applicable law or agreed to in writing, software
120-
dnl distributed under the License is distributed on an "AS IS" BASIS,
121-
dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
122-
dnl See the License for the specific language governing permissions and
123-
dnl limitations under the License.
124-
125-
dnl
126-
dnl find_apr.m4 : locate the APR include files and libraries
127-
dnl
128-
dnl This macro file can be used by applications to find and use the APR
129-
dnl library. It provides a standardized mechanism for using APR. It supports
130-
dnl embedding APR into the application source, or locating an installed
131-
dnl copy of APR.
132-
dnl
133-
dnl APR_FIND_APR(srcdir, builddir, implicit-install-check, acceptable-majors,
134-
dnl detailed-check)
135-
dnl
136-
dnl where srcdir is the location of the bundled APR source directory, or
137-
dnl empty if source is not bundled.
138-
dnl
139-
dnl where builddir is the location where the bundled APR will will be built,
140-
dnl or empty if the build will occur in the srcdir.
141-
dnl
142-
dnl where implicit-install-check set to 1 indicates if there is no
143-
dnl --with-apr option specified, we will look for installed copies.
144-
dnl
145-
dnl where acceptable-majors is a space separated list of acceptable major
146-
dnl version numbers. Often only a single major version will be acceptable.
147-
dnl If multiple versions are specified, and --with-apr=PREFIX or the
148-
dnl implicit installed search are used, then the first (leftmost) version
149-
dnl in the list that is found will be used. Currently defaults to [0 1].
150-
dnl
151-
dnl where detailed-check is an M4 macro which sets the apr_acceptable to
152-
dnl either "yes" or "no". The macro will be invoked for each installed
153-
dnl copy of APR found, with the apr_config variable set appropriately.
154-
dnl Only installed copies of APR which are considered acceptable by
155-
dnl this macro will be considered found. If no installed copies are
156-
dnl considered acceptable by this macro, apr_found will be set to either
157-
dnl either "no" or "reconfig".
158-
dnl
159-
dnl Sets the following variables on exit:
160-
dnl
161-
dnl apr_found : "yes", "no", "reconfig"
162-
dnl
163-
dnl apr_config : If the apr-config tool exists, this refers to it. If
164-
dnl apr_found is "reconfig", then the bundled directory
165-
dnl should be reconfigured *before* using apr_config.
166-
dnl
167-
dnl Note: this macro file assumes that apr-config has been installed; it
168-
dnl is normally considered a required part of an APR installation.
169-
dnl
170-
dnl If a bundled source directory is available and needs to be (re)configured,
171-
dnl then apr_found is set to "reconfig". The caller should reconfigure the
172-
dnl (passed-in) source directory, placing the result in the build directory,
173-
dnl as appropriate.
174-
dnl
175-
dnl If apr_found is "yes" or "reconfig", then the caller should use the
176-
dnl value of apr_config to fetch any necessary build/link information.
177-
dnl
178-
179-
AC_DEFUN([APR_FIND_APR], [
180-
apr_found="no"
181-
182-
if test "$target_os" = "os2-emx"; then
183-
# Scripts don't pass test -x on OS/2
184-
TEST_X="test -f"
185-
else
186-
TEST_X="test -x"
187-
fi
188-
189-
ifelse([$4], [], [
190-
ifdef(AC_WARNING,AC_WARNING([$0: missing argument 4 (acceptable-majors): Defaulting to APR 0.x then APR 1.x]))
191-
acceptable_majors="0 1"],
192-
[acceptable_majors="$4"])
193-
194-
apr_temp_acceptable_apr_config=""
195-
for apr_temp_major in $acceptable_majors
196-
do
197-
case $apr_temp_major in
198-
0)
199-
apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-config"
200-
;;
201-
*)
202-
apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-$apr_temp_major-config"
203-
;;
204-
esac
205-
done
206-
207-
AC_MSG_CHECKING(for APR)
208-
AC_ARG_WITH(apr,
209-
[ --with-apr=PATH prefix for installed APR or the full path to
210-
apr-config],
211-
[
212-
if test "$withval" = "no" || test "$withval" = "yes"; then
213-
AC_MSG_ERROR([--with-apr requires a directory or file to be provided])
214-
fi
215-
216-
for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
217-
do
218-
for lookdir in "$withval/bin" "$withval"
219-
do
220-
if $TEST_X "$lookdir/$apr_temp_apr_config_file"; then
221-
apr_config="$lookdir/$apr_temp_apr_config_file"
222-
ifelse([$5], [], [], [
223-
apr_acceptable="yes"
224-
$5
225-
if test "$apr_acceptable" != "yes"; then
226-
AC_MSG_WARN([Found APR in $apr_config, but we think it is considered unacceptable])
227-
continue
228-
fi])
229-
apr_found="yes"
230-
break 2
231-
fi
232-
done
233-
done
234-
235-
if test "$apr_found" != "yes" && $TEST_X "$withval" && $withval --help > /dev/null 2>&1 ; then
236-
apr_config="$withval"
237-
ifelse([$5], [], [apr_found="yes"], [
238-
apr_acceptable="yes"
239-
$5
240-
if test "$apr_acceptable" = "yes"; then
241-
apr_found="yes"
242-
fi])
243-
fi
244-
245-
dnl if --with-apr is used, it is a fatal error for its argument
246-
dnl to be invalid
247-
if test "$apr_found" != "yes"; then
248-
AC_MSG_ERROR([the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file.])
249-
fi
250-
],[
251-
dnl If we allow installed copies, check those before using bundled copy.
252-
if test -n "$3" && test "$3" = "1"; then
253-
for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
254-
do
255-
if $apr_temp_apr_config_file --help > /dev/null 2>&1 ; then
256-
apr_config="$apr_temp_apr_config_file"
257-
ifelse([$5], [], [], [
258-
apr_acceptable="yes"
259-
$5
260-
if test "$apr_acceptable" != "yes"; then
261-
AC_MSG_WARN([skipped APR at $apr_config, version not acceptable])
262-
continue
263-
fi])
264-
apr_found="yes"
265-
break
266-
else
267-
dnl look in some standard places
268-
for lookdir in /usr /usr/local /usr/local/apr /opt/apr; do
269-
if $TEST_X "$lookdir/bin/$apr_temp_apr_config_file"; then
270-
apr_config="$lookdir/bin/$apr_temp_apr_config_file"
271-
ifelse([$5], [], [], [
272-
apr_acceptable="yes"
273-
$5
274-
if test "$apr_acceptable" != "yes"; then
275-
AC_MSG_WARN([skipped APR at $apr_config, version not acceptable])
276-
continue
277-
fi])
278-
apr_found="yes"
279-
break 2
280-
fi
281-
done
282-
fi
283-
done
284-
fi
285-
dnl if we have not found anything yet and have bundled source, use that
286-
if test "$apr_found" = "no" && test -d "$1"; then
287-
apr_temp_abs_srcdir="`cd \"$1\" && pwd`"
288-
apr_found="reconfig"
289-
apr_bundled_major="`sed -n '/#define.*APR_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' \"$1/include/apr_version.h\"`"
290-
case $apr_bundled_major in
291-
"")
292-
AC_MSG_ERROR([failed to find major version of bundled APR])
293-
;;
294-
0)
295-
apr_temp_apr_config_file="apr-config"
296-
;;
297-
*)
298-
apr_temp_apr_config_file="apr-$apr_bundled_major-config"
299-
;;
300-
esac
301-
if test -n "$2"; then
302-
apr_config="$2/$apr_temp_apr_config_file"
303-
else
304-
apr_config="$1/$apr_temp_apr_config_file"
305-
fi
306-
fi
307-
])
308-
309-
AC_MSG_RESULT($apr_found)
310-
])
311-
312109
AC_DEFUN([LARGE_FILES_IF_NOT_BROKEN],
313110
[
314111
AC_LANG_PUSH(C++)

0 commit comments

Comments
 (0)