Build marked BROKEN with 404 file
Closed this issue · 5 comments
Commit freebsd/freebsd-ports@9a61150 has marked port as broken because «tries to fetch during the build».
Trying to reproduce locally, I get a:
ERROR: Analysis of target '//tensorflow/tools/lib_package:libtensorflow.tar.gz' failed; build aborted: no such package '@zlib//': java.io.IOException: Error downloading [https://zlib.net/zlib-1.2.11.tar.gz] to /usr/ports/work/usr/ports/science/libtensorflow1/work-default/bazel_out/ea330fc52515eb694a76ad53f73200df/external/zlib/zlib-1.2.11.tar.gz: GET returned 404 Not Found
As reported in huo-ju/photoprism-freebsd-port#13 it seems that this patch is solving the issue.
% cat files/patch-third__party_repo.bzl
--- third_party/repo.bzl.orig 2022-08-30 17:37:22 UTC
+++ third_party/repo.bzl
@@ -63,10 +63,7 @@ def _repos_are_siblings():
# Apply a patch_file to the repository root directory
# Runs 'git apply' on Unix, 'patch -p1' on Windows.
def _apply_patch(ctx, patch_file):
- if _is_windows(ctx):
- patch_command = ["patch", "-p1", "-d", ctx.path("."), "-i", ctx.path(patch_file)]
- else:
- patch_command = ["git", "apply", "-v", ctx.path(patch_file)]
+ patch_command = ["patch", "-p1", "-d", ctx.path("."), "-i", ctx.path(patch_file)]
cmd = _wrap_bash_cmd(ctx, patch_command)
_execute_and_check_ret_code(ctx, cmd)
Ah, I had that patch blocked behind a check for specific FreeBSD versions. I've removed the check and am doing a test build now.
BTW: I only tried it working on FreeBSD-13.1/amd64 myself (didn't try others).
BTW: no hurry, but I also opened a FreeBSD PR.