1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Reintegrate Nmap 7.90 release branch

This commit is contained in:
dmiller
2020-10-05 23:00:30 +00:00
parent 5c0bf18595
commit ef8213a36c
395 changed files with 13529 additions and 35562 deletions

View File

@@ -2,7 +2,6 @@
---
* [Jhbuild](#jhbuild)
* Observation
* Possible error
* [gtk-mac-bundler](#bundler)
* [How to use](#howto)
@@ -15,11 +14,11 @@ In order to set up Jhbuild properly before building Nmap suite, follow the tutor
If you had any error, just type the following command to delete jhbuild,
$ rm -rf ~/bin/jhbuild ~/.local/bin/jhbuild ~/.local/share/jhbuild ~/.cache/jhbuild ~/.config/jhbuildrc ~/.jhbuildrc ~/.jhbuildrc-custom ~/jhbuild
$ rm -rf ~/.local ~/.new_local ~/.cache ~/.config ~/Source/jhbuild ~/Source/pyenv ~/Library/Caches/pip* ~/gtk
And we'll start over together:
1. First, simply download the following script in your _$HOME_ directory and launch it ([https://git.gnome.org/browse/gtk-osx/plain/gtk-osx-build-setup.sh](https://git.gnome.org/browse/gtk-osx/plain/gtk-osx-build-setup.sh)):
1. First, simply download the following script in your _$HOME_ directory ([https://git.gnome.org/browse/gtk-osx/plain/gtk-osx-build-setup.sh](https://git.gnome.org/browse/gtk-osx/plain/gtk-osx-build-setup.sh)). Edit it to make sure that `MACOSX_DEPLOYMENT_TARGET` exists and is set to the lowest supported version of OS X, e.g. "10.11". Then run it:
~~~~
$ sh gtk-osx-build-setup.sh
@@ -31,55 +30,63 @@ And we'll start over together:
$ export PATH=$HOME/.local/bin:$PATH
~~~~
2. In `~/.jhbuildrc-custom`, make sure that this line is setup properly:
2. In `~/.jhbuildrc-custom`, make sure that this line is setup properly and matches `MACOSX_DEPLOYMENT_TARGET` from step 1:
~~~~
setup_sdk(target=_target, sdk_version="native", architectures=["i386"])
setup_sdk(target="10.11")
~~~~
for an i386 architecture.
3. Now do,
~~~~
$ jhbuild bootstrap
$ jhbuild bootstrap-gtk-osx
~~~~
To install missing dependencies (with **--force** option to force rebuilding).<br/>Go to **Observation** if errors appear...
To install missing dependencies (with **--force** option to force rebuilding).<br/>
4. And,
~~~~
$ jhbuild build meta-gtk-osx-bootstrap
$ jhbuild build meta-gtk-osx-core
5. Now we need Python2 and the GTK2 bindings for it, but gtk-osx has built
Python3, and the bindings will prefer that even though the dev headers aren't
present. Specifically, we need pycairo prior to 1.19 (when they dropped Python2
support) and gtk-integration-python. There's got to be a better way, but what I
did was first install python2:
$ jhbuild build python
Then install pycairo. This is necessary because if it's missing for Python 2,
the other bindings won't build for Python 2 either. Make sure version is less
than 1.19 in ~/.cache/jhbuild/gtk-osx-python.modules. This may "succeed" but it
will have built the Python3 bindings. Clear out the build tree and make sure
the source will prefer python2:
$ jhbuild build pycairo
$ rm -rf ~/.cache/jhbuild/build/pycairo-*
$ sed -i 's/python3/python2/' ~/gtk/source/pycairo-*/meson_options.txt
$ jhbuild build pycairo
Now build the rest of the python bindings. Some of these will fail (and maybe
they failed as prereqs for pycairo earlier), so hang on and I'll tell you how
to fix those:
$ jhbuild build meta-gtk-osx-python
~~~~
Go to **Observation** if errors appear...
<br/>
### Observation
If anything goes wrong now, it'll probably be a bad link on your python binary, so check that you're using the **GTK one** instead of the original mac one:
~~~~
$ jhbuild shell
bash$ which python
~~~~
Ok, when you get a failure, that's your chance to reconfigure with python2.
Jhbuild will give you some options; choose "4. start a shell" and then check
for the proper configuration command (may be visible in scrollback, otherwise
check config.log) and copy it. Clear out the build directory (probably the
current directory, ~/.cache/jhbuild/build/package-name-version/*) then from
there run the configuration command with PYTHON variable overridden, e.g.:
If you can see _gtk_ in the path, everything is fine with Python, else do:
$ PYTHON=$(which python2) ~/gtk/source/package-name-version/configure --some-options
~~~~
$ jhbuild build --force python
~~~~
And make an alias, to use this version of Python with Jhbuild:
~~~~
$ alias jhbuild="PATH=gtk-prefix/bin:$PATH jhbuild"
~~~~
Now continue at **step 3** with the --force option at the end of each command, to reinstall everything from scratch with this new python binary.
Now exit that shell and go to the build step. This might mean "ignore error and
continue with build" or it might mean "rerun step build" depending on when the
error happened.
### Possible error

View File

@@ -35,11 +35,11 @@ PREFIX = /usr/local
# Extra distribution file names
README_FILE = README.md
COPYING_FILE = COPYING
LICENSE_FILE = LICENSE
3RD_P_LIC_FILE = 3rd-party-licenses.txt
LICENSES_FILE = licenses
EXTRA_DIST = README.md ../COPYING ../docs/3rd-party-licenses.txt ../docs/licenses
EXTRA_DIST = README.md ../LICENSE ../docs/3rd-party-licenses.txt ../docs/licenses
CONFIGURE_ARGS = --prefix="$(PREFIX)" --with-libdnet=included --with-libpcap=included --with-libpcre=included --with-liblua=included CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" PYTHON="$(PYTHON)"
@@ -83,8 +83,8 @@ export APPS_POS_X=110
export APPS_POS_Y=310
export README_POS_X=802
export README_POS_Y=180
export COPYING_POS_X=802
export COPYING_POS_Y=310
export LICENSE_POS_X=802
export LICENSE_POS_Y=310
export THIRD_P_POS_X=802
export THIRD_P_POS_Y=440
export LICENSES_POS_X=670
@@ -93,17 +93,17 @@ export LICENSES_POS_Y=60
$(IMAGE_NAME): tool-checks $(IMAGE_STAGING_DIR)/$(PKG_NAME)
rm -f $@
# Create the dmg disk image and convert it to read only disk
./createdmg.sh $(IMAGE_STAGING_DIR) $(README_FILE) $(COPYING_FILE) $(3RD_P_LIC_FILE) $(LICENSES_FILE)
./createdmg.sh $(IMAGE_STAGING_DIR) $(README_FILE) $(LICENSE_FILE) $(3RD_P_LIC_FILE) $(LICENSES_FILE)
# Check the created disk image for the sizes, backgrounds and icons presence and positions
./check_test.sh $(README_FILE) $(COPYING_FILE) $(3RD_P_LIC_FILE) $(LICENSES_FILE)
./check_test.sh $(README_FILE) $(LICENSE_FILE) $(3RD_P_LIC_FILE) $(LICENSES_FILE)
tool-checks: have-$(CC) have-jhbuild have-gtk-mac-bundler
have-%:
which $*
#$(IMAGE_STAGING_DIR)/$(PKG_NAME): check-nmap check-ncat check-ndiff check-zenmap check-nping COPYING.formatted
$(IMAGE_STAGING_DIR)/$(PKG_NAME): check-nmap check-ncat check-ndiff check-zenmap check-nping COPYING.formatted
#$(IMAGE_STAGING_DIR)/$(PKG_NAME): check-nmap check-ncat check-ndiff check-zenmap check-nping LICENSE.formatted
$(IMAGE_STAGING_DIR)/$(PKG_NAME): check-nmap check-ncat check-ndiff check-zenmap check-nping LICENSE.formatted
rm -rf $(IMAGE_STAGING_DIR)
mkdir -p $(IMAGE_STAGING_DIR)
cp -rf $(EXTRA_DIST) $(IMAGE_STAGING_DIR)/
@@ -186,9 +186,9 @@ stage-ndiff: export-$(NDIFF_BUILD_DIR)
cp $(NDIFF_BUILD_DIR)/ndiff/ndiff.py $(NDIFF_STAGING_DIR)/usr/local/bin/ndiff
cp $(NDIFF_BUILD_DIR)/ndiff/docs/ndiff.1 $(NDIFF_STAGING_DIR)/usr/local/share/man/man1/
COPYING.formatted:
LICENSE.formatted:
# Use the license formatter from the Windows installer.
../mswin32/license-format/licformat.sh ../COPYING > $@
../mswin32/license-format/licformat.sh ../LICENSE > $@
clean:
rm -rf $(IMAGE_STAGING_DIR)
@@ -202,7 +202,7 @@ clean:
rm -rf $(NDIFF_STAGING_DIR)
rm -rf $(NPING_BUILD_DIR)
rm -rf $(NPING_STAGING_DIR)
rm -f COPYING.formatted
rm -f LICENSE.formatted
rm -f $(IMAGE_NAME)
rm -rf distribution.xml finalDist.xml nmap.pkg ncat.pkg ndiff.pkg nping.pkg zenmap.pkg

View File

@@ -39,7 +39,7 @@ export README=`echo '
end tell
' | osascript | grep -o 'position:[0-9]*, [0-9]*' | awk -F':' '{ print $2 }'`
export COPYING=`echo '
export LICENSE=`echo '
tell application "Finder"
set f to POSIX file "'${disk}'/'$2'" as alias
get properties of f
@@ -74,10 +74,10 @@ else
RES="False"
fi;
if [ "$COPYING" = "$COPYING_POS_X, $COPYING_POS_Y" ]; then
echo "COPYING: OK"
if [ "$LICENSE" = "$LICENSE_POS_X, $LICENSE_POS_Y" ]; then
echo "LICENSE: OK"
else
echo "COPYING: Wrong"
echo "LICENSE: Wrong"
RES="False"
fi;

View File

@@ -60,7 +60,7 @@ echo '
set position of item "'${applicationName}'" of container window to {'${MPKG_POS_X}', '${MPKG_POS_Y}'}
set position of item "Applications" of container window to {'${APPS_POS_X}', '${APPS_POS_Y}'}
set position of item "'$2'" of container window to {'${README_POS_X}', '${README_POS_Y}'}
set position of item "'$3'" of container window to {'${COPYING_POS_X}', '${COPYING_POS_Y}'}
set position of item "'$3'" of container window to {'${LICENSE_POS_X}', '${LICENSE_POS_Y}'}
set position of item "'$4'" of container window to {'${THIRD_P_POS_X}', '${THIRD_P_POS_Y}'}
set position of item "'$5'" of container window to {'${LICENSES_POS_X}', '${LICENSES_POS_Y}'}

View File

@@ -40,7 +40,7 @@
<resources bg-scale="none" bg-align="topleft">
<locale lang="en">
<resource relative="true" type="welcome">README</resource>
<resource relative="true" type="license">COPYING.formatted</resource>
<resource relative="true" type="license">LICENSE.formatted</resource>
</locale>
</resources>
<flags />

View File

@@ -5,7 +5,7 @@
<!-- INCLUDE -->
<include href="https://git.gnome.org/browse/gtk-osx/plain/modulesets-stable/gtk-osx.modules"/>
<!-- <include href="https://git.gnome.org/browse/gtk-osx/plain/modulesets-stable/gtk-osx.modules"/> -->
<!-- REPOSITORIES -->
@@ -30,7 +30,7 @@
makeargs='OPENSSL_LIBS="${JHBUILD_LIBDIR}/libssl.a ${JHBUILD_LIBDIR}/libcrypto.a" LIBSSL="${JHBUILD_LIBDIR}/libssl.a ${JHBUILD_LIBDIR}/libcrypto.a" ZLIB_LIBS="${JHBUILD_LIBDIR}/libz.a" LIBZ="${JHBUILD_LIBDIR}/libz.a"'
makeinstallargs='install OPENSSL_LIBS="${JHBUILD_LIBDIR}/libssl.a ${JHBUILD_LIBDIR}/libcrypto.a" ZLIB_LIBS="${JHBUILD_LIBDIR}/libz.a"'
>
<branch repo="nmap-local" module="nmap-7.80.tar.gz" version="7.80"/>
<branch repo="nmap-local" module="nmap-7.90.tar.gz" version="7.90"/>
<dependencies>
<dep package="openssl" />
</dependencies>
@@ -42,7 +42,7 @@
makeargs='build-ncat OPENSSL_LIBS="${JHBUILD_LIBDIR}/libssl.a ${JHBUILD_LIBDIR}/libcrypto.a"'
makeinstallargs='install-ncat OPENSSL_LIBS="${JHBUILD_LIBDIR}/libssl.a ${JHBUILD_LIBDIR}/libcrypto.a"'
>
<branch repo="nmap-local" module="nmap-7.80.tar.gz" version="7.80"/>
<branch repo="nmap-local" module="nmap-7.90.tar.gz" version="7.90"/>
<dependencies>
<dep package="openssl" />
</dependencies>
@@ -54,7 +54,7 @@
makeargs='build-nping OPENSSL_LIBS="${JHBUILD_LIBDIR}/libssl.a ${JHBUILD_LIBDIR}/libcrypto.a"'
makeinstallargs='install-nping OPENSSL_LIBS="${JHBUILD_LIBDIR}/libssl.a ${JHBUILD_LIBDIR}/libcrypto.a"'
>
<branch repo="nmap-local" module="nmap-7.80.tar.gz" version="7.80"/>
<branch repo="nmap-local" module="nmap-7.90.tar.gz" version="7.90"/>
<dependencies>
<dep package="openssl" />
</dependencies>
@@ -66,7 +66,7 @@
makeargs='OPENSSL_LIBS="${JHBUILD_LIBDIR}/libssl.a ${JHBUILD_LIBDIR}/libcrypto.a" LIBSSL="${JHBUILD_LIBDIR}/libssl.a ${JHBUILD_LIBDIR}/libcrypto.a" ZLIB_LIBS="${JHBUILD_LIBDIR}/libz.a" LIBZ="${JHBUILD_LIBDIR}/libz.a"'
makeinstallargs='install OPENSSL_LIBS="${JHBUILD_LIBDIR}/libssl.a ${JHBUILD_LIBDIR}/libcrypto.a" ZLIB_LIBS="${JHBUILD_LIBDIR}/libz.a"'
>
<branch repo="nmap-local" module="nmap-7.80.tar.gz" version="7.80"/>
<branch repo="nmap-local" module="nmap-7.90.tar.gz" version="7.90"/>
<dependencies>
<dep package="openssl" />
</dependencies>
@@ -78,7 +78,7 @@
makeargs='build-ncat OPENSSL_LIBS="${JHBUILD_LIBDIR}/libssl.a ${JHBUILD_LIBDIR}/libcrypto.a"'
makeinstallargs='install-ncat OPENSSL_LIBS="${JHBUILD_LIBDIR}/libssl.a ${JHBUILD_LIBDIR}/libcrypto.a"'
>
<branch repo="nmap-local" module="nmap-7.80.tar.gz" version="7.80"/>
<branch repo="nmap-local" module="nmap-7.90.tar.gz" version="7.90"/>
<dependencies>
<dep package="openssl" />
</dependencies>