Giter VIP home page Giter VIP logo

snapcore / snapcraft Goto Github PK

View Code? Open in Web Editor NEW
1.2K 42.0 441.0 30.9 MB

Package, distribute, and update any app for Linux and IoT.

Home Page: https://snapcraft.io

License: GNU General Public License v3.0

Shell 1.07% Python 96.60% Makefile 0.20% C 0.17% CMake 0.61% Go 0.21% JavaScript 0.01% C++ 0.74% Rust 0.01% M4 0.01% Meson 0.01% Dockerfile 0.07% QMake 0.01% Crystal 0.01% PowerShell 0.01% Inno Setup 0.15% Perl 0.05% Dart 0.11% Java 0.01%
snaps

snapcraft's Introduction

snapcraft Build Status Documentation Status Scheduled spread tests Coverage Status Code style: black

Snapcraft

Package, distribute, and update any app for Linux and IoT.

Snaps are containerised software packages that are simple to create and install. They auto-update and are safe to run. And because they bundle their dependencies, they work on all major Linux systems without modification.

Build your first snap or learn more about how Snapcraft can help you.

Get support

We’re here to help. Ask your questions at the Snapcraft Forum. Report bugs on Launchpad.

Learn about the latest features by following Snapcraft on Twitter or Facebook.

Contribute to Snapcraft

We love contributors. Read the hacking guide if you're interested in helping out.

snapcraft's People

Contributors

3v1n0 avatar artivis avatar bjornt avatar cjwatson avatar cmatsuoka avatar come-maiz avatar cprov avatar dependabot[bot] avatar guillaumebeuzeboc avatar jhenstridge avatar jocave avatar josepht avatar kalikiana avatar kenvandine avatar kyrofa avatar lengau avatar lool avatar merlijn-sebrechts avatar mikix avatar mr-cal avatar mvo5 avatar piso77 avatar renovate[bot] avatar scarlettgatelymoore avatar sergiusens avatar syu-w avatar ted-gould avatar tigarmo avatar zenharbinger avatar zyga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

snapcraft's Issues

python based package created using external symlink

When creating a snap package based on python2, the package is successfully built, but upon uploading it to the store, the review checks fail with

package contains external symlinks: /tmp/clickreview-kb8ua64p/usr/lib/python2.7/site-packages lint_external_symlinks

Attached are the files necessary to reproduce the build

Launchpad Details: #LP1511440 Ricardo Kirkner - 2015-10-29 12:46:39 -0300

plugin methods return True

It seems to be that on the plugin methods we are returning True to signal that everything went well.
I think it will be better to return nothing in case of success, or the artifact generated in case it's needed for other steps.
In case of error, we raise an exception.

Launchpad Details: #LP1481122 Leo Arias - 2015-08-03 21:27:58 -0300

qml plugin: make it combinable with apps which use other build systems to install their files

Alan put together a branch which builds lp:music-app using the cmake plugin (https://bazaar.launchpad.net/~popey/+junk/music-app-snap/view/head:/snapcraft.yaml). This works just fine, but a lot of dependencies are not bundled, so I tried to use the qml plugin. This works fine, but the music-app expects some files in the right place (like translations), for which it uses cmake.

Trying to use both (snapcraft.yaml snippet below), you run into the problem that both try to install the same files (the qml plugin installs * - https://bazaar.launchpad.net/~snappy-dev/snapcraft/core/view/head:/snapcraft/plugins/qml.py#L67), which breaks the build. Maybe the qml plugin could be more selective in what exactly it tries to bundle?

parts:
music-build:
plugin: cmake
source: https://launchpad.net/music-app
source-type: bzr
snap:
- icon.png
music-app:
plugin: music-qml
after: music-build

Launchpad Details: #LP1510008 Daniel Holbach - 2015-10-26 06:29:45 -0300

mode preservation leading to confinement denial

when using deb2snap we hit an issue where files were copied and the copy process was hitting a denial, the fix was:
denial on lchown - FIXED in deb2snap as of 2015/07/16
=== modified file 'deb2snap'
--- deb2snap 2015-06-09 18:12:56 +0000
+++ deb2snap 2015-06-23 19:53:57 +0000
@@ -321,7 +321,7 @@

if [ -n "$OVERLAY_DIR" ]; then
OVERLAY_TMP=$(mktemp -dt snap.XXXXXXXXXX)

  • cp -rp "$OVERLAY_DIR"/* "$OVERLAY_TMP"
  • cp -dR --preserve=mode "$OVERLAY_DIR"/* "$OVERLAY_TMP"
    find "$OVERLAY_TMP" -type f -exec sh -c "file {} | grep text >/dev/null && sed -i 's/@Package@/$PACKAGE_NAME/g;s/@Version@/$VERSION/g;s/@arch@/$ARCH/g' {}" ;
    cp -rp "$OVERLAY_TMP"/* "$ROOT"
    rm -rf "$OVERLAY_TMP"

snapcraft/plugins/copy.py has (line 34ff)
if not os.path.exists(dst_dir):
os.makedirs(dst_dir)
res &= self.run(["cp", "--preserve=all", "-R", src, dst], cwd=os.getcwd())
return res

which seems to potentially suffer from a similar rejection

Launchpad Details: #LP1477902 Olli Ries - 2015-07-24 06:06:55 -0300

java-hello-world example fails to snap on vivid: Operation not permitted: '/home/elopio/workspace/canonical/snapcraft/trunk/examples/java-hello-world/parts/local/install/sbin/mount.ntfs'

When I tried to build the java-hello-world example on vivid, I got:

Failed doing pull for local: [Errno 1] Operation not permitted: '/home/elopio/workspace/canonical/snapcraft/trunk/examples/java-hello-world/parts/local/install/sbin/mount.ntfs'

To reproduce:
bzr branch lp:snapcraft
cd snapcraft/examples/java-hello-world
./../../bin/snapcraft assemble

DEPRECATED: Use "plugin" instead of "type"
DEPRECATED: plugin names ending in -project are deprecated. Using ant instead of ant-project
DEPRECATED: Use "plugin" instead of "type"
DEPRECATED: plugin names ending in -project are deprecated. Using make instead of make-project
Pulling wrapper
Building wrapper
make
make: Nothing to be done for 'all'.
make install DESTDIR=/home/elopio/workspace/canonical/snapcraft/trunk/examples/java-hello-world/parts/wrapper/install
install -d -m755 /home/elopio/workspace/canonical/snapcraft/trunk/examples/java-hello-world/parts/wrapper/install/bin/
install -m755 wrapper /home/elopio/workspace/canonical/snapcraft/trunk/examples/java-hello-world/parts/wrapper/install/bin/wrapper
Staging wrapper
Snapping wrapper
Pulling local
Hit http://security.ubuntu.com vivid-security InRelease
Hit http://archive.ubuntu.com vivid InRelease
Get:1 http://security.ubuntu.com vivid-security/main amd64 Packages [124 kB]
Hit http://archive.ubuntu.com vivid-updates InRelease
Get:2 http://security.ubuntu.com vivid-security/restricted amd64 Packages [10.4 kB]
Get:3 http://security.ubuntu.com vivid-security/universe amd64 Packages [58.0 kB]
Get:4 http://security.ubuntu.com vivid-security/multiverse amd64 Packages [5195 B]
Hit http://security.ubuntu.com vivid-security/main Translation-en
Hit http://security.ubuntu.com vivid-security/multiverse Translation-en
Hit http://security.ubuntu.com vivid-security/restricted Translation-en
Hit http://security.ubuntu.com vivid-security/universe Translation-en
Hit http://archive.ubuntu.com vivid/main amd64 Packages
Hit http://archive.ubuntu.com vivid/restricted amd64 Packages
Hit http://archive.ubuntu.com vivid/universe amd64 Packages
Hit http://archive.ubuntu.com vivid/multiverse amd64 Packages
Hit http://archive.ubuntu.com vivid/main Translation-en
Hit http://archive.ubuntu.com vivid/main Translation-eo
Hit http://archive.ubuntu.com vivid/multiverse Translation-en
Hit http://archive.ubuntu.com vivid/restricted Translation-en
Hit http://archive.ubuntu.com vivid/universe Translation-en
Hit http://archive.ubuntu.com vivid/universe Translation-eo
Hit http://archive.ubuntu.com vivid-updates/main amd64 Packages
Hit http://archive.ubuntu.com vivid-updates/restricted amd64 Packages
Hit http://archive.ubuntu.com vivid-updates/universe amd64 Packages
Hit http://archive.ubuntu.com vivid-updates/multiverse amd64 Packages
Hit http://archive.ubuntu.com vivid-updates/main Translation-en
Hit http://archive.ubuntu.com vivid-updates/multiverse Translation-en
Hit http://archive.ubuntu.com vivid-updates/restricted Translation-en
Hit http://archive.ubuntu.com vivid-updates/universe Translation-en
Fetched 198 kB in 6s (8317 kB/s)
Skipping blacklisted from manifest packages: ['adduser', 'apt', 'apt-utils', 'base-files', 'base-passwd', 'bash', 'bsdutils', 'coreutils', 'dash', 'debconf', 'debconf-i18n', 'debianutils', 'diffutils', 'dmsetup', 'dpkg', 'e2fslibs', 'e2fsprogs', 'file', 'findutils', 'gcc-4.9-base', 'gcc-5-base', 'gnupg', 'gpgv', 'grep', 'gzip', 'hostname', 'init', 'initscripts', 'insserv', 'libacl1', 'libapparmor1', 'libapt-inst1.5', 'libapt-pkg4.12', 'libattr1', 'libaudit-common', 'libaudit1', 'libblkid1', 'libbz2-1.0', 'libc-bin', 'libc6', 'libcap2', 'libcap2-bin', 'libcomerr2', 'libcryptsetup4', 'libdb5.3', 'libdebconfclient0', 'libdevmapper1.02.1', 'libgcc1', 'libgcrypt20', 'libgpg-error0', 'libgpm2', 'libkmod2', 'liblocale-gettext-perl', 'liblzma5', 'libmagic1', 'libmount1', 'libncurses5', 'libncursesw5', 'libpam-modules', 'libpam-modules-bin', 'libpam-runtime', 'libpam0g', 'libpcre3', 'libprocps3', 'libreadline6', 'libselinux1', 'libsemanage-common', 'libsemanage1', 'libsepol1', 'libslang2', 'libsmartcols1', 'libss2', 'libstdc++6', 'libsystemd0', 'libtext-charwidth-perl', 'libtext-iconv-perl', 'libtext-wrapi18n-perl', 'libtinfo5', 'libudev1', 'libusb-0.1-4', 'libustr-1.0-1', 'libuuid1', 'locales', 'login', 'lsb-base', 'makedev', 'manpages', 'manpages-dev', 'mawk', 'mount', 'multiarch-support', 'ncurses-base', 'ncurses-bin', 'passwd', 'perl-base', 'procps', 'readline-common', 'sed', 'sensible-utils', 'systemd', 'systemd-sysv', 'sysv-rc', 'sysvinit-utils', 'tar', 'tzdata', 'ubuntu-keyring', 'udev', 'util-linux', 'zlib1g']
Fetched 0 B in 0s (0 B/s)
Failed doing pull for local: [Errno 1] Operation not permitted: '/home/elopio/workspace/canonical/snapcraft/trunk/examples/java-hello-world/parts/local/install/sbin/mount.ntfs'

Launchpad Details: #LP1511161 Leo Arias - 2015-10-28 21:30:09 -0300

copy plugin doesn't handle directories

I thought we had written the copy plugin to handle directories as a src file.

i.e. the following would work:
parts:
test:
plugin: copy
files:
bin: .

But it seems it does not. It should!

Launchpad Details: #LP1478052 Michael Terry - 2015-07-24 12:31:50 -0300

Runtime/build-time discrepancies with jdk and ant plugins

Hi,

While testing ant and jdk plugins, I noticed a couple of things; this bug to discuss the best resolution.

First, I was surprized by a "jdk" plugin; I actually thought the plugin would be "jre" because I thought it was just embedding a java runtime. But then I noticed that "ant" wasn't working on my system, compilation would fail with missing javac classes. This is because the ant Ubuntu package doesn't pull a JDK but only a JRE. Yet, ant was run successfully during a snapcraft build. This is because ant was being run with the java runtime pulled by the jdk plugin (from the snap).

I found this surprizing, I was actually expecting the ant package would be used on my system against the java runtime on my system, but I can see how there are pros and cons to using system java vs. snap's java.

Pros of using system jdk to run ant and embedding a jre package in the snap:

  • smaller runtime -- the current approach still ends up embedding a bunch of lib_.a files, lib_.so (including X.org libs)
  • feels more natural (to me)
    Cons:
  • ant doesn't pull a jdk by default
  • more complex to digest (more plugins)

Pros of using snap's jdk to run ant:

  • less copies of java around -- no discrepancies, perhaps less waster space (not sure)
  • less plugins

To make the matter more complex, I believe we should have multiple architecture in mind. This problem will get worse when we're considering building packages across architectures and/or for multiple architectures. This is actually quite common in the "develop on x86-64 Ubuntu desktop, deploy on ARM board" scenario.

This last topic is actually what convinces me we should go for using the system JDK to run ant rather than the snap's JDK. This makes the snap less easily bloated with JDK bits (we could offer regular vs. -headless jre as an option to make this even smaller), and
means we dont need to worry about cross-architecture. It's even relatively easy to support multiple architectures if we stop relying on default-java and rather use java-7-openjdk-amd64 and such.

(BTW, we seem to pull Recommends; it's not clear whether it's a good default given these are usually not pulled when building .deb packages)

Hence, I propose we:

  • change the ant plugin to pull the default-jdk package (on top of the ant package) -- this kind of feels like a workaround for the package not pulling the jdk by default which is either a bug or just a packaging opinion that "ant can be used for anything, not necessarily building java sources"
  • rename the jdk plugin to jre -- possibly ubuntu-jre or openjdk-jre, allowing for oracle-jre and similar, but I find the long names look ugly
    (- add an option to select the headless JRE)
  • differentiate between build and runtime envs

But happy to read other opinions!

Cheers,

Launchpad Details: #LP1477745 Loïc Minier - 2015-07-23 16:49:43 -0300

putting two maven parts in a snapcraft fails

Put two maven projects in one snapcraft.yaml and the second fails with a directory already exists. Probably the JDK but the directory mentioned in the error is not the real directory.

javamqtt:
plugin: maven-project
source: git://git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.java.git

javascriptmqtt:
    plugin: maven-project
    source: git clone http://git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.javascript.git

args.func(args)

File "/home/maarten/icebreaker/snapcraft/snapcraft/cmds.py", line 331, in cmd
if not getattr(part, cmd)(force=force):
File "/home/maarten/icebreaker/snapcraft/snapcraft/plugin.py", line 205, in build
self.makedirs()
File "/home/maarten/icebreaker/snapcraft/snapcraft/plugin.py", line 148, in makedirs
os.makedirs(d, exist_ok=True)
File "/usr/lib/python3.4/os.py", line 237, in makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/home/maarten/icebreaker/snapcraft/examples/aws-iot/parts/javascriptmqtt/build'

Launchpad Details: #LP1502030 maarten ectors - 2015-10-02 05:05:19 -0300

Document the plugin base class

The base class for a plugin is missing documentation to make it easy to get started with a new plugin.

Launchpad Details: #LP1507075 Sergio Schvezov - 2015-10-16 23:27:20 -0300

Snapcraft should respond to "help", "version", "-v", "--version"

Just playing with the snapcraft command, it would be good to handle:

snapcraft help -> equivalent to snapcraft -h
snapcraft version -> print a useful version number and prompt to "snapcraft help"
snapcraft -v -> same as snapcraft version

Launchpad Details: #LP1501222 Mark Shuttleworth - 2015-09-30 05:26:49 -0300

Add support for overriding the Makefile location in makefile part type

For some non-trivial projects, a snapcraft part developer might like to ship a makefile in the source tree of the snap without having to modify an existing source tarball of a 3rd party project. For that use case, the developer could use the optional "makefile" part attribute to override the makefile executed by snapcraft to build that given part.

For example:

parts:
foo:
type: makefile
makefile: Makefile.foo

This would cause snapcraft to run the following command at part build time:

make -f Makefile.foo -C parts/foo/build

Launchpad Details: #LP1500759 Zygmunt Krynicki - 2015-09-29 05:54:40 -0300

device-mapper: remove ioctl on loop0p5 failed: Device or resource busy

Today I tried to get an image with ubuntu-device-flash, and it failed 2 times in a row. It worked on the third try.

$ sudo ubuntu-device-flash core 15.04 --channel edge --developer-mode -o ubuntu-snappy-1504-edge-amd64-generic.img
[sudo] password for elopio:
Determining oem configuration
Starting download of generic-amd64
41.70 KB / 41.70 KB [================================================================================================================================================================] 100.00 % 126.70 KB/s
Done
Starting download of icon for package
38.97 KB / 38.97 KB [================================================================================================================================================================] 100.00 % 118.05 KB/s
Done
Fetching information from server...
Downloading and setting up...
error while executing external command kpartx -ds ubuntu-snappy-1504-edge-amd64-generic.img: device-mapper: remove ioctl on loop0p5 failed: Device or resource busy
loop deleted : /dev/loop0

$ apt-cache policy ubuntu-device-flash
ubuntu-device-flash:
Instalita: 0.30-0ubuntu1
Kandidato: 0.30-0ubuntu1
Version table:
*** 0.30-0ubuntu1 0
500 http://cr.archive.ubuntu.com/ubuntu/ wily/universe amd64 Packages
100 /var/lib/dpkg/status
0.29-0ubuntu3 0
500 http://ppa.launchpad.net/snappy-dev/tools/ubuntu/ wily/main amd64 Packages

Launchpad Details: #LP1496484 Leo Arias - 2015-09-16 13:33:21 -0300

inconsistent build results due to wrong usage of recommends

building a package on launchpad where the environment is set to --no-install-recommends results in a completely different build result vs doing a local build at home.

snapcraft should make sure to override --no-install-recommends or it should enforce its usage for local build, i think either way is fine as long as we achieve consistency ...

examples:
https://launchpadlibrarian.net/218891649/buildlog_snap_ubuntu_vivid_amd64_wget_BUILDING.txt.gz
(installs: libssl1.0.0, libidn11, wget)

vs a local build of the same snapcraft packaging tree:
http://paste.ubuntu.com/12573213/
(installs: libssl1.0.0, libidn11, init-system-helpers, uuid-runtime, openssl, ca-certificates, wget, update-motd)

Launchpad Details: #LP1500375 Oliver Grawert - 2015-09-28 07:13:37 -0300

snapcraft.yaml needs to make all stages dirty (was: the can't add file without recreating entire package)

I am running snapcraft assemble (qml plugin) on ted's branch lp:~ted/+junk/digitalsign

while iterating over the package, I added 1 new file in ./pic.jpg and edited snapcraft.yaml accordingly:
parts:
qml:
plugin: qml
digitalsign:
plugin: copy
mkdirs:
- bin
files:
digitalsign: bin/digitalsign
digitalsign.qml: digitalsign.qml
pic.jpg: pic.jpg
snappy-metadata: meta

rerunning snapcraft assemble will not pull in the new file, as it's skipping the build stage:

olli@joe-XPS-12-9Q33:~/code/snappy/digitalsign$ ../../qml/bin/snapcraft assemble
Skipping pull digitalsign (already ran)
Skipping build digitalsign (already ran)
Skipping stage digitalsign (already ran)
Snapping digitalsign
...

upon deleting ./snap/ ./parts/ ./stage/ the file is being pulled in:
...
Building digitalsign
cp --preserve=all -R digitalsign /home/olli/code/snappy/digitalsign/parts/digitalsign/install/bin/digitalsign
cp --preserve=all -R digitalsign.qml /home/olli/code/snappy/digitalsign/parts/digitalsign/install/digitalsign.qml
cp --preserve=all -R pic.jpg /home/olli/code/snappy/digitalsign/parts/digitalsign/install/pic.jpg
...

while not critical (workaround: delete files, start over) it's imho a bad experience as it can be expected that developers will iterate over the package quite frequently, rebuilding is taking longer time and thus not desirable

Launchpad Details: #LP1477904 Olli Ries - 2015-07-24 06:15:58 -0300

LD_LIBRARY_PATH hardcoded at snap creation time -- RPATH

Hi,

LD_LIBRARY_PATH currently includes triplet as computed at snap creation time, but it should rather be set at runtime on a per-architecture basis.

In fact, a better approach would be to set a RPATH relative to the binary: $ORIGIN/../../lib/$PLATFORM, or something like that.

Cheers,

Launchpad Details: #LP1486623 Loïc Minier - 2015-08-19 12:30:36 -0300

Help crashes if specified plugin does not exist

daniel@daydream:/dev/snappy/snapcraft$ ./bin/snapcraft help plugin
The plugin does not exist. Use one of the following:
ant
autotools
catkin
cmake
copy
go
jdk
make
maven
python2
python3
qml
roscore
scons
tar-content
Traceback (most recent call last):
File "./bin/snapcraft", line 33, in
snapcraft.main.main()
File "/home/daniel/dev/snappy/snapcraft/snapcraft/main.py", line 115, in main
args.func(args)
File "/home/daniel/dev/snappy/snapcraft/snapcraft/help.py", line 50, in topic
_module_help(args.topic, args.devel)
File "/home/daniel/dev/snappy/snapcraft/snapcraft/help.py", line 68, in _module_help
if module.doc and devel:
UnboundLocalError: local variable 'module' referenced before assignment
daniel@daydream:
/dev/snappy/snapcraft$

Launchpad Details: #LP1510954 Daniel Holbach - 2015-10-28 11:19:12 -0300

Snapcraft should be able to run in clean environment with pbuilder/cowbuilder

I was trying out snapcraft current head and found that it is not the tool i can use at the moment, as i cannot compile everything quickly on the target architecture in a clean environment.

For debian packages we use a combination of cowbuilder, cowdancer and pbuilder to provide clean repeatable build environment on the various target environments.

It should be evaluated how building of snaps can be integrated with gear like that so it is possible to build snaps with similar gear. Ultimatively something like "ARCH=armhf snapcraft --cowbuilder ..." should produce snaps using the defined environment.

Launchpad Details: #LP1480144 Simon Eisenmann - 2015-07-31 05:28:36 -0300

[copy] TypeError: string indices must be integers

I'm sure I'm using it wrong, bug snapcraft shouldn't crash:

name: bwm-ng
version: 0.6-3.2
vendor: Daniel Holbach
summary: small and simple console-based bandwidth monitor
description:
Bandwidth Monitor NG is a small and simple console-based live network and
disk io bandwidth monitor for Linux, BSD, Solaris, Mac OS X and others
icon: ubuntu.png
binaries:
bwm-ng:
exec: usr/bin/bwm-ng

parts:
bwm-ng:
type: copy
files: .
stage-packages: [bwm-ng]

aniel@daydream:/dev/apps/bwm-ng.snap$ snapcraft build
Skipping pull bwm-ng (already ran)
Building bwm-ng
Traceback (most recent call last):
File "/usr/bin/snapcraft", line 33, in
snapcraft.main.main()
File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 80, in main
args.func(args)
File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 331, in cmd
if not getattr(part, cmd)(force=force):
File "/usr/lib/python3/dist-packages/snapcraft/plugin.py", line 208, in build
if not getattr(self.code, 'build')():
File "/usr/lib/python3/dist-packages/snapcraft/plugins/copy.py", line 31, in build
dst = self.options.files[src]
TypeError: string indices must be integers
daniel@daydream:
/dev/apps/bwm-ng.snap$

Launchpad Details: #LP1499249 Daniel Holbach - 2015-09-24 06:15:26 -0300

ros-catkin-plugin: ros distro issue

Snapping roscore
Traceback (most recent call last):
File "../../bin/snapcraft", line 33, in
snapcraft.main.main()
File "/home/victor/ros-catkin-plugin/snapcraft/main.py", line 80, in main
args.func(args)
File "/home/victor/ros-catkin-plugin/snapcraft/cmds.py", line 99, in assemble
snap(args)
File "/home/victor/ros-catkin-plugin/snapcraft/cmds.py", line 92, in snap
meta.create(config.data, arches)
File "/home/victor/ros-catkin-plugin/snapcraft/meta.py", line 57, in create
_write_package_yaml(meta_dir, config_data, arches)
File "/home/victor/ros-catkin-plugin/snapcraft/meta.py", line 68, in _write_package_yaml
package_yaml = _compose_package_yaml(meta_dir, config_data, arches)
File "/home/victor/ros-catkin-plugin/snapcraft/meta.py", line 139, in _compose_package_yaml
services = _wrap_services(services)
File "/home/victor/ros-catkin-plugin/snapcraft/meta.py", line 225, in _wrap_services
startwrap = _wrap_exe(startparts[0])
File "/home/victor/ros-catkin-plugin/snapcraft/meta.py", line 206, in _wrap_exe
_write_wrap_exe(wrapexec, wrappath)
File "/home/victor/ros-catkin-plugin/snapcraft/meta.py", line 173, in _write_wrap_exe
with open(wrappath, 'w+') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/victor/ros-catkin-plugin/examples/ros/snap/opt/ros/jade/bin/roscore.wrapper'
victor@ubuntu:/ros-catkin-plugin/examples/ros$ ls snap/opt/ros/indigo/^C
victor@ubuntu:
/ros-catkin-plugin/examples/ros$ vi snapcraft.yaml
victor@ubuntu:~/ros-catkin-plugin/examples/ros$ ../../bin/snapcraft

Launchpad Details: #LP1500922 Victor Mayoral - 2015-09-29 12:20:29 -0300

copy plugin doesn't support globs

It would be useful if the copy plug supported globs on the src file side. If that were the case, it might then require that the dst file was a directory.

i.e. do whatever logic 'cp' does when handed a glob.

Launchpad Details: #LP1478054 Michael Terry - 2015-07-24 12:33:05 -0300

User friendly error missing when using go's source entry incorrectly

daniel@daydream:~/dev/apps/bwm-ng.snap$ cat snapcraft.yaml
name: bwm-ng
version: 0.6-3.2
vendor: Daniel Holbach
summary: small and simple console-based bandwidth monitor
description:
Bandwidth Monitor NG is a small and simple console-based live network and
disk io bandwidth monitor for Linux, BSD, Solaris, Mac OS X and others
icon: ubuntu.png
binaries:
bwm-ng:
exec: usr/bin/bwm-ng

parts:
bwm-ng:
type: go
source: .
stage-packages: [bwm-ng]
daniel@daydream:/dev/apps/bwm-ng.snap$ ls
image parts snapcraft.yaml ubuntu.png
daniel@daydream:
/dev/apps/bwm-ng.snap$ snapcraft
Skipping pull bwm-ng (already ran)
Skipping build bwm-ng (already ran)
Skipping stage bwm-ng (already ran)
Traceback (most recent call last):
File "/usr/bin/snapcraft", line 33, in
snapcraft.main.main()
File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 80, in main
args.func(args)
File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 99, in assemble
snap(args)
File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 81, in snap
cmd(args)
File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 325, in cmd
shutil.rmtree(common.get_snapdir())
File "/usr/lib/python3.4/shutil.py", line 459, in rmtree
onerror(os.lstat, path, sys.exc_info())
File "/usr/lib/python3.4/shutil.py", line 457, in rmtree
orig_st = os.lstat(path)
FileNotFoundError: [Errno 2] No such file or directory: '/home/daniel/dev/apps/bwm-ng.snap/snap'
daniel@daydream:~/dev/apps/bwm-ng.snap$

Launchpad Details: #LP1499240 Daniel Holbach - 2015-09-24 06:02:52 -0300

Allow passing multiple pip-packages via a list in the snapcraft.yaml

At the moment the python3 plugin obliges you to pass a file with requirements. It would be easier to list all the requirements so in addition to a file like this:

plugin: python3-project
requirements: file-with-requirements

this would be great:
plugin: python3-project
requirements:
- requirement1
- requirement2

Launchpad Details: #LP1502132 maarten ectors - 2015-10-02 10:14:42 -0300

snapcraft throws FileExistsError: with very simple Python snap

Trying out snapcraft, starting with a very simple project. I wrote a very simple Python service:

import time

i = 0

while i < 1000:
print("this is a python snap: " + str(i))
i += 1
time.sleep(5)

I wrote the following snpacraft.yaml:

name: python-snap
version: 1
vendor: Rick Spencer
summary: a test of snapcraft
description: a longer test of snapcraft
icon: icon.png

parts:
loop:
type: python3-project
source: ./hello-python.

I ran $snapcraft stage

and got this error:
py3versions -i
Traceback (most recent call last):
File "/usr/bin/snapcraft", line 33, in
snapcraft.main.main()
File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 80, in main
args.func(args)
File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 328, in cmd
common.env = config.build_env_for_part(part)
File "/usr/lib/python3/dist-packages/snapcraft/yaml.py", line 221, in build_env_for_part
env += part.env(part.installdir)
File "/usr/lib/python3/dist-packages/snapcraft/plugin.py", line 282, in env
return getattr(self.code, 'env')(root)
File "/usr/lib/python3/dist-packages/snapcraft/plugins/python3_project.py", line 38, in env
root, 'usr', 'lib', self.python_version, 'dist-packages')]
File "/usr/lib/python3/dist-packages/snapcraft/plugins/python3_project.py", line 106, in python_version
return self.run_output(['py3versions', '-i'])
File "/usr/lib/python3/dist-packages/snapcraft/init.py", line 80, in run_output
self.makedirs(cwd)
File "/usr/lib/python3/dist-packages/snapcraft/init.py", line 112, in makedirs
os.makedirs(d, exist_ok=True)
File "/usr/lib/python3.4/os.py", line 237, in makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/home/rick/Projects/phw/parts/loop/build'

Launchpad Details: #LP1499424 Rick Spencer - 2015-09-24 12:18:27 -0300

Add help subcommand

The help subcommand should provide help for specific snapcraft topics and plugins.

Launchpad Details: #LP1510683 Sergio Schvezov - 2015-10-27 16:50:26 -0300

Logging out from the run environment produces a traceback

(amd64)ubuntu@localhost:$ logout
Connection to localhost closed.
Traceback (most recent call last):
File "/usr/bin/snapcraft", line 33, in
snapcraft.main.main()
File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 80, in main
args.func(args)
File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 228, in run
preexec_fn=os.setsid)
File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 343, in _check_call
return subprocess.check_call(args, **kwargs)
File "/usr/lib/python3.4/subprocess.py", line 561, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ssh', '-i', '/home/daniel/.ssh/ubuntudevice_0149BDCB0C009017_id_rsa', '-oStrictHostKeyChecking=no', '-oUserKnownHostsFile=/tmp/tmpcaocvoj7', '-oKbdInteractiveAuthentication=no', '-p', '8022', 'ubuntu@localhost']' returned non-zero exit status 1
daniel@daydream:
/dev/apps/bwm-ng.snap$

Launchpad Details: #LP1499242 Daniel Holbach - 2015-09-24 06:05:27 -0300

maven plugin - support for maven commands

This is a feature request:

The MQTT Paho client is doing lots of things and extensive testing when you use the default maven plugin. The documentation recommends to use:
mvn package -DskipTests

But in the maven plugin there is no option to specify package and -DskipTests

So something like

javamqtt:
plugin: maven-project
mvnoptions: package -D skipTests
source: git://git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.java.git

Launchpad Details: #LP1502031 maarten ectors - 2015-10-02 05:08:54 -0300

AttributeError: 'module' object has no attribute 'tests'

Currently https://code.launchpad.net/~snappy-dev/+recipe/snapcraft-daily fails to build:

dh_auto_test -O--buildsystem=pybuild
I: pybuild base:170: python3.4 setup.py test
running test
running egg_info
creating snapcraft.egg-info
writing dependency_links to snapcraft.egg-info/dependency_links.txt
writing top-level names to snapcraft.egg-info/top_level.txt
writing snapcraft.egg-info/PKG-INFO
writing manifest file 'snapcraft.egg-info/SOURCES.txt'
reading manifest file 'snapcraft.egg-info/SOURCES.txt'
writing manifest file 'snapcraft.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
File "setup.py", line 38, in
test_suite='snapcraft.tests',
File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/test.py", line 146, in run
self.with_project_on_sys_path(self.run_tests)
File "/usr/lib/python3/dist-packages/setuptools/command/test.py", line 127, in with_project_on_sys_path
func()
File "/usr/lib/python3/dist-packages/setuptools/command/test.py", line 167, in run_tests
testRunner=self._resolve_as_ep(self.test_runner),
File "/usr/lib/python3.4/unittest/main.py", line 92, in init
self.parseArgs(argv)
File "/usr/lib/python3.4/unittest/main.py", line 139, in parseArgs
self.createTests()
File "/usr/lib/python3.4/unittest/main.py", line 146, in createTests
self.module)
File "/usr/lib/python3.4/unittest/loader.py", line 157, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/usr/lib/python3.4/unittest/loader.py", line 157, in
suites = [self.loadTestsFromName(name, module) for name in names]
File "/usr/lib/python3.4/unittest/loader.py", line 125, in loadTestsFromName
parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'tests'
E: pybuild pybuild:262: test: plugin distutils failed with: exit code=1: python3.4 setup.py test
dh_auto_test: pybuild --test -i python{version} -p 3.4 --dir . returned exit code 13
debian/rules:5: recipe for target 'build' failed
make: *** [build] Error 25

Launchpad Details: #LP1507573 Daniel Holbach - 2015-10-19 09:49:22 -0300

Fail to build snap python3 distutils project

I created a simple hello world python3 project, using distutils. Building a snap for it failed will the following error:

Building hello
py3versions -i
python3 /home/ubuntu/snapcraft-test/parts/hello/build/tmp62lgq3op install --install-layout=deb --prefix=/home/ubuntu/snapcraft-test/parts/hello/install/usr
running install
Checking .pth file support in /home/ubuntu/snapcraft-test/parts/hello/install/usr/lib/python3/dist-packages/
usr/bin/python3 -E -c pass
unable to execute 'usr/bin/python3': No such file or directory
error: command 'usr/bin/python3' failed with exit status 1
Failed doing build for hello!

Launchpad Details: #LP1507357 Björn Tillenius - 2015-10-18 15:27:05 -0300

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.