MiKTeX / docker-miktex

the Docker image for running MiKTeX
41 stars 28 forks source link

`biber` won't get updated to the latest version #35

Closed whentojump closed 1 year ago

whentojump commented 1 year ago

Platform

Behavior

Example files (taken from this comment):

cat example.tex
\documentclass[a4paper,english]{article}
\RequirePackage{biblatex}
\addbibresource{example.bib}
\begin{document}
This is some text.
\cite{Foo2019}
\end{document}
cat example.bib
@misc{Foo2019,
author = {Foo, Bar},
title = {{Learning to foo the bar}},
year = {2019}
}
cat .latexmkrc
$bibtex_fudge=0;
# use xelatex - xdv -> pdf - not working due to bugs in 4.61
$pdf_mode=5;
&alt_tex_cmds;

I can produce the desired PDF from these files with TeX Live by issuing latexmk.

Now do the same thing but with a MiKTeX docker container:

docker run --rm -ti \
  -v miktex:/miktex/.miktex \
  -v $(pwd):/miktex/work \
  -e MIKTEX_GID=$(id -g) \
  -e MIKTEX_UID=$(id -u) \
  miktex/miktex \
  latexmk

which would fail, with the following example.blg:

[0] Config.pm:311> INFO - This is Biber 2.16
[0] Config.pm:314> INFO - Logfile is 'example.blg'
[28] biber:340> INFO - === Sat Dec 24, 2022, 13:07:54
[35] Biber.pm:415> INFO - Reading 'example.bcf'
[66] Utils.pm:411> ERROR - Error: Found biblatex control file version 3.9, expected version 3.7.
This means that your biber (2.16) and biblatex (3.18b) versions are incompatible.
See compat matrix in biblatex or biber PDF documentation.
[66] Biber.pm:132> INFO - ERRORS: 1

According the package repository, the current version of biber-linux-x86_64 should be 2.18, instead of 2.16.

If I try to update this package by running mpm --update=biber-linux-x86_64, it will prompt:

Package "biber-linux-x86_64" is up to date.

with mpm log (/miktex/.miktex/texmfs/data/miktex/log/mpmcli.log) looking like this:

INFO  mpmcli - this is mpmcli 4.1.1 (MiKTeX 21.6)
INFO  mpmcli - this process (31) started by 'bash' with command line: mpm --update=biber-linux-x86_64
INFO  mpmcli - Operating on the private (per-user) MiKTeX setup
INFO  mpmcli.packagemanager - searching for updateable packages
INFO  mpmcli.packagemanager - going to download https://api2.miktex.org/hello
INFO  mpmcli.packagemanager - going to download https://api2.miktex.org/repositories?&releaseState=Stable&orderBy=ranking&take=1&onlySecure=true
INFO  mpmcli - downloading https://mirrors.nwafu.edu.cn/ctan/systems/win32/miktex/tm/packages/miktex-zzdb3-2.9.tar.lzma...
INFO  mpmcli.packagemanager - going to download https://mirrors.nwafu.edu.cn/ctan/systems/win32/miktex/tm/packages/miktex-zzdb3-2.9.tar.lzma
INFO  mpmcli - 1.63 MB, 1360.26 Mbit/s
INFO  mpmcli - updating package manifests (/miktex/.miktex/texmfs/install/miktex/config/package-manifests.ini)...
INFO  mpmcli - installed 6214 package manifests
INFO  mpmcli - visiting repository https://mirrors.nwafu.edu.cn/ctan/systems/win32/miktex/tm/packages/...
INFO  mpmcli - repository type: remote package repository
INFO  mpmcli - loading package repository manifest...
INFO  mpmcli - downloading https://mirrors.nwafu.edu.cn/ctan/systems/win32/miktex/tm/packages/miktex-zzdb1-2.9.tar.lzma...
INFO  mpmcli.packagemanager - going to download https://mirrors.nwafu.edu.cn/ctan/systems/win32/miktex/tm/packages/miktex-zzdb1-2.9.tar.lzma
INFO  mpmcli - 0.31 MB, 1218.67 Mbit/s
INFO  mpmcli - package repository digest: b9ed26183fd490daa74b9cb14a641fd1
WARN  mpmcli.packagemanager - package miktex-misc verification failed: some files have been modified
WARN  mpmcli.packagemanager - expected digest: 8b2b165bb40e90bfbbf4b8574ae4dfbf
WARN  mpmcli.packagemanager - computed digest: 7776dddf20c335fbf6e889e867944eca
WARN  mpmcli.packagemanager - package verification failed: file /usr/local/share/miktex-texmf/miktex/config/ptex.ini does not exist
INFO  mpmcli - Package "biber-linux-x86_64" is up to date.
INFO  mpmcli - this process (31) finishes with exit code 0

Sorry I don't really understand every part of this log. It looks to me that the downloaded manifest already contains a correct version 2.18 for biber-linux-x86_64 package, but it just won't proceed to download and update the binary itself, possibly due to the failure in verifying miktex-misc? which seems a recurring problem (https://github.com/MiKTeX/miktex/issues/855).

(And btw, I haven't figured out how that digest is computed. If anyone can give some hints, it will be appreciated and I perhaps can provide more diagnosis information.)

Thanks for your effort in addressing this! Ask me if you need any further information.

LogCreative commented 1 year ago

I tried another way to update the packages in order to update miktex-misc as well:

root@fd92fcba0368:/miktex/work# mpm --admin --find-updates # Find the outdated packages
biber-linux-x86_64
miktex-config-2.9
miktex-misc
root@fd92fcba0368:/miktex/work# mpm --admin --update --verbose # Update these packages
...

Sorry, but "MiKTeX Package Manager" did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  /var/log/miktex/mpmcli_admin.log

root@fd92fcba0368:/miktex/work# cat /var/log/miktex/mpmcli_admin.log

/var/log/miktex/mpmcli_admin.log

2022-12-24 17:03:26,234Z FATAL mpmcli - The executed process did not succeed.
2022-12-24 17:03:26,234Z FATAL mpmcli - Info: exitCode="1", fileName="/usr/bin/mkfntmap"
root@fd92fcba0368:/miktex/work# mkfntmap --admin

Sorry, but mkfntmap did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  /var/log/miktex/mkfntmap_admin.log
root@fd92fcba0368:/miktex/work# cat /var/log/miktex/mkfntmap_admin.log

/var/log/miktex/mkfntmap_admin.log

2022-12-24 17:05:29,099Z INFO  mkfntmap - Parsing config file /usr/local/share/miktex-texmf/miktex/config/updmap.cfg...
2022-12-24 17:05:29,100Z FATAL mkfntmap - invalid configuration setting
2022-12-24 17:05:29,100Z FATAL mkfntmap - cfg file: /usr/local/share/miktex-texmf/miktex/config/updmap.cfg
2022-12-24 17:05:29,100Z FATAL mkfntmap - line: 87

Refer to https://github.com/MiKTeX/miktex/commit/af6c6d08156d8d49200f9bc680ff9a9225a9f856 , updmap.cfg is now removed. But the image is one year old, so the bug remains. What's worse, after this, initexmf will always fail and no document could be compiled.

It is afraid that the only way to make biber happy is to downgrade biblatex to version 3.16 manually. The ultimate way to fix this is to refresh the image.

whentojump commented 1 year ago

I reproduced your results. Great research and report!!

About this bit --

Refer to https://github.com/MiKTeX/miktex/commit/af6c6d08156d8d49200f9bc680ff9a9225a9f856 , updmap.cfg is now removed.

I think that commit only removes the documentation. updmap.cfg itself is still shipped along with the package miktex-misc. See this page. Looks like this configuration file is maintained separately outside the tree?

I also found this: https://github.com/MiKTeX/miktex/issues/1047, which is quite similar to your results. According to the discussion therein, I guess here's the thing: the latest updmap.cfg from miktex-misc package doesn't play well with old MiKTeX (21.6, the same as the linked issue's reporter) from Docker Hub. And I agree --

The ultimate way to fix this is to refresh the image.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.