Skip to content

Conversation

@TwoLeaves
Copy link

@TwoLeaves TwoLeaves commented Sep 17, 2025

Benchmarking tool for many different types of networking


# apply 001-fix-inlining.patch from ArchLinux package
curl -L 'https://gitlab.archlinux.org/archlinux/packaging/packages/netperf/-/raw/main/001-fix-inlining.patch' -o 001-fix-inlining.patch
patch -Np1 -i 001-fix-inlining.patch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please download this patch onto your computer and copy and paste it into the packages/netperf folder, then delete these two lines and paste the URL into your commit message instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's gonna break as soon as the package version in our repo and the Arch repo do not match.

As already mentioned above, Arch Linux's 001-fix-inlining.patch should be placed in the package directory for this package.
If you want to keep it numbered please be aware we use 4 digits for numbered patches in this repo so that should be 0001-fix-inlining.patch.


# replace config.sub and config.guess with newer versions
curl -L 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -o config.sub
curl -L 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -o config.guess
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does autoreconf -ifv work as a shorter way to write these two lines?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if it doesn't, it's plain incorrect.
This gets the config.sub and config.guess from the HEAD commit of the master branch of a completely different repo.
There's no expectation that wouldn't break.

Copy link
Member

@TomJo2000 TomJo2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm looking through open PRs right now.
I don't know if this package meets the criteria for packaging in the main repository.

  • The last release was 10 years ago.
  • There have been a total of 49 commits since, I'm not sure if we can call that "actively developed".
  • This package seems to largely duplicate the functionality of the already packaged iperf3.

Does netperf have anything else differentiating it except having been around long enough that it's in a bunch of repos already?
https://repology.org/project/netperf/information


# replace config.sub and config.guess with newer versions
curl -L 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -o config.sub
curl -L 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -o config.guess
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if it doesn't, it's plain incorrect.
This gets the config.sub and config.guess from the HEAD commit of the master branch of a completely different repo.
There's no expectation that wouldn't break.


# apply 001-fix-inlining.patch from ArchLinux package
curl -L 'https://gitlab.archlinux.org/archlinux/packaging/packages/netperf/-/raw/main/001-fix-inlining.patch' -o 001-fix-inlining.patch
patch -Np1 -i 001-fix-inlining.patch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's gonna break as soon as the package version in our repo and the Arch repo do not match.

As already mentioned above, Arch Linux's 001-fix-inlining.patch should be placed in the package directory for this package.
If you want to keep it numbered please be aware we use 4 digits for numbered patches in this repo so that should be 0001-fix-inlining.patch.

--- a/src/netlib.c
+++ b/src/netlib.c
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hunk should probably be moved to just above #ifdef HAVE_CONFIG_H instead.

A copyright banner was added at the top of this file over 5 years ago and this would likely cause the patch to stop applying in a future release.
https://github.com/HewlettPackard/netperf/blame/master/src/netlib.c#L1-L22

@@ -0,0 +1,21 @@
TERMUX_PKG_HOMEPAGE=https://hewlettpackard.github.io/netperf/
TERMUX_PKG_DESCRIPTION="Benchmarking tool for many different types of networking"
TERMUX_PKG_LICENSE="MIT"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Release 2.7.0 is not licensed under the MIT License1.

The old license is a slightly modified BSD 4-Clause license2, which is so old and uncommon that we don't even have a specific License specifier for it in the build script linter3.

Suggested change
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_LICENSE="BSD" # Modified BSD 4-Clause License

Footnotes

  1. https://github.com/HewlettPackard/netperf/blob/netperf-2.7.0/COPYING

  2. https://choosealicense.com/licenses/bsd-4-clause/

  3. https://github.com/termux/termux-packages/blob/3df94276a0de5b2b81c67c631c479e27841d338e/scripts/lint-packages.sh#L19-L40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants