• Re: Reopen RFP Skia - Google's 2D graphic suite

    From Andrey Rahmatullin@21:1/5 to maxzor on Mon Dec 13 15:10:01 2021
    On Mon, Dec 13, 2021 at 02:51:55PM +0100, maxzor wrote:
    TL;DR Please consider reopening the following request for packaging : https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818180
    You could that yourself. On the other hand, having an RFP doesn't mean
    anything so reopening it is not useful. If someone wants to package it
    they could do that with or without the RFP existing.

    I believe that the effort of decoupling Skia from the upstream packages
    can be worth it. It could to allow more people to hear about the existence
    of
    the library in the first place, to study its algorithms,
    and maybe build upon them.
    Somebody still needs to do that, and then maintain the package in Debian.

    I do not have the rights on the request mail server to unarchive the RFP.
    I don't think the concept of such rights exists.

    <maxzor> Hello again, do you know why skia is not packaged?
    <somiaj> maxzor: assuming it meets the DSFG, it is often lack of someone volunteering to do the work
    This is correct.

    <jkc> maxzor: Didn't you just ask this in #ubuntu?
    <maxzor> I did jkc, I was received... strangely
    <somiaj> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818180 -- hmm unsure why that bug was marked as done and archived, but there was an RFP
    bug for it a while ago. MAybe they close old RFP bugs if no one steps up since projects can die and not be needed. Also could be a library not needed by other things in debian.
    It was indeed closed due to inactivity, as can be seen in the close email.


    --
    WBR, wRAR

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

    iQJhBAABCgBLFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmG3U3YtFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3Jnd3JhckBkZWJpYW4ub3JnAAoJEDNi9wMaSZLh 93EP/1mMygTvQ6QC+fDPGNQSSPnUaJQvgX9EuTjRZU9taEHleAN6/jSKxaqovEIR 5tI37pOfJPljcj+gCAqYiI0Sl4bBAtWe7iFfHh9eg4dM0IjXItU6FJq3viWZPLwP /rbHzkSYFYNBRpBVoTnAzTPo2mvx30kLqaKI3Yg4WpnfjHogig2Q4HQYydcss4AJ eI+/ACPvIRCICKsnhYSj72GGhRt4NjcPe0qoI6QpbTLRMdEEhbIICdq3nlw8MWZr 6qlgJQRBcro+NW0+v6zj7Lu3zPcE79EqJzynr6/v5Zdk1HXn4oVnTzklaK6qw2Yk bI3OZXmh8sQPYTbYmQtNZ9jkngoI5kmgZwjokcQNRvr44y86qpkI9Yyma5+U3BNE mD4z/90RK3I3TN6CtJxv0Owy0W/Rzz2SuhoBG6AhXGVF9jQ4VvdRHhWWKSfiyFAn Yf4GvUFlZGpGw1tYCJAOcHEjEFFag3pdGAUrkopVvGFH8PqKue2BpJ7L00NGt+EV 1kH8xVBLdxjIbM6nX6zX7TTn9NE86JMD2qD4s/VPESkkb6wmTJ7ijbbE8rPJP/Tk rwAsCYOcUxUCiwTgY5JpAwTTxH3w3+BjOcxuMn2+BaFv7QdOFW9JU0Euxp2RMu7D QQGkX8FACjv3lP3z+pqhdyZU2mv9vuJNVs9VayBbOl83+7+q
    =SCw4
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From maxzor@21:1/5 to All on Mon Dec 13 15:00:01 2021
    Hello,

    TL;DR Please consider reopening the following request for packaging : https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818180

    Skia library is monolithic, comparable to Cairo, and has become quite
    central
    in 2D graphics :
    it is used in Firefox, Chromium, so it ends up in Chrome,
    Electron-based software such as Atom, VSCode... LibreOffice...
    As far as I know, currently, each of these packages statically bundles
    its skia,
    which is often tens of MBs. The full Skia library build is 500MB.

    I don't know the history between Skia and GNU/Linux.
    It seems to me that Google is pretty neutral here. They do their thing
    with their Chrome, Android and Flutter branches, and do not actively
    sponsor
    the library towards GNU/Linux distributions.

    I believe that the effort of decoupling Skia from the upstream packages
    can be worth it. It could to allow more people to hear about the
    existence of
    the library in the first place, to study its algorithms,
    and maybe build upon them. There is tiny-skia in rust for example.
    Of course, decoupling skia and packaging it as a shared library
    could save storage space too.

    Building a static library on Bullseye is pretty straightforward
    with the instructions on Skia's website,
    https://skia.org/docs/user/download/
    it resembles, on a bullseye machine, to:

    ```bash
    #!/bin/bash
    apt install build-essential git python2 python llvm-11 llvm-11-dev
    clang-11 clang libvulkan-dev vulkan-tools
    git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git export PATH="${PWD}/depot_tools:${PATH}"
    git clone https://skia.googlesource.com/skia.git
    cd skia

    python2 tools/git-sync-deps
    tools/install_dependencies.sh
    mkdir out
    bin/gn gen out/clang11_unofficial_static --args'cc="clang" cxx="clang++" is_official_build=false'
    ninja -C out/clang11_unofficial_static

    #launching the demo viewer
    out/clang11_unofficial_static/viewer --resourcePath resources
    ```

    ... building a .so is more involved, I do have an issue with the dependency Harfbuzz, the text layout and shaper library.
    Its component harfbuzz-subset has been stabilized and released
    three months ago, it is not yet packaged in Debian,
    and is looked-for by the linker in git HEAD. Will try an older tag.
    I also have trouble getting the Vulkan backend to run on the free amdgpu driver:
    https://bugs.chromium.org/p/skia/issues/detail?id=12736

    I do not have the rights on the request mail server to unarchive the RFP.

    Down below is :
      - the ripgrep of a Skia struct, "SkCpu" on my system. Beat me to it,
        I have installed quite a lot of software outside of apt,
        sometimes proprietary. Still, there's a lot of Skia in here, and
    the heuristic
        to find where skia is statically bundled is far from perfect.
      - the irc.libera.chat discussion that spawned this mail

    Best regards, Maxime

    -------------------------------------------------------------------------------


    ```bash
    mada# whoami
    root
    mada# pwd
    /
    mada# rg -uuu -i -g '!{var/log/*,proc/*,sys/*,run/*,dev/*,home/maxzor/skia/*,*cquery_cached_index*}'
    -T{cpp,txt,log} SkCpu | grep "Binary file"
    Binary file opt/Element/element-desktop matches (found "\u{0}" byte
    around offset 7)
    Binary file opt/Sozi/Sozi matches (found "\u{0}" byte around offset 7)
    Binary file opt/BlueJeans/bluejeans-v2 matches (found "\u{0}" byte
    around offset 7)
    Binary file usr/lib/x86_64-linux-gnu/libQt5WebEngineCore.so.5.12.8
    matches (found "\u{0}" byte around offset 8)
    Binary file usr/share/discord/Discord matches (found "\u{0}" byte around
    offset 7)
    Binary file var/lib/mlocate/mlocate.db matches (found "\u{0}" byte
    around offset 0)
    Binary file usr/share/code/code matches (found "\u{0}" byte around offset 7) Binary file opt/google/chrome/chrome matches (found "\u{0}" byte around
    offset 7)
    Binary file var/lib/snapd/snaps/atom_281.snap matches (found "\u{0}"
    byte around offset 6)
    Binary file home/maxzor/Téléchargements/Telegram/Telegram matches (found "\u{0}" byte around offset 8)
    Binary file home/maxzor/.cache/Cypress/4.12.1/Cypress/Cypress matches
    (found "\u{0}" byte around offset 7)
    Binary file home/maxzor/Qt/5.14.0/gcc_64/lib/libQt5WebEngineCore.so.5.14.0.debug
    matches (found "\u{0}" byte around offset 8)
    Binary file home/maxzor/odoo/.git/objects/pack/pack-1214eae81df955baf62061658e62733a74577092.pack
    matches (found "\u{0}" byte around offset 4)
    Binary file snap/atom/281/usr/share/atom/atom matches (found "\u{0}"
    byte around offset 7)
    Binary file snap/spotify/56/usr/share/spotify/libcef.so matches (found
    "\u{0}" byte around offset 7)
    Binary file snap/chromium/1810/usr/lib/chromium-browser/chrome matches
    (found "\u{0}" byte around offset 7)
    Binary file home/maxzor/elk/kibana/.git/objects/pack/pack-1dc16e6c292416e9a1d79d2758c21457782106e6.pack
    matches (found "\u{0}" byte around offset 4)
    Binary file home/maxzor/.wine/drive_c/Program Files (x86)/PokerStars.FR/br/libcef.dll matches (found "\u{0}" byte around
    offset 3)
    Binary file snap/atom/281/usr/share/atom/resources/app.asar matches
    (found "\u{0}" byte around offset 1)
    Binary file home/maxzor/.config/Code/User/workspaceStorage/f8f177104bc523ac23c61fe16767beac/ms-vscode.cpptools/.browse.VC.db
    matches (found "\u{0}" byte around offset 15)
    Binary file home/maxzor/schedviz/node_modules/puppeteer/.local-chromium/linux-515411/chrome-linux/chrome
    matches (found "\u{0}" byte around offset 7)
    Binary file opt/BlueJeans/resources/app.asar.unpacked/node_modules/fiber-wrapper-node/dependencies/build/fiberclient/lib/libfiberclient.so
    matches (found "\u{0}" byte around offset 8)
    Binary file var/lib/docker/overlay2/6f13b5d8cbd355634ebe783c89d46e6f1f00e98ee2884b5df0cc435d99e0e652/diff/root/.cache/Cypress/5.3.0/Cypress/Cypress
    matches (found "\u{0}" byte around offset 7)
    ```

    -------------------------------------------------------------------------------


    <maxzor> Hello again, do you know why skia is not packaged?
    <somiaj> maxzor: assuming it meets the DSFG, it is often lack of someone volunteering to do the work
    <jkc> maxzor: Didn't you just ask this in #ubuntu?
    <maxzor> I did jkc, I was received... strangely
    <somiaj> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818180 -- hmm
    unsure why that bug was marked as done and archived, but there was an
    RFP bug for it a while ago. MAybe they close old RFP bugs if no one
    steps up since projects can die and not be needed. Also could be a
    library not needed by other things in debian.
    <judd> Bug https://bugs.debian.org/818180 in wnpp (closed): «RFP: skia
    -- graphics library»; severity: wishlist; opened: 2016-03-14; last
    modified: 2019-05-19.
    <maxzor> If I understood correctly, it is currently statically linked by chrome, firefox, libreoffice... and is 500MB
    <Khepra> Is that even intended for linux... no mention of linux here  https://skia.org/docs/user/build/
    <Khepra> GNU/Linux I mean
    <maxzor> it surely builds, I did it yesterday here on ubuntu 20.04, was
    not THAT hard. The only issue, that I found, is that the vulkan backend
    *seems* to need proprietary GPU drivers : https://bugs.chromium.org/p/skia/issues/detail?id=12736&sort=-id
    <Khepra> maxzor: does it build on debian?
    <maxzor> I'll fire up a bullseye VM, but can't see why it wouldn't
    <Khepra> why are you asking here then?
    <maxzor> what do you mean?
    <somiaj> also are you sure that the debian packages for firefox/libreoffice/chomrium actually enable this libary, could be that
    it just isn't used in debian's packages despite being used upstream.
    <Khepra> maxzor: I thought you were asking why it wasn't packged for debian <Khepra> and the question was does it even build, given required
    dependencies
    <maxzor> no I am not sure at all somiaj, that's what I asked first, if
    you knew why this library seemingly central to modern 2D was not
    packaged. Maybe does firefox have a cairo backend or something, I have
    no clue
    <somiaj> Unfourntally the only info I found is the RFC bug which was
    closed. Debian policy doesn't like static linked/bundeled libaries, so
    the fact it was closed and not built might mean it isn't needed for
    Debian. Though I can't give a definitive answer
    <Khepra> and that said, can it even be used in firefox unless it's part
    of the upstream source tarball?
    <somiaj> though the firefox-esr changelog metnions gfx/skia/... a bit,
    it could be something that isn't mean to be standa alone?
    <somiaj> It seems it comes as part of the firefox source, and maybe
    there is little insentitive to modify the source and make it use a
    shared libarary
    <maxzor>  it is in chromium sources aswell, so it ends up in qt sources... <maxzor> in atom, vscode, ... you know the drill
    <maxzor> it can compile as so, trying on the vm
    <somiaj> yea, this does seem unstandard, but it seems all upstreams are bundeling the source already, and it would require a lot of work for
    debian to extract it, remove it from all the upstream sources and turn
    it into a shared library (this is providing they even all use a
    compadiable version)
    <somiaj> you might be able to dig up some discussion in the mailing
    lists about this, but not finding much. Just seems this library is
    already being bundeled by upstreams, so the work to pull it out may not
    be worth it
    <maxzor> 5 CVEs a year for skia is all I found in the mailing lists indeed <maxzor> thank you for the inputs
    <jelly> I'm not sure closing a RFP like that is legit workflow
    <maxzor> will reopen and send to mailing list when it finishes building
    on debian
    <somiaj> maxzor: note you have to unarchive first

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)