Your message dated Thu, 14 Jan 2021 10:20:34 +0000
with message-id <[email protected]>
and subject line Bug#951801: fixed in lilypond 2.22.0-1
has caused the Debian Bug report #951801,
regarding User setting of LILYPOND_DATADIR is not honoured
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
951801: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=951801
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: lilypond
Version: 2.19.81+really-2.18.2-13

The Lilypond documentation says that if you set the environment
variable LILYPOND_DATADIR to point at a directory, then Lilypond will
look for its data files (fonts, startup files etc) in that directory
instead of /usr/share/lilypond/<version-number>. In particular, in the
2.18 series, this is the only way to substitute a different musical
notation font.

However, the override doesn't actually work! Under normal conditions,
Lilypond overwrites that variable itself during startup, with a value
derived from searching PATH for its own binary. Using the -V option
you can see this happening in the startup messages, and then
subsequent messages show fonts and other resources being loaded from
the standard location:

$ export LILYPOND_DATADIR=$HOME/my-datadir
$ lilypond.real -V demo.ly
Log level set to 287
GNU LilyPond 2.18.2
Relocation: is absolute: argv0=/usr/bin/lilypond.real
PATH=/usr/bin (prepend)
Setting PATH to 
/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Relocation: compile datadir=, new datadir=/usr/share/lilypond//2.18.2
Relocation: framework_prefix=/usr/bin/..
Setting INSTALLER_PREFIX to /usr/bin/..
Setting LILYPOND_DATADIR to /usr/share/lilypond//2.18.2
[...]
Interpreting music...
[/usr/share/lilypond/2.18.2/fonts/otf/emmentaler-20.otf]
elapsed time: 0.01 seconds
[...]

In order to work around this, I tried to 'exec' the Lilypond binary
with an argv[0] that does not appear on PATH at all, which inhibits
the initial 'relocate' operation and causes the input value of
LILYPOND_DATADIR not to be overwritten.

That works OK, provided I take account of the fact that
/usr/bin/lilypond is a wrapper script that sets up LD_LIBRARY_PATH. If
I manually repeat that setting, and then exec the real binary
directly, then I have more luck:

$ export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu/lilypond/2.18.2/guile"
$ export LILYPOND_DATADIR=$HOME/my-datadir
$ (exec -a sdfsdfsdf lilypond.real -V demo.ly)
Log level set to 287
GNU LilyPond 2.18.2
Relocation: from 
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
argv0=sdfsdfsdf
programming error: cannot find absolute argv0
continuing, cross fingers
[...]
LILYPOND_DATADIR="/usr/share/lilypond/2.18.2"
LILYPOND_DATADIR="/root/my-datadir"
LOCALEDIR="/usr/share/locale"
[...]
Interpreting music...
[/root/my-datadir/fonts/otf/emmentaler-20.otf]
elapsed time: 0.01 seconds

... and now it's loading fonts from where I told it to.

But the intervening wrapper script at /usr/bin/lilypond makes it very
awkward to automate this! The best way I've managed to find, which
arranges to use the correct LD_LIBRARY_PATH setup from
/usr/bin/lilypond and then pass a custom argv[0] to the real binary,
is to write a wrapper bash script which covers the 'exec' builtin with
an alias, and then sources /usr/bin/lilypond:

#!/bin/bash
shopt -s expand_aliases
alias exec='exec -a sdfsdfsdf'
export LILYPOND_DATADIR=$HOME/my-datadir
source /usr/bin/lilypond

With that wrapper script, I can get Lilypond to behave as I want:

$ ./wrapper.sh -V demo.ly
[...]
LILYPOND_DATADIR="/root/my-datadir"
[...]

But it would be really nice not to have to recommend this procedure to
people who want to use a different music font!

Cheers,
Simon

-- 
for k in [pow(x,37,0x1a1298d262b49c895d47f) for x in [0x50deb914257022de7fff,
0x213558f2215127d5a2d1, 0x90c99e86d08b91218630, 0x109f3d0cfbf640c0beee7,
0xc83e01379a5fbec5fdd1, 0x19d3d70a8d567e388600e, 0x534e2f6e8a4a33155123]]:
 print("".join([chr(32+3*((k>>x)&1))for x in range(79)])) # <[email protected]>

--- End Message ---
--- Begin Message ---
Source: lilypond
Source-Version: 2.22.0-1
Done: Anthony Fok <[email protected]>

