tftpd: make installation of tftp client optional
Nielsen
PATCH 1/1 tftpd: make installation of tftp client optional
--- package/tftpd/Config.in | 8 ++++++++ package/tftpd/tftpd.mk | 11 ++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-)
package/tftpd/Config.in +8 -0
@@ -6,3 +6,11 @@ config BR2_PACKAGE_TFTPD depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS help HPA's Trivial File Transfer Protocol (tftp) server. + +config BR2_PACKAGE_TFTPD_OVERRIDE_BUSYBOX_TFTP + bool "install tftp" + default y + depends on BR2_PACKAGE_TFTPD + depends on BR2_PACKAGE_BUSYBOX + help + This will also override tftp from Busybox
package/tftpd/tftpd.mk +8 -3
@@ -9,13 +9,18 @@ TFTPD_SOURCE = tftp-hpa-$(TFTPD_VERSION).tar.xz TFTPD_SITE = $(BR2_KERNEL_MIRROR)/software/network/tftp/tftp-hpa TFTPD_CONF_OPTS = --without-tcpwrappers -# Override BusyBox implementations if BusyBox is enabled. -ifeq ($(BR2_PACKAGE_BUSYBOX),y) + +ifeq ($(BR2_PACKAGE_TFTPD_OVERRIDE_BUSYBOX_TFTP),y) +# override BusyBox - install after busybox TFTPD_DEPENDENCIES += busybox +define TFTPD_INSTALL_TARGET_TFTP + $(INSTALL) -D $(@D)/tftp/tftp $(TARGET_DIR)/usr/bin/tftp +endef endif + define TFTPD_INSTALL_TARGET_CMDS - $(INSTALL) -D $(@D)/tftp/tftp $(TARGET_DIR)/usr/bin/tftp + $(TFTPD_INSTALL_TARGET_TFTP) $(INSTALL) -D $(@D)/tftpd/tftpd $(TARGET_DIR)/usr/sbin/tftpd endef
Signature · 1 line
1.8.3.4
PATCH 1/1 tftpd: make installation of tftp client optional
Hello,
Quoted 5 lines · David Marqvar
Signed-off-by David Marqvar <[email protected]>--- package/tftpd/Config.in | 8 ++++++++ package/tftpd/tftpd.mk | 11 ++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-)
Your commit log is empty, so I'm not sure what you're trying to do here. If I understand correctly, you want a sub-option to enable/disable the installation of the "tftp" binary, so that you can have a configuration where:
- tftpd is the one coming from the tftpd package
- tftp remains the one provided by Busybox
However, in Buildroot, we try to avoid having one sub-option per binary program. We do have that in a few packages, and it's often very painful and annoying to maintain. If you really, really don't like the tftp program from the tftpd package, you can also add in your post-build script:
rm /usr/bin/tftp
ln -s /bin/busybox /usr/bin/tftp
But I just checked and the tftp program installed by the tftp package is only 22 KB in size:
thomas at skate:~/projets/buildroot (master)$ ls -l output/target/usr/bin/tftp
-rwxr-xr-x 1 thomas thomas 22252 d?c. 5 22:24 output/target/usr/bin/tftp
So I really don't think it's worth the effort having yet another sub-option for 22 KB, especially when you can handle such tweaking in your post-build script if you really really want to.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
Nielsen
PATCH 1/1 tftpd: make installation of tftp client optional
Hi Thomas Petazzoni,
Quoted 6 lines
Your commit log is empty, so I'm not sure what you're trying to do here. If I understand correctly, you want a sub-option to enable/disable the installation of the "tftp" binary, so that you can have a configuration where:
- tftpd is the one coming from the tftpd package
- tftp remains the one provided by Busybox
Exactly.
The (rather unusual) situation is that the Busybox implementation has features that the "full" tftpd package does not support - features that we have come to rely on (set block size).
Quoted 3 lines
However, in Buildroot, we try to avoid having one sub-option per binary program. We do have that in a few packages, and it's often very painful and annoying to maintain.
Ok.
Quoted 5 lines
If you really, really don't like the tftp
program from the tftpd package, you can also add in your post-build script:
rm/usr/bin/tftp
ln -s/bin/busybox/usr/bin/tftp
Thank you for this idea.
Quoted 5 lines
But I just checked and the tftp program installed by the tftp package is only 22 KB in size:
So I really don't think it's worth the effort having yet another sub-option for 22 KB, especially when you can handle such tweaking in your post-build script if you really really want to.
I agree.
Thank you very much for your response.
/David
PATCH 1/1 tftpd: make installation of tftp client optional
Hi David,
Quoted 11 lines · David Marqvar
Quoted 6 lines
Your commit log is empty, so I'm not sure what you're trying to do here. If I understand correctly, you want a sub-option to enable/disable the installation of the "tftp" binary, so that you can have a configuration where:
- tftpd is the one coming from the tftpd package
- tftp remains the one provided by BusyboxExactly.
The (rather unusual) situation is that the Busybox implementation has features that the "full" tftpd package does not support - features that we have come to rely on (set block size).
The atftp TFTP client seems to support block size set:
--option "blksize 1428"
baruch
Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -