Skip to content

Commit

Permalink
Initial packaging
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
  • Loading branch information
stgraber committed Sep 13, 2023
0 parents commit 4e0ed30
Show file tree
Hide file tree
Showing 4 changed files with 295 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Frequent committers who contribute to Incus on their own time can add
# themselves to the list here so users who feel like sponsoring can find
# them.
github:
- stgraber
171 changes: 171 additions & 0 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
name: Builds
on:
- push

permissions:
contents: read

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
build-incus:
name: Build Incus
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
- debian-11
- debian-12
arch:
- amd64
- arm64
exclude:
- os: debian-11
arch: arm64
runs-on:
- self-hosted
- cpu-4
- mem-4G
- disk-50G
- arch-${{ matrix.arch }}
- image-${{ matrix.os }}

env:
ARCH: ${{ matrix.arch }}
PKG_CONFIG_PATH: "/opt/incus/lib/pkgconfig/"
CGO_LDFLAGS: "-L/opt/incus/lib/"
CGO_CFLAGS: "-I/opt/incus/include/"
LD_LIBRARY_PATH: "/opt/incus/lib/"
PATH: "/opt/incus/bin:/usr/local/go/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
LXC_TAG: "lxc-5.0.3"
LXCFS_TAG: "lxcfs-5.0.4"
INCUS_TAG: "main"
RAFT_TAG: "main"
COWSQL_TAG: "main"
CRIU_TAG: "v3.18"
EDK2_TAG: "edk2-stable202308"
GOLANG_TAG: "1.21.1"
LIBTPMS_TAG: "v0.9.6"
LIBURING_TAG: "liburing-2.4"
MINIO_TAG: "RELEASE.2023-09-07T02-05-02Z"
NASM_TAG: "nasm-2.16.01"
NVIDIA_CONTAINER_TAG: "v1.14.1"
QEMU_TAG: "v8.1.0"
SEABIOS_TAG: "rel-1.16.2"
SWTPM_TAG: "v0.8.0"
VIRTIOFSD_TAG: "v1.8.0"
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Configure git
run: |
git config --global --add advice.detachedHead false
- name: Install dependencies
run: |
sudo apt-get install --yes \
acpica-tools \
asciidoc \
autoconf \
automake \
bison \
bmake \
build-essential \
cargo \
curl \
debhelper \
devscripts \
dosfstools \
expect \
flex \
gawk \
git \
iproute2 \
libacl1-dev \
libaio-dev \
libapparmor-dev \
libcap-dev \
libcap-ng-dev \
libdbus-1-dev \
libelf-dev \
libfuse3-dev \
libglib2.0-dev \
libgnutls28-dev \
libjson-glib-dev \
libnet1-dev \
libnl-3-dev \
libnuma-dev \
libpam0g-dev \
libpixman-1-dev \
libprotobuf-c-dev \
libprotobuf-dev \
librbd-dev \
libseccomp-dev \
libselinux1-dev \
libspice-server-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libudev-dev \
libusb-1.0-0-dev \
libusbredirhost-dev \
libuv1-dev \
lsb-release \
meson \
mtools \
ninja-build \
pkg-config \
protobuf-c-compiler \
protobuf-compiler \
python3-cryptography \
python3-jinja2 \
python3-pexpect \
python3-setuptools \
python3-venv \
rsync \
rustc \
socat \
uuid-dev \
xmlto \
xorriso
- name: Install Go
run: |
curl -sL "https://go.dev/dl/go${GOLANG_TAG}.linux-${ARCH}.tar.gz" | tar -C /usr/local/ -zx
go version
- name: Build environment
run: |
mkdir /build/
mkdir -p \
/opt/incus/bin/ \
/opt/incus/include/ \
/opt/incus/lib/ \
/opt/incus/lib/systemd/system/ \
/opt/incus/share/
- name: Get the code
run: |
git clone https://github.com/axboe/liburing /build/liburing --depth 1 -b "${LIBURING_TAG}"
git clone https://github.com/cowsql/raft /build/raft --depth 1 -b "${RAFT_TAG}"
git clone https://github.com/cowsql/cowsql /build/cowsql --depth 1 -b "${COWSQL_TAG}"
git clone https://github.com/lxc/lxc /build/lxc --depth 1 -b "${LXC_TAG}"
git clone https://github.com/lxc/lxcfs /build/lxcfs --depth 1 -b "${LXCFS_TAG}"
git clone https://github.com/lxc/incus /build/incus --depth 1 -b "${INCUS_TAG}"
git clone https://github.com/checkpoint-restore/criu /build/criu --depth 1 -b "${CRIU_TAG}"
git clone https://github.com/NVIDIA/libnvidia-container /build/libnvidia-container --depth 1 -b "${NVIDIA_CONTAINER_TAG}"
git clone https://github.com/minio/minio /build/minio --depth 1 -b "${MINIO_TAG}"
git clone https://gitlab.com/qemu-project/seabios /build/seabios --depth 1 -b "${SEABIOS_TAG}"
git clone https://github.com/netwide-assembler/nasm /build/nasm --depth 1 -b "${NASM_TAG}"
git clone https://github.com/tianocore/edk2 /build/edk2 --recurse-submodules --shallow-submodules --depth 1 -b "${EDK2_TAG}"
git clone https://github.com/stefanberger/libtpms /build/libtpms --depth 1 -b "${LIBTPMS_TAG}"
git clone https://github.com/stefanberger/swtpm /build/swtpm --depth 1 -b "${SWTPM_TAG}"
git clone https://gitlab.com/virtio-fs/virtiofsd /build/virtiofsd --depth 1 -b "${VIRTIOFSD_TAG}"
git clone https://gitlab.com/qemu-project/qemu /build/qemu --depth 1 -b "${QEMU_TAG}"
40 changes: 40 additions & 0 deletions .github/workflows/commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Commits
on:
- pull_request

