Created attachment 205456 [details] busybox update This patch updates busybox to the latest stable (1.30.1) and includes some additional fixes: - all access to '/proc' fs renamed to '/compat/linux/proc' as it is what busybox really expects. Message about linprocfs optional requirment added. Tested with ps, top and few other tools - Some previously disabled applets re-enabled and tested, config synced with all latest updates - Removed GCC specific CC flags - Patch for the httpd applet - New patch for the httpd applet - New patch for the man applet - New patch for the mkdnod applet - Traceroute applet fixed to work on BSD - Some of the broken applets disabled
p.s. i can be a maintainer of this port as it is unmaintained for now.
Created attachment 205580 [details] Busybox update (v2) Updated patch. Changed to the previous version: - make portlint happy, regenerate all patches - fix ash crash on arm (tested on armv6/FreeBSD 11.2) - fix CFLAGS/CXXFLAGS passing from the port to build, remove unneeded flags
Hi Samm, Thanks for the patch. The port doesn't build in i386 systems due to this error: include/platform.h:125:47: note: expanded from macro 'FAST_FUNC' # define FAST_FUNC __attribute__((regparm(3),stdcall)) ^ networking/tls_pstm_montgomery_reduce.c:385:4: error: unknown register name '%cc' in asm INNERMUL; ^ networking/tls_pstm_montgomery_reduce.c:76:19: note: expanded from macro 'INNERMUL' : "%eax", "%edx", "%cc") ^ networking/tls_pstm_montgomery_reduce.c:390:4: error: unknown register name '%cc' in asm PROPCARRY; ^ networking/tls_pstm_montgomery_reduce.c:85:11: note: expanded from macro 'PROPCARRY' : "%eax", "%cc") ^ 11 warnings and 2 errors generated. gmake[2]: *** [scripts/Makefile.build:198: networking/tls_pstm_montgomery_reduce.o] Error 1 gmake[1]: *** [Makefile:743: networking] Error 2 gmake[1]: Leaving directory '/wrkdirs/usr/ports/sysutils/busybox/work/busybox-1.30.1' *** Error code 1 I fixed it quick and dirty by replacing %cc with cc[1] just to face another error of the type "inline assembly requires more registers than available". It seems that assembler code outsmarts clang and the compiler chokes. However GCC builds the port fine so I added this on top of your patch: +.if ${ARCH} == "i386" +USE_GCC= yes +.endif I did some light testing (ls, mkdir, rmdir, wc...). Would you mind to test it yourself? Thanks in advance. [1] https://bugs.llvm.org/show_bug.cgi?id=10365
Created attachment 205728 [details] Busybox patch (v3) New version that allows building in i386
Thank you for review and PR. +.if ${ARCH} == "i386" +USE_GCC= yes +.endif Looks fine. However, I did some progress on porting few other applets to FreeBSD. Let me create v4 version which includes your suggestion and my recent changes.
(In reply to samm from comment #5) It looks like a good plan :-) I'll wait for your patch.
Created attachment 205752 [details] BusyBox v4 patch Here we are :) Changes from the prev. version: CROND applet ported NSLOOKUP applert ported NTPD server and client applets ported PING and PING6 applets ported Mailutils (sendmail, makemime, etc.) applets ported KLOGD applet ported
Created attachment 205753 [details] BusyBox v4 patch
(In reply to samm from comment #8) Tests are OK, so this looks good to me. You expressed your intention of being the maintainer of the port, but didn't change MANTAINER in the Makefile. Are you still willing to maintain it? Cheers.
Yes, could you please add this line?
(In reply to samm from comment #10) Sure thing.
A commit references this bug: Author: fernape Date: Tue Jul 16 15:18:07 UTC 2019 New revision: 506744 URL: https://svnweb.freebsd.org/changeset/ports/506744 Log: sysutils/busybox: update to 1.30.1 * Hand maintainership over to samm@os2.kiev.ua * The port needs to be built with GCC on i386 PR: 238915 Submitted by: samm@os2.kiev.ua Changes: head/sysutils/busybox/Makefile head/sysutils/busybox/distinfo head/sysutils/busybox/files/data-.config head/sysutils/busybox/files/patch-Makefile.flags head/sysutils/busybox/files/patch-coreutils_mknod.c head/sysutils/busybox/files/patch-include_libbb.h head/sysutils/busybox/files/patch-include_platform.h head/sysutils/busybox/files/patch-libbb_pw__encrypt.c head/sysutils/busybox/files/patch-mailutils_mail.c head/sysutils/busybox/files/patch-miscutils_man.c head/sysutils/busybox/files/patch-networking_httpd.c head/sysutils/busybox/files/patch-networking_nslookup.c head/sysutils/busybox/files/patch-networking_ntpd.c head/sysutils/busybox/files/patch-networking_ping.c head/sysutils/busybox/files/patch-networking_traceroute.c head/sysutils/busybox/files/patch-sysklogd_klogd.c
Committed, Thanks!