Stuck pulling a source that is in the filesystem

  • snapcraft.yaml
name: chromium-ffmpeg
version: "0.1"
summary: FFmpeg codecs (free and proprietary) for use by third-party browser snaps
description: |
 This package provides a chromium-ffmpeg content interface that third-party
 browser snaps can connect to to get access to a host of proprietary codecs for
 web content that they might not be allowed to redistribute themselves.
confinement: strict
base: core18

  chromium-ffmpeg-111306: # chromium 114.0.5720.4
    interface: content
        - $SNAP/chromium-ffmpeg-111306/chromium-ffmpeg

    plugin: dump
    source: build
      '*' : build/
    override-prime: ""
  chromium-ffmpeg-111306: # chromium 114.0.5720.4
    after: [build]
    plugin: nil
    source: ./chromium-114.0.5720.4/
    source-type: local
      - clang-10
      - libatk1.0-dev
      - libatk-bridge2.0-dev
      - libcups2-dev
      - libevdev-dev
      - libgbm-dev
      - libglib2.0-dev
      - libgtk-3-dev
      - libnss3-dev
      - libpango1.0-dev
      - llvm-10
      - mesa-common-dev
      - ninja-build
      - python3
      - quilt
    override-build: |
      set -eux
      rm -rf $SNAPCRAFT_PART_SRC/*
      QUILT_PATCHES=$SNAPCRAFT_STAGE/build/$VERSION/patches quilt push -a
      CC=clang-10 CXX=clang++-10 AR=llvm-ar-10 python3 tools/gn/bootstrap/ --skip-generate-buildfiles
      mkdir -p $OUT
      out/Release/gn gen $OUT
      ninja -C $OUT
      mkdir -p $DEST
      cp $OUT/ $DEST/
      rm -rf *
  • Source tree:
% ls -la
total 32
drwxrwxr-x  5 nteodosio nteodosio  4096 mai 26 15:14 .
drwxr-xr-x 13 nteodosio nteodosio 12288 mai 26 11:23 ..
drwxrwxr-x  7 nteodosio nteodosio  4096 mai 26 14:52 build
drwxr-xr-x 56 nteodosio nteodosio  4096 mai 26 12:30 chromium-114.0.5720.4
drwxrwxr-x  8 nteodosio nteodosio  4096 mai 26 15:27 .git
-rw-rw-r--  1 nteodosio nteodosio  1722 mai 26 15:14 snapcraft.yaml
  • Try a build:
% snapcraft build --verbose --debug --use-lxd
Starting Snapcraft 7.3.2
Logging execution to '/home/nteodosio/.local/state/snapcraft/log/snapcraft-20230526-151454.763142.log'
Launching a container.
Waiting for container to be ready
Waiting for network to be ready...
Updating pull step for build (source changed)
+ snapcraftctl pull
'chromium-ffmpeg-111306' has dependencies that need to be staged: build
Skipping pull build (already ran)
Updating build step for build ('pull' step changed)
+ snapcraftctl build
Cleaning later steps and re-staging build
+ snapcraftctl stage
Pulling chromium-ffmpeg-111306
+ snapcraftctl pull

It’s stuck there for at least 20 min already, which is weird because it doesn’t need to download or unpack the source, it’s right there in the source tree.

What could be delaying Snapcraft here?

To keep track of the files there’s a link-or-copy logic that is triggered. This may be a large source tree issue, we have had the same from kernel trees.

I can confirm, it is very large (15 GB.)