Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
go-microvm is a Go library and runner binary that turns any OCI container image
into a lightweight virtual machine. It pulls the image, flattens its layers
into a rootfs, configures in-process networking, and boots the result using
[libkrun](https://github.com/containers/libkrun) -- all in a single function
[libkrun](https://github.com/libkrun/libkrun) -- all in a single function
call.

You would use go-microvm when you need stronger isolation than containers provide
Expand Down Expand Up @@ -77,7 +77,7 @@ from source:
sudo apt install build-essential libssl-dev pkg-config python3 patchelf

# Clone and build libkrun
git clone https://github.com/containers/libkrun.git
git clone https://github.com/libkrun/libkrun.git
cd libkrun
make
sudo make install
Expand All @@ -96,7 +96,7 @@ brew trust slp/krun
brew install libkrun libkrunfw

# Or build from source:
git clone https://github.com/containers/libkrun.git
git clone https://github.com/libkrun/libkrun.git
cd libkrun
make
sudo make install
Expand Down
39 changes: 37 additions & 2 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ tasks:
echo "{{.TAG}}" > "${staging}/VERSION"
cat > "${staging}/LICENSE-GPL" <<'LICEOF'
libkrunfw is licensed under the GNU General Public License v2.0 (GPL-2.0).
See https://github.com/containers/libkrunfw for full license text.
See https://github.com/libkrun/libkrunfw for full license text.
LICEOF
tar czf "dist/${staging}.tar.gz" "${staging}"
rm -rf "${staging}"
Expand Down Expand Up @@ -353,11 +353,46 @@ tasks:
echo "{{.TAG}}" > "${staging}/VERSION"
cat > "${staging}/LICENSE-GPL" <<'LICEOF'
libkrunfw is licensed under the GNU General Public License v2.0 (GPL-2.0).
See https://github.com/containers/libkrunfw for full license text.
See https://github.com/libkrun/libkrunfw for full license text.
LICEOF
tar czf "dist/${staging}.tar.gz" "${staging}"
rm -rf "${staging}"

# =============================================================================
# Vendor Management
# =============================================================================

update-libkrun-header:
desc: Fetch libkrun.h from the pinned version and update the vendored copy
vars:
HEADER_VERSION: '{{.HEADER_VERSION | default .LIBKRUN_VERSION}}'
preconditions:
- sh: '[ -n "{{.HEADER_VERSION}}" ]'
msg: "HEADER_VERSION is empty — check that versions.env exists and contains LIBKRUN_VERSION"
cmds:
- >-
curl -fsSL
"https://raw.githubusercontent.com/libkrun/libkrun/{{.HEADER_VERSION}}/include/libkrun.h"
-o /tmp/libkrun-{{.HEADER_VERSION}}.h
- |
{
echo '// Vendored from /usr/include/libkrun.h'
echo '// SPDX-License-Identifier: Apache-2.0'
echo '// Copyright (c) 2021-2024 Red Hat, Inc.'
echo '//'
echo "// Synchronized from libkrun/libkrun@{{.HEADER_VERSION}} (include/libkrun.h)"
echo "// Run 'task update-libkrun-header' after bumping LIBKRUN_VERSION."
echo ''
cat /tmp/libkrun-{{.HEADER_VERSION}}.h
} > krun/libkrun.h
- rm -f /tmp/libkrun-{{.HEADER_VERSION}}.h
- cmd: git diff --stat krun/libkrun.h || true
ignore_error: true
sources:
- versions.env
generates:
- krun/libkrun.h

# =============================================================================
# Fetch Pre-built Artifacts
# =============================================================================
Expand Down
2 changes: 1 addition & 1 deletion docs/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,5 @@ libkrunfw bundles a Linux kernel compiled with the `kvm` guest patches.
The kernel is licensed under GPL-2.0-only. If you distribute a binary
that embeds libkrunfw, you must provide the corresponding kernel source
(or a written offer to provide it). See the
[libkrunfw repository](https://github.com/containers/libkrunfw) for
[libkrunfw repository](https://github.com/libkrun/libkrunfw) for
source availability.
4 changes: 2 additions & 2 deletions images/builder/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ RUN dnf install -y \
RUN mkdir -p /opt/libkrun-built/pkgconfig

# Build libkrunfw (compiles a Linux kernel -- this takes a while)
RUN git clone --depth 1 --branch "${LIBKRUNFW_VERSION}" https://github.com/containers/libkrunfw /opt/libkrunfw \
RUN git clone --depth 1 --branch "${LIBKRUNFW_VERSION}" https://github.com/libkrun/libkrunfw /opt/libkrunfw \
&& cd /opt/libkrunfw \
&& make \
&& cp /opt/libkrunfw/libkrunfw.so.5.* /opt/libkrun-built/libkrunfw.so.5

# Build libkrun (Rust project, built via Makefile with cargo)
RUN git clone --depth 1 --branch "${LIBKRUN_VERSION}" https://github.com/containers/libkrun /opt/libkrun \
RUN git clone --depth 1 --branch "${LIBKRUN_VERSION}" https://github.com/libkrun/libkrun /opt/libkrun \
&& cd /opt/libkrun \
&& make BLK=1 NET=1 \
&& cp /opt/libkrun/target/release/libkrun.so.1.* /opt/libkrun-built/libkrun.so.1 \
Expand Down
Loading
Loading