Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

biber: test with texlive #173159

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nwhetsell
Copy link
Sponsor Contributor

@nwhetsell nwhetsell commented May 29, 2024

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

This PR tests biber with texlive (see #172769 (comment)). The test is currently failing because biber 2.20 isn’t compatible with the version of BibLaTeX installed with the texlive formula. To confirm that the test passes with biber 2.19:

brew install nwhetsell/biber/[email protected]
brew test [email protected]

@github-actions github-actions bot added the perl Perl use is a significant feature of the PR or issue label May 29, 2024
@chenrui333

This comment was marked as off-topic.

@chenrui333
Copy link
Member

chenrui333 commented May 29, 2024

This PR tests biber with texlive (see #172769 (comment)). The test is currently failing because biber 2.20 isn’t compatible with the version of BibLaTeX installed with the texlive formula.

not sure if we want to merge this as the test is failing for the formula run

@chenrui333 chenrui333 added the in progress Stale bot should stay away label May 29, 2024
@SMillerDev
Copy link
Member

@nwhetsell is there a way to patch support for a newer version into texlive that you know of?

@nwhetsell
Copy link
Sponsor Contributor Author

@SMillerDev Not easily, as far as I know.

Updating BibLaTeX (however it’s done) should probably happen around here:

system "make", "install"
system "make", "texlinks"

(I’m not sure if updating BibLaTeX should happen before or after system "make", "texlinks".) The usual way to update a TeX Live package is to run:

tlmgr update biblatex

The problem is that, as far as I can tell, there’s no way to update a package to a specific version, so TeX Live builds will no longer be reproducible. When installing a TeX Live package, there’s an option to install from a file instead of CTAN, so one could conceivably do something like:

tlmgr install --reinstall --no-depends --file ⟨biblatex package file⟩

The problem here is that package files “must be standard TeX Live package files (with contained tlpobj file)”, and I haven’t been able to figure out where those are distributed.

The only other option I can think of is to install BibLaTeX directly (without using tlmgr). This would probably mean declaring BibLaTeX 3.20 as a resource and then running something like:

system "obuild/build.sh", "install", "3.20", share/"texmf-dist"

However, BibLaTeX’s obuild/build.sh script would probably need to be patched to (at least) ensure reproducible builds. (The build script adds the current date to some files, but this would need to be changed to the date in the CTAN release, 2024/03/21.)

@Cerebus
Copy link

Cerebus commented May 30, 2024

I feel like the biber formula should roll back to 2.19, then work this PR.

@nwhetsell
Copy link
Sponsor Contributor Author

nwhetsell commented May 30, 2024

Applying this patch to the texlive formula gets the biber test to pass (at least locally):

diff --git a/Formula/t/texlive.rb b/Formula/t/texlive.rb
index 7df957dcb9c..bc65fb10dc5 100644
--- a/Formula/t/texlive.rb
+++ b/Formula/t/texlive.rb
@@ -8,6 +8,7 @@ class Texlive < Formula
   mirror "https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/2024/texlive-20240312-source.tar.xz"
   sha256 "7b6d87cf01661670fac45c93126bed97b9843139ed510f975d047ea938b6fe96"
   license :cannot_represent
+  revision 1
   head "https://github.com/TeX-Live/texlive-source.git", branch: "trunk"
 
   livecheck do
@@ -89,6 +90,16 @@ class Texlive < Formula
 
   fails_with gcc: "5"
 
+  # biber 2.20 requires BibLaTeX 3.20, but TeX Live 2024 ships BibLaTeX 3.19
+  # (https://github.com/Homebrew/homebrew-core/issues/172769). Install BibLaTeX 3.20
+  # so that biber is functional. This resource and the update of BibLaTeX can be
+  # removed when TeX Live 2025 is released. The string [email protected] should also
+  # be removed from the list of tex_resources in this formula's install method.
+  resource "[email protected]" do
+    url "https://github.com/plk/biblatex/archive/refs/tags/v3.20.tar.gz"
+    sha256 "f936ca60463f47d14ca165226f89388db39080caf49e62fbd36b9787b596b238"
+  end
+
   resource "texlive-extra" do
     url "https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2024/texlive-20240312-extra.tar.xz"
     mirror "https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/2024/texlive-20240312-extra.tar.xz"
@@ -347,7 +358,7 @@ class Texlive < Formula
     ENV["PERL_MM_USE_DEFAULT"] = "1"
     ENV["OPENSSL_PREFIX"] = Formula["openssl@3"].opt_prefix
 
-    tex_resources = %w[texlive-extra install-tl texlive-texmf]
+    tex_resources = %w[[email protected] texlive-extra install-tl texlive-texmf]
 
     resources.each do |r|
       next if tex_resources.include? r.name
@@ -436,6 +447,16 @@ class Texlive < Formula
     system "make", "install"
     system "make", "texlinks"
 
+    # This can be removed when TeX Live 2025 is released.
+    resource("[email protected]").stage do
+      inreplace "obuild/build.sh",
+                "declare DATE=$(date '+%Y/%m/%d')",
+                # Date from https://github.com/plk/biblatex/releases/tag/v3.20
+                "declare DATE='2024/03/21'"
+
+      system "obuild/build.sh", "install", "3.20", share/"texmf-dist"
+    end
+
     # Create tlmgr config file.  This file limits the actions that the user
     # can perform in 'system' mode, which would write to the cellar.  'tlmgr' should
     # be used with --usermode whenever possible.

I’m not sure if I should add this change to this PR or open a new one.

@SMillerDev
Copy link
Member

I’m not sure if I should add this change to this PR or open a new one.

Let's add it here

@github-actions github-actions bot added CI-linux-self-hosted Build on Linux self-hosted runner long build Set a long timeout for formula testing CI-linux-self-hosted-deps Test dependents on Linux self-hosted runner labels Jun 3, 2024
@ywwry66
Copy link
Contributor

ywwry66 commented Jun 3, 2024

Will upgrading biblatex potentially cause other incompatibility issues?

@nwhetsell
Copy link
Sponsor Contributor Author

@ywwry66 I think it’s safe to say that upgrading anything has the potential to cause incompatibility issues, but I don’t see anything at https://github.com/plk/biblatex/issues that indicates BibLaTeX 3.20 won’t work with TeX Live 2024.

@carlocab carlocab linked an issue Jun 3, 2024 that may be closed by this pull request
4 tasks
Copy link
Member

@carlocab carlocab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, @nwhetsell!

@nwhetsell
Copy link
Sponsor Contributor Author

It looks like the macOS 14-x86_64 job has stalled.

@carlocab
Copy link
Member

carlocab commented Jun 4, 2024

It looks like the macOS 14-x86_64 job has stalled.

Yup. I'e cancelled it. Will restart it when GitHub catches up with the cancellation.

@nwhetsell
Copy link
Sponsor Contributor Author

It doesn’t look like a log is available for the “Linux (deps)” job; I’m not sure what’s causing that to fail.

@nwhetsell
Copy link
Sponsor Contributor Author

Would it be possible to re-run the Linux (deps) check, or to a view a log of it?

@nwhetsell
Copy link
Sponsor Contributor Author

From the summary, it looks like the failing check isn’t running at all:

This request was automatically failed because there were no enabled runners online to process the request for more than 1 days.

(I’m probably missing something, but I can’t tell if this check is needed. Running brew uses --eval-all biber seems to indicate that there are no core formulae that depend on biber.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-linux-self-hosted Build on Linux self-hosted runner CI-linux-self-hosted-deps Test dependents on Linux self-hosted runner in progress Stale bot should stay away long build Set a long timeout for formula testing perl Perl use is a significant feature of the PR or issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

biber 2.20 is incompatible with texlive 2024's biblatex
6 participants