We believe that the bug you reported is fixed in the latest version of
lilypond, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Anthony Fok <[email protected]> (supplier of updated lilypond package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 14 Jan 2021 02:53:46 -0700
Source: lilypond
Architecture: source
Version: 2.22.0-1
Distribution: unstable
Urgency: medium
Maintainer: Anthony Fok <[email protected]>
Changed-By: Anthony Fok <[email protected]>
Closes: 746005 852871 951801 979839
Changes:
 lilypond (2.22.0-1) unstable; urgency=medium
 .
   * New upstream version 2.22.0 (Closes: #979839, #951801)
   * Remove embedded guile-1.8 and migrate to system guile-2.2
     (Closes: #746005, #852871)
   * debian/gbp.conf: Remove guile18 component
   * debian/{control,rules}: Migrate from python2 to python3
   * debian/rules:
     - Run "make doc" with "-j" option in addition to CPU_COUNT
       as suggested in INSTALL.txt for even faster build
     - Remove "nuke the parser files" workaround
       as lily/out/parser.* no longer exist in upstream source
     - Remove empty override_dh_auto_test-arch
       as the tests no longer fail without built documentation
     - Remove override_dh_auto_test-indep as the added "make test-baseline"
       is not suited for automated Debian builds
     - Try to "git restore configure" in override_dh_auto_clean
   * debian/control:
     - lilypond-doc: Add Replaces: lilypond-doc-html (<< 2.21.82-1~)
       to avoid upgrade error due to web files reorganization
     - Build-depend imagemagick-6.q16 instead of imagemagick.
       "imagemagick" became a dummy package in Debian 9 "stretch",
       and the aspcud resolver used by experimental buildd would install
       graphicsmagick-imagemagick-compat (which Provides: imagemagick)
       which is not that compatible after all and caused lilypond to FTBFS
     - Remove Authors paragraph from package description
       as the development team is much larger than before
     - Bump Standards-Version to 4.5.1 (no change)
   * debian/lilypond.docs: Rename README.txt to README.md as per upstream
   * Adjust documentation install file lists for LilyPond 2.21/2.22:
     - debian/doc_languages.txt: Add PDF package for Portuguese
     - debian/update_doc_packages: Adjust install file lists for new version
     - debian/lilypond-doc.install: Remove the no-longer-existing
       usr/share/doc/lilypond/html/Documentation/*.txt entry
     - Run "debian/rules update-doc-packages"
     - Add debian/not-installed to avoid dh_missing errors with debhelper 13
   * debian/patches: Delete obsolete patches and disable others for now
   * debian/remove_w3c_callback: Recognize https too, to fix Lintian
     privacy-breach-w3c-valid-html errors
   * Adjust debian/lilypond-doc.install and debian/rules
     so that the PNG files stay with lilypond-doc package
   * debian/README.Debian: Minor editing
   * Cherry-pick upstream fixes for potential crashes with Guile 2.2
     - 0001-Protect-against-GC-when-constructing-a-System.patch
     - 0002-System-Initialize-all-member-variables.patch
Checksums-Sha1:
 cf8313d328e6bb7c99584ab786a5847b2856a4b0 4081 lilypond_2.22.0-1.dsc
 cc27af8efa977e632932d2633e665381fe24f44e 49320 lilypond_2.22.0-1.debian.tar.xz
 61ecd1f6bbbb7c6504c11856a6dcf140b384ac17 13942 
lilypond_2.22.0-1_source.buildinfo
Checksums-Sha256:
 2be2e6c7f27807368a3230a2d0c912429cff7cf894366c8028361450d951dd92 4081 
lilypond_2.22.0-1.dsc
 d3990d84eb50fb2261a807d91687a43bcf4c8dbaa471b95a968dbeb84913f215 49320 
lilypond_2.22.0-1.debian.tar.xz
 0071df91c6b9320d822a0349f10310831f2ad2e6fb5987a60c0be806ab714d5f 13942 
lilypond_2.22.0-1_source.buildinfo
Files:
 7aea8a028c6deddd798dac49088fd75e 4081 tex optional lilypond_2.22.0-1.dsc
 13a87a0d824778503cb5f711394c4f55 49320 tex optional 
lilypond_2.22.0-1.debian.tar.xz
 d2abfe5ddf3d9ba51a0ce85282f9e858 13942 tex optional 
lilypond_2.22.0-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJEBAEBCAAuFiEEFCQhsZrUqVmW+VBy6iUAtBLFms8FAmAAFQUQHGZva2FAZGVi
aWFuLm9yZwAKCRDqJQC0EsWaz8nyEACdwYlm2YjYtmGr166sb+iWVwBdTDzXs7nm
sR3vct0DEKTW+lqoBYIJGfZJe9UIw9HoknBC85gztFIrntwccoON/0ipW4DMeV+Z
68/zlPZ15htDguEC0WNkGVmBy43d7JgfKYlVHky35ZZM0fUKjKuCJ76MmbR5WvwU
hyzeO3/6aiOKiQXhM193aa9ap3NK5xoEyAXtMvOiz/cAp8ZXmmjifBWLciRZVi2r
uPhGhUtvMFAhxosA0xBQpoGzfrW87r5RSqerO/7PTwyGVv8e3ljnnmLpr418joBB
gGRl7m0+BRHsjkNcTJRiNaRwo6rsg9dYuljr6S/zu4tEfud4mv10LL3dU6EvxOBl
ALUvUwIbG69bt1zjHTOo1jYY7SaGJetDFcDXwvRnM9P+QKHovFp7GQjRl8tRaIuW
M62FDzYCCap0VSIUsLEvB5aEy78e2vyWEr5oXfqyxviVJwr7sRFaOBKFYBM7vMVz
Iy58SmGuiE7CMLG87s02lrFRVLDEAO/ewJju5hPqEc/Asj0cU7MeeE/KlVWjnTcC
FZ1R2V6r8yFoLdXyGw4NVdg7HbRd+SXU6dLBhwI+Y1LR8NsK6BDpG7BAgoaURC37
9PTK+AEaR18HeRcAV2AlQ+TmR+AWeTmoTojgy8h74wDUa2g1BDZukkn9BMl8GUt0
JPo6SjA8OQ==
=Egci
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to