Call for testing: snapcraft 2.43

Version 2.43 of the snapcraft CLI is now available for testing in these forms:

As a snap

The snap is available in the candidate channel:

$ sudo snap install --candidate --classic snapcraft

Of, if you already have it installed:

$ sudo snap refresh --candidate snapcraft

As a deb

The deb is in the proposed pocket of xenial and bionic, tracked by the SRU bug LP: #1787419. More information on testing the SRU is available at https://wiki.ubuntu.com/Testing/EnableProposed.

Docker

All risk levels of the snap are available as tagged Docker images, so check out the candidate tag:

$ docker pull snapcore/snapcraft:candidate

New in this release

The release notes are currently being drafted on https://github.com/snapcore/snapcraft/releases/tag/2.43 but here is a quick list of the new things to look forward to (the full list of changes can be inspected by heading over to the release milestone.

lifecycle cache

snapcraft now handles source and build changes transparently and re-runs steps accordingly. This new mode is enabled through configuration in this release (it will be the default in the next release). To enable it now open (or create) ~/.config/snapcraft/cli.cfg and add the following entry:

[Lifecycle]
outdated_step_action = clean

error reporting

Error reporting with sentry has been enabled by default. A prompt will be shown when unhandled errors occur.
With this, general clean up on the output has been made with regards to how tracebacks are shown.
The possibility of promptless reporting can be enabled through a feature flag, specifically by setting SNAPCRAFT_ENABLE_SILENT_REPORT to a truthful value (e.g.; on, true, …)

recording

The manifest.yaml for those with recording enabled now includes the version of snapcraft used to generate the build.

command line interface

The meaning of the --debug option for commands is not more snapcraft user oriented, this means that the output from using this option is not overly verbose.

Obtaining developer debugging information useful for a snapcraft developer itself is now toggled on through an environment variable, specifically by setting SNAPCRAFT_ENABLE_DEVELOPER_DEBUG to a truthful value (e.g.; on, true, …).

templates

The ground works for templates has already made it into this release. However, there are no templates yet, but it does allow any interested party in working with this new feature to start getting aqcuanted with the functionality.

User level facing features have made it to the command line interface through these snapcraft commands:

  • template: Show contents of template.
  • expand-templates: Display snapcraft.yaml with all templates applied.
  • templates: List available templates (it is currently missing its counterpart list-templates).

build providers

Many of these features are not user facing, nor are not fully integrate with the latest functionality worked on that would enable the consistent build environment feature. However, one of the features that users of the multipass build provider would notice when using the snap is that local snap injection is now done, providing for faster environment setups to create snaps.

Final notes

We would appreciate anyone trying out their common workloads with this release, and maybe some new ones as well!

2 Likes

Test builds of our snaps worked fine with this. Thanks!

2 Likes

I used this to build Kdenlive which build successfully, repeatedly in an 18.04 container.

2 Likes

I’ve not had the time to test this just yet. I’ll try building something now and report back :slight_smile:

ok, using SNAPCRAFT_BUILD_ENVIRONMENT=lxd on a cleaned project. No previous lxd container for the build present in the system.

$ snapcraft
DEPRECATED: The 'prepare' keyword has been replaced by 'override-build'
See http://snapcraft.io/docs/deprecation-notices/dn7 for more information.
Creating snapcraft-marsshooter
Device fuse added to snapcraft-marsshooter
Waiting for a network connection...
Network connection established
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]           
Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]                  
Get:5 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7532 kB]
Get:6 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [549 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [232 kB]      
Get:8 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [368 kB]       
Get:9 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [139 kB]       
Get:10 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3456 B]    
Get:11 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [1744 B]      
Get:12 http://archive.ubuntu.com/ubuntu xenial/universe Translation-en [4354 kB]                        
Get:13 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [144 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial/multiverse Translation-en [106 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [840 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [344 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [681 kB]
Get:18 http://archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [275 kB]
Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [16.4 kB]
Get:20 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse Translation-en [8344 B]
Get:21 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [6756 B]
Get:22 http://archive.ubuntu.com/ubuntu xenial-backports/main Translation-en [4180 B]
Get:23 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [7420 B]
Get:24 http://archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [3996 B]
Fetched 15.9 MB in 3s (5295 kB/s)                               
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libfreetype6
Use 'apt autoremove' to remove it.
The following NEW packages will be installed:
  squashfuse
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 17.4 kB of archives.
After this operation, 54.3 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 squashfuse amd64 0.1.100-0ubuntu1~ubuntu16.04.1 [17.4 kB]
Fetched 17.4 kB in 0s (403 kB/s)     
Selecting previously unselected package squashfuse.
(Reading database ... 25666 files and directories currently installed.)
Preparing to unpack .../squashfuse_0.1.100-0ubuntu1~ubuntu16.04.1_amd64.deb ...
Unpacking squashfuse (0.1.100-0ubuntu1~ubuntu16.04.1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up squashfuse (0.1.100-0ubuntu1~ubuntu16.04.1) ...
error: no changes of type "auto-refresh" found
Looking up assertion ['account-key', 'public-key-sha3-384=BWDEoaqyr25nF5SNCvEv2v7QnM9QsfCc0PBMYD_i2NGSQ32EF2d4D0hqUel3m8ul']
Looking up assertion ['snap-declaration', 'snap-name=core']
Looking up assertion ['snap-revision', 'snap-revision=5328', 'snap-id=99T7MUlRhtI3U0QFgl5mXXESAiSwt776']
Adding assertion core_5328.assert                                                                                                           
Installing /run/core_5328.snap                                                                                                         
core 16-2.35 from 'canonical' installed
Stopping local:snapcraft-marsshooter
Sorry, Snapcraft ran into an error when trying to running through its
lifecycle that generated a trace that has been put in '/tmp/tmp30v1rft3/trace.txt'.
You can anonymously report this issue to the snapcraft developers.
No other data than this traceback and the version of snapcraft in
use will be sent.
Would you like send this error data? (Yes/No/Always) [no]: yes
Thank you, sent.

The log contains:

Traceback (most recent call last):
  File "/snap/snapcraft/1803/bin/snapcraft", line 11, in <module>
    load_entry_point('snapcraft==2.43', 'console_scripts', 'snapcraft')()
  File "/snap/snapcraft/1803/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/snap/snapcraft/1803/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/snap/snapcraft/1803/lib/python3.5/site-packages/click/core.py", line 1043, in invoke
    return Command.invoke(self, ctx)
  File "/snap/snapcraft/1803/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/snap/snapcraft/1803/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/snap/snapcraft/1803/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/snap/snapcraft/1803/lib/python3.5/site-packages/snapcraft/cli/_runner.py", line 93, in run
    ctx.forward(lifecyclecli.commands["snap"])
  File "/snap/snapcraft/1803/lib/python3.5/site-packages/click/core.py", line 553, in forward
    return self.invoke(cmd, **kwargs)
  File "/snap/snapcraft/1803/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/snap/snapcraft/1803/lib/python3.5/site-packages/snapcraft/cli/lifecycle.py", line 136, in snap
    project = _execute(steps.PRIME, parts=[], **kwargs)
  File "/snap/snapcraft/1803/lib/python3.5/site-packages/snapcraft/cli/lifecycle.py", line 38, in _execute
    lifecycle.containerbuild(step.name, project_config, parts)
  File "/snap/snapcraft/1803/lib/python3.5/site-packages/snapcraft/internal/lifecycle/_containers.py", line 51, in containerbuild
    ).execute(command, args)
  File "/snap/snapcraft/1803/lib/python3.5/site-packages/snapcraft/internal/lxd/_containerbuild.py", line 241, in execute
    with self._container_running():
  File "/snap/snapcraft/1803/usr/lib/python3.5/contextlib.py", line 59, in __enter__
    return next(self.gen)
  File "/snap/snapcraft/1803/lib/python3.5/site-packages/snapcraft/internal/lxd/_containerbuild.py", line 90, in _container_running
    with self._ensure_started():
  File "/snap/snapcraft/1803/usr/lib/python3.5/contextlib.py", line 59, in __enter__
    return next(self.gen)
  File "/snap/snapcraft/1803/lib/python3.5/site-packages/snapcraft/internal/lxd/_containerbuild.py", line 112, in _ensure_started
    self._ensure_container()
  File "/snap/snapcraft/1803/lib/python3.5/site-packages/snapcraft/internal/lxd/_project.py", line 63, in _ensure_container
    self._inject_snapcraft(new_container=new_container)
  File "/snap/snapcraft/1803/lib/python3.5/site-packages/snapcraft/internal/lxd/_containerbuild.py", line 316, in _inject_snapcraft
    self._inject_snap("snapcraft", tmp_dir)
  File "/snap/snapcraft/1803/lib/python3.5/site-packages/snapcraft/internal/lxd/_containerbuild.py", line 351, in _inject_snap
    shutil.copyfile(installed, filepath)
  File "/snap/snapcraft/1803/usr/lib/python3.5/shutil.py", line 114, in copyfile
    with open(src, 'rb') as fsrc:
PermissionError: [Errno 13] Permission denied: '/var/lib/snapd/snaps/snapcraft_1803.snap'

This might be a snapd issue - the snapcraft snap on my host has been saved with root-only access:

$ ls -l /var/lib/snapd/snaps/snapcraft_1803.snap
-rw------- 2 root root 29302784 Aug 30 16:37 /var/lib/snapd/snaps/snapcraft_1803.snap
$ snap version
snap    2.35
snapd   2.35
series  16
neon    16.04
kernel  4.15.0-33-generic
$ snap info snapd
name:      snapd
summary:   Daemon and tooling that enable snap packages
publisher: Canonicalâś“
license:   unset
description: |
  Install, configure, refresh and remove snap packages. Snaps are
  'universal' packages that work across many different Linux systems,
  enabling secure distribution of the latest apps and utilities for
  cloud, servers, desktops and the internet of things.
  
  Start with 'snap list' to see installed snaps.
snap-id: PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4
channels:                                    
  stable:    –                               
  candidate: –                               
  beta:      2.35                 (754) 17MB -
  edge:      2.35+git560.g955a1d8 (787) 17MB -

Aside: Why are stable and candidate channels closed?

oops, that was snapd, not core:

$ snap info core
name:      core
summary:   snapd runtime environment
publisher: Canonicalâś“
contact:   snaps@canonical.com
license:   unset
description: |
  The core runtime environment for snapd
type:         core
snap-id:      99T7MUlRhtI3U0QFgl5mXXESAiSwt776
tracking:     stable
refresh-date: yesterday at 23:06 BST
channels:                                       
  stable:    16-2.35                (5328) 92MB -
  candidate: 16-2.35                (5328) 92MB -
  beta:      16-2.35                (5328) 92MB -
  edge:      16-2.35+git940.75e9b53 (5390) 92MB -
installed:   16-2.35                (5328) 92MB core
1 Like

Using SNAPCRAFT_BUILD_ENVIRONMENT=lxd, any attempts at multiple builds will require cleaning the entire project -s pull before it will let you continue. This occurs on every attempt after the first. It complains about every project-defined part as being unclean:

$ snapcraft
Device /root/build_starruler2 removed from snapcraft-starruler2
Waiting for a network connection...
Network connection established
error: no changes of type "auto-refresh" found
Mounting /home/dllewellyn/Development/snapcraft/starruler2 into container
Device /root/build_starruler2 added to snapcraft-starruler2
Skipping pull desktop-glib-only (already ran)
Failed to reuse files from previous run: The 'pull' step of 'ensure-moddable' is out of date:
The source has changed on disk.
To continue, clean that part's 'pull' step by running `snapcraft clean ensure-moddable -s pull`.
Stopping local:snapcraft-starruler2

In the above paste I had not changed anything in that part. Cleaning the part leads to other parts, also unchanged, requiring to be cleaned. Several parts didn’t depend on any other part nor were they depended upon for any other part, yet still snapcraft moaned.

This file copy error of snaps is due to a snapd being released before our 2.43.1 was able to make it. We are behind on the 2.43.1 release given the review-tools conflict that just showed up today.

Are you using source: . in parts and making modifications there? That could do the trick, @kyrofa care to work with @diddledan on this one?

Thanks for taking a look @diddledan

no, it is literally re-building the same project with no changes whatsoever. e.g. if the previous build failed on the final part to be built, it will still complain about previous parts when you (I) attempt to rebuild just that final part.

I don’t seem to be able to recreate the scenario on a reduced testcase, though :frowning: maybe I was hallucinating…

ok, now I’m seeing this within the same build attempt! i.e. it builds alsa then complains later-on that alsa needs cleaning. During the same snapcraft run.

This is on a freshly cleaned tree:

Staging alsa-plugins 
Pulling alsa 
Hit http://archive.ubuntu.com/ubuntu xenial InRelease                                                                                               
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]                                                                            
Hit http://archive.ubuntu.com/ubuntu xenial-backports InRelease                                                                                     
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]                                                                          
Fetched 216 kB in 0s (0 B/s)                                                                                                                        
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]                                                                          
Hit http://archive.ubuntu.com/ubuntu xenial InRelease                                                                                               
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]                                                                            
Hit http://archive.ubuntu.com/ubuntu xenial-backports InRelease                                                                                     
Fetched 216 kB in 0s (0 B/s)                                                                                                                        
Pulling desktop-qt5 
Cloning into '/root/build_mycroft/parts/desktop-qt5/src'...
remote: Counting objects: 1195, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 1195 (delta 4), reused 8 (delta 2), pack-reused 1179
Receiving objects: 100% (1195/1195), 210.06 KiB | 0 bytes/s, done.
Resolving deltas: 100% (619/619), done.
Checking connectivity... done.
Pulling patches 
'mimic' has dependencies that need to be staged: patches
Skipping pull patches (already ran)
Building patches 
Staging patches 
Hit http://archive.ubuntu.com/ubuntu xenial InRelease                                                                                               
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]                                                                            
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]                                                                          
Hit http://archive.ubuntu.com/ubuntu xenial-backports InRelease                                                                                     
Fetched 216 kB in 0s (0 B/s)                                                                                                                        
Pulling mimic 
Cloning into '/root/build_mycroft/parts/mimic/src'...
remote: Counting objects: 462, done.
remote: Compressing objects: 100% (390/390), done.
remote: Total 462 (delta 200), reused 180 (delta 64), pack-reused 0
Receiving objects: 100% (462/462), 438.82 MiB | 8.69 MiB/s, done.
Resolving deltas: 100% (200/200), done.
Checking connectivity... done.
Checking out files: 100% (418/418), done.
patching file configure.ac
'mpg123' has dependencies that need to be staged: alsa
Failed to reuse files from previous run: The 'pull' step of 'alsa' is out of date:
The source has changed on disk.
To continue, clean that part's 'pull' step by running `snapcraft clean alsa -s pull`.
Stopping local:snapcraft-mycroft
1 Like

@lucyllewy can I see the snapcraft.yaml you’re using, please?

this is the one from the log output above. I’ve not modified it since that log was taken. The build will likely fail before completion the first attempt to run due to bugs in my build process (VLC doesn’t like Protobuf) but you can retry the build to see the snapcraft error with prompting to clean parts that should not have changed.

name: mycroft
version: latest
version-script: |
  cat $SNAPCRAFT_STAGE/mycroft-source/.version | sed -e 's|release/v||'
icon: snap/gui/mycroft.png
summary: Your AI personal assistant!
description: >
  Mycroft is a free and open-source intelligent personal assistant and knowledge
  navigator for Linux-based operating systems that uses a natural language user
  interface. It is the world’s first fully open-source AI voice assistant.

  Mycroft is named after a fictional computer from 1966 science fiction novel
  "The Moon Is a Harsh Mistress".

  Installing skills by voice seems to be broken for now, but you can use
  the `mycroft.msm` command to list, install, and remove skills.

grade: stable
confinement: strict

parts:
  alsa:
    after: [alsa-lib, alsa-plugins]
  alsa-lib:
    # configflags needed until LP#1766878 is fixed
    configflags:
    - --prefix=/usr
    - --sysconfdir=/etc
    - --libexec=/usr/lib
    - --libdir=/usr/lib
    - --localstatedir=/var
    - --with-configdir=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr/share/alsa
    - --with-plugindir=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr/lib/alsa-lib
    - --disable-alisp
    - --disable-aload
    - --disable-python
    - --disable-rawmidi
    - --disable-static
    - --disable-topology
    - --disable-ucm
    - --enable-symbolic-functions
    prime: ['*']
  alsa-plugins:
    after: [alsa-lib]
    # configflags needed until LP#1766878 is fixed
    configflags:
    - --prefix=/usr
    - --sysconfdir=/etc
    - --libexec=/usr/lib
    - --libdir=/usr/lib
    - --localstatedir=/var
    - --disable-arcamav
    - --disable-avcodec
    - --disable-jack
    - --disable-mix
    - --disable-oss
    - --disable-usbstream
    - --with-plugindir=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr/lib/alsa-lib
    - --disable-static
    - LDFLAGS=-L$SNAPCRAFT_STAGE/usr/lib
    prime: ['*']

  patches:
    source: patches
    plugin: dump
    prime:
    - msm-skillsdir.diff
    - mycroft-cache.diff

  scripts:
    source: scripts
    source-type: local
    plugin: dump
    override-pull: |
      snapcraftctl pull
      chmod +x mycroft-launch
    organize:
      mycroft-launch: bin/mycroft-launch

  mimic:
    after: [patches]
    plugin: autotools
    source: https://github.com/MycroftAI/mimic.git
    source-depth: 1
    configflags:
    - --prefix=/usr
    - --disable-static
    - --with-audio=pulseaudio
    override-pull: |
      snapcraftctl pull
      patch -Np1 < $SNAPCRAFT_STAGE/mimic-pulseaudio.diff
    build-packages:
    - libpcre2-dev
    - libpulse-dev
    stage-packages:
    - libpcre2-8-0
    - libpulse0

  portaudio:
    after: [alsa]
    source: http://www.portaudio.com/archives/pa_stable_v190600_20161030.tgz
    plugin: cmake
    configflags:
    - -DCMAKE_INSTALL_PREFIX=/usr
    - -DPA_USE_ALSA=ON
    - -DPA_USE_JACK=ON
    build-packages:
    - libjack-dev
    stage-packages:
    - libjack0

  mpg123:
    after: [alsa]
    source: http://sourceforge.mirrorservice.org/m/mp/mpg123/mpg123/1.25.10/mpg123-1.25.10.tar.bz2
    plugin: autotools
    configflags:
    - --prefix=/usr
    - --disable-static
    - --with-default-audio=pulse
    build-packages:
    - libpulse-dev
    stage-packages:
    - libpulse0

  vlc:
    after: [alsa, mpg123, portaudio]
    source: https://download.videolan.org/pub/videolan/vlc/3.0.3/vlc-3.0.3.tar.xz
    source-checksum: sha256/9ba8b04bdb13f7860a2041768ac83b47b397a36549c71c530b94028a3cfd5b51
    plugin: autotools
    override-pull: |
      snapcraftctl pull
      sed -i 's|0\.19\.8|0\.19\.7|'  configure.ac
    override-build: |
      cd extras/tools
      ./bootstrap
      make -j$SNAPCRAFT_PARALLEL_BUILD_COUNT .protoc
      # make -j$SNAPCRAFT_PARALLEL_BUILD_COUNT .nasm
      cd ../../
      export PATH=$PWD/extras/tools/build/bin:$PATH
      cd contrib && mkdir linux && cd linux
      ../bootstrap \
        --disable-a52 \
        --disable-chromaprint \
        --disable-dca \
        --disable-disc \
        --disable-ebml \
        --disable-fluid \
        --disable-fontconfig \
        --disable-freetype2 \
        --disable-gettext \
        --disable-glib \
        --disable-gnutls \
        --disable-gpg-error \
        --disable-jack \
        --disable-jpeg \
        --disable-libdsm \
        --disable-libxml2 \
        --disable-lua \
        --disable-matroska \
        --disable-mfx \
        --disable-modplug \
        --disable-mpcdec \
        --disable-mpg123 \
        --disable-mysofa \
        --disable-ncurses \
        --disable-png \
        --disable-qt \
        --disable-srt \
        --disable-tiff \
        --disable-tiger \
        --disable-tremor \
        --disable-upnp \
        --disable-vncclient \
        --disable-xcb \
        --disable-xcb-proto \
        --disable-xorg-macros \
        --disable-xproto \
        --disable-zlib \
        --disable-zvbi
      make -j$SNAPCRAFT_PARALLEL_BUILD_COUNT fetch
      make -j$SNAPCRAFT_PARALLEL_BUILD_COUNT
      make install
      cd ../../
      ./configure \
        --prefix=$SNAPCRAFT_PART_INSTALL/usr \
        --enable-merge-ffmpeg \
        --disable-a52
      make -j$SNAPCRAFT_PARALLEL_BUILD_COUNT
      make install
    build-packages:
    - ant
    - autoconf
    - automake
    - bison
    - build-essential
    - cmake
    - curl
    - flex
    - g++
    - gettext
    - git
    - libavahi-client-dev
    - libcdio-dev
    - libdbus-1-dev
    - libdirectfb-dev
    - libebml-dev
    - libfreerdp-dev
    - libfreetype6-dev
    - libfribidi-dev
    - libglib2.0-dev
    - libgnutls28-dev
    - libidn11-dev
    - libjpeg8-dev
    - libjack-dev
    - liblircclient-dev
    - liblua5.2-dev
    - libmatroska-dev
    - libmtp-dev
    - libncursesw5-dev
    - libpng-dev
    - libpulse-dev
    - librsvg2-dev
    - libsecret-1-dev
    - libtool
    - libtool-bin
    - libudev-dev
    - libupnp-dev
    - libv4l-dev
    - libva-dev
    - libvdpau-dev
    - libwayland-dev
    - libx11-dev
    - libxcb-composite0-dev
    - libxcb-keysyms1-dev
    - libxcb-randr0-dev
    - libxcb-shm0-dev
    - libxcb-xfixes0-dev
    - libxcb-xv0-dev
    - libxcb1-dev
    - libxext-dev
    - libxi-dev
    - libxinerama-dev
    - libxkbcommon-x11-dev
    - libxml2-dev
    - libxpm-dev
    - libzvbi-dev
    - lua5.2
    - make
    - pkg-config
    - ragel
    - wayland-protocols
    - xz-utils
    - yasm
    - zlib1g-dev
    stage-packages:
    - breeze-icon-theme
    - dbus-x11
    - fonts-freefont-ttf
    - frameworkintegration
    - libebml4v5
    - libfreerdp-client1.1
    - libfreerdp-core1.1
    - libfreerdp-gdi1.1
    - libfreetype6
    - libfribidi0
    - libgcc1
    - libglib2.0-0
    - libjack0
    - libjpeg8
    - liblua5.2-0
    - libmatroska6v5
    - libmtp9
    - libnotify4
    - libpulse0
    - librsvg2-2
    - libschroedinger-1.0-0
    - libsecret-1-0
    - libupnp6
    - libva-drm1
    - libva-x11-1
    - libva1
    - libvdpau1
    - libwayland-client0
    - libx11-6
    - libxcb-composite0
    - libxcb-keysyms1
    - libxcb-randr0
    - libxcb-shm0
    - libxcb-xv0
    - libxcb1
    - libxext6
    - libxi6
    - libxinerama1
    - libxkbcommon-x11-0
    - libxpm4
    - libzvbi0
    - mesa-utils
    - mesa-vdpau-drivers
    - vdpau-va-driver
    - zlib1g

  mycroft-deps:
    after:
    - alsa
    - mimic
    - mpg123
    - patches
    - portaudio
    - vlc
    plugin: nil
    stage-packages:
    - libgdk-pixbuf2.0-0 # yad
    - libgtk-3-0         # yad
    - libfreetype6       # yad
    - libfontconfig1     # yad
    - libnotify4         # yad
    - libnotify-bin
    - yad
    - bison
    - build-essential
    - coreutils
    - curl
    - flac
    - git
    - jq
    - libc6
    - libfann-dev
    - libffi-dev
    - libgcc1
    - libglib2.0-dev
    - libicu-dev
    - libjpeg-dev
    - libpcre3
    - libssl-dev
    - locales-all
    - pulseaudio-utils
    - python-gobject-2-dev
    - python-setuptools
    - python3-dev
    - rsync
    - swig
    - zlib1g

  mycroft:
    source: https://github.com/MycroftAI/mycroft-core.git
    plugin: dump
    override-pull: |
      snapcraftctl pull
      git checkout $(git describe --tags --abbrev=0 --match release/v*)
      git describe --tags > .version
    organize:
      '*': mycroft-source/
      '.*.yml': mycroft-source/
      '.coveralls': mycroft-source/.coveralls
      '.version': mycroft-source/.version
      '.git*': mycroft-source/

  mycroft-plasma:
    after: [desktop-qt5]
    source: https://anongit.kde.org/plasma-mycroft.git
    plugin: cmake
    configflags:
    - -DCMAKE_INSTALL_PREFIX=/usr
    - -DCMAKE_BUILD_TYPE=Release
    - -DKDE_INSTALL_LIBDIR=lib
    - -DKDE_INSTALL_USE_QT_SYS_PATHS=on
    override-build: |
      snapcraftctl build
      chmod +x usr/share/plasma/plasmoids/org.kde.plasma.mycroftplasmoid/contents/code/*service.sh


apps:
  mycroft:
    command: alsa-launch mycroft-launch start-all
    plugs:
    - desktop
    - desktop-legacy
    - network
    - network-bind
    - pulseaudio
    - x11
    - wayland

  msm:
    command: mycroft-launch python3 "$SNAP_USER_COMMON/mycroft/.venv/bin/msm"
    plugs:
    - desktop
    - desktop-legacy
    - network
    - network-bind
    - pulseaudio
    - x11
    - wayland

  cli:
    command: mycroft-launch python3 -m mycroft.client.text
    plugs:
    - desktop
    - desktop-legacy
    - network
    - x11
    - wayland

  bus:
    command: mycroft-launch python3 -m mycroft.messagebus.service
    plugs:
    - desktop
    - desktop-legacy
    - network
    - network-bind
    - x11
    - wayland

  skills:
    command: mycroft-launch python3 -m mycroft.skills
    plugs:
    - desktop
    - desktop-legacy
    - network
    - x11
    - wayland

  audio:
    command: alsa-launch mycroft-launch python3 -m mycroft.audio
    plugs:
    - desktop
    - desktop-legacy
    - network
    - pulseaudio
    - x11
    - wayland

  voice:
    command: alsa-launch mycroft-launch python3 -m mycroft.client.speech
    plugs:
    - desktop
    - desktop-legacy
    - network
    - pulseaudio
    - x11
    - wayland

@lucyllewy any chance you can come up with a minimal reproducer? I can’t seem to create an example that breaks in this manner. Either that, or can you give me a link to your entire project (since the YAML has many local sources)?

The code is now pushed to:

1 Like

This has made it to a release

1 Like

Could bug #1790819 be a regression?

1 Like

yes Olivier, it is a regression in that it worked before even if we did not really support it, 2.44 should have it fixed.

1 Like

I’m seeing the same issue as @lucyllewy. All builds of the chromium snap now fail on launchpad:

Failed to reuse files from previous run: The 'pull' step of 'launcher' is out of date:
The source has changed on disk.
To continue, clean that part's 'pull' step by running `snapcraft clean launcher -s pull`.
Build failed

See e.g. https://code.launchpad.net/~chromium-team/+snap/chromium-snap-dev/+build/329874.

This is the corresponding snapcraft.yaml. It hasn’t changed significantly since the last successful build (only bumped the version number, which is what triggered the new failed builds), so it looks like this might be a snapcraft regression.

So the problem I was seeing with alsa seemingly changing on disk during a build. Well this was a doozy. It turns out that VSCode was/is changing the timestamp on the .git folder of the project (where snap/snapcraft.yaml lives) the moment it detects that files within the project folder have been altered in some way (such as files within parts/<partname>/build while snapcraft builds stuff). This appears to be part of VSCode’s git-changes tracking feature. Only the timestamp of the .git folder is changed, with no changes to files or folders within. The reason it affected the alsa part specifically is because that part does not specify a source and therefore snapcraft defaults it to mean the ./ folder.

Unfortunately this doesn’t help with launchpad builds seemingly behaving in the same weird way, as VSCode probably isn’t running on the launchpad builder :wink: .

1 Like