Opened 17 months ago

Last modified 3 months ago

#66132 assigned defect

openjdk11-graalvm varies distfile based on configure.build_arch

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: breun (Nils Breunese)
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: Cc: cooljeanius (Eric Gallager)
Port: openjdk11-graalvm

Description

openjdk11-graalvm varies which distfile it uses based on configure.build_arch but the mirroring component of mpbb running on the buildbot doesn't support doing that. As a result, the arm64 distfile never gets mirrored, because the machine doing the mirroring always has configure.build_arch set to x86_64.

The mirroring script does support varying based on os.arch however, so I suggest you do that here:

  • java/openjdk11-graalvm/Portfile

    diff --git a/java/openjdk11-graalvm/Portfile b/java/openjdk11-graalvm/Portfile
    index 5199357fb62..9c53d58dd74 100644
    a b long_description GraalVM is a universal virtual machine for running applications 
    2323
    2424master_sites https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/
    2525
    26 if {${configure.build_arch} eq "x86_64"} {
     26platform darwin i386 {
    2727    distname     graalvm-ce-java11-darwin-amd64-${version}
    2828    checksums    rmd160  c0c8bc78bea75f7b8dec958ede569d1ad0263d37 \
    2929                 sha256  b8b39d6a3e3a9ed6348c2776ff071fc64ca90f98999ee846e6ca7e5fdc746a8b \
    3030                 size    254057238
    31 } elseif {${configure.build_arch} eq "arm64"} {
     31}
     32platform darwin arm {
    3233    distname     graalvm-ce-java11-darwin-aarch64-${version}
    3334    checksums    rmd160  0e8e04f543c80044eceac29066522c0d3c5b18f8 \
    3435                 sha256  c9657e902c2ba674931c3cf233a38c4de3d5186ae5d70452f9df75ac0c4cacff \

The only valid values for os.arch are powerpc, i386, and arm.

This change works here only because this port excludes i386 from supported_archs so there is only one distfile for Intel. If this port supported both x86_64 and i386, then you would indeed have to choose based on the build arch and there would be no solution for mirroring the i386 files. (It would mirror the x86_64 files.)

Please check your other ports if similar changes are needed there.

Change History (2)

comment:1 Changed 17 months ago by breun (Nils Breunese)

Currently all openjdk* ports I maintain have NoMirror set, so none of these distfiles should currently get mirrored at all. If via https://trac.macports.org/ticket/66133 we decide these distfiles should be mirrored, then I guess we should also make a change like this.

Can this platform syntax also be used for the distile for the openjdk11-graalvm-native-image subport?

comment:2 Changed 3 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.