Bug 269223 - devel/root: Need help understanding failed staging on arm64
Summary: devel/root: Need help understanding failed staging on arm64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-29 12:29 UTC by Erik Jensen
Modified: 2023-02-13 14:16 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Jensen 2023-01-29 12:29:03 UTC
devel/root, which I am the maintainer of, fails on various releases of FreeBSD in the staging phase on the FreeBSD package build server:

- https://pkg-status.freebsd.org/ampere2/data/main-arm64-default/p65c6f35619ce_s4883f347f6/logs/root-6.26.10.log
- https://pkg-status.freebsd.org/ampere3/data/131arm64-default/7401c1f88759/logs/root-6.26.10.log
- https://pkg-status.freebsd.org/ampere3/data/131arm64-default/08587f681899/logs/root-6.26.10.log

I do not, myself, have access to an arm64 system, and it is not immediately obvious to me what goes wrong.
In all three of the above cases, staging seems to fail immediately with the output

"===========================================================================
=======================<phase: stage          >============================
===>  Staging for root-6.26.10
===>   Generating temporary packing list
sed: 1: "s!%%!g
": unescaped newline inside substitute pattern
*** Error code 1"

The log up until this point indicates to me that the port is otherwise built correctly, if I compare to similar logs on amd64 architecture.

Any ideas on what might fix this?
Comment 1 Nuno Teixeira freebsd_committer freebsd_triage 2023-02-06 09:45:53 UTC
(In reply to Erik Jensen from comment #0)

Should that sed error related to:
---
.if ${ARCH} == "aarch64"
NOT_INSTALLED_ON_AARCH64=       "@comment "
AARCH64_PCM_SUFFIX=     "_rdict"
.else
NOT_INSTALLED_ON_AARCH64=       ""
AARCH64_PCM_SUFFIX=     ""
.endif
---
?

You are using "tabs" in variables/value inside an .if condition. Porter's handbook example is:
---
.if ${PORT_OPTIONS:MOPT1}
PLIST_SUB+=	OPT1="" NO_OPT1="@comment "
SUB_LIST+=	OPT1="" NO_OPT1="@comment "
.else
PLIST_SUB+=	OPT1="@comment " NO_OPT1=""
SUB_LIST+=	OPT1="@comment " NO_OPT1=""
.endif
---

Could you check it?
You can force a similar condition on amd64 to check if it is possible to replicate the sed error.
Comment 2 Erik Jensen 2023-02-13 14:00:57 UTC
Thanks for the help.
I believe I managed to fix it on my end.

A new release of ROOT has just landed, so I will apply this fix to my upcoming update of the port.
Comment 3 Nuno Teixeira freebsd_committer freebsd_triage 2023-02-13 14:16:16 UTC
Nice!
Please add me to CC when PR is created for the update.

Cheers