Page MenuHomePhabricator

Update librsvg to ≥2.42.3
Open, Stalled, NormalPublic

Description

Steps to reproduce:

  1. Download this and go to its path with terminal
  2. ssh tools-dev.wmflabs.org rsvg-convert <001-grinning-face.svg >out.png
  3. xdg-open out.png (or open out.png on macOS)

Actual:
It is broken with Wikimedia's librsvg, rsvg-convert version 2.40.2 (ssh tools-dev.wmflabs.org rsvg-convert -v)

Expected:

My local librsvg, rsvg-convert version 2.42.2, the result of rsvg-convert <001-grinning-face.svg >out.png

Update: After looking into it, it looks like backporting ≥2.42.3 in Debian stretch brings a long list of dependencies. This task is blocked until we upgrade Thumbor to Buster

Related Objects

StatusAssignedTask
OpenNone
StalledNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
ResolvedNone
OpenNone
OpenNone
ResolvedMoritzMuehlenhoff
ResolvedKrenair
Resolved AlexMonk-WMF
Resolvedfgiunchedi
Resolved AlexMonk-WMF
ResolvedKrenair
Resolvedfgiunchedi
ResolvedKrenair
DeclinedNone
Resolvedmobrovac
ResolvedKrinkle
ResolvedKartikMistry
ResolvedKartikMistry
Resolvedbd808
InvalidNone
DeclinedNone
Resolved dduvall
Resolved dduvall
OpenNone

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 29 2018, 6:27 PM
Ebraminio updated the task description. (Show Details)Apr 29 2018, 6:29 PM
Ebraminio updated the task description. (Show Details)

We cannot easily upgrade librsvg on our Debian servers from 2.40 to 2.42 as 2.42.x requires Rust. See https://buildd.debian.org/status/package.php?p=rustc&suite=unstable and the discussion in https://mail.gnome.org/archives/desktop-devel-list/2017-December/msg00072.html

Vvjjkkii renamed this task from Update librsvg to support streamline-emoji to f0daaaaaaa.Jul 1 2018, 1:13 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
JoKalliauer renamed this task from f0daaaaaaa to Update librsvg to support streamline-emoji.Jul 1 2018, 7:14 AM
JoKalliauer lowered the priority of this task from High to Normal.
JoKalliauer updated the task description. (Show Details)
JoKalliauer added a subscriber: Aklapper.
Perhelion added a subscriber: Perhelion.EditedJul 2 2018, 7:02 PM

This is an absolutely simple (near idiotic) bug, which was introduced 2014 (before librsvg was correct). T68672

TheDJ moved this task from Backlog to Patch merged upstream on the Upstream board.
Menner added a subscriber: Menner.Jul 28 2018, 8:25 AM

We cannot easily upgrade librsvg on our Debian servers from 2.40 to 2.42 as 2.42.x requires Rust. See https://buildd.debian.org/status/package.php?p=rustc&suite=unstable and the discussion in https://mail.gnome.org/archives/desktop-devel-list/2017-December/msg00072.html

Rust (1.24) has been added to stretch so it shouldn't be a big issue to backport recent librsvg to Debian Stretch. Backports have already been done for earlier versions of librsvg (before Rust) and Wikimedia Tech has local repositories for such purpose.

