From 341dc984c3f73f91d8144ea046e296ab0c57c3f2 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Sat, 8 Jun 2024 21:27:10 +0200 Subject: TLObsd now provides biber --- README.md | 22 +++++++++++++++-- tl-build.sh | 1 + tlobsd | 6 ++++- tlobsd-getbiber | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 103 insertions(+), 3 deletions(-) create mode 100644 tlobsd-getbiber diff --git a/README.md b/README.md index 7acc022..f16cfc1 100644 --- a/README.md +++ b/README.md @@ -58,8 +58,7 @@ for OpenBSD provides the following: - xindy - LuaMetaTeX (ConTeXt) - asymptote - -biber will soon be added to this list. +- biber (see below) ### TeX Live for OpenBSD at Utah @@ -249,6 +248,25 @@ tlobsd mksymlinks Just as `tlobsd tlmgr`, this command requires the `subversion` package. +### `biber` + +A binay version of `biber`, the backend processor for BibLaTeX, is +available for TeX Live for OpenBSD. It can be installed or updated +with `tlobsd` as follows: + +```sh +tlobsd getbiber +``` + +This commands downloads a `biber` executable and attempts to verify it +with the public key that is used to sign the TeX Live for OpenBSD +binaries. See +[above](#installing-tex-live-on-openbsd-with-ready-to-use-binaries). + +Direct link to `biber` binary: . This +binary can be installed by hand into the TeX Live binary directory. +The suffix must be removed and the file renamed to exactly "`biber`". + ### More information on `tlobsd`: ```sh diff --git a/tl-build.sh b/tl-build.sh index dcf3bfe..b538401 100755 --- a/tl-build.sh +++ b/tl-build.sh @@ -149,6 +149,7 @@ function include_extras { if [[ -d ${tl_sourcedir}/inst/bin ]];then tl_bindir=${tl_sourcedir}/inst/bin/`ls ${tl_sourcedir}/inst/bin` install -m 0755 ${this_dir}/tlobsd-mksymlinks ${tl_bindir}/tlobsd-mksymlinks + install -m 0755 ${this_dir}/tlobsd-getbiber ${tl_bindir}/tlobsd-getbiber install -m 0755 ${this_dir}/tlobsd ${tl_bindir}/tlobsd fi } diff --git a/tlobsd b/tlobsd index 13ac99c..04187ba 100644 --- a/tlobsd +++ b/tlobsd @@ -1,6 +1,6 @@ #!/bin/sh # -# $TeX Live for OpenBSD, 2024/04/27 $ +# $TeX Live for OpenBSD, 2024/06/08 $ cmd=$@ export tlobsd=1 @@ -13,6 +13,7 @@ Known actions to \033[1mtlobsd\033[0m: \033[4mtlmgr\033[0m\t\tThis action accepts the exact same options and arguments as \033[4mtlmgr(1)\033[0m. \033[4mmksymlinks\033[0m\tUpdates all existing links in \033[4m${TLBINPATH}\033[0m \t\tand installs new links. + \033[4mgetbiber\033[0m\tInstalls or updates biber executable for OpenBSD. \033[4mversion\033[0m\tGives version information. " } @@ -31,6 +32,9 @@ elif [[ $1 == "tlmgr" ]];then # symlinks elif [[ $1 == "mksymlinks" ]];then tlobsd-mksymlinks $2 +# getbiber +elif [[ $1 == "getbiber" ]];then + tlobsd-getbiber # version elif [[ $1 == "version" ]];then TL_RELEASE=$(tlmgr version | awk 'FNR == 3 { print $0 }') diff --git a/tlobsd-getbiber b/tlobsd-getbiber new file mode 100644 index 0000000..e5a7944 --- /dev/null +++ b/tlobsd-getbiber @@ -0,0 +1,77 @@ +#!/bin/sh +# +# $TeX Live for OpenBSD, 2024/06/08 $ + +TLBINDIR=$(dirname $0) +BINREPO=https://www.ekdosis.org/texlive +TMPDIR=$(mktemp -d) +OPENBSD_VERSION=$(sysctl -n kern.version | awk 'FNR == 1 { print $2 }' | sed 's/\.//') +UPDATING=$(curl -s ${BINREPO}/status.txt | grep updating= | sed 's/.*=//') + +if [[ ! -w ${TLBINDIR} ]]; then + echo "You do not have write permissions to ${TLBINDIR}" + exit 1 +fi + +if [[ ${tlobsd} -ne 1 ]];then + echo "Please use 'tlobsd getbiber' instead of this command." + exit 1 +fi + + +if [[ ${UPDATING} == "yes" ]];then + echo "The binaries are being updated. Please re-run this command later." +else + curl ${BINREPO}/biber-openbsd${OPENBSD_VERSION}.xz \ + -o ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz + curl ${BINREPO}/biber-openbsd${OPENBSD_VERSION}.xz.asc \ + -o ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz.asc + gpg --verify ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz.asc + if [[ $? -eq 0 ]];then + unxz ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz + cp ${TMPDIR}/biber-openbsd${OPENBSD_VERSION} ${TLBINDIR}/biber + chmod +x ${TLBINDIR}/biber + echo "Installation complete." + else + echo "" + echo "The signature could not be verified." + echo " Please import the public key used to sign biber-openbsd${OPENBSD_VERSION}.xz" + echo " as described on the TeX Live for OpenBSD web page, or verify this file from" + echo " the user account that was used to install TeX Live for OpenBSD. (Assumably," + echo " this user has already imported the public key into his keyring. Any user" + echo " whose keyring contains the public key of TeX Live for OpenBSD can be used.)" + echo "" + echo " The file to be verified can be found here: ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz." + echo "" + echo " Would you like me to attempt to verify the file from an account that has" + echo " the public key in its keyring?" + echo "" + read whattodo?"[Y]es/[C]ontinue without verifying/[A]bort installation) [Y]: " + [[ "${whattodo}" == '' ]] && whattodo=y + case $whattodo in + [yY] ) + read username?"Enter any user name whose keyring contains the public key of TeX Live for OpenBSD: " + chmod 755 ${TMPDIR} + doas -u ${username} gpg --verify ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz.asc + if [[ $? -eq 0 ]];then + unxz ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz + cp ${TMPDIR}/biber-openbsd${OPENBSD_VERSION} ${TLBINDIR}/biber + chmod +x ${TLBINDIR}/biber + echo "Installation complete." + else + exit 1 + fi + ;; + [cC] ) + unxz ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz + cp ${TMPDIR}/biber-openbsd${OPENBSD_VERSION} ${TLBINDIR}/biber + chmod +x ${TLBINDIR}/biber + echo "Installation complete." + ;; + * ) + echo "Aborting..." + exit 1 + ;; + esac + fi +fi -- cgit v1.2.3