Need help, advice for qemu host package as dependency for samba4.7

Hi, i need qemu on the host for my new samba4 package, so whats the way to add it as dependency only for the host, since qemu is not a default openwrt/lede requirement as far as i can tell?

It seems the qemu package in the package-feed is for target only? Do i have to create a new separate qemu/host package or do i add it to the existing package, is it maybe feasible to add it as "known" build dependency for openwrt in general?


QEMU is a Virtual Machine guest hypervisor...Samba4 is a network file server...

  • What are you trying to accomplish?
  • What is the device in question: a router, PC or VM (Virtual Machine)?
  • Provide a link to the manual or instructions that state qemu is a dependency for samba4

Finally not needing to provide my own custom openwrt/lede feeds via forum.

Router, but Samba4 will fit on any 16MB+ nvram device that openwrt supports. (I'm not planing to apply and maintain minimal size patched versions, sorry 8MB devices.)

see end.

I know all this, i already maintain and provide one of the unofficial packages of samba4 for lede here in the forum: here.

It seems is going nowhere and so as promised i try to setup my own pull request, but with as less patching as possible and still be compatible to all/most openwrt supported devices. So for this samba4 can only be cross compiled by either manually maintaining a cross-answer file per architecture or by using qemu to provide the needed configure answers. I can only test on my WRT1200AC, so maintaining and providing all other cross-answer files is no option for me. So the option via qemu takes care of ensuring samba4 is properly configured/cross-compiled exactly for the target system and its installed libs/environment. This in my opinion is the most reasonable way to get samba4 into openwrt/lede.

PS: The samba4 cross compile options are given here. I'm ideally also looking for a way to ensure samba36 is unchecked/deselected if samba4 is selected, but it seems there is no "deselect" option for this, so any tips?

Requiring qemu host builds to run what essentially is a configure script seems wasteful and cumbersome. I know that upstream has chosen this approach and some other projects (e.g. Perl) require such a procedure as well.

I would however not push the burden on emulating the hardware to compiling users. Personally I would build a small script which runs qemu once for each architecture to prepare the answer file and then commit those answer files along with the generator script.

Future maintainers of the package can then use the script to refresh the answer files if needed.

I understand all this, but updating, maintaining and testing the cross-answer files is out of my comfort zone. I also know that samba4 already updated there cross-answer files several times in the past and i'm not looking forward to maintaining those every time they decide to add/change something in waf.

It also seems package-feed has a working version of qemu designed as target install, so i assume it should be possible to get a simple host install package working as well.

If anyone wants to create/maintain a samba4 package for openwrt than by all means go ahead, the only reason i even waste time on this again, is that the current pull request is in limbo for 2+ months and i have given up hope that it will be ever merged. I'm also not a fan of the heavy patching this request requires and in my opinion the unnecessary strip-down of VFS/utils.

Oki i managed to create a qemu host only package that builds fine and can be successfully used by my samba package as dependency. Yet i realized that the "package" feed is designed to always provide a target package as well. So is there a guideline how to create such a helper host only package in the package feed format or do i have to create a separate request to get my qemu package into the tools folder, similar to the existing one that is host only and has no package definitions?

I could try to create a separate qemu 2.11 package that also includes a working target and host define, but there is already a qemu 2.6 package, but this seem to include a full qemu system, which is not needed for my version and samba and it has no host compile define.

So any advice on how i should proceed?