Bug 238915 - sysutils/busybox: Update to 1.30.1
Summary: sysutils/busybox: Update to 1.30.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Fernando Apesteguía
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2019-07-01 12:33 UTC by Oleksii Samorukov
Modified: 2019-07-16 15:19 UTC (History)
1 user (show)

See Also:


Attachments
busybox update (35.70 KB, patch)
2019-07-01 12:33 UTC, Oleksii Samorukov
no flags Details | Diff
Busybox update (v2) (37.54 KB, patch)
2019-07-08 08:40 UTC, Oleksii Samorukov
no flags Details | Diff
Busybox patch (v3) (39.46 KB, patch)
2019-07-12 19:15 UTC, Fernando Apesteguía
no flags Details | Diff
BusyBox v4 patch (37.35 KB, patch)
2019-07-13 14:54 UTC, Oleksii Samorukov
no flags Details | Diff
BusyBox v4 patch (42.73 KB, patch)
2019-07-13 14:56 UTC, Oleksii Samorukov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oleksii Samorukov freebsd_committer 2019-07-01 12:33:31 UTC
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
Comment 1 Oleksii Samorukov freebsd_committer 2019-07-01 20:55:43 UTC
p.s. i can be a maintainer of this port as it is unmaintained for now.
Comment 2 Oleksii Samorukov freebsd_committer 2019-07-08 08:40:47 UTC
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
Comment 3 Fernando Apesteguía freebsd_committer 2019-07-12 19:15:08 UTC
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
Comment 4 Fernando Apesteguía freebsd_committer 2019-07-12 19:15:47 UTC
Created attachment 205728 [details]
Busybox patch (v3)

New version that allows building in i386
Comment 5 Oleksii Samorukov freebsd_committer 2019-07-13 12:24:03 UTC
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.
Comment 6 Fernando Apesteguía freebsd_committer 2019-07-13 12:32:55 UTC
(In reply to samm from comment #5)

It looks like a good plan :-) I'll wait for your patch.
Comment 7 Oleksii Samorukov freebsd_committer 2019-07-13 14:54:12 UTC
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
Comment 8 Oleksii Samorukov freebsd_committer 2019-07-13 14:56:19 UTC
Created attachment 205753 [details]
BusyBox v4 patch
Comment 9 Fernando Apesteguía freebsd_committer 2019-07-14 16:13:03 UTC
(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.
Comment 10 Oleksii Samorukov freebsd_committer 2019-07-15 11:24:51 UTC
Yes, could you please add this line?
Comment 11 Fernando Apesteguía freebsd_committer 2019-07-15 18:06:55 UTC
(In reply to samm from comment #10)

Sure thing.
Comment 12 commit-hook freebsd_committer 2019-07-16 15:18:12 UTC
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
Comment 13 Fernando Apesteguía freebsd_committer 2019-07-16 15:19:32 UTC
Committed,

Thanks!