Bug 265440 - security/boringssl: fix build on armv7 and add missing files to pkg-plist
Summary: security/boringssl: fix build on armv7 and add missing files to pkg-plist
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Only Me
Assignee: Sergey A. Osokin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-26 05:13 UTC by Robert Clausecker
Modified: 2022-07-27 00:38 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (osa)
fuz: merge-quarterly?


Attachments
security/boringssl: fix build on armv7 and add missing files to pkg-plist (4.58 KB, patch)
2022-07-26 05:13 UTC, Robert Clausecker
fuz: maintainer-approval? (osa)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Clausecker freebsd_committer freebsd_triage 2022-07-26 05:13:46 UTC
Created attachment 235474 [details]
security/boringssl: fix build on armv7 and add missing files to pkg-plist

- import patch from bug #265438 to add armv7 CPU feature detection
   for FreeBSD
 - add two missing files to pkg-plist


Tested with Poudriere on armv7 FreeBSD 13.1.
Test suite passes.
Please MFH this fix if possible.

Please ensure that no plist issues exist when updating a port.  To do this, either do a testport run, or pass -t to poudriere-bulk.  By default, plist issues are not checked for in a poudriere-bulk run.
Comment 1 Daniel Engberg freebsd_committer freebsd_triage 2022-07-26 06:33:48 UTC
Is this a backport form upstream and/or submitted upstream?
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2022-07-26 14:00:14 UTC
(In reply to Daniel Engberg from comment #1)

No.
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-07-26 14:38:26 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f231639fdf8b30f651a6573ba547f67ff71bb1f7

commit f231639fdf8b30f651a6573ba547f67ff71bb1f7
Author:     Sergey A. Osokin <osa@FreeBSD.org>
AuthorDate: 2022-07-26 14:36:39 +0000
Commit:     Sergey A. Osokin <osa@FreeBSD.org>
CommitDate: 2022-07-26 14:37:26 +0000

    security/boringssl: update pkg-plist

    Bump PORTREVISION.

    PR:             265440

 security/boringssl/Makefile  | 1 +
 security/boringssl/pkg-plist | 2 ++
 2 files changed, 3 insertions(+)
Comment 4 Sergey A. Osokin freebsd_committer freebsd_triage 2022-07-26 14:42:11 UTC
Hi Robert,

thanks for the PR and the patch.

I've just updated the pkg-plist part, thanks.

Could you please review the following patch for FreeBSD/arm we have, https://cgit.freebsd.org/ports/tree/security/boringssl/files/patch-crypto_cpu__aarch64__linux.c

Since FreeBSD isn't officially supported by BoringSSL project, we're currently using "linux" implementation.
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-07-26 15:37:38 UTC
A commit in branch 2022Q3 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e3b5357a5e5a1e9736944b7848de6cdb8d70f9cb

commit e3b5357a5e5a1e9736944b7848de6cdb8d70f9cb
Author:     Sergey A. Osokin <osa@FreeBSD.org>
AuthorDate: 2022-07-08 02:12:07 +0000
Commit:     Sergey A. Osokin <osa@FreeBSD.org>
CommitDate: 2022-07-26 15:35:05 +0000

    security/boringssl: update to the recent commit

    (cherry picked from commit a158634d849aaf15ee8e57db27f0255574e13e9b)
    (cherry picked from commit 625fd413d5373ca7fdee6ec00a95fb2688225cec)
    (cherry picked from commit 1566ecb3a667e056d4a15a4ab58c30d965393025)
    (cherry picked from commit 832ab17bd7e2e061e18a213a1d559c4a594b1144)
    (cherry picked from commit 2b896982c78986ebbf5733ba74402de4db2e890f)
    (cherry picked from commit 31b42acd3f7cbe2f91983417a3a6d178f69d6218)
    (cherry picked from commit f231639fdf8b30f651a6573ba547f67ff71bb1f7)

    PR:             265440

 security/boringssl/Makefile  | 5 +++--
 security/boringssl/distinfo  | 6 +++---
 security/boringssl/pkg-plist | 2 ++
 3 files changed, 8 insertions(+), 5 deletions(-)
Comment 6 Robert Clausecker freebsd_committer freebsd_triage 2022-07-26 15:54:23 UTC
(In reply to Sergey A. Osokin from comment #4)

Hi,

The patch you refer to is for aarch64, i.e. 64 bit ARM.  It does not apply to 32 bit ARM.  The patch I posted adds support for 32 bit ARM.

As for review: it might have been cleaner to add the aarch64 FreeBSD code path into a separate file, as I did for the armv7 (i.e. 32 bit ARM) patch.
Comment 7 commit-hook freebsd_committer freebsd_triage 2022-07-26 15:57:43 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8f5d3084280d550de4eeedddaf47ac4a9d33e6b7

commit 8f5d3084280d550de4eeedddaf47ac4a9d33e6b7
Author:     Sergey A. Osokin <osa@FreeBSD.org>
AuthorDate: 2022-07-26 15:56:17 +0000
Commit:     Sergey A. Osokin <osa@FreeBSD.org>
CommitDate: 2022-07-26 15:57:20 +0000

    security/boringssl: fix build on armv7

    Bump PORTREVISION.

    PR:             265440

 security/boringssl/Makefile                        |  2 +-
 .../boringssl/files/patch-crypto_CMakeLists.txt    | 14 ++++--
 .../files/patch-crypto_cpu__arm__freebsd.c (new)   | 55 ++++++++++++++++++++++
 3 files changed, 67 insertions(+), 4 deletions(-)
Comment 8 commit-hook freebsd_committer freebsd_triage 2022-07-26 15:58:44 UTC
A commit in branch 2022Q3 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7f36bd97535d43af5e459dffe1ae9d56aff1a38a

commit 7f36bd97535d43af5e459dffe1ae9d56aff1a38a
Author:     Sergey A. Osokin <osa@FreeBSD.org>
AuthorDate: 2022-07-26 15:56:17 +0000
Commit:     Sergey A. Osokin <osa@FreeBSD.org>
CommitDate: 2022-07-26 15:58:01 +0000

    security/boringssl: fix build on armv7

    Bump PORTREVISION.

    PR:             265440
    (cherry picked from commit 8f5d3084280d550de4eeedddaf47ac4a9d33e6b7)

 security/boringssl/Makefile                        |  2 +-
 .../boringssl/files/patch-crypto_CMakeLists.txt    | 14 ++++--
 .../files/patch-crypto_cpu__arm__freebsd.c (new)   | 55 ++++++++++++++++++++++
 3 files changed, 67 insertions(+), 4 deletions(-)
Comment 9 Sergey A. Osokin freebsd_committer freebsd_triage 2022-07-26 16:00:33 UTC
Fixed build for armv7 and merged to 2022Q3.
Comment 10 Sergey A. Osokin freebsd_committer freebsd_triage 2022-07-26 16:08:05 UTC
(In reply to Robert Clausecker from comment #6)
Hi,

that's the great idea, but I have no such platform to test the changes.
Comment 11 Sergey A. Osokin freebsd_committer freebsd_triage 2022-07-26 17:53:18 UTC
Committed, thanks!
Comment 12 Robert Clausecker freebsd_committer freebsd_triage 2022-07-26 19:19:56 UTC
(In reply to Sergey A. Osokin from comment #10)

Hi Sergey,

I'll try to provide a patch for that in a separate PR.
Comment 13 Sergey A. Osokin freebsd_committer freebsd_triage 2022-07-26 19:34:14 UTC
(In reply to Robert Clausecker from comment #12)

Hi Robert, thanks.

it's done with the following commit, https://cgit.freebsd.org/ports/commit/?id=22a9a1e09c0a6d2c20d1fdd637f0a8973443870f
Comment 14 Robert Clausecker freebsd_committer freebsd_triage 2022-07-26 23:46:40 UTC
(In reply to Sergey A. Osokin from comment #13)

I have tested your aarch64 patch and can confirm that it builds with Poudriere and passes the test suite (on arm64 FreeBSD 13.1).
Comment 15 Sergey A. Osokin freebsd_committer freebsd_triage 2022-07-27 00:38:14 UTC
(In reply to Robert Clausecker from comment #14)

Thank you, Robert!