Bug 278694 - lang/julia: update to 1.10.3
Summary: lang/julia: update to 1.10.3
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: Li-Wen Hsu
URL: https://julialang.org/downloads/
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-02 05:02 UTC by Hiroo Ono
Modified: 2024-05-10 16:13 UTC (History)
1 user (show)

See Also:


Attachments
update patch to 1.10.3 (193.39 KB, patch)
2024-05-02 05:02 UTC, Hiroo Ono
no flags Details | Diff
update patch to 1.10.3 revised (206.96 KB, patch)
2024-05-10 09:39 UTC, Hiroo Ono
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hiroo Ono 2024-05-02 05:02:11 UTC
Created attachment 250327 [details]
update patch to 1.10.3

This is an update patch of lang/julia to version 1.10.3.
Comment 1 Li-Wen Hsu freebsd_committer freebsd_triage 2024-05-06 17:04:24 UTC
It needs internet connection during the build:

https://gist.githubusercontent.com/lwhsu/251da98a6c319929892ab17102904002/raw/011e0c78ec6ebfd24d2701358b494019410506c3/julia-1.10.3.log

This is not allowed in the phase other than fetch, please check if we can download everything needed for build in the beginning.
Comment 2 Hiroo Ono 2024-05-06 20:59:56 UTC
(In reply to Li-Wen Hsu from comment #1)

In short, it is difficult.

The access to network in build phase is with DOCS option and happens at three points.
1. To retrieve UnicodeData.txt.
   It can be easily converted to be fetched at fetch phase.
2. After julia program is built, doc/make.jl is invoked with it, and  Pkg.instantiate() is issued. It retrieves non standard Documenter.jl package and its dependencies.
   I could not find a way to prefetch the packages and place it to proper position to avoid Pkg.instantiate() not to trigger network access.
3. Documenter.jl package that is invoked from doc/make.jl (so, by julia built in build phase) accesses GitHub with git to determine the version of packages.
   I tried to hack make.jl to suppress it, but in vain.

So, my workaround is to make DOCS option not default, and leave it to people who build julia by themselves. (setting ALLOW_NETWORKING_PACKAGES="julia" in poudriere.conf in poudriere.conf is needed.) Maybe, I should have documented
* DOCS option needs network access in build phase (and poudriere.conf setting maybe)
* For those installing official package who do not have the julia document, write an instruction that it can be found at https://docs.julialang.org/en/v1/ (maybe in pkg-message?)
Comment 3 Hiroo Ono 2024-05-10 09:39:51 UTC
Created attachment 250564 [details]
update patch to 1.10.3 revised

I managed to avoid network access during build with DOCS option. Patch revised.
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-05-10 16:11:51 UTC
A commit in branch main references this bug:

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

commit 54eaa9043d92b513a1b4952b47d7b7a069ba888a
Author:     Hiroo Ono <hiroo.ono+freebsd@gmail.com>
AuthorDate: 2024-05-10 15:55:56 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2024-05-10 16:11:27 +0000

    lang/julia: Update to 1.10.3

    PR:             278694

 lang/julia/Makefile                                |  185 +-
 lang/julia/distinfo                                |   60 +-
 lang/julia/files/General.toml.in (new)             |    3 +
 lang/julia/files/llvm-patch-backport-version-fixes |   22 +-
 lang/julia/files/patch-Make.inc                    |  149 +-
 lang/julia/files/patch-Makefile                    |   65 +-
 lang/julia/files/patch-base_Makefile (gone)        |   12 -
 lang/julia/files/patch-deps_llvm.mk                |   54 +-
 lang/julia/files/patch-deps_zlib.mk (new)          |   10 +
 lang/julia/files/patch-doc_make.jl (new)           |   62 +
 .../patch-doc_src_manual_unicode-input.md (new)    |   11 +
 lang/julia/files/patch-src_Makefile                |   99 +-
 lang/julia/files/patch-src_flisp_Makefile (gone)   |   36 -
 .../patch-stdlib_LibGit2__jll_src_LibGit2__jll.jl  |    6 +-
 .../patch-stdlib_MbedTLS__jll_src_MbedTLS__jll.jl  |    2 +-
 ...patch-stdlib_OpenLibm__jll_src_OpenLibm__jll.jl |    2 +-
 .../patch-stdlib_Zlib__jll_src_Zlib__jll.jl (gone) |   11 -
 lang/julia/pkg-plist                               | 2242 +++++++++++---------
 18 files changed, 1682 insertions(+), 1349 deletions(-)
Comment 5 Li-Wen Hsu freebsd_committer freebsd_triage 2024-05-10 16:13:08 UTC
(In reply to Hiroo Ono from comment #3)
Committed, thanks! This is indeed a non-trivial work. Hope we can work with upstream to make future updates easier.