1

I'm attempting to make a snap for this project, which has proven to be quite a challenge. I've had to write no less than 3 custom plugins, but at this point all parts do finish staging. After staging everything, though, snapcraft fails with the error in the topic.

Here's my snapcraft.yaml:

name: stakeweightedvoting-app
version: "0.1"
summary: A blockchain-based secure voting and polling application
description: Stake Weighted Voting is Follow My Vote's application for stake-weighted voting on a blockchain. The app allows users to create and vote on polls on a blockchain, and securely tallying and displaying the results to ensure that no fraud can occur undetected.
confinement: devmode

apps:
  VotingApp:
    # If this actually works, I'll eat my hat. Can't fix it until I can build a snap, though...
    command: . $SNAP/opt/qt57/bin/qt57-env.sh && VotingApp

parts:
  stakeweightedvoting:
    plugin: x-qbs
    source: git://github.com/followmyvote/stakeweightedvoting
    source-branch: master
    build-packages: [qt57base, qt57declarative, qt57charts-no-lgpl, qt57quickcontrols2, qt57websockets, qt57svg, python-yaml]
    after: [botan, capnproto]
  capnproto:
    plugin: x-nonbroken-cmake
    source: git://github.com/sandstorm-io/capnproto
    # Ideally I would specify v0.5.3 here, but it no longer builds without tweaking, and I don't know how to apply patches in snapcraft
    source-branch: master
    source-subdir: c++
  botan:
    plugin: x-botan
    source: http://botan.randombit.net/releases/Botan-1.11.31.tgz

The full output of snapcraft:

dev@ubuntu-dev:~/swv$ snapcraft
"grade" property not specified: defaulting to "stable"
Searching for local plugin for x-nonbroken-cmake
Searching for local plugin for x-botan
Searching for local plugin for x-qbs
Skipping pull botan (already ran)
Skipping pull capnproto (already ran)
'stakeweightedvoting' has prerequisites that need to be staged: capnproto botan
Skipping pull capnproto (already ran)
Skipping pull botan (already ran)
Skipping build capnproto (already ran)
Skipping build botan (already ran)
Skipping stage capnproto (already ran)
Skipping stage botan (already ran)
Skipping pull stakeweightedvoting (already ran)
Skipping build botan (already ran)
Skipping build capnproto (already ran)
'stakeweightedvoting' has prerequisites that need to be staged: capnproto botan
Skipping pull capnproto (already ran)
Skipping pull botan (already ran)
Skipping build capnproto (already ran)
Skipping build botan (already ran)
Skipping stage capnproto (already ran)
Skipping stage botan (already ran)
Skipping build stakeweightedvoting (already ran)
Skipping stage botan (already ran)
Skipping stage capnproto (already ran)
'stakeweightedvoting' has prerequisites that need to be staged: capnproto botan
Skipping pull capnproto (already ran)
Skipping pull botan (already ran)
Skipping build capnproto (already ran)
Skipping build botan (already ran)
Skipping stage capnproto (already ran)
Skipping stage botan (already ran)
Skipping stage stakeweightedvoting (already ran)
Skipping prime botan (already ran)
Skipping prime capnproto (already ran)
'stakeweightedvoting' has prerequisites that need to be staged: capnproto botan
Skipping pull capnproto (already ran)
Skipping pull botan (already ran)
Skipping build capnproto (already ran)
Skipping build botan (already ran)
Skipping stage capnproto (already ran)
Skipping stage botan (already ran)
Skipping prime stakeweightedvoting (already ran)
[Errno 21] Is a directory: '/home/dev/swv/prime/.'

I can provide the sources to the three custom plugins, but none of them override anything after the build step, so I'm omitting them for now.

I found this bug which is probably what I'm seeing, but the workaround didn't work for me.

1 Answer 1

2

command: . $SNAP/opt/qt57/bin/qt57-env.sh && VotingApp wouldn't work as you need to provide an actual file withing the snap directory and . is the result of the error you get.

You can however write your own wrapper script:

#!/bin/sh

source $SNAP/opt/qt57/bin/qt57-env.sh

exec VotingApp $*

and have that as the command entry.

Do something similar to the tomcat demo with wrapper (but you don't need a Makefile, just use the dump plugin` as shown in the mosquito demo)

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .