add support for snap package building #197

Merged
merged 2 commits into from Aug 29, 2017

Conversation

Projects
None yet
2 participants
Contributor

diddledan commented Aug 15, 2017

credits to @popey for the basis of this commit. Finalised and tested by @diddledan.

diddledan added some commits Aug 15, 2017

add support for snap package building
credits to @popey for the basis of this commit. Finalised and tested by @diddledan.
fix missing desktop entry for snap package
- add .desktop file for snap package
- add configuration for icon of package
Owner

haecker-felix commented Aug 16, 2017

Thanks for this work! I'm currently on holiday and only have limited Internet access, so I cannot check it right now.

Owner

haecker-felix commented Aug 29, 2017

Looks fine, I'm going to create a new repo for the snap package, i dont want to include package specific code to the main repo.

https://github.com/gradio-app/gradio-snap

@haecker-felix haecker-felix merged commit a195add into haecker-felix:master Aug 29, 2017

Owner

haecker-felix commented Aug 29, 2017

Hm i have issues with building a snap package with build.snapcraft.io

Downloading parts list
Traceback (most recent call last):
File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 253, in main
builder.pull()
File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 190, in pull
env=env)
File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 100, in run_build_command
["/bin/sh", "-c", command], echo=echo, get_output=get_output)
File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 71, in chroot
subprocess.check_call(cmd)
File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['/usr/bin/sudo', '/usr/sbin/chroot', '/home/buildd/build-SNAPBUILD-74161/chroot-autobuild', 'linux32', '/bin/sh', '-c', 'cd /build/a30025721389483f66d9ec39f4ccad55-xenial && env LANG=C.UTF-8 https_proxy=http://snap-proxy.launchpad.net:3128 SNAPCRAFT_LOCAL_SOURCES=1 SNAPCRAFT_SETUP_CORE=1 http_proxy=http://snap-proxy.launchpad.net:3128 GIT_PROXY_COMMAND=/usr/local/bin/snap-git-proxy snapcraft pull']' returned non-zero exit status 1
Revoking proxy token...
RUN: /usr/share/launchpad-buildd/slavebin/scan-for-processes ['scan-for-processes', 'SNAPBUILD-74161']
Scanning for processes to kill in build /home/buildd/build-SNAPBUILD-74161/chroot-autobuild...
RUN: /usr/share/launchpad-buildd/slavebin/umount-chroot ['umount-chroot', 'SNAPBUILD-74161']
Unmounting chroot for build SNAPBUILD-74161...
RUN: /usr/share/launchpad-buildd/slavebin/remove-build ['remove-build', 'SNAPBUILD-74161']

Maybe you can help me

Owner

haecker-felix commented Aug 29, 2017

@diddledan i want to keep the main repo clean of package specific code (snap/deb/rpm). Whats the best way to do this? I could add a new branch for the snap package code, but unfortunately on build.snapcraft.io i cannot specify a other branch.

The other possibility would be, create a complete new repo, same as the main repo + the snap package code. But so i have to push it every time to two repos. This is also not the greatest way.

I think the best way would be, creating a new repo, which only contains the snap specific code (for example https://github.com/8none1/corebird-snap), and use this one for snapcraft.io

I'm still experimenting with snap ;)

Contributor

diddledan commented Aug 29, 2017

I think build.snapcraft.io expects to be building from master each time. It would be nice to allow branching but it isn't available in the service at the moment.

To use a separate repo, you will have to bump the snap repo each time you want to cut a new release. You'll not get the ability to track regular builds whenever the main repo changes, but on the flip side you get to keep the packaging info out of the main tree.

With Corebird, at https://github.com/snapcrafters/corebird now, we're maintaining it until such time that upstream are able and willing to include it in their own processes at which time they'd take control and either create a snap-specific repo or import the snapcraft stuff into the mainline tree. Alternatively, if they state that they do not want to adopt it, we will continue maintaining the snap packaging independently.

Owner

haecker-felix commented Aug 30, 2017

I'm going to do it like the corebird snap. I think thats the best way for me.

https://github.com/gradio-app/gradio-snap

Unfortunately i'm still unable to build the snap on snapcraft.io. I don't know whats wrong. Maybe you can help me. (if not i'm going to ask it in the snapcraft forum)

Build # 74231

Downloading parts list                                                         
Traceback (most recent call last):
  File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 253, in main
    builder.pull()
  File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 190, in pull
    env=env)
  File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 100, in run_build_command
    ["/bin/sh", "-c", command], echo=echo, get_output=get_output)
  File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 71, in chroot
    subprocess.check_call(cmd)
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['/usr/bin/sudo', '/usr/sbin/chroot', '/home/buildd/build-SNAPBUILD-74231/chroot-autobuild', 'linux32', '/bin/sh', '-c', 'cd /build/a30025721389483f66d9ec39f4ccad55-xenial && env LANG=C.UTF-8 https_proxy=http://snap-proxy.launchpad.net:3128 SNAPCRAFT_LOCAL_SOURCES=1 SNAPCRAFT_SETUP_CORE=1 http_proxy=http://snap-proxy.launchpad.net:3128 GIT_PROXY_COMMAND=/usr/local/bin/snap-git-proxy snapcraft pull']' returned non-zero exit status 1
Revoking proxy token...
RUN: /usr/share/launchpad-buildd/slavebin/scan-for-processes ['scan-for-processes', 'SNAPBUILD-74231']
Scanning for processes to kill in build /home/buildd/build-SNAPBUILD-74231/chroot-autobuild...
RUN: /usr/share/launchpad-buildd/slavebin/umount-chroot ['umount-chroot', 'SNAPBUILD-74231']
Unmounting chroot for build SNAPBUILD-74231...
RUN: /usr/share/launchpad-buildd/slavebin/remove-build ['remove-build', 'SNAPBUILD-74231']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment