Bug 13781

Summary: isc dhcp-server package don't create file /usr/bin/dhcpd
Product: buildroot Reporter: Kay Jeschonneck <kay.jeschonneck>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: buildroot
Priority: P5    
Version: 2021.02   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:
Attachments: buildroot config-file

Description Kay Jeschonneck 2021-04-30 07:46:33 UTC
Overview: 

After activate the isc dhcp-server package, configure the dhcpd.conf, build the system and flash it on the target i expect the dhcp-server start, but i doesn't start. After some investigate i found that the /etc/init.d/S80dhcp-server file check with this command "test -f /usr/sbin/dhcpd" if the file dhcpd exist but it doesn't exist.

Steps to Reproduce:
  1. create enviroment (https://github.com/kontron/buildroot-external-smarc-sal28)
  2. select "Target Packages/show packages that are also provided by busybox"
  3. select "Target Packages/Networking applications/dhcp (isc)" and "Target Packages/Networking applications/dhcp (isc)/dhcp-server"
  4. build system

Actual Results:
  file "build/target/usr/sbin/dhcpd2", "./usr/sbin/dhcpd2" in "build/images/rootfs.tar" not exist

Expected Results:
  file "build/target/usr/sbin/dhcpd2", "./usr/sbin/dhcpd2" in "build/images/rootfs.tar" exist


Build Date & Hardware
  Build 30.04.2021 on Ubuntu 18.04.5 LTS
  Intel NUC, Intel Core i7-10710U

Additional Builds and Platforms:
  Kontron SMARC-sAL28 module
Comment 1 Kay Jeschonneck 2021-04-30 07:55:20 UTC
Created attachment 8916 [details]
buildroot config-file

add buildroot-config file
Comment 2 Arnout Vandecappelle 2021-04-30 20:12:15 UTC
I just built the defconfig in attachment, and /usr/sbin/dhcpd is in fact installed.

Perhaps your post-build script removes it? Or one of your custom packages?


> Actual Results:
>  file "build/target/usr/sbin/dhcpd2", "./usr/sbin/dhcpd2" in "build/images/rootfs.tar" not exist

The file is dhcpd, not dhcpd2.
Comment 3 Kay Jeschonneck 2021-05-05 11:53:28 UTC
(In reply to Arnout Vandecappelle from comment #2)

> The file is dhcpd, not dhcpd2.
its right, prescribed


To test if i have some issue with the os-enviroment i had reinstall Ubuntu 18.04.5 LTS, followed the kontron github manual, activated the ccache and only activated the isc dhcp service packages. 
Now i can't find the dhcpd-file in "build/target/usr/sbin/" or in the rootfs.tar. 
In "build/build/dhcp-4.4.2/server" i found the file dhcpd, so the system generate it. If i copy this file manuel in the folder "build/target/usr/sbin/" and restart the make process, everything is fine and the dhcp-server start.


> Perhaps your post-build script removes it? Or one of your custom packages?

In the kontron buildlayer i can't find something what delete the dhcpd file, 
i searched per 'grep -rnw "./" -e "pattern"', pettern is dhcpd or sbin.

For this test i don't use any custom packages.


Have you some other Ideas?
Comment 4 Arnout Vandecappelle 2021-05-05 19:23:40 UTC
> Now i can't find the dhcpd-file in "build/target/usr/sbin/" or in the rootfs.tar. 
> In "build/build/dhcp-4.4.2/server" i found the file dhcpd

You did enable BR2_PACKAGE_DHCP_SERVER, right?

Which buildroot version are you using? There was a problem with installation between Sat Apr 20 16:30:31 2019 and Thu Aug 1 18:26:09 2019 - if you happen to use 2019.05 or 2019.05.1, you would have this problem.

I can't reproduce the issue here with your config file.
Comment 5 Heiko Thiery 2021-05-06 08:22:31 UTC
Hi, just tried to reproduce your issue. Setup the environment with using the latest buildroot from master. With that I see the expected files in the target directory.

# find build/target/ -name "*dhcp*" 
build/target/sbin/udhcpc
build/target/etc/init.d/S80dhcp-server
build/target/etc/init.d/S80dhcp-relay
build/target/etc/dhcp
build/target/etc/dhcp/dhcpd.conf
build/target/usr/sbin/dhcpd
build/target/usr/share/udhcpc
build/target/usr/lib/libdhcp.so
build/target/usr/lib/libdhcpctl.so
build/target/usr/lib/libdhcp.so.0.0.0
build/target/usr/lib/libdhcp.so.0
build/target/usr/lib/libdhcpctl.so.0
build/target/usr/lib/libdhcpctl.la
build/target/usr/lib/libdhcp.la
build/target/usr/lib/libdhcpctl.so.0.0.0
build/target/var/lib/dhcp


As Arnout also asked, which buildroot version are you using?
Comment 6 Kay Jeschonneck 2021-05-06 12:59:41 UTC
> You did enable BR2_PACKAGE_DHCP_SERVER, right?

Yes

> As Arnout also asked, which buildroot version are you using?
version 2021.02


> Hi, just tried to reproduce your issue. Setup the environment with using the latest buildroot from master. With that I see the expected files in the target directory.

I don't see the same file. 
I use the version 2021.02, the kontron external layer and the kontron_smarc_sal28_defconfig plus i enabled BR2_PACKAGE_DHCP and BR2_PACKAGE_DHCP_SERVER.

This is my result:

#find build/target/ -name "*dhcp*"
build/target/var/lib/dhcp
build/target/usr/lib/libdhcpctl.so
build/target/usr/lib/libdhcp.so.0
build/target/usr/lib/libdhcpctl.so.0.0.0
build/target/usr/lib/libdhcpctl.so.0
build/target/usr/lib/libdhcp.so.0.0.0
build/target/usr/lib/libdhcp.so
build/target/usr/share/udhcpc
build/target/etc/dhcpcd.conf
build/target/etc/dhcp
build/target/etc/dhcp/dhcpd.conf
build/target/etc/init.d/S80dhcp-relay
build/target/etc/init.d/S80dhcp-server
build/target/sbin/udhcpc
Comment 7 Heiko Thiery 2021-05-06 14:56:23 UTC
How do you enable these additional configuration options? Do you use make menuconfig?
Comment 8 Heiko Thiery 2021-05-06 16:03:26 UTC
could you please share the content of the following file;

# cat build/dhcp-4.4.2/.files-list.txt 

dhcp,./usr/lib/libdhcp.so.0.0.0
dhcp,./usr/lib/libdhcp.so.0
dhcp,./usr/lib/libdhcp.so
dhcp,./usr/lib/libdhcp.la
dhcp,./usr/lib/libomapi.so.0.0.0
dhcp,./usr/lib/libomapi.so.0
dhcp,./usr/lib/libomapi.so
dhcp,./usr/lib/libomapi.la
dhcp,./usr/lib/libdhcpctl.so.0.0.0
dhcp,./usr/lib/libdhcpctl.so.0
dhcp,./usr/lib/libdhcpctl.so
dhcp,./usr/lib/libdhcpctl.la
dhcp,./usr/bin/omshell
dhcp,./var/lib/dhcp
dhcp,./usr/sbin/dhcpd
dhcp,./etc/dhcp/dhcpd.conf
dhcp,./etc/init.d/S80dhcp-server
dhcp,./etc/init.d/S80dhcp-relay

this is what the package should install into the target.


you could also try to rebuild the dhcp package and check/share the output:
# make dhcp-dirclean dhcp

maybe the autoreconfigure does something strange on your side.
Comment 9 Kay Jeschonneck 2021-05-07 08:37:18 UTC
I have found the problem.
In the logs of the command "make dhcp-dirclean dhcp" i get the info the package gawk is missed. After i install this package, everything is fine.

Thanks for your help.

I close this bug report.
Comment 10 Heiko Thiery 2021-05-07 09:59:02 UTC
This is a bug in buildroot since there is a missing dependency to host-gawk.