Skip to content

Commit

Permalink
Merge pull request #2079 from flatcar/krnowak/drop-nmap
Browse files Browse the repository at this point in the history
Replace nmap netcat with openbsd netcat
  • Loading branch information
krnowak authored Aug 9, 2024
2 parents f916da2 + 559464c commit db9fa0f
Show file tree
Hide file tree
Showing 36 changed files with 653 additions and 1,211 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/portage-stable-packages-list
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ dev-go/go-md2man

dev-lang/duktape
dev-lang/go-bootstrap
dev-lang/lua
dev-lang/nasm
dev-lang/perl
dev-lang/python
Expand Down Expand Up @@ -474,8 +473,8 @@ licenses

media-libs/libpng

net-analyzer/openbsd-netcat
net-analyzer/netperf
net-analyzer/nmap
net-analyzer/traceroute

net-dns/bind-tools
Expand Down
1 change: 1 addition & 0 deletions changelog/changes/2024-07-01-replace-nmap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Replace nmap netcat with openbsd variant. The license didn't get an exception from CNCF. Something about the definition of "derivative works" being too broad.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ EGIT_REPO_URI="https://github.com/flatcar/init.git"
if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
else
EGIT_COMMIT="ed0ce5ab08d77ff8fa775975961987ae2704fb34" # flatcar-master
EGIT_COMMIT="52eebc03e02f399d91dad5a2a4fece70608a94df" # flatcar-master
KEYWORDS="amd64 arm arm64 x86"
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ RDEPEND="${RDEPEND}
dev-util/bpftool
dev-util/bsdiff
dev-vcs/git
net-analyzer/nmap
net-analyzer/openbsd-netcat
net-analyzer/tcpdump
net-analyzer/traceroute
net-dns/bind-tools
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cros_post_src_install_ncat_symlink() {
ln -sfn nc "${D}/usr/bin/ncat"
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ USE_EXPAND="${USE_EXPAND} GO_VERSION"
# Extra use flags for CoreOS SDK
USE="${USE} cros_host expat -cracklib -introspection -cups -tcpd -berkdb"

# Only net-analyzer/nmap uses lua and it's compatible only with lua5-4.
LUA_SINGLE_TARGET="lua5-4"
LUA_TARGETS="lua5-4"

# Use Python 3 as the default version
USE="${USE} -python_single_target_python2_7 python_single_target_python3_11"
USE="${USE} -python_targets_python2_7 python_targets_python3_11"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ sys-libs/gdbm berkdb

dev-vcs/git -perl -iconv

# symlink: to add a link between ncat and nc
net-analyzer/nmap ncat symlink

# removes mta dependencies
app-admin/sudo -sendmail

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ INSTALL_MASK="${INSTALL_MASK}
/usr/src
"

# Exclude nmap from OEM ACI, we just want ncat/nping in there.
# Also remove ncat's second ca-bundle.crt, just use the system's.
INSTALL_MASK="${INSTALL_MASK}
/usr/bin/nmap
/usr/share/ncat
/usr/share/nmap
"

# Remove files which depend on interpreters not present in boards.
INSTALL_MASK="${INSTALL_MASK}
/usr/share/git/contrib/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,3 @@ app-eselect/eselect-iptables-20200508

# pulled in by app-admin/sudo
app-misc/editor-wrapper-4

# pulled in by dev-lang/lua
app-eselect/eselect-lua-4
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ INSTALL_MASK="${INSTALL_MASK}
/usr/src
"

# Exclude nmap from prod image, we just want ncat/nping in there
# Also remove ncat's second ca-bundle.crt, just use the system's
INSTALL_MASK="${INSTALL_MASK}
/usr/bin/nmap
/usr/share/ncat
/usr/share/nmap
"

# Remove files which depend on interpreters not present in boards.
INSTALL_MASK="${INSTALL_MASK}
/usr/lib*/systemd/system/xfs_scrub_all*
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit db9fa0f

Please sign in to comment.