permissions:
contents: read

jobs:
dco-check:
permissions:
pull-requests: read # for tim-actions/get-pr-commits to get list of commits from the PR
name: Signed-off-by (DCO)
runs-on: ubuntu-22.04
steps:
- name: Get PR Commits
id: 'get-pr-commits'
uses: tim-actions/get-pr-commits@master
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Check that all commits are signed-off
uses: tim-actions/dco@master
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}

target-branch:
permissions:
contents: none
name: Branch target
runs-on: ubuntu-22.04
steps:
- name: Check branch target
env:
TARGET: ${{ github.event.pull_request.base.ref }}
run: |
set -x
[ "${TARGET}" = "daily" ] && exit 0
echo "Invalid branch target: ${TARGET}"
exit 1
79 changes: 79 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Incus builds
Incus package builds provided by Zabbly.

Currently only daily builds are available.
Those are development builds, use at your own risk!

## Availability
Those packages are built for:

* Ubuntu 20.04 LTS (`focal`)
* Ubuntu 22.04 LTS (`jammy`)
* Debian 11 (`bullseye`) (`x86_64` only)
* Debian 12 (`bookworm`)

## Installation
On any of those, you can add the package repository at `/etc/apt/sources.list.d/zabbly-incus-daily.sources`:

```
Enabled: yes
Types: deb
URIs: https://pkgs.zabbly.com/incus/daily
Suites: DISTRO
Components: main
Architectures: ARCH
Signed-By: /etc/apt/keyrings/zabbly.asc
```

Make sure to replace `DISTRO` with one of `focal`, `jammy`, `bullseye` or `bookworm`
and then replace `ARCH` with one of `amd64` or `arm64`.

After that, add the [GPG keyring](https://pkgs.zabbly.com/key.asc) to `/etc/apt/keyrings/zabbly.asc`:
```
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGNBGTlYcIBDACYQoVXVyQ6Y3Of14GwEaiv/RstQ8jWnH441OtvDbD/VVT8yF0P
pUfypWjQS8aq0g32Qgb9H9+b8UAAKojA2W0szjJFlmmSq19YDMMmNC4AnfeZlKYM
61Zonna7fPaXmlsTlSiUeo/PGvmAXrkFURC9S8FbhZdWEcUpf9vcKAoEzV8qGA4J
xbKlj8EOjSkdq3OQ1hHjP8gynbbzMhZQwjbnWqoiPj35ed9EMn+0QcX+GmynGq6T
hBXdRdeQjZC6rmXzNF2opCyxqx3BJ0C7hUtpHegmeoH34wnJHCqGYkEKFAjlRLoW
tOzHY9J7OFvB6U7ENtnquj7lg2VQK+hti3uiHW+oide06QgjVw2irucCblQzphgo
iX5QJs7tgFFDsA9Ee0DZP6cu83hNFdDcXEZBc9MT5Iu0Ijvj7Oeym3DJpkCuIWgk
SeP56sp7333zrg73Ua7YZsZHRayAe/4YdNUua+90P4GD12TpTtJa4iRWRd7bis6m
tSkKRj7kxyTsxpEAEQEAAbQmWmFiYmx5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ft9Ta7gVaIBsK7
12oHInUJ6EkBovxpuaLlHlP8IfmZLZbbHzR2gR0e6IhLtrzd7urB+gXUtp6+wCL+
kWD14TTJhSQ+SFU8ajvUah7/1m2bxdjZNp9pzOPGkr/jEjCM0CpZiCY62SeIJqVc
4/ID9NYLAGmSIwARAQABiQG8BBgBCgAmFiEETvxZBpbLFbh8c6OtgsyHl8g43P0F
AmTlYcICGwwFCQPCZwAACgkQgsyHl8g43P0wEgv+LuknyXHpYpiUcJOl9Q5yLokd
o7tJwJ+9Fu7EDAfM7mPgyBj7Ad/v9RRP+JKWHqIYEjyrRnz9lmzciU+LT/CeoQu/
MgpU8wRI4gVtLkX2238amrTKKlVjQUUNHf7cITivUs/8e5W21JfwvcSzu5z4Mxyw
L6vMlBUAixtzZSXD6O7MO9uggHUZMt5gDSPXG2RcIgWm0Bd1yTHL7jZt67xBgZ4d
hUoelMN2XIDLv4SY78jbHAqVN6CLLtWrz0f5YdaeYj8OT6Ohr/iJQdlfVaiY4ikp
DzagLi0LvG9/GuB9eO6yLuojg45JEH8DC7NW5VbdUITxQe9NQ/j5kaRKTEq0fyZ+
qsrryTyvXghxK8oMUcI10l8d41qXDDPCA40kruuspCZSAle3zdqpYqiu6bglrgWr
Zr2Nm9ecm/kkqMIcyJ8e2mlkuufq5kVem0Oez+GIDegvwnK3HAqWQ9lzdWKvnLiE
gNkvg3bqIwZ/WoHBnSwOwwAzwarJl/gn8OG6CIeP
=8Uc6
-----END PGP PUBLIC KEY BLOCK-----
```

To install Incus, run: `apt-get install incus`

## Repository
This repository gets actively rebased as new releases come out, DO NOT expect a linear git history.

0 comments on commit 4e0ed30

Please sign in to comment.