JoKalliauer pointed out is would solve many issues with SVG rendering (https://phabricator.wikimedia.org/T40010#4443760). So I suggest to test the actual feasibility of a backport and then start a Task to schedule work.

JoKalliauer added a comment.EditedJul 28 2018, 1:28 PM

@Menner :

I think you linked to the right bugreport, but wrong comment:

I think you might wanted to link to: T40010#4432887
https://phabricator.wikimedia.org/T40010#4432887
where I explained

Updateting librsvg 2.40.16 to 2.42.3 or higher would fix

T40010#4443760 exlains what would be solved if we would change to Inkscape. Since Inkscape it much much slower, Inkscape can only be an alternative renderer which is only used for buggy files. (That would need a flag, or template to change the wikirenderer, but thats a different topic.)

@JoKalliauer
Ok haven't looked at the details that much.

Finally I tried myself in backporting current librsvg. The problem is not the core package Rust but the submodule Cargo. It's only available in upcoming Debian 10 or later...

It seems that current Debian 9 (aka Stretch) is stuck with FireFox 52.9ESR for that reason too. Iaw it's rather hard to backport Cargo (https://www.reddit.com/r/debian/comments/6ie0co/stretch_has_rustc_but_not_latest_firefox_why/). But FireFox ESR support usually ends within one year and no-one likes to have and two year old browser anyway. So I guess in a not to distant future there will be some solution as discussions started last year.

JoKalliauer renamed this task from Update librsvg to support streamline-emoji to Update librsvg.Oct 29 2018, 7:27 PM

@JoKalliauer: I'm not a fan of generic "Update X" tasks without any goal or target, as they easily become neverending catch-all tasks. Which specific version/branch is wanted in this task? 2.42/2.44? Something else?

@JoKalliauer: I'm not a fan of generic "Update X" tasks without any goal or target, as they easily become neverending catch-all tasks. Which specific version/branch is wanted in this task? 2.42/2.44? Something else?

You can revert my edit, but maybe "Update librsvg to 2.42.3 or higher" might be a better name?

Aklapper renamed this task from Update librsvg to Update librsvg to ≥2.42.3.Oct 30 2018, 2:05 AM

We cannot easily upgrade librsvg on our Debian servers from 2.40 to 2.42 as 2.42.x requires Rust. See https://buildd.debian.org/status/package.php?p=rustc&suite=unstable and the discussion in https://mail.gnome.org/archives/desktop-devel-list/2017-December/msg00072.html

I don't see the blocker there. The buildd page says that rustc compiles on every officially supported Debian architecture, the only ones that don't compile are a few of the unofficial ports. Maybe it has changed since the mailing list discussion?

@MoritzMuehlenhoff (or some other ops person), can you have a look at this? We have this proposed Community Wishlist item seriously proposing permanently switching some SVGs over to client-side rendering, and 90% of the rationale seems to be despair regarding this upgrade of librsvg. Can the current package in unstable be backported to stretch for internal use, and can you explain and/or fix whatever is blocking the migration in Debian?

Menner added a comment.Nov 5 2018, 8:37 PM

I don't see the blocker there. The buildd page says that rustc compiles on every officially supported Debian architecture, the only ones that don't compile are a few of the unofficial ports. Maybe it has changed since the mailing list discussion?

The problem comes with the RustC package manger Cargo. It is a dependency of every application using RustC libraries and leads to a hen-egg-problem. No libraries no Cargo build, no Cargo no library build.

Another problem is depency rectification. librsvg depends e.g. on glib 2.52 and Debian has only 2.50. But actually 2.48 would be sufficient for some Unicode support.

Its doable with magic binaries and some work, but its not easy. FireFox 60+ for Debian Strech caused the same problems.

We cannot easily upgrade librsvg on our Debian servers from 2.40 to 2.42 as 2.42.x requires Rust. See https://buildd.debian.org/status/package.php?p=rustc&suite=unstable and the discussion in https://mail.gnome.org/archives/desktop-devel-list/2017-December/msg00072.html

I don't see the blocker there. The buildd page says that rustc compiles on every officially supported Debian architecture, the only ones that don't compile are a few of the unofficial ports. Maybe it has changed since the mailing list discussion?

@MoritzMuehlenhoff (or some other ops person), can you have a look at this? We have this proposed Community Wishlist item seriously proposing permanently switching some SVGs over to client-side rendering, and 90% of the rationale seems to be despair regarding this upgrade of librsvg. Can the current package in unstable be backported to stretch for internal use, and can you explain and/or fix whatever is blocking the migration in Debian?

The blocker is that the Thumbor hosts are still running jessie at this point (T170817). Once we've migrated to stretch an internal backport of the rust-based librsvg seems totally doable, it's probably only half a day of work (but jessie lacks the entire Rust toolchain and other libraries are too outdated (glib et al).

I don't see the blocker there. The buildd page says that rustc compiles on every officially supported Debian architecture, the only ones that don't compile are a few of the unofficial ports. Maybe it has changed since the mailing list discussion?

The problem comes with the RustC package manger Cargo. It is a dependency of every application using RustC libraries and leads to a hen-egg-problem. No libraries no Cargo build, no Cargo no library build.

The Rust toolchain got updated in Debian 9.4 (and pending for 9.5 which will be released next weekend) which includes Cargo, so that should not be an issue any more:
https://packages.qa.debian.org/l/llvm-toolchain-4.0/news/20180701T173340Z.html
https://packages.qa.debian.org/r/rustc/news/20180705T110012Z.html
https://packages.qa.debian.org/c/cargo/news/20180726T170010Z.html

These packages are already being used to build the Firefox 60.x packages for Stretch.

I've made this task a sub task of the "Migrate Thumbor to stretch" task, while not strictly related it makes sense to bundle those (as most of the time required by the migration is consumed by validating rendering differences, so we should directly move to 2.42 when migrating to stretch).

jijiki added a subscriber: jijiki.Nov 7 2018, 2:36 PM

paravoid explained to me that librsvg 2.44 was uploaded to sid on November 3. There was some consternation about the ports which are still missing, but it looks like the change will not be reverted. This upload to sid was the thing that was previously blocked by lack of architecture support.

@MoritzMuehlenhoff - Now that the Thumbor hosts are upgraded to Debian Stretch, and Cargo has been made available in Stretch, are there any remaining blockers to upgrading librsvg to ≥2.42.3? Do we need to create a task for upgrading Stretch to ≥9.4, or is that relatively trivial?

@kaldari Effie looked into that and my initial estimation that we could build librsvg 2.42 in Stretch didn't hold, it needs more recent versions of Rust and Cargo that what was backported for Firefox 60. T216815 tracks the upgrade to buster which will ship librsvg 2.44.10.

jijiki changed the task status from Open to Stalled.Feb 28 2019, 10:14 AM
jijiki updated the task description. (Show Details)