Please test my asciinema snap

Sergio Schvezov sergio.schvezov at canonical.com
Wed Jan 18 12:54:31 UTC 2017


On Wed, 18 Jan 2017 11:41:49 +0000, Dave Morley wrote:
> On Wed, 18 Jan 2017 04:16:45 -0500
> Mark Shuttleworth <mark at ubuntu.com> wrote:
>
>> Hi folks
>> 
>> (For those of you who Gmail does not filter this email on
>> as-yet-unexplained-grounds :))
>> 
>> Please could you test my asciinema snap? Asciinema is a console video
>> recording utility that's great for CLI-diven demos. If you want to
>> make a quick web video of a CLI / console journey, asciinema is the
>> ticket.
>> 
>> An older version (0.9.8) is in 16.04. The new 1.3.0 version is now a
>> snap, and it should work on 16.04. I am also interested in feedback on
>> 14.04 for those of you on Trusty steeds who are blazing the
>> snaps-on-trusty trail.
>> 
>> It's a 'classic-only' snap, so you need:
>> 
>>   sudo snap install --classic asciinema
>> 
>> Then 'asciinema rec' starts a recording session, and you're off to the
>> races.
>> 
> Not so happy on 14.04 paste.ubuntu.com/23821653/ I get a segfault :(

Looking at the snap itself, I see it is python3 and using the in-core python3 which leads to

$ readelf -a /snap/core/current/usr/bin/python3 |grep INTERP -A2
  INTERP         0x0000000000000238 0x0000000000400238 0x0000000000400238
                 0x000000000000001c 0x000000000000001c  R      1
      [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]

`stage-packages` that provide runnables will also have this problem; the solution is to use a python3 part (Zygmunt is working on some python parts, he started with python0 though).

/brainstorming-mode on
It would be interesting to bring back the snapcraft concept of `provides` which has plugin specific meaning, here's an example (made up sources):

parts:
    python3:
        source: https://python.org/python3.tar.gz
        plugin: autotools
        provides: [python3]
        environment:
            PYTHONUSERBASE: ...
            PYTHONHOME: ...
    asciinema:
        source: https://sourceforge.org/asciinema.tar.gz
        plugin: python
        after: [python3]

How will this work, in the general scenario, the `python` plugin will just use its built in logic to obtain python3 (which is through use of `stage-packages`) but given that the part comes `after` the `python3` part and that `python3` part provides `python3` the plugin will no fetch python3 and use the defined `environment` to work it out.

Then again, this might be all to complex and a custom plugin that overrides the `python` plugin's `pull` step might be an easier concept. But here is another option:

parts:
    python3:
        source: https://python.org/python3.tar.gz
        plugin: autotools
    asciinema:
        source: https://sourceforge.org/asciinema.tar.gz
        plugin: python
        environment:
            PYTHONUSERBASE: $SNAPCRAFT_STAGE
        after: [python3]
        stage:
            - -$python3-runtime  # defined in filesets
        filesets:
            python-runtime: [ .... ]

Other ideas anyone?

-- 
Sent using Dekko from my Ubuntu device




More information about the Snapcraft mailing list