Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 6b7f343121b3
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: ad1f06f79c63
Choose a head ref
  • 3 commits
  • 3 files changed
  • 2 contributors

Commits on Oct 31, 2019

  1. itstool: 2.0.2 -> 2.0.6

    To get python3 support.  #63174 flipped itstool to python3, but itstool
    doesn't support python3 until 2.0.3 (and perhaps does not support it
    well until 2.0.5).
    
    Pressing forward instead of rolling back at worldofpeace's suggestion,
    who mentions that other distros seem to be able to ship recent versions
    of itstool.
    
    Tensions in this space seem two-fold.  One set centers around libxml2
    being a low-level C library with sharp edges, manual memory management,
    and performance concerns; the python libxml2 wrapper being quite thin
    (the most dubious character in this drama); and python's sentiment that
    it ought to be quite hard to crash the interpreter casually.  This comes
    to a head in https://gitlab.gnome.org/GNOME/libxml2/issues/12 , where a
    use-after-free problem in idiomatic-looking python code is declared
    working-as-designed.
    
    The other set is around python3 being more UTF-8-aware than libxml2's
    python wrapper, such as https://bugzilla.gnome.org/show_bug.cgi?id=789714
    and https://src.fedoraproject.org/rpms/libxml2/blob/master/f/libxml2-2.9.8-python3-unicode-errors.patch
    
    itstool is caught in this crossfire merely for being a widely-used
    python program that uses XML.
    chkno committed Oct 31, 2019
    Copy the full SHA
    0c999c7 View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2019

  1. python3Packages.libxml2: Patch to work around python3 + utf-8 itstool…

    … crash
    
    1. Gnumeric has unbalanced XML tags in its doc translations.
    2. itstool's XML error handler tries to print this error with context.
    3. libxml2's context snipper treats the data as bytes, not UTF-8.
    4. python3Packages.libxml2 casts the context to a UTF-8 Python string.
    5. itstool dereferences a null pointer.
    
    This patch intervenes at #4.
    
    In https://bugzilla.gnome.org/show_bug.cgi?id=789714#c4 , upstream
    suggests that intervening at #3 would be better -- that each of the four
    copies of xmlParserPrintFileContextInternal() have four additional UTF-8
    problems, one of which is that the caret indicator ought to count
    "unicode characters" not bytes.  But to position a caret correctly, a
    character count is not sufficient -- this would need to use icu's BiDi
    logic (with fallback to doing something wrong when libxml2 is configured
    not to use icu) -- which makes a 'correct' fix a much larger project
    than this simple band-aid.
    chkno committed Nov 1, 2019
    Copy the full SHA
    c0cecd0 View commit details
    Browse the repository at this point in the history
  2. itstool: 2.0.2 -> 2.0.6 (#72342)

    itstool: 2.0.2 -> 2.0.6
    jtojnar committed Nov 1, 2019
    Copy the full SHA
    ad1f06f View commit details
    Browse the repository at this point in the history