Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import json, os, subprocess, sys, urllib2
from termcolor import cprint
from xml.dom import minidom
def abort(error):
cprint(error, color='red', file=sys.stderr)
exit(1)
parts:
zulu-8-arm:
plugin: copy
source: https://zulu/.../zulu-8-arm.tar.gz
files:
"*": "opt/zulu/"
snap:
- opt/zulu/jre
build-environment:
- PATH: "opt/zulu/bin:$PATH"
@lool
lool / build-onie.sh
Last active October 9, 2023 07:50
Build ONIE VM image
#!/bin/sh
set -e
PACKAGES="git qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils virt-manager git realpath autoconf bison flex texinfo libtool libtool-bin libncurses5-dev gawk gperf stgit build-essential fakeroot libexpat1-dev python-dev xorriso mtools dosfstools"
ONIE_URL="https://github.com/opencomputeproject/onie.git"
# needed to locate mkdosfs
export PATH=$PATH:/sbin:/usr/sbin
@lool
lool / build-ops.sh
Created March 25, 2017 00:28
OpenSwitch (classic stack, aka OPS) snap build scripts
#!/bin/sh
set -e -x
# snapcraft deps for Ubuntu 16.04
SNAPCRAFT_PACKAGES="python3-jsonschema python3-magic python3-xdg python3-requests-oauthlib python3-ssoclient python3-progressbar python3-requests-toolbelt python3-docopt python3-petname"
sudo apt -y install $SNAPCRAFT_PACKAGES
if ! [ -d snapcraft ]; then
git clone https://github.com/ubuntu-core/snapcraft
@lool
lool / build-openwrt.sh
Created March 25, 2017 00:33
OpenWRT build script
#!/bin/sh
set -e -x
# for Ubuntu 16.04
#PACKAGES="git build-essential libssl-dev libncurses5-dev unzip gawk python subversion mercurial"
PACKAGES="git build-essential libssl-dev libncurses5-dev unzip gawk python subversion"
sudo apt -y install $PACKAGES
if ! [ -d openwrt ]; then
@lool
lool / snapcraft.yaml
Created March 31, 2017 12:09
Initial LimeSuite snap
name: limesuite-lool
version: 16.8.23.0
summary: LimeSuite apps
description: LimeSuite command line utility and Graphical eval app.
confinement: strict
apps:
LimeUtil:
command: LimeUtil
plugs: [network, home]
@lool
lool / rabbitmq-env.conf
Last active March 31, 2017 12:12
Initial RabbitMQ snap
# override defaults here
@lool
lool / snapcraft.yaml
Created March 31, 2017 12:16
Initial FlexSwitch snap
name: flexswitch-snap
version: 0.0.1
summary: FlexSwitch open source layer 2/3 network stack
description: FlexSwitch open source layer 2/3 network stack
confinement: devmode
grade: devel
parts:
thrift:
plugin: autotools
@lool
lool / ONL-3.18.25.config
Created April 4, 2017 14:09
ONL kernel snap
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 3.18.25 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_PERF_EVENTS_INTEL_UNCORE=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
@lool
lool / snapcraft.yaml
Created July 30, 2017 12:25
Scratch BIRD snap
name: bird
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: |
This is my-snap's description. You have a paragraph or two to tell the
most important story about your snap. Keep it under 100 words though,
we live in tweetspace and your description wants to look good in the snap
store.
grade: devel # must be 'stable' to release into candidate/stable channels