Skip to content

Instantly share code, notes, and snippets.

import subprocess
import time
import sys
#takes an argument with the vmname. Use a guest using the 18.04 image, not the 16.04 image.
#like `python trigger_1170.py intrigued-stag`
#otherwise uses primary
vmname = "primary"
@NickZ
NickZ / windows_snapcraft_test_instructions.md
Last active February 8, 2020 23:58
Windows snapcraft test instructions

Current blockers:

  1. Need to wait for multipass 1.1 for this bugfix: canonical/multipass#1170
  2. Need to wait for multipass snapcraft builder images to be built for Windows (currently not bootable, according to Saviq)
  3. Need to merge this PR to fix issues with sanity checking: canonical/snapcraft#2919
  4. Need to merge this PR to fix issues with push not working: canonical/snapcraft#2922
  5. snapcraft clean does not yet work.

Requirements:

@NickZ
NickZ / subedit.strace.log
Created January 29, 2020 23:23
strace for subtitle-edit snap
This file has been truncated, but you can view the full file.
7407 execve("/snap/bin/subtitle-edit", ["/snap/bin/subtitle-edit"], ["COLORTERM=truecolor", "XAUTHORITY=/run/user/1000/gdm/Xa"..., "LANG=en_US.UTF-8", "LS_COLORS=rs=0:di=01;34:ln=01;36"..., "TERM=xterm-256color", "DISPLAY=:1", "PATH=/usr/local/sbin:/usr/local/"..., "MAIL=/var/mail/root", "LOGNAME=root", "USER=root", "HOME=/root", "SHELL=/bin/bash", "SUDO_COMMAND=/usr/bin/strace -u "..., "SUDO_USER=nick", "SUDO_UID=1000", "SUDO_GID=1000"]) = 0
7407 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
7407 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
7407 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
7407 openat(AT_FDCWD, "/etc/os-release", O_RDONLY|O_CLOEXEC) = 3
7407 openat(AT_FDCWD, "/proc/version", O_RDONLY|O_CLOEXEC) = 5
7407 openat(AT_FDCWD, "", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
7407 openat(AT_FDCWD, "/sys/kernel/security/apparmor/features", O_RDONLY|O_CLOEXEC) = 5
7407 openat(AT_FDCWD, "/dev/null
@NickZ
NickZ / x-mono-stage-packages.py
Created December 5, 2019 23:06
How to stage packages from a third-party repository in snapcraft
import snapcraft
import os
import textwrap
# Just edit this to put in your repo.
# For examples sake, I've used the official mono repo
# Once edited, put this in your "snap/plugins" directory, create a part using this plugin, then stage your packages.
_BASE_TO_UBUNTU_RELEASE_MAP = {"core16": "xenial", "core18": "bionic"}
name: ros-base-package
version: '0.1'
grade: stable
confinement: strict
summary: ROS messages Snap
description: Contains roscore and basic ROS utilities.
slots:
ros-base-package:
content: ros-base-package