packages icon indicating copy to clipboard operation
packages copied to clipboard

netsniff-ng: build and package mausezahn and it's dependency libcli

Open xdarklight opened this issue 3 years ago • 11 comments

Maintainer: @utoni (netsniff-ng) and myself (libcli) Compile tested: Lantiq xRX200 BT Home Hub 5A Run tested: Lantiq xRX200 BT Home Hub 5A

Preconditions:

  • [x] this includes #18880 which needs to be merged first

Description: mausezahn is a multicast traffic generator and heavily used by kernel selftests (tools/testing/selftests/net/forwarding/). packaging mausezahn is a pre-condition for an upcoming package with these kernel selftests

netsniff-ng's configure script is smart enough to auto-detect which dependencies are available and based on that which tools to build. building mausezahn without netsniff-ng and vice versa is possible, meaning we don't need to pull in libcli for netsniff-ng builds or pull in zlib for mausezahn buillds

xdarklight avatar Jul 07 '22 20:07 xdarklight

rebased on top of master now that #18880 is merged

@utoni it would be great if you could give your feedback on this one. Even a "fine for me" helps!

xdarklight avatar Jul 25 '22 19:07 xdarklight

rebased on top of master now that #18880 is merged

@utoni it would be great if you could give your feedback on this one. Even a "fine for me" helps!

You patch LGTM. I will try it on OpenWrt ASAP.

utoni avatar Jul 26 '22 06:07 utoni

@xdarklight Mausezahn does not get build, so install fails.

utoni avatar Jul 31 '22 14:07 utoni

thanks for testing @utoni - could you please share the error log with me?

xdarklight avatar Jul 31 '22 20:07 xdarklight

@xdarklight

install: cannot stat '/home/toni/git/openwrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/netsniff-ng-0.6.7/mausezahn/mausezahn': No such file or directory
make[3]: *** [Makefile:95: /home/toni/git/openwrt/bin/packages/arm_cortex-a9_vfpv3-d16/packages/mausezahn_0.6.7-2_arm_cortex-a9_vfpv3-d16.ipk] Error 1
make[3]: Leaving directory '/home/toni/git/openwrt-feed-packages/net/netsniff-ng'
time: package/feeds/packages/netsniff-ng/compile#0.14#0.07#0.19
    ERROR: package/feeds/packages/netsniff-ng failed to build.

I guess you need to tell the netsniff-ng Makefile that Mausezahn should also be build.

utoni avatar Aug 01 '22 07:08 utoni

@utoni thanks - I think I know what's going on:

  • you have previously built the netsniff-ng package
  • OpenWrt has some cache so it doesn't re-compile packages which don't need to be recompiled
  • now that I added the mausezahn package OpenWrt doesn't know if/when to invalidate the cache

I just pushed an update, would be great if you could try this:

  • added PKG_CONFIG_DEPENDS so Build/Configure is called whenever a selected package changes - based on this (and the dependencies needed to enable netsniff-ng or mausezahn) the netsniff-ng configure script will automatically enable netsniff-ng, mausezahn, etc.. (whichever tools are available)
  • I updated the PKG_RELEASE as I think that was missing before
  • rebased on top of latest master (should be irrelevant, but makes testing easier)

xdarklight avatar Aug 01 '22 10:08 xdarklight

I am getting some linker errors while running: make -C ../openwrt package/netsniff-ng/{clean,compile} -j1 V=s VERBOSE=1 See build log attachment. nzuu.txt or here

utoni avatar Aug 01 '22 14:08 utoni

something's odd in that output because the paths are referencing openwrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/netsniff-ng-0.6.7 However, with #18880 - which is already merged into master - the package has been updated to version 0.6.8

The updated version is key here because it fixes netsniff-ng/netsniff-ng#216 (the errors from that issue can also be found in your build log).

I'm not an OpenWrt build system expert, so I'd start with the most straight forward check: can you please verify if the net/netsniff-ng/Makefile lists version 0.6.7 or 0.6.8?

xdarklight avatar Aug 01 '22 15:08 xdarklight

@xdarklight Forgot to rebase to the master branch, sorry. Everything works now.

utoni avatar Aug 01 '22 16:08 utoni

no worries - thank you so much for testing @utoni !

xdarklight avatar Aug 01 '22 16:08 xdarklight

I pressed the wrong button, I didn't mean to close this. Is anything missing to get this merged?

xdarklight avatar Aug 13 '22 06:08 xdarklight