mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-09-27 05:44:52 +03:00
Compare commits
6 Commits
v7.2.0
...
v4.3-maint
Author | SHA1 | Date | |
---|---|---|---|
|
f9b65fa812 | ||
|
9816854ac4 | ||
|
8832b8a44f | ||
|
59fe946efc | ||
|
93d9f05684 | ||
|
acf1763033 |
@@ -1,5 +1,7 @@
|
||||
-I@abs_top_builddir@
|
||||
-I@abs_top_srcdir@
|
||||
-I@abs_top_builddir@/gnulib/lib
|
||||
-I@abs_top_srcdir@/gnulib/lib
|
||||
-I@abs_top_builddir@/include
|
||||
-I@abs_top_srcdir@/include
|
||||
-I@abs_top_builddir@/src
|
||||
|
1
.ctags
1
.ctags
@@ -3,4 +3,3 @@
|
||||
--exclude=*.html
|
||||
--exclude=*.html.in
|
||||
--langmap=c:+.h.in
|
||||
--c-kinds=+p
|
||||
|
@@ -1 +0,0 @@
|
||||
../.ctags
|
@@ -1,21 +0,0 @@
|
||||
# EditorConfig is a file format and collection of text editor plugins
|
||||
# for maintaining consistent coding styles between different editors
|
||||
# and IDEs. Most popular editors support this either natively or via
|
||||
# plugin.
|
||||
#
|
||||
# Check https://editorconfig.org for details.
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
charset = utf-8
|
||||
|
||||
[*.c]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.{rng,xml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
38
.github/lockdown.yml
vendored
38
.github/lockdown.yml
vendored
@@ -1,38 +0,0 @@
|
||||
# Configuration for Repo Lockdown - https://github.com/dessant/repo-lockdown
|
||||
|
||||
skipCreatedBefore: 2020-01-01
|
||||
|
||||
# Close issues and pull requests
|
||||
close: true
|
||||
|
||||
# Lock issues and pull requests
|
||||
lock: true
|
||||
|
||||
# Optionally, specify configuration settings just for `issues` or `pulls`
|
||||
issues:
|
||||
comment: |
|
||||
Thank you for your interest in the libvirt project.
|
||||
|
||||
Since this repository is a read-only mirror of the project's master repostory hosted on GitLab, issues opened here are not processed.
|
||||
|
||||
We kindly request that new issues are reported to
|
||||
|
||||
https://gitlab.com/libvirt/libvirt/-/issues/new
|
||||
|
||||
Thank you for your time and understanding.
|
||||
|
||||
pulls:
|
||||
comment: |
|
||||
Thank you for your interest in the libvirt project.
|
||||
|
||||
Since this repository is a read-only mirror of the project's master repostory hosted on GitLab, merge requests opened here are not processed.
|
||||
|
||||
We kindly request that contributors fork the project at
|
||||
|
||||
https://gitlab.com/libvirt/libvirt/
|
||||
|
||||
push changes to the fork, and then open a new merge request at
|
||||
|
||||
https://gitlab.com/libvirt/libvirt/-/merge_requests/new
|
||||
|
||||
Thank you for your time and understanding.
|
229
.gitignore
vendored
229
.gitignore
vendored
@@ -1,26 +1,215 @@
|
||||
# vim related ignores
|
||||
*.swp
|
||||
.lvimrc
|
||||
|
||||
# emacs related ignores
|
||||
*#*#
|
||||
*.#*#
|
||||
.#*
|
||||
*~
|
||||
|
||||
# git related ignores
|
||||
*.rej
|
||||
*.[187]
|
||||
*.[187].in
|
||||
*.a
|
||||
*.cov
|
||||
*.exe
|
||||
*.exe.manifest
|
||||
*.gcda
|
||||
*.gcno
|
||||
*.gcov
|
||||
*.html
|
||||
*.i
|
||||
*.init
|
||||
*.la
|
||||
*.lo
|
||||
*.loT
|
||||
*.o
|
||||
*.orig
|
||||
*.pem
|
||||
*.pyc
|
||||
*.rej
|
||||
*.s
|
||||
*.service
|
||||
*.socket
|
||||
*.swp
|
||||
*~
|
||||
.#*
|
||||
.color_coded
|
||||
.deps
|
||||
.dirstamp
|
||||
.gdb_history
|
||||
.git
|
||||
.git-module-status
|
||||
|
||||
# python related ignores
|
||||
__pycache__/
|
||||
|
||||
# libvirt related ignores
|
||||
.libs
|
||||
.lvimrc
|
||||
.memdump
|
||||
.sc-start-sc_*
|
||||
.ycm_extra_conf.py
|
||||
/AUTHORS
|
||||
/ChangeLog
|
||||
/GNUmakefile
|
||||
/INSTALL
|
||||
/NEWS
|
||||
/aclocal.m4
|
||||
/autom4te.cache
|
||||
/build-aux/*
|
||||
/build/
|
||||
/ci/scratch/
|
||||
/confdefs.h
|
||||
/config.cache
|
||||
/config.guess
|
||||
/config.h
|
||||
/config.h.in
|
||||
/config.log
|
||||
/config.rpath
|
||||
/config.status
|
||||
/config.sub
|
||||
/configure
|
||||
/configure.lineno
|
||||
/conftest.*
|
||||
/docs/aclperms.htmlinc
|
||||
/docs/apibuild.py.stamp
|
||||
/docs/devhelp/libvirt.devhelp
|
||||
/docs/hvsupport.html.in
|
||||
/docs/libvirt-admin-*.xml
|
||||
/docs/libvirt-api.xml
|
||||
/docs/libvirt-lxc-*.xml
|
||||
/docs/libvirt-qemu-*.xml
|
||||
/docs/libvirt-refs.xml
|
||||
/docs/news.html.in
|
||||
/docs/search.php
|
||||
/docs/todo.html.in
|
||||
/examples/admin/client_close
|
||||
/examples/admin/client_info
|
||||
/examples/admin/client_limits
|
||||
/examples/admin/list_clients
|
||||
/examples/admin/list_servers
|
||||
/examples/admin/logging
|
||||
/examples/admin/threadpool_params
|
||||
/examples/object-events/event-test
|
||||
/examples/dominfo/info1
|
||||
/examples/domsuspend/suspend
|
||||
/examples/dommigrate/dommigrate
|
||||
/examples/domtop/domtop
|
||||
/examples/hellolibvirt/hellolibvirt
|
||||
/examples/openauth/openauth
|
||||
/examples/rename/rename
|
||||
/gnulib/lib/*
|
||||
/gnulib/m4/*
|
||||
/gnulib/tests/*
|
||||
/include/libvirt/libvirt-common.h
|
||||
/libtool
|
||||
/libvirt-*.tar.xz
|
||||
/libvirt-[0-9]*
|
||||
/libvirt*.pc
|
||||
/libvirt.spec
|
||||
/ltconfig
|
||||
/ltmain.sh
|
||||
/m4/*
|
||||
/maint.mk
|
||||
/mingw-libvirt.spec
|
||||
/mkinstalldirs
|
||||
/po/*gmo
|
||||
/po/*po
|
||||
!/po/*.mini.po
|
||||
/po/*pot
|
||||
/proxy/
|
||||
/python/
|
||||
/run
|
||||
/sc_*
|
||||
/src/.*.stamp
|
||||
/src/*.pc
|
||||
/src/access/org.libvirt.api.policy
|
||||
/src/access/viraccessapicheck.c
|
||||
/src/access/viraccessapicheck.h
|
||||
/src/access/viraccessapichecklxc.c
|
||||
/src/access/viraccessapichecklxc.h
|
||||
/src/access/viraccessapicheckqemu.c
|
||||
/src/access/viraccessapicheckqemu.h
|
||||
/src/admin/admin_client.h
|
||||
/src/admin/admin_protocol.[ch]
|
||||
/src/admin/admin_server_dispatch_stubs.h
|
||||
/src/esx/*.generated.*
|
||||
/src/hyperv/*.generated.*
|
||||
/src/libvirt*.def
|
||||
/src/libvirt.syms
|
||||
/src/libvirt_access.syms
|
||||
/src/libvirt_access.xml
|
||||
/src/libvirt_access_lxc.syms
|
||||
/src/libvirt_access_lxc.xml
|
||||
/src/libvirt_access_qemu.syms
|
||||
/src/libvirt_access_qemu.xml
|
||||
/src/libvirt_admin.syms
|
||||
/src/libvirt_*.stp
|
||||
/src/libvirt_*helper
|
||||
/src/libvirt_*probes.h
|
||||
/src/libvirt_lxc
|
||||
/src/libvirtd
|
||||
/src/libvirtd*.logrotate
|
||||
/src/locking/libxl-lockd.conf
|
||||
/src/locking/libxl-sanlock.conf
|
||||
/src/locking/lock_daemon_dispatch_stubs.h
|
||||
/src/locking/lock_protocol.[ch]
|
||||
/src/locking/qemu-lockd.conf
|
||||
/src/locking/qemu-sanlock.conf
|
||||
/src/locking/test_libvirt_sanlock.aug
|
||||
/src/logging/log_daemon_dispatch_stubs.h
|
||||
/src/logging/log_protocol.[ch]
|
||||
/src/lxc/lxc_controller_dispatch.h
|
||||
/src/lxc/lxc_monitor_dispatch.h
|
||||
/src/lxc/lxc_monitor_protocol.c
|
||||
/src/lxc/lxc_monitor_protocol.h
|
||||
/src/lxc/lxc_protocol.[ch]
|
||||
/src/lxc/test_libvirtd_lxc.aug
|
||||
/src/qemu/test_libvirtd_qemu.aug
|
||||
/src/remote/*_client_bodies.h
|
||||
/src/remote/*_protocol.[ch]
|
||||
/src/remote/*_stubs.h
|
||||
/src/rpc/virkeepaliveprotocol.[ch]
|
||||
/src/rpc/virnetprotocol.[ch]
|
||||
/src/test_libvirt*.aug
|
||||
/src/test_virtlockd.aug
|
||||
/src/test_virtlogd.aug
|
||||
/src/util/virkeycodetable*.h
|
||||
/src/util/virkeynametable*.h
|
||||
/src/virt-aa-helper
|
||||
/src/virtlockd
|
||||
/src/virtlogd
|
||||
/src/virt-guest-shutdown.target
|
||||
/tests/*.log
|
||||
/tests/*.pid
|
||||
/tests/*.trs
|
||||
/tests/*test
|
||||
/tests/commandhelper
|
||||
/tests/qemucapsprobe
|
||||
!/tests/virsh-self-test
|
||||
!/tests/virt-aa-helper-test
|
||||
!/tests/virt-admin-self-test
|
||||
/tests/objectlocking
|
||||
/tests/objectlocking-files.txt
|
||||
/tests/objectlocking.cm[ix]
|
||||
/tests/reconnect
|
||||
/tests/ssh
|
||||
/tests/test_file_access.txt
|
||||
/tests/test_conf
|
||||
/tools/libvirt-guests.sh
|
||||
/tools/virt-login-shell
|
||||
/tools/virsh
|
||||
/tools/virsh-*-edit.c
|
||||
/tools/virt-admin
|
||||
/tools/virt-*-validate
|
||||
/tools/virt-sanlock-cleanup
|
||||
/tools/wireshark/src/plugin.c
|
||||
/tools/wireshark/src/libvirt
|
||||
/update.log
|
||||
GPATH
|
||||
GRTAGS
|
||||
GTAGS
|
||||
Makefile
|
||||
Makefile.in
|
||||
TAGS
|
||||
coverage
|
||||
cscope.files
|
||||
cscope.in.out
|
||||
cscope.out
|
||||
cscope.po.out
|
||||
results.log
|
||||
stamp-h
|
||||
stamp-h.in
|
||||
stamp-h1
|
||||
tags
|
||||
|
||||
# clangd related ignores
|
||||
.clangd
|
||||
compile_commands.json
|
||||
!/build-aux/*.pl
|
||||
!/gnulib/lib/Makefile.am
|
||||
!/gnulib/tests/Makefile.am
|
||||
!/m4/virt-*.m4
|
||||
|
613
.gitlab-ci.yml
613
.gitlab-ci.yml
@@ -1,613 +0,0 @@
|
||||
variables:
|
||||
GIT_DEPTH: 100
|
||||
|
||||
stages:
|
||||
- containers
|
||||
- builds
|
||||
- sanity_checks
|
||||
|
||||
.script_variables: &script_variables |
|
||||
export CCACHE_BASEDIR="$(pwd)"
|
||||
export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
|
||||
export CCACHE_MAXSIZE="500M"
|
||||
export PATH="$CCACHE_WRAPPERSDIR:$PATH"
|
||||
|
||||
# Common templates
|
||||
|
||||
.container_job:
|
||||
image: docker:stable
|
||||
stage: containers
|
||||
needs: []
|
||||
services:
|
||||
- docker:dind
|
||||
rules:
|
||||
- if: "$TEMPORARILY_DISABLED"
|
||||
allow_failure: true
|
||||
- when: on_success
|
||||
before_script:
|
||||
- export TAG="$CI_REGISTRY_IMAGE/ci-$NAME:latest"
|
||||
- export COMMON_TAG="$CI_REGISTRY/libvirt/libvirt/ci-$NAME:latest"
|
||||
- docker info
|
||||
- docker login registry.gitlab.com -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
|
||||
script:
|
||||
- docker pull "$TAG" || docker pull "$COMMON_TAG" || true
|
||||
- docker build --cache-from "$TAG" --cache-from "$COMMON_TAG" --tag "$TAG" -f "ci/containers/$NAME.Dockerfile" ci/containers
|
||||
- docker push "$TAG"
|
||||
after_script:
|
||||
- docker logout
|
||||
|
||||
# We build many containers which can be useful to debug problems but are not
|
||||
# needed for the pipeline itself to complete: those sometimes fail, and when
|
||||
# that happens it's mostly because of temporary issues with Debian sid. We
|
||||
# don't want those failures to affect the overall pipeline status
|
||||
.container_optional_job:
|
||||
extends: .container_job
|
||||
allow_failure: true
|
||||
|
||||
.native_build_job:
|
||||
stage: builds
|
||||
image: $CI_REGISTRY_IMAGE/ci-$NAME:latest
|
||||
rules:
|
||||
- if: "$TEMPORARILY_DISABLED"
|
||||
allow_failure: true
|
||||
- when: on_success
|
||||
cache:
|
||||
paths:
|
||||
- ccache/
|
||||
key: "$CI_JOB_NAME"
|
||||
before_script:
|
||||
- *script_variables
|
||||
script:
|
||||
- meson build --werror || (cat build/meson-logs/meson-log.txt && exit 1)
|
||||
- if test "$DIST" != "skip";
|
||||
then
|
||||
ninja -C build dist;
|
||||
else
|
||||
ninja -C build;
|
||||
ninja -C build test;
|
||||
fi
|
||||
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip";
|
||||
then
|
||||
rpmbuild --nodeps -ta build/meson-dist/libvirt-*.tar.xz;
|
||||
fi
|
||||
|
||||
# Jobs that we delegate to Cirrus CI because they require an operating
|
||||
# system other than Linux. These jobs will only run if the required
|
||||
# setup has been performed on the GitLab account (see ci/README.rst).
|
||||
#
|
||||
# The Cirrus CI configuration is generated by replacing target-specific
|
||||
# variables in a generic template: some of these variables are provided
|
||||
# when the GitLab CI job is defined, others are taken from a shell
|
||||
# snippet generated using lcitool.
|
||||
#
|
||||
# Note that the $PATH environment variable has to be treated with
|
||||
# special care, because we can't just override it at the GitLab CI job
|
||||
# definition level or we risk breaking it completely.
|
||||
.cirrus_build_job:
|
||||
stage: builds
|
||||
image: registry.gitlab.com/libvirt/libvirt-ci/cirrus-run:master
|
||||
needs: []
|
||||
script:
|
||||
- source ci/cirrus/$NAME.vars
|
||||
- sed -e "s|[@]CI_REPOSITORY_URL@|$CI_REPOSITORY_URL|g"
|
||||
-e "s|[@]CI_COMMIT_REF_NAME@|$CI_COMMIT_REF_NAME|g"
|
||||
-e "s|[@]CI_COMMIT_SHA@|$CI_COMMIT_SHA|g"
|
||||
-e "s|[@]CIRRUS_VM_INSTANCE_TYPE@|$CIRRUS_VM_INSTANCE_TYPE|g"
|
||||
-e "s|[@]CIRRUS_VM_IMAGE_SELECTOR@|$CIRRUS_VM_IMAGE_SELECTOR|g"
|
||||
-e "s|[@]CIRRUS_VM_IMAGE_NAME@|$CIRRUS_VM_IMAGE_NAME|g"
|
||||
-e "s|[@]UPDATE_COMMAND@|$UPDATE_COMMAND|g"
|
||||
-e "s|[@]INSTALL_COMMAND@|$INSTALL_COMMAND|g"
|
||||
-e "s|[@]PATH@|$PATH_EXTRA${PATH_EXTRA:+:}\$PATH|g"
|
||||
-e "s|[@]PKG_CONFIG_PATH@|$PKG_CONFIG_PATH|g"
|
||||
-e "s|[@]PKGS@|$PKGS|g"
|
||||
-e "s|[@]MAKE@|$MAKE|g"
|
||||
-e "s|[@]PYTHON@|$PYTHON|g"
|
||||
-e "s|[@]PIP3@|$PIP3|g"
|
||||
-e "s|[@]PYPI_PKGS@|$PYPI_PKGS|g"
|
||||
<ci/cirrus/build.yml >ci/cirrus/$NAME.yml
|
||||
- cat ci/cirrus/$NAME.yml
|
||||
- cirrus-run -v --show-build-log always ci/cirrus/$NAME.yml
|
||||
rules:
|
||||
- if: "$TEMPORARILY_DISABLED"
|
||||
allow_failure: true
|
||||
- if: "$CIRRUS_GITHUB_REPO && $CIRRUS_API_TOKEN"
|
||||
|
||||
.cross_build_job:
|
||||
stage: builds
|
||||
image: $CI_REGISTRY_IMAGE/ci-$NAME-cross-$CROSS:latest
|
||||
cache:
|
||||
paths:
|
||||
- ccache/
|
||||
key: "$CI_JOB_NAME"
|
||||
rules:
|
||||
- if: "$TEMPORARILY_DISABLED"
|
||||
allow_failure: true
|
||||
- when: on_success
|
||||
before_script:
|
||||
- *script_variables
|
||||
script:
|
||||
- meson build --werror $MESON_OPTS || (cat build/meson-logs/meson-log.txt && exit 1)
|
||||
- ninja -C build
|
||||
- if test "$CROSS" = "i686" ; then ninja -C build test ; fi
|
||||
|
||||
|
||||
# Native container build jobs
|
||||
|
||||
x64-centos-7-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: centos-7
|
||||
|
||||
x64-centos-8-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: centos-8
|
||||
|
||||
x64-centos-stream-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: centos-stream
|
||||
|
||||
x64-debian-10-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: debian-10
|
||||
|
||||
x64-debian-sid-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: debian-sid
|
||||
|
||||
x64-fedora-32-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: fedora-32
|
||||
|
||||
x64-fedora-33-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: fedora-33
|
||||
|
||||
x64-fedora-rawhide-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: fedora-rawhide
|
||||
|
||||
x64-opensuse-152-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: opensuse-152
|
||||
|
||||
x64-ubuntu-1804-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: ubuntu-1804
|
||||
|
||||
x64-ubuntu-2004-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: ubuntu-2004
|
||||
|
||||
|
||||
# Cross-build containers build jobs
|
||||
|
||||
aarch64-debian-10-container:
|
||||
extends: .container_optional_job
|
||||
variables:
|
||||
NAME: debian-10-cross-aarch64
|
||||
|
||||
armv6l-debian-10-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: debian-10-cross-armv6l
|
||||
|
||||
armv7l-debian-10-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: debian-10-cross-armv7l
|
||||
|
||||
i686-debian-10-container:
|
||||
extends: .container_optional_job
|
||||
variables:
|
||||
NAME: debian-10-cross-i686
|
||||
|
||||
mips-debian-10-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: debian-10-cross-mips
|
||||
|
||||
mips64el-debian-10-container:
|
||||
extends: .container_optional_job
|
||||
variables:
|
||||
NAME: debian-10-cross-mips64el
|
||||
|
||||
mipsel-debian-10-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: debian-10-cross-mipsel
|
||||
|
||||
ppc64le-debian-10-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: debian-10-cross-ppc64le
|
||||
|
||||
s390x-debian-10-container:
|
||||
extends: .container_optional_job
|
||||
variables:
|
||||
NAME: debian-10-cross-s390x
|
||||
|
||||
aarch64-debian-sid-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: debian-sid-cross-aarch64
|
||||
|
||||
armv6l-debian-sid-container:
|
||||
extends: .container_optional_job
|
||||
variables:
|
||||
NAME: debian-sid-cross-armv6l
|
||||
|
||||
armv7l-debian-sid-container:
|
||||
extends: .container_optional_job
|
||||
variables:
|
||||
NAME: debian-sid-cross-armv7l
|
||||
|
||||
i686-debian-sid-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: debian-sid-cross-i686
|
||||
|
||||
mips64el-debian-sid-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: debian-sid-cross-mips64el
|
||||
|
||||
mipsel-debian-sid-container:
|
||||
extends: .container_optional_job
|
||||
variables:
|
||||
NAME: debian-sid-cross-mipsel
|
||||
|
||||
ppc64le-debian-sid-container:
|
||||
extends: .container_optional_job
|
||||
variables:
|
||||
NAME: debian-sid-cross-ppc64le
|
||||
|
||||
s390x-debian-sid-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: debian-sid-cross-s390x
|
||||
|
||||
mingw32-fedora-rawhide-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: fedora-rawhide-cross-mingw32
|
||||
|
||||
mingw64-fedora-rawhide-container:
|
||||
extends: .container_job
|
||||
variables:
|
||||
NAME: fedora-rawhide-cross-mingw64
|
||||
|
||||
|
||||
# Native architecture build + test jobs
|
||||
|
||||
x64-debian-10:
|
||||
extends: .native_build_job
|
||||
needs:
|
||||
- x64-debian-10-container
|
||||
variables:
|
||||
NAME: debian-10
|
||||
|
||||
x64-debian-10-clang:
|
||||
extends: .native_build_job
|
||||
needs:
|
||||
- x64-debian-10-container
|
||||
variables:
|
||||
NAME: debian-10
|
||||
CC: clang
|
||||
|
||||
x64-debian-sid:
|
||||
extends: .native_build_job
|
||||
needs:
|
||||
- x64-debian-sid-container
|
||||
variables:
|
||||
NAME: debian-sid
|
||||
|
||||
x64-centos-7:
|
||||
extends: .native_build_job
|
||||
needs:
|
||||
- x64-centos-7-container
|
||||
variables:
|
||||
NAME: centos-7
|
||||
# meson dist fails on CentOS 7 because of old git that fails to clone
|
||||
# from shallow git repository which is done when running meson dist
|
||||
DIST: skip
|
||||
RPM: skip
|
||||
|
||||
x64-centos-8:
|
||||
extends: .native_build_job
|
||||
needs:
|
||||
- x64-centos-8-container
|
||||
variables:
|
||||
NAME: centos-8
|
||||
RPM: skip
|
||||
|
||||
x64-centos-8-clang:
|
||||
extends: .native_build_job
|
||||
needs:
|
||||
- x64-centos-8-container
|
||||
variables:
|
||||
NAME: centos-8
|
||||
CC: clang
|
||||
RPM: skip
|
||||
|
||||
x64-centos-stream:
|
||||
extends: .native_build_job
|
||||
needs:
|
||||
- x64-centos-stream-container
|
||||
variables:
|
||||
NAME: centos-stream
|
||||
RPM: skip
|
||||
|
||||
x64-fedora-32:
|
||||
extends: .native_build_job
|
||||
needs:
|
||||
- x64-fedora-32-container
|
||||
variables:
|
||||
NAME: fedora-32
|
||||
RPM: skip
|
||||
|
||||
x64-fedora-33:
|
||||
extends: .native_build_job
|
||||
needs:
|
||||
- x64-fedora-33-container
|
||||
variables:
|
||||
NAME: fedora-33
|
||||
|
||||
x64-fedora-rawhide:
|
||||
extends: .native_build_job
|
||||
needs:
|
||||
- x64-fedora-rawhide-container
|
||||
variables:
|
||||
NAME: fedora-rawhide
|
||||
# Temp workaround until we see what resolution is for
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1919965
|
||||
# Hopefully remove before F34 is released.
|
||||
CFLAGS: -gdwarf-4
|
||||
|
||||
x64-fedora-rawhide-clang:
|
||||
extends: .native_build_job
|
||||
needs:
|
||||
- x64-fedora-rawhide-container
|
||||
variables:
|
||||
NAME: fedora-rawhide
|
||||
CC: clang
|
||||
RPM: skip
|
||||
|
||||
x64-opensuse-152:
|
||||
extends: .native_build_job
|
||||
needs:
|
||||
- x64-opensuse-152-container
|
||||
variables:
|
||||
NAME: opensuse-152
|
||||
RPM: skip
|
||||
|
||||
x64-ubuntu-1804:
|
||||
extends: .native_build_job
|
||||
needs:
|
||||
- x64-ubuntu-1804-container
|
||||
variables:
|
||||
NAME: ubuntu-1804
|
||||
|
||||
x64-ubuntu-2004:
|
||||
extends: .native_build_job
|
||||
needs:
|
||||
- x64-ubuntu-2004-container
|
||||
variables:
|
||||
NAME: ubuntu-2004
|
||||
|
||||
x64-freebsd-12-build:
|
||||
extends: .cirrus_build_job
|
||||
variables:
|
||||
NAME: freebsd-12
|
||||
CIRRUS_VM_INSTANCE_TYPE: freebsd_instance
|
||||
CIRRUS_VM_IMAGE_SELECTOR: image_family
|
||||
CIRRUS_VM_IMAGE_NAME: freebsd-12-2
|
||||
UPDATE_COMMAND: pkg update
|
||||
INSTALL_COMMAND: pkg install -y
|
||||
|
||||
x64-macos-11-build:
|
||||
extends: .cirrus_build_job
|
||||
variables:
|
||||
NAME: macos-11
|
||||
CIRRUS_VM_INSTANCE_TYPE: osx_instance
|
||||
CIRRUS_VM_IMAGE_SELECTOR: image
|
||||
CIRRUS_VM_IMAGE_NAME: big-sur-base
|
||||
UPDATE_COMMAND: brew update
|
||||
INSTALL_COMMAND: brew install
|
||||
PATH_EXTRA: /usr/local/opt/ccache/libexec:/usr/local/opt/gettext/bin:/usr/local/opt/libpcap/bin:/usr/local/opt/libxslt/bin:/usr/local/opt/rpcgen/bin
|
||||
PKG_CONFIG_PATH: /usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/libpcap/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/ncurses/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig
|
||||
|
||||
|
||||
# Cross compiled build jobs
|
||||
|
||||
aarch64-debian-sid:
|
||||
extends: .cross_build_job
|
||||
needs:
|
||||
- aarch64-debian-sid-container
|
||||
variables:
|
||||
NAME: debian-sid
|
||||
CROSS: aarch64
|
||||
|
||||
armv6l-debian-10:
|
||||
extends: .cross_build_job
|
||||
needs:
|
||||
- armv6l-debian-10-container
|
||||
variables:
|
||||
NAME: debian-10
|
||||
CROSS: armv6l
|
||||
|
||||
armv7l-debian-10:
|
||||
extends: .cross_build_job
|
||||
needs:
|
||||
- armv7l-debian-10-container
|
||||
variables:
|
||||
NAME: debian-10
|
||||
CROSS: armv7l
|
||||
|
||||
i686-debian-sid:
|
||||
extends: .cross_build_job
|
||||
needs:
|
||||
- i686-debian-sid-container
|
||||
variables:
|
||||
NAME: debian-sid
|
||||
CROSS: i686
|
||||
|
||||
mips-debian-10:
|
||||
extends: .cross_build_job
|
||||
needs:
|
||||
- mips-debian-10-container
|
||||
variables:
|
||||
NAME: debian-10
|
||||
CROSS: mips
|
||||
|
||||
mips64el-debian-sid:
|
||||
extends: .cross_build_job
|
||||
needs:
|
||||
- mips64el-debian-sid-container
|
||||
variables:
|
||||
NAME: debian-sid
|
||||
CROSS: mips64el
|
||||
|
||||
mipsel-debian-10:
|
||||
extends: .cross_build_job
|
||||
needs:
|
||||
- mipsel-debian-10-container
|
||||
variables:
|
||||
NAME: debian-10
|
||||
CROSS: mipsel
|
||||
|
||||
ppc64le-debian-10:
|
||||
extends: .cross_build_job
|
||||
needs:
|
||||
- ppc64le-debian-10-container
|
||||
variables:
|
||||
NAME: debian-10
|
||||
CROSS: ppc64le
|
||||
|
||||
s390x-debian-sid:
|
||||
extends: .cross_build_job
|
||||
needs:
|
||||
- s390x-debian-sid-container
|
||||
variables:
|
||||
NAME: debian-sid
|
||||
CROSS: s390x
|
||||
|
||||
mingw32-fedora-rawhide:
|
||||
extends: .cross_build_job
|
||||
needs:
|
||||
- mingw32-fedora-rawhide-container
|
||||
variables:
|
||||
NAME: fedora-rawhide
|
||||
CROSS: mingw32
|
||||
|
||||
mingw64-fedora-rawhide:
|
||||
extends: .cross_build_job
|
||||
needs:
|
||||
- mingw64-fedora-rawhide-container
|
||||
variables:
|
||||
NAME: fedora-rawhide
|
||||
CROSS: mingw64
|
||||
|
||||
|
||||
# This artifact published by this job is downloaded by libvirt.org to
|
||||
# be deployed to the web root:
|
||||
# https://gitlab.com/libvirt/libvirt/-/jobs/artifacts/master/download?job=website
|
||||
website:
|
||||
stage: builds
|
||||
image: $CI_REGISTRY_IMAGE/ci-centos-8:latest
|
||||
needs:
|
||||
- x64-centos-8-container
|
||||
before_script:
|
||||
- *script_variables
|
||||
script:
|
||||
- meson build --prefix=$(pwd)/vroot || (cat build/meson-logs/meson-log.txt && exit 1)
|
||||
- ninja -C build install-web
|
||||
- mv vroot/share/doc/libvirt/html/ website
|
||||
artifacts:
|
||||
expose_as: 'Website'
|
||||
name: 'website'
|
||||
when: on_success
|
||||
expire_in: 30 days
|
||||
paths:
|
||||
- website
|
||||
|
||||
|
||||
codestyle:
|
||||
stage: builds
|
||||
image: $CI_REGISTRY_IMAGE/ci-opensuse-152:latest
|
||||
needs:
|
||||
- x64-opensuse-152-container
|
||||
before_script:
|
||||
- *script_variables
|
||||
script:
|
||||
- meson build || (cat build/meson-logs/meson-log.txt && exit 1)
|
||||
- ninja -C build libvirt-pot-dep
|
||||
- meson test -C build --suite syntax-check --no-rebuild || (cat build/meson-logs/testlog.txt && exit 1)
|
||||
|
||||
|
||||
# This artifact published by this job is downloaded to push to Weblate
|
||||
# for translation usage:
|
||||
# https://gitlab.com/libvirt/libvirt/-/jobs/artifacts/master/download?job=potfile
|
||||
potfile:
|
||||
stage: builds
|
||||
image: $CI_REGISTRY_IMAGE/ci-centos-8:latest
|
||||
needs:
|
||||
- x64-centos-8-container
|
||||
rules:
|
||||
- if: "$CI_COMMIT_BRANCH == 'master'"
|
||||
before_script:
|
||||
- *script_variables
|
||||
script:
|
||||
- meson build || (cat build/meson-logs/meson-log.txt && exit 1)
|
||||
- ninja -C build libvirt-pot-dep
|
||||
- ninja -C build libvirt-pot
|
||||
- cp po/libvirt.pot libvirt.pot
|
||||
artifacts:
|
||||
expose_as: 'Potfile'
|
||||
name: 'potfile'
|
||||
when: on_success
|
||||
expire_in: 30 days
|
||||
paths:
|
||||
- libvirt.pot
|
||||
|
||||
|
||||
# Check that all commits are signed-off for the DCO.
|
||||
# Skip on "libvirt" namespace, since we only need to run
|
||||
# this test on developer's personal forks from which
|
||||
# merge requests are submitted
|
||||
check-dco:
|
||||
stage: sanity_checks
|
||||
needs: []
|
||||
image: registry.gitlab.com/libvirt/libvirt-ci/check-dco:master
|
||||
script:
|
||||
- /check-dco
|
||||
rules:
|
||||
- if: "$CI_PROJECT_NAMESPACE != 'libvirt'"
|
||||
variables:
|
||||
GIT_DEPTH: 1000
|
||||
|
||||
|
||||
# Coverity job that is run only by schedules
|
||||
coverity:
|
||||
image: $CI_REGISTRY_IMAGE/ci-centos-8:latest
|
||||
needs:
|
||||
- x64-centos-8-container
|
||||
stage: builds
|
||||
script:
|
||||
- curl https://scan.coverity.com/download/linux64 --form project=$COVERITY_SCAN_PROJECT_NAME --form token=$COVERITY_SCAN_TOKEN -o /tmp/cov-analysis-linux64.tgz
|
||||
- tar xfz /tmp/cov-analysis-linux64.tgz
|
||||
- meson build
|
||||
- cov-analysis-linux64-*/bin/cov-build --dir cov-int ninja -C build
|
||||
- tar cfz cov-int.tar.gz cov-int
|
||||
- curl https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME --form token=$COVERITY_SCAN_TOKEN --form email=$GITLAB_USER_EMAIL --form file=@cov-int.tar.gz --form version="$(git describe --tags)" --form description="$(git describe --tags) / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID"
|
||||
rules:
|
||||
- if: "$CI_PIPELINE_SOURCE == 'schedule' && $COVERITY_SCAN_PROJECT_NAME && $COVERITY_SCAN_TOKEN"
|
@@ -1,24 +0,0 @@
|
||||
<!-- See https://libvirt.org/bugs.html#quality for guidance -->
|
||||
|
||||
## Software environment
|
||||
- Operating system:
|
||||
- Architecture:
|
||||
- kernel version:
|
||||
- libvirt version:
|
||||
- Hypervisor and version:
|
||||
|
||||
## Description of problem
|
||||
|
||||
## Steps to reproduce
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
## Additional information
|
||||
<!-- Attach XML configs, logs, stack traces, etc. Compress the files if necessary -->
|
||||
<!-- See https://libvirt.org/kbase/debuglogs.html on how to configure logging -->
|
||||
|
||||
|
||||
|
||||
<!-- The line below ensures that proper tags are added to the issue. -- >
|
||||
/label ~bug
|
@@ -1,14 +0,0 @@
|
||||
## Goal
|
||||
<!-- Describe the final result you want to achieve. Avoid design specifics. -->
|
||||
|
||||
|
||||
## Technical details
|
||||
<!-- Describe technical details, design specifics, suggestions, versions, etc. -->
|
||||
|
||||
|
||||
## Additional information
|
||||
|
||||
|
||||
|
||||
<!-- The line below ensures that proper tags are added to the issue. -- >
|
||||
/label ~enhancement
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +1,6 @@
|
||||
[submodule "gnulib"]
|
||||
path = .gnulib
|
||||
url = https://git.savannah.gnu.org/git/gnulib.git/
|
||||
[submodule "keycodemapdb"]
|
||||
path = src/keycodemapdb
|
||||
url = https://gitlab.com/keycodemap/keycodemapdb.git
|
||||
|
@@ -1,4 +1,3 @@
|
||||
[gitpublishprofile "default"]
|
||||
base = master
|
||||
to = libvir-list@redhat.com
|
||||
prefix = libvirt PATCH
|
||||
|
1
.gnulib
Submodule
1
.gnulib
Submodule
Submodule .gnulib added at d6397dde2e
22
.mailmap
22
.mailmap
@@ -20,6 +20,7 @@
|
||||
<jfehlig@suse.com> <jfehlig@novell.com>
|
||||
<jfehlig@suse.com> <jfehlig@linux-ypgk.site>
|
||||
<jclift@redhat.com> <justin@salasaga.org>
|
||||
<berrange@redhat.com> <dan@berrange.com>
|
||||
<soren@linux2go.dk> <soren@canonical.com>
|
||||
<cfergeau@redhat.com> <teuf@gnome.org>
|
||||
<wency@cn.fujitsu.com> <wency cn fujitsu com>
|
||||
@@ -38,16 +39,6 @@
|
||||
<zhlcindy@linux.vnet.ibm.com> <zhlcindy@gmail.com>
|
||||
<serge.hallyn@canonical.com> <serue@us.ibm.com>
|
||||
<pritesh.kothari@sun.com> <Pritesh.Kothari@Sun.COM>
|
||||
<cbosdonnat@suse.com> <cedric.bosdonnat@free.fr>
|
||||
<mnestratov@virtuozzo.com> <mnestratov@parallels.com>
|
||||
<nshirokovskiy@virtuozzo.com> <nshirokovskiy@parallels.com>
|
||||
<jyang@redhat.com> <osier@yunify.com>
|
||||
<kkoukiou@redhat.com> <k.koukiou@googlemail.com>
|
||||
<intrigeri@boum.org> <intrigeri+libvirt@boum.org>
|
||||
<fidencio@redhat.com> <fabiano@fidencio.org>
|
||||
<shi_lei@massclouds.com> <shilei.massclouds@gmx.com>
|
||||
<adrian.brzezinski@eo.pl> <redhat@adrb.pl>
|
||||
<matt@datto.com> <mcoleman@datto.com>
|
||||
|
||||
# Name consolidation:
|
||||
# Preferred author spelling <preferred email>
|
||||
@@ -65,16 +56,9 @@ Aurelien Rougemont <beorn@binaries.fr>
|
||||
Serge E. Hallyn <serge.hallyn@canonical.com>
|
||||
Henrik Persson E <henrik.e.persson@ericsson.com>
|
||||
Philipp Hahn <hahn@univention.de>
|
||||
Marco Bozzolan <bozzolan@gmail.com>
|
||||
Marco Bozzolan <redshift@gmx.com>
|
||||
Pritesh Kothari <pritesh.kothari@sun.com>
|
||||
Wang Yufei (James) <james.wangyufei@huawei.com>
|
||||
Deepak C Shetty <dpkshetty@gmail.com>
|
||||
Dave Allan <dallan@redhat.com>
|
||||
Richard W.M. Jones <rjones@redhat.com>
|
||||
|
||||
# Non-trivial consolidation:
|
||||
# see git documentation for information about the format
|
||||
Daniel P. Berrangé <berrange@redhat.com>
|
||||
Daniel P. Berrangé <berrange@redhat.com> <dan@berrange.com>
|
||||
Michal Prívozník <mprivozn@redhat.com>
|
||||
Michal Prívozník <mprivozn@redhat.com> <miso.privoznik@gmail.com>
|
||||
Marco Bozzolan <bozzolan@gmail.com> <redshift@gmx.com>
|
||||
|
141
.travis.yml
Normal file
141
.travis.yml
Normal file
@@ -0,0 +1,141 @@
|
||||
sudo: false
|
||||
language: c
|
||||
cache: ccache
|
||||
|
||||
branches:
|
||||
except:
|
||||
- /^.*-maint$/
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- compiler: gcc
|
||||
dist: trusty
|
||||
env:
|
||||
- PYTHON=$(which python2)
|
||||
- DISTCHECK_CONFIGURE_FLAGS="--with-init-script=upstart"
|
||||
- compiler: clang
|
||||
dist: trusty
|
||||
env:
|
||||
- PYTHON=$(which python3)
|
||||
- DISTCHECK_CONFIGURE_FLAGS="--with-init-script=systemd"
|
||||
- compiler: clang
|
||||
os: osx
|
||||
before_install:
|
||||
- brew update
|
||||
- brew unlink python
|
||||
- brew upgrade
|
||||
- brew install rpcgen yajl
|
||||
script:
|
||||
# We can't run make distcheck/syntax-check because they
|
||||
# fail on macOS, but doing 'install' and 'dist' gives us
|
||||
# some useful coverage
|
||||
- make -j3 && make -j3 install && make -j3 dist
|
||||
|
||||
addons:
|
||||
apt:
|
||||
# Please keep this list sorted alphabetically
|
||||
packages:
|
||||
- augeas-tools
|
||||
- autoconf
|
||||
- automake
|
||||
- autopoint
|
||||
- bash-completion
|
||||
- ccache
|
||||
- dnsmasq-base
|
||||
- dwarves
|
||||
- ebtables
|
||||
- gcc
|
||||
- gettext
|
||||
- glusterfs-client
|
||||
- libacl1-dev
|
||||
- libapparmor-dev
|
||||
- libattr1-dev
|
||||
- libaudit-dev
|
||||
- libavahi-client-dev
|
||||
- libblkid-dev
|
||||
- libc6-dev
|
||||
- libcap-ng-dev
|
||||
- libc-dev-bin
|
||||
- libcurl4-gnutls-dev
|
||||
- libdbus-1-dev
|
||||
- libdevmapper-dev
|
||||
- libfuse-dev
|
||||
- libgnutls-dev
|
||||
- libnetcf-dev
|
||||
- libnl-3-dev
|
||||
- libnl-route-3-dev
|
||||
- libnuma-dev
|
||||
- libopenwsman-dev
|
||||
- libparted-dev
|
||||
- libpcap-dev
|
||||
- libpciaccess-dev
|
||||
- librbd-dev
|
||||
- libreadline-dev
|
||||
- libsanlock-dev
|
||||
- libsasl2-dev
|
||||
- libselinux1-dev
|
||||
- libssh2-1-dev
|
||||
- libssh-dev
|
||||
- libtirpc-dev
|
||||
- libtool
|
||||
- libudev-dev
|
||||
- libxen-dev
|
||||
- libxml2-dev
|
||||
- libxml2-utils
|
||||
- libyajl-dev
|
||||
- lvm2
|
||||
- make
|
||||
# - nfs-common # broken on trusty since build #807 (2018-01-09)
|
||||
- open-iscsi
|
||||
- parted
|
||||
- patch
|
||||
- perl
|
||||
- pkgconf
|
||||
- policykit-1
|
||||
- qemu-utils
|
||||
- radvd
|
||||
- scrub
|
||||
- sheepdog
|
||||
- systemtap-sdt-dev
|
||||
- xsltproc
|
||||
- zfs-fuse
|
||||
|
||||
git:
|
||||
submodules: true
|
||||
|
||||
env:
|
||||
global:
|
||||
# The custom $PATH is just to pick up some extra binaries installed
|
||||
# through homebrew on macOS and it's completely harmless on Linux
|
||||
- PATH="/usr/local/opt/gettext/bin:/usr/local/opt/rpcgen/bin:$PATH"
|
||||
- VIR_TEST_DEBUG=1
|
||||
|
||||
before_script:
|
||||
- ./autogen.sh --prefix=$(pwd)/install-root
|
||||
|
||||
script:
|
||||
- make -j3 && make -j3 syntax-check && make -j3 distcheck DISTCHECK_CONFIGURE_FLAGS=$DISTCHECK_CONFIGURE_FLAGS
|
||||
|
||||
after_failure:
|
||||
- echo '============================================================================'
|
||||
- 'if [ -f $(pwd)/tests/test-suite.log ]; then
|
||||
cat $(pwd)/tests/test-suite.log;
|
||||
else
|
||||
echo "=== NO LOG FILE FOUND ===";
|
||||
fi'
|
||||
|
||||
notifications:
|
||||
irc:
|
||||
# The channel name "irc.oftc.net#virt" is encrypted against libvirt/libvirt
|
||||
# to prevent IRC notifications from github forks. This was created using:
|
||||
# $ travis encrypt -r "libvirt/libvirt" "irc.oftc.net#virt"
|
||||
channels:
|
||||
- secure: "hUPdkLxX7nh75+clpnk4U0XLExLfV9DFKSvQSAUtf5JtDNMslj7AeOCf2wcbkNsEhkiF557odTAnov1s5m1w/yaa56zbjFAh5agzqRKya3QjqsrvlBKw/WuN+l82iMNLLeebTgCPAXrbAbGWH8YmYssp/7+eMsnKaVh84EQQNbMCHlLg6ovE26Fs18mZ6J5RC3OPa1vbv+xkdCHvGg/Oyp4K8bpU7RYyimA56jdxI/OfdTH9HxntHYSzykR7hDbyzZhdIlAUyRKReQVjcV5+R8fdDL/1imyGA/88KTztMeKXpZ5Rf+Ss3vYLZb6qsLLegCZ4AU/q0vvbWxjpZGJZoeyrVpfBTZdYGIzmLTMl9GYXXa/gDwFlbvRDiPDG4TIy6GlMUROinj7KRKEHu1fWRYu012ife5OjidxcwrTnz21vYaCv3AKWPpMPxwIzQPkY1hex9uLLX6z+TrAxxDLF+7UzRT9w2RLFBkLYlj2aDVrLAVb/ynRsxDz5CGzC61FSQVft2e308SkGjdn8YxvguCuXv+N70Fu1cvFyh5XYeHb4fbBRo0Ctzaec78leHlQvRGWKJxXDXRkE2lvvBc7YbBNSAYh7Fs8Y+zY7l7rMxvXdrt3nuaNQhe74V3yhxPDAld66qmAn9TYMmaZW2f5/KKKILLbCa0t2MxiAc6L2OI8="
|
||||
on_success: change
|
||||
on_failure: always
|
||||
email:
|
||||
# The list name 'libvirt-ci@redhat.com" is encrypted against libvirt/libvirt
|
||||
# to prevent IRC notifications from github forks. This was created using:
|
||||
# $ travis encrypt -r "libvirt/libvirt" "libvirt-ci@redhat.com"
|
||||
recipients:
|
||||
- secure: "QcU9eP96P0RlDNzVRZl/4sxyydPStGzECrpgJhr2IPB/7pHk23yaBrmUsq9S830tB+jwLGma1IscNB8uf7Sf7WY+cYIpfR8v030OffWnaipo/Gcs0dpnlfURWHjOFQI3RJzGEihsqvbwUFOwsM+3IDyO3qdWaiT6cN2Tj9ROlwYCySSX5YWzLyX7arBZ4lp8ESs7ohQaEwp2cegnMP2oGPJJe4SebvlCDjHZbjkU5aEradwUWnRQDJZWTKknpNLArVFxN2/ixp6f/MGY4DmkHoDweio6mHIPN5zTs5Jt32aiX6wDBa+bBa4v8TCRqzhYkQ63ZZhNV8bY5Uf9ufTdyvt96yIANyakd85b1QpMdAX76IyJi1l0/Uub6DTQZAcq3vK7iPjGeTVSpyoXrqTfGy4JxMjqDoocpWvv8ALX1wrYI/HfN2R2Aepw9jModTimOsebYhJ1yMhSt8qnh5AQNftGKL2JBKoA1LWdU2YJ5fO1bGjKNiVEkGFQTPYFWrYCUY5JcT+s5WCzNeMNm8s9na8liYhGl3WtS3rPr5M8bof+BMsBhG2hQ0loduc94x2GkvyhQZUgRbqrwNR+y4hn+rWFC3hBzzyiAULs43vY/PJ+eBdKEf3VAc0MkhQ8GgXGSA61fR6aXYonroI/WnBVItwDmUnnMfSziZXxk09GLl4="
|
@@ -1,6 +1,8 @@
|
||||
flags = [
|
||||
'-I@abs_top_builddir@',
|
||||
'-I@abs_top_srcdir@',
|
||||
'-I@abs_top_builddir@/gnulib/lib',
|
||||
'-I@abs_top_srcdir@/gnulib/lib',
|
||||
'-I@abs_top_builddir@/include',
|
||||
'-I@abs_top_srcdir@/include',
|
||||
'-I@abs_top_builddir@/src',
|
||||
|
102
AUTHORS.in
Normal file
102
AUTHORS.in
Normal file
@@ -0,0 +1,102 @@
|
||||
libvirt Authors
|
||||
===============
|
||||
|
||||
The libvirt project was initiated by:
|
||||
|
||||
Daniel Veillard <veillard@redhat.com> or <daniel@veillard.com>
|
||||
|
||||
The primary maintainers and people with commit access rights:
|
||||
|
||||
Alex Jia <ajia@redhat.com>
|
||||
Andrea Bolognani <abologna@redhat.com>
|
||||
Cédric Bosdonnat <cbosdonnat@suse.com>
|
||||
Christian Ehrhardt <christian.ehrhardt@canonical.com>
|
||||
Christophe Fergeau <cfergeau@redhat.com>
|
||||
Claudio Bley <claudio.bley@gmail.com>
|
||||
Cole Robinson <crobinso@redhat.com>
|
||||
Daniel Berrange <berrange@redhat.com>
|
||||
Daniel Veillard <veillard@redhat.com>
|
||||
Doug Goldstein <cardoe@gentoo.org>
|
||||
Eric Blake <eblake@redhat.com>
|
||||
Erik Skultety <eskultet@redhat.com>
|
||||
Gao Feng <gaofeng@cn.fujitsu.com>
|
||||
Guido Günther <agx@sigxcpu.org>
|
||||
Ján Tomko <jtomko@redhat.com>
|
||||
Jim Fehlig <jfehlig@suse.com>
|
||||
Jiří Denemark <jdenemar@redhat.com>
|
||||
John Ferlan <jferlan@redhat.com>
|
||||
Laine Stump <laine@redhat.com>
|
||||
Mark McLoughlin <markmc@redhat.com>
|
||||
Martin Kletzander <mkletzan@redhat.com>
|
||||
Matthias Bolte <matthias.bolte@googlemail.com>
|
||||
Maxim Nestratov <mnestratov@virtuozzo.com>
|
||||
Michal Prívozník <mprivozn@redhat.com>
|
||||
Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
|
||||
Pavel Hrdina <phrdina@redhat.com>
|
||||
Peter Krempa <pkrempa@redhat.com>
|
||||
Richard W.M. Jones <rjones@redhat.com>
|
||||
Roman Bogorodskiy <bogorodskiy@gmail.com>
|
||||
Stefan Berger <stefanb@us.ibm.com>
|
||||
Wen Congyang <wency@cn.fujitsu.com>
|
||||
|
||||
Previous maintainers:
|
||||
|
||||
Anthony Liguori <aliguori@us.ibm.com>
|
||||
Atsushi SAKAI <sakaia@jp.fujitsu.com>
|
||||
Chris Lalancette <clalance@redhat.com>
|
||||
Dan Smith <danms@us.ibm.com>
|
||||
Dave Allan <dallan@redhat.com>
|
||||
Dave Leskovec <dlesko@linux.vnet.ibm.com>
|
||||
Dmitry Guryanov <dguryanov@parallels.com>
|
||||
Guannan Ren <gren@redhat.com>
|
||||
Jim Meyering <meyering@redhat.com>
|
||||
John Levon <john.levon@sun.com>
|
||||
Justin Clift <jclift@redhat.com>
|
||||
Karel Zak <kzak@redhat.com>
|
||||
Osier Yang <jyang@redhat.com>
|
||||
|
||||
Patches have also been contributed by:
|
||||
|
||||
Abel Míguez Rodríguez <amiguezr@pdi.ucm.es>
|
||||
Amit Shah <amit.shah@redhat.com>
|
||||
Andrew Puch <apuch@redhat.com>
|
||||
Anton Protopopov <aspsk2@gmail.com>
|
||||
Ben Guthro <ben.guthro@gmail.com>
|
||||
Daniel Hokka Zakrisson <daniel@hozac.com>
|
||||
Dan Wendlandt <dan@nicira.com>
|
||||
David Lively <dlively@virtualiron.com>
|
||||
David Lutterkort <dlutter@redhat.com>
|
||||
Evgeniy Sokolov <evg@openvz.org>
|
||||
Hugh Brock <hbrock@redhat.com>
|
||||
Itamar Heim <iheim@redhat.com>
|
||||
James Morris <jmorris@namei.org>
|
||||
Javier Fontan <jfontan@gmail.com>
|
||||
Jeremy Katz <katzj@redhat.com>
|
||||
Kaitlin Rupert <kaitlin@linux.vnet.ibm.com>
|
||||
Kazuki Mizushima <mizushima.kazuk@jp.fujitsu.com>
|
||||
Mads Chr. Olesen <shiyee@shiyee.dk>
|
||||
Mark Johnson <johnson.nh@gmail.com>
|
||||
Markus Armbruster <armbru@redhat.com>
|
||||
Masayuki Sunou <fj1826dm@aa.jp.fujitsu.com>
|
||||
Matthias Witte <witte@netzquadrat.de>
|
||||
Michel Ponceau <michel.ponceau@bull.net>
|
||||
Nobuhiro Itou <fj0873gn@aa.jp.fujitsu.com>
|
||||
Pete Vetere <pvetere@redhat.com>
|
||||
Philippe Berthault <philippe.berthault@Bull.net>
|
||||
Saori Fukuta <fukuta.saori@jp.fujitsu.com>
|
||||
Shigeki Sakamoto <fj0588di@aa.jp.fujitsu.com>
|
||||
Shuveb Hussain <shuveb@binarykarma.com>
|
||||
Stefan de Konink <dekonink@kinkrsoftware.nl>
|
||||
Takahashi Tomohiro <takatom@jp.fujitsu.com>
|
||||
Tatsuro Enokura <fj7716hz@aa.jp.fujitsu.com>
|
||||
|
||||
#authorslist#
|
||||
|
||||
[....send patches to get your name here....]
|
||||
|
||||
The libvirt logo was designed by Diana Fong
|
||||
|
||||
-- End
|
||||
;; Local Variables:
|
||||
;; coding: utf-8
|
||||
;; End:
|
@@ -1,99 +0,0 @@
|
||||
===============
|
||||
libvirt Authors
|
||||
===============
|
||||
|
||||
The libvirt project was initiated by:
|
||||
|
||||
* Daniel Veillard <veillard@redhat.com> or <daniel@veillard.com>
|
||||
|
||||
The primary maintainers and people with commit access rights:
|
||||
|
||||
* Andrea Bolognani <abologna@redhat.com>
|
||||
* Cédric Bosdonnat <cbosdonnat@suse.com>
|
||||
* Christian Ehrhardt <christian.ehrhardt@canonical.com>
|
||||
* Christophe Fergeau <cfergeau@redhat.com>
|
||||
* Cole Robinson <crobinso@redhat.com>
|
||||
* Daniel P. Berrangé <berrange@redhat.com>
|
||||
* Daniel Veillard <veillard@redhat.com>
|
||||
* Eric Blake <eblake@redhat.com>
|
||||
* Erik Skultety <eskultet@redhat.com>
|
||||
* Fabiano Fidêncio <fidencio@redhat.com>
|
||||
* Guido Günther <agx@sigxcpu.org>
|
||||
* Ján Tomko <jtomko@redhat.com>
|
||||
* Jim Fehlig <jfehlig@suse.com>
|
||||
* Jiří Denemark <jdenemar@redhat.com>
|
||||
* Laine Stump <laine@redhat.com>
|
||||
* Martin Kletzander <mkletzan@redhat.com>
|
||||
* Michal Prívozník <mprivozn@redhat.com>
|
||||
* Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
|
||||
* Pavel Hrdina <phrdina@redhat.com>
|
||||
* Peter Krempa <pkrempa@redhat.com>
|
||||
* Pino Toscano <ptoscano@redhat.com>
|
||||
* Richard W.M. Jones <rjones@redhat.com>
|
||||
* Roman Bogorodskiy <bogorodskiy@gmail.com>
|
||||
|
||||
Previous maintainers:
|
||||
|
||||
* Alex Jia <ajia@redhat.com>
|
||||
* Anthony Liguori <aliguori@us.ibm.com>
|
||||
* Atsushi SAKAI <sakaia@jp.fujitsu.com>
|
||||
* Chris Lalancette <clalance@redhat.com>
|
||||
* Claudio Bley <claudio.bley@gmail.com>
|
||||
* Dan Smith <danms@us.ibm.com>
|
||||
* Dave Allan <dallan@redhat.com>
|
||||
* Dave Leskovec <dlesko@linux.vnet.ibm.com>
|
||||
* Dmitry Guryanov <dguryanov@parallels.com>
|
||||
* Doug Goldstein <cardoe@gentoo.org>
|
||||
* Gao Feng <gaofeng@cn.fujitsu.com>
|
||||
* Guannan Ren <gren@redhat.com>
|
||||
* Jim Meyering <meyering@redhat.com>
|
||||
* John Ferlan <jferlan@redhat.com>
|
||||
* John Levon <john.levon@sun.com>
|
||||
* Justin Clift <jclift@redhat.com>
|
||||
* Karel Zak <kzak@redhat.com>
|
||||
* Katerina Koukiou <kkoukiou@redhat.com>
|
||||
* Mark McLoughlin <markmc@redhat.com>
|
||||
* Matthias Bolte <matthias.bolte@googlemail.com>
|
||||
* Maxim Nestratov <mnestratov@virtuozzo.com>
|
||||
* Osier Yang <jyang@redhat.com>
|
||||
* Stefan Berger <stefanb@us.ibm.com>
|
||||
* Wen Congyang <wency@cn.fujitsu.com>
|
||||
|
||||
Patches have also been contributed by:
|
||||
|
||||
* Abel Míguez Rodríguez <amiguezr@pdi.ucm.es>
|
||||
* Amit Shah <amit.shah@redhat.com>
|
||||
* Andrew Puch <apuch@redhat.com>
|
||||
* Anton Protopopov <aspsk2@gmail.com>
|
||||
* Ben Guthro <ben.guthro@gmail.com>
|
||||
* Daniel Hokka Zakrisson <daniel@hozac.com>
|
||||
* Dan Wendlandt <dan@nicira.com>
|
||||
* David Lively <dlively@virtualiron.com>
|
||||
* David Lutterkort <dlutter@redhat.com>
|
||||
* Evgeniy Sokolov <evg@openvz.org>
|
||||
* Hugh Brock <hbrock@redhat.com>
|
||||
* Itamar Heim <iheim@redhat.com>
|
||||
* James Morris <jmorris@namei.org>
|
||||
* Javier Fontan <jfontan@gmail.com>
|
||||
* Jeremy Katz <katzj@redhat.com>
|
||||
* Kaitlin Rupert <kaitlin@linux.vnet.ibm.com>
|
||||
* Kazuki Mizushima <mizushima.kazuk@jp.fujitsu.com>
|
||||
* Mads Chr. Olesen <shiyee@shiyee.dk>
|
||||
* Mark Johnson <johnson.nh@gmail.com>
|
||||
* Markus Armbruster <armbru@redhat.com>
|
||||
* Masayuki Sunou <fj1826dm@aa.jp.fujitsu.com>
|
||||
* Matthias Witte <witte@netzquadrat.de>
|
||||
* Michel Ponceau <michel.ponceau@bull.net>
|
||||
* Nobuhiro Itou <fj0873gn@aa.jp.fujitsu.com>
|
||||
* Pete Vetere <pvetere@redhat.com>
|
||||
* Philippe Berthault <philippe.berthault@Bull.net>
|
||||
* Saori Fukuta <fukuta.saori@jp.fujitsu.com>
|
||||
* Shigeki Sakamoto <fj0588di@aa.jp.fujitsu.com>
|
||||
* Shuveb Hussain <shuveb@binarykarma.com>
|
||||
* Stefan de Konink <dekonink@kinkrsoftware.nl>
|
||||
* Takahashi Tomohiro <takatom@jp.fujitsu.com>
|
||||
* Tatsuro Enokura <fj7716hz@aa.jp.fujitsu.com>
|
||||
|
||||
@contributorslist@
|
||||
|
||||
The libvirt logo was designed by Diana Fong
|
@@ -1,45 +0,0 @@
|
||||
=======================
|
||||
Contributing to libvirt
|
||||
=======================
|
||||
|
||||
Full, up to date information on how to contribute to libvirt can be
|
||||
found on the libvirt website:
|
||||
|
||||
https://libvirt.org/contribute.html
|
||||
|
||||
To build the same document locally, from the top level directory of
|
||||
your git clone run:
|
||||
|
||||
::
|
||||
|
||||
$ meson build
|
||||
$ ninja -C build
|
||||
|
||||
You'll find the freshly-built document in ``docs/contribute.html``.
|
||||
|
||||
If ``meson setup`` fails because of missing dependencies, you can set
|
||||
up your system by calling
|
||||
|
||||
::
|
||||
|
||||
$ sudo dnf builddep libvirt
|
||||
|
||||
if you're on a RHEL-based distribution or
|
||||
|
||||
::
|
||||
|
||||
$ sudo apt-get build-dep libvirt
|
||||
|
||||
if you're on a Debian-based one.
|
||||
|
||||
Note that, for the RHEL-based case, if you're on a machine where you
|
||||
haven't done any C development before, you will probably also need
|
||||
to run
|
||||
|
||||
::
|
||||
|
||||
$ sudo dnf install gcc make ninja-build rpm-build
|
||||
|
||||
You might still be missing some dependencies if your distribution is
|
||||
shipping an old libvirt version, but that will get you much closer to
|
||||
where you need to be to build successfully from source.
|
16699
ChangeLog-old
Normal file
16699
ChangeLog-old
Normal file
File diff suppressed because it is too large
Load Diff
117
Makefile.am
Normal file
117
Makefile.am
Normal file
@@ -0,0 +1,117 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
## Copyright (C) 2005-2013 Red Hat, Inc.
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
## modify it under the terms of the GNU Lesser General Public
|
||||
## License as published by the Free Software Foundation; either
|
||||
## version 2.1 of the License, or (at your option) any later version.
|
||||
##
|
||||
## This library is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
## Lesser General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU Lesser General Public
|
||||
## License along with this library. If not, see
|
||||
## <http://www.gnu.org/licenses/>.
|
||||
|
||||
LCOV = lcov
|
||||
GENHTML = genhtml
|
||||
|
||||
SUBDIRS = . gnulib/lib include/libvirt src tools docs gnulib/tests \
|
||||
tests po examples
|
||||
|
||||
XZ_OPT ?= -v -T0
|
||||
export XZ_OPT
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
EXTRA_DIST = \
|
||||
config-post.h \
|
||||
ChangeLog-old \
|
||||
libvirt.spec libvirt.spec.in \
|
||||
mingw-libvirt.spec.in \
|
||||
libvirt.pc.in \
|
||||
libvirt-qemu.pc.in \
|
||||
libvirt-lxc.pc.in \
|
||||
libvirt-admin.pc.in \
|
||||
Makefile.nonreentrant \
|
||||
autogen.sh \
|
||||
cfg.mk \
|
||||
run.in \
|
||||
README.md \
|
||||
AUTHORS.in
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libvirt.pc libvirt-qemu.pc libvirt-lxc.pc libvirt-admin.pc
|
||||
|
||||
NEWS: \
|
||||
$(srcdir)/docs/news.xml \
|
||||
$(srcdir)/docs/news-ascii.xsl \
|
||||
$(srcdir)/docs/reformat-news.py
|
||||
$(AM_V_GEN) \
|
||||
if [ -x $(XSLTPROC) ]; then \
|
||||
$(XSLTPROC) --nonet \
|
||||
$(srcdir)/docs/news-ascii.xsl \
|
||||
$(srcdir)/docs/news.xml \
|
||||
>$@-tmp \
|
||||
|| { rm -f $@-tmp; exit 1; }; \
|
||||
$(PYTHON) $(srcdir)/docs/reformat-news.py $@-tmp >$@ \
|
||||
|| { rm -f $@-tmp; exit 1; }; \
|
||||
rm -f $@-tmp; \
|
||||
fi
|
||||
EXTRA_DIST += \
|
||||
$(srcdir)/docs/news.xml \
|
||||
$(srcdir)/docs/news-ascii.xsl \
|
||||
$(srcdir)/docs/reformat-news.py
|
||||
|
||||
rpm: clean
|
||||
@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.xz)
|
||||
|
||||
srpm: clean
|
||||
@(unset CDPATH ; $(MAKE) dist && rpmbuild -ts $(distdir).tar.xz)
|
||||
|
||||
check-local: all tests
|
||||
|
||||
check-access:
|
||||
@($(MAKE) $(AM_MAKEFLAGS) -C tests check-access)
|
||||
|
||||
cov: clean-cov
|
||||
$(MKDIR_P) $(top_builddir)/coverage
|
||||
$(LCOV) -c -o $(top_builddir)/coverage/libvirt.info.tmp \
|
||||
-d $(top_builddir)/src -d $(top_builddir)/daemon \
|
||||
-d $(top_builddir)/tests
|
||||
$(LCOV) -r $(top_builddir)/coverage/libvirt.info.tmp \
|
||||
-o $(top_builddir)/coverage/libvirt.info
|
||||
rm $(top_builddir)/coverage/libvirt.info.tmp
|
||||
$(GENHTML) --show-details -t "libvirt" -o $(top_builddir)/coverage \
|
||||
--legend $(top_builddir)/coverage/libvirt.info
|
||||
|
||||
clean-cov:
|
||||
rm -rf $(top_builddir)/coverage
|
||||
|
||||
MAINTAINERCLEANFILES = .git-module-status
|
||||
|
||||
dist-hook: gen-ChangeLog gen-AUTHORS
|
||||
|
||||
# Generate the ChangeLog file (with all entries since the switch to git)
|
||||
# and insert it into the directory we're about to use to create a tarball.
|
||||
gen_start_date = 2009-07-04
|
||||
.PHONY: gen-ChangeLog
|
||||
gen-ChangeLog:
|
||||
$(AM_V_GEN)if test -d .git; then \
|
||||
$(top_srcdir)/build-aux/gitlog-to-changelog \
|
||||
--since=$(gen_start_date) > $(distdir)/cl-t; \
|
||||
rm -f $(distdir)/ChangeLog; \
|
||||
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
|
||||
fi
|
||||
|
||||
.PHONY: gen-AUTHORS
|
||||
gen-AUTHORS:
|
||||
$(AM_V_GEN)if test -d $(srcdir)/.git; then \
|
||||
out="`cd $(srcdir) && git log --pretty=format:'%aN <%aE>' | sort -u`" && \
|
||||
perl -p -e "s/#authorslist#// and print '$$out'" \
|
||||
< $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp && \
|
||||
mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ; \
|
||||
fi
|
58
README-hacking
Normal file
58
README-hacking
Normal file
@@ -0,0 +1,58 @@
|
||||
-*- outline -*-
|
||||
|
||||
These notes intend to help people working on the checked-out sources.
|
||||
These requirements do not apply when building from a distribution tarball.
|
||||
See also docs/hacking.html (after building libvirt using the information
|
||||
included in this file) for more detailed contribution guidelines.
|
||||
|
||||
* Requirements
|
||||
|
||||
We've opted to keep only the highest-level sources in the GIT repository.
|
||||
This eases our maintenance burden, (fewer merges etc.), but imposes more
|
||||
requirements on anyone wishing to build from the just-checked-out sources.
|
||||
Note the requirements to build the released archive are much less and
|
||||
are just the requirements of the standard ./configure && make procedure.
|
||||
Specific development tools and versions will be checked for and listed by
|
||||
the bootstrap script.
|
||||
|
||||
Valgrind <http://valgrind.org/> is also highly recommended, if
|
||||
Valgrind supports your architecture.
|
||||
|
||||
While building from a just-cloned source tree may require installing a
|
||||
few prerequisites, later, a plain `git pull && make' should be sufficient.
|
||||
|
||||
* First GIT checkout
|
||||
|
||||
You can get a copy of the source repository like this:
|
||||
|
||||
$ git clone https://libvirt.org/git/libvirt.git
|
||||
$ cd libvirt
|
||||
|
||||
As an optional step, if you already have a copy of the gnulib git
|
||||
repository on your hard drive, then you can use it as a reference to
|
||||
reduce download time and disk space requirements:
|
||||
|
||||
$ export GNULIB_SRCDIR=/path/to/gnulib
|
||||
|
||||
The next step is to get all required pieces from gnulib,
|
||||
to run autoreconf, and to invoke ./configure:
|
||||
|
||||
$ ./autogen.sh
|
||||
|
||||
And there you are! Just
|
||||
|
||||
$ make
|
||||
$ make check
|
||||
|
||||
At this point, there should be no difference between your local copy,
|
||||
and the GIT master copy:
|
||||
|
||||
$ git diff
|
||||
|
||||
should output no difference.
|
||||
|
||||
Enjoy!
|
||||
|
||||
Local Variables:
|
||||
indent-tabs-mode: nil
|
||||
End:
|
83
README.md
Normal file
83
README.md
Normal file
@@ -0,0 +1,83 @@
|
||||
[](https://travis-ci.org/libvirt/libvirt)
|
||||
[](https://bestpractices.coreinfrastructure.org/projects/355)
|
||||
|
||||
Libvirt API for virtualization
|
||||
==============================
|
||||
|
||||
Libvirt provides a portable, long term stable C API for managing the
|
||||
virtualization technologies provided by many operating systems. It
|
||||
includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware
|
||||
vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER
|
||||
Hypervisor.
|
||||
|
||||
For some of these hypervisors, it provides a stateful management
|
||||
daemon which runs on the virtualization host allowing access to the
|
||||
API both by non-privileged local users and remote users.
|
||||
|
||||
Layered packages provide bindings of the libvirt C API into other
|
||||
languages including Python, Perl, PHP, Go, Java, OCaml, as well as
|
||||
mappings into object systems such as GObject, CIM and SNMP.
|
||||
|
||||
Further information about the libvirt project can be found on the
|
||||
website:
|
||||
|
||||
[https://libvirt.org](https://libvirt.org)
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
The libvirt C API is distributed under the terms of GNU Lesser General
|
||||
Public License, version 2.1 (or later). Some parts of the code that are
|
||||
not part of the C library may have the more restrictive GNU General
|
||||
Public License, version 2.1 (or later). See the files `COPYING.LESSER`
|
||||
and `COPYING` for full license terms & conditions.
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Libvirt uses the GNU Autotools build system, so in general can be built
|
||||
and installed with the usual commands. For example, to build in a manner
|
||||
that is suitable for installing as root, use:
|
||||
|
||||
```
|
||||
$ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
|
||||
$ make
|
||||
$ sudo make install
|
||||
```
|
||||
|
||||
While to build & install as an unprivileged user
|
||||
|
||||
```
|
||||
$ ./configure --prefix=$HOME/usr
|
||||
$ make
|
||||
$ make install
|
||||
```
|
||||
|
||||
The libvirt code relies on a large number of 3rd party libraries. These will
|
||||
be detected during execution of the `configure` script and a summary printed
|
||||
which lists any missing (optional) dependencies.
|
||||
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
The libvirt project welcomes contributions in many ways. For most components
|
||||
the best way to contribute is to send patches to the primary development
|
||||
mailing list. Further guidance on this can be found on the website:
|
||||
|
||||
[https://libvirt.org/contribute.html](https://libvirt.org/contribute.html)
|
||||
|
||||
|
||||
Contact
|
||||
-------
|
||||
|
||||
The libvirt project has two primary mailing lists:
|
||||
|
||||
* libvirt-users@redhat.com (**for user discussions**)
|
||||
* libvir-list@redhat.com (**for development only**)
|
||||
|
||||
Further details on contacting the project are available on the website:
|
||||
|
||||
[https://libvirt.org/contact.html](https://libvirt.org/contact.html)
|
72
README.rst
72
README.rst
@@ -1,72 +0,0 @@
|
||||
.. image:: https://gitlab.com/libvirt/libvirt/badges/master/pipeline.svg
|
||||
:target: https://gitlab.com/libvirt/libvirt/pipelines
|
||||
:alt: GitLab CI Build Status
|
||||
.. image:: https://bestpractices.coreinfrastructure.org/projects/355/badge
|
||||
:target: https://bestpractices.coreinfrastructure.org/projects/355
|
||||
:alt: CII Best Practices
|
||||
.. image:: https://translate.fedoraproject.org/widgets/libvirt/-/libvirt/svg-badge.svg
|
||||
:target: https://translate.fedoraproject.org/engage/libvirt/
|
||||
:alt: Translation status
|
||||
|
||||
==============================
|
||||
Libvirt API for virtualization
|
||||
==============================
|
||||
|
||||
Libvirt provides a portable, long term stable C API for managing the
|
||||
virtualization technologies provided by many operating systems. It
|
||||
includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware
|
||||
vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER
|
||||
Hypervisor.
|
||||
|
||||
For some of these hypervisors, it provides a stateful management
|
||||
daemon which runs on the virtualization host allowing access to the
|
||||
API both by non-privileged local users and remote users.
|
||||
|
||||
Layered packages provide bindings of the libvirt C API into other
|
||||
languages including Python, Perl, PHP, Go, Java, OCaml, as well as
|
||||
mappings into object systems such as GObject, CIM and SNMP.
|
||||
|
||||
Further information about the libvirt project can be found on the
|
||||
website:
|
||||
|
||||
https://libvirt.org
|
||||
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
The libvirt C API is distributed under the terms of GNU Lesser General
|
||||
Public License, version 2.1 (or later). Some parts of the code that are
|
||||
not part of the C library may have the more restrictive GNU General
|
||||
Public License, version 2.0 (or later). See the files ``COPYING.LESSER``
|
||||
and ``COPYING`` for full license terms & conditions.
|
||||
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
Instructions on building and installing libvirt can be found on the website:
|
||||
|
||||
https://libvirt.org/compiling.html
|
||||
|
||||
Contributing
|
||||
============
|
||||
|
||||
The libvirt project welcomes contributions in many ways. For most components
|
||||
the best way to contribute is to send patches to the primary development
|
||||
mailing list. Further guidance on this can be found on the website:
|
||||
|
||||
https://libvirt.org/contribute.html
|
||||
|
||||
|
||||
Contact
|
||||
=======
|
||||
|
||||
The libvirt project has two primary mailing lists:
|
||||
|
||||
* libvirt-users@redhat.com (**for user discussions**)
|
||||
* libvir-list@redhat.com (**for development only**)
|
||||
|
||||
Further details on contacting the project are available on the website:
|
||||
|
||||
https://libvirt.org/contact.html
|
208
autogen.sh
Executable file
208
autogen.sh
Executable file
@@ -0,0 +1,208 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
die()
|
||||
{
|
||||
echo "error: $1" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
starting_point=$(pwd)
|
||||
|
||||
srcdir=$(dirname "$0")
|
||||
test "$srcdir" || srcdir=.
|
||||
|
||||
cd "$srcdir" || {
|
||||
die "Failed to cd into $srcdir"
|
||||
}
|
||||
|
||||
test -f src/libvirt.c || {
|
||||
die "$0 must live in the top-level libvirt directory"
|
||||
}
|
||||
|
||||
dry_run=
|
||||
no_git=
|
||||
gnulib_srcdir=
|
||||
extra_args=
|
||||
while test "$#" -gt 0; do
|
||||
case "$1" in
|
||||
--dry-run)
|
||||
# This variable will serve both as an indicator of the fact that
|
||||
# a dry run has been requested, and to store the result of the
|
||||
# dry run. It will be ultimately used as return code for the
|
||||
# script: 0 means no action is necessary, 2 means that autogen.sh
|
||||
# needs to be executed, and 1 is reserved for failures
|
||||
dry_run=0
|
||||
shift
|
||||
;;
|
||||
--no-git)
|
||||
no_git=" $1"
|
||||
shift
|
||||
;;
|
||||
--gnulib-srcdir=*)
|
||||
gnulib_srcdir=" $1"
|
||||
shift
|
||||
;;
|
||||
--gnulib-srcdir)
|
||||
gnulib_srcdir=" $1=$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
--system)
|
||||
prefix=/usr
|
||||
sysconfdir=/etc
|
||||
localstatedir=/var
|
||||
if test -d $prefix/lib64; then
|
||||
libdir=$prefix/lib64
|
||||
else
|
||||
libdir=$prefix/lib
|
||||
fi
|
||||
extra_args="--prefix=$prefix --localstatedir=$localstatedir"
|
||||
extra_args="$extra_args --sysconfdir=$sysconfdir --libdir=$libdir"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
# All remaining arguments will be passed to configure verbatim
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
no_git="$no_git$gnulib_srcdir"
|
||||
|
||||
gnulib_hash()
|
||||
{
|
||||
local no_git=$1
|
||||
|
||||
if test "$no_git"; then
|
||||
echo "no-git"
|
||||
return
|
||||
fi
|
||||
|
||||
# Compute the hash we'll use to determine whether rerunning bootstrap
|
||||
# is required. The first is just the SHA1 that selects a gnulib snapshot.
|
||||
# The second ensures that whenever we change the set of gnulib modules used
|
||||
# by this package, we rerun bootstrap to pull in the matching set of files.
|
||||
# The third ensures that whenever we change the set of local gnulib diffs,
|
||||
# we rerun bootstrap to pull in those diffs.
|
||||
git submodule status .gnulib | awk '{ print $1 }'
|
||||
git hash-object bootstrap.conf
|
||||
git ls-tree -d HEAD gnulib/local | awk '{ print $3 }'
|
||||
}
|
||||
|
||||
# Only look into git submodules if we're in a git checkout
|
||||
if test -d .git || test -f .git; then
|
||||
|
||||
# Check for dirty submodules
|
||||
if test -z "$CLEAN_SUBMODULE"; then
|
||||
for path in $(git submodule status | awk '{ print $2 }'); do
|
||||
case "$(git diff "$path")" in
|
||||
*-dirty*)
|
||||
echo "error: $path is dirty, please investigate" >&2
|
||||
echo "set CLEAN_SUBMODULE to discard submodule changes" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
if test "$CLEAN_SUBMODULE" && test -z "$no_git"; then
|
||||
if test -z "$dry_run"; then
|
||||
echo "Cleaning up submodules..."
|
||||
git submodule foreach 'git clean -dfqx && git reset --hard' || {
|
||||
die "Cleaning up submodules failed"
|
||||
}
|
||||
fi
|
||||
fi
|
||||
|
||||
# Update all submodules. If any of the submodules has not been
|
||||
# initialized yet, it will be initialized now; moreover, any submodule
|
||||
# with uncommitted changes will be returned to the expected state
|
||||
echo "Updating submodules..."
|
||||
git submodule update --init || {
|
||||
die "Updating submodules failed"
|
||||
}
|
||||
|
||||
# The expected hash, eg. the one computed after the last
|
||||
# successful bootstrap run, is stored on disk
|
||||
state_file=.git-module-status
|
||||
expected_hash=$(cat "$state_file" 2>/dev/null)
|
||||
actual_hash=$(gnulib_hash "$no_git")
|
||||
|
||||
if test "$actual_hash" = "$expected_hash" && test -f AUTHORS; then
|
||||
# The gnulib hash matches our expectations, and all the files
|
||||
# that can only be generated through bootstrap are present:
|
||||
# we just need to run autoreconf. Unless we're performing a
|
||||
# dry run, of course...
|
||||
if test -z "$dry_run"; then
|
||||
echo "Running autoreconf..."
|
||||
autoreconf -if || {
|
||||
die "autoreconf failed"
|
||||
}
|
||||
fi
|
||||
else
|
||||
# Whenever the gnulib submodule or any of the related bits
|
||||
# has been changed in some way (see gnulib_hash) we need to
|
||||
# run bootstrap again. If we're performing a dry run, we
|
||||
# change the return code instead to signal our caller
|
||||
if test "$dry_run"; then
|
||||
dry_run=2
|
||||
else
|
||||
echo "Running bootstrap..."
|
||||
./bootstrap$no_git --bootstrap-sync || {
|
||||
die "bootstrap failed"
|
||||
}
|
||||
gnulib_hash >"$state_file"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# When performing a dry run, we can stop here
|
||||
test "$dry_run" && exit "$dry_run"
|
||||
|
||||
# If asked not to run configure, we can stop here
|
||||
test "$NOCONFIGURE" && exit 0
|
||||
|
||||
cd "$starting_point" || {
|
||||
die "Failed to cd into $starting_point"
|
||||
}
|
||||
|
||||
if test "$OBJ_DIR"; then
|
||||
mkdir -p "$OBJ_DIR" || {
|
||||
die "Failed to create $OBJ_DIR"
|
||||
}
|
||||
cd "$OBJ_DIR" || {
|
||||
die "Failed to cd into $OBJ_DIR"
|
||||
}
|
||||
fi
|
||||
|
||||
# Make sure we can find GNU make and tell the user
|
||||
# the right command to run
|
||||
MAKE=
|
||||
for cmd in make gmake; do
|
||||
if $cmd -v 2>&1 | grep -q "GNU Make"; then
|
||||
MAKE=$cmd
|
||||
break
|
||||
fi
|
||||
done
|
||||
test "$MAKE" || {
|
||||
die "GNU make is required to build libvirt"
|
||||
}
|
||||
|
||||
if test -z "$*" && test -z "$extra_args" && test -f config.status; then
|
||||
echo "Running config.status..."
|
||||
./config.status --recheck || {
|
||||
die "config.status failed"
|
||||
}
|
||||
else
|
||||
if test -z "$*" && test -z "$extra_args"; then
|
||||
echo "I am going to run configure with no arguments - if you wish"
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
else
|
||||
echo "Running configure with $extra_args $@"
|
||||
fi
|
||||
"$srcdir/configure" $extra_args "$@" || {
|
||||
die "configure failed"
|
||||
}
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "Now type '$MAKE' to compile libvirt."
|
201
bootstrap.conf
Normal file
201
bootstrap.conf
Normal file
@@ -0,0 +1,201 @@
|
||||
# Bootstrap configuration.
|
||||
|
||||
# Copyright (C) 2010-2014 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
# gnulib modules used by this package.
|
||||
gnulib_modules='
|
||||
accept
|
||||
areadlink
|
||||
autobuild
|
||||
base64
|
||||
bind
|
||||
bitrotate
|
||||
byteswap
|
||||
c-ctype
|
||||
c-strcase
|
||||
c-strcasestr
|
||||
calloc-posix
|
||||
canonicalize-lgpl
|
||||
chown
|
||||
clock-time
|
||||
close
|
||||
connect
|
||||
configmake
|
||||
count-leading-zeros
|
||||
count-one-bits
|
||||
crypto/md5
|
||||
crypto/sha256
|
||||
dirname-lgpl
|
||||
environ
|
||||
execinfo
|
||||
fclose
|
||||
fcntl
|
||||
fcntl-h
|
||||
fdatasync
|
||||
ffs
|
||||
ffsl
|
||||
fnmatch
|
||||
fsync
|
||||
func
|
||||
getaddrinfo
|
||||
getcwd-lgpl
|
||||
gethostname
|
||||
getopt-posix
|
||||
getpass
|
||||
getpeername
|
||||
getsockname
|
||||
gettimeofday
|
||||
gitlog-to-changelog
|
||||
gnumakefile
|
||||
ignore-value
|
||||
inet_pton
|
||||
intprops
|
||||
ioctl
|
||||
isatty
|
||||
largefile
|
||||
ldexp
|
||||
listen
|
||||
localeconv
|
||||
maintainer-makefile
|
||||
manywarnings
|
||||
mgetgroups
|
||||
mkdtemp
|
||||
mkostemp
|
||||
mkostemps
|
||||
mktempd
|
||||
net_if
|
||||
netdb
|
||||
nonblocking
|
||||
openpty
|
||||
passfd
|
||||
perror
|
||||
physmem
|
||||
pipe-posix
|
||||
pipe2
|
||||
poll
|
||||
posix-shell
|
||||
pthread
|
||||
pthread_sigmask
|
||||
recv
|
||||
regex
|
||||
random_r
|
||||
sched
|
||||
secure_getenv
|
||||
send
|
||||
setenv
|
||||
setsockopt
|
||||
sigaction
|
||||
sigpipe
|
||||
snprintf
|
||||
socket
|
||||
stat-time
|
||||
stdarg
|
||||
stpcpy
|
||||
strchrnul
|
||||
strdup-posix
|
||||
strndup
|
||||
strerror
|
||||
strerror_r-posix
|
||||
strptime
|
||||
strsep
|
||||
strtok_r
|
||||
sys_stat
|
||||
sys_wait
|
||||
termios
|
||||
time_r
|
||||
timegm
|
||||
ttyname_r
|
||||
uname
|
||||
unsetenv
|
||||
useless-if-before-free
|
||||
usleep
|
||||
vasprintf
|
||||
verify
|
||||
vc-list-files
|
||||
vsnprintf
|
||||
waitpid
|
||||
warnings
|
||||
'
|
||||
|
||||
SKIP_PO=true
|
||||
|
||||
# Enable copy-mode for MSYS/MinGW. MSYS' ln doesn't work well in the way
|
||||
# bootstrap uses it with relative paths.
|
||||
if test -n "$MSYSTEM"; then
|
||||
copy=true
|
||||
fi
|
||||
|
||||
|
||||
# Tell gnulib to:
|
||||
# require LGPLv2+
|
||||
# apply any local diffs in gnulib/local/ dir
|
||||
# put *.m4 files in m4/ dir
|
||||
# put *.[ch] files in new gnulib/lib/ dir
|
||||
# import gnulib tests in new gnulib/tests/ dir
|
||||
gnulib_name=libgnu
|
||||
m4_base=m4
|
||||
source_base=gnulib/lib
|
||||
tests_base=gnulib/tests
|
||||
gnulib_tool_option_extras="\
|
||||
--lgpl=2\
|
||||
--with-tests\
|
||||
--makefile-name=gnulib.mk\
|
||||
--avoid=pt_chown\
|
||||
--avoid=lock-tests\
|
||||
"
|
||||
local_gl_dir=gnulib/local
|
||||
|
||||
# Build prerequisites
|
||||
# Note that some of these programs are only required for 'make dist' to
|
||||
# succeed from a fresh git checkout; not all of these programs are
|
||||
# required to run 'make dist' on a tarball.
|
||||
buildreq="\
|
||||
autoconf 2.59
|
||||
automake 1.9.6
|
||||
git 1.5.5
|
||||
gzip -
|
||||
libtool -
|
||||
patch -
|
||||
perl 5.5
|
||||
pkg-config -
|
||||
rpcgen -
|
||||
tar -
|
||||
xmllint -
|
||||
xsltproc -
|
||||
"
|
||||
|
||||
# Automake requires that ChangeLog and AUTHORS exist.
|
||||
touch AUTHORS ChangeLog || exit 1
|
||||
|
||||
# Override bootstrap's list - we don't use mdate-sh or texinfo.tex.
|
||||
gnulib_extra_files="
|
||||
build-aux/install-sh
|
||||
build-aux/depcomp
|
||||
build-aux/config.guess
|
||||
build-aux/config.sub
|
||||
doc/INSTALL
|
||||
"
|
||||
|
||||
|
||||
bootstrap_post_import_hook()
|
||||
{
|
||||
# Change paths in gnulib/tests/gnulib.mk from "../../.." to "../..",
|
||||
# and make tests conditional by changing "TESTS" to "GNULIB_TESTS".
|
||||
m=gnulib/tests/gnulib.mk
|
||||
sed 's,\.\./\.\./\.\.,../..,g; s/^TESTS /GNULIB_TESTS /' $m > $m-t
|
||||
mv -f $m-t $m
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
# define variables
|
||||
|
||||
top_srcdir = @top_srcdir@
|
||||
top_builddir = @top_builddir@
|
||||
FLAKE8 = @flake8_path@
|
||||
RUNUTF8 = @runutf8@
|
||||
PYTHON = @PYTHON3@
|
||||
GREP = @GREP@
|
||||
|
||||
# include syntax-check.mk file
|
||||
include $(top_srcdir)/build-aux/syntax-check.mk
|
71
build-aux/augeas-gentest.pl
Executable file
71
build-aux/augeas-gentest.pl
Executable file
@@ -0,0 +1,71 @@
|
||||
#!/usr/bin/env perl
|
||||
#
|
||||
# augeas-gentest.pl: Generate an augeas test file, from an
|
||||
# example config file + test file template
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Authors:
|
||||
# Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
die "syntax: $0 CONFIG TEMPLATE AUGTEST\n" unless @ARGV == 3;
|
||||
|
||||
my $config = shift @ARGV;
|
||||
my $template = shift @ARGV;
|
||||
my $augtest = shift @ARGV;
|
||||
|
||||
open AUGTEST, ">", $augtest or die "cannot create $augtest: $!";
|
||||
|
||||
$SIG{__DIE__} = sub {
|
||||
unlink $augtest;
|
||||
};
|
||||
|
||||
open CONFIG, "<", $config or die "cannot read $config: $!";
|
||||
open TEMPLATE, "<", $template or die "cannot read $template: $!";
|
||||
|
||||
my $group = 0;
|
||||
while (<TEMPLATE>) {
|
||||
if (/::CONFIG::/) {
|
||||
my $group = 0;
|
||||
print AUGTEST " let conf = \"";
|
||||
while (<CONFIG>) {
|
||||
if (/^#\w/) {
|
||||
s/^#//;
|
||||
s/\"/\\\"/g;
|
||||
print AUGTEST $_;
|
||||
$group = /\[\s$/;
|
||||
} elsif ($group) {
|
||||
s/\"/\\\"/g;
|
||||
if (/#\s*\]/) {
|
||||
$group = 0;
|
||||
}
|
||||
if (/^#/) {
|
||||
s/^#//;
|
||||
print AUGTEST $_;
|
||||
}
|
||||
}
|
||||
}
|
||||
print AUGTEST "\"\n";
|
||||
} else {
|
||||
print AUGTEST $_;
|
||||
}
|
||||
}
|
||||
|
||||
close TEMPLATE;
|
||||
close CONFIG;
|
||||
close AUGTEST or die "cannot save $augtest: $!";
|
@@ -16,6 +16,9 @@
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Authors:
|
||||
# Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
@@ -24,6 +27,11 @@ my $ret = 0;
|
||||
my $incomment = 0;
|
||||
|
||||
foreach my $file (@ARGV) {
|
||||
# Per-file variables for multiline Curly Bracket (cb_) check
|
||||
my $cb_linenum = 0;
|
||||
my $cb_code = "";
|
||||
my $cb_scolon = 0;
|
||||
|
||||
open FILE, $file;
|
||||
|
||||
while (defined (my $line = <FILE>)) {
|
||||
@@ -37,6 +45,9 @@ foreach my $file (@ARGV) {
|
||||
# Kill any quoted strings
|
||||
$data =~ s,"(?:[^\\\"]|\\.)*","XXX",g;
|
||||
|
||||
# Kill any C++ style comments
|
||||
$data =~ s,//.*$,//,;
|
||||
|
||||
next if $data =~ /^#/;
|
||||
|
||||
# Kill contents of multi-line comments
|
||||
@@ -155,6 +166,37 @@ foreach my $file (@ARGV) {
|
||||
print "$file:$.: $line";
|
||||
$ret = 1;
|
||||
}
|
||||
|
||||
# One line conditional statements with one line bodies should
|
||||
# not use curly brackets.
|
||||
if ($data =~ /^\s*(if|while|for)\b.*\{$/) {
|
||||
$cb_linenum = $.;
|
||||
$cb_code = $line;
|
||||
$cb_scolon = 0;
|
||||
}
|
||||
|
||||
# We need to check for exactly one semicolon inside the body,
|
||||
# because empty statements (e.g. with comment only) are
|
||||
# allowed
|
||||
if ($cb_linenum == $. - 1 && $data =~ /^[^;]*;[^;]*$/) {
|
||||
$cb_code .= $line;
|
||||
$cb_scolon = 1;
|
||||
}
|
||||
|
||||
if ($data =~ /^\s*}\s*$/ &&
|
||||
$cb_linenum == $. - 2 &&
|
||||
$cb_scolon) {
|
||||
|
||||
print "Curly brackets around single-line body:\n";
|
||||
print "$file:$cb_linenum-$.:\n$cb_code$line";
|
||||
$ret = 1;
|
||||
|
||||
# There _should_ be no need to reset the values; but to
|
||||
# keep my inner peace...
|
||||
$cb_linenum = 0;
|
||||
$cb_scolon = 0;
|
||||
$cb_code = "";
|
||||
}
|
||||
}
|
||||
close FILE;
|
||||
}
|
||||
|
@@ -1,63 +0,0 @@
|
||||
syntax_check_conf = configuration_data()
|
||||
syntax_check_conf.set('top_srcdir', meson.source_root())
|
||||
syntax_check_conf.set('top_builddir', meson.build_root())
|
||||
|
||||
flake8_path = ''
|
||||
if flake8_prog.found()
|
||||
flake8_path = flake8_prog.path()
|
||||
endif
|
||||
syntax_check_conf.set('flake8_path', flake8_path)
|
||||
syntax_check_conf.set('runutf8', ' '.join(runutf8))
|
||||
syntax_check_conf.set('PYTHON3', python3_prog.path())
|
||||
|
||||
|
||||
grep_prog = find_program('grep')
|
||||
|
||||
if host_machine.system() == 'freebsd'
|
||||
make_prog = find_program('gmake')
|
||||
|
||||
grep_cmd = run_command(grep_prog, '--version')
|
||||
if grep_cmd.stdout().startswith('grep (BSD grep')
|
||||
grep_prog = find_program('/usr/local/bin/grep')
|
||||
grep_cmd = run_command(grep_prog, '--version')
|
||||
if grep_cmd.stdout().startswith('grep (BSD grep')
|
||||
error('GNU grep not found')
|
||||
endif
|
||||
endif
|
||||
else
|
||||
make_prog = find_program('make')
|
||||
endif
|
||||
|
||||
syntax_check_conf.set('GREP', grep_prog.path())
|
||||
|
||||
configure_file(
|
||||
input: 'Makefile.in',
|
||||
output: '@BASENAME@',
|
||||
configuration: syntax_check_conf,
|
||||
)
|
||||
|
||||
rc = run_command(
|
||||
'sed', '-n',
|
||||
's/^\\(sc_[a-zA-Z0-9_-]*\\):.*/\\1/p',
|
||||
meson.current_source_dir() / 'syntax-check.mk',
|
||||
check: true,
|
||||
)
|
||||
|
||||
sc_tests = rc.stdout().strip().split()
|
||||
|
||||
|
||||
# Skip syntax-check if not building from git because we get the list of files
|
||||
# to check using git commands and it fails if we are not in git repository.
|
||||
if git
|
||||
foreach target : sc_tests
|
||||
test(
|
||||
target,
|
||||
make_prog,
|
||||
args: [ '-C', meson.current_build_dir(), target ],
|
||||
depends: [
|
||||
potfiles_dep,
|
||||
],
|
||||
suite: 'syntax-check',
|
||||
)
|
||||
endforeach
|
||||
endif
|
37
build-aux/minimize-po.pl
Executable file
37
build-aux/minimize-po.pl
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
my @block;
|
||||
my $msgstr = 0;
|
||||
my $empty = 0;
|
||||
my $unused = 0;
|
||||
my $fuzzy = 0;
|
||||
while (<>) {
|
||||
if (/^$/) {
|
||||
if (!$empty && !$unused && !$fuzzy) {
|
||||
print @block;
|
||||
}
|
||||
@block = ();
|
||||
$msgstr = 0;
|
||||
$fuzzy = 0;
|
||||
push @block, $_;
|
||||
} else {
|
||||
if (/^msgstr/) {
|
||||
$msgstr = 1;
|
||||
$empty = 1;
|
||||
}
|
||||
if (/^#.*fuzzy/) {
|
||||
$fuzzy = 1;
|
||||
}
|
||||
if (/^#~ msgstr/) {
|
||||
$unused = 1;
|
||||
}
|
||||
if ($msgstr && /".+"/) {
|
||||
$empty = 0;
|
||||
}
|
||||
push @block, $_;
|
||||
}
|
||||
}
|
||||
|
||||
if (@block && !$empty && !$unused) {
|
||||
print @block;
|
||||
}
|
72
build-aux/mock-noinline.pl
Normal file
72
build-aux/mock-noinline.pl
Normal file
@@ -0,0 +1,72 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
my %noninlined;
|
||||
my %mocked;
|
||||
|
||||
# Functions in public header don't get the noinline annotation
|
||||
# so whitelist them here
|
||||
$noninlined{"virEventAddTimeout"} = 1;
|
||||
|
||||
foreach my $arg (@ARGV) {
|
||||
if ($arg =~ /\.h$/) {
|
||||
#print "Scan header $arg\n";
|
||||
&scan_annotations($arg);
|
||||
} elsif ($arg =~ /mock\.c$/) {
|
||||
#print "Scan mock $arg\n";
|
||||
&scan_overrides($arg);
|
||||
}
|
||||
}
|
||||
|
||||
my $warned = 0;
|
||||
foreach my $func (keys %mocked) {
|
||||
next if exists $noninlined{$func};
|
||||
|
||||
$warned++;
|
||||
print STDERR "$func is mocked at $mocked{$func} but missing noinline annotation\n";
|
||||
}
|
||||
|
||||
exit $warned ? 1 : 0;
|
||||
|
||||
|
||||
sub scan_annotations {
|
||||
my $file = shift;
|
||||
|
||||
open FH, $file or die "cannot read $file: $!";
|
||||
|
||||
my $func;
|
||||
while (<FH>) {
|
||||
if (/^\s*(\w+)\(/ || /^(?:\w+\*?\s+)+(?:\*\s*)?(\w+)\(/) {
|
||||
my $name = $1;
|
||||
if ($name !~ /ATTRIBUTE/) {
|
||||
$func = $name;
|
||||
}
|
||||
} elsif (/^\s*$/) {
|
||||
$func = undef;
|
||||
}
|
||||
if (/ATTRIBUTE_NOINLINE/) {
|
||||
if (defined $func) {
|
||||
$noninlined{$func} = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
close FH
|
||||
}
|
||||
|
||||
sub scan_overrides {
|
||||
my $file = shift;
|
||||
|
||||
open FH, $file or die "cannot read $file: $!";
|
||||
|
||||
my $func;
|
||||
while (<FH>) {
|
||||
if (/^(\w+)\(/ || /^\w+\s*(?:\*\s*)?(\w+)\(/) {
|
||||
my $name = $1;
|
||||
if ($name =~ /^vir/) {
|
||||
$mocked{$name} = "$file:$.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
close FH
|
||||
}
|
26
build-aux/prohibit-duplicate-header.pl
Normal file
26
build-aux/prohibit-duplicate-header.pl
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
|
||||
my $file = " ";
|
||||
my $ret = 0;
|
||||
my %includes = ( );
|
||||
my $lineno = 0;
|
||||
|
||||
while (<>) {
|
||||
if (not $file eq $ARGV) {
|
||||
%includes = ( );
|
||||
$file = $ARGV;
|
||||
$lineno = 0;
|
||||
}
|
||||
$lineno++;
|
||||
if (/^# *include *[<"]([^>"]*\.h)[">]/) {
|
||||
$includes{$1}++;
|
||||
if ($includes{$1} == 2) {
|
||||
$ret = 1;
|
||||
print STDERR "$ARGV:$lineno: $_";
|
||||
print STDERR "Do not include a header more than once per file\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
exit $ret;
|
File diff suppressed because it is too large
Load Diff
@@ -1,226 +0,0 @@
|
||||
#!/bin/sh
|
||||
#! -*-perl-*-
|
||||
|
||||
# Detect instances of "if (p) free (p);".
|
||||
# Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces.
|
||||
|
||||
# Copyright (C) 2008-2019 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Written by Jim Meyering
|
||||
|
||||
# This is a prologue that allows to run a perl script as an executable
|
||||
# on systems that are compliant to a POSIX version before POSIX:2017.
|
||||
# On such systems, the usual invocation of an executable through execlp()
|
||||
# or execvp() fails with ENOEXEC if it is a script that does not start
|
||||
# with a #! line. The script interpreter mentioned in the #! line has
|
||||
# to be /bin/sh, because on GuixSD systems that is the only program that
|
||||
# has a fixed file name. The second line is essential for perl and is
|
||||
# also useful for editing this file in Emacs. The next two lines below
|
||||
# are valid code in both sh and perl. When executed by sh, they re-execute
|
||||
# the script through the perl program found in $PATH. The '-x' option
|
||||
# is essential as well; without it, perl would re-execute the script
|
||||
# through /bin/sh. When executed by perl, the next two lines are a no-op.
|
||||
eval 'exec perl -wSx "$0" "$@"'
|
||||
if 0;
|
||||
|
||||
my $VERSION = '2018-03-07 03:47'; # UTC
|
||||
# The definition above must lie within the first 8 lines in order
|
||||
# for the Emacs time-stamp write hook (at end) to update it.
|
||||
# If you change this file with Emacs, please let the write hook
|
||||
# do its job. Otherwise, update this string manually.
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Getopt::Long;
|
||||
|
||||
(my $ME = $0) =~ s|.*/||;
|
||||
|
||||
# use File::Coda; # https://meyering.net/code/Coda/
|
||||
END {
|
||||
defined fileno STDOUT or return;
|
||||
close STDOUT and return;
|
||||
warn "$ME: failed to close standard output: $!\n";
|
||||
$? ||= 1;
|
||||
}
|
||||
|
||||
sub usage ($)
|
||||
{
|
||||
my ($exit_code) = @_;
|
||||
my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
|
||||
if ($exit_code != 0)
|
||||
{
|
||||
print $STREAM "Try '$ME --help' for more information.\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print $STREAM <<EOF;
|
||||
Usage: $ME [OPTIONS] FILE...
|
||||
|
||||
Detect any instance in FILE of a useless "if" test before a free call, e.g.,
|
||||
"if (p) free (p);". Any such test may be safely removed without affecting
|
||||
the semantics of the C code in FILE. Use --name=FOO --name=BAR to also
|
||||
detect free-like functions named FOO and BAR.
|
||||
|
||||
OPTIONS:
|
||||
|
||||
--list print only the name of each matching FILE (\\0-terminated)
|
||||
--name=N add name N to the list of \'free\'-like functions to detect;
|
||||
may be repeated
|
||||
|
||||
--help display this help and exit
|
||||
--version output version information and exit
|
||||
|
||||
Exit status:
|
||||
|
||||
0 one or more matches
|
||||
1 no match
|
||||
2 an error
|
||||
|
||||
EXAMPLE:
|
||||
|
||||
For example, this command prints all removable "if" tests before "free"
|
||||
and "kfree" calls in the linux kernel sources:
|
||||
|
||||
git ls-files -z |xargs -0 $ME --name=kfree
|
||||
|
||||
EOF
|
||||
}
|
||||
exit $exit_code;
|
||||
}
|
||||
|
||||
sub is_NULL ($)
|
||||
{
|
||||
my ($expr) = @_;
|
||||
return ($expr eq 'NULL' || $expr eq '0');
|
||||
}
|
||||
|
||||
{
|
||||
sub EXIT_MATCH {0}
|
||||
sub EXIT_NO_MATCH {1}
|
||||
sub EXIT_ERROR {2}
|
||||
my $err = EXIT_NO_MATCH;
|
||||
|
||||
my $list;
|
||||
my @name = qw(free);
|
||||
GetOptions
|
||||
(
|
||||
help => sub { usage 0 },
|
||||
version => sub { print "$ME version $VERSION\n"; exit },
|
||||
list => \$list,
|
||||
'name=s@' => \@name,
|
||||
) or usage 1;
|
||||
|
||||
# Make sure we have the right number of non-option arguments.
|
||||
# Always tell the user why we fail.
|
||||
@ARGV < 1
|
||||
and (warn "$ME: missing FILE argument\n"), usage EXIT_ERROR;
|
||||
|
||||
my $or = join '|', @name;
|
||||
my $regexp = qr/(?:$or)/;
|
||||
|
||||
# Set the input record separator.
|
||||
# Note: this makes it impractical to print line numbers.
|
||||
$/ = '"';
|
||||
|
||||
my $found_match = 0;
|
||||
FILE:
|
||||
foreach my $file (@ARGV)
|
||||
{
|
||||
open FH, '<', $file
|
||||
or (warn "$ME: can't open '$file' for reading: $!\n"),
|
||||
$err = EXIT_ERROR, next;
|
||||
while (defined (my $line = <FH>))
|
||||
{
|
||||
# Skip non-matching lines early to save time
|
||||
$line =~ /\bif\b/
|
||||
or next;
|
||||
while ($line =~
|
||||
/\b(if\s*\(\s*([^)]+?)(?:\s*!=\s*([^)]+?))?\s*\)
|
||||
# 1 2 3
|
||||
(?: \s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)\s*;|
|
||||
\s*\{\s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)\s*;\s*\}))/sxg)
|
||||
{
|
||||
my $all = $1;
|
||||
my ($lhs, $rhs) = ($2, $3);
|
||||
my ($free_opnd, $braced_free_opnd) = ($4, $5);
|
||||
my $non_NULL;
|
||||
if (!defined $rhs) { $non_NULL = $lhs }
|
||||
elsif (is_NULL $rhs) { $non_NULL = $lhs }
|
||||
elsif (is_NULL $lhs) { $non_NULL = $rhs }
|
||||
else { next }
|
||||
|
||||
# Compare the non-NULL part of the "if" expression and the
|
||||
# free'd expression, without regard to white space.
|
||||
$non_NULL =~ tr/ \t//d;
|
||||
my $e2 = defined $free_opnd ? $free_opnd : $braced_free_opnd;
|
||||
$e2 =~ tr/ \t//d;
|
||||
if ($non_NULL eq $e2)
|
||||
{
|
||||
$found_match = 1;
|
||||
$list
|
||||
and (print "$file\0"), next FILE;
|
||||
print "$file: $all\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
continue
|
||||
{
|
||||
close FH;
|
||||
}
|
||||
|
||||
$found_match && $err == EXIT_NO_MATCH
|
||||
and $err = EXIT_MATCH;
|
||||
|
||||
exit $err;
|
||||
}
|
||||
|
||||
my $foo = <<'EOF';
|
||||
# The above is to *find* them.
|
||||
# This adjusts them, removing the unnecessary "if (p)" part.
|
||||
|
||||
# FIXME: do something like this as an option (doesn't do braces):
|
||||
free=xfree
|
||||
git grep -l -z "$free *(" \
|
||||
| xargs -0 useless-if-before-free -l --name="$free" \
|
||||
| xargs -0 perl -0x3b -pi -e \
|
||||
's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*(?:0|NULL))?\s*\)\s+('"$free"'\s*\((?:\s*\([^)]+\))?\s*\1\s*\)\s*;)/$2/s'
|
||||
|
||||
# Use the following to remove redundant uses of kfree inside braces.
|
||||
# Note that -0777 puts perl in slurp-whole-file mode;
|
||||
# but we have plenty of memory, these days...
|
||||
free=kfree
|
||||
git grep -l -z "$free *(" \
|
||||
| xargs -0 useless-if-before-free -l --name="$free" \
|
||||
| xargs -0 perl -0777 -pi -e \
|
||||
's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*(?:0|NULL))?\s*\)\s*\{\s*('"$free"'\s*\((?:\s*\([^)]+\))?\s*\1\s*\);)\s*\}[^\n]*$/$2/gms'
|
||||
|
||||
Be careful that the result of the above transformation is valid.
|
||||
If the matched string is followed by "else", then obviously, it won't be.
|
||||
|
||||
When modifying files, refuse to process anything other than a regular file.
|
||||
EOF
|
||||
|
||||
## Local Variables:
|
||||
## mode: perl
|
||||
## indent-tabs-mode: nil
|
||||
## eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
## time-stamp-line-limit: 50
|
||||
## time-stamp-start: "my $VERSION = '"
|
||||
## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
|
||||
## time-stamp-time-zone: "UTC0"
|
||||
## time-stamp-end: "'; # UTC"
|
||||
## End:
|
@@ -1,113 +0,0 @@
|
||||
#!/bin/sh
|
||||
# List version-controlled file names.
|
||||
|
||||
# Print a version string.
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 2006-2019 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
# List the specified version-controlled files.
|
||||
# With no argument, list them all. With a single DIRECTORY argument,
|
||||
# list the version-controlled files in that directory.
|
||||
|
||||
# If there's an argument, it must be a single, "."-relative directory name.
|
||||
# cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/
|
||||
|
||||
postprocess=
|
||||
case $1 in
|
||||
--help) cat <<EOF
|
||||
Usage: $0 [-C SRCDIR] [DIR...]
|
||||
|
||||
Output a list of version-controlled files in DIR (default .), relative to
|
||||
SRCDIR (default .). SRCDIR must be the top directory of a checkout.
|
||||
|
||||
Options:
|
||||
--help print this help, then exit
|
||||
--version print version number, then exit
|
||||
-C SRCDIR change directory to SRCDIR before generating list
|
||||
|
||||
Report bugs and patches to <bug-gnulib@gnu.org>.
|
||||
EOF
|
||||
exit ;;
|
||||
|
||||
--version)
|
||||
year=`echo "$scriptversion" | sed 's/[^0-9].*//'`
|
||||
cat <<EOF
|
||||
vc-list-files $scriptversion
|
||||
Copyright (C) $year Free Software Foundation, Inc,
|
||||
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
EOF
|
||||
exit ;;
|
||||
|
||||
-C)
|
||||
test "$2" = . || postprocess="| sed 's|^|$2/|'"
|
||||
cd "$2" || exit 1
|
||||
shift; shift ;;
|
||||
esac
|
||||
|
||||
test $# = 0 && set .
|
||||
|
||||
for dir
|
||||
do
|
||||
if test -d .git || test -f .git; then
|
||||
test "x$dir" = x. \
|
||||
&& dir= sed_esc= \
|
||||
|| { dir="$dir/"; sed_esc=`echo "$dir"|env sed 's,\([\\/]\),\\\\\1,g'`; }
|
||||
# Ignore git symlinks - either they point into the tree, in which case
|
||||
# we don't need to visit the target twice, or they point somewhere
|
||||
# else (often into a submodule), in which case the content does not
|
||||
# belong to this package.
|
||||
eval exec git ls-tree -r 'HEAD:"$dir"' \
|
||||
\| sed -n '"s/^100[^ ]*./$sed_esc/p"' $postprocess
|
||||
elif test -d .hg; then
|
||||
eval exec hg locate '"$dir/*"' $postprocess
|
||||
elif test -d .bzr; then
|
||||
test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
|
||||
eval exec bzr ls -R --versioned '"$dir"' $postprocess
|
||||
elif test -d CVS; then
|
||||
test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
|
||||
if test -x build-aux/cvsu; then
|
||||
eval build-aux/cvsu --find --types=AFGM '"$dir"' $postprocess
|
||||
elif (cvsu --help) >/dev/null 2>&1; then
|
||||
eval cvsu --find --types=AFGM '"$dir"' $postprocess
|
||||
else
|
||||
eval awk -F/ \''{ \
|
||||
if (!$1 && $3 !~ /^-/) { \
|
||||
f=FILENAME; \
|
||||
if (f ~ /CVS\/Entries$/) \
|
||||
f = substr(f, 1, length(f)-11); \
|
||||
print f $2; \
|
||||
}}'\'' \
|
||||
`find "$dir" -name Entries -print` /dev/null' $postprocess
|
||||
fi
|
||||
elif test -d .svn; then
|
||||
eval exec svn list -R '"$dir"' $postprocess
|
||||
else
|
||||
echo "$0: Failed to determine type of version control used in `pwd`" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
245
ci/Makefile
245
ci/Makefile
@@ -1,245 +0,0 @@
|
||||
# -*- makefile -*-
|
||||
# vim: filetype=make
|
||||
|
||||
# The root directory of the libvirt.git checkout
|
||||
CI_GIT_ROOT = $(shell git rev-parse --show-toplevel)
|
||||
|
||||
# The root directory for all CI-related contents
|
||||
CI_ROOTDIR = $(CI_GIT_ROOT)/ci
|
||||
|
||||
# The directory holding content on the host that we will
|
||||
# expose to the container.
|
||||
CI_SCRATCHDIR = $(CI_ROOTDIR)/scratch
|
||||
|
||||
# The directory holding the clone of the git repo that
|
||||
# we will expose to the container
|
||||
CI_HOST_SRCDIR = $(CI_SCRATCHDIR)/src
|
||||
|
||||
# The directory holding the source inside the
|
||||
# container, i.e. where we want to expose
|
||||
# the $(CI_HOST_SRCDIR) directory from the host
|
||||
CI_CONT_SRCDIR = $(CI_USER_HOME)/libvirt
|
||||
|
||||
# Script containing build instructions
|
||||
CI_BUILD_SCRIPT = $(CI_ROOTDIR)/build.sh
|
||||
|
||||
# Location of the container images we're going to pull
|
||||
# Can be useful to override to use a locally built
|
||||
# image instead
|
||||
CI_IMAGE_PREFIX = registry.gitlab.com/libvirt/libvirt/ci-
|
||||
|
||||
# The default tag is ':latest' but if the container
|
||||
# repo above uses different conventions this can override it
|
||||
CI_IMAGE_TAG = :latest
|
||||
|
||||
# We delete the virtual root after completion, set
|
||||
# to 0 if you need to keep it around for debugging
|
||||
CI_CLEAN = 1
|
||||
|
||||
# We'll always freshly clone the virtual root each
|
||||
# time in case it was not cleaned up before. Set
|
||||
# to 1 if you want to try restarting a previously
|
||||
# preserved env
|
||||
CI_REUSE = 0
|
||||
|
||||
# We need the user's login and home directory to prepare the
|
||||
# environment the way some programs expect it
|
||||
CI_USER_LOGIN = $(shell whoami)
|
||||
CI_USER_HOME = $(shell eval echo "~$(CI_USER_LOGIN)")
|
||||
|
||||
# We also need the container process to run with current host IDs
|
||||
# so that it can access the passed in build directory
|
||||
CI_UID = $(shell id -u "$(CI_USER_LOGIN)")
|
||||
CI_GID = $(shell id -g "$(CI_USER_LOGIN)")
|
||||
|
||||
CI_ENGINE = auto
|
||||
# Container engine we are going to use, can be overridden per make
|
||||
# invocation, if it is not we try podman and then default to docker.
|
||||
ifeq ($(CI_ENGINE),auto)
|
||||
override CI_ENGINE = $(shell podman version >/dev/null 2>&1 && echo podman || echo docker)
|
||||
endif
|
||||
|
||||
# IDs you run as do not need to exist in
|
||||
# the container's /etc/passwd & /etc/group files, but
|
||||
# if they do not, then libvirt's 'ninja test' will fail
|
||||
# many tests.
|
||||
|
||||
# We do not directly mount /etc/{passwd,group} as Docker
|
||||
# is liable to mess with SELinux labelling which will
|
||||
# then prevent the host accessing them. And podman cannot
|
||||
# relabel the files due to it running rootless. So
|
||||
# copying them first is safer and less error-prone.
|
||||
CI_PWDB_MOUNTS = \
|
||||
--volume $(CI_SCRATCHDIR)/group:/etc/group:ro,z \
|
||||
--volume $(CI_SCRATCHDIR)/passwd:/etc/passwd:ro,z \
|
||||
$(NULL)
|
||||
|
||||
CI_HOME_MOUNTS = \
|
||||
--volume $(CI_SCRATCHDIR)/home:$(CI_USER_HOME):z \
|
||||
$(NULL)
|
||||
|
||||
CI_SCRIPT_MOUNTS = \
|
||||
--volume $(CI_SCRATCHDIR)/build:$(CI_USER_HOME)/build:z \
|
||||
$(NULL)
|
||||
|
||||
# Docker containers can have very large ulimits
|
||||
# for nofiles - as much as 1048576. This makes
|
||||
# libvirt very slow at exec'ing programs.
|
||||
CI_ULIMIT_FILES = 1024
|
||||
|
||||
ifeq ($(CI_ENGINE),podman)
|
||||
# Podman cannot reuse host namespace when running non-root
|
||||
# containers. Until support for --keep-uid is added we can
|
||||
# just create another mapping that will do that for us.
|
||||
# Beware, that in {uid,git}map=container_id:host_id:range, the
|
||||
# host_id does actually refer to the uid in the first mapping
|
||||
# where 0 (root) is mapped to the current user and rest is
|
||||
# offset.
|
||||
#
|
||||
# In order to set up this mapping, we need to keep all the
|
||||
# user IDs to prevent possible errors as some images might
|
||||
# expect UIDs up to 90000 (looking at you fedora), so we don't
|
||||
# want the overflowuid to be used for them. For mapping all
|
||||
# the other users properly, some math needs to be done.
|
||||
# Don't worry, it's just addition and subtraction.
|
||||
#
|
||||
# 65536 ought to be enough (tm), but for really rare cases the
|
||||
# maximums might need to be higher, but that only happens when
|
||||
# your /etc/sub{u,g}id allow users to have more IDs. Unless
|
||||
# --keep-uid is supported, let's do this in a way that should
|
||||
# work for everyone.
|
||||
CI_MAX_UID = $(shell sed -n "s/^$(CI_USER_LOGIN):[^:]\+://p" /etc/subuid)
|
||||
CI_MAX_GID = $(shell sed -n "s/^$(CI_USER_LOGIN):[^:]\+://p" /etc/subgid)
|
||||
ifeq ($(CI_MAX_UID),)
|
||||
CI_MAX_UID = 65536
|
||||
endif
|
||||
ifeq ($(CI_MAX_GID),)
|
||||
CI_MAX_GID = 65536
|
||||
endif
|
||||
CI_UID_OTHER = $(shell echo $$(($(CI_UID)+1)))
|
||||
CI_GID_OTHER = $(shell echo $$(($(CI_GID)+1)))
|
||||
CI_UID_OTHER_RANGE = $(shell echo $$(($(CI_MAX_UID)-$(CI_UID))))
|
||||
CI_GID_OTHER_RANGE = $(shell echo $$(($(CI_MAX_GID)-$(CI_GID))))
|
||||
|
||||
ifneq ($(CI_UID), 0)
|
||||
CI_PODMAN_ARGS = \
|
||||
--uidmap 0:1:$(CI_UID) \
|
||||
--uidmap $(CI_UID):0:1 \
|
||||
--uidmap $(CI_UID_OTHER):$(CI_UID_OTHER):$(CI_UID_OTHER_RANGE) \
|
||||
--gidmap 0:1:$(CI_GID) \
|
||||
--gidmap $(CI_GID):0:1 \
|
||||
--gidmap $(CI_GID_OTHER):$(CI_GID_OTHER):$(CI_GID_OTHER_RANGE) \
|
||||
$(NULL)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Args to use when cloning a git repo.
|
||||
# -c stop it complaining about checking out a random hash
|
||||
# -q stop it displaying progress info for local clone
|
||||
# --local ensure we don't actually copy files
|
||||
CI_GIT_ARGS = \
|
||||
-c advice.detachedHead=false \
|
||||
-q \
|
||||
--local \
|
||||
$(NULL)
|
||||
|
||||
# Args to use when running the container
|
||||
# --rm stop inactive containers getting left behind
|
||||
# --user we execute as the same user & group account
|
||||
# as dev so that file ownership matches host
|
||||
# instead of root:root
|
||||
# --workdir we change to user's home dir in the container
|
||||
# before running the workload
|
||||
# --volume to pass in the cloned git repo & config
|
||||
# --ulimit lower files limit for performance reasons
|
||||
# --interactive
|
||||
# --tty Ensure we have ability to Ctrl-C the build
|
||||
CI_ENGINE_ARGS = \
|
||||
--rm \
|
||||
--interactive \
|
||||
--tty \
|
||||
--user "$(CI_UID)":"$(CI_GID)" \
|
||||
--workdir "$(CI_USER_HOME)" \
|
||||
--env CI_CONT_SRCDIR="$(CI_CONT_SRCDIR)" \
|
||||
--env CI_MESON_ARGS="$(CI_MESON_ARGS)" \
|
||||
--env CI_NINJA_ARGS="$(CI_NINJA_ARGS)" \
|
||||
$(CI_PODMAN_ARGS) \
|
||||
$(CI_PWDB_MOUNTS) \
|
||||
$(CI_HOME_MOUNTS) \
|
||||
$(CI_SCRIPT_MOUNTS) \
|
||||
--volume $(CI_HOST_SRCDIR):$(CI_CONT_SRCDIR):z \
|
||||
--ulimit nofile=$(CI_ULIMIT_FILES):$(CI_ULIMIT_FILES) \
|
||||
--cap-add=SYS_PTRACE \
|
||||
$(NULL)
|
||||
|
||||
ci-check-engine:
|
||||
@echo -n "Checking if $(CI_ENGINE) is available..." && \
|
||||
$(CI_ENGINE) version 1>/dev/null && echo "yes"
|
||||
|
||||
ci-prepare-tree: ci-check-engine
|
||||
@test "$(CI_REUSE)" != "1" && rm -rf $(CI_SCRATCHDIR) || :
|
||||
@if ! test -d $(CI_SCRATCHDIR) ; then \
|
||||
mkdir -p $(CI_SCRATCHDIR); \
|
||||
cp /etc/passwd $(CI_SCRATCHDIR); \
|
||||
cp /etc/group $(CI_SCRATCHDIR); \
|
||||
mkdir -p $(CI_SCRATCHDIR)/home; \
|
||||
cp "$(CI_BUILD_SCRIPT)" $(CI_SCRATCHDIR)/build; \
|
||||
chmod +x "$(CI_SCRATCHDIR)/build"; \
|
||||
echo "Cloning $(CI_GIT_ROOT) to $(CI_HOST_SRCDIR)"; \
|
||||
git clone $(CI_GIT_ARGS) $(CI_GIT_ROOT) $(CI_HOST_SRCDIR) || exit 1; \
|
||||
for mod in $$(git submodule | awk '{ print $$2 }' | sed -E 's,^../,,g') ; \
|
||||
do \
|
||||
test -f $(CI_GIT_ROOT)/$$mod/.git || continue ; \
|
||||
echo "Cloning $(CI_GIT_ROOT)/$$mod to $(CI_HOST_SRCDIR)/$$mod"; \
|
||||
git clone $(CI_GIT_ARGS) $(CI_GIT_ROOT)/$$mod $(CI_HOST_SRCDIR)/$$mod || exit 1; \
|
||||
done ; \
|
||||
fi
|
||||
|
||||
ci-run-command@%: ci-prepare-tree
|
||||
$(CI_ENGINE) run \
|
||||
$(CI_ENGINE_ARGS) \
|
||||
$(CI_IMAGE_PREFIX)$*$(CI_IMAGE_TAG) \
|
||||
$(CI_COMMAND)
|
||||
@test "$(CI_CLEAN)" = "1" && rm -rf $(CI_SCRATCHDIR) || :
|
||||
|
||||
ci-shell@%:
|
||||
$(MAKE) -C $(CI_ROOTDIR) ci-run-command@$* CI_COMMAND="/bin/bash"
|
||||
|
||||
ci-build@%:
|
||||
$(MAKE) -C $(CI_ROOTDIR) ci-run-command@$* CI_COMMAND="$(CI_USER_HOME)/build"
|
||||
|
||||
ci-test@%:
|
||||
$(MAKE) -C $(CI_ROOTDIR) ci-build@$* CI_NINJA_ARGS=test
|
||||
|
||||
ci-help:
|
||||
@echo
|
||||
@echo
|
||||
@echo
|
||||
@echo " !!! PLEASE DON'T USE THIS DIRECTLY !!!"
|
||||
@echo
|
||||
@echo " Use the ci/helper script instead"
|
||||
@echo
|
||||
@echo " !!! PLEASE DON'T USE THIS DIRECTLY !!!"
|
||||
@echo
|
||||
@echo
|
||||
@echo
|
||||
@echo "Build libvirt inside containers used for CI"
|
||||
@echo
|
||||
@echo "Available targets:"
|
||||
@echo
|
||||
@echo " ci-build@\$$IMAGE - run a default 'ninja' build"
|
||||
@echo " ci-test@\$$IMAGE - run a 'ninja test'"
|
||||
@echo " ci-shell@\$$IMAGE - run an interactive shell"
|
||||
@echo " ci-help - show this help message"
|
||||
@echo
|
||||
@echo "Available make variables:"
|
||||
@echo
|
||||
@echo " CI_CLEAN=0 - do not delete '$(CI_SCRATCHDIR)' after completion"
|
||||
@echo " CI_REUSE=1 - re-use existing '$(CI_SCRATCHDIR)' content"
|
||||
@echo " CI_ENGINE=auto - container engine to use (podman, docker)"
|
||||
@echo " CI_USER_LOGIN= - which user should run in the container (default is $$USER)"
|
||||
@echo " CI_IMAGE_PREFIX= - override to prefer a locally built image, (default is $(CI_IMAGE_PREFIX))"
|
||||
@echo " CI_IMAGE_TAG=:latest - optionally use in conjunction with 'CI_IMAGE_PREFIX'"
|
||||
@echo " CI_MESON_ARGS= - extra arguments passed to meson"
|
||||
@echo " CI_NINJA_ARGS= - extra arguments passed to ninja"
|
||||
@echo
|
@@ -1,59 +0,0 @@
|
||||
==============
|
||||
CI for libvirt
|
||||
==============
|
||||
|
||||
This document provides some information related to the CI capabilities for the
|
||||
libvirt project.
|
||||
|
||||
|
||||
Cirrus CI integration
|
||||
=====================
|
||||
|
||||
libvirt currently supports three non-Linux operating systems: Windows, FreeBSD
|
||||
and macOS. Windows cross-builds can be prepared on Linux by using `MinGW`_, but
|
||||
for both FreeBSD and macOS we need to use the actual operating system, and
|
||||
unfortunately GitLab shared runners are currently not available for either.
|
||||
|
||||
To work around this limitation, we take advantage of `Cirrus CI`_'s free
|
||||
offering: more specifically, we use the `cirrus-run`_ script to trigger Cirrus
|
||||
CI jobs from GitLab CI jobs so that the workaround is almost entirely
|
||||
transparent to users and there's no need to constantly check two separate CI
|
||||
dashboards.
|
||||
|
||||
There is, however, some one-time setup required. If you want FreeBSD and macOS
|
||||
builds to happen when you push to your GitLab repository, you need to
|
||||
|
||||
* set up a GitHub repository for the project, eg. ``yourusername/libvirt``.
|
||||
This repository needs to exist for cirrus-run to work, but it doesn't need to
|
||||
be kept up to date, so you can create it and then forget about it;
|
||||
|
||||
* enable the `Cirrus CI GitHub app`_ for your GitHub account;
|
||||
|
||||
* sign up for Cirrus CI. It's enough to log into the website using your GitHub
|
||||
account;
|
||||
|
||||
* grab an API token from the `Cirrus CI settings`_ page;
|
||||
|
||||
* in the *CI/CD / Variables* section of the settings page for your GitLab
|
||||
repository, create two new variables:
|
||||
|
||||
* ``CIRRUS_GITHUB_REPO``, containing the name of the GitHub repository
|
||||
created earlier, eg. ``yourusername/libvirt``;
|
||||
|
||||
* ``CIRRUS_API_TOKEN``, containing the Cirrus CI API token generated earlier.
|
||||
This variable **must** be marked as *Masked*, because anyone with knowledge
|
||||
of it can impersonate you as far as Cirrus CI is concerned.
|
||||
|
||||
Neither of these variables should be marked as *Protected*, because in
|
||||
general you'll want to be able to trigger Cirrus CI builds from non-protected
|
||||
branches.
|
||||
|
||||
Once this one-time setup is complete, you can just keep pushing to your GitLab
|
||||
repository as usual and you'll automatically get the additional CI coverage.
|
||||
|
||||
|
||||
.. _Cirrus CI GitHub app: https://github.com/marketplace/cirrus-ci
|
||||
.. _Cirrus CI settings: https://cirrus-ci.com/settings/profile/
|
||||
.. _Cirrus CI: https://cirrus-ci.com/
|
||||
.. _MinGW: http://mingw.org/
|
||||
.. _cirrus-run: https://github.com/sio/cirrus-run/
|
23
ci/build.sh
23
ci/build.sh
@@ -1,23 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script is used to build libvirt inside the container.
|
||||
#
|
||||
# You can customize it to your liking, or alternatively use a
|
||||
# completely different script by passing
|
||||
#
|
||||
# CI_BUILD_SCRIPT=/path/to/your/build/script
|
||||
#
|
||||
# to make.
|
||||
|
||||
cd "$CI_CONT_SRCDIR"
|
||||
|
||||
export VIR_TEST_DEBUG=1
|
||||
|
||||
# $MESON_OPTS is an env that can optionally be set in the container,
|
||||
# populated at build time from the Dockerfile. A typical use case would
|
||||
# be to pass options to trigger cross-compilation
|
||||
|
||||
meson build --werror $MESON_OPTS $CI_MESON_ARGS || \
|
||||
(cat build/meson-logs/meson-log.txt && exit 1)
|
||||
|
||||
ninja -C build $CI_NINJA_ARGS
|
@@ -1,24 +0,0 @@
|
||||
@CIRRUS_VM_INSTANCE_TYPE@:
|
||||
@CIRRUS_VM_IMAGE_SELECTOR@: @CIRRUS_VM_IMAGE_NAME@
|
||||
|
||||
env:
|
||||
CI_REPOSITORY_URL: "@CI_REPOSITORY_URL@"
|
||||
CI_COMMIT_REF_NAME: "@CI_COMMIT_REF_NAME@"
|
||||
CI_COMMIT_SHA: "@CI_COMMIT_SHA@"
|
||||
PATH: "@PATH@"
|
||||
PKG_CONFIG_PATH: "@PKG_CONFIG_PATH@"
|
||||
PYTHON: "@PYTHON@"
|
||||
MAKE: "@MAKE@"
|
||||
|
||||
build_task:
|
||||
install_script:
|
||||
- @UPDATE_COMMAND@
|
||||
- @INSTALL_COMMAND@ @PKGS@
|
||||
- if test -n "@PYPI_PKGS@" ; then @PIP3@ install @PYPI_PKGS@ ; fi
|
||||
clone_script:
|
||||
- git clone --depth 100 "$CI_REPOSITORY_URL" .
|
||||
- git fetch origin "$CI_COMMIT_REF_NAME"
|
||||
- git reset --hard "$CI_COMMIT_SHA"
|
||||
build_script:
|
||||
- meson build --prefix=$(pwd)/install-root
|
||||
- ninja -C build dist
|
@@ -1,8 +0,0 @@
|
||||
PACKAGING_COMMAND='pkg'
|
||||
CC='/usr/bin/clang'
|
||||
CCACHE='/usr/local/bin/ccache'
|
||||
MAKE='/usr/local/bin/gmake'
|
||||
NINJA='/usr/local/bin/ninja'
|
||||
PYTHON='/usr/local/bin/python3'
|
||||
PIP3='/usr/local/bin/pip-3.7'
|
||||
PKGS='augeas avahi bash-completion ca_root_nss ccache cppi curl cyrus-sasl dbus diffutils diskscrub dnsmasq fusefs-libs gettext git glib gmake gnugrep gnutls gsed libpcap libpciaccess libssh libssh2 libxml2 libxslt meson ninja perl5 pkgconf polkit py37-docutils py37-flake8 python3 qemu radvd readline yajl'
|
@@ -1,8 +0,0 @@
|
||||
PACKAGING_COMMAND='pkg'
|
||||
CC='/usr/bin/clang'
|
||||
CCACHE='/usr/local/bin/ccache'
|
||||
MAKE='/usr/local/bin/gmake'
|
||||
NINJA='/usr/local/bin/ninja'
|
||||
PYTHON='/usr/local/bin/python3'
|
||||
PIP3='/usr/local/bin/pip-3.7'
|
||||
PKGS='augeas avahi bash-completion ca_root_nss ccache cppi curl cyrus-sasl dbus diffutils diskscrub dnsmasq fusefs-libs gettext git glib gmake gnugrep gnutls gsed libpcap libpciaccess libssh libssh2 libxml2 libxslt meson ninja perl5 pkgconf polkit py37-docutils py37-flake8 python3 qemu radvd readline yajl'
|
@@ -1,8 +0,0 @@
|
||||
PACKAGING_COMMAND='brew'
|
||||
CC='/usr/bin/clang'
|
||||
CCACHE='/usr/local/bin/ccache'
|
||||
MAKE='/usr/local/bin/gmake'
|
||||
NINJA='/usr/local/bin/ninja'
|
||||
PYTHON='/usr/local/bin/python3'
|
||||
PIP3='/usr/local/bin/pip3'
|
||||
PKGS='augeas bash-completion ccache cppi curl dbus diffutils dnsmasq docutils flake8 gettext git glib gnu-sed gnutls grep libiscsi libpcap libssh libssh2 libxml2 libxslt make meson ninja perl pkg-config python3 qemu readline rpcgen scrub yajl'
|
@@ -1,36 +0,0 @@
|
||||
CI job assets
|
||||
=============
|
||||
|
||||
This directory contains assets used in the automated CI jobs, most
|
||||
notably the Dockerfiles used to build container images in which the
|
||||
CI jobs then run.
|
||||
|
||||
The ``refresh`` script is used to re-create the Dockerfiles using the
|
||||
``lcitool`` command that is provided by repo
|
||||
https://gitlab.com/libvirt/libvirt-ci
|
||||
|
||||
The containers are built during the CI process and cached in the GitLab
|
||||
container registry of the project doing the build. The cached containers
|
||||
can be deleted at any time and will be correctly rebuilt.
|
||||
|
||||
|
||||
Coverity scan integration
|
||||
=========================
|
||||
|
||||
This will be used only by the main repository for master branch by running
|
||||
scheduled pipeline in GitLab.
|
||||
|
||||
The service is proved by `Coverity Scan`_ and requires that the project is
|
||||
registered there to get free coverity analysis which we already have for
|
||||
`libvirt project`_.
|
||||
|
||||
To run the coverity job it requires two new variables:
|
||||
|
||||
* ``COVERITY_SCAN_PROJECT_NAME``, containing the `libvirt project`_
|
||||
name.
|
||||
|
||||
* ``COVERITY_SCAN_TOKEN``, token visible to admins of `libvirt project`_
|
||||
|
||||
|
||||
.. _Coverity Scan: https://scan.coverity.com/
|
||||
.. _libvirt project: https://scan.coverity.com/projects/libvirt
|
@@ -1,135 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile centos-7 libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/centos:7
|
||||
|
||||
RUN yum update -y && \
|
||||
echo 'skip_missing_names_on_install=0' >> /etc/yum.conf && \
|
||||
echo -e '[openvz]\n\
|
||||
name=OpenVZ addons\n\
|
||||
baseurl=https://download.openvz.org/virtuozzo/releases/openvz-7.0.11-235/x86_64/os/\n\
|
||||
enabled=1\n\
|
||||
gpgcheck=1\n\
|
||||
skip_if_unavailable=0\n\
|
||||
metadata_expire=6h\n\
|
||||
priority=90\n\
|
||||
includepkgs=libprl*' > /etc/yum.repos.d/openvz.repo && \
|
||||
echo -e '-----BEGIN PGP PUBLIC KEY BLOCK-----\n\
|
||||
Version: GnuPG v2.0.22 (GNU/Linux)\n\
|
||||
\n\
|
||||
mI0EVl80nQEEAKrEeyeTCwrzS9kYedZ/sAc/GUqlb81C7pA9SaR3fyck5mVw1Ogk\n\
|
||||
YdmNBPM2kY7QDxR9F0EpSpnxSCAXZXugsQ8KzZ0DRLVeBDQyGs9IGK5hI0zzxIil\n\
|
||||
BzfvIexLiQQhLy7YlIi8Jt/uUqKkW0pIMNMGcduY97VATtczpncpkmSzABEBAAG0\n\
|
||||
SFZpcnR1b3p6byBUZWFtIChHUEcga2V5IHNpZ25hdHVyZSBmb3IgcGFja2FnZXMp\n\
|
||||
IDxzZWN1cml0eUB2aXJ0dW96em8uY29tPoi5BBMBAgAjBQJWXzSdAhsDBwsJCAcD\n\
|
||||
AgEGFQgCCQoLBBYCAwECHgECF4AACgkQygt9GUTNrSruIgP/er70Eyo73A1gfrjv\n\
|
||||
oPUkyo4rslVRZu3qqCwoMFtJc/Z/UxWgEka1buorlcGLa6eO/EZ49c0n+KGa4Kvt\n\
|
||||
EUboIq0yEu5i0FyAj92ifm+hNhoAbGfm0cZ4/fD0oGr3l8OsQo4+iHX4xAPwFe7Y\n\
|
||||
zABuB8I1ZDZ4OIp5tDfTTuF2LT24jQRWXzSdAQQAog2Aqb+Ptl68O7cQhWLjVGkj\n\
|
||||
yyigZrdeReLx3HloKJPBeQ/kA6uvMJc/IYS3uppMWXv9v+QenS6uhP1TUJ2k9FvM\n\
|
||||
t94MQZfALN7Vpf8AF+UeWu4Ru+y4BNzcFhrPhIFNFChOR2QqW6FkgE57D9I177NC\n\
|
||||
oJMyrlNe8wcGa178An8AEQEAAYifBBgBAgAJBQJWXzSdAhsMAAoJEMoLfRlEza0q\n\
|
||||
bKwD/3+OFVIEXnIv5XgdGRNX5fHggsUN1bb8gva7HANRlKdd4LD8foDM3F/yv/3V\n\
|
||||
igG14D5EjKz56SaBDNgiI4++hOzb2M8jhAsR86jxkXFrrP1U3ZNRKg6av9DPFAPS\n\
|
||||
WEiJKtQrZDJloqtyi/mmRa1VsV7RYR0VPJjhK/R8EQ7Ysshy\n\
|
||||
=fRMg\n\
|
||||
-----END PGP PUBLIC KEY BLOCK-----' > /etc/pki/rpm-gpg/RPM-GPG-KEY-OpenVZ && \
|
||||
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-OpenVZ && \
|
||||
yum install -y epel-release && \
|
||||
yum install -y centos-release-xen-48 && \
|
||||
yum install -y \
|
||||
audit-libs-devel \
|
||||
augeas \
|
||||
avahi-devel \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
cyrus-sasl-devel \
|
||||
dbus-devel \
|
||||
device-mapper-devel \
|
||||
diffutils \
|
||||
dnsmasq \
|
||||
dwarves \
|
||||
ebtables \
|
||||
firewalld-filesystem \
|
||||
fuse-devel \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
glib2-devel \
|
||||
glibc-common \
|
||||
glibc-devel \
|
||||
glusterfs-api-devel \
|
||||
gnutls-devel \
|
||||
grep \
|
||||
iproute \
|
||||
iptables \
|
||||
iscsi-initiator-utils \
|
||||
kmod \
|
||||
libacl-devel \
|
||||
libattr-devel \
|
||||
libblkid-devel \
|
||||
libcap-ng-devel \
|
||||
libcurl-devel \
|
||||
libiscsi-devel \
|
||||
libnl3-devel \
|
||||
libpcap-devel \
|
||||
libpciaccess-devel \
|
||||
libprlsdk-devel \
|
||||
librbd1-devel \
|
||||
libselinux-devel \
|
||||
libssh-devel \
|
||||
libssh2-devel \
|
||||
libtirpc-devel \
|
||||
libudev-devel \
|
||||
libwsman-devel \
|
||||
libxml2 \
|
||||
libxml2-devel \
|
||||
libxslt \
|
||||
lvm2 \
|
||||
make \
|
||||
netcf-devel \
|
||||
nfs-utils \
|
||||
ninja-build \
|
||||
numactl-devel \
|
||||
numad \
|
||||
parted \
|
||||
parted-devel \
|
||||
perl \
|
||||
pkgconfig \
|
||||
polkit \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
python36-docutils \
|
||||
qemu-img \
|
||||
radvd \
|
||||
readline-devel \
|
||||
rpm-build \
|
||||
sanlock-devel \
|
||||
scrub \
|
||||
sed \
|
||||
systemtap-sdt-devel \
|
||||
wireshark-devel \
|
||||
xen-devel \
|
||||
xfsprogs-devel \
|
||||
yajl-devel && \
|
||||
yum autoremove -y && \
|
||||
yum clean all -y && \
|
||||
rpm -qa | sort > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
|
||||
|
||||
RUN pip3 install \
|
||||
meson==0.55.3
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja-build"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
@@ -1,107 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile centos-8 libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/centos:8
|
||||
|
||||
RUN dnf update -y && \
|
||||
dnf install 'dnf-command(config-manager)' -y && \
|
||||
dnf config-manager --set-enabled -y powertools && \
|
||||
dnf install -y centos-release-advanced-virtualization && \
|
||||
dnf install -y epel-release && \
|
||||
dnf install -y \
|
||||
audit-libs-devel \
|
||||
augeas \
|
||||
avahi-devel \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
cyrus-sasl-devel \
|
||||
dbus-devel \
|
||||
device-mapper-devel \
|
||||
diffutils \
|
||||
dnsmasq \
|
||||
dwarves \
|
||||
ebtables \
|
||||
firewalld-filesystem \
|
||||
fuse-devel \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
glib2-devel \
|
||||
glibc-devel \
|
||||
glibc-langpack-en \
|
||||
glusterfs-api-devel \
|
||||
gnutls-devel \
|
||||
grep \
|
||||
iproute \
|
||||
iproute-tc \
|
||||
iptables \
|
||||
iscsi-initiator-utils \
|
||||
kmod \
|
||||
libacl-devel \
|
||||
libattr-devel \
|
||||
libblkid-devel \
|
||||
libcap-ng-devel \
|
||||
libcurl-devel \
|
||||
libiscsi-devel \
|
||||
libnl3-devel \
|
||||
libpcap-devel \
|
||||
libpciaccess-devel \
|
||||
librbd-devel \
|
||||
libselinux-devel \
|
||||
libssh-devel \
|
||||
libssh2-devel \
|
||||
libtirpc-devel \
|
||||
libudev-devel \
|
||||
libwsman-devel \
|
||||
libxml2 \
|
||||
libxml2-devel \
|
||||
libxslt \
|
||||
lvm2 \
|
||||
make \
|
||||
netcf-devel \
|
||||
nfs-utils \
|
||||
ninja-build \
|
||||
numactl-devel \
|
||||
numad \
|
||||
parted \
|
||||
parted-devel \
|
||||
perl \
|
||||
pkgconfig \
|
||||
polkit \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
python3-flake8 \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
qemu-img \
|
||||
radvd \
|
||||
readline-devel \
|
||||
rpcgen \
|
||||
rpm-build \
|
||||
sanlock-devel \
|
||||
scrub \
|
||||
sed \
|
||||
systemtap-sdt-devel \
|
||||
wireshark-devel \
|
||||
xfsprogs-devel \
|
||||
yajl-devel && \
|
||||
dnf autoremove -y && \
|
||||
dnf clean all -y && \
|
||||
rpm -qa | sort > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
|
||||
|
||||
RUN pip3 install \
|
||||
meson==0.55.3
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
@@ -1,109 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile centos-stream libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/centos:8
|
||||
|
||||
RUN dnf install -y centos-release-stream && \
|
||||
dnf install -y centos-stream-release && \
|
||||
dnf update -y && \
|
||||
dnf install 'dnf-command(config-manager)' -y && \
|
||||
dnf config-manager --set-enabled -y powertools && \
|
||||
dnf install -y centos-release-advanced-virtualization && \
|
||||
dnf install -y epel-release && \
|
||||
dnf install -y \
|
||||
audit-libs-devel \
|
||||
augeas \
|
||||
avahi-devel \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
cyrus-sasl-devel \
|
||||
dbus-devel \
|
||||
device-mapper-devel \
|
||||
diffutils \
|
||||
dnsmasq \
|
||||
dwarves \
|
||||
ebtables \
|
||||
firewalld-filesystem \
|
||||
fuse-devel \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
glib2-devel \
|
||||
glibc-devel \
|
||||
glibc-langpack-en \
|
||||
glusterfs-api-devel \
|
||||
gnutls-devel \
|
||||
grep \
|
||||
iproute \
|
||||
iproute-tc \
|
||||
iptables \
|
||||
iscsi-initiator-utils \
|
||||
kmod \
|
||||
libacl-devel \
|
||||
libattr-devel \
|
||||
libblkid-devel \
|
||||
libcap-ng-devel \
|
||||
libcurl-devel \
|
||||
libiscsi-devel \
|
||||
libnl3-devel \
|
||||
libpcap-devel \
|
||||
libpciaccess-devel \
|
||||
librbd-devel \
|
||||
libselinux-devel \
|
||||
libssh-devel \
|
||||
libssh2-devel \
|
||||
libtirpc-devel \
|
||||
libudev-devel \
|
||||
libwsman-devel \
|
||||
libxml2 \
|
||||
libxml2-devel \
|
||||
libxslt \
|
||||
lvm2 \
|
||||
make \
|
||||
netcf-devel \
|
||||
nfs-utils \
|
||||
ninja-build \
|
||||
numactl-devel \
|
||||
numad \
|
||||
parted \
|
||||
parted-devel \
|
||||
perl \
|
||||
pkgconfig \
|
||||
polkit \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
python3-flake8 \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
qemu-img \
|
||||
radvd \
|
||||
readline-devel \
|
||||
rpcgen \
|
||||
rpm-build \
|
||||
sanlock-devel \
|
||||
scrub \
|
||||
sed \
|
||||
systemtap-sdt-devel \
|
||||
wireshark-devel \
|
||||
xfsprogs-devel \
|
||||
yajl-devel && \
|
||||
dnf autoremove -y && \
|
||||
dnf clean all -y && \
|
||||
rpm -qa | sort > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
|
||||
|
||||
RUN pip3 install \
|
||||
meson==0.55.3
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
@@ -1,132 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile --cross aarch64 debian-10 libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/debian:10-slim
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libc-dev-bin \
|
||||
libxml2-utils \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-$(basename /usr/bin/gcc)
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
dpkg --add-architecture arm64 && \
|
||||
eatmydata apt-get update && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
gcc-aarch64-linux-gnu \
|
||||
libacl1-dev:arm64 \
|
||||
libapparmor-dev:arm64 \
|
||||
libattr1-dev:arm64 \
|
||||
libaudit-dev:arm64 \
|
||||
libavahi-client-dev:arm64 \
|
||||
libblkid-dev:arm64 \
|
||||
libc6-dev:arm64 \
|
||||
libcap-ng-dev:arm64 \
|
||||
libcurl4-gnutls-dev:arm64 \
|
||||
libdbus-1-dev:arm64 \
|
||||
libdevmapper-dev:arm64 \
|
||||
libfuse-dev:arm64 \
|
||||
libglib2.0-dev:arm64 \
|
||||
libglusterfs-dev:arm64 \
|
||||
libgnutls28-dev:arm64 \
|
||||
libiscsi-dev:arm64 \
|
||||
libnl-3-dev:arm64 \
|
||||
libnl-route-3-dev:arm64 \
|
||||
libnuma-dev:arm64 \
|
||||
libparted-dev:arm64 \
|
||||
libpcap0.8-dev:arm64 \
|
||||
libpciaccess-dev:arm64 \
|
||||
librbd-dev:arm64 \
|
||||
libreadline-dev:arm64 \
|
||||
libsanlock-dev:arm64 \
|
||||
libsasl2-dev:arm64 \
|
||||
libselinux1-dev:arm64 \
|
||||
libssh-gcrypt-dev:arm64 \
|
||||
libssh2-1-dev:arm64 \
|
||||
libtirpc-dev:arm64 \
|
||||
libudev-dev:arm64 \
|
||||
libxen-dev:arm64 \
|
||||
libxml2-dev:arm64 \
|
||||
libyajl-dev:arm64 \
|
||||
systemtap-sdt-dev:arm64 \
|
||||
xfslibs-dev:arm64 && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
mkdir -p /usr/local/share/meson/cross && \
|
||||
echo "[binaries]\n\
|
||||
c = '/usr/bin/aarch64-linux-gnu-gcc'\n\
|
||||
ar = '/usr/bin/aarch64-linux-gnu-gcc-ar'\n\
|
||||
strip = '/usr/bin/aarch64-linux-gnu-strip'\n\
|
||||
pkgconfig = '/usr/bin/aarch64-linux-gnu-pkg-config'\n\
|
||||
\n\
|
||||
[host_machine]\n\
|
||||
system = 'linux'\n\
|
||||
cpu_family = 'aarch64'\n\
|
||||
cpu = 'aarch64'\n\
|
||||
endian = 'little'" > /usr/local/share/meson/cross/aarch64-linux-gnu
|
||||
|
||||
RUN pip3 install \
|
||||
meson==0.55.3
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
||||
|
||||
ENV ABI "aarch64-linux-gnu"
|
||||
ENV MESON_OPTS "--cross-file=aarch64-linux-gnu"
|
@@ -1,131 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile --cross armv6l debian-10 libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/debian:10-slim
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libc-dev-bin \
|
||||
libxml2-utils \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabi-cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabi-$(basename /usr/bin/gcc)
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
dpkg --add-architecture armel && \
|
||||
eatmydata apt-get update && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
gcc-arm-linux-gnueabi \
|
||||
libacl1-dev:armel \
|
||||
libapparmor-dev:armel \
|
||||
libattr1-dev:armel \
|
||||
libaudit-dev:armel \
|
||||
libavahi-client-dev:armel \
|
||||
libblkid-dev:armel \
|
||||
libc6-dev:armel \
|
||||
libcap-ng-dev:armel \
|
||||
libcurl4-gnutls-dev:armel \
|
||||
libdbus-1-dev:armel \
|
||||
libdevmapper-dev:armel \
|
||||
libfuse-dev:armel \
|
||||
libglib2.0-dev:armel \
|
||||
libglusterfs-dev:armel \
|
||||
libgnutls28-dev:armel \
|
||||
libiscsi-dev:armel \
|
||||
libnl-3-dev:armel \
|
||||
libnl-route-3-dev:armel \
|
||||
libnuma-dev:armel \
|
||||
libparted-dev:armel \
|
||||
libpcap0.8-dev:armel \
|
||||
libpciaccess-dev:armel \
|
||||
librbd-dev:armel \
|
||||
libreadline-dev:armel \
|
||||
libsanlock-dev:armel \
|
||||
libsasl2-dev:armel \
|
||||
libselinux1-dev:armel \
|
||||
libssh-gcrypt-dev:armel \
|
||||
libssh2-1-dev:armel \
|
||||
libtirpc-dev:armel \
|
||||
libudev-dev:armel \
|
||||
libxml2-dev:armel \
|
||||
libyajl-dev:armel \
|
||||
systemtap-sdt-dev:armel \
|
||||
xfslibs-dev:armel && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
mkdir -p /usr/local/share/meson/cross && \
|
||||
echo "[binaries]\n\
|
||||
c = '/usr/bin/arm-linux-gnueabi-gcc'\n\
|
||||
ar = '/usr/bin/arm-linux-gnueabi-gcc-ar'\n\
|
||||
strip = '/usr/bin/arm-linux-gnueabi-strip'\n\
|
||||
pkgconfig = '/usr/bin/arm-linux-gnueabi-pkg-config'\n\
|
||||
\n\
|
||||
[host_machine]\n\
|
||||
system = 'linux'\n\
|
||||
cpu_family = 'arm'\n\
|
||||
cpu = 'arm'\n\
|
||||
endian = 'little'" > /usr/local/share/meson/cross/arm-linux-gnueabi
|
||||
|
||||
RUN pip3 install \
|
||||
meson==0.55.3
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
||||
|
||||
ENV ABI "arm-linux-gnueabi"
|
||||
ENV MESON_OPTS "--cross-file=arm-linux-gnueabi"
|
@@ -1,132 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile --cross armv7l debian-10 libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/debian:10-slim
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libc-dev-bin \
|
||||
libxml2-utils \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-$(basename /usr/bin/gcc)
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
dpkg --add-architecture armhf && \
|
||||
eatmydata apt-get update && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
gcc-arm-linux-gnueabihf \
|
||||
libacl1-dev:armhf \
|
||||
libapparmor-dev:armhf \
|
||||
libattr1-dev:armhf \
|
||||
libaudit-dev:armhf \
|
||||
libavahi-client-dev:armhf \
|
||||
libblkid-dev:armhf \
|
||||
libc6-dev:armhf \
|
||||
libcap-ng-dev:armhf \
|
||||
libcurl4-gnutls-dev:armhf \
|
||||
libdbus-1-dev:armhf \
|
||||
libdevmapper-dev:armhf \
|
||||
libfuse-dev:armhf \
|
||||
libglib2.0-dev:armhf \
|
||||
libglusterfs-dev:armhf \
|
||||
libgnutls28-dev:armhf \
|
||||
libiscsi-dev:armhf \
|
||||
libnl-3-dev:armhf \
|
||||
libnl-route-3-dev:armhf \
|
||||
libnuma-dev:armhf \
|
||||
libparted-dev:armhf \
|
||||
libpcap0.8-dev:armhf \
|
||||
libpciaccess-dev:armhf \
|
||||
librbd-dev:armhf \
|
||||
libreadline-dev:armhf \
|
||||
libsanlock-dev:armhf \
|
||||
libsasl2-dev:armhf \
|
||||
libselinux1-dev:armhf \
|
||||
libssh-gcrypt-dev:armhf \
|
||||
libssh2-1-dev:armhf \
|
||||
libtirpc-dev:armhf \
|
||||
libudev-dev:armhf \
|
||||
libxen-dev:armhf \
|
||||
libxml2-dev:armhf \
|
||||
libyajl-dev:armhf \
|
||||
systemtap-sdt-dev:armhf \
|
||||
xfslibs-dev:armhf && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
mkdir -p /usr/local/share/meson/cross && \
|
||||
echo "[binaries]\n\
|
||||
c = '/usr/bin/arm-linux-gnueabihf-gcc'\n\
|
||||
ar = '/usr/bin/arm-linux-gnueabihf-gcc-ar'\n\
|
||||
strip = '/usr/bin/arm-linux-gnueabihf-strip'\n\
|
||||
pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'\n\
|
||||
\n\
|
||||
[host_machine]\n\
|
||||
system = 'linux'\n\
|
||||
cpu_family = 'arm'\n\
|
||||
cpu = 'armhf'\n\
|
||||
endian = 'little'" > /usr/local/share/meson/cross/arm-linux-gnueabihf
|
||||
|
||||
RUN pip3 install \
|
||||
meson==0.55.3
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
||||
|
||||
ENV ABI "arm-linux-gnueabihf"
|
||||
ENV MESON_OPTS "--cross-file=arm-linux-gnueabihf"
|
@@ -1,131 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile --cross i686 debian-10 libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/debian:10-slim
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libc-dev-bin \
|
||||
libxml2-utils \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-linux-gnu-cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-linux-gnu-$(basename /usr/bin/gcc)
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
dpkg --add-architecture i386 && \
|
||||
eatmydata apt-get update && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
gcc-i686-linux-gnu \
|
||||
libacl1-dev:i386 \
|
||||
libapparmor-dev:i386 \
|
||||
libattr1-dev:i386 \
|
||||
libaudit-dev:i386 \
|
||||
libavahi-client-dev:i386 \
|
||||
libblkid-dev:i386 \
|
||||
libc6-dev:i386 \
|
||||
libcap-ng-dev:i386 \
|
||||
libcurl4-gnutls-dev:i386 \
|
||||
libdbus-1-dev:i386 \
|
||||
libdevmapper-dev:i386 \
|
||||
libfuse-dev:i386 \
|
||||
libglib2.0-dev:i386 \
|
||||
libglusterfs-dev:i386 \
|
||||
libgnutls28-dev:i386 \
|
||||
libiscsi-dev:i386 \
|
||||
libnl-3-dev:i386 \
|
||||
libnl-route-3-dev:i386 \
|
||||
libnuma-dev:i386 \
|
||||
libparted-dev:i386 \
|
||||
libpcap0.8-dev:i386 \
|
||||
libpciaccess-dev:i386 \
|
||||
librbd-dev:i386 \
|
||||
libreadline-dev:i386 \
|
||||
libsanlock-dev:i386 \
|
||||
libsasl2-dev:i386 \
|
||||
libselinux1-dev:i386 \
|
||||
libssh-gcrypt-dev:i386 \
|
||||
libssh2-1-dev:i386 \
|
||||
libtirpc-dev:i386 \
|
||||
libudev-dev:i386 \
|
||||
libxml2-dev:i386 \
|
||||
libyajl-dev:i386 \
|
||||
systemtap-sdt-dev:i386 \
|
||||
xfslibs-dev:i386 && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
mkdir -p /usr/local/share/meson/cross && \
|
||||
echo "[binaries]\n\
|
||||
c = '/usr/bin/i686-linux-gnu-gcc'\n\
|
||||
ar = '/usr/bin/i686-linux-gnu-gcc-ar'\n\
|
||||
strip = '/usr/bin/i686-linux-gnu-strip'\n\
|
||||
pkgconfig = '/usr/bin/i686-linux-gnu-pkg-config'\n\
|
||||
\n\
|
||||
[host_machine]\n\
|
||||
system = 'linux'\n\
|
||||
cpu_family = 'x86'\n\
|
||||
cpu = 'i686'\n\
|
||||
endian = 'little'" > /usr/local/share/meson/cross/i686-linux-gnu
|
||||
|
||||
RUN pip3 install \
|
||||
meson==0.55.3
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
||||
|
||||
ENV ABI "i686-linux-gnu"
|
||||
ENV MESON_OPTS "--cross-file=i686-linux-gnu"
|
@@ -1,131 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile --cross mips debian-10 libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/debian:10-slim
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libc-dev-bin \
|
||||
libxml2-utils \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mips-linux-gnu-cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mips-linux-gnu-$(basename /usr/bin/gcc)
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
dpkg --add-architecture mips && \
|
||||
eatmydata apt-get update && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
gcc-mips-linux-gnu \
|
||||
libacl1-dev:mips \
|
||||
libapparmor-dev:mips \
|
||||
libattr1-dev:mips \
|
||||
libaudit-dev:mips \
|
||||
libavahi-client-dev:mips \
|
||||
libblkid-dev:mips \
|
||||
libc6-dev:mips \
|
||||
libcap-ng-dev:mips \
|
||||
libcurl4-gnutls-dev:mips \
|
||||
libdbus-1-dev:mips \
|
||||
libdevmapper-dev:mips \
|
||||
libfuse-dev:mips \
|
||||
libglib2.0-dev:mips \
|
||||
libglusterfs-dev:mips \
|
||||
libgnutls28-dev:mips \
|
||||
libiscsi-dev:mips \
|
||||
libnl-3-dev:mips \
|
||||
libnl-route-3-dev:mips \
|
||||
libnuma-dev:mips \
|
||||
libparted-dev:mips \
|
||||
libpcap0.8-dev:mips \
|
||||
libpciaccess-dev:mips \
|
||||
librbd-dev:mips \
|
||||
libreadline-dev:mips \
|
||||
libsanlock-dev:mips \
|
||||
libsasl2-dev:mips \
|
||||
libselinux1-dev:mips \
|
||||
libssh-gcrypt-dev:mips \
|
||||
libssh2-1-dev:mips \
|
||||
libtirpc-dev:mips \
|
||||
libudev-dev:mips \
|
||||
libxml2-dev:mips \
|
||||
libyajl-dev:mips \
|
||||
systemtap-sdt-dev:mips \
|
||||
xfslibs-dev:mips && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
mkdir -p /usr/local/share/meson/cross && \
|
||||
echo "[binaries]\n\
|
||||
c = '/usr/bin/mips-linux-gnu-gcc'\n\
|
||||
ar = '/usr/bin/mips-linux-gnu-gcc-ar'\n\
|
||||
strip = '/usr/bin/mips-linux-gnu-strip'\n\
|
||||
pkgconfig = '/usr/bin/mips-linux-gnu-pkg-config'\n\
|
||||
\n\
|
||||
[host_machine]\n\
|
||||
system = 'linux'\n\
|
||||
cpu_family = 'mips'\n\
|
||||
cpu = 'mips'\n\
|
||||
endian = 'big'" > /usr/local/share/meson/cross/mips-linux-gnu
|
||||
|
||||
RUN pip3 install \
|
||||
meson==0.55.3
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
||||
|
||||
ENV ABI "mips-linux-gnu"
|
||||
ENV MESON_OPTS "--cross-file=mips-linux-gnu"
|
@@ -1,131 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile --cross mips64el debian-10 libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/debian:10-slim
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libc-dev-bin \
|
||||
libxml2-utils \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mips64el-linux-gnuabi64-cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mips64el-linux-gnuabi64-$(basename /usr/bin/gcc)
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
dpkg --add-architecture mips64el && \
|
||||
eatmydata apt-get update && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
gcc-mips64el-linux-gnuabi64 \
|
||||
libacl1-dev:mips64el \
|
||||
libapparmor-dev:mips64el \
|
||||
libattr1-dev:mips64el \
|
||||
libaudit-dev:mips64el \
|
||||
libavahi-client-dev:mips64el \
|
||||
libblkid-dev:mips64el \
|
||||
libc6-dev:mips64el \
|
||||
libcap-ng-dev:mips64el \
|
||||
libcurl4-gnutls-dev:mips64el \
|
||||
libdbus-1-dev:mips64el \
|
||||
libdevmapper-dev:mips64el \
|
||||
libfuse-dev:mips64el \
|
||||
libglib2.0-dev:mips64el \
|
||||
libglusterfs-dev:mips64el \
|
||||
libgnutls28-dev:mips64el \
|
||||
libiscsi-dev:mips64el \
|
||||
libnl-3-dev:mips64el \
|
||||
libnl-route-3-dev:mips64el \
|
||||
libnuma-dev:mips64el \
|
||||
libparted-dev:mips64el \
|
||||
libpcap0.8-dev:mips64el \
|
||||
libpciaccess-dev:mips64el \
|
||||
librbd-dev:mips64el \
|
||||
libreadline-dev:mips64el \
|
||||
libsanlock-dev:mips64el \
|
||||
libsasl2-dev:mips64el \
|
||||
libselinux1-dev:mips64el \
|
||||
libssh-gcrypt-dev:mips64el \
|
||||
libssh2-1-dev:mips64el \
|
||||
libtirpc-dev:mips64el \
|
||||
libudev-dev:mips64el \
|
||||
libxml2-dev:mips64el \
|
||||
libyajl-dev:mips64el \
|
||||
systemtap-sdt-dev:mips64el \
|
||||
xfslibs-dev:mips64el && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
mkdir -p /usr/local/share/meson/cross && \
|
||||
echo "[binaries]\n\
|
||||
c = '/usr/bin/mips64el-linux-gnuabi64-gcc'\n\
|
||||
ar = '/usr/bin/mips64el-linux-gnuabi64-gcc-ar'\n\
|
||||
strip = '/usr/bin/mips64el-linux-gnuabi64-strip'\n\
|
||||
pkgconfig = '/usr/bin/mips64el-linux-gnuabi64-pkg-config'\n\
|
||||
\n\
|
||||
[host_machine]\n\
|
||||
system = 'linux'\n\
|
||||
cpu_family = 'mips64'\n\
|
||||
cpu = 'mips64el'\n\
|
||||
endian = 'little'" > /usr/local/share/meson/cross/mips64el-linux-gnuabi64
|
||||
|
||||
RUN pip3 install \
|
||||
meson==0.55.3
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
||||
|
||||
ENV ABI "mips64el-linux-gnuabi64"
|
||||
ENV MESON_OPTS "--cross-file=mips64el-linux-gnuabi64"
|
@@ -1,131 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile --cross mipsel debian-10 libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/debian:10-slim
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libc-dev-bin \
|
||||
libxml2-utils \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mipsel-linux-gnu-cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mipsel-linux-gnu-$(basename /usr/bin/gcc)
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
dpkg --add-architecture mipsel && \
|
||||
eatmydata apt-get update && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
gcc-mipsel-linux-gnu \
|
||||
libacl1-dev:mipsel \
|
||||
libapparmor-dev:mipsel \
|
||||
libattr1-dev:mipsel \
|
||||
libaudit-dev:mipsel \
|
||||
libavahi-client-dev:mipsel \
|
||||
libblkid-dev:mipsel \
|
||||
libc6-dev:mipsel \
|
||||
libcap-ng-dev:mipsel \
|
||||
libcurl4-gnutls-dev:mipsel \
|
||||
libdbus-1-dev:mipsel \
|
||||
libdevmapper-dev:mipsel \
|
||||
libfuse-dev:mipsel \
|
||||
libglib2.0-dev:mipsel \
|
||||
libglusterfs-dev:mipsel \
|
||||
libgnutls28-dev:mipsel \
|
||||
libiscsi-dev:mipsel \
|
||||
libnl-3-dev:mipsel \
|
||||
libnl-route-3-dev:mipsel \
|
||||
libnuma-dev:mipsel \
|
||||
libparted-dev:mipsel \
|
||||
libpcap0.8-dev:mipsel \
|
||||
libpciaccess-dev:mipsel \
|
||||
librbd-dev:mipsel \
|
||||
libreadline-dev:mipsel \
|
||||
libsanlock-dev:mipsel \
|
||||
libsasl2-dev:mipsel \
|
||||
libselinux1-dev:mipsel \
|
||||
libssh-gcrypt-dev:mipsel \
|
||||
libssh2-1-dev:mipsel \
|
||||
libtirpc-dev:mipsel \
|
||||
libudev-dev:mipsel \
|
||||
libxml2-dev:mipsel \
|
||||
libyajl-dev:mipsel \
|
||||
systemtap-sdt-dev:mipsel \
|
||||
xfslibs-dev:mipsel && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
mkdir -p /usr/local/share/meson/cross && \
|
||||
echo "[binaries]\n\
|
||||
c = '/usr/bin/mipsel-linux-gnu-gcc'\n\
|
||||
ar = '/usr/bin/mipsel-linux-gnu-gcc-ar'\n\
|
||||
strip = '/usr/bin/mipsel-linux-gnu-strip'\n\
|
||||
pkgconfig = '/usr/bin/mipsel-linux-gnu-pkg-config'\n\
|
||||
\n\
|
||||
[host_machine]\n\
|
||||
system = 'linux'\n\
|
||||
cpu_family = 'mips'\n\
|
||||
cpu = 'mipsel'\n\
|
||||
endian = 'little'" > /usr/local/share/meson/cross/mipsel-linux-gnu
|
||||
|
||||
RUN pip3 install \
|
||||
meson==0.55.3
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
||||
|
||||
ENV ABI "mipsel-linux-gnu"
|
||||
ENV MESON_OPTS "--cross-file=mipsel-linux-gnu"
|
@@ -1,131 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile --cross ppc64le debian-10 libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/debian:10-slim
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libc-dev-bin \
|
||||
libxml2-utils \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/powerpc64le-linux-gnu-cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/powerpc64le-linux-gnu-$(basename /usr/bin/gcc)
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
dpkg --add-architecture ppc64el && \
|
||||
eatmydata apt-get update && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
gcc-powerpc64le-linux-gnu \
|
||||
libacl1-dev:ppc64el \
|
||||
libapparmor-dev:ppc64el \
|
||||
libattr1-dev:ppc64el \
|
||||
libaudit-dev:ppc64el \
|
||||
libavahi-client-dev:ppc64el \
|
||||
libblkid-dev:ppc64el \
|
||||
libc6-dev:ppc64el \
|
||||
libcap-ng-dev:ppc64el \
|
||||
libcurl4-gnutls-dev:ppc64el \
|
||||
libdbus-1-dev:ppc64el \
|
||||
libdevmapper-dev:ppc64el \
|
||||
libfuse-dev:ppc64el \
|
||||
libglib2.0-dev:ppc64el \
|
||||
libglusterfs-dev:ppc64el \
|
||||
libgnutls28-dev:ppc64el \
|
||||
libiscsi-dev:ppc64el \
|
||||
libnl-3-dev:ppc64el \
|
||||
libnl-route-3-dev:ppc64el \
|
||||
libnuma-dev:ppc64el \
|
||||
libparted-dev:ppc64el \
|
||||
libpcap0.8-dev:ppc64el \
|
||||
libpciaccess-dev:ppc64el \
|
||||
librbd-dev:ppc64el \
|
||||
libreadline-dev:ppc64el \
|
||||
libsanlock-dev:ppc64el \
|
||||
libsasl2-dev:ppc64el \
|
||||
libselinux1-dev:ppc64el \
|
||||
libssh-gcrypt-dev:ppc64el \
|
||||
libssh2-1-dev:ppc64el \
|
||||
libtirpc-dev:ppc64el \
|
||||
libudev-dev:ppc64el \
|
||||
libxml2-dev:ppc64el \
|
||||
libyajl-dev:ppc64el \
|
||||
systemtap-sdt-dev:ppc64el \
|
||||
xfslibs-dev:ppc64el && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
mkdir -p /usr/local/share/meson/cross && \
|
||||
echo "[binaries]\n\
|
||||
c = '/usr/bin/powerpc64le-linux-gnu-gcc'\n\
|
||||
ar = '/usr/bin/powerpc64le-linux-gnu-gcc-ar'\n\
|
||||
strip = '/usr/bin/powerpc64le-linux-gnu-strip'\n\
|
||||
pkgconfig = '/usr/bin/powerpc64le-linux-gnu-pkg-config'\n\
|
||||
\n\
|
||||
[host_machine]\n\
|
||||
system = 'linux'\n\
|
||||
cpu_family = 'ppc64'\n\
|
||||
cpu = 'powerpc64le'\n\
|
||||
endian = 'little'" > /usr/local/share/meson/cross/powerpc64le-linux-gnu
|
||||
|
||||
RUN pip3 install \
|
||||
meson==0.55.3
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
||||
|
||||
ENV ABI "powerpc64le-linux-gnu"
|
||||
ENV MESON_OPTS "--cross-file=powerpc64le-linux-gnu"
|
@@ -1,131 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile --cross s390x debian-10 libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/debian:10-slim
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libc-dev-bin \
|
||||
libxml2-utils \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/s390x-linux-gnu-cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/s390x-linux-gnu-$(basename /usr/bin/gcc)
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
dpkg --add-architecture s390x && \
|
||||
eatmydata apt-get update && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
gcc-s390x-linux-gnu \
|
||||
libacl1-dev:s390x \
|
||||
libapparmor-dev:s390x \
|
||||
libattr1-dev:s390x \
|
||||
libaudit-dev:s390x \
|
||||
libavahi-client-dev:s390x \
|
||||
libblkid-dev:s390x \
|
||||
libc6-dev:s390x \
|
||||
libcap-ng-dev:s390x \
|
||||
libcurl4-gnutls-dev:s390x \
|
||||
libdbus-1-dev:s390x \
|
||||
libdevmapper-dev:s390x \
|
||||
libfuse-dev:s390x \
|
||||
libglib2.0-dev:s390x \
|
||||
libglusterfs-dev:s390x \
|
||||
libgnutls28-dev:s390x \
|
||||
libiscsi-dev:s390x \
|
||||
libnl-3-dev:s390x \
|
||||
libnl-route-3-dev:s390x \
|
||||
libnuma-dev:s390x \
|
||||
libparted-dev:s390x \
|
||||
libpcap0.8-dev:s390x \
|
||||
libpciaccess-dev:s390x \
|
||||
librbd-dev:s390x \
|
||||
libreadline-dev:s390x \
|
||||
libsanlock-dev:s390x \
|
||||
libsasl2-dev:s390x \
|
||||
libselinux1-dev:s390x \
|
||||
libssh-gcrypt-dev:s390x \
|
||||
libssh2-1-dev:s390x \
|
||||
libtirpc-dev:s390x \
|
||||
libudev-dev:s390x \
|
||||
libxml2-dev:s390x \
|
||||
libyajl-dev:s390x \
|
||||
systemtap-sdt-dev:s390x \
|
||||
xfslibs-dev:s390x && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
mkdir -p /usr/local/share/meson/cross && \
|
||||
echo "[binaries]\n\
|
||||
c = '/usr/bin/s390x-linux-gnu-gcc'\n\
|
||||
ar = '/usr/bin/s390x-linux-gnu-gcc-ar'\n\
|
||||
strip = '/usr/bin/s390x-linux-gnu-strip'\n\
|
||||
pkgconfig = '/usr/bin/s390x-linux-gnu-pkg-config'\n\
|
||||
\n\
|
||||
[host_machine]\n\
|
||||
system = 'linux'\n\
|
||||
cpu_family = 's390x'\n\
|
||||
cpu = 's390x'\n\
|
||||
endian = 'big'" > /usr/local/share/meson/cross/s390x-linux-gnu
|
||||
|
||||
RUN pip3 install \
|
||||
meson==0.55.3
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
||||
|
||||
ENV ABI "s390x-linux-gnu"
|
||||
ENV MESON_OPTS "--cross-file=s390x-linux-gnu"
|
@@ -1,109 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile debian-10 libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/debian:10-slim
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libacl1-dev \
|
||||
libapparmor-dev \
|
||||
libattr1-dev \
|
||||
libaudit-dev \
|
||||
libavahi-client-dev \
|
||||
libblkid-dev \
|
||||
libc-dev-bin \
|
||||
libc6-dev \
|
||||
libcap-ng-dev \
|
||||
libcurl4-gnutls-dev \
|
||||
libdbus-1-dev \
|
||||
libdevmapper-dev \
|
||||
libfuse-dev \
|
||||
libglib2.0-dev \
|
||||
libglusterfs-dev \
|
||||
libgnutls28-dev \
|
||||
libiscsi-dev \
|
||||
libnetcf-dev \
|
||||
libnl-3-dev \
|
||||
libnl-route-3-dev \
|
||||
libnuma-dev \
|
||||
libparted-dev \
|
||||
libpcap0.8-dev \
|
||||
libpciaccess-dev \
|
||||
librbd-dev \
|
||||
libreadline-dev \
|
||||
libsanlock-dev \
|
||||
libsasl2-dev \
|
||||
libselinux1-dev \
|
||||
libssh-gcrypt-dev \
|
||||
libssh2-1-dev \
|
||||
libtirpc-dev \
|
||||
libudev-dev \
|
||||
libxen-dev \
|
||||
libxml2-dev \
|
||||
libxml2-utils \
|
||||
libyajl-dev \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
systemtap-sdt-dev \
|
||||
wireshark-dev \
|
||||
xfslibs-dev \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
|
||||
|
||||
RUN pip3 install \
|
||||
meson==0.55.3
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
@@ -1,127 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile --cross aarch64 debian-sid libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/debian:sid-slim
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libc-dev-bin \
|
||||
libxml2-utils \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
meson \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-$(basename /usr/bin/gcc)
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
dpkg --add-architecture arm64 && \
|
||||
eatmydata apt-get update && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
gcc-aarch64-linux-gnu \
|
||||
libacl1-dev:arm64 \
|
||||
libapparmor-dev:arm64 \
|
||||
libattr1-dev:arm64 \
|
||||
libaudit-dev:arm64 \
|
||||
libavahi-client-dev:arm64 \
|
||||
libblkid-dev:arm64 \
|
||||
libc6-dev:arm64 \
|
||||
libcap-ng-dev:arm64 \
|
||||
libcurl4-gnutls-dev:arm64 \
|
||||
libdbus-1-dev:arm64 \
|
||||
libdevmapper-dev:arm64 \
|
||||
libfuse-dev:arm64 \
|
||||
libglib2.0-dev:arm64 \
|
||||
libglusterfs-dev:arm64 \
|
||||
libgnutls28-dev:arm64 \
|
||||
libiscsi-dev:arm64 \
|
||||
libnl-3-dev:arm64 \
|
||||
libnl-route-3-dev:arm64 \
|
||||
libnuma-dev:arm64 \
|
||||
libparted-dev:arm64 \
|
||||
libpcap0.8-dev:arm64 \
|
||||
libpciaccess-dev:arm64 \
|
||||
librbd-dev:arm64 \
|
||||
libreadline-dev:arm64 \
|
||||
libsanlock-dev:arm64 \
|
||||
libsasl2-dev:arm64 \
|
||||
libselinux1-dev:arm64 \
|
||||
libssh-gcrypt-dev:arm64 \
|
||||
libssh2-1-dev:arm64 \
|
||||
libtirpc-dev:arm64 \
|
||||
libudev-dev:arm64 \
|
||||
libxen-dev:arm64 \
|
||||
libxml2-dev:arm64 \
|
||||
libyajl-dev:arm64 \
|
||||
systemtap-sdt-dev:arm64 \
|
||||
xfslibs-dev:arm64 && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
mkdir -p /usr/local/share/meson/cross && \
|
||||
echo "[binaries]\n\
|
||||
c = '/usr/bin/aarch64-linux-gnu-gcc'\n\
|
||||
ar = '/usr/bin/aarch64-linux-gnu-gcc-ar'\n\
|
||||
strip = '/usr/bin/aarch64-linux-gnu-strip'\n\
|
||||
pkgconfig = '/usr/bin/aarch64-linux-gnu-pkg-config'\n\
|
||||
\n\
|
||||
[host_machine]\n\
|
||||
system = 'linux'\n\
|
||||
cpu_family = 'aarch64'\n\
|
||||
cpu = 'aarch64'\n\
|
||||
endian = 'little'" > /usr/local/share/meson/cross/aarch64-linux-gnu
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
||||
|
||||
ENV ABI "aarch64-linux-gnu"
|
||||
ENV MESON_OPTS "--cross-file=aarch64-linux-gnu"
|
@@ -1,126 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile --cross armv6l debian-sid libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/debian:sid-slim
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libc-dev-bin \
|
||||
libxml2-utils \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
meson \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabi-cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabi-$(basename /usr/bin/gcc)
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
dpkg --add-architecture armel && \
|
||||
eatmydata apt-get update && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
gcc-arm-linux-gnueabi \
|
||||
libacl1-dev:armel \
|
||||
libapparmor-dev:armel \
|
||||
libattr1-dev:armel \
|
||||
libaudit-dev:armel \
|
||||
libavahi-client-dev:armel \
|
||||
libblkid-dev:armel \
|
||||
libc6-dev:armel \
|
||||
libcap-ng-dev:armel \
|
||||
libcurl4-gnutls-dev:armel \
|
||||
libdbus-1-dev:armel \
|
||||
libdevmapper-dev:armel \
|
||||
libfuse-dev:armel \
|
||||
libglib2.0-dev:armel \
|
||||
libglusterfs-dev:armel \
|
||||
libgnutls28-dev:armel \
|
||||
libiscsi-dev:armel \
|
||||
libnl-3-dev:armel \
|
||||
libnl-route-3-dev:armel \
|
||||
libnuma-dev:armel \
|
||||
libparted-dev:armel \
|
||||
libpcap0.8-dev:armel \
|
||||
libpciaccess-dev:armel \
|
||||
librbd-dev:armel \
|
||||
libreadline-dev:armel \
|
||||
libsanlock-dev:armel \
|
||||
libsasl2-dev:armel \
|
||||
libselinux1-dev:armel \
|
||||
libssh-gcrypt-dev:armel \
|
||||
libssh2-1-dev:armel \
|
||||
libtirpc-dev:armel \
|
||||
libudev-dev:armel \
|
||||
libxml2-dev:armel \
|
||||
libyajl-dev:armel \
|
||||
systemtap-sdt-dev:armel \
|
||||
xfslibs-dev:armel && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
mkdir -p /usr/local/share/meson/cross && \
|
||||
echo "[binaries]\n\
|
||||
c = '/usr/bin/arm-linux-gnueabi-gcc'\n\
|
||||
ar = '/usr/bin/arm-linux-gnueabi-gcc-ar'\n\
|
||||
strip = '/usr/bin/arm-linux-gnueabi-strip'\n\
|
||||
pkgconfig = '/usr/bin/arm-linux-gnueabi-pkg-config'\n\
|
||||
\n\
|
||||
[host_machine]\n\
|
||||
system = 'linux'\n\
|
||||
cpu_family = 'arm'\n\
|
||||
cpu = 'arm'\n\
|
||||
endian = 'little'" > /usr/local/share/meson/cross/arm-linux-gnueabi
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
||||
|
||||
ENV ABI "arm-linux-gnueabi"
|
||||
ENV MESON_OPTS "--cross-file=arm-linux-gnueabi"
|
@@ -1,127 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile --cross armv7l debian-sid libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/debian:sid-slim
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libc-dev-bin \
|
||||
libxml2-utils \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
meson \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-$(basename /usr/bin/gcc)
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
dpkg --add-architecture armhf && \
|
||||
eatmydata apt-get update && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
gcc-arm-linux-gnueabihf \
|
||||
libacl1-dev:armhf \
|
||||
libapparmor-dev:armhf \
|
||||
libattr1-dev:armhf \
|
||||
libaudit-dev:armhf \
|
||||
libavahi-client-dev:armhf \
|
||||
libblkid-dev:armhf \
|
||||
libc6-dev:armhf \
|
||||
libcap-ng-dev:armhf \
|
||||
libcurl4-gnutls-dev:armhf \
|
||||
libdbus-1-dev:armhf \
|
||||
libdevmapper-dev:armhf \
|
||||
libfuse-dev:armhf \
|
||||
libglib2.0-dev:armhf \
|
||||
libglusterfs-dev:armhf \
|
||||
libgnutls28-dev:armhf \
|
||||
libiscsi-dev:armhf \
|
||||
libnl-3-dev:armhf \
|
||||
libnl-route-3-dev:armhf \
|
||||
libnuma-dev:armhf \
|
||||
libparted-dev:armhf \
|
||||
libpcap0.8-dev:armhf \
|
||||
libpciaccess-dev:armhf \
|
||||
librbd-dev:armhf \
|
||||
libreadline-dev:armhf \
|
||||
libsanlock-dev:armhf \
|
||||
libsasl2-dev:armhf \
|
||||
libselinux1-dev:armhf \
|
||||
libssh-gcrypt-dev:armhf \
|
||||
libssh2-1-dev:armhf \
|
||||
libtirpc-dev:armhf \
|
||||
libudev-dev:armhf \
|
||||
libxen-dev:armhf \
|
||||
libxml2-dev:armhf \
|
||||
libyajl-dev:armhf \
|
||||
systemtap-sdt-dev:armhf \
|
||||
xfslibs-dev:armhf && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
mkdir -p /usr/local/share/meson/cross && \
|
||||
echo "[binaries]\n\
|
||||
c = '/usr/bin/arm-linux-gnueabihf-gcc'\n\
|
||||
ar = '/usr/bin/arm-linux-gnueabihf-gcc-ar'\n\
|
||||
strip = '/usr/bin/arm-linux-gnueabihf-strip'\n\
|
||||
pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'\n\
|
||||
\n\
|
||||
[host_machine]\n\
|
||||
system = 'linux'\n\
|
||||
cpu_family = 'arm'\n\
|
||||
cpu = 'armhf'\n\
|
||||
endian = 'little'" > /usr/local/share/meson/cross/arm-linux-gnueabihf
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
||||
|
||||
ENV ABI "arm-linux-gnueabihf"
|
||||
ENV MESON_OPTS "--cross-file=arm-linux-gnueabihf"
|
@@ -1,126 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile --cross i686 debian-sid libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/debian:sid-slim
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libc-dev-bin \
|
||||
libxml2-utils \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
meson \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-linux-gnu-cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-linux-gnu-$(basename /usr/bin/gcc)
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
dpkg --add-architecture i386 && \
|
||||
eatmydata apt-get update && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
gcc-i686-linux-gnu \
|
||||
libacl1-dev:i386 \
|
||||
libapparmor-dev:i386 \
|
||||
libattr1-dev:i386 \
|
||||
libaudit-dev:i386 \
|
||||
libavahi-client-dev:i386 \
|
||||
libblkid-dev:i386 \
|
||||
libc6-dev:i386 \
|
||||
libcap-ng-dev:i386 \
|
||||
libcurl4-gnutls-dev:i386 \
|
||||
libdbus-1-dev:i386 \
|
||||
libdevmapper-dev:i386 \
|
||||
libfuse-dev:i386 \
|
||||
libglib2.0-dev:i386 \
|
||||
libglusterfs-dev:i386 \
|
||||
libgnutls28-dev:i386 \
|
||||
libiscsi-dev:i386 \
|
||||
libnl-3-dev:i386 \
|
||||
libnl-route-3-dev:i386 \
|
||||
libnuma-dev:i386 \
|
||||
libparted-dev:i386 \
|
||||
libpcap0.8-dev:i386 \
|
||||
libpciaccess-dev:i386 \
|
||||
librbd-dev:i386 \
|
||||
libreadline-dev:i386 \
|
||||
libsanlock-dev:i386 \
|
||||
libsasl2-dev:i386 \
|
||||
libselinux1-dev:i386 \
|
||||
libssh-gcrypt-dev:i386 \
|
||||
libssh2-1-dev:i386 \
|
||||
libtirpc-dev:i386 \
|
||||
libudev-dev:i386 \
|
||||
libxml2-dev:i386 \
|
||||
libyajl-dev:i386 \
|
||||
systemtap-sdt-dev:i386 \
|
||||
xfslibs-dev:i386 && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
mkdir -p /usr/local/share/meson/cross && \
|
||||
echo "[binaries]\n\
|
||||
c = '/usr/bin/i686-linux-gnu-gcc'\n\
|
||||
ar = '/usr/bin/i686-linux-gnu-gcc-ar'\n\
|
||||
strip = '/usr/bin/i686-linux-gnu-strip'\n\
|
||||
pkgconfig = '/usr/bin/i686-linux-gnu-pkg-config'\n\
|
||||
\n\
|
||||
[host_machine]\n\
|
||||
system = 'linux'\n\
|
||||
cpu_family = 'x86'\n\
|
||||
cpu = 'i686'\n\
|
||||
endian = 'little'" > /usr/local/share/meson/cross/i686-linux-gnu
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
||||
|
||||
ENV ABI "i686-linux-gnu"
|
||||
ENV MESON_OPTS "--cross-file=i686-linux-gnu"
|
@@ -1,126 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile --cross mips64el debian-sid libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/debian:sid-slim
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libc-dev-bin \
|
||||
libxml2-utils \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
meson \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mips64el-linux-gnuabi64-cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mips64el-linux-gnuabi64-$(basename /usr/bin/gcc)
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
dpkg --add-architecture mips64el && \
|
||||
eatmydata apt-get update && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
gcc-mips64el-linux-gnuabi64 \
|
||||
libacl1-dev:mips64el \
|
||||
libapparmor-dev:mips64el \
|
||||
libattr1-dev:mips64el \
|
||||
libaudit-dev:mips64el \
|
||||
libavahi-client-dev:mips64el \
|
||||
libblkid-dev:mips64el \
|
||||
libc6-dev:mips64el \
|
||||
libcap-ng-dev:mips64el \
|
||||
libcurl4-gnutls-dev:mips64el \
|
||||
libdbus-1-dev:mips64el \
|
||||
libdevmapper-dev:mips64el \
|
||||
libfuse-dev:mips64el \
|
||||
libglib2.0-dev:mips64el \
|
||||
libglusterfs-dev:mips64el \
|
||||
libgnutls28-dev:mips64el \
|
||||
libiscsi-dev:mips64el \
|
||||
libnl-3-dev:mips64el \
|
||||
libnl-route-3-dev:mips64el \
|
||||
libnuma-dev:mips64el \
|
||||
libparted-dev:mips64el \
|
||||
libpcap0.8-dev:mips64el \
|
||||
libpciaccess-dev:mips64el \
|
||||
librbd-dev:mips64el \
|
||||
libreadline-dev:mips64el \
|
||||
libsanlock-dev:mips64el \
|
||||
libsasl2-dev:mips64el \
|
||||
libselinux1-dev:mips64el \
|
||||
libssh-gcrypt-dev:mips64el \
|
||||
libssh2-1-dev:mips64el \
|
||||
libtirpc-dev:mips64el \
|
||||
libudev-dev:mips64el \
|
||||
libxml2-dev:mips64el \
|
||||
libyajl-dev:mips64el \
|
||||
systemtap-sdt-dev:mips64el \
|
||||
xfslibs-dev:mips64el && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
mkdir -p /usr/local/share/meson/cross && \
|
||||
echo "[binaries]\n\
|
||||
c = '/usr/bin/mips64el-linux-gnuabi64-gcc'\n\
|
||||
ar = '/usr/bin/mips64el-linux-gnuabi64-gcc-ar'\n\
|
||||
strip = '/usr/bin/mips64el-linux-gnuabi64-strip'\n\
|
||||
pkgconfig = '/usr/bin/mips64el-linux-gnuabi64-pkg-config'\n\
|
||||
\n\
|
||||
[host_machine]\n\
|
||||
system = 'linux'\n\
|
||||
cpu_family = 'mips64'\n\
|
||||
cpu = 'mips64el'\n\
|
||||
endian = 'little'" > /usr/local/share/meson/cross/mips64el-linux-gnuabi64
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
||||
|
||||
ENV ABI "mips64el-linux-gnuabi64"
|
||||
ENV MESON_OPTS "--cross-file=mips64el-linux-gnuabi64"
|
@@ -1,126 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile --cross mipsel debian-sid libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/debian:sid-slim
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libc-dev-bin \
|
||||
libxml2-utils \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
meson \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mipsel-linux-gnu-cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mipsel-linux-gnu-$(basename /usr/bin/gcc)
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
dpkg --add-architecture mipsel && \
|
||||
eatmydata apt-get update && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
gcc-mipsel-linux-gnu \
|
||||
libacl1-dev:mipsel \
|
||||
libapparmor-dev:mipsel \
|
||||
libattr1-dev:mipsel \
|
||||
libaudit-dev:mipsel \
|
||||
libavahi-client-dev:mipsel \
|
||||
libblkid-dev:mipsel \
|
||||
libc6-dev:mipsel \
|
||||
libcap-ng-dev:mipsel \
|
||||
libcurl4-gnutls-dev:mipsel \
|
||||
libdbus-1-dev:mipsel \
|
||||
libdevmapper-dev:mipsel \
|
||||
libfuse-dev:mipsel \
|
||||
libglib2.0-dev:mipsel \
|
||||
libglusterfs-dev:mipsel \
|
||||
libgnutls28-dev:mipsel \
|
||||
libiscsi-dev:mipsel \
|
||||
libnl-3-dev:mipsel \
|
||||
libnl-route-3-dev:mipsel \
|
||||
libnuma-dev:mipsel \
|
||||
libparted-dev:mipsel \
|
||||
libpcap0.8-dev:mipsel \
|
||||
libpciaccess-dev:mipsel \
|
||||
librbd-dev:mipsel \
|
||||
libreadline-dev:mipsel \
|
||||
libsanlock-dev:mipsel \
|
||||
libsasl2-dev:mipsel \
|
||||
libselinux1-dev:mipsel \
|
||||
libssh-gcrypt-dev:mipsel \
|
||||
libssh2-1-dev:mipsel \
|
||||
libtirpc-dev:mipsel \
|
||||
libudev-dev:mipsel \
|
||||
libxml2-dev:mipsel \
|
||||
libyajl-dev:mipsel \
|
||||
systemtap-sdt-dev:mipsel \
|
||||
xfslibs-dev:mipsel && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
mkdir -p /usr/local/share/meson/cross && \
|
||||
echo "[binaries]\n\
|
||||
c = '/usr/bin/mipsel-linux-gnu-gcc'\n\
|
||||
ar = '/usr/bin/mipsel-linux-gnu-gcc-ar'\n\
|
||||
strip = '/usr/bin/mipsel-linux-gnu-strip'\n\
|
||||
pkgconfig = '/usr/bin/mipsel-linux-gnu-pkg-config'\n\
|
||||
\n\
|
||||
[host_machine]\n\
|
||||
system = 'linux'\n\
|
||||
cpu_family = 'mips'\n\
|
||||
cpu = 'mipsel'\n\
|
||||
endian = 'little'" > /usr/local/share/meson/cross/mipsel-linux-gnu
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
||||
|
||||
ENV ABI "mipsel-linux-gnu"
|
||||
ENV MESON_OPTS "--cross-file=mipsel-linux-gnu"
|
@@ -1,126 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile --cross ppc64le debian-sid libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/debian:sid-slim
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libc-dev-bin \
|
||||
libxml2-utils \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
meson \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/powerpc64le-linux-gnu-cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/powerpc64le-linux-gnu-$(basename /usr/bin/gcc)
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
dpkg --add-architecture ppc64el && \
|
||||
eatmydata apt-get update && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
gcc-powerpc64le-linux-gnu \
|
||||
libacl1-dev:ppc64el \
|
||||
libapparmor-dev:ppc64el \
|
||||
libattr1-dev:ppc64el \
|
||||
libaudit-dev:ppc64el \
|
||||
libavahi-client-dev:ppc64el \
|
||||
libblkid-dev:ppc64el \
|
||||
libc6-dev:ppc64el \
|
||||
libcap-ng-dev:ppc64el \
|
||||
libcurl4-gnutls-dev:ppc64el \
|
||||
libdbus-1-dev:ppc64el \
|
||||
libdevmapper-dev:ppc64el \
|
||||
libfuse-dev:ppc64el \
|
||||
libglib2.0-dev:ppc64el \
|
||||
libglusterfs-dev:ppc64el \
|
||||
libgnutls28-dev:ppc64el \
|
||||
libiscsi-dev:ppc64el \
|
||||
libnl-3-dev:ppc64el \
|
||||
libnl-route-3-dev:ppc64el \
|
||||
libnuma-dev:ppc64el \
|
||||
libparted-dev:ppc64el \
|
||||
libpcap0.8-dev:ppc64el \
|
||||
libpciaccess-dev:ppc64el \
|
||||
librbd-dev:ppc64el \
|
||||
libreadline-dev:ppc64el \
|
||||
libsanlock-dev:ppc64el \
|
||||
libsasl2-dev:ppc64el \
|
||||
libselinux1-dev:ppc64el \
|
||||
libssh-gcrypt-dev:ppc64el \
|
||||
libssh2-1-dev:ppc64el \
|
||||
libtirpc-dev:ppc64el \
|
||||
libudev-dev:ppc64el \
|
||||
libxml2-dev:ppc64el \
|
||||
libyajl-dev:ppc64el \
|
||||
systemtap-sdt-dev:ppc64el \
|
||||
xfslibs-dev:ppc64el && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
mkdir -p /usr/local/share/meson/cross && \
|
||||
echo "[binaries]\n\
|
||||
c = '/usr/bin/powerpc64le-linux-gnu-gcc'\n\
|
||||
ar = '/usr/bin/powerpc64le-linux-gnu-gcc-ar'\n\
|
||||
strip = '/usr/bin/powerpc64le-linux-gnu-strip'\n\
|
||||
pkgconfig = '/usr/bin/powerpc64le-linux-gnu-pkg-config'\n\
|
||||
\n\
|
||||
[host_machine]\n\
|
||||
system = 'linux'\n\
|
||||
cpu_family = 'ppc64'\n\
|
||||
cpu = 'powerpc64le'\n\
|
||||
endian = 'little'" > /usr/local/share/meson/cross/powerpc64le-linux-gnu
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
||||
|
||||
ENV ABI "powerpc64le-linux-gnu"
|
||||
ENV MESON_OPTS "--cross-file=powerpc64le-linux-gnu"
|
@@ -1,126 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile --cross s390x debian-sid libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/debian:sid-slim
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libc-dev-bin \
|
||||
libxml2-utils \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
meson \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/s390x-linux-gnu-cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/s390x-linux-gnu-$(basename /usr/bin/gcc)
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
dpkg --add-architecture s390x && \
|
||||
eatmydata apt-get update && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
gcc-s390x-linux-gnu \
|
||||
libacl1-dev:s390x \
|
||||
libapparmor-dev:s390x \
|
||||
libattr1-dev:s390x \
|
||||
libaudit-dev:s390x \
|
||||
libavahi-client-dev:s390x \
|
||||
libblkid-dev:s390x \
|
||||
libc6-dev:s390x \
|
||||
libcap-ng-dev:s390x \
|
||||
libcurl4-gnutls-dev:s390x \
|
||||
libdbus-1-dev:s390x \
|
||||
libdevmapper-dev:s390x \
|
||||
libfuse-dev:s390x \
|
||||
libglib2.0-dev:s390x \
|
||||
libglusterfs-dev:s390x \
|
||||
libgnutls28-dev:s390x \
|
||||
libiscsi-dev:s390x \
|
||||
libnl-3-dev:s390x \
|
||||
libnl-route-3-dev:s390x \
|
||||
libnuma-dev:s390x \
|
||||
libparted-dev:s390x \
|
||||
libpcap0.8-dev:s390x \
|
||||
libpciaccess-dev:s390x \
|
||||
librbd-dev:s390x \
|
||||
libreadline-dev:s390x \
|
||||
libsanlock-dev:s390x \
|
||||
libsasl2-dev:s390x \
|
||||
libselinux1-dev:s390x \
|
||||
libssh-gcrypt-dev:s390x \
|
||||
libssh2-1-dev:s390x \
|
||||
libtirpc-dev:s390x \
|
||||
libudev-dev:s390x \
|
||||
libxml2-dev:s390x \
|
||||
libyajl-dev:s390x \
|
||||
systemtap-sdt-dev:s390x \
|
||||
xfslibs-dev:s390x && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
mkdir -p /usr/local/share/meson/cross && \
|
||||
echo "[binaries]\n\
|
||||
c = '/usr/bin/s390x-linux-gnu-gcc'\n\
|
||||
ar = '/usr/bin/s390x-linux-gnu-gcc-ar'\n\
|
||||
strip = '/usr/bin/s390x-linux-gnu-strip'\n\
|
||||
pkgconfig = '/usr/bin/s390x-linux-gnu-pkg-config'\n\
|
||||
\n\
|
||||
[host_machine]\n\
|
||||
system = 'linux'\n\
|
||||
cpu_family = 's390x'\n\
|
||||
cpu = 's390x'\n\
|
||||
endian = 'big'" > /usr/local/share/meson/cross/s390x-linux-gnu
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
||||
|
||||
ENV ABI "s390x-linux-gnu"
|
||||
ENV MESON_OPTS "--cross-file=s390x-linux-gnu"
|
@@ -1,104 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile debian-sid libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/debian:sid-slim
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libacl1-dev \
|
||||
libapparmor-dev \
|
||||
libattr1-dev \
|
||||
libaudit-dev \
|
||||
libavahi-client-dev \
|
||||
libblkid-dev \
|
||||
libc-dev-bin \
|
||||
libc6-dev \
|
||||
libcap-ng-dev \
|
||||
libcurl4-gnutls-dev \
|
||||
libdbus-1-dev \
|
||||
libdevmapper-dev \
|
||||
libfuse-dev \
|
||||
libglib2.0-dev \
|
||||
libglusterfs-dev \
|
||||
libgnutls28-dev \
|
||||
libiscsi-dev \
|
||||
libnetcf-dev \
|
||||
libnl-3-dev \
|
||||
libnl-route-3-dev \
|
||||
libnuma-dev \
|
||||
libparted-dev \
|
||||
libpcap0.8-dev \
|
||||
libpciaccess-dev \
|
||||
librbd-dev \
|
||||
libreadline-dev \
|
||||
libsanlock-dev \
|
||||
libsasl2-dev \
|
||||
libselinux1-dev \
|
||||
libssh-gcrypt-dev \
|
||||
libssh2-1-dev \
|
||||
libtirpc-dev \
|
||||
libudev-dev \
|
||||
libxen-dev \
|
||||
libxml2-dev \
|
||||
libxml2-utils \
|
||||
libyajl-dev \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
meson \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
systemtap-sdt-dev \
|
||||
wireshark-dev \
|
||||
xfslibs-dev \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
@@ -1,112 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile fedora-32 libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM registry.fedoraproject.org/fedora:32
|
||||
|
||||
RUN dnf install -y nosync && \
|
||||
echo -e '#!/bin/sh\n\
|
||||
if test -d /usr/lib64\n\
|
||||
then\n\
|
||||
export LD_PRELOAD=/usr/lib64/nosync/nosync.so\n\
|
||||
else\n\
|
||||
export LD_PRELOAD=/usr/lib/nosync/nosync.so\n\
|
||||
fi\n\
|
||||
exec "$@"' > /usr/bin/nosync && \
|
||||
chmod +x /usr/bin/nosync && \
|
||||
nosync dnf update -y && \
|
||||
nosync dnf install -y \
|
||||
audit-libs-devel \
|
||||
augeas \
|
||||
avahi-devel \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
cppi \
|
||||
cyrus-sasl-devel \
|
||||
dbus-devel \
|
||||
device-mapper-devel \
|
||||
diffutils \
|
||||
dnsmasq \
|
||||
dwarves \
|
||||
ebtables \
|
||||
firewalld-filesystem \
|
||||
fuse-devel \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
glib2-devel \
|
||||
glibc-devel \
|
||||
glibc-langpack-en \
|
||||
glusterfs-api-devel \
|
||||
gnutls-devel \
|
||||
grep \
|
||||
iproute \
|
||||
iproute-tc \
|
||||
iptables \
|
||||
iscsi-initiator-utils \
|
||||
kmod \
|
||||
libacl-devel \
|
||||
libattr-devel \
|
||||
libblkid-devel \
|
||||
libcap-ng-devel \
|
||||
libcurl-devel \
|
||||
libiscsi-devel \
|
||||
libnl3-devel \
|
||||
libpcap-devel \
|
||||
libpciaccess-devel \
|
||||
librbd-devel \
|
||||
libselinux-devel \
|
||||
libssh-devel \
|
||||
libssh2-devel \
|
||||
libtirpc-devel \
|
||||
libudev-devel \
|
||||
libwsman-devel \
|
||||
libxml2 \
|
||||
libxml2-devel \
|
||||
libxslt \
|
||||
lvm2 \
|
||||
make \
|
||||
meson \
|
||||
netcf-devel \
|
||||
nfs-utils \
|
||||
ninja-build \
|
||||
numactl-devel \
|
||||
numad \
|
||||
parted \
|
||||
parted-devel \
|
||||
perl \
|
||||
pkgconfig \
|
||||
polkit \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
python3-flake8 \
|
||||
qemu-img \
|
||||
radvd \
|
||||
readline-devel \
|
||||
rpcgen \
|
||||
rpm-build \
|
||||
sanlock-devel \
|
||||
scrub \
|
||||
sed \
|
||||
sheepdog \
|
||||
systemtap-sdt-devel \
|
||||
wireshark-devel \
|
||||
xen-devel \
|
||||
xfsprogs-devel \
|
||||
yajl-devel \
|
||||
zfs-fuse && \
|
||||
nosync dnf autoremove -y && \
|
||||
nosync dnf clean all -y && \
|
||||
rpm -qa | sort > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
@@ -1,112 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile fedora-33 libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM registry.fedoraproject.org/fedora:33
|
||||
|
||||
RUN dnf install -y nosync && \
|
||||
echo -e '#!/bin/sh\n\
|
||||
if test -d /usr/lib64\n\
|
||||
then\n\
|
||||
export LD_PRELOAD=/usr/lib64/nosync/nosync.so\n\
|
||||
else\n\
|
||||
export LD_PRELOAD=/usr/lib/nosync/nosync.so\n\
|
||||
fi\n\
|
||||
exec "$@"' > /usr/bin/nosync && \
|
||||
chmod +x /usr/bin/nosync && \
|
||||
nosync dnf update -y && \
|
||||
nosync dnf install -y \
|
||||
audit-libs-devel \
|
||||
augeas \
|
||||
avahi-devel \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
cppi \
|
||||
cyrus-sasl-devel \
|
||||
dbus-devel \
|
||||
device-mapper-devel \
|
||||
diffutils \
|
||||
dnsmasq \
|
||||
dwarves \
|
||||
ebtables \
|
||||
firewalld-filesystem \
|
||||
fuse-devel \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
glib2-devel \
|
||||
glibc-devel \
|
||||
glibc-langpack-en \
|
||||
glusterfs-api-devel \
|
||||
gnutls-devel \
|
||||
grep \
|
||||
iproute \
|
||||
iproute-tc \
|
||||
iptables \
|
||||
iscsi-initiator-utils \
|
||||
kmod \
|
||||
libacl-devel \
|
||||
libattr-devel \
|
||||
libblkid-devel \
|
||||
libcap-ng-devel \
|
||||
libcurl-devel \
|
||||
libiscsi-devel \
|
||||
libnl3-devel \
|
||||
libpcap-devel \
|
||||
libpciaccess-devel \
|
||||
librbd-devel \
|
||||
libselinux-devel \
|
||||
libssh-devel \
|
||||
libssh2-devel \
|
||||
libtirpc-devel \
|
||||
libudev-devel \
|
||||
libwsman-devel \
|
||||
libxml2 \
|
||||
libxml2-devel \
|
||||
libxslt \
|
||||
lvm2 \
|
||||
make \
|
||||
meson \
|
||||
netcf-devel \
|
||||
nfs-utils \
|
||||
ninja-build \
|
||||
numactl-devel \
|
||||
numad \
|
||||
parted \
|
||||
parted-devel \
|
||||
perl \
|
||||
pkgconfig \
|
||||
polkit \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
python3-flake8 \
|
||||
qemu-img \
|
||||
radvd \
|
||||
readline-devel \
|
||||
rpcgen \
|
||||
rpm-build \
|
||||
sanlock-devel \
|
||||
scrub \
|
||||
sed \
|
||||
sheepdog \
|
||||
systemtap-sdt-devel \
|
||||
wireshark-devel \
|
||||
xen-devel \
|
||||
xfsprogs-devel \
|
||||
yajl-devel \
|
||||
zfs-fuse && \
|
||||
nosync dnf autoremove -y && \
|
||||
nosync dnf clean all -y && \
|
||||
rpm -qa | sort > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
@@ -1,91 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile --cross mingw32 fedora-rawhide libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM registry.fedoraproject.org/fedora:rawhide
|
||||
|
||||
RUN dnf update -y --nogpgcheck fedora-gpg-keys && \
|
||||
dnf install -y nosync && \
|
||||
echo -e '#!/bin/sh\n\
|
||||
if test -d /usr/lib64\n\
|
||||
then\n\
|
||||
export LD_PRELOAD=/usr/lib64/nosync/nosync.so\n\
|
||||
else\n\
|
||||
export LD_PRELOAD=/usr/lib/nosync/nosync.so\n\
|
||||
fi\n\
|
||||
exec "$@"' > /usr/bin/nosync && \
|
||||
chmod +x /usr/bin/nosync && \
|
||||
nosync dnf update -y && \
|
||||
nosync dnf install -y \
|
||||
augeas \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
cppi \
|
||||
diffutils \
|
||||
dnsmasq \
|
||||
dwarves \
|
||||
ebtables \
|
||||
firewalld-filesystem \
|
||||
git \
|
||||
glibc-langpack-en \
|
||||
grep \
|
||||
iproute \
|
||||
iproute-tc \
|
||||
iptables \
|
||||
iscsi-initiator-utils \
|
||||
kmod \
|
||||
libxml2 \
|
||||
libxslt \
|
||||
lvm2 \
|
||||
make \
|
||||
meson \
|
||||
nfs-utils \
|
||||
ninja-build \
|
||||
numad \
|
||||
parted \
|
||||
perl \
|
||||
polkit \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
python3-flake8 \
|
||||
qemu-img \
|
||||
radvd \
|
||||
rpcgen \
|
||||
rpm-build \
|
||||
scrub \
|
||||
sed \
|
||||
sheepdog \
|
||||
zfs-fuse && \
|
||||
nosync dnf autoremove -y && \
|
||||
nosync dnf clean all -y && \
|
||||
rpm -qa | sort > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-w64-mingw32-cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-w64-mingw32-$(basename /usr/bin/gcc)
|
||||
|
||||
RUN nosync dnf install -y \
|
||||
mingw32-curl \
|
||||
mingw32-dbus \
|
||||
mingw32-dlfcn \
|
||||
mingw32-gcc \
|
||||
mingw32-gettext \
|
||||
mingw32-glib2 \
|
||||
mingw32-gnutls \
|
||||
mingw32-headers \
|
||||
mingw32-libssh2 \
|
||||
mingw32-libxml2 \
|
||||
mingw32-pkg-config \
|
||||
mingw32-portablexdr \
|
||||
mingw32-readline && \
|
||||
nosync dnf clean all -y
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
||||
|
||||
ENV ABI "i686-w64-mingw32"
|
||||
ENV MESON_OPTS "--cross-file=/usr/share/mingw/toolchain-mingw32.meson"
|
@@ -1,91 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile --cross mingw64 fedora-rawhide libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM registry.fedoraproject.org/fedora:rawhide
|
||||
|
||||
RUN dnf update -y --nogpgcheck fedora-gpg-keys && \
|
||||
dnf install -y nosync && \
|
||||
echo -e '#!/bin/sh\n\
|
||||
if test -d /usr/lib64\n\
|
||||
then\n\
|
||||
export LD_PRELOAD=/usr/lib64/nosync/nosync.so\n\
|
||||
else\n\
|
||||
export LD_PRELOAD=/usr/lib/nosync/nosync.so\n\
|
||||
fi\n\
|
||||
exec "$@"' > /usr/bin/nosync && \
|
||||
chmod +x /usr/bin/nosync && \
|
||||
nosync dnf update -y && \
|
||||
nosync dnf install -y \
|
||||
augeas \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
cppi \
|
||||
diffutils \
|
||||
dnsmasq \
|
||||
dwarves \
|
||||
ebtables \
|
||||
firewalld-filesystem \
|
||||
git \
|
||||
glibc-langpack-en \
|
||||
grep \
|
||||
iproute \
|
||||
iproute-tc \
|
||||
iptables \
|
||||
iscsi-initiator-utils \
|
||||
kmod \
|
||||
libxml2 \
|
||||
libxslt \
|
||||
lvm2 \
|
||||
make \
|
||||
meson \
|
||||
nfs-utils \
|
||||
ninja-build \
|
||||
numad \
|
||||
parted \
|
||||
perl \
|
||||
polkit \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
python3-flake8 \
|
||||
qemu-img \
|
||||
radvd \
|
||||
rpcgen \
|
||||
rpm-build \
|
||||
scrub \
|
||||
sed \
|
||||
sheepdog \
|
||||
zfs-fuse && \
|
||||
nosync dnf autoremove -y && \
|
||||
nosync dnf clean all -y && \
|
||||
rpm -qa | sort > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-$(basename /usr/bin/gcc)
|
||||
|
||||
RUN nosync dnf install -y \
|
||||
mingw64-curl \
|
||||
mingw64-dbus \
|
||||
mingw64-dlfcn \
|
||||
mingw64-gcc \
|
||||
mingw64-gettext \
|
||||
mingw64-glib2 \
|
||||
mingw64-gnutls \
|
||||
mingw64-headers \
|
||||
mingw64-libssh2 \
|
||||
mingw64-libxml2 \
|
||||
mingw64-pkg-config \
|
||||
mingw64-portablexdr \
|
||||
mingw64-readline && \
|
||||
nosync dnf clean all -y
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
||||
|
||||
ENV ABI "x86_64-w64-mingw32"
|
||||
ENV MESON_OPTS "--cross-file=/usr/share/mingw/toolchain-mingw64.meson"
|
@@ -1,113 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile fedora-rawhide libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM registry.fedoraproject.org/fedora:rawhide
|
||||
|
||||
RUN dnf update -y --nogpgcheck fedora-gpg-keys && \
|
||||
dnf install -y nosync && \
|
||||
echo -e '#!/bin/sh\n\
|
||||
if test -d /usr/lib64\n\
|
||||
then\n\
|
||||
export LD_PRELOAD=/usr/lib64/nosync/nosync.so\n\
|
||||
else\n\
|
||||
export LD_PRELOAD=/usr/lib/nosync/nosync.so\n\
|
||||
fi\n\
|
||||
exec "$@"' > /usr/bin/nosync && \
|
||||
chmod +x /usr/bin/nosync && \
|
||||
nosync dnf update -y && \
|
||||
nosync dnf install -y \
|
||||
audit-libs-devel \
|
||||
augeas \
|
||||
avahi-devel \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
cppi \
|
||||
cyrus-sasl-devel \
|
||||
dbus-devel \
|
||||
device-mapper-devel \
|
||||
diffutils \
|
||||
dnsmasq \
|
||||
dwarves \
|
||||
ebtables \
|
||||
firewalld-filesystem \
|
||||
fuse-devel \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
glib2-devel \
|
||||
glibc-devel \
|
||||
glibc-langpack-en \
|
||||
glusterfs-api-devel \
|
||||
gnutls-devel \
|
||||
grep \
|
||||
iproute \
|
||||
iproute-tc \
|
||||
iptables \
|
||||
iscsi-initiator-utils \
|
||||
kmod \
|
||||
libacl-devel \
|
||||
libattr-devel \
|
||||
libblkid-devel \
|
||||
libcap-ng-devel \
|
||||
libcurl-devel \
|
||||
libiscsi-devel \
|
||||
libnl3-devel \
|
||||
libpcap-devel \
|
||||
libpciaccess-devel \
|
||||
librbd-devel \
|
||||
libselinux-devel \
|
||||
libssh-devel \
|
||||
libssh2-devel \
|
||||
libtirpc-devel \
|
||||
libudev-devel \
|
||||
libwsman-devel \
|
||||
libxml2 \
|
||||
libxml2-devel \
|
||||
libxslt \
|
||||
lvm2 \
|
||||
make \
|
||||
meson \
|
||||
netcf-devel \
|
||||
nfs-utils \
|
||||
ninja-build \
|
||||
numactl-devel \
|
||||
numad \
|
||||
parted \
|
||||
parted-devel \
|
||||
perl \
|
||||
pkgconfig \
|
||||
polkit \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
python3-flake8 \
|
||||
qemu-img \
|
||||
radvd \
|
||||
readline-devel \
|
||||
rpcgen \
|
||||
rpm-build \
|
||||
sanlock-devel \
|
||||
scrub \
|
||||
sed \
|
||||
sheepdog \
|
||||
systemtap-sdt-devel \
|
||||
wireshark-devel \
|
||||
xen-devel \
|
||||
xfsprogs-devel \
|
||||
yajl-devel \
|
||||
zfs-fuse && \
|
||||
nosync dnf autoremove -y && \
|
||||
nosync dnf clean all -y && \
|
||||
rpm -qa | sort > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
@@ -1,103 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile opensuse-152 libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM registry.opensuse.org/opensuse/leap:15.2
|
||||
|
||||
RUN zypper update -y && \
|
||||
zypper install -y \
|
||||
audit-devel \
|
||||
augeas \
|
||||
augeas-lenses \
|
||||
avahi-devel \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
cppi \
|
||||
cyrus-sasl-devel \
|
||||
dbus-1-devel \
|
||||
device-mapper-devel \
|
||||
diffutils \
|
||||
dnsmasq \
|
||||
dwarves \
|
||||
ebtables \
|
||||
fuse-devel \
|
||||
gcc \
|
||||
gettext-runtime \
|
||||
git \
|
||||
glib2-devel \
|
||||
glibc-devel \
|
||||
glibc-locale \
|
||||
glusterfs-devel \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libacl-devel \
|
||||
libapparmor-devel \
|
||||
libattr-devel \
|
||||
libblkid-devel \
|
||||
libcap-ng-devel \
|
||||
libcurl-devel \
|
||||
libgnutls-devel \
|
||||
libiscsi-devel \
|
||||
libnl3-devel \
|
||||
libnuma-devel \
|
||||
libpcap-devel \
|
||||
libpciaccess-devel \
|
||||
librbd-devel \
|
||||
libselinux-devel \
|
||||
libssh-devel \
|
||||
libssh2-devel \
|
||||
libtirpc-devel \
|
||||
libudev-devel \
|
||||
libwsman-devel \
|
||||
libxml2 \
|
||||
libxml2-devel \
|
||||
libxslt \
|
||||
libyajl-devel \
|
||||
lvm2 \
|
||||
make \
|
||||
nfs-utils \
|
||||
ninja \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
parted-devel \
|
||||
perl \
|
||||
pkgconfig \
|
||||
polkit \
|
||||
python3-base \
|
||||
python3-docutils \
|
||||
python3-flake8 \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
qemu-tools \
|
||||
radvd \
|
||||
readline-devel \
|
||||
rpcgen \
|
||||
rpm-build \
|
||||
sanlock-devel \
|
||||
scrub \
|
||||
sed \
|
||||
systemtap-sdt-devel \
|
||||
wireshark-devel \
|
||||
xen-devel \
|
||||
xfsprogs-devel && \
|
||||
zypper clean --all && \
|
||||
rpm -qa | sort > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
|
||||
|
||||
RUN pip3 install \
|
||||
meson==0.55.3
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
@@ -1,111 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile ubuntu-1804 libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/ubuntu:18.04
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
glusterfs-common \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libacl1-dev \
|
||||
libapparmor-dev \
|
||||
libattr1-dev \
|
||||
libaudit-dev \
|
||||
libavahi-client-dev \
|
||||
libblkid-dev \
|
||||
libc-dev-bin \
|
||||
libc6-dev \
|
||||
libcap-ng-dev \
|
||||
libcurl4-gnutls-dev \
|
||||
libdbus-1-dev \
|
||||
libdevmapper-dev \
|
||||
libfuse-dev \
|
||||
libglib2.0-dev \
|
||||
libgnutls28-dev \
|
||||
libiscsi-dev \
|
||||
libnetcf-dev \
|
||||
libnl-3-dev \
|
||||
libnl-route-3-dev \
|
||||
libnuma-dev \
|
||||
libopenwsman-dev \
|
||||
libparted-dev \
|
||||
libpcap0.8-dev \
|
||||
libpciaccess-dev \
|
||||
librbd-dev \
|
||||
libreadline-dev \
|
||||
libsanlock-dev \
|
||||
libsasl2-dev \
|
||||
libselinux1-dev \
|
||||
libssh-dev \
|
||||
libssh2-1-dev \
|
||||
libtirpc-dev \
|
||||
libudev-dev \
|
||||
libxen-dev \
|
||||
libxml2-dev \
|
||||
libxml2-utils \
|
||||
libyajl-dev \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
sheepdog \
|
||||
systemtap-sdt-dev \
|
||||
wireshark-dev \
|
||||
xfslibs-dev \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
|
||||
|
||||
RUN pip3 install \
|
||||
meson==0.55.3
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
@@ -1,110 +0,0 @@
|
||||
# THIS FILE WAS AUTO-GENERATED
|
||||
#
|
||||
# $ lcitool dockerfile ubuntu-2004 libvirt
|
||||
#
|
||||
# https://gitlab.com/libvirt/libvirt-ci/-/commit/ceb381dce7c901e180a621951355800d8135ce82
|
||||
FROM docker.io/library/ubuntu:20.04
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y eatmydata && \
|
||||
eatmydata apt-get dist-upgrade -y && \
|
||||
eatmydata apt-get install --no-install-recommends -y \
|
||||
augeas-lenses \
|
||||
augeas-tools \
|
||||
bash-completion \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang \
|
||||
diffutils \
|
||||
dnsmasq-base \
|
||||
dwarves \
|
||||
ebtables \
|
||||
flake8 \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
grep \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libacl1-dev \
|
||||
libapparmor-dev \
|
||||
libattr1-dev \
|
||||
libaudit-dev \
|
||||
libavahi-client-dev \
|
||||
libblkid-dev \
|
||||
libc-dev-bin \
|
||||
libc6-dev \
|
||||
libcap-ng-dev \
|
||||
libcurl4-gnutls-dev \
|
||||
libdbus-1-dev \
|
||||
libdevmapper-dev \
|
||||
libfuse-dev \
|
||||
libglib2.0-dev \
|
||||
libglusterfs-dev \
|
||||
libgnutls28-dev \
|
||||
libiscsi-dev \
|
||||
libnetcf-dev \
|
||||
libnl-3-dev \
|
||||
libnl-route-3-dev \
|
||||
libnuma-dev \
|
||||
libopenwsman-dev \
|
||||
libparted-dev \
|
||||
libpcap0.8-dev \
|
||||
libpciaccess-dev \
|
||||
librbd-dev \
|
||||
libreadline-dev \
|
||||
libsanlock-dev \
|
||||
libsasl2-dev \
|
||||
libselinux1-dev \
|
||||
libssh-dev \
|
||||
libssh2-1-dev \
|
||||
libtirpc-dev \
|
||||
libudev-dev \
|
||||
libxen-dev \
|
||||
libxml2-dev \
|
||||
libxml2-utils \
|
||||
libyajl-dev \
|
||||
locales \
|
||||
lvm2 \
|
||||
make \
|
||||
nfs-common \
|
||||
ninja-build \
|
||||
numad \
|
||||
open-iscsi \
|
||||
parted \
|
||||
perl \
|
||||
pkgconf \
|
||||
policykit-1 \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
qemu-utils \
|
||||
radvd \
|
||||
scrub \
|
||||
sed \
|
||||
systemtap-sdt-dev \
|
||||
wireshark-dev \
|
||||
xfslibs-dev \
|
||||
xsltproc \
|
||||
zfs-fuse && \
|
||||
eatmydata apt-get autoremove -y && \
|
||||
eatmydata apt-get autoclean -y && \
|
||||
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
||||
dpkg-reconfigure locales && \
|
||||
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
|
||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
|
||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
|
||||
|
||||
RUN pip3 install \
|
||||
meson==0.55.3
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV MAKE "/usr/bin/make"
|
||||
ENV NINJA "/usr/bin/ninja"
|
||||
ENV PYTHON "/usr/bin/python3"
|
||||
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
343
ci/helper
343
ci/helper
@@ -1,343 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2021 Red Hat, Inc.
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import pathlib
|
||||
import pty
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import textwrap
|
||||
|
||||
import util
|
||||
|
||||
|
||||
class Parser:
|
||||
def __init__(self):
|
||||
# Options that are common to all actions that use containers
|
||||
containerparser = argparse.ArgumentParser(add_help=False)
|
||||
containerparser.add_argument(
|
||||
"target",
|
||||
help="perform action on target OS",
|
||||
)
|
||||
containerparser.add_argument(
|
||||
"--engine",
|
||||
choices=["auto", "podman", "docker"],
|
||||
default="auto",
|
||||
help="container engine to use",
|
||||
)
|
||||
containerparser.add_argument(
|
||||
"--login",
|
||||
default=os.getlogin(), # exempt from syntax-check
|
||||
help="login to use inside the container",
|
||||
)
|
||||
containerparser.add_argument(
|
||||
"--image-prefix",
|
||||
default="registry.gitlab.com/libvirt/libvirt/ci-",
|
||||
help="use container images from non-default location",
|
||||
)
|
||||
containerparser.add_argument(
|
||||
"--image-tag",
|
||||
default=":latest",
|
||||
help="use container images with non-default tags",
|
||||
)
|
||||
|
||||
# Options that are common to all actions that call the
|
||||
# project's build system
|
||||
mesonparser = argparse.ArgumentParser(add_help=False)
|
||||
mesonparser.add_argument(
|
||||
"--meson-args",
|
||||
default="",
|
||||
help="additional arguments passed to meson "
|
||||
"(eg --meson-args='-Dopt1=enabled -Dopt2=disabled')",
|
||||
)
|
||||
mesonparser.add_argument(
|
||||
"--ninja-args",
|
||||
default="",
|
||||
help="additional arguments passed to ninja",
|
||||
)
|
||||
|
||||
# Options that are common to all actions that use lcitool
|
||||
lcitoolparser = argparse.ArgumentParser(add_help=False)
|
||||
lcitoolparser.add_argument(
|
||||
"--lcitool",
|
||||
metavar="PATH",
|
||||
default="lcitool",
|
||||
help="path to lcitool binary",
|
||||
)
|
||||
|
||||
# Options that are common to actions communicating with a GitLab
|
||||
# instance
|
||||
gitlabparser = argparse.ArgumentParser(add_help=False)
|
||||
gitlabparser.add_argument(
|
||||
"--namespace",
|
||||
default="libvirt/libvirt",
|
||||
help="GitLab project namespace"
|
||||
)
|
||||
gitlabparser.add_argument(
|
||||
"--gitlab-uri",
|
||||
default="https://gitlab.com",
|
||||
help="base GitLab URI"
|
||||
)
|
||||
|
||||
# Main parser
|
||||
self._parser = argparse.ArgumentParser()
|
||||
subparsers = self._parser.add_subparsers(
|
||||
dest="action",
|
||||
metavar="ACTION",
|
||||
)
|
||||
subparsers.required = True
|
||||
|
||||
# build action
|
||||
buildparser = subparsers.add_parser(
|
||||
"build",
|
||||
help="run a build in a container",
|
||||
parents=[containerparser, mesonparser],
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
||||
)
|
||||
buildparser.set_defaults(func=Application._action_build)
|
||||
|
||||
# test action
|
||||
testparser = subparsers.add_parser(
|
||||
"test",
|
||||
help="run a build in a container (including tests)",
|
||||
parents=[containerparser, mesonparser],
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
||||
)
|
||||
testparser.set_defaults(func=Application._action_test)
|
||||
|
||||
# shell action
|
||||
shellparser = subparsers.add_parser(
|
||||
"shell",
|
||||
help="start a shell in a container",
|
||||
parents=[containerparser],
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
||||
)
|
||||
shellparser.set_defaults(func=Application._action_shell)
|
||||
|
||||
# list-images action
|
||||
listimagesparser = subparsers.add_parser(
|
||||
"list-images",
|
||||
help="list known container images",
|
||||
parents=[gitlabparser],
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
||||
)
|
||||
listimagesparser.set_defaults(func=Application._action_list_images)
|
||||
|
||||
# refresh action
|
||||
refreshparser = subparsers.add_parser(
|
||||
"refresh",
|
||||
help="refresh data generated with lcitool",
|
||||
parents=[lcitoolparser, gitlabparser],
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
||||
)
|
||||
refreshparser.add_argument(
|
||||
"--quiet",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="refresh data silently"
|
||||
)
|
||||
refreshparser.add_argument(
|
||||
"--check-stale",
|
||||
action="store",
|
||||
choices=["yes", "no"],
|
||||
default="yes",
|
||||
help="check for existence of stale images on the GitLab instance"
|
||||
)
|
||||
refreshparser.set_defaults(func=Application._action_refresh)
|
||||
|
||||
def parse(self):
|
||||
return self._parser.parse_args()
|
||||
|
||||
|
||||
class Application:
|
||||
def __init__(self):
|
||||
self._basedir = pathlib.Path(__file__).resolve().parent
|
||||
self._args = Parser().parse()
|
||||
|
||||
if self._args.action == "refresh":
|
||||
if not shutil.which(self._args.lcitool):
|
||||
sys.exit("error: 'lcitool' not installed")
|
||||
|
||||
def _make_run(self, target):
|
||||
args = [
|
||||
"-C",
|
||||
self._basedir,
|
||||
target,
|
||||
]
|
||||
|
||||
if self._args.action in ["build", "test", "shell"]:
|
||||
args.extend([
|
||||
f"CI_ENGINE={self._args.engine}",
|
||||
f"CI_USER_LOGIN={self._args.login}",
|
||||
f"CI_IMAGE_PREFIX={self._args.image_prefix}",
|
||||
f"CI_IMAGE_TAG={self._args.image_tag}",
|
||||
])
|
||||
|
||||
if self._args.action in ["build", "test"]:
|
||||
args.extend([
|
||||
f"CI_MESON_ARGS={self._args.meson_args}",
|
||||
f"CI_NINJA_ARGS={self._args.ninja_args}",
|
||||
])
|
||||
|
||||
if pty.spawn(["make"] + args) != 0:
|
||||
sys.exit("error: 'make' failed")
|
||||
|
||||
def _lcitool_run(self, args):
|
||||
output = subprocess.check_output([self._args.lcitool] + args)
|
||||
return output.decode("utf-8")
|
||||
|
||||
def _lcitool_get_hosts(self):
|
||||
output = self._lcitool_run(["hosts"])
|
||||
return output.splitlines()
|
||||
|
||||
def _generate_dockerfile(self, host, cross=None):
|
||||
args = ["dockerfile", host, "libvirt"]
|
||||
outdir = self._basedir.joinpath("containers")
|
||||
outfile = f"{host}.Dockerfile"
|
||||
|
||||
if cross:
|
||||
args.extend(["--cross", cross])
|
||||
outfile = f"{host}-cross-{cross}.Dockerfile"
|
||||
|
||||
outpath = outdir.joinpath(outfile)
|
||||
if not self._args.quiet:
|
||||
print(outpath)
|
||||
|
||||
output = self._lcitool_run(args)
|
||||
with open(outpath, "w") as f:
|
||||
f.write(output)
|
||||
|
||||
def _generate_vars(self, host):
|
||||
args = ["variables", host, "libvirt"]
|
||||
outdir = self._basedir.joinpath("cirrus")
|
||||
outfile = f"{host}.vars"
|
||||
|
||||
outpath = outdir.joinpath(outfile)
|
||||
if not self._args.quiet:
|
||||
print(outpath)
|
||||
|
||||
output = self._lcitool_run(args)
|
||||
with open(outpath, "w") as f:
|
||||
f.write(output)
|
||||
|
||||
def _refresh_containers(self):
|
||||
debian_cross = [
|
||||
"aarch64",
|
||||
"armv6l",
|
||||
"armv7l",
|
||||
"i686",
|
||||
"mips",
|
||||
"mips64el",
|
||||
"mipsel",
|
||||
"ppc64le",
|
||||
"s390x",
|
||||
]
|
||||
fedora_cross = [
|
||||
"mingw32",
|
||||
"mingw64",
|
||||
]
|
||||
|
||||
for host in self._lcitool_get_hosts():
|
||||
if host.startswith("freebsd-") or host.startswith("macos-"):
|
||||
continue
|
||||
|
||||
self._generate_dockerfile(host)
|
||||
|
||||
if host == "fedora-rawhide":
|
||||
for cross in fedora_cross:
|
||||
self._generate_dockerfile(host, cross)
|
||||
|
||||
if host.startswith("debian-"):
|
||||
for cross in debian_cross:
|
||||
if host == "debian-sid" and cross == "mips":
|
||||
continue
|
||||
self._generate_dockerfile(host, cross)
|
||||
|
||||
def _refresh_cirrus(self):
|
||||
for host in self._lcitool_get_hosts():
|
||||
if not (host.startswith("freebsd-") or host.startswith("macos-")):
|
||||
continue
|
||||
|
||||
self._generate_vars(host)
|
||||
|
||||
def _check_stale_images(self):
|
||||
namespace = self._args.namespace
|
||||
gitlab_uri = self._args.gitlab_uri
|
||||
registry_uri = util.get_registry_uri(namespace, gitlab_uri)
|
||||
lcitool_hosts = self._lcitool_get_hosts()
|
||||
|
||||
stale_images = util.get_registry_stale_images(registry_uri,
|
||||
lcitool_hosts)
|
||||
if stale_images:
|
||||
spacing = "\n" + 4 * " "
|
||||
stale_fmt = [f"{k} (ID: {v})" for k, v in stale_images.items()]
|
||||
stale_details = spacing.join(stale_fmt)
|
||||
stale_ids = ' '.join([str(id) for id in stale_images.values()])
|
||||
registry_uri = util.get_registry_uri(namespace, gitlab_uri)
|
||||
|
||||
msg = textwrap.dedent(f"""
|
||||
The following images are stale and can be purged from the registry:
|
||||
|
||||
STALE_DETAILS
|
||||
|
||||
You can delete the images listed above using this shell snippet:
|
||||
|
||||
$ for image_id in {stale_ids}; do
|
||||
curl --request DELETE --header "PRIVATE-TOKEN: <access_token>" \\
|
||||
{registry_uri}/$image_id;
|
||||
done
|
||||
|
||||
You can generate a personal access token here:
|
||||
|
||||
{gitlab_uri}/-/profile/personal_access_tokens
|
||||
""")
|
||||
print(msg.replace("STALE_DETAILS", stale_details))
|
||||
|
||||
def _action_build(self):
|
||||
self._make_run(f"ci-build@{self._args.target}")
|
||||
|
||||
def _action_test(self):
|
||||
self._make_run(f"ci-test@{self._args.target}")
|
||||
|
||||
def _action_shell(self):
|
||||
self._make_run(f"ci-shell@{self._args.target}")
|
||||
|
||||
def _action_list_images(self):
|
||||
registry_uri = util.get_registry_uri(self._args.namespace,
|
||||
self._args.gitlab_uri)
|
||||
images = util.get_registry_images(registry_uri)
|
||||
|
||||
# skip the "ci-" prefix each of our container images' name has
|
||||
name_prefix = "ci-"
|
||||
names = [i["name"][len(name_prefix):] for i in images]
|
||||
names.sort()
|
||||
|
||||
native = [name for name in names if "-cross-" not in name]
|
||||
cross = [name for name in names if "-cross-" in name]
|
||||
|
||||
spacing = 4 * " "
|
||||
print("Available x86 container images:\n")
|
||||
print(spacing + ("\n" + spacing).join(native))
|
||||
|
||||
if cross:
|
||||
print()
|
||||
print("Available cross-compiler container images:\n")
|
||||
print(spacing + ("\n" + spacing).join(cross))
|
||||
|
||||
def _action_refresh(self):
|
||||
self._refresh_containers()
|
||||
self._refresh_cirrus()
|
||||
|
||||
if self._args.check_stale == "yes" and not self._args.quiet:
|
||||
self._check_stale_images()
|
||||
|
||||
def run(self):
|
||||
self._args.func(self)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
Application().run()
|
81
ci/util.py
81
ci/util.py
@@ -1,81 +0,0 @@
|
||||
import json
|
||||
import urllib.request
|
||||
import urllib.parse
|
||||
|
||||
from typing import Dict, List
|
||||
|
||||
|
||||
def get_registry_uri(namespace: str,
|
||||
gitlab_uri: str = "https://gitlab.com") -> str:
|
||||
"""
|
||||
Construct a v4 API URI pointing the namespaced project's image registry.
|
||||
|
||||
:param namespace: GitLab project namespace, e.g. "libvirt/libvirt"
|
||||
:param gitlab_uri: GitLab base URI, can be a private deployment
|
||||
:param api_version: GitLab REST API version number
|
||||
:return: URI pointing to a namespaced project's image registry
|
||||
"""
|
||||
|
||||
# this converts something like "libvirt/libvirt" to "libvirt%2Flibvirt"
|
||||
namespace_urlenc = urllib.parse.quote_plus(namespace)
|
||||
|
||||
project_uri = f"{gitlab_uri}/api/v4/projects/{namespace_urlenc}"
|
||||
|
||||
uri = project_uri + "/registry/repositories"
|
||||
return uri
|
||||
|
||||
|
||||
def get_registry_images(uri: str) -> List[Dict]:
|
||||
"""
|
||||
List all container images that are currently available in the given GitLab
|
||||
project.
|
||||
|
||||
:param uri: URI pointing to a GitLab instance's image registry
|
||||
:return: list of container image names
|
||||
"""
|
||||
|
||||
r = urllib.request.urlopen(uri + "?per_page=100")
|
||||
|
||||
# read the HTTP response and load the JSON part of it
|
||||
return json.loads(r.read().decode())
|
||||
|
||||
|
||||
def get_image_distro(image_name: str) -> str:
|
||||
"""
|
||||
Extract the name of the distro in the GitLab image registry name, e.g.
|
||||
ci-debian-9-cross-mipsel --> debian-9
|
||||
|
||||
:param image_name: name of the GitLab registry image
|
||||
:return: distro name as a string
|
||||
"""
|
||||
name_prefix = "ci-"
|
||||
name_suffix = "-cross-"
|
||||
|
||||
distro = image_name[len(name_prefix):]
|
||||
|
||||
index = distro.find(name_suffix)
|
||||
if index > 0:
|
||||
distro = distro[:index]
|
||||
|
||||
return distro
|
||||
|
||||
|
||||
def get_registry_stale_images(registry_uri: str,
|
||||
supported_distros: List[str]) -> Dict[str, int]:
|
||||
"""
|
||||
Check the GitLab image registry for images that we no longer support and
|
||||
which should be deleted.
|
||||
|
||||
:param uri: URI pointing to a GitLab instance's image registry
|
||||
:param supported_distros: list of hosts supported by lcitool
|
||||
:return: dictionary formatted as: {<gitlab_image_name>: <gitlab_image_id>}
|
||||
"""
|
||||
|
||||
images = get_registry_images(registry_uri)
|
||||
|
||||
stale_images = {}
|
||||
for img in images:
|
||||
if get_image_distro(img["name"]) not in supported_distros:
|
||||
stale_images[img["name"]] = img["id"]
|
||||
|
||||
return stale_images
|
95
config-post.h
Normal file
95
config-post.h
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* Copyright (C) 2013 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Since virt-login-shell will be setuid, we must do everything
|
||||
* we can to avoid linking to other libraries. Many of them do
|
||||
* unsafe things in functions marked __atttribute__((constructor)).
|
||||
* The only way to avoid such deps is to re-compile the
|
||||
* functions with the code in question disabled, and for that we
|
||||
* must override the main config.h rules. Hence this file :-(
|
||||
*/
|
||||
|
||||
#ifdef LIBVIRT_SETUID_RPC_CLIENT
|
||||
# undef HAVE_LIBNL
|
||||
# undef HAVE_LIBNL3
|
||||
# undef HAVE_LIBSASL2
|
||||
# undef HAVE_SYS_ACL_H
|
||||
# undef WITH_CAPNG
|
||||
# undef WITH_CURL
|
||||
# undef WITH_DBUS
|
||||
# undef WITH_DEVMAPPER
|
||||
# undef WITH_DTRACE_PROBES
|
||||
# undef WITH_GNUTLS
|
||||
# undef WITH_GNUTLS_GCRYPT
|
||||
# undef WITH_LIBSSH
|
||||
# undef WITH_MACVTAP
|
||||
# undef WITH_NUMACTL
|
||||
# undef WITH_SASL
|
||||
# undef WITH_SSH2
|
||||
# undef WITH_SYSTEMD_DAEMON
|
||||
# undef WITH_VIRTUALPORT
|
||||
# undef WITH_YAJL
|
||||
# undef WITH_YAJL2
|
||||
#endif
|
||||
|
||||
/*
|
||||
* With the NSS module it's the same story as virt-login-shell. See the
|
||||
* explanation above.
|
||||
*/
|
||||
#ifdef LIBVIRT_NSS
|
||||
# undef HAVE_LIBNL
|
||||
# undef HAVE_LIBNL3
|
||||
# undef HAVE_LIBSASL2
|
||||
# undef HAVE_SYS_ACL_H
|
||||
# undef WITH_CAPNG
|
||||
# undef WITH_CURL
|
||||
# undef WITH_DEVMAPPER
|
||||
# undef WITH_DTRACE_PROBES
|
||||
# undef WITH_GNUTLS
|
||||
# undef WITH_GNUTLS_GCRYPT
|
||||
# undef WITH_LIBSSH
|
||||
# undef WITH_MACVTAP
|
||||
# undef WITH_NUMACTL
|
||||
# undef WITH_SASL
|
||||
# undef WITH_SSH2
|
||||
# undef WITH_VIRTUALPORT
|
||||
# undef WITH_SECDRIVER_SELINUX
|
||||
# undef WITH_SECDRIVER_APPARMOR
|
||||
# undef WITH_CAPNG
|
||||
#endif /* LIBVIRT_NSS */
|
||||
|
||||
#ifndef __GNUC__
|
||||
# error "Libvirt requires GCC >= 4.4, or CLang"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Define __GNUC_PREREQ to a sane default if it isn't yet defined.
|
||||
* This is done here so that it's included as early as possible; gnulib relies
|
||||
* on this to be defined in features.h, which should be included from ctype.h.
|
||||
* This doesn't happen on many non-glibc systems.
|
||||
* When __GNUC_PREREQ is not defined, gnulib defines it to 0, which breaks things.
|
||||
*/
|
||||
#ifndef __GNUC_PREREQ
|
||||
# define __GNUC_PREREQ(maj, min) \
|
||||
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
|
||||
#endif
|
||||
|
||||
#if !(__GNUC_PREREQ(4, 4) || defined(__clang__))
|
||||
# error "Libvirt requires GCC >= 4.4, or CLang"
|
||||
#endif
|
63
config.h
63
config.h
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <meson-config.h>
|
||||
|
||||
/* Enable compile-time and run-time bounds-checking, and some warnings,
|
||||
* without upsetting newer glibc. */
|
||||
|
||||
#if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__
|
||||
# define _FORTIFY_SOURCE 2
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Define __GNUC_PREREQ to a sane default if it isn't yet defined.
|
||||
* This is done here so that it's included as early as possible;
|
||||
*/
|
||||
#ifndef __GNUC_PREREQ
|
||||
# define __GNUC_PREREQ(maj, min) \
|
||||
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
|
||||
#endif
|
||||
|
||||
#if defined(__clang_major__) && defined(__clang_minor__)
|
||||
# ifdef __apple_build_version__
|
||||
# if __clang_major__ < 5 || (__clang_major__ == 5 && __clang_minor__ < 1)
|
||||
# error You need at least XCode Clang v5.1 to compile libvirt
|
||||
# endif
|
||||
# else
|
||||
# if __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 4)
|
||||
# error You need at least Clang v3.4 to compile libvirt
|
||||
# endif
|
||||
# endif
|
||||
#elif defined(__GNUC__) && defined(__GNUC_MINOR__)
|
||||
# if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8)
|
||||
# error You need at least GCC v4.8 to compile libvirt
|
||||
# endif
|
||||
#else
|
||||
# error You either need at least GCC 4.8 or Clang 3.4 or XCode Clang 5.1 to compile libvirt
|
||||
#endif
|
||||
|
||||
/* Ask for warnings for anything that was marked deprecated in
|
||||
* the defined version, or before. It is a candidate for rewrite.
|
||||
*/
|
||||
#define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_48
|
||||
|
||||
/* Ask for warnings if code tries to use function that did not
|
||||
* exist in the defined version. These risk breaking builds
|
||||
*/
|
||||
#define GLIB_VERSION_MAX_ALLOWED GLIB_VERSION_2_48
|
@@ -1,16 +0,0 @@
|
||||
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
||||
#if WIN32
|
||||
# include <winsock2.h> /* avoid mingw pollution on DATADIR */
|
||||
#endif
|
||||
#mesondefine BINDIR
|
||||
#mesondefine DATADIR
|
||||
#mesondefine LIBDIR
|
||||
#mesondefine LIBEXECDIR
|
||||
#mesondefine LOCALEDIR
|
||||
#mesondefine LOCALSTATEDIR
|
||||
#mesondefine MANDIR
|
||||
#mesondefine PKGDATADIR
|
||||
#mesondefine PREFIX
|
||||
#mesondefine RUNSTATEDIR
|
||||
#mesondefine SBINDIR
|
||||
#mesondefine SYSCONFDIR
|
1020
configure.ac
Normal file
1020
configure.ac
Normal file
File diff suppressed because it is too large
Load Diff
BIN
docs/32favicon.png
Normal file
BIN
docs/32favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 783 B |
410
docs/Makefile.am
Normal file
410
docs/Makefile.am
Normal file
@@ -0,0 +1,410 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
## Copyright (C) 2005-2016 Red Hat, Inc.
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
## modify it under the terms of the GNU Lesser General Public
|
||||
## License as published by the Free Software Foundation; either
|
||||
## version 2.1 of the License, or (at your option) any later version.
|
||||
##
|
||||
## This library is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
## Lesser General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU Lesser General Public
|
||||
## License along with this library. If not, see
|
||||
## <http://www.gnu.org/licenses/>.
|
||||
|
||||
DEVHELP_DIR=$(datadir)/gtk-doc/html/libvirt
|
||||
|
||||
apihtml = \
|
||||
html/index.html \
|
||||
$(apihtml_generated)
|
||||
|
||||
apihtml_generated = \
|
||||
html/libvirt-libvirt-common.html \
|
||||
html/libvirt-libvirt-domain.html \
|
||||
html/libvirt-libvirt-domain-snapshot.html \
|
||||
html/libvirt-libvirt-event.html \
|
||||
html/libvirt-libvirt-host.html \
|
||||
html/libvirt-libvirt-interface.html \
|
||||
html/libvirt-libvirt-network.html \
|
||||
html/libvirt-libvirt-nodedev.html \
|
||||
html/libvirt-libvirt-nwfilter.html \
|
||||
html/libvirt-libvirt-secret.html \
|
||||
html/libvirt-libvirt-storage.html \
|
||||
html/libvirt-libvirt-stream.html \
|
||||
html/libvirt-virterror.html
|
||||
|
||||
apipng = \
|
||||
html/left.png \
|
||||
html/up.png \
|
||||
html/home.png \
|
||||
html/right.png
|
||||
|
||||
devhelphtml = \
|
||||
devhelp/libvirt.devhelp \
|
||||
devhelp/index.html \
|
||||
devhelp/general.html \
|
||||
devhelp/libvirt-virterror.html
|
||||
|
||||
css = \
|
||||
generic.css \
|
||||
libvirt.css \
|
||||
mobile.css \
|
||||
main.css
|
||||
|
||||
fonts = \
|
||||
fonts/LICENSE.md \
|
||||
fonts/stylesheet.css \
|
||||
fonts/overpass-bold-italic.woff \
|
||||
fonts/overpass-bold.woff \
|
||||
fonts/overpass-italic.woff \
|
||||
fonts/overpass-light-italic.woff \
|
||||
fonts/overpass-light.woff \
|
||||
fonts/overpass-mono-bold.woff \
|
||||
fonts/overpass-mono-light.woff \
|
||||
fonts/overpass-mono-regular.woff \
|
||||
fonts/overpass-mono-semibold.woff \
|
||||
fonts/overpass-regular.woff
|
||||
|
||||
devhelppng = \
|
||||
devhelp/home.png \
|
||||
devhelp/left.png \
|
||||
devhelp/right.png \
|
||||
devhelp/up.png
|
||||
|
||||
devhelpcss = devhelp/style.css
|
||||
|
||||
devhelpxsl = devhelp/devhelp.xsl devhelp/html.xsl
|
||||
|
||||
logofiles = \
|
||||
logos/logo-base.svg \
|
||||
logos/logo-square.svg \
|
||||
logos/logo-square-powered.svg \
|
||||
logos/logo-banner-dark.svg \
|
||||
logos/logo-banner-light.svg \
|
||||
logos/logo-square-96.png \
|
||||
logos/logo-square-128.png \
|
||||
logos/logo-square-192.png \
|
||||
logos/logo-square-256.png \
|
||||
logos/logo-square-powered-96.png \
|
||||
logos/logo-square-powered-128.png \
|
||||
logos/logo-square-powered-192.png \
|
||||
logos/logo-square-powered-256.png \
|
||||
logos/logo-banner-dark-256.png \
|
||||
logos/logo-banner-dark-800.png \
|
||||
logos/logo-banner-light-256.png \
|
||||
logos/logo-banner-light-800.png
|
||||
|
||||
png = \
|
||||
32favicon.png \
|
||||
libvirt-daemon-arch.png \
|
||||
libvirt-driver-arch.png \
|
||||
libvirt-object-model.png \
|
||||
migration-managed-direct.png \
|
||||
migration-managed-p2p.png \
|
||||
migration-native.png \
|
||||
migration-tunnel.png \
|
||||
migration-unmanaged-direct.png
|
||||
|
||||
gif = \
|
||||
architecture.gif \
|
||||
node.gif
|
||||
|
||||
|
||||
internals_html_in = \
|
||||
$(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/internals/*.html.in))
|
||||
internals_html = $(internals_html_in:%.html.in=%.html)
|
||||
|
||||
# Since we ship pre-built html in the tarball, we must also
|
||||
# ship the sources, even when those sources are themselves
|
||||
# generated.
|
||||
# Generate hvsupport.html and news.html first, since they take one extra step.
|
||||
dot_html_in = \
|
||||
hvsupport.html.in \
|
||||
news.html.in \
|
||||
$(notdir $(wildcard $(srcdir)/*.html.in))
|
||||
dot_html = $(dot_html_in:%.html.in=%.html)
|
||||
|
||||
dot_php_in = $(notdir $(wildcard $(srcdir)/*.php.in))
|
||||
dot_php_code_in = $(dot_php_in:%.php.in=%.php.code.in)
|
||||
dot_php = $(dot_php_in:%.php.in=%.php)
|
||||
|
||||
patches = $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/api_extension/*.patch))
|
||||
|
||||
xml = \
|
||||
libvirt-api.xml \
|
||||
libvirt-refs.xml
|
||||
|
||||
qemu_xml = \
|
||||
libvirt-qemu-api.xml \
|
||||
libvirt-qemu-refs.xml
|
||||
|
||||
lxc_xml = \
|
||||
libvirt-lxc-api.xml \
|
||||
libvirt-lxc-refs.xml
|
||||
|
||||
admin_xml = \
|
||||
libvirt-admin-api.xml \
|
||||
libvirt-admin-refs.xml
|
||||
|
||||
apidir = $(pkgdatadir)/api
|
||||
api_DATA = \
|
||||
libvirt-api.xml \
|
||||
libvirt-qemu-api.xml \
|
||||
libvirt-lxc-api.xml \
|
||||
libvirt-admin-api.xml
|
||||
|
||||
fig = \
|
||||
libvirt-daemon-arch.fig \
|
||||
libvirt-driver-arch.fig \
|
||||
libvirt-object-model.fig \
|
||||
migration-managed-direct.fig \
|
||||
migration-managed-p2p.fig \
|
||||
migration-native.fig \
|
||||
migration-tunnel.fig \
|
||||
migration-unmanaged-direct.fig
|
||||
|
||||
schemadir = $(pkgdatadir)/schemas
|
||||
schema_DATA = $(wildcard $(srcdir)/schemas/*.rng)
|
||||
|
||||
EXTRA_DIST= \
|
||||
apibuild.py genaclperms.pl \
|
||||
site.xsl subsite.xsl newapi.xsl page.xsl \
|
||||
wrapstring.xsl \
|
||||
$(dot_html) $(dot_html_in) $(gif) $(apihtml) $(apipng) \
|
||||
$(devhelphtml) $(devhelppng) $(devhelpcss) $(devhelpxsl) \
|
||||
$(xml) $(qemu_xml) $(lxc_xml) $(admin_xml) $(fig) $(png) $(css) \
|
||||
$(logofiles) $(patches) $(dot_php_in) $(dot_php_code_in) $(dot_php)\
|
||||
$(internals_html_in) $(internals_html) $(fonts) \
|
||||
aclperms.htmlinc \
|
||||
hvsupport.pl \
|
||||
$(schema_DATA)
|
||||
|
||||
acl_generated = aclperms.htmlinc
|
||||
|
||||
$(srcdir)/aclperms.htmlinc: $(top_srcdir)/src/access/viraccessperm.h \
|
||||
$(srcdir)/genaclperms.pl Makefile.am
|
||||
$(AM_V_GEN)$(PERL) $(srcdir)/genaclperms.pl $< > $@
|
||||
|
||||
MAINTAINERCLEANFILES = \
|
||||
$(addprefix $(srcdir)/,$(dot_html)) \
|
||||
$(addprefix $(srcdir)/,$(apihtml)) \
|
||||
$(addprefix $(srcdir)/,$(devhelphtml)) \
|
||||
$(addprefix $(srcdir)/,$(internals_html)) \
|
||||
$(addprefix $(srcdir)/,$(dot_php)) \
|
||||
$(srcdir)/hvsupport.html.in $(srcdir)/aclperms.htmlinc
|
||||
|
||||
timestamp="$(shell if test -n "$$SOURCE_DATE_EPOCH"; \
|
||||
then \
|
||||
date -u --date="@$$SOURCE_DATE_EPOCH"; \
|
||||
else \
|
||||
date -u; \
|
||||
fi)"
|
||||
|
||||
all-am: web
|
||||
|
||||
api: $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml
|
||||
qemu_api: $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml
|
||||
lxc_api: $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml
|
||||
admin_api: $(srcdir)/libvirt-admin-api.xml $(srcdir)/libvirt-admin-refs.xml
|
||||
|
||||
web: $(dot_html) $(internals_html) html/index.html devhelp/index.html \
|
||||
$(dot_php)
|
||||
|
||||
hvsupport.html: $(srcdir)/hvsupport.html.in
|
||||
|
||||
$(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl $(api_DATA) \
|
||||
$(top_srcdir)/src/libvirt_public.syms \
|
||||
$(top_srcdir)/src/libvirt_qemu.syms $(top_srcdir)/src/libvirt_lxc.syms \
|
||||
$(top_srcdir)/src/driver.h
|
||||
$(AM_V_GEN)$(PERL) $(srcdir)/hvsupport.pl $(top_srcdir)/src > $@ \
|
||||
|| { rm $@ && exit 1; }
|
||||
|
||||
# xsltproc seems to add the xmlns="" attribute to random output elements:
|
||||
# use sed to strip it out, as leaving it there triggers XML errors during
|
||||
# further transformation steps
|
||||
news.html.in: \
|
||||
$(srcdir)/news.xml \
|
||||
$(srcdir)/news-html.xsl
|
||||
$(AM_V_GEN)$(XSLTPROC) --nonet \
|
||||
$(srcdir)/news-html.xsl \
|
||||
$(srcdir)/news.xml \
|
||||
>$@-tmp \
|
||||
|| { rm -f $@-tmp; exit 1; }; \
|
||||
sed 's/ xmlns=""//g' $@-tmp >$@ \
|
||||
|| { rm -f $@-tmp; exit 1; }; \
|
||||
rm -f $@-tmp
|
||||
EXTRA_DIST += \
|
||||
$(srcdir)/news.xml \
|
||||
$(srcdir)/news.rng \
|
||||
$(srcdir)/news-html.xsl
|
||||
MAINTAINERCLEANFILES += \
|
||||
$(srcdir)/news.html.in
|
||||
|
||||
%.png: %.fig
|
||||
convert -rotate 90 $< $@
|
||||
|
||||
%.html.tmp: %.html.in site.xsl subsite.xsl page.xsl \
|
||||
$(acl_generated)
|
||||
$(AM_V_GEN)name=`echo $@ | sed -e 's/.tmp//'`; \
|
||||
dir=`dirname $@` ; \
|
||||
if test "$$dir" = "."; \
|
||||
then \
|
||||
style=site.xsl; \
|
||||
else \
|
||||
$(MKDIR_P) $$dir; \
|
||||
style=subsite.xsl; \
|
||||
fi; \
|
||||
$(XSLTPROC) --stringparam pagename $$name \
|
||||
--stringparam timestamp $(timestamp) --nonet \
|
||||
$(top_srcdir)/docs/$$style $< > $@ \
|
||||
|| { rm $@ && exit 1; }
|
||||
|
||||
%.html: %.html.tmp
|
||||
$(AM_V_GEN)$(XMLLINT) --nonet --format $< > $(srcdir)/$@ \
|
||||
|| { rm $(srcdir)/$@ && exit 1; }
|
||||
|
||||
%.php.tmp: %.php.in site.xsl page.xsl
|
||||
$(AM_V_GEN)$(XSLTPROC) --stringparam pagename $(@:.tmp=) \
|
||||
--stringparam timestamp $(timestamp) --nonet \
|
||||
$(top_srcdir)/docs/site.xsl $< > $@ \
|
||||
|| { rm $@ && exit 1; }
|
||||
|
||||
%.php: %.php.tmp %.php.code.in
|
||||
$(AM_V_GEN)sed \
|
||||
-e '/<span id="php_placeholder"><\/span>/r '"$(srcdir)/$@.code.in" \
|
||||
-e /php_placeholder/d < $@.tmp > $(srcdir)/$@ \
|
||||
|| { rm $(srcdir)/$@ && exit 1; }
|
||||
|
||||
$(apihtml_generated): html/index.html
|
||||
|
||||
html/index.html: libvirt-api.xml newapi.xsl page.xsl $(APIBUILD_STAMP)
|
||||
$(AM_V_GEN)$(XSLTPROC) --nonet -o $(srcdir)/ \
|
||||
--stringparam builddir '$(abs_top_builddir)' \
|
||||
--stringparam timestamp $(timestamp) \
|
||||
$(srcdir)/newapi.xsl $(srcdir)/libvirt-api.xml && \
|
||||
$(XMLLINT) --nonet --noout $(srcdir)/html/*.html
|
||||
|
||||
$(addprefix $(srcdir)/,$(devhelphtml)): $(srcdir)/libvirt-api.xml $(devhelpxsl)
|
||||
$(AM_V_GEN)$(XSLTPROC) --stringparam timestamp $(timestamp) \
|
||||
--nonet -o $(srcdir)/devhelp/ \
|
||||
$(top_srcdir)/docs/devhelp/devhelp.xsl $(srcdir)/libvirt-api.xml
|
||||
|
||||
|
||||
python_generated_files = \
|
||||
$(srcdir)/html/libvirt-libvirt-lxc.html \
|
||||
$(srcdir)/html/libvirt-libvirt-qemu.html \
|
||||
$(srcdir)/html/libvirt-libvirt-admin.html \
|
||||
$(srcdir)/html/libvirt-virterror.html \
|
||||
$(srcdir)/libvirt-api.xml \
|
||||
$(srcdir)/libvirt-refs.xml \
|
||||
$(srcdir)/libvirt-lxc-api.xml \
|
||||
$(srcdir)/libvirt-lxc-refs.xml \
|
||||
$(srcdir)/libvirt-qemu-api.xml \
|
||||
$(srcdir)/libvirt-qemu-refs.xml \
|
||||
$(srcdir)/libvirt-admin-api.xml \
|
||||
$(srcdir)/libvirt-admin-refs.xml \
|
||||
$(NULL)
|
||||
|
||||
APIBUILD=$(srcdir)/apibuild.py
|
||||
APIBUILD_STAMP=$(APIBUILD).stamp
|
||||
EXTRA_DIST += $(APIBUILD_STAMP)
|
||||
|
||||
$(python_generated_files): $(APIBUILD_STAMP)
|
||||
|
||||
$(APIBUILD_STAMP): $(srcdir)/apibuild.py \
|
||||
$(top_srcdir)/include/libvirt/libvirt.h \
|
||||
$(top_srcdir)/include/libvirt/libvirt-common.h.in \
|
||||
$(top_srcdir)/include/libvirt/libvirt-domain-snapshot.h \
|
||||
$(top_srcdir)/include/libvirt/libvirt-domain.h \
|
||||
$(top_srcdir)/include/libvirt/libvirt-event.h \
|
||||
$(top_srcdir)/include/libvirt/libvirt-host.h \
|
||||
$(top_srcdir)/include/libvirt/libvirt-interface.h \
|
||||
$(top_srcdir)/include/libvirt/libvirt-network.h \
|
||||
$(top_srcdir)/include/libvirt/libvirt-nodedev.h \
|
||||
$(top_srcdir)/include/libvirt/libvirt-nwfilter.h \
|
||||
$(top_srcdir)/include/libvirt/libvirt-secret.h \
|
||||
$(top_srcdir)/include/libvirt/libvirt-storage.h \
|
||||
$(top_srcdir)/include/libvirt/libvirt-stream.h \
|
||||
$(top_srcdir)/include/libvirt/libvirt-lxc.h \
|
||||
$(top_srcdir)/include/libvirt/libvirt-qemu.h \
|
||||
$(top_srcdir)/include/libvirt/libvirt-admin.h \
|
||||
$(top_srcdir)/include/libvirt/virterror.h \
|
||||
$(top_srcdir)/src/libvirt.c \
|
||||
$(top_srcdir)/src/libvirt-domain-snapshot.c \
|
||||
$(top_srcdir)/src/libvirt-domain.c \
|
||||
$(top_srcdir)/src/libvirt-host.c \
|
||||
$(top_srcdir)/src/libvirt-interface.c \
|
||||
$(top_srcdir)/src/libvirt-network.c \
|
||||
$(top_srcdir)/src/libvirt-nodedev.c \
|
||||
$(top_srcdir)/src/libvirt-nwfilter.c \
|
||||
$(top_srcdir)/src/libvirt-secret.c \
|
||||
$(top_srcdir)/src/libvirt-storage.c \
|
||||
$(top_srcdir)/src/libvirt-stream.c \
|
||||
$(top_srcdir)/src/libvirt-lxc.c \
|
||||
$(top_srcdir)/src/libvirt-qemu.c \
|
||||
$(top_srcdir)/src/libvirt-admin.c \
|
||||
$(top_srcdir)/src/util/virerror.c \
|
||||
$(top_srcdir)/src/util/virevent.c \
|
||||
$(top_srcdir)/src/util/virtypedparam.c
|
||||
$(AM_V_GEN)srcdir=$(srcdir) builddir=$(builddir) $(PYTHON) $(APIBUILD)
|
||||
touch $@
|
||||
|
||||
|
||||
check-local: all
|
||||
dist-local: all
|
||||
|
||||
clean-local:
|
||||
rm -f *~ *.bak *.hierarchy *.signals *-unused.txt *.html html/*.html
|
||||
|
||||
maintainer-clean-local: clean-local
|
||||
rm -rf $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml
|
||||
rm -rf $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml
|
||||
rm -rf $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml
|
||||
rm -rf $(srcdir)/libvirt-admin-api.xml $(srcdir)/libvirt-admin-refs.xml
|
||||
rm -rf $(APIBUILD_STAMP)
|
||||
|
||||
rebuild: api qemu_api lxc_api admin_api all
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
|
||||
for f in $(css) $(dot_html) $(gif) $(png); do \
|
||||
$(INSTALL) -m 0644 $(srcdir)/$$f $(DESTDIR)$(HTML_DIR); done
|
||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/logos
|
||||
for f in $(logofiles); do \
|
||||
$(INSTALL) -m 0644 $(srcdir)/$$f $(DESTDIR)$(HTML_DIR)/logos; done
|
||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html
|
||||
for h in $(apihtml); do \
|
||||
$(INSTALL) -m 0644 $(srcdir)/$$h $(DESTDIR)$(HTML_DIR)/html; done
|
||||
for p in $(apipng); do \
|
||||
$(INSTALL) -m 0644 $(srcdir)/$$p $(DESTDIR)$(HTML_DIR)/html; done
|
||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/internals
|
||||
for f in $(internals_html); do \
|
||||
$(INSTALL) -m 0644 $(srcdir)/$$f $(DESTDIR)$(HTML_DIR)/internals; done
|
||||
$(mkinstalldirs) $(DESTDIR)$(DEVHELP_DIR)
|
||||
for file in $(devhelphtml) $(devhelppng) $(devhelpcss); do \
|
||||
$(INSTALL) -m 0644 $(srcdir)/$${file} $(DESTDIR)$(DEVHELP_DIR) ; \
|
||||
done
|
||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/fonts
|
||||
for f in $(fonts); do \
|
||||
$(INSTALL) -m 0644 $(srcdir)/$$f $(DESTDIR)$(HTML_DIR)/fonts; \
|
||||
done
|
||||
|
||||
uninstall-local:
|
||||
for f in $(css) $(dot_html) $(gif) $(png) $(fonts); do \
|
||||
rm -f $(DESTDIR)$(HTML_DIR)/$$f; \
|
||||
done
|
||||
for f in $(logofiles); do \
|
||||
rm -f $(DESTDIR)$(HTML_DIR)/$$f; \
|
||||
done
|
||||
for h in $(apihtml); do rm -f $(DESTDIR)$(HTML_DIR)/$$h; done
|
||||
for p in $(apipng); do rm -f $(DESTDIR)$(HTML_DIR)/$$p; done
|
||||
for f in $(internals_html); do \
|
||||
rm -f $(DESTDIR)$(HTML_DIR)/$$f; \
|
||||
done
|
||||
for f in $(devhelphtml) $(devhelppng) $(devhelpcss); do \
|
||||
rm -f $(DESTDIR)$(DEVHELP_DIR)/$$(basename $$f); \
|
||||
done
|
@@ -50,7 +50,7 @@
|
||||
control technologies. By default, the <code>none</code>
|
||||
driver is used, which does no access control checks at
|
||||
all. At this time, libvirt ships with support for using
|
||||
<a href="https://www.freedesktop.org/wiki/Software/polkit/">polkit</a> as a real access
|
||||
<a href="http://www.freedesktop.org/wiki/Software/polkit/">polkit</a> as a real access
|
||||
control driver. To learn how to use the polkit access
|
||||
driver consult <a href="aclpolkit.html">the configuration
|
||||
docs</a>.
|
||||
|
418
docs/aclpolkit.html.in
Normal file
418
docs/aclpolkit.html.in
Normal file
@@ -0,0 +1,418 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<body>
|
||||
<h1>Polkit access control</h1>
|
||||
|
||||
<p>
|
||||
Libvirt's client <a href="acl.html">access control framework</a> allows
|
||||
administrators to setup fine grained permission rules across client users,
|
||||
managed objects and API operations. This allows client connections
|
||||
to be locked down to a minimal set of privileges. The polkit driver
|
||||
provides a simple implementation of the access control framework.
|
||||
</p>
|
||||
|
||||
<ul id="toc"></ul>
|
||||
|
||||
<h2><a id="intro">Introduction</a></h2>
|
||||
|
||||
<p>
|
||||
A default install of libvirt will typically use
|
||||
<a href="http://www.freedesktop.org/wiki/Software/polkit/">polkit</a>
|
||||
to authenticate the initial user connection to libvirtd. This is a
|
||||
very coarse grained check though, either allowing full read-write
|
||||
access to all APIs, or just read-only access. The polkit access
|
||||
control driver in libvirt builds on this capability to allow for
|
||||
fine grained control over the operations a user may perform on an
|
||||
object.
|
||||
</p>
|
||||
|
||||
<h2><a id="perms">Permission names</a></h2>
|
||||
|
||||
<p>
|
||||
The libvirt <a href="acl.html#perms">object names and permission names</a>
|
||||
are mapped onto polkit action names using the simple pattern:
|
||||
</p>
|
||||
|
||||
<pre>org.libvirt.api.$object.$permission
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
The only caveat is that any underscore characters in the
|
||||
object or permission names are converted to hyphens. So,
|
||||
for example, the <code>search_storage_vols</code> permission
|
||||
on the <code>storage_pool</code> object maps to the polkit
|
||||
action:
|
||||
</p>
|
||||
<pre>org.libvirt.api.storage-pool.search-storage-vols
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
The default policy for any permission which corresponds to
|
||||
a "read only" operation, is to allow access. All other
|
||||
permissions default to deny access.
|
||||
</p>
|
||||
|
||||
<h2><a id="attrs">Object identity attributes</a></h2>
|
||||
|
||||
<p>
|
||||
To allow polkit authorization rules to be written to match
|
||||
against individual object instances, libvirt provides a number
|
||||
of authorization detail attributes when performing a permission
|
||||
check. The set of attributes varies according to the type
|
||||
of object being checked
|
||||
</p>
|
||||
|
||||
<h3><a id="object_connect">virConnectPtr</a></h3>
|
||||
<table class="acl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Attribute</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>connect_driver</td>
|
||||
<td>Name of the libvirt connection driver</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3><a id="object_domain">virDomainPtr</a></h3>
|
||||
<table class="acl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Attribute</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>connect_driver</td>
|
||||
<td>Name of the libvirt connection driver</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>domain_name</td>
|
||||
<td>Name of the domain, unique to the local host</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>domain_uuid</td>
|
||||
<td>UUID of the domain, globally unique</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3><a id="object_interface">virInterfacePtr</a></h3>
|
||||
<table class="acl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Attribute</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>connect_driver</td>
|
||||
<td>Name of the libvirt connection driver</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>interface_name</td>
|
||||
<td>Name of the network interface, unique to the local host</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>interface_macaddr</td>
|
||||
<td>MAC address of the network interface, not unique</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3><a id="object_network">virNetworkPtr</a></h3>
|
||||
<table class="acl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Attribute</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>connect_driver</td>
|
||||
<td>Name of the libvirt connection driver</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>network_name</td>
|
||||
<td>Name of the network, unique to the local host</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>network_uuid</td>
|
||||
<td>UUID of the network, globally unique</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3><a id="object_node_device">virNodeDevicePtr</a></h3>
|
||||
<table class="acl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Attribute</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>connect_driver</td>
|
||||
<td>Name of the libvirt connection driver</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>node_device_name</td>
|
||||
<td>Name of the node device, unique to the local host</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3><a id="object_nwfilter">virNWFilterPtr</a></h3>
|
||||
<table class="acl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Attribute</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>connect_driver</td>
|
||||
<td>Name of the libvirt connection driver</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>nwfilter_name</td>
|
||||
<td>Name of the network filter, unique to the local host</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>nwfilter_uuid</td>
|
||||
<td>UUID of the network filter, globally unique</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3><a id="object_secret">virSecretPtr</a></h3>
|
||||
<table class="acl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Attribute</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>connect_driver</td>
|
||||
<td>Name of the libvirt connection driver</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>secret_uuid</td>
|
||||
<td>UUID of the secret, globally unique</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>secret_usage_volume</td>
|
||||
<td>Name of the associated volume, if any</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>secret_usage_ceph</td>
|
||||
<td>Name of the associated Ceph server, if any</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>secret_usage_target</td>
|
||||
<td>Name of the associated iSCSI target, if any</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>secret_usage_name</td>
|
||||
<td>Name of the associated TLS secret, if any</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3><a id="object_storage_pool">virStoragePoolPtr</a></h3>
|
||||
<table class="acl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Attribute</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>connect_driver</td>
|
||||
<td>Name of the libvirt connection driver</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pool_name</td>
|
||||
<td>Name of the storage pool, unique to the local host</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pool_uuid</td>
|
||||
<td>UUID of the storage pool, globally unique</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3><a id="object_storage_vol">virStorageVolPtr</a></h3>
|
||||
<table class="acl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Attribute</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>connect_driver</td>
|
||||
<td>Name of the libvirt connection driver</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pool_name</td>
|
||||
<td>Name of the storage pool, unique to the local host</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pool_uuid</td>
|
||||
<td>UUID of the storage pool, globally unique</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>vol_name</td>
|
||||
<td>Name of the storage volume, unique to the pool</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>vol_key</td>
|
||||
<td>Key of the storage volume, globally unique</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<h2><a id="user">User identity attributes</a></h2>
|
||||
|
||||
<p>
|
||||
At this point in time, the only attribute provided by
|
||||
libvirt to identify the user invoking the operation
|
||||
is the PID of the client program. This means that the
|
||||
polkit access control driver is only useful if connections
|
||||
to libvirt are restricted to its UNIX domain socket. If
|
||||
connections are being made to a TCP socket, no identifying
|
||||
information is available and access will be denied.
|
||||
Also note that if the client is connecting via an SSH
|
||||
tunnel, it is the local SSH user that will be identified.
|
||||
In future versions, it is expected that more information
|
||||
about the client user will be provided, including the
|
||||
SASL / Kerberos username and/or x509 distinguished
|
||||
name obtained from the authentication provider in use.
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a id="checks">Writing access control policies</a></h2>
|
||||
|
||||
<p>
|
||||
If using versions of polkit prior to 0.106 then it is only
|
||||
possible to validate (user, permission) pairs via the <code>.pkla</code>
|
||||
files. Fully validation of the (user, permission, object) triple
|
||||
requires the new JavaScript <code>.rules</code> support that
|
||||
was introduced in version 0.106. The latter is what will be
|
||||
described here.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Libvirt does not ship any rules files by default. It merely
|
||||
provides a definition of the default behaviour for each
|
||||
action (permission). As noted earlier, permissions which
|
||||
correspond to read-only operations in libvirt will be allowed
|
||||
to all users by default; everything else is denied by default.
|
||||
Defining custom rules requires creation of a file in the
|
||||
<code>/etc/polkit-1/rules.d</code> directory with a name
|
||||
chosen by the administrator (<code>100-libvirt-acl.rules</code>
|
||||
would be a reasonable choice). See the <code>polkit(8)</code>
|
||||
manual page for a description of how to write these files
|
||||
in general. The key idea is to create a file containing
|
||||
something like
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
polkit.addRule(function(action, subject) {
|
||||
....logic to check 'action' and 'subject'...
|
||||
});
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
In this code snippet above, the <code>action</code> object
|
||||
instance will represent the libvirt permission being checked
|
||||
along with identifying attributes for the object it is being
|
||||
applied to. The <code>subject</code> meanwhile will identify
|
||||
the libvirt client app (with the caveat above about it only
|
||||
dealing with local clients connected via the UNIX socket).
|
||||
On the <code>action</code> object, the permission name is
|
||||
accessible via the <code>id</code> attribute, while the
|
||||
object identifying attributes are exposed via the
|
||||
<code>lookup</code> method.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
See
|
||||
<a href="https://libvirt.org/git/?p=libvirt.git;a=tree;f=examples/polkit;hb=HEAD">source code</a>
|
||||
for a more complex example.
|
||||
</p>
|
||||
|
||||
<h3><a id="exconnect">Example: restricting ability to connect to drivers</a></h3>
|
||||
|
||||
<p>
|
||||
Consider a local user <code>berrange</code>
|
||||
who has been granted permission to connect to libvirt in
|
||||
full read-write mode. The goal is to only allow them to
|
||||
use the <code>QEMU</code> driver and not the Xen or LXC
|
||||
drivers which are also available in libvirtd.
|
||||
To achieve this we need to write a rule which checks
|
||||
whether the <code>connect_driver</code> attribute
|
||||
is <code>QEMU</code>, and match on an action
|
||||
name of <code>org.libvirt.api.connect.getattr</code>. Using
|
||||
the javascript rules format, this ends up written as
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.libvirt.api.connect.getattr" &&
|
||||
subject.user == "berrange") {
|
||||
if (action.lookup("connect_driver") == 'QEMU') {
|
||||
return polkit.Result.YES;
|
||||
} else {
|
||||
return polkit.Result.NO;
|
||||
}
|
||||
}
|
||||
});
|
||||
</pre>
|
||||
|
||||
<h3><a id="exdomain">Example: restricting access to a single domain</a></h3>
|
||||
|
||||
<p>
|
||||
Consider a local user <code>berrange</code>
|
||||
who has been granted permission to connect to libvirt in
|
||||
full read-write mode. The goal is to only allow them to
|
||||
see the domain called <code>demo</code> on the LXC driver.
|
||||
To achieve this we need to write a rule which checks
|
||||
whether the <code>connect_driver</code> attribute
|
||||
is <code>LXC</code> and the <code>domain_name</code>
|
||||
attribute is <code>demo</code>, and match on a action
|
||||
name of <code>org.libvirt.api.domain.getattr</code>. Using
|
||||
the javascript rules format, this ends up written as
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.libvirt.api.domain.getattr" &&
|
||||
subject.user == "berrange") {
|
||||
if (action.lookup("connect_driver") == 'LXC' &&
|
||||
action.lookup("domain_name") == 'demo') {
|
||||
return polkit.Result.YES;
|
||||
} else {
|
||||
return polkit.Result.NO;
|
||||
}
|
||||
}
|
||||
});
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
@@ -1,310 +0,0 @@
|
||||
.. role:: since
|
||||
|
||||
=====================
|
||||
Polkit access control
|
||||
=====================
|
||||
|
||||
Libvirt's client `access control framework <acl.html>`__ allows
|
||||
administrators to setup fine grained permission rules across client
|
||||
users, managed objects and API operations. This allows client
|
||||
connections to be locked down to a minimal set of privileges. The polkit
|
||||
driver provides a simple implementation of the access control framework.
|
||||
|
||||
.. contents::
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
A default install of libvirt will typically use
|
||||
`polkit <https://www.freedesktop.org/wiki/Software/polkit/>`__ to
|
||||
authenticate the initial user connection to libvirtd. This is a very
|
||||
coarse grained check though, either allowing full read-write access to
|
||||
all APIs, or just read-only access. The polkit access control driver in
|
||||
libvirt builds on this capability to allow for fine grained control over
|
||||
the operations a user may perform on an object.
|
||||
|
||||
Permission names
|
||||
----------------
|
||||
|
||||
The libvirt `object names and permission names <acl.html#perms>`__ are
|
||||
mapped onto polkit action names using the simple pattern:
|
||||
|
||||
::
|
||||
|
||||
org.libvirt.api.$object.$permission
|
||||
|
||||
The only caveat is that any underscore characters in the object or
|
||||
permission names are converted to hyphens. So, for example, the
|
||||
``search_storage_vols`` permission on the ``storage_pool`` object maps
|
||||
to the polkit action:
|
||||
|
||||
::
|
||||
|
||||
org.libvirt.api.storage-pool.search-storage-vols
|
||||
|
||||
The default policy for any permission which corresponds to a "read only"
|
||||
operation, is to allow access. All other permissions default to deny
|
||||
access.
|
||||
|
||||
Object identity attributes
|
||||
--------------------------
|
||||
|
||||
To allow polkit authorization rules to be written to match against
|
||||
individual object instances, libvirt provides a number of authorization
|
||||
detail attributes when performing a permission check. The set of
|
||||
attributes varies according to the type of object being checked
|
||||
|
||||
virConnectPtr
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
============== =====================================
|
||||
Attribute Description
|
||||
============== =====================================
|
||||
connect_driver Name of the libvirt connection driver
|
||||
============== =====================================
|
||||
|
||||
virDomainPtr
|
||||
~~~~~~~~~~~~
|
||||
|
||||
============== ============================================
|
||||
Attribute Description
|
||||
============== ============================================
|
||||
connect_driver Name of the libvirt connection driver
|
||||
domain_name Name of the domain, unique to the local host
|
||||
domain_uuid UUID of the domain, globally unique
|
||||
============== ============================================
|
||||
|
||||
virInterfacePtr
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
+-------------------+---------------------------------------------------------+
|
||||
| Attribute | Description |
|
||||
+===================+=========================================================+
|
||||
| connect_driver | Name of the libvirt connection driver |
|
||||
+-------------------+---------------------------------------------------------+
|
||||
| interface_name | Name of the network interface, unique to the local host |
|
||||
+-------------------+---------------------------------------------------------+
|
||||
| interface_macaddr | MAC address of the network interface, not unique |
|
||||
+-------------------+---------------------------------------------------------+
|
||||
|
||||
virNetworkPtr
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
============== =============================================
|
||||
Attribute Description
|
||||
============== =============================================
|
||||
connect_driver Name of the libvirt connection driver
|
||||
network_name Name of the network, unique to the local host
|
||||
network_uuid UUID of the network, globally unique
|
||||
============== =============================================
|
||||
|
||||
virNodeDevicePtr
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
================ =================================================
|
||||
Attribute Description
|
||||
================ =================================================
|
||||
connect_driver Name of the libvirt connection driver
|
||||
node_device_name Name of the node device, unique to the local host
|
||||
================ =================================================
|
||||
|
||||
virNWFilterPtr
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
============== ====================================================
|
||||
Attribute Description
|
||||
============== ====================================================
|
||||
connect_driver Name of the libvirt connection driver
|
||||
nwfilter_name Name of the network filter, unique to the local host
|
||||
nwfilter_uuid UUID of the network filter, globally unique
|
||||
============== ====================================================
|
||||
|
||||
virSecretPtr
|
||||
~~~~~~~~~~~~
|
||||
|
||||
=================== ===========================================
|
||||
Attribute Description
|
||||
=================== ===========================================
|
||||
connect_driver Name of the libvirt connection driver
|
||||
secret_uuid UUID of the secret, globally unique
|
||||
secret_usage_volume Name of the associated volume, if any
|
||||
secret_usage_ceph Name of the associated Ceph server, if any
|
||||
secret_usage_target Name of the associated iSCSI target, if any
|
||||
secret_usage_name Name of the associated TLS secret, if any
|
||||
=================== ===========================================
|
||||
|
||||
virStoragePoolPtr
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
============== ==================================================
|
||||
Attribute Description
|
||||
============== ==================================================
|
||||
connect_driver Name of the libvirt connection driver
|
||||
pool_name Name of the storage pool, unique to the local host
|
||||
pool_uuid UUID of the storage pool, globally unique
|
||||
============== ==================================================
|
||||
|
||||
virStorageVolPtr
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
============== ==================================================
|
||||
Attribute Description
|
||||
============== ==================================================
|
||||
connect_driver Name of the libvirt connection driver
|
||||
pool_name Name of the storage pool, unique to the local host
|
||||
pool_uuid UUID of the storage pool, globally unique
|
||||
vol_name Name of the storage volume, unique to the pool
|
||||
vol_key Key of the storage volume, globally unique
|
||||
============== ==================================================
|
||||
|
||||
Hypervisor Driver connect_driver
|
||||
--------------------------------
|
||||
|
||||
The ``connect_driver`` parameter describes the client's `remote
|
||||
Connection Driver <remote.html>`__ name based on the `URI <uri.html>`__
|
||||
used for the connection.
|
||||
|
||||
:since:`Since 4.1.0`, when calling an API outside the scope of the primary
|
||||
connection driver, the primary driver will attempt to open a secondary
|
||||
connection to the specific API driver in order to process the API. For
|
||||
example, when hypervisor domain processing needs to make an API call
|
||||
within the storage driver or the network filter driver an attempt to
|
||||
open a connection to the "storage" or "nwfilter" driver will be made.
|
||||
Similarly, a "storage" primary connection may need to create a
|
||||
connection to the "secret" driver in order to process secrets for the
|
||||
API. If successful, then calls to those API's will occur in the
|
||||
``connect_driver`` context of the secondary connection driver rather
|
||||
than in the context of the primary driver. This affects the
|
||||
``connect_driver`` returned from rule generation from the
|
||||
``action.loookup`` function. The following table provides a list of the
|
||||
various connection drivers and the ``connect_driver`` name used by each
|
||||
regardless of primary or secondary connection. The access denied error
|
||||
message from libvirt will list the connection driver by name that denied
|
||||
the access.
|
||||
|
||||
Connection Driver Name
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
================= =======================
|
||||
Connection Driver ``connect_driver`` name
|
||||
================= =======================
|
||||
bhyve bhyve
|
||||
esx ESX
|
||||
hyperv Hyper-V
|
||||
interface interface
|
||||
xen Xen
|
||||
lxc LXC
|
||||
network network
|
||||
nodedev nodedev
|
||||
nwfilter NWFilter
|
||||
openvz OPENVZ
|
||||
qemu QEMU
|
||||
secret secret
|
||||
storage storage
|
||||
vbox VBOX
|
||||
vmware VMWARE
|
||||
vz vz
|
||||
================= =======================
|
||||
|
||||
User identity attributes
|
||||
------------------------
|
||||
|
||||
At this point in time, the only attribute provided by libvirt to
|
||||
identify the user invoking the operation is the PID of the client
|
||||
program. This means that the polkit access control driver is only useful
|
||||
if connections to libvirt are restricted to its UNIX domain socket. If
|
||||
connections are being made to a TCP socket, no identifying information
|
||||
is available and access will be denied. Also note that if the client is
|
||||
connecting via an SSH tunnel, it is the local SSH user that will be
|
||||
identified. In future versions, it is expected that more information
|
||||
about the client user will be provided, including the SASL / Kerberos
|
||||
username and/or x509 distinguished name obtained from the authentication
|
||||
provider in use.
|
||||
|
||||
Writing access control policies
|
||||
-------------------------------
|
||||
|
||||
If using versions of polkit prior to 0.106 then it is only possible to
|
||||
validate (user, permission) pairs via the ``.pkla`` files. Fully
|
||||
validation of the (user, permission, object) triple requires the new
|
||||
JavaScript ``.rules`` support that was introduced in version 0.106. The
|
||||
latter is what will be described here.
|
||||
|
||||
Libvirt does not ship any rules files by default. It merely provides a
|
||||
definition of the default behaviour for each action (permission). As
|
||||
noted earlier, permissions which correspond to read-only operations in
|
||||
libvirt will be allowed to all users by default; everything else is
|
||||
denied by default. Defining custom rules requires creation of a file in
|
||||
the ``/etc/polkit-1/rules.d`` directory with a name chosen by the
|
||||
administrator (``100-libvirt-acl.rules`` would be a reasonable choice).
|
||||
See the ``polkit(8)`` manual page for a description of how to write
|
||||
these files in general. The key idea is to create a file containing
|
||||
something like
|
||||
|
||||
::
|
||||
|
||||
polkit.addRule(function(action, subject) {
|
||||
....logic to check 'action' and 'subject'...
|
||||
});
|
||||
|
||||
In this code snippet above, the ``action`` object instance will
|
||||
represent the libvirt permission being checked along with identifying
|
||||
attributes for the object it is being applied to. The ``subject``
|
||||
meanwhile will identify the libvirt client app (with the caveat above
|
||||
about it only dealing with local clients connected via the UNIX socket).
|
||||
On the ``action`` object, the permission name is accessible via the
|
||||
``id`` attribute, while the object identifying attributes are exposed
|
||||
via the ``lookup`` method.
|
||||
|
||||
See `source
|
||||
code <https://gitlab.com/libvirt/libvirt/-/tree/master/examples/polkit>`__
|
||||
for a more complex example.
|
||||
|
||||
Example: restricting ability to connect to drivers
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Consider a local user ``berrange`` who has been granted permission to
|
||||
connect to libvirt in full read-write mode. The goal is to only allow
|
||||
them to use the ``QEMU`` driver and not the Xen or LXC drivers which are
|
||||
also available in libvirtd. To achieve this we need to write a rule
|
||||
which checks whether the ``connect_driver`` attribute is ``QEMU``, and
|
||||
match on an action name of ``org.libvirt.api.connect.getattr``. Using
|
||||
the javascript rules format, this ends up written as
|
||||
|
||||
::
|
||||
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.libvirt.api.connect.getattr" &&
|
||||
subject.user == "berrange") {
|
||||
if (action.lookup("connect_driver") == 'QEMU') {
|
||||
return polkit.Result.YES;
|
||||
} else {
|
||||
return polkit.Result.NO;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Example: restricting access to a single domain
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Consider a local user ``berrange`` who has been granted permission to
|
||||
connect to libvirt in full read-write mode. The goal is to only allow
|
||||
them to see the domain called ``demo`` on the LXC driver. To achieve
|
||||
this we need to write a rule which checks whether the ``connect_driver``
|
||||
attribute is ``LXC`` and the ``domain_name`` attribute is ``demo``, and
|
||||
match on an action name of ``org.libvirt.api.domain.getattr``. Using the
|
||||
javascript rules format, this ends up written as
|
||||
|
||||
::
|
||||
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.libvirt.api.domain.getattr" &&
|
||||
subject.user == "berrange") {
|
||||
if (action.lookup("connect_driver") == 'LXC' &&
|
||||
action.lookup("domain_name") == 'demo') {
|
||||
return polkit.Result.YES;
|
||||
} else {
|
||||
return polkit.Result.NO;
|
||||
}
|
||||
}
|
||||
});
|
@@ -1,171 +0,0 @@
|
||||
=========================
|
||||
Advanced test suite usage
|
||||
=========================
|
||||
|
||||
The basic requirement before submitting changes to libvirt is that
|
||||
|
||||
::
|
||||
|
||||
$ ninja test
|
||||
|
||||
succeed after each commit.
|
||||
|
||||
The libvirt test suite, however, support additional features: for
|
||||
example, it's possible to look for memory leaks and similar issues
|
||||
by running
|
||||
|
||||
::
|
||||
|
||||
$ meson test --setup valgrind
|
||||
|
||||
`Valgrind <https://valgrind.org/>`__ is a test that checks for
|
||||
memory management issues, such as leaks or use of uninitialized
|
||||
variables.
|
||||
|
||||
Some tests are skipped by default in a development environment,
|
||||
based on the time they take in comparison to the likelihood
|
||||
that those tests will turn up problems during incremental
|
||||
builds. These tests default to being run when building from a
|
||||
tarball or with the configure option -Dexpensive_tests=enabled.
|
||||
|
||||
If you encounter any failing tests, the VIR_TEST_DEBUG
|
||||
environment variable may provide extra information to debug the
|
||||
failures. Larger values of VIR_TEST_DEBUG may provide larger
|
||||
amounts of information:
|
||||
|
||||
::
|
||||
|
||||
$ VIR_TEST_DEBUG=1 ninja test (or)
|
||||
$ VIR_TEST_DEBUG=2 ninja test
|
||||
|
||||
When debugging failures during development, it is possible to
|
||||
focus in on just the failing subtests by using VIR_TEST_RANGE.
|
||||
I.e. to run all tests from 3 to 20 with the exception of tests
|
||||
6 and 16, use:
|
||||
|
||||
::
|
||||
|
||||
$ VIR_TEST_DEBUG=1 VIR_TEST_RANGE=3-5,7-20,^16 ./run tests/qemuxml2argvtest
|
||||
|
||||
Also, individual tests can be run from inside the ``tests/``
|
||||
directory, like:
|
||||
|
||||
::
|
||||
|
||||
$ ./qemuxml2xmltest
|
||||
|
||||
If you are adding new test cases, or making changes that alter
|
||||
existing test output, you can use the environment variable
|
||||
VIR_TEST_REGENERATE_OUTPUT to quickly update the saved test
|
||||
data. Of course you still need to review the changes VERY
|
||||
CAREFULLY to ensure they are correct.
|
||||
|
||||
::
|
||||
|
||||
$ VIR_TEST_REGENERATE_OUTPUT=1 ./qemuxml2argvtest
|
||||
|
||||
There is also a ``./run`` script at the top level, to make it
|
||||
easier to run programs that have not yet been installed, as
|
||||
well as to wrap invocations of various tests under gdb or
|
||||
Valgrind.
|
||||
|
||||
When running our test suite it may happen that the test result
|
||||
is nondeterministic because of the test suite relying on a
|
||||
particular file in the system being accessible or having some
|
||||
specific value. To catch this kind of errors, the test suite
|
||||
has a module for that prints any path touched that fulfils
|
||||
constraints described above into a file. To enable it just set
|
||||
``VIR_TEST_FILE_ACCESS`` environment variable. Then
|
||||
``VIR_TEST_FILE_ACCESS_OUTPUT`` environment variable can alter
|
||||
location where the file is stored.
|
||||
|
||||
::
|
||||
|
||||
$ VIR_TEST_FILE_ACCESS=1 VIR_TEST_FILE_ACCESS_OUTPUT="/tmp/file_access.txt" ./qemuxml2argvtest
|
||||
|
||||
#. The Valgrind test should produce similar output to
|
||||
``ninja test``. If the output has traces within libvirt API's,
|
||||
then investigation is required in order to determine the cause
|
||||
of the issue. Output such as the following indicates some sort
|
||||
of leak:
|
||||
|
||||
::
|
||||
|
||||
==5414== 4 bytes in 1 blocks are definitely lost in loss record 3 of 89
|
||||
==5414== at 0x4A0881C: malloc (vg_replace_malloc.c:270)
|
||||
==5414== by 0x34DE0AAB85: xmlStrndup (in /usr/lib64/libxml2.so.2.7.8)
|
||||
==5414== by 0x4CC97A6: virDomainVideoDefParseXML (domain_conf.c:7410)
|
||||
==5414== by 0x4CD581D: virDomainDefParseXML (domain_conf.c:10188)
|
||||
==5414== by 0x4CD8C73: virDomainDefParseNode (domain_conf.c:10640)
|
||||
==5414== by 0x4CD8DDB: virDomainDefParse (domain_conf.c:10590)
|
||||
==5414== by 0x41CB1D: testCompareXMLToArgvHelper (qemuxml2argvtest.c:100)
|
||||
==5414== by 0x41E20F: virtTestRun (testutils.c:161)
|
||||
==5414== by 0x41C7CB: mymain (qemuxml2argvtest.c:866)
|
||||
==5414== by 0x41E84A: virtTestMain (testutils.c:723)
|
||||
==5414== by 0x34D9021734: (below main) (in /usr/lib64/libc-2.15.so)
|
||||
|
||||
In this example, the ``virDomainDefParseXML()`` had an error
|
||||
path where the ``virDomainVideoDefPtr video`` pointer was not
|
||||
properly disposed. By simply adding a
|
||||
``virDomainVideoDefFree(video);`` in the error path, the issue
|
||||
was resolved.
|
||||
|
||||
Another common mistake is calling a printing function, such as
|
||||
``VIR_DEBUG()`` without initializing a variable to be printed.
|
||||
The following example involved a call which could return an
|
||||
error, but not set variables passed by reference to the call.
|
||||
The solution was to initialize the variables prior to the call.
|
||||
|
||||
::
|
||||
|
||||
==4749== Use of uninitialised value of size 8
|
||||
==4749== at 0x34D904650B: _itoa_word (in /usr/lib64/libc-2.15.so)
|
||||
==4749== by 0x34D9049118: vfprintf (in /usr/lib64/libc-2.15.so)
|
||||
==4749== by 0x34D9108F60: __vasprintf_chk (in /usr/lib64/libc-2.15.so)
|
||||
==4749== by 0x4CAEEF7: virVasprintf (stdio2.h:199)
|
||||
==4749== by 0x4C8A55E: virLogVMessage (virlog.c:814)
|
||||
==4749== by 0x4C8AA96: virLogMessage (virlog.c:751)
|
||||
==4749== by 0x4DA0056: virNetTLSContextCheckCertKeyUsage (virnettlscontext.c:225)
|
||||
==4749== by 0x4DA06DB: virNetTLSContextCheckCert (virnettlscontext.c:439)
|
||||
==4749== by 0x4DA1620: virNetTLSContextNew (virnettlscontext.c:562)
|
||||
==4749== by 0x4DA26FC: virNetTLSContextNewServer (virnettlscontext.c:927)
|
||||
==4749== by 0x409C39: testTLSContextInit (virnettlscontexttest.c:467)
|
||||
==4749== by 0x40AB8F: virtTestRun (testutils.c:161)
|
||||
|
||||
Valgrind will also find some false positives or code paths
|
||||
which cannot be resolved by making changes to the libvirt code.
|
||||
For these paths, it is possible to add a filter to avoid the
|
||||
errors. For example:
|
||||
|
||||
::
|
||||
|
||||
==4643== 7 bytes in 1 blocks are possibly lost in loss record 4 of 20
|
||||
==4643== at 0x4A0881C: malloc (vg_replace_malloc.c:270)
|
||||
==4643== by 0x34D90853F1: strdup (in /usr/lib64/libc-2.15.so)
|
||||
==4643== by 0x34EEC2C08A: ??? (in /usr/lib64/libnl.so.1.1)
|
||||
==4643== by 0x34EEC15B81: ??? (in /usr/lib64/libnl.so.1.1)
|
||||
==4643== by 0x34D8C0EE15: call_init.part.0 (in /usr/lib64/ld-2.15.so)
|
||||
==4643== by 0x34D8C0EECF: _dl_init (in /usr/lib64/ld-2.15.so)
|
||||
==4643== by 0x34D8C01569: ??? (in /usr/lib64/ld-2.15.so)
|
||||
|
||||
In this instance, it is acceptable to modify the
|
||||
``tests/.valgrind.supp`` file in order to add a suppression
|
||||
filter. The filter should be unique enough to not suppress real
|
||||
leaks, but it should be generic enough to cover multiple code
|
||||
paths. The format of the entry can be found in the
|
||||
documentation found at the `Valgrind home
|
||||
page <https://valgrind.org/>`__. The following trace was added
|
||||
to ``tests/.valgrind.supp`` in order to suppress the warning:
|
||||
|
||||
::
|
||||
|
||||
{
|
||||
dlInitMemoryLeak1
|
||||
Memcheck:Leak
|
||||
fun:?alloc
|
||||
...
|
||||
fun:call_init.part.0
|
||||
fun:_dl_init
|
||||
...
|
||||
obj:*/lib*/ld-2.*so*
|
||||
}
|
380
docs/api.html.in
Normal file
380
docs/api.html.in
Normal file
@@ -0,0 +1,380 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<body>
|
||||
<h1>The libvirt API concepts</h1>
|
||||
|
||||
<p> This page describes the main principles and architecture choices
|
||||
behind the definition of the libvirt API:</p>
|
||||
|
||||
<ul id="toc"></ul>
|
||||
|
||||
<h2><a id="Objects">Objects Exposed</a></h2>
|
||||
<p> As defined in the <a href="goals.html">goals section</a>, the libvirt
|
||||
API is designed to expose all the resources needed to manage the
|
||||
virtualization support of recent operating systems. The first object
|
||||
manipulated through the API is the <code>virConnectPtr</code>, which
|
||||
represents the connection to a hypervisor. Any application using libvirt
|
||||
is likely to start using the
|
||||
API by calling one of <a href="html/libvirt-libvirt-host.html#virConnectOpen"
|
||||
>the virConnectOpen functions</a>. You will note that those functions take
|
||||
a name argument which is actually a <a href="uri.html">connection URI</a>
|
||||
to select the right hypervisor to open.
|
||||
A URI is needed to allow remote connections and also select between
|
||||
different possible hypervisors. For example, on a Linux system it may be
|
||||
possible to use both KVM and LinuxContainers on the same node. A NULL
|
||||
name will default to a preselected hypervisor, but it's probably not a
|
||||
wise thing to do in most cases. See the <a href="uri.html">connection
|
||||
URI</a> page for a full descriptions of the values allowed.</p>
|
||||
<p> OnDevice the application obtains a
|
||||
<a href="/html/libvirt-libvirt-host.html#virConnectPtr">
|
||||
<code>virConnectPtr</code>
|
||||
</a>
|
||||
connection to the hypervisor it can then use it to manage the hypervisor's
|
||||
available domains and related virtualization
|
||||
resources, such as storage and networking. All those are
|
||||
exposed as first class objects and connected to the hypervisor connection
|
||||
(and the node or cluster where it is available).</p>
|
||||
<p class="image">
|
||||
<img alt="first class objects exposed by the API"
|
||||
src="libvirt-object-model.png"/>
|
||||
</p>
|
||||
<p> The figure above shows the five main objects exported by the API:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-host.html#virConnectPtr">
|
||||
<code>virConnectPtr</code>
|
||||
</a>
|
||||
<p>Represents the connection to a hypervisor. Use one of the
|
||||
<a href="html/libvirt-libvirt-host.html#virConnectOpen">virConnectOpen</a>
|
||||
functions to obtain connection to the hypervisor which is then used
|
||||
as a parameter to other connection API's.</p></li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-domain.html#virDomainPtr">
|
||||
<code>virDomainPtr</code>
|
||||
</a>
|
||||
<p>Represents one domain either active or defined (i.e. existing as
|
||||
permanent config file and storage but not currently running on that
|
||||
node). The function
|
||||
<a href="html/libvirt-libvirt-domain.html#virConnectListAllDomains">
|
||||
<code>virConnectListAllDomains</code>
|
||||
</a>
|
||||
lists all the domains for the hypervisor.</p></li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-network.html#virNetworkPtr">
|
||||
<code>virNetworkPtr</code>
|
||||
</a>
|
||||
<p>Represents one network either active or defined (i.e. existing
|
||||
as permanent config file and storage but not currently activated).
|
||||
The function
|
||||
<a href="html/libvirt-libvirt-network.html#virConnectListAllNetworks">
|
||||
<code>virConnectListAllNetworks</code>
|
||||
</a>
|
||||
lists all the virtualization networks for the hypervisor.</p></li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-storage.html#virStorageVolPtr">
|
||||
<code>virStorageVolPtr</code>
|
||||
</a>
|
||||
<p>Represents one storage volume generally used
|
||||
as a block device available to one of the domains. The function
|
||||
<a href="html/libvirt-libvirt-storage.html#virStorageVolLookupByPath">
|
||||
<code>virStorageVolLookupByPath</code>
|
||||
</a>
|
||||
finds the storage volume object based on its path on the node.</p></li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-storage.html#virStoragePoolPtr">
|
||||
<code>virStoragePoolPtr</code>
|
||||
</a>
|
||||
<p>Represents a storage pool, which is a logical area
|
||||
used to allocate and store storage volumes. The function
|
||||
<a href="html/libvirt-libvirt-storage.html#virConnectListAllStoragePools">
|
||||
<code>virConnectListAllStoragePools</code>
|
||||
</a>
|
||||
lists all of the virtualization storage pools on the hypervisor.
|
||||
The function
|
||||
<a href="html/libvirt-libvirt-storage.html#virStoragePoolLookupByVolume">
|
||||
<code>virStoragePoolLookupByVolume</code>
|
||||
</a>
|
||||
finds the storage pool containing a given storage volume.</p></li>
|
||||
</ul>
|
||||
<p> Most objects manipulated by the library can also be represented using
|
||||
XML descriptions. This is used primarily to create those object, but is
|
||||
also helpful to modify or save their description back.</p>
|
||||
<p> Domains, networks, and storage pools can be either <code>active</code>
|
||||
i.e. either running or available for immediate use, or
|
||||
<code>defined</code> in which case they are inactive but there is
|
||||
a permanent definition available in the system for them. Based on this
|
||||
they can be activated dynamically in order to be used.</p>
|
||||
<p> Most objects can also be named in various ways:</p>
|
||||
<ul>
|
||||
<li><code>name</code>
|
||||
<p>A user friendly identifier but whose uniqueness
|
||||
cannot be guaranteed between two nodes.</p></li>
|
||||
<li><code>ID</code>
|
||||
<p>A runtime unique identifier
|
||||
provided by the hypervisor for one given activation of the object;
|
||||
however, it becomes invalid once the resource is deactivated.</p></li >
|
||||
<li><code>UUID</code>
|
||||
<p> A 16 byte unique identifier
|
||||
as defined in <a href="http://www.ietf.org/rfc/rfc4122.txt">RFC 4122</a>,
|
||||
which is guaranteed to be unique for long term usage and across a
|
||||
set of nodes.</p></li>
|
||||
</ul>
|
||||
|
||||
<h2><a id="Functions">Functions and Naming Conventions</a></h2>
|
||||
<p> The naming of the functions present in the library is usually
|
||||
composed by a prefix describing the object associated to the function
|
||||
and a verb describing the action on that object.</p>
|
||||
<p> For each first class object you will find APIs
|
||||
for the following actions:</p>
|
||||
<ul>
|
||||
<li><b>Lookup</b> [...LookupBy...]
|
||||
<p>Used to perform lookups on objects by some type of identifier,
|
||||
such as:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-domain.html#virDomainLookupByID">
|
||||
<code>virDomainLookupByID</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-domain.html#virDomainLookupByName">
|
||||
<code>virDomainLookupByName</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-domain.html#virDomainLookupByUUID">
|
||||
<code>virDomainLookupByUUID</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-domain.html#virDomainLookupByUUIDString">
|
||||
<code>virDomainLookupByUUIDString</code>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Enumeration</b> [virConnectList..., virConnectNumOf...]
|
||||
<p>Used to enumerate a set of object available to an given
|
||||
hypervisor connection such as:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-domain.html#virConnectListDomains">
|
||||
<code>virConnectListDomains</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-domain.html#virConnectNumOfDomains">
|
||||
<code>virConnectNumOfDomains</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-network.html#virConnectListNetworks">
|
||||
<code>virConnectListNetworks</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-storage.html#virConnectListStoragePools">
|
||||
<code>virConnectListStoragePools</code>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Description</b> [...GetInfo]
|
||||
<p>Generic accessor providing a set of generic information about an
|
||||
object, such as: </p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-host.html#virNodeGetInfo">
|
||||
<code>virNodeGetInfo</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-domain.html#virDomainGetInfo">
|
||||
<code>virDomainGetInfo</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-storage.html#virStoragePoolGetInfo">
|
||||
<code>virStoragePoolGetInfo</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-storage.html#virStorageVolGetInfo">
|
||||
<code>virStorageVolGetInfo</code>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Accessors</b> [...Get..., ...Set...]
|
||||
<p>Specific accessors used to query or modify data for the given object,
|
||||
such as: </p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-host.html#virConnectGetType">
|
||||
<code>virConnectGetType</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-domain.html#virDomainGetMaxMemory">
|
||||
<code>virDomainGetMaxMemory</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-domain.html#virDomainSetMemory">
|
||||
<code>virDomainSetMemory</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-domain.html#virDomainGetVcpus">
|
||||
<code>virDomainGetVcpus</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-storage.html#virStoragePoolSetAutostart">
|
||||
<code>virStoragePoolSetAutostart</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-network.html#virNetworkGetBridgeName">
|
||||
<code>virNetworkGetBridgeName</code>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Creation</b> [...Create, ...CreateXML]
|
||||
<p>Used to create and start objects. The ...CreateXML APIs will create
|
||||
the object based on an XML description, while the ...Create APIs will
|
||||
create the object based on existing object pointer, such as: </p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-domain.html#virDomainCreate">
|
||||
<code>virDomainCreate</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-domain.html#virDomainCreateXML">
|
||||
<code>virDomainCreateXML</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-network.html#virNetworkCreate">
|
||||
<code>virNetworkCreate</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-network.html#virNetworkCreateXML">
|
||||
<code>virNetworkCreateXML</code>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Destruction</b> [...Destroy]
|
||||
<p>Used to shutdown or deactivate and destroy objects, such as: </p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-domain.html#virDomainDestroy">
|
||||
<code>virDomainDestroy</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-network.html#virNetworkDestroy">
|
||||
<code>virNetworkDestroy</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="html/libvirt-libvirt-storage.html#virStoragePoolDestroy">
|
||||
<code>virStoragePoolDestroy</code>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Note: functions returning vir*Ptr (like the virDomainLookup functions)
|
||||
allocate memory which needs to be freed by the caller by the corresponding
|
||||
vir*Free function (e.g. virDomainFree for a virDomainPtr object).
|
||||
</p>
|
||||
<p> For more in-depth details of the storage related APIs see
|
||||
<a href="storage.html">the storage management page</a>.
|
||||
</p>
|
||||
<h2><a id="Drivers">The libvirt Drivers</a></h2>
|
||||
<p>Drivers are the basic building block for libvirt functionality
|
||||
to support the capability to handle specific hypervisor driver calls.
|
||||
Drivers are discovered and registered during connection processing as
|
||||
part of the
|
||||
<a href="html/libvirt-libvirt-host.html#virInitialize">
|
||||
<code>virInitialize</code>
|
||||
</a>
|
||||
API. Each driver
|
||||
has a registration API which loads up the driver specific function
|
||||
references for the libvirt APIs to call. The following is a simplistic
|
||||
view of the hypervisor driver mechanism. Consider the stacked list of
|
||||
drivers as a series of modules that can be plugged into the architecture
|
||||
depending on how libvirt is configured to be built.</p>
|
||||
<p class="image">
|
||||
<img alt="The libvirt driver architecture"
|
||||
src="libvirt-driver-arch.png"/>
|
||||
</p>
|
||||
<p>The driver architecture is also used to support other virtualization
|
||||
components such as storage, storage pools, host device, networking,
|
||||
network interfaces, and network filters.</p>
|
||||
<p>See the <a href="drivers.html">libvirt drivers</a> page for more
|
||||
information on hypervisor and storage specific drivers.</p>
|
||||
<p>Not all drivers support every virtualization function possible.
|
||||
The <a href="hvsupport.html">libvirt API support matrix</a> lists
|
||||
the various functions and support found in each driver by the version
|
||||
support was added into libvirt.
|
||||
</p>
|
||||
<h2><a id="Remote">Daemon and Remote Access</a></h2>
|
||||
<p>Access to libvirt drivers is primarily handled by the libvirtd
|
||||
daemon through the <a href="remote.html">remote</a> driver via an
|
||||
<a href="internals/rpc.html">RPC</a>. Some hypervisors do support
|
||||
client-side connections and responses, such as Test, OpenVZ, VMware,
|
||||
Power VM (phyp), VirtualBox (vbox), ESX, Hyper-V, Xen, and Virtuozzo.
|
||||
The libvirtd daemon service is started on the host at system boot
|
||||
time and can also be restarted at any time by a properly privileged
|
||||
user, such as root. The libvirtd daemon uses the same libvirt API
|
||||
<a href="html/libvirt-libvirt-host.html#virInitialize">
|
||||
<code>virInitialize</code>
|
||||
</a>
|
||||
sequence as applications
|
||||
for client-side driver registrations, but then extends the registered
|
||||
driver list to encompass all known drivers supported for all driver
|
||||
types supported on the host. </p>
|
||||
<p>The libvirt client <a href="apps.html">applications</a> use a
|
||||
<a href="uri.html">URI</a> to obtain the <code>virConnectPtr</code>.
|
||||
The <code>virConnectPtr</code> keeps track of the driver connection
|
||||
plus a variety of other connections (network, interface, storage, etc.).
|
||||
The <code>virConnectPtr</code> is then used as a parameter to other
|
||||
virtualization <a href="#Functions">functions</a>. Depending upon the
|
||||
driver being used, calls will be routed through the remote driver to
|
||||
the libvirtd daemon. The daemon will reference the connection specific
|
||||
driver in order to retrieve the requested information and then pass
|
||||
back status and/or data through the connection back to the application.
|
||||
The application can then decide what to do with that data, such as
|
||||
display, write log data, etc. <a href="migration.html">Migration</a>
|
||||
is an example of many facets of the architecture in use.</p>
|
||||
|
||||
<p class="image">
|
||||
<img alt="The libvirt daemon and remote architecture"
|
||||
src="libvirt-daemon-arch.png"/>
|
||||
</p>
|
||||
<p>
|
||||
The key takeaway from the above diagram is that there is a remote driver
|
||||
which handles transactions for a majority of the drivers. The libvirtd
|
||||
daemon running on the host will receive transaction requests from the
|
||||
remote driver and will then query the hypervisor driver as specified in
|
||||
the <code>virConnectPtr</code> in order to fetch the data. The data will
|
||||
then be returned through the remote driver to the client application
|
||||
for processing.
|
||||
</p>
|
||||
<p>If you are interested in contributing to libvirt, read the
|
||||
<a href="http://wiki.libvirt.org/page/FAQ">FAQ</a> and
|
||||
<a href="hacking.html">hacking</a> guidelines to gain an understanding
|
||||
of basic rules and guidelines. In order to add new API functionality
|
||||
follow the instructions regarding
|
||||
<a href="api_extension.html">implementing a new API in libvirt</a>.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
265
docs/api.rst
265
docs/api.rst
@@ -1,265 +0,0 @@
|
||||
========================
|
||||
The libvirt API concepts
|
||||
========================
|
||||
|
||||
This page describes the main principles and architecture choices behind
|
||||
the definition of the libvirt API:
|
||||
|
||||
.. contents::
|
||||
|
||||
Objects Exposed
|
||||
---------------
|
||||
|
||||
As defined in the `goals section <goals.html>`__, the libvirt API is
|
||||
designed to expose all the resources needed to manage the virtualization
|
||||
support of recent operating systems. The first object manipulated
|
||||
through the API is the ``virConnectPtr``, which represents the
|
||||
connection to a hypervisor. Any application using libvirt is likely to
|
||||
start using the API by calling one of `the virConnectOpen
|
||||
functions <html/libvirt-libvirt-host.html#virConnectOpen>`__. You will
|
||||
note that those functions take a name argument which is actually a
|
||||
`connection URI <uri.html>`__ to select the right hypervisor to open. A
|
||||
URI is needed to allow remote connections and also select between
|
||||
different possible hypervisors. For example, on a Linux system it may be
|
||||
possible to use both KVM and LinuxContainers on the same node. A NULL
|
||||
name will default to a preselected hypervisor, but it's probably not a
|
||||
wise thing to do in most cases. See the `connection URI <uri.html>`__
|
||||
page for a full descriptions of the values allowed.
|
||||
|
||||
OnDevice the application obtains a
|
||||
`virConnectPtr </html/libvirt-libvirt-host.html#virConnectPtr>`__
|
||||
connection to the hypervisor it can then use it to manage the
|
||||
hypervisor's available domains and related virtualization resources,
|
||||
such as storage and networking. All those are exposed as first class
|
||||
objects and connected to the hypervisor connection (and the node or
|
||||
cluster where it is available).
|
||||
|
||||
|first class objects exposed by the API|
|
||||
|
||||
The figure above shows the five main objects exported by the API:
|
||||
|
||||
- `virConnectPtr <html/libvirt-libvirt-host.html#virConnectPtr>`__
|
||||
|
||||
Represents the connection to a hypervisor. Use one of the
|
||||
`virConnectOpen <html/libvirt-libvirt-host.html#virConnectOpen>`__
|
||||
functions to obtain connection to the hypervisor which is then used
|
||||
as a parameter to other connection API's.
|
||||
|
||||
- `virDomainPtr <html/libvirt-libvirt-domain.html#virDomainPtr>`__
|
||||
|
||||
Represents one domain either active or defined (i.e. existing as
|
||||
permanent config file and storage but not currently running on that
|
||||
node). The function
|
||||
`virConnectListAllDomains <html/libvirt-libvirt-domain.html#virConnectListAllDomains>`__
|
||||
lists all the domains for the hypervisor.
|
||||
|
||||
- `virNetworkPtr <html/libvirt-libvirt-network.html#virNetworkPtr>`__
|
||||
|
||||
Represents one network either active or defined (i.e. existing as
|
||||
permanent config file and storage but not currently activated). The
|
||||
function
|
||||
`virConnectListAllNetworks <html/libvirt-libvirt-network.html#virConnectListAllNetworks>`__
|
||||
lists all the virtualization networks for the hypervisor.
|
||||
|
||||
- `virStorageVolPtr <html/libvirt-libvirt-storage.html#virStorageVolPtr>`__
|
||||
|
||||
Represents one storage volume generally used as a block device
|
||||
available to one of the domains. The function
|
||||
`virStorageVolLookupByPath <html/libvirt-libvirt-storage.html#virStorageVolLookupByPath>`__
|
||||
finds the storage volume object based on its path on the node.
|
||||
|
||||
- `virStoragePoolPtr <html/libvirt-libvirt-storage.html#virStoragePoolPtr>`__
|
||||
|
||||
Represents a storage pool, which is a logical area used to allocate
|
||||
and store storage volumes. The function
|
||||
`virConnectListAllStoragePools <html/libvirt-libvirt-storage.html#virConnectListAllStoragePools>`__
|
||||
lists all of the virtualization storage pools on the hypervisor. The
|
||||
function
|
||||
`virStoragePoolLookupByVolume <html/libvirt-libvirt-storage.html#virStoragePoolLookupByVolume>`__
|
||||
finds the storage pool containing a given storage volume.
|
||||
|
||||
Most objects manipulated by the library can also be represented using
|
||||
XML descriptions. This is used primarily to create those object, but is
|
||||
also helpful to modify or save their description back.
|
||||
|
||||
Domains, networks, and storage pools can be either ``active`` i.e.
|
||||
either running or available for immediate use, or ``defined`` in which
|
||||
case they are inactive but there is a permanent definition available in
|
||||
the system for them. Based on this they can be activated dynamically in
|
||||
order to be used.
|
||||
|
||||
Most objects can also be named in various ways:
|
||||
|
||||
- ``name``
|
||||
|
||||
A user friendly identifier but whose uniqueness cannot be guaranteed
|
||||
between two nodes.
|
||||
|
||||
- ``ID``
|
||||
|
||||
A runtime unique identifier provided by the hypervisor for one given
|
||||
activation of the object; however, it becomes invalid once the
|
||||
resource is deactivated.
|
||||
|
||||
- ``UUID``
|
||||
|
||||
A 16 byte unique identifier as defined in `RFC
|
||||
4122 <https://www.ietf.org/rfc/rfc4122.txt>`__, which is guaranteed
|
||||
to be unique for long term usage and across a set of nodes.
|
||||
|
||||
Functions and Naming Conventions
|
||||
--------------------------------
|
||||
|
||||
The naming of the functions present in the library is usually composed
|
||||
by a prefix describing the object associated to the function and a verb
|
||||
describing the action on that object.
|
||||
|
||||
For each first class object you will find APIs for the following
|
||||
actions:
|
||||
|
||||
- **Lookup** [...LookupBy...]
|
||||
|
||||
Used to perform lookups on objects by some type of identifier, such
|
||||
as:
|
||||
|
||||
- `virDomainLookupByID <html/libvirt-libvirt-domain.html#virDomainLookupByID>`__
|
||||
- `virDomainLookupByName <html/libvirt-libvirt-domain.html#virDomainLookupByName>`__
|
||||
- `virDomainLookupByUUID <html/libvirt-libvirt-domain.html#virDomainLookupByUUID>`__
|
||||
- `virDomainLookupByUUIDString <html/libvirt-libvirt-domain.html#virDomainLookupByUUIDString>`__
|
||||
|
||||
- **Enumeration** [virConnectList..., virConnectNumOf...]
|
||||
|
||||
Used to enumerate a set of object available to a given hypervisor
|
||||
connection such as:
|
||||
|
||||
- `virConnectListDomains <html/libvirt-libvirt-domain.html#virConnectListDomains>`__
|
||||
- `virConnectNumOfDomains <html/libvirt-libvirt-domain.html#virConnectNumOfDomains>`__
|
||||
- `virConnectListNetworks <html/libvirt-libvirt-network.html#virConnectListNetworks>`__
|
||||
- `virConnectListStoragePools <html/libvirt-libvirt-storage.html#virConnectListStoragePools>`__
|
||||
|
||||
- **Description** [...GetInfo]
|
||||
|
||||
Generic accessor providing a set of generic information about an
|
||||
object, such as:
|
||||
|
||||
- `virNodeGetInfo <html/libvirt-libvirt-host.html#virNodeGetInfo>`__
|
||||
- `virDomainGetInfo <html/libvirt-libvirt-domain.html#virDomainGetInfo>`__
|
||||
- `virStoragePoolGetInfo <html/libvirt-libvirt-storage.html#virStoragePoolGetInfo>`__
|
||||
- `virStorageVolGetInfo <html/libvirt-libvirt-storage.html#virStorageVolGetInfo>`__
|
||||
|
||||
- **Accessors** [...Get..., ...Set...]
|
||||
|
||||
Specific accessors used to query or modify data for the given object,
|
||||
such as:
|
||||
|
||||
- `virConnectGetType <html/libvirt-libvirt-host.html#virConnectGetType>`__
|
||||
- `virDomainGetMaxMemory <html/libvirt-libvirt-domain.html#virDomainGetMaxMemory>`__
|
||||
- `virDomainSetMemory <html/libvirt-libvirt-domain.html#virDomainSetMemory>`__
|
||||
- `virDomainGetVcpus <html/libvirt-libvirt-domain.html#virDomainGetVcpus>`__
|
||||
- `virStoragePoolSetAutostart <html/libvirt-libvirt-storage.html#virStoragePoolSetAutostart>`__
|
||||
- `virNetworkGetBridgeName <html/libvirt-libvirt-network.html#virNetworkGetBridgeName>`__
|
||||
|
||||
- **Creation** [...Create, ...CreateXML]
|
||||
|
||||
Used to create and start objects. The ...CreateXML APIs will create
|
||||
the object based on an XML description, while the ...Create APIs will
|
||||
create the object based on existing object pointer, such as:
|
||||
|
||||
- `virDomainCreate <html/libvirt-libvirt-domain.html#virDomainCreate>`__
|
||||
- `virDomainCreateXML <html/libvirt-libvirt-domain.html#virDomainCreateXML>`__
|
||||
- `virNetworkCreate <html/libvirt-libvirt-network.html#virNetworkCreate>`__
|
||||
- `virNetworkCreateXML <html/libvirt-libvirt-network.html#virNetworkCreateXML>`__
|
||||
|
||||
- **Destruction** [...Destroy]
|
||||
|
||||
Used to shutdown or deactivate and destroy objects, such as:
|
||||
|
||||
- `virDomainDestroy <html/libvirt-libvirt-domain.html#virDomainDestroy>`__
|
||||
- `virNetworkDestroy <html/libvirt-libvirt-network.html#virNetworkDestroy>`__
|
||||
- `virStoragePoolDestroy <html/libvirt-libvirt-storage.html#virStoragePoolDestroy>`__
|
||||
|
||||
Note: functions returning vir*Ptr (like the virDomainLookup functions)
|
||||
allocate memory which needs to be freed by the caller by the
|
||||
corresponding vir*Free function (e.g. virDomainFree for a virDomainPtr
|
||||
object).
|
||||
|
||||
For more in-depth details of the storage related APIs see `the storage
|
||||
management page <storage.html>`__.
|
||||
|
||||
The libvirt Drivers
|
||||
-------------------
|
||||
|
||||
Drivers are the basic building block for libvirt functionality to
|
||||
support the capability to handle specific hypervisor driver calls.
|
||||
Drivers are discovered and registered during connection processing as
|
||||
part of the
|
||||
`virInitialize <html/libvirt-libvirt-host.html#virInitialize>`__
|
||||
API. Each driver has a registration API which loads up the driver
|
||||
specific function references for the libvirt APIs to call. The following
|
||||
is a simplistic view of the hypervisor driver mechanism. Consider the
|
||||
stacked list of drivers as a series of modules that can be plugged into
|
||||
the architecture depending on how libvirt is configured to be built.
|
||||
|
||||
|The libvirt driver architecture|
|
||||
|
||||
The driver architecture is also used to support other virtualization
|
||||
components such as storage, storage pools, host device, networking,
|
||||
network interfaces, and network filters.
|
||||
|
||||
See the `libvirt drivers <drivers.html>`__ page for more information on
|
||||
hypervisor and storage specific drivers.
|
||||
|
||||
Not all drivers support every virtualization function possible. The
|
||||
`libvirt API support matrix <hvsupport.html>`__ lists the various
|
||||
functions and support found in each driver by the version support was
|
||||
added into libvirt.
|
||||
|
||||
Daemon and Remote Access
|
||||
------------------------
|
||||
|
||||
Access to libvirt drivers is primarily handled by the libvirtd daemon
|
||||
through the `remote <remote.html>`__ driver via an
|
||||
`RPC <internals/rpc.html>`__. Some hypervisors do support client-side
|
||||
connections and responses, such as Test, OpenVZ, VMware, VirtualBox
|
||||
(vbox), ESX, Hyper-V, Xen, and Virtuozzo. The libvirtd daemon service is
|
||||
started on the host at system boot time and can also be restarted at any
|
||||
time by a properly privileged user, such as root. The libvirtd daemon
|
||||
uses the same libvirt API
|
||||
`virInitialize <html/libvirt-libvirt-host.html#virInitialize>`__
|
||||
sequence as applications for client-side driver registrations, but then
|
||||
extends the registered driver list to encompass all known drivers
|
||||
supported for all driver types supported on the host.
|
||||
|
||||
The libvirt client `applications <apps.html>`__ use a `URI <uri.html>`__
|
||||
to obtain the ``virConnectPtr``. The ``virConnectPtr`` keeps track of
|
||||
the driver connection plus a variety of other connections (network,
|
||||
interface, storage, etc.). The ``virConnectPtr`` is then used as a
|
||||
parameter to other virtualization `functions <#Functions>`__. Depending
|
||||
upon the driver being used, calls will be routed through the remote
|
||||
driver to the libvirtd daemon. The daemon will reference the connection
|
||||
specific driver in order to retrieve the requested information and then
|
||||
pass back status and/or data through the connection back to the
|
||||
application. The application can then decide what to do with that data,
|
||||
such as display, write log data, etc. `Migration <migration.html>`__ is
|
||||
an example of many facets of the architecture in use.
|
||||
|
||||
|The libvirt daemon and remote architecture|
|
||||
|
||||
The key takeaway from the above diagram is that there is a remote driver
|
||||
which handles transactions for a majority of the drivers. The libvirtd
|
||||
daemon running on the host will receive transaction requests from the
|
||||
remote driver and will then query the hypervisor driver as specified in
|
||||
the ``virConnectPtr`` in order to fetch the data. The data will then be
|
||||
returned through the remote driver to the client application for
|
||||
processing.
|
||||
|
||||
If you are interested in contributing to libvirt, read the
|
||||
`FAQ <https://wiki.libvirt.org/page/FAQ>`__ and
|
||||
`hacking <hacking.html>`__ guidelines to gain an understanding of basic
|
||||
rules and guidelines. In order to add new API functionality follow the
|
||||
instructions regarding `implementing a new API in
|
||||
libvirt <api_extension.html>`__.
|
||||
|
||||
.. |first class objects exposed by the API| image:: libvirt-object-model.png
|
||||
.. |The libvirt driver architecture| image:: libvirt-driver-arch.png
|
||||
.. |The libvirt daemon and remote architecture| image:: libvirt-daemon-arch.png
|
432
docs/api_extension.html.in
Normal file
432
docs/api_extension.html.in
Normal file
@@ -0,0 +1,432 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<body>
|
||||
<h1>Implementing a new API in Libvirt</h1>
|
||||
|
||||
<ul id="toc"></ul>
|
||||
|
||||
<p>
|
||||
This document walks you through the process of implementing a new
|
||||
API in libvirt. It uses as an example the addition of an API for
|
||||
separating maximum from current vcpu usage of a domain, over
|
||||
the course of a fifteen-patch series.
|
||||
Remember that new API consists of any new public functions, as
|
||||
well as the addition of flags or extensions of XML used by
|
||||
existing functions. The example in this document adds both new
|
||||
functions and an XML extension. Not all libvirt API additions
|
||||
require quite as many patches.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Before you begin coding, it is critical that you propose your
|
||||
changes on the libvirt mailing list and get feedback on your ideas to
|
||||
make sure what you're proposing fits with the general direction of the
|
||||
project. Even before doing a proof of concept implementation, send an
|
||||
email giving an overview of the functionality you think should be
|
||||
added to libvirt. Someone may already be working on the feature you
|
||||
want. Also, recognize that everything you write is likely to undergo
|
||||
significant rework as you discuss it with the other developers, so
|
||||
don't wait too long before getting feedback. In the vcpu example
|
||||
below, list feedback was first requested
|
||||
<a href="https://www.redhat.com/archives/libvir-list/2010-September/msg00423.html">here</a>
|
||||
and resulted in several rounds of improvements before coding
|
||||
began. In turn, this example is slightly rearranged from the actual
|
||||
order of the commits.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Adding a new API to libvirt is not difficult, but there are quite a
|
||||
few steps. This document assumes that you are familiar with C
|
||||
programming and have checked out the libvirt code from the source code
|
||||
repository and successfully built the existing tree. Instructions on
|
||||
how to check out and build the code can be found at:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://libvirt.org/downloads.html">https://libvirt.org/downloads.html</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Once you have a working development environment, the steps to create a
|
||||
new API are:
|
||||
</p>
|
||||
<ol>
|
||||
<li>define the public API</li>
|
||||
<li>define the internal driver API</li>
|
||||
<li>implement the public API</li>
|
||||
<li>implement the remote protocol:
|
||||
<ol>
|
||||
<li>define the wire protocol format</li>
|
||||
<li>implement the RPC client</li>
|
||||
<li>implement the server side dispatcher</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>use new API where appropriate in drivers</li>
|
||||
<li>add virsh support</li>
|
||||
<li>add common handling for new API</li>
|
||||
<li>for each driver that can support the new API:
|
||||
<ol>
|
||||
<li>add prerequisite support</li>
|
||||
<li>fully implement new API</li>
|
||||
</ol>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
It is, of course, possible to implement the pieces in any order, but
|
||||
if the development tasks are completed in the order listed, the code
|
||||
will compile after each step. Given the number of changes required,
|
||||
verification after each step is highly recommended.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Submit new code in the form shown in the example code: one patch
|
||||
per step. That's not to say submit patches before you have working
|
||||
functionality--get the whole thing working and make sure you're happy
|
||||
with it. Then use git or some other version control system that lets
|
||||
you rewrite your commit history and break patches into pieces so you
|
||||
don't drop a big blob of code on the mailing list in one go.
|
||||
Also, you should follow the upstream tree, and rebase your
|
||||
series to adapt your patches to work with any other changes
|
||||
that were accepted upstream during your development.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Don't mix anything else into the patches you submit. The patches
|
||||
should be the minimal changes required to implement the functionality
|
||||
you're adding. If you notice a bug in unrelated code (i.e., code you
|
||||
don't have to touch to implement your API change) during development,
|
||||
create a patch that just addresses that bug and submit it
|
||||
separately.
|
||||
</p>
|
||||
|
||||
<p>With that said, let's begin.</p>
|
||||
|
||||
<h2><a name='publicapi'>Defining the public API</a></h2>
|
||||
|
||||
<p>The first task is to define the public API. If the new API
|
||||
involves an XML extension, you have to enhance the RelaxNG
|
||||
schema and document the new elements or attributes:</p>
|
||||
|
||||
<p><code>
|
||||
docs/schemas/domain.rng<br/>
|
||||
docs/formatdomain.html.in
|
||||
</code></p>
|
||||
|
||||
<p>If the API extension involves a new function, you have to add a
|
||||
declaration in the public header, and arrange to export the
|
||||
function name (symbol) so other programs can link against the
|
||||
libvirt library and call the new function:</p>
|
||||
|
||||
<p><code>
|
||||
include/libvirt/libvirt.h.in
|
||||
src/libvirt_public.syms
|
||||
</code></p>
|
||||
|
||||
<p>
|
||||
This task is in many ways the most important to get right, since once
|
||||
the API has been committed to the repository, it's libvirt's policy
|
||||
never to change it. Mistakes in the implementation are bugs that you
|
||||
can fix. Make a mistake in the API definition and you're stuck with
|
||||
it, so think carefully about the interface and don't be afraid to
|
||||
rework it as you go through the process of implementing it.
|
||||
</p>
|
||||
|
||||
<p class="example">See <a href="api_extension/0001-add-to-xml.patch">0001-add-to-xml.patch</a>
|
||||
and <a href="api_extension/0002-add-new-public-API.patch">0002-add-new-public-API.patch</a>
|
||||
for example code.</p>
|
||||
|
||||
<h2><a name='internalapi'>Defining the internal API</a></h2>
|
||||
|
||||
<p>
|
||||
Each public API call is associated with a driver, such as a host
|
||||
virtualization driver, a network virtualization driver, a storage
|
||||
virtualization driver, a state driver, or a device monitor. Adding
|
||||
the internal API is ordinarily a matter of adding a new member to the
|
||||
struct representing one of these drivers.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Of course, it's possible that the new API will involve the creation of
|
||||
an entirely new driver type, in which case the changes will include the
|
||||
creation of a new struct type to represent the new driver type.
|
||||
</p>
|
||||
|
||||
<p>The driver structs are defined in:</p>
|
||||
|
||||
<p><code>src/driver.h</code></p>
|
||||
|
||||
<p>
|
||||
To define the internal API, first typedef the driver function
|
||||
prototype and then add a new field for it to the relevant driver
|
||||
struct. Then, update all existing instances of the driver to
|
||||
provide a <code>NULL</code> stub for the new function.
|
||||
</p>
|
||||
|
||||
<p class="example">See <a href="api_extension/0003-define-internal-driver-API.patch">0003-define-internal-driver-API.patch</a></p>
|
||||
|
||||
<h2><a name='implpublic'>Implementing the public API</a></h2>
|
||||
|
||||
<p>
|
||||
Implementing the public API is largely a formality in which we wire up
|
||||
public API to the internal driver API. The public API implementation
|
||||
takes care of some basic validity checks before passing control to the
|
||||
driver implementation. In RFC 2119 vocabulary, this function:
|
||||
</p>
|
||||
|
||||
<ol class="ordinarylist">
|
||||
<li>SHOULD log a message with VIR_DEBUG() indicating that it is
|
||||
being called and its parameters;</li>
|
||||
<li>MUST call virResetLastError();</li>
|
||||
<li>SHOULD confirm that the connection is valid with
|
||||
virCheckConnectReturn() or virCheckConnectGoto();</li>
|
||||
<li><strong>SECURITY: If the API requires a connection with write
|
||||
privileges, MUST confirm that the connection flags do not
|
||||
indicate that the connection is read-only with
|
||||
virCheckReadOnlyGoto();</strong></li>
|
||||
<li>SHOULD do basic validation of the parameters that are being
|
||||
passed in, using helpers like virCheckNonNullArgGoto();</li>
|
||||
<li>MUST confirm that the driver for this connection exists and that
|
||||
it implements this function;</li>
|
||||
<li>MUST call the internal API;</li>
|
||||
<li>SHOULD log a message with VIR_DEBUG() indicating that it is
|
||||
returning, its return value, and status.</li>
|
||||
<li>MUST return status to the caller.</li>
|
||||
</ol>
|
||||
|
||||
<p>The public API calls are implemented in:</p>
|
||||
|
||||
<p><code>src/libvirt.c</code></p>
|
||||
|
||||
<p class="example">See <a href="api_extension/0004-implement-the-public-APIs.patch">0004-implement-the-public-APIs.patch</a></p>
|
||||
|
||||
<h2><a name='remoteproto'>Implementing the remote protocol</a></h2>
|
||||
|
||||
<p>
|
||||
Implementing the remote protocol is essentially a
|
||||
straightforward exercise which is probably most easily
|
||||
understood by referring to the existing code and the example
|
||||
patch. It involves several related changes, including the
|
||||
regeneration of derived files, with further details below.
|
||||
</p>
|
||||
|
||||
<p class="example">See <a href="api_extension/0005-implement-the-remote-protocol.patch">0005-implement-the-remote-protocol.patch</a></p>
|
||||
|
||||
<h3><a name='wireproto'>Defining the wire protocol format</a></h3>
|
||||
|
||||
<p>
|
||||
Defining the wire protocol involves making additions to:
|
||||
</p>
|
||||
|
||||
<p><code>src/remote/remote_protocol.x</code></p>
|
||||
|
||||
<p>
|
||||
First, create two new structs for each new function that you're adding
|
||||
to the API. One struct describes the parameters to be passed to the
|
||||
remote function, and a second struct describes the value returned by
|
||||
the remote function. The one exception to this rule is that functions
|
||||
that return only 0 or -1 for status do not require a struct for returned
|
||||
data.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Second, add values to the remote_procedure enum for each new function
|
||||
added to the API.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Once these changes are in place, it's necessary to run 'make rpcgen'
|
||||
in the src directory to create the .c and .h files required by the
|
||||
remote protocol code. This must be done on a Linux host using the
|
||||
GLibC rpcgen program. Other rpcgen versions may generate code which
|
||||
results in bogus compile time warnings. This regenerates the
|
||||
following files:
|
||||
</p>
|
||||
|
||||
<p><code>
|
||||
daemon/remote_dispatch_args.h
|
||||
daemon/remote_dispatch_prototypes.h
|
||||
daemon/remote_dispatch_table.h
|
||||
src/remote/remote_protocol.c
|
||||
src/remote/remote_protocol.h
|
||||
</code></p>
|
||||
|
||||
<h3><a name='rpcclient'>Implement the RPC client</a></h3>
|
||||
|
||||
<p>
|
||||
Implementing the uses the rpcgen generated .h files. The remote
|
||||
method calls go in:
|
||||
</p>
|
||||
|
||||
<p><code>src/remote/remote_internal.c</code></p>
|
||||
|
||||
<p>Each remote method invocation does the following:</p>
|
||||
|
||||
<ol class="ordinarylist">
|
||||
<li>locks the remote driver;</li>
|
||||
<li>sets up the method arguments;</li>
|
||||
<li>invokes the remote function;</li>
|
||||
<li>checks the return value, if necessary;</li>
|
||||
<li>extracts any returned data;</li>
|
||||
<li>frees any returned data;</li>
|
||||
<li>unlocks the remote driver.</li>
|
||||
</ol>
|
||||
|
||||
<h3><a id="serverdispatch">Implement the server side dispatcher</a></h3>
|
||||
|
||||
<p>
|
||||
Implementing the server side of the remote function call is simply a
|
||||
matter of deserializing the parameters passed in from the remote
|
||||
caller and passing them to the corresponding internal API function.
|
||||
The server side dispatchers are implemented in:
|
||||
</p>
|
||||
|
||||
<p><code>daemon/remote.c</code></p>
|
||||
|
||||
<p>Again, this step uses the .h files generated by make rpcgen.</p>
|
||||
|
||||
<p>
|
||||
After all three pieces of the remote protocol are complete, and
|
||||
the generated files have been updated, it will be necessary to
|
||||
update the file:</p>
|
||||
|
||||
<p><code>src/remote_protocol-structs</code></p>
|
||||
|
||||
<p>
|
||||
This file should only have new lines added; modifications to
|
||||
existing lines probably imply a backwards-incompatible API change.
|
||||
</p>
|
||||
|
||||
<p class="example">See <a href="api_extension/0005-implement-the-remote-protocol.patch">0005-implement-the-remote-protocol.patch</a></p>
|
||||
|
||||
<h2><a id="internaluseapi">Use the new API internally</a></h2>
|
||||
|
||||
<p>
|
||||
Sometimes, a new API serves as a superset of existing API, by
|
||||
adding more granularity in what can be managed. When this is
|
||||
the case, it makes sense to share a common implementation by
|
||||
making the older API become a trivial wrapper around the new
|
||||
API, rather than duplicating the common code. This step should
|
||||
not introduce any semantic differences for the old API, and is
|
||||
not necessary if the new API has no relation to existing API.
|
||||
</p>
|
||||
|
||||
<p class="example">See <a href="api_extension/0006-make-old-API-trivially-wrap-to-new-API.patch">0006-make-old-API-trivially-wrap-to-new-API.patch</a></p>
|
||||
|
||||
<h2><a id="virshuseapi">Expose the new API in virsh</a></h2>
|
||||
|
||||
<p>
|
||||
All new API should be manageable from the virsh command line
|
||||
shell. This proves that the API is sufficient for the intended
|
||||
purpose, and helps to identify whether the proposed API needs
|
||||
slight changes for easier usage. However, remember that virsh
|
||||
is used to connect to hosts running older versions of libvirtd,
|
||||
so new commands should have fallbacks to an older API if
|
||||
possible; implementing the virsh hooks at this point makes it
|
||||
very easy to test these fallbacks. Also remember to document
|
||||
virsh additions.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
A virsh command is composed of a few pieces of code. You need to
|
||||
define an array of vshCmdInfo structs for each new command that
|
||||
contain the help text and the command description text. You also need
|
||||
an array of vshCmdOptDef structs to describe the command options.
|
||||
Once you have those pieces in place you can write the function
|
||||
implementing the virsh command. Finally, you need to add the new
|
||||
command to the commands[] array. The following files need changes:
|
||||
</p>
|
||||
|
||||
<p><code>
|
||||
tools/virsh.c<br/>
|
||||
tools/virsh.pod
|
||||
</code></p>
|
||||
|
||||
<p class="example">See <a href="api_extension/0007-add-virsh-support.patch">0007-add-virsh-support.patch</a></p>
|
||||
|
||||
<h2><a id="driverimpl">Implement the driver methods</a></h2>
|
||||
|
||||
<p>
|
||||
So, after all that, we get to the fun part. All functionality in
|
||||
libvirt is implemented inside a driver. Thus, here is where you
|
||||
implement whatever functionality you're adding to libvirt. You'll
|
||||
either need to add additional files to the src directory or extend
|
||||
files that are already there, depending on what functionality you're
|
||||
adding.
|
||||
</p>
|
||||
|
||||
<h3><a id="commonimpl">Implement common handling</a></h3>
|
||||
|
||||
<p>
|
||||
If the new API is applicable to more than one driver, it may
|
||||
make sense to provide some utility routines, or to factor some
|
||||
of the work into the dispatcher, to avoid reimplementing the
|
||||
same code in every driver. In the example code, this involved
|
||||
adding a member to the virDomainDefPtr struct for mapping
|
||||
between the XML API addition and the in-memory representation of
|
||||
a domain, along with updating all clients to use the new member.
|
||||
Up to this point, there have been no changes to existing
|
||||
semantics, and the new APIs will fail unless they are used in
|
||||
the same way as the older API wrappers.
|
||||
</p>
|
||||
|
||||
<p class="example">See <a href="api_extension/0008-support-new-xml.patch">0008-support-new-xml.patch</a></p>
|
||||
|
||||
<h3><a id="drivercode">Implement driver handling</a></h3>
|
||||
|
||||
<p>
|
||||
The remaining patches should only touch one driver at a time.
|
||||
It is possible to implement all changes for a driver in one
|
||||
patch, but for review purposes it may still make sense to break
|
||||
things into simpler steps. Here is where the new APIs finally
|
||||
start working.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In the example patches, three separate drivers are supported:
|
||||
test, qemu, and xen. It is always a good idea to patch the test
|
||||
driver in addition to the target driver, to prove that the API
|
||||
can be used for more than one driver. The example updates the
|
||||
test driver in one patch:
|
||||
</p>
|
||||
|
||||
<p class="example">See <a href="api_extension/0009-support-all-flags-in-test-driver.patch">0009-support-all-flags-in-test-driver.patch</a></p>
|
||||
|
||||
<p>
|
||||
The qemu changes were easier to split into two phases, one for
|
||||
updating the mapping between the new XML and the hypervisor
|
||||
command line arguments, and one for supporting all possible
|
||||
flags of the new API:
|
||||
</p>
|
||||
|
||||
<p class="example">See <a href="api_extension/0010-improve-vcpu-support-in-qemu-command-line.patch">0010-improve-vcpu-support-in-qemu-command-line.patch</a>
|
||||
and <a href="api_extension/0011-complete-vcpu-support-in-qemu-driver.patch">0011-complete-vcpu-support-in-qemu-driver.patch</a></p>
|
||||
|
||||
<p>
|
||||
Finally, the example breaks the xen driver changes across four
|
||||
patches. One maps the XML changes to the hypervisor command,
|
||||
the next two are independently implementing the getter and
|
||||
setter APIs, and the last one provides cleanup of code that was
|
||||
rendered dead by the new API.
|
||||
</p>
|
||||
|
||||
<p class="example">See <a href="api_extension/0012-improve-vcpu-support-in-xen-command-line.patch">0012-improve-vcpu-support-in-xen-command-line.patch</a>,
|
||||
<a href="api_extension/0013-improve-getting-xen-vcpu-counts.patch">0013-improve-getting-xen-vcpu-counts.patch</a>,
|
||||
<a href="api_extension/0014-improve-setting-xen-vcpu-counts.patch">0014-improve-setting-xen-vcpu-counts.patch</a>,
|
||||
and <a href="api_extension/0015-remove-dead-xen-code.patch">0015-remove-dead-xen-code.patch</a></p>
|
||||
|
||||
<p>
|
||||
The exact details of the example code are probably uninteresting
|
||||
unless you're concerned with virtual cpu management.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Once you have working functionality, run make check and make
|
||||
syntax-check on each patch of the series before submitting
|
||||
patches. It may also be worth writing tests for the libvirt-TCK
|
||||
testsuite to exercise your new API, although those patches are
|
||||
not kept in the libvirt repository.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
@@ -1,291 +0,0 @@
|
||||
=================================
|
||||
Implementing a new API in Libvirt
|
||||
=================================
|
||||
|
||||
.. contents::
|
||||
|
||||
This document walks you through the process of implementing a new API in
|
||||
libvirt. Remember that new API consists of any new public functions, as
|
||||
well as the addition of flags or extensions of XML used by existing
|
||||
functions.
|
||||
|
||||
Before you begin coding, it is critical that you propose your changes on
|
||||
the libvirt mailing list and get feedback on your ideas to make sure
|
||||
what you're proposing fits with the general direction of the project.
|
||||
Even before doing a proof of concept implementation, send an email
|
||||
giving an overview of the functionality you think should be added to
|
||||
libvirt. Someone may already be working on the feature you want. Also,
|
||||
recognize that everything you write is likely to undergo significant
|
||||
rework as you discuss it with the other developers, so don't wait too
|
||||
long before getting feedback.
|
||||
|
||||
Adding a new API to libvirt is not difficult, but there are quite a few
|
||||
steps. This document assumes that you are familiar with C programming
|
||||
and have checked out the libvirt code from the source code repository
|
||||
and successfully built the existing tree. Instructions on how to check
|
||||
out and build the code can be found at:
|
||||
|
||||
https://libvirt.org/downloads.html
|
||||
|
||||
Once you have a working development environment, the steps to create a
|
||||
new API are:
|
||||
|
||||
#. define the public API
|
||||
#. define the internal driver API
|
||||
#. implement the public API
|
||||
#. implement the remote protocol:
|
||||
|
||||
#. define the wire protocol format
|
||||
#. implement the RPC client
|
||||
#. implement the server side dispatcher
|
||||
|
||||
#. use new API where appropriate in drivers
|
||||
#. add virsh support
|
||||
#. add common handling for new API
|
||||
#. for each driver that can support the new API:
|
||||
|
||||
#. add prerequisite support
|
||||
#. fully implement new API
|
||||
|
||||
It is, of course, possible to implement the pieces in any order, but if
|
||||
the development tasks are completed in the order listed, the code will
|
||||
compile after each step. Given the number of changes required,
|
||||
verification after each step is highly recommended.
|
||||
|
||||
Submit new code in the form of one patch per step. That's not to say
|
||||
submit patches before you have working functionality--get the whole
|
||||
thing working and make sure you're happy with it. Then use git to break
|
||||
the changes into pieces so you don't drop a big blob of code on the
|
||||
mailing list in one go. Also, you should follow the upstream tree, and
|
||||
rebase your series to adapt your patches to work with any other changes
|
||||
that were accepted upstream during your development.
|
||||
|
||||
Don't mix anything else into the patches you submit. The patches should
|
||||
be the minimal changes required to implement the functionality you're
|
||||
adding. If you notice a bug in unrelated code (i.e., code you don't have
|
||||
to touch to implement your API change) during development, create a
|
||||
patch that just addresses that bug and submit it separately.
|
||||
|
||||
Defining the public API
|
||||
-----------------------
|
||||
|
||||
The first task is to define the public API. If the new API involves an
|
||||
XML extension, you have to enhance the RelaxNG schema and document the
|
||||
new elements or attributes:
|
||||
|
||||
``docs/schemas/domaincommon.rng docs/formatdomain.html.in``
|
||||
|
||||
If the API extension involves a new function, you have to add a
|
||||
declaration in the public header, and arrange to export the function
|
||||
name (symbol) so other programs can link against the libvirt library and
|
||||
call the new function:
|
||||
|
||||
``include/libvirt/libvirt-$MODULE.h.in src/libvirt_public.syms``
|
||||
|
||||
Please consult our `coding
|
||||
style <coding-style.html#xml-element-and-attribute-naming>`__ guide on
|
||||
elements and attribute names.
|
||||
|
||||
This task is in many ways the most important to get right, since once
|
||||
the API has been committed to the repository, it's libvirt's policy
|
||||
never to change it. Mistakes in the implementation are bugs that you can
|
||||
fix. Make a mistake in the API definition and you're stuck with it, so
|
||||
think carefully about the interface and don't be afraid to rework it as
|
||||
you go through the process of implementing it.
|
||||
|
||||
Defining the internal API
|
||||
-------------------------
|
||||
|
||||
Each public API call is associated with a driver, such as a host
|
||||
virtualization driver, a network virtualization driver, a storage
|
||||
virtualization driver, a state driver, or a device monitor. Adding the
|
||||
internal API is ordinarily a matter of adding a new member to the struct
|
||||
representing one of these drivers.
|
||||
|
||||
Of course, it's possible that the new API will involve the creation of
|
||||
an entirely new driver type, in which case the changes will include the
|
||||
creation of a new struct type to represent the new driver type.
|
||||
|
||||
The driver structs are defined in:
|
||||
|
||||
``src/driver-$MODULE.h``
|
||||
|
||||
To define the internal API, first typedef the driver function prototype
|
||||
and then add a new field for it to the relevant driver struct. Then,
|
||||
update all existing instances of the driver to provide a ``NULL`` stub
|
||||
for the new function.
|
||||
|
||||
Implementing the public API
|
||||
---------------------------
|
||||
|
||||
Implementing the public API is largely a formality in which we wire up
|
||||
public API to the internal driver API. The public API implementation
|
||||
takes care of some basic validity checks before passing control to the
|
||||
driver implementation. In RFC 2119 vocabulary, this function:
|
||||
|
||||
#. SHOULD log a message with VIR_DEBUG() indicating that it is being
|
||||
called and its parameters;
|
||||
#. MUST call virResetLastError();
|
||||
#. SHOULD confirm that the connection is valid with
|
||||
virCheckConnectReturn() or virCheckConnectGoto();
|
||||
#. **SECURITY: If the API requires a connection with write privileges,
|
||||
MUST confirm that the connection flags do not indicate that the
|
||||
connection is read-only with virCheckReadOnlyGoto();**
|
||||
#. SHOULD do basic validation of the parameters that are being passed
|
||||
in, using helpers like virCheckNonNullArgGoto();
|
||||
#. MUST confirm that the driver for this connection exists and that it
|
||||
implements this function;
|
||||
#. MUST call the internal API;
|
||||
#. SHOULD log a message with VIR_DEBUG() indicating that it is
|
||||
returning, its return value, and status.
|
||||
#. MUST return status to the caller.
|
||||
|
||||
The public API calls are implemented in:
|
||||
|
||||
``src/libvirt-$MODULE.c``
|
||||
|
||||
Implementing the remote protocol
|
||||
--------------------------------
|
||||
|
||||
Implementing the remote protocol is essentially a straightforward
|
||||
exercise which is probably most easily understood by referring to the
|
||||
existing code.
|
||||
|
||||
Defining the wire protocol format
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Defining the wire protocol involves making additions to:
|
||||
|
||||
``src/remote/remote_protocol.x``
|
||||
|
||||
First, create two new structs for each new function that you're adding
|
||||
to the API. One struct describes the parameters to be passed to the
|
||||
remote function, and a second struct describes the value returned by the
|
||||
remote function. The one exception to this rule is that functions that
|
||||
return only 0 or -1 for status do not require a struct for returned
|
||||
data.
|
||||
|
||||
Second, add values to the remote_procedure enum for each new function
|
||||
added to the API.
|
||||
|
||||
Once these changes are in place, it's necessary to run 'make rpcgen' in
|
||||
the src directory to create the .c and .h files required by the remote
|
||||
protocol code. This must be done on a Linux host using the GLibC rpcgen
|
||||
program. Other rpcgen versions may generate code which results in bogus
|
||||
compile time warnings. This regenerates the following files:
|
||||
|
||||
``src/remote/remote_daemon_dispatch_stubs.h src/remote/remote_daemon_dispatch.h src/remote/remote_daemon_dispatch.c src/remote/remote_protocol.c src/remote/remote_protocol.h``
|
||||
|
||||
Implement the RPC client
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Implementing the RPC client uses the rpcgen generated .h files. The
|
||||
remote method calls go in:
|
||||
|
||||
``src/remote/remote_driver.c``
|
||||
|
||||
Each remote method invocation does the following:
|
||||
|
||||
#. locks the remote driver;
|
||||
#. sets up the method arguments;
|
||||
#. invokes the remote function;
|
||||
#. checks the return value, if necessary;
|
||||
#. extracts any returned data;
|
||||
#. frees any returned data;
|
||||
#. unlocks the remote driver.
|
||||
|
||||
Implement the server side dispatcher
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Implementing the server side of the remote function call is simply a
|
||||
matter of deserializing the parameters passed in from the remote caller
|
||||
and passing them to the corresponding internal API function. The server
|
||||
side dispatchers are implemented in:
|
||||
|
||||
``src/remote/remote_daemon_dispatch.c``
|
||||
|
||||
Again, this step uses the .h files generated by make rpcgen.
|
||||
|
||||
After all three pieces of the remote protocol are complete, and the
|
||||
generated files have been updated, it will be necessary to update the
|
||||
file:
|
||||
|
||||
``src/remote_protocol-structs``
|
||||
|
||||
This file should only have new lines added; modifications to existing
|
||||
lines probably imply a backwards-incompatible API change.
|
||||
|
||||
Use the new API internally
|
||||
--------------------------
|
||||
|
||||
Sometimes, a new API serves as a superset of existing API, by adding
|
||||
more granularity in what can be managed. When this is the case, it makes
|
||||
sense to share a common implementation by making the older API become a
|
||||
trivial wrapper around the new API, rather than duplicating the common
|
||||
code. This step should not introduce any semantic differences for the
|
||||
old API, and is not necessary if the new API has no relation to existing
|
||||
API.
|
||||
|
||||
Expose the new API in virsh
|
||||
---------------------------
|
||||
|
||||
All new API should be manageable from the virsh command line shell. This
|
||||
proves that the API is sufficient for the intended purpose, and helps to
|
||||
identify whether the proposed API needs slight changes for easier usage.
|
||||
However, remember that virsh is used to connect to hosts running older
|
||||
versions of libvirtd, so new commands should have fallbacks to an older
|
||||
API if possible; implementing the virsh hooks at this point makes it
|
||||
very easy to test these fallbacks. Also remember to document virsh
|
||||
additions.
|
||||
|
||||
A virsh command is composed of a few pieces of code. You need to define
|
||||
an array of vshCmdInfo structs for each new command that contain the
|
||||
help text and the command description text. You also need an array of
|
||||
vshCmdOptDef structs to describe the command options. Once you have
|
||||
those pieces in place you can write the function implementing the virsh
|
||||
command. Finally, you need to add the new command to the commands[]
|
||||
array. The following files need changes:
|
||||
|
||||
``tools/virsh-$MODULE.c tools/virsh.pod``
|
||||
|
||||
Implement the driver methods
|
||||
----------------------------
|
||||
|
||||
So, after all that, we get to the fun part. All functionality in libvirt
|
||||
is implemented inside a driver. Thus, here is where you implement
|
||||
whatever functionality you're adding to libvirt. You'll either need to
|
||||
add additional files to the src directory or extend files that are
|
||||
already there, depending on what functionality you're adding.
|
||||
|
||||
Implement common handling
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
If the new API is applicable to more than one driver, it may make sense
|
||||
to provide some utility routines, or to factor some of the work into the
|
||||
dispatcher, to avoid reimplementing the same code in every driver. In
|
||||
the example code, this involved adding a member to the virDomainDefPtr
|
||||
struct for mapping between the XML API addition and the in-memory
|
||||
representation of a domain, along with updating all clients to use the
|
||||
new member. Up to this point, there have been no changes to existing
|
||||
semantics, and the new APIs will fail unless they are used in the same
|
||||
way as the older API wrappers.
|
||||
|
||||
Implement driver handling
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The remaining patches should only touch one driver at a time. It is
|
||||
possible to implement all changes for a driver in one patch, but for
|
||||
review purposes it may still make sense to break things into simpler
|
||||
steps. Here is where the new APIs finally start working.
|
||||
|
||||
It is always a good idea to patch the test driver in addition to the
|
||||
target driver, to prove that the API can be used for more than one
|
||||
driver.
|
||||
|
||||
Any cleanups resulting from the changes should be added as separate
|
||||
patches at the end of the series.
|
||||
|
||||
Once you have working functionality, run ninja test on each patch of the
|
||||
series before submitting patches. It may also be worth writing tests for
|
||||
the libvirt-TCK testsuite to exercise your new API, although those
|
||||
patches are not kept in the libvirt repository.
|
145
docs/api_extension/0001-add-to-xml.patch
Normal file
145
docs/api_extension/0001-add-to-xml.patch
Normal file
@@ -0,0 +1,145 @@
|
||||
From a74f4e44649906dcd82151f7ef837f66d7fa2ab1 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Blake <eblake@redhat.com>
|
||||
Date: Mon, 27 Sep 2010 17:36:06 -0600
|
||||
Subject: [PATCH 01/15] vcpu: add current attribute to <vcpu> element
|
||||
|
||||
Syntax agreed on in
|
||||
https://www.redhat.com/archives/libvir-list/2010-September/msg00476.html
|
||||
|
||||
<domain ...>
|
||||
<vcpu current='x'>y</vcpu>
|
||||
...
|
||||
|
||||
can now be used to specify 1 <= x <= y current vcpus, in relation
|
||||
to the boot-time max of y vcpus. If current is omitted, then
|
||||
current and max are assumed to be the same value.
|
||||
|
||||
* docs/schemas/domain.rng: Add new attribute.
|
||||
* docs/formatdomain.html.in: Document it.
|
||||
* tests/qemuxml2argvdata/qemuxml2argv-smp.xml: Add to
|
||||
domainschematest.
|
||||
* tests/xml2sexprdata/xml2sexpr-pv-vcpus.xml: Likewise.
|
||||
---
|
||||
docs/formatdomain.html.in | 9 +++++--
|
||||
docs/schemas/domain.rng | 5 ++++
|
||||
tests/qemuxml2argvdata/qemuxml2argv-smp.xml | 28 +++++++++++++++++++++++++++
|
||||
tests/xml2sexprdata/xml2sexpr-pv-vcpus.xml | 22 +++++++++++++++++++++
|
||||
4 files changed, 61 insertions(+), 3 deletions(-)
|
||||
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-smp.xml
|
||||
create mode 100644 tests/xml2sexprdata/xml2sexpr-pv-vcpus.xml
|
||||
|
||||
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
|
||||
index a8a1fac..96de121 100644
|
||||
--- a/docs/formatdomain.html.in
|
||||
+++ b/docs/formatdomain.html.in
|
||||
@@ -200,7 +200,7 @@
|
||||
<swap_hard_limit>2097152</swap_hard_limit>
|
||||
<min_guarantee>65536</min_guarantee>
|
||||
</memtune>
|
||||
- <vcpu cpuset="1-4,^3,6">2</vcpu>
|
||||
+ <vcpu cpuset="1-4,^3,6" current="1">2</vcpu>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
@@ -238,7 +238,7 @@
|
||||
minimum memory allocation for the guest. The units for this value are
|
||||
kilobytes (i.e. blocks of 1024 bytes)</dd>
|
||||
<dt><code>vcpu</code></dt>
|
||||
- <dd>The content of this element defines the number of virtual
|
||||
+ <dd>The content of this element defines the maximum number of virtual
|
||||
CPUs allocated for the guest OS, which must be between 1 and
|
||||
the maximum supported by the hypervisor. <span class="since">Since
|
||||
0.4.4</span>, this element can contain an optional
|
||||
@@ -246,7 +246,10 @@
|
||||
list of physical CPU numbers that virtual CPUs can be pinned
|
||||
to. Each element in that list is either a single CPU number,
|
||||
a range of CPU numbers, or a caret followed by a CPU number to
|
||||
- be excluded from a previous range.
|
||||
+ be excluded from a previous range. <span class="since">Since
|
||||
+ 0.8.5</span>, the optional attribute <code>current</code> can
|
||||
+ be used to specify whether fewer than the maximum number of
|
||||
+ virtual CPUs should be enabled.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
|
||||
index f230263..a934a77 100644
|
||||
--- a/docs/schemas/domain.rng
|
||||
+++ b/docs/schemas/domain.rng
|
||||
@@ -337,6 +337,11 @@
|
||||
<ref name="cpuset"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
+ <optional>
|
||||
+ <attribute name="current">
|
||||
+ <ref name="countCPU"/>
|
||||
+ </attribute>
|
||||
+ </optional>
|
||||
<ref name="countCPU"/>
|
||||
</element>
|
||||
</optional>
|
||||
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-smp.xml b/tests/qemuxml2argvdata/qemuxml2argv-smp.xml
|
||||
new file mode 100644
|
||||
index 0000000..975f873
|
||||
--- /dev/null
|
||||
+++ b/tests/qemuxml2argvdata/qemuxml2argv-smp.xml
|
||||
@@ -0,0 +1,28 @@
|
||||
+<domain type='qemu'>
|
||||
+ <name>QEMUGuest1</name>
|
||||
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||
+ <memory>219200</memory>
|
||||
+ <currentMemory>219200</currentMemory>
|
||||
+ <vcpu current='1'>2</vcpu>
|
||||
+ <os>
|
||||
+ <type arch='i686' machine='pc'>hvm</type>
|
||||
+ <boot dev='hd'/>
|
||||
+ </os>
|
||||
+ <cpu>
|
||||
+ <topology sockets='2' cores='1' threads='1'/>
|
||||
+ </cpu>
|
||||
+ <clock offset='utc'/>
|
||||
+ <on_poweroff>destroy</on_poweroff>
|
||||
+ <on_reboot>restart</on_reboot>
|
||||
+ <on_crash>destroy</on_crash>
|
||||
+ <devices>
|
||||
+ <emulator>/usr/bin/qemu</emulator>
|
||||
+ <disk type='block' device='disk'>
|
||||
+ <source dev='/dev/HostVG/QEMUGuest1'/>
|
||||
+ <target dev='hda' bus='ide'/>
|
||||
+ <address type='drive' controller='0' bus='0' unit='0'/>
|
||||
+ </disk>
|
||||
+ <controller type='ide' index='0'/>
|
||||
+ <memballoon model='virtio'/>
|
||||
+ </devices>
|
||||
+</domain>
|
||||
diff --git a/tests/xml2sexprdata/xml2sexpr-pv-vcpus.xml b/tests/xml2sexprdata/xml2sexpr-pv-vcpus.xml
|
||||
new file mode 100644
|
||||
index 0000000..d061e11
|
||||
--- /dev/null
|
||||
+++ b/tests/xml2sexprdata/xml2sexpr-pv-vcpus.xml
|
||||
@@ -0,0 +1,22 @@
|
||||
+<domain type='xen' id='15'>
|
||||
+ <name>pvtest</name>
|
||||
+ <uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
|
||||
+ <os>
|
||||
+ <type>linux</type>
|
||||
+ <kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
|
||||
+ <initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
|
||||
+ <cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os </cmdline>
|
||||
+ </os>
|
||||
+ <memory>430080</memory>
|
||||
+ <vcpu current='2'>4</vcpu>
|
||||
+ <on_poweroff>destroy</on_poweroff>
|
||||
+ <on_reboot>destroy</on_reboot>
|
||||
+ <on_crash>destroy</on_crash>
|
||||
+ <devices>
|
||||
+ <disk type='file' device='disk'>
|
||||
+ <source file='/root/some.img'/>
|
||||
+ <target dev='xvda'/>
|
||||
+ </disk>
|
||||
+ <console tty='/dev/pts/4'/>
|
||||
+ </devices>
|
||||
+</domain>
|
||||
--
|
||||
1.7.2.3
|
||||
|
62
docs/api_extension/0002-add-new-public-API.patch
Normal file
62
docs/api_extension/0002-add-new-public-API.patch
Normal file
@@ -0,0 +1,62 @@
|
||||
From ea3f5c68093429c6ad507b45689cdf209c2c257b Mon Sep 17 00:00:00 2001
|
||||
From: Eric Blake <eblake@redhat.com>
|
||||
Date: Fri, 24 Sep 2010 16:48:45 -0600
|
||||
Subject: [PATCH 02/15] vcpu: add new public API
|
||||
|
||||
API agreed on in
|
||||
https://www.redhat.com/archives/libvir-list/2010-September/msg00456.html,
|
||||
but modified for enum names to be consistent with virDomainDeviceModifyFlags.
|
||||
|
||||
* include/libvirt/libvirt.h.in (virDomainVcpuFlags)
|
||||
(virDomainSetVcpusFlags, virDomainGetVcpusFlags): New
|
||||
declarations.
|
||||
* src/libvirt_public.syms: Export new symbols.
|
||||
---
|
||||
include/libvirt/libvirt.h.in | 15 +++++++++++++++
|
||||
src/libvirt_public.syms | 2 ++
|
||||
2 files changed, 17 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
|
||||
index 2eba61e..d0cc4c0 100644
|
||||
--- a/include/libvirt/libvirt.h.in
|
||||
+++ b/include/libvirt/libvirt.h.in
|
||||
@@ -915,8 +915,23 @@ struct _virVcpuInfo {
|
||||
};
|
||||
typedef virVcpuInfo *virVcpuInfoPtr;
|
||||
|
||||
+/* Flags for controlling virtual CPU hot-plugging. */
|
||||
+typedef enum {
|
||||
+ /* Must choose at least one of these two bits; SetVcpus can choose both */
|
||||
+ VIR_DOMAIN_VCPU_LIVE = (1 << 0), /* Affect active domain */
|
||||
+ VIR_DOMAIN_VCPU_CONFIG = (1 << 1), /* Affect next boot */
|
||||
+
|
||||
+ /* Additional flags to be bit-wise OR'd in */
|
||||
+ VIR_DOMAIN_VCPU_MAXIMUM = (1 << 2), /* Max rather than current count */
|
||||
+} virDomainVcpuFlags;
|
||||
+
|
||||
int virDomainSetVcpus (virDomainPtr domain,
|
||||
unsigned int nvcpus);
|
||||
+int virDomainSetVcpusFlags (virDomainPtr domain,
|
||||
+ unsigned int nvcpus,
|
||||
+ unsigned int flags);
|
||||
+int virDomainGetVcpusFlags (virDomainPtr domain,
|
||||
+ unsigned int flags);
|
||||
|
||||
int virDomainPinVcpu (virDomainPtr domain,
|
||||
unsigned int vcpu,
|
||||
diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms
|
||||
index fceb516..a8091b1 100644
|
||||
--- a/src/libvirt_public.syms
|
||||
+++ b/src/libvirt_public.syms
|
||||
@@ -409,6 +409,8 @@ LIBVIRT_0.8.5 {
|
||||
global:
|
||||
virDomainSetMemoryParameters;
|
||||
virDomainGetMemoryParameters;
|
||||
+ virDomainGetVcpusFlags;
|
||||
+ virDomainSetVcpusFlags;
|
||||
} LIBVIRT_0.8.2;
|
||||
|
||||
# .... define new API here using predicted next version number ....
|
||||
--
|
||||
1.7.2.3
|
||||
|
222
docs/api_extension/0003-define-internal-driver-API.patch
Normal file
222
docs/api_extension/0003-define-internal-driver-API.patch
Normal file
@@ -0,0 +1,222 @@
|
||||
From dd255d64053e9960cd375994ce8f056522e12acc Mon Sep 17 00:00:00 2001
|
||||
From: Eric Blake <eblake@redhat.com>
|
||||
Date: Mon, 27 Sep 2010 09:18:22 -0600
|
||||
Subject: [PATCH 03/15] vcpu: define internal driver API
|
||||
|
||||
* src/driver.h (virDrvDomainSetVcpusFlags)
|
||||
(virDrvDomainGetVcpusFlags): New typedefs.
|
||||
(_virDriver): New callback members.
|
||||
* src/esx/esx_driver.c (esxDriver): Add stub for driver.
|
||||
* src/lxc/lxc_driver.c (lxcDriver): Likewise.
|
||||
* src/opennebula/one_driver.c (oneDriver): Likewise.
|
||||
* src/openvz/openvz_driver.c (openvzDriver): Likewise.
|
||||
* src/phyp/phyp_driver.c (phypDriver): Likewise.
|
||||
* src/qemu/qemu_driver.c (qemuDriver): Likewise.
|
||||
* src/remote/remote_driver.c (remote_driver): Likewise.
|
||||
* src/test/test_driver.c (testDriver): Likewise.
|
||||
* src/uml/uml_driver.c (umlDriver): Likewise.
|
||||
* src/vbox/vbox_tmpl.c (Driver): Likewise.
|
||||
* src/xen/xen_driver.c (xenUnifiedDriver): Likewise.
|
||||
* src/xenapi/xenapi_driver.c (xenapiDriver): Likewise.
|
||||
---
|
||||
src/driver.h | 9 +++++++++
|
||||
src/esx/esx_driver.c | 2 ++
|
||||
src/lxc/lxc_driver.c | 2 ++
|
||||
src/opennebula/one_driver.c | 2 ++
|
||||
src/openvz/openvz_driver.c | 2 ++
|
||||
src/phyp/phyp_driver.c | 2 ++
|
||||
src/qemu/qemu_driver.c | 2 ++
|
||||
src/remote/remote_driver.c | 2 ++
|
||||
src/test/test_driver.c | 2 ++
|
||||
src/uml/uml_driver.c | 2 ++
|
||||
src/vbox/vbox_tmpl.c | 2 ++
|
||||
src/xen/xen_driver.c | 2 ++
|
||||
src/xenapi/xenapi_driver.c | 2 ++
|
||||
13 files changed, 33 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/driver.h b/src/driver.h
|
||||
index 32aeb04..79a96c1 100644
|
||||
--- a/src/driver.h
|
||||
+++ b/src/driver.h
|
||||
@@ -185,6 +185,13 @@ typedef int
|
||||
(*virDrvDomainSetVcpus) (virDomainPtr domain,
|
||||
unsigned int nvcpus);
|
||||
typedef int
|
||||
+ (*virDrvDomainSetVcpusFlags) (virDomainPtr domain,
|
||||
+ unsigned int nvcpus,
|
||||
+ unsigned int flags);
|
||||
+typedef int
|
||||
+ (*virDrvDomainGetVcpusFlags) (virDomainPtr domain,
|
||||
+ unsigned int flags);
|
||||
+typedef int
|
||||
(*virDrvDomainPinVcpu) (virDomainPtr domain,
|
||||
unsigned int vcpu,
|
||||
unsigned char *cpumap,
|
||||
@@ -520,6 +527,8 @@ struct _virDriver {
|
||||
virDrvDomainRestore domainRestore;
|
||||
virDrvDomainCoreDump domainCoreDump;
|
||||
virDrvDomainSetVcpus domainSetVcpus;
|
||||
+ virDrvDomainSetVcpusFlags domainSetVcpusFlags;
|
||||
+ virDrvDomainGetVcpusFlags domainGetVcpusFlags;
|
||||
virDrvDomainPinVcpu domainPinVcpu;
|
||||
virDrvDomainGetVcpus domainGetVcpus;
|
||||
virDrvDomainGetMaxVcpus domainGetMaxVcpus;
|
||||
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
|
||||
index 1b4ee29..2a32374 100644
|
||||
--- a/src/esx/esx_driver.c
|
||||
+++ b/src/esx/esx_driver.c
|
||||
@@ -4160,6 +4160,8 @@ static virDriver esxDriver = {
|
||||
NULL, /* domainRestore */
|
||||
NULL, /* domainCoreDump */
|
||||
esxDomainSetVcpus, /* domainSetVcpus */
|
||||
+ NULL, /* domainSetVcpusFlags */
|
||||
+ NULL, /* domainGetVcpusFlags */
|
||||
NULL, /* domainPinVcpu */
|
||||
NULL, /* domainGetVcpus */
|
||||
esxDomainGetMaxVcpus, /* domainGetMaxVcpus */
|
||||
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
|
||||
index df814da..7563a8c 100644
|
||||
--- a/src/lxc/lxc_driver.c
|
||||
+++ b/src/lxc/lxc_driver.c
|
||||
@@ -2768,6 +2768,8 @@ static virDriver lxcDriver = {
|
||||
NULL, /* domainRestore */
|
||||
NULL, /* domainCoreDump */
|
||||
NULL, /* domainSetVcpus */
|
||||
+ NULL, /* domainSetVcpusFlags */
|
||||
+ NULL, /* domainGetVcpusFlags */
|
||||
NULL, /* domainPinVcpu */
|
||||
NULL, /* domainGetVcpus */
|
||||
NULL, /* domainGetMaxVcpus */
|
||||
diff --git a/src/opennebula/one_driver.c b/src/opennebula/one_driver.c
|
||||
index ced9a38..199fca3 100644
|
||||
--- a/src/opennebula/one_driver.c
|
||||
+++ b/src/opennebula/one_driver.c
|
||||
@@ -751,6 +751,8 @@ static virDriver oneDriver = {
|
||||
NULL, /* domainRestore */
|
||||
NULL, /* domainCoreDump */
|
||||
NULL, /* domainSetVcpus */
|
||||
+ NULL, /* domainSetVcpusFlags */
|
||||
+ NULL, /* domainGetVcpusFlags */
|
||||
NULL, /* domainPinVcpu */
|
||||
NULL, /* domainGetVcpus */
|
||||
NULL, /* domainGetMaxVcpus */
|
||||
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
|
||||
index 92cf4a1..9d19aeb 100644
|
||||
--- a/src/openvz/openvz_driver.c
|
||||
+++ b/src/openvz/openvz_driver.c
|
||||
@@ -1590,6 +1590,8 @@ static virDriver openvzDriver = {
|
||||
NULL, /* domainRestore */
|
||||
NULL, /* domainCoreDump */
|
||||
openvzDomainSetVcpus, /* domainSetVcpus */
|
||||
+ NULL, /* domainSetVcpusFlags */
|
||||
+ NULL, /* domainGetVcpusFlags */
|
||||
NULL, /* domainPinVcpu */
|
||||
NULL, /* domainGetVcpus */
|
||||
openvzDomainGetMaxVcpus, /* domainGetMaxVcpus */
|
||||
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
|
||||
index e63d8d9..6e0a5e9 100644
|
||||
--- a/src/phyp/phyp_driver.c
|
||||
+++ b/src/phyp/phyp_driver.c
|
||||
@@ -3941,6 +3941,8 @@ static virDriver phypDriver = {
|
||||
NULL, /* domainRestore */
|
||||
NULL, /* domainCoreDump */
|
||||
phypDomainSetCPU, /* domainSetVcpus */
|
||||
+ NULL, /* domainSetVcpusFlags */
|
||||
+ NULL, /* domainGetVcpusFlags */
|
||||
NULL, /* domainPinVcpu */
|
||||
NULL, /* domainGetVcpus */
|
||||
phypGetLparCPUMAX, /* domainGetMaxVcpus */
|
||||
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
||||
index abd8e9d..3d17e04 100644
|
||||
--- a/src/qemu/qemu_driver.c
|
||||
+++ b/src/qemu/qemu_driver.c
|
||||
@@ -12938,6 +12938,8 @@ static virDriver qemuDriver = {
|
||||
qemudDomainRestore, /* domainRestore */
|
||||
qemudDomainCoreDump, /* domainCoreDump */
|
||||
qemudDomainSetVcpus, /* domainSetVcpus */
|
||||
+ NULL, /* domainSetVcpusFlags */
|
||||
+ NULL, /* domainGetVcpusFlags */
|
||||
qemudDomainPinVcpu, /* domainPinVcpu */
|
||||
qemudDomainGetVcpus, /* domainGetVcpus */
|
||||
qemudDomainGetMaxVcpus, /* domainGetMaxVcpus */
|
||||
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
|
||||
index 0b10406..1a687ad 100644
|
||||
--- a/src/remote/remote_driver.c
|
||||
+++ b/src/remote/remote_driver.c
|
||||
@@ -10468,6 +10468,8 @@ static virDriver remote_driver = {
|
||||
remoteDomainRestore, /* domainRestore */
|
||||
remoteDomainCoreDump, /* domainCoreDump */
|
||||
remoteDomainSetVcpus, /* domainSetVcpus */
|
||||
+ NULL, /* domainSetVcpusFlags */
|
||||
+ NULL, /* domainGetVcpusFlags */
|
||||
remoteDomainPinVcpu, /* domainPinVcpu */
|
||||
remoteDomainGetVcpus, /* domainGetVcpus */
|
||||
remoteDomainGetMaxVcpus, /* domainGetMaxVcpus */
|
||||
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
|
||||
index 7d4d119..6a00558 100644
|
||||
--- a/src/test/test_driver.c
|
||||
+++ b/src/test/test_driver.c
|
||||
@@ -5260,6 +5260,8 @@ static virDriver testDriver = {
|
||||
testDomainRestore, /* domainRestore */
|
||||
testDomainCoreDump, /* domainCoreDump */
|
||||
testSetVcpus, /* domainSetVcpus */
|
||||
+ NULL, /* domainSetVcpusFlags */
|
||||
+ NULL, /* domainGetVcpusFlags */
|
||||
testDomainPinVcpu, /* domainPinVcpu */
|
||||
testDomainGetVcpus, /* domainGetVcpus */
|
||||
testDomainGetMaxVcpus, /* domainGetMaxVcpus */
|
||||
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
|
||||
index 3dcd321..5161012 100644
|
||||
--- a/src/uml/uml_driver.c
|
||||
+++ b/src/uml/uml_driver.c
|
||||
@@ -2129,6 +2129,8 @@ static virDriver umlDriver = {
|
||||
NULL, /* domainRestore */
|
||||
NULL, /* domainCoreDump */
|
||||
NULL, /* domainSetVcpus */
|
||||
+ NULL, /* domainSetVcpusFlags */
|
||||
+ NULL, /* domainGetVcpusFlags */
|
||||
NULL, /* domainPinVcpu */
|
||||
NULL, /* domainGetVcpus */
|
||||
NULL, /* domainGetMaxVcpus */
|
||||
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
|
||||
index 7e7d8e4..cb9193a 100644
|
||||
--- a/src/vbox/vbox_tmpl.c
|
||||
+++ b/src/vbox/vbox_tmpl.c
|
||||
@@ -8267,6 +8267,8 @@ virDriver NAME(Driver) = {
|
||||
NULL, /* domainRestore */
|
||||
NULL, /* domainCoreDump */
|
||||
vboxDomainSetVcpus, /* domainSetVcpus */
|
||||
+ NULL, /* domainSetVcpusFlags */
|
||||
+ NULL, /* domainGetVcpusFlags */
|
||||
NULL, /* domainPinVcpu */
|
||||
NULL, /* domainGetVcpus */
|
||||
vboxDomainGetMaxVcpus, /* domainGetMaxVcpus */
|
||||
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
|
||||
index c2a4de3..7d67ced 100644
|
||||
--- a/src/xen/xen_driver.c
|
||||
+++ b/src/xen/xen_driver.c
|
||||
@@ -1951,6 +1951,8 @@ static virDriver xenUnifiedDriver = {
|
||||
xenUnifiedDomainRestore, /* domainRestore */
|
||||
xenUnifiedDomainCoreDump, /* domainCoreDump */
|
||||
xenUnifiedDomainSetVcpus, /* domainSetVcpus */
|
||||
+ NULL, /* domainSetVcpusFlags */
|
||||
+ NULL, /* domainGetVcpusFlags */
|
||||
xenUnifiedDomainPinVcpu, /* domainPinVcpu */
|
||||
xenUnifiedDomainGetVcpus, /* domainGetVcpus */
|
||||
xenUnifiedDomainGetMaxVcpus, /* domainGetMaxVcpus */
|
||||
diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
|
||||
index e62a139..753169c 100644
|
||||
--- a/src/xenapi/xenapi_driver.c
|
||||
+++ b/src/xenapi/xenapi_driver.c
|
||||
@@ -1754,6 +1754,8 @@ static virDriver xenapiDriver = {
|
||||
NULL, /* domainRestore */
|
||||
NULL, /* domainCoreDump */
|
||||
xenapiDomainSetVcpus, /* domainSetVcpus */
|
||||
+ NULL, /* domainSetVcpusFlags */
|
||||
+ NULL, /* domainGetVcpusFlags */
|
||||
xenapiDomainPinVcpu, /* domainPinVcpu */
|
||||
xenapiDomainGetVcpus, /* domainGetVcpus */
|
||||
xenapiDomainGetMaxVcpus, /* domainGetMaxVcpus */
|
||||
--
|
||||
1.7.2.3
|
||||
|
188
docs/api_extension/0004-implement-the-public-APIs.patch
Normal file
188
docs/api_extension/0004-implement-the-public-APIs.patch
Normal file
@@ -0,0 +1,188 @@
|
||||
From 9d2c60799271d605f82dfd4bfa6ed7d14ad87e26 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Blake <eblake@redhat.com>
|
||||
Date: Mon, 27 Sep 2010 09:37:22 -0600
|
||||
Subject: [PATCH 04/15] vcpu: implement the public APIs
|
||||
|
||||
Factors common checks (such as nonzero vcpu count) up front, but
|
||||
drivers will still need to do additional flag checks.
|
||||
|
||||
* src/libvirt.c (virDomainSetVcpusFlags, virDomainGetVcpusFlags):
|
||||
New functions.
|
||||
(virDomainSetVcpus, virDomainGetMaxVcpus): Refer to new API.
|
||||
---
|
||||
src/libvirt.c | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---
|
||||
1 files changed, 134 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/libvirt.c b/src/libvirt.c
|
||||
index 629d97b..1b39210 100644
|
||||
--- a/src/libvirt.c
|
||||
+++ b/src/libvirt.c
|
||||
@@ -5192,7 +5192,9 @@ error:
|
||||
* This function requires privileged access to the hypervisor.
|
||||
*
|
||||
* This command only changes the runtime configuration of the domain,
|
||||
- * so can only be called on an active domain.
|
||||
+ * so can only be called on an active domain. It is hypervisor-dependent
|
||||
+ * whether it also affects persistent configuration; for more control,
|
||||
+ * use virDomainSetVcpusFlags().
|
||||
*
|
||||
* Returns 0 in case of success, -1 in case of failure.
|
||||
*/
|
||||
@@ -5237,13 +5239,139 @@ error:
|
||||
}
|
||||
|
||||
/**
|
||||
+ * virDomainSetVcpusFlags:
|
||||
+ * @domain: pointer to domain object, or NULL for Domain0
|
||||
+ * @nvcpus: the new number of virtual CPUs for this domain, must be at least 1
|
||||
+ * @flags: an OR'ed set of virDomainVcpuFlags
|
||||
+ *
|
||||
+ * Dynamically change the number of virtual CPUs used by the domain.
|
||||
+ * Note that this call may fail if the underlying virtualization hypervisor
|
||||
+ * does not support it or if growing the number is arbitrary limited.
|
||||
+ * This function requires privileged access to the hypervisor.
|
||||
+ *
|
||||
+ * @flags must include VIR_DOMAIN_VCPU_LIVE to affect a running
|
||||
+ * domain (which may fail if domain is not active), or
|
||||
+ * VIR_DOMAIN_VCPU_CONFIG to affect the next boot via the XML
|
||||
+ * description of the domain. Both flags may be set.
|
||||
+ *
|
||||
+ * If @flags includes VIR_DOMAIN_VCPU_MAXIMUM, then
|
||||
+ * VIR_DOMAIN_VCPU_LIVE must be clear, and only the maximum virtual
|
||||
+ * CPU limit is altered; generally, this value must be less than or
|
||||
+ * equal to virConnectGetMaxVcpus(). Otherwise, this call affects the
|
||||
+ * current virtual CPU limit, which must be less than or equal to the
|
||||
+ * maximum limit.
|
||||
+ *
|
||||
+ * Returns 0 in case of success, -1 in case of failure.
|
||||
+ */
|
||||
+
|
||||
+int
|
||||
+virDomainSetVcpusFlags(virDomainPtr domain, unsigned int nvcpus,
|
||||
+ unsigned int flags)
|
||||
+{
|
||||
+ virConnectPtr conn;
|
||||
+ VIR_DEBUG("domain=%p, nvcpus=%u, flags=%u", domain, nvcpus, flags);
|
||||
+
|
||||
+ virResetLastError();
|
||||
+
|
||||
+ if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
|
||||
+ virLibDomainError(NULL, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
|
||||
+ virDispatchError(NULL);
|
||||
+ return (-1);
|
||||
+ }
|
||||
+ if (domain->conn->flags & VIR_CONNECT_RO) {
|
||||
+ virLibDomainError(domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
+ /* Perform some argument validation common to all implementations. */
|
||||
+ if (nvcpus < 1 || (unsigned short) nvcpus != nvcpus ||
|
||||
+ (flags & (VIR_DOMAIN_VCPU_LIVE | VIR_DOMAIN_VCPU_CONFIG)) == 0) {
|
||||
+ virLibDomainError(domain, VIR_ERR_INVALID_ARG, __FUNCTION__);
|
||||
+ goto error;
|
||||
+ }
|
||||
+ conn = domain->conn;
|
||||
+
|
||||
+ if (conn->driver->domainSetVcpusFlags) {
|
||||
+ int ret;
|
||||
+ ret = conn->driver->domainSetVcpusFlags (domain, nvcpus, flags);
|
||||
+ if (ret < 0)
|
||||
+ goto error;
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ virLibConnError (conn, VIR_ERR_NO_SUPPORT, __FUNCTION__);
|
||||
+
|
||||
+error:
|
||||
+ virDispatchError(domain->conn);
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * virDomainGetVcpusFlags:
|
||||
+ * @domain: pointer to domain object, or NULL for Domain0
|
||||
+ * @flags: an OR'ed set of virDomainVcpuFlags
|
||||
+ *
|
||||
+ * Query the number of virtual CPUs used by the domain. Note that
|
||||
+ * this call may fail if the underlying virtualization hypervisor does
|
||||
+ * not support it. This function requires privileged access to the
|
||||
+ * hypervisor.
|
||||
+ *
|
||||
+ * @flags must include either VIR_DOMAIN_VCPU_ACTIVE to query a
|
||||
+ * running domain (which will fail if domain is not active), or
|
||||
+ * VIR_DOMAIN_VCPU_PERSISTENT to query the XML description of the
|
||||
+ * domain. It is an error to set both flags.
|
||||
+ *
|
||||
+ * If @flags includes VIR_DOMAIN_VCPU_MAXIMUM, then the maximum
|
||||
+ * virtual CPU limit is queried. Otherwise, this call queries the
|
||||
+ * current virtual CPU limit.
|
||||
+ *
|
||||
+ * Returns 0 in case of success, -1 in case of failure.
|
||||
+ */
|
||||
+
|
||||
+int
|
||||
+virDomainGetVcpusFlags(virDomainPtr domain, unsigned int flags)
|
||||
+{
|
||||
+ virConnectPtr conn;
|
||||
+ VIR_DEBUG("domain=%p, flags=%u", domain, flags);
|
||||
+
|
||||
+ virResetLastError();
|
||||
+
|
||||
+ if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
|
||||
+ virLibDomainError(NULL, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
|
||||
+ virDispatchError(NULL);
|
||||
+ return (-1);
|
||||
+ }
|
||||
+
|
||||
+ /* Exactly one of these two flags should be set. */
|
||||
+ if (!(flags & VIR_DOMAIN_VCPU_LIVE) == !(flags & VIR_DOMAIN_VCPU_CONFIG)) {
|
||||
+ virLibDomainError(domain, VIR_ERR_INVALID_ARG, __FUNCTION__);
|
||||
+ goto error;
|
||||
+ }
|
||||
+ conn = domain->conn;
|
||||
+
|
||||
+ if (conn->driver->domainGetVcpusFlags) {
|
||||
+ int ret;
|
||||
+ ret = conn->driver->domainGetVcpusFlags (domain, flags);
|
||||
+ if (ret < 0)
|
||||
+ goto error;
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ virLibConnError (conn, VIR_ERR_NO_SUPPORT, __FUNCTION__);
|
||||
+
|
||||
+error:
|
||||
+ virDispatchError(domain->conn);
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
* virDomainPinVcpu:
|
||||
* @domain: pointer to domain object, or NULL for Domain0
|
||||
* @vcpu: virtual CPU number
|
||||
* @cpumap: pointer to a bit map of real CPUs (in 8-bit bytes) (IN)
|
||||
- * Each bit set to 1 means that corresponding CPU is usable.
|
||||
- * Bytes are stored in little-endian order: CPU0-7, 8-15...
|
||||
- * In each byte, lowest CPU number is least significant bit.
|
||||
+ * Each bit set to 1 means that corresponding CPU is usable.
|
||||
+ * Bytes are stored in little-endian order: CPU0-7, 8-15...
|
||||
+ * In each byte, lowest CPU number is least significant bit.
|
||||
* @maplen: number of bytes in cpumap, from 1 up to size of CPU map in
|
||||
* underlying virtualization system (Xen...).
|
||||
* If maplen < size, missing bytes are set to zero.
|
||||
@@ -5371,9 +5499,9 @@ error:
|
||||
*
|
||||
* Provides the maximum number of virtual CPUs supported for
|
||||
* the guest VM. If the guest is inactive, this is basically
|
||||
- * the same as virConnectGetMaxVcpus. If the guest is running
|
||||
+ * the same as virConnectGetMaxVcpus(). If the guest is running
|
||||
* this will reflect the maximum number of virtual CPUs the
|
||||
- * guest was booted with.
|
||||
+ * guest was booted with. For more details, see virDomainGetVcpusFlags().
|
||||
*
|
||||
* Returns the maximum of virtual CPU or -1 in case of error.
|
||||
*/
|
||||
--
|
||||
1.7.2.3
|
||||
|
421
docs/api_extension/0005-implement-the-remote-protocol.patch
Normal file
421
docs/api_extension/0005-implement-the-remote-protocol.patch
Normal file
@@ -0,0 +1,421 @@
|
||||
From eb826444f90c2563dadf148630b0cd6a9b41ba1e Mon Sep 17 00:00:00 2001
|
||||
From: Eric Blake <eblake@redhat.com>
|
||||
Date: Mon, 27 Sep 2010 10:10:06 -0600
|
||||
Subject: [PATCH 05/15] vcpu: implement the remote protocol
|
||||
|
||||
Done by editing the first three files, then running
|
||||
'make -C src rpcgen', then editing src/remote_protocol-structs
|
||||
to match.
|
||||
|
||||
* daemon/remote.c (remoteDispatchDomainSetVcpusFlags)
|
||||
(remoteDispatchDomainGetVcpusFlags): New functions.
|
||||
* src/remote/remote_driver.c (remoteDomainSetVcpusFlags)
|
||||
(remoteDomainGetVcpusFlags, remote_driver): Client side
|
||||
serialization.
|
||||
* src/remote/remote_protocol.x
|
||||
(remote_domain_set_vcpus_flags_args)
|
||||
(remote_domain_get_vcpus_flags_args)
|
||||
(remote_domain_get_vcpus_flags_ret)
|
||||
(REMOTE_PROC_DOMAIN_SET_VCPUS_FLAGS)
|
||||
(REMOTE_PROC_DOMAIN_GET_VCPUS_FLAGS): Define wire format.
|
||||
* daemon/remote_dispatch_args.h: Regenerate.
|
||||
* daemon/remote_dispatch_prototypes.h: Likewise.
|
||||
* daemon/remote_dispatch_table.h: Likewise.
|
||||
* src/remote/remote_protocol.c: Likewise.
|
||||
* src/remote/remote_protocol.h: Likewise.
|
||||
* src/remote_protocol-structs: Likewise.
|
||||
---
|
||||
daemon/remote.c | 53 ++++++++++++++++++++++++++++++++
|
||||
daemon/remote_dispatch_args.h | 2 +
|
||||
daemon/remote_dispatch_prototypes.h | 16 ++++++++++
|
||||
daemon/remote_dispatch_ret.h | 1 +
|
||||
daemon/remote_dispatch_table.h | 10 ++++++
|
||||
src/remote/remote_driver.c | 57 +++++++++++++++++++++++++++++++++-
|
||||
src/remote/remote_protocol.c | 33 ++++++++++++++++++++
|
||||
src/remote/remote_protocol.h | 26 ++++++++++++++++
|
||||
src/remote/remote_protocol.x | 19 +++++++++++-
|
||||
src/remote_protocol-structs | 12 +++++++
|
||||
10 files changed, 226 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/daemon/remote.c b/daemon/remote.c
|
||||
index 7a96e29..323f00c 100644
|
||||
--- a/daemon/remote.c
|
||||
+++ b/daemon/remote.c
|
||||
@@ -1751,6 +1751,33 @@ oom:
|
||||
}
|
||||
|
||||
static int
|
||||
+remoteDispatchDomainGetVcpusFlags (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
+ struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||
+ virConnectPtr conn,
|
||||
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
|
||||
+ remote_error *rerr,
|
||||
+ remote_domain_get_vcpus_flags_args *args,
|
||||
+ remote_domain_get_vcpus_flags_ret *ret)
|
||||
+{
|
||||
+ virDomainPtr dom;
|
||||
+
|
||||
+ dom = get_nonnull_domain (conn, args->dom);
|
||||
+ if (dom == NULL) {
|
||||
+ remoteDispatchConnError(rerr, conn);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ ret->num = virDomainGetVcpusFlags (dom, args->flags);
|
||||
+ if (ret->num == -1) {
|
||||
+ virDomainFree(dom);
|
||||
+ remoteDispatchConnError(rerr, conn);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ virDomainFree(dom);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
remoteDispatchDomainMigratePrepare (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||
virConnectPtr conn,
|
||||
@@ -2568,6 +2595,32 @@ remoteDispatchDomainSetVcpus (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
static int
|
||||
+remoteDispatchDomainSetVcpusFlags (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
+ struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||
+ virConnectPtr conn,
|
||||
+ remote_message_header *hdr ATTRIBUTE_UNUSED,
|
||||
+ remote_error *rerr,
|
||||
+ remote_domain_set_vcpus_flags_args *args,
|
||||
+ void *ret ATTRIBUTE_UNUSED)
|
||||
+{
|
||||
+ virDomainPtr dom;
|
||||
+
|
||||
+ dom = get_nonnull_domain (conn, args->dom);
|
||||
+ if (dom == NULL) {
|
||||
+ remoteDispatchConnError(rerr, conn);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ if (virDomainSetVcpusFlags (dom, args->nvcpus, args->flags) == -1) {
|
||||
+ virDomainFree(dom);
|
||||
+ remoteDispatchConnError(rerr, conn);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ virDomainFree(dom);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
remoteDispatchDomainShutdown (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||
virConnectPtr conn,
|
||||
diff --git a/daemon/remote_dispatch_args.h b/daemon/remote_dispatch_args.h
|
||||
index d8528b6..9583e9c 100644
|
||||
--- a/daemon/remote_dispatch_args.h
|
||||
+++ b/daemon/remote_dispatch_args.h
|
||||
@@ -167,3 +167,5 @@
|
||||
remote_domain_create_with_flags_args val_remote_domain_create_with_flags_args;
|
||||
remote_domain_set_memory_parameters_args val_remote_domain_set_memory_parameters_args;
|
||||
remote_domain_get_memory_parameters_args val_remote_domain_get_memory_parameters_args;
|
||||
+ remote_domain_set_vcpus_flags_args val_remote_domain_set_vcpus_flags_args;
|
||||
+ remote_domain_get_vcpus_flags_args val_remote_domain_get_vcpus_flags_args;
|
||||
diff --git a/daemon/remote_dispatch_prototypes.h b/daemon/remote_dispatch_prototypes.h
|
||||
index b674bb4..6b35851 100644
|
||||
--- a/daemon/remote_dispatch_prototypes.h
|
||||
+++ b/daemon/remote_dispatch_prototypes.h
|
||||
@@ -306,6 +306,14 @@ static int remoteDispatchDomainGetVcpus(
|
||||
remote_error *err,
|
||||
remote_domain_get_vcpus_args *args,
|
||||
remote_domain_get_vcpus_ret *ret);
|
||||
+static int remoteDispatchDomainGetVcpusFlags(
|
||||
+ struct qemud_server *server,
|
||||
+ struct qemud_client *client,
|
||||
+ virConnectPtr conn,
|
||||
+ remote_message_header *hdr,
|
||||
+ remote_error *err,
|
||||
+ remote_domain_get_vcpus_flags_args *args,
|
||||
+ remote_domain_get_vcpus_flags_ret *ret);
|
||||
static int remoteDispatchDomainHasCurrentSnapshot(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@@ -554,6 +562,14 @@ static int remoteDispatchDomainSetVcpus(
|
||||
remote_error *err,
|
||||
remote_domain_set_vcpus_args *args,
|
||||
void *ret);
|
||||
+static int remoteDispatchDomainSetVcpusFlags(
|
||||
+ struct qemud_server *server,
|
||||
+ struct qemud_client *client,
|
||||
+ virConnectPtr conn,
|
||||
+ remote_message_header *hdr,
|
||||
+ remote_error *err,
|
||||
+ remote_domain_set_vcpus_flags_args *args,
|
||||
+ void *ret);
|
||||
static int remoteDispatchDomainShutdown(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
diff --git a/daemon/remote_dispatch_ret.h b/daemon/remote_dispatch_ret.h
|
||||
index 17c9bca..3723b00 100644
|
||||
--- a/daemon/remote_dispatch_ret.h
|
||||
+++ b/daemon/remote_dispatch_ret.h
|
||||
@@ -136,3 +136,4 @@
|
||||
remote_domain_get_block_info_ret val_remote_domain_get_block_info_ret;
|
||||
remote_domain_create_with_flags_ret val_remote_domain_create_with_flags_ret;
|
||||
remote_domain_get_memory_parameters_ret val_remote_domain_get_memory_parameters_ret;
|
||||
+ remote_domain_get_vcpus_flags_ret val_remote_domain_get_vcpus_flags_ret;
|
||||
diff --git a/daemon/remote_dispatch_table.h b/daemon/remote_dispatch_table.h
|
||||
index 47d95eb..dd2adc7 100644
|
||||
--- a/daemon/remote_dispatch_table.h
|
||||
+++ b/daemon/remote_dispatch_table.h
|
||||
@@ -997,3 +997,13 @@
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_get_memory_parameters_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_domain_get_memory_parameters_ret,
|
||||
},
|
||||
+{ /* DomainSetVcpusFlags => 199 */
|
||||
+ .fn = (dispatch_fn) remoteDispatchDomainSetVcpusFlags,
|
||||
+ .args_filter = (xdrproc_t) xdr_remote_domain_set_vcpus_flags_args,
|
||||
+ .ret_filter = (xdrproc_t) xdr_void,
|
||||
+},
|
||||
+{ /* DomainGetVcpusFlags => 200 */
|
||||
+ .fn = (dispatch_fn) remoteDispatchDomainGetVcpusFlags,
|
||||
+ .args_filter = (xdrproc_t) xdr_remote_domain_get_vcpus_flags_args,
|
||||
+ .ret_filter = (xdrproc_t) xdr_remote_domain_get_vcpus_flags_ret,
|
||||
+},
|
||||
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
|
||||
index 1a687ad..37c37ef 100644
|
||||
--- a/src/remote/remote_driver.c
|
||||
+++ b/src/remote/remote_driver.c
|
||||
@@ -2580,6 +2580,59 @@ done:
|
||||
}
|
||||
|
||||
static int
|
||||
+remoteDomainSetVcpusFlags (virDomainPtr domain, unsigned int nvcpus,
|
||||
+ unsigned int flags)
|
||||
+{
|
||||
+ int rv = -1;
|
||||
+ remote_domain_set_vcpus_flags_args args;
|
||||
+ struct private_data *priv = domain->conn->privateData;
|
||||
+
|
||||
+ remoteDriverLock(priv);
|
||||
+
|
||||
+ make_nonnull_domain (&args.dom, domain);
|
||||
+ args.nvcpus = nvcpus;
|
||||
+ args.flags = flags;
|
||||
+
|
||||
+ if (call (domain->conn, priv, 0, REMOTE_PROC_DOMAIN_SET_VCPUS_FLAGS,
|
||||
+ (xdrproc_t) xdr_remote_domain_set_vcpus_flags_args,
|
||||
+ (char *) &args,
|
||||
+ (xdrproc_t) xdr_void, (char *) NULL) == -1)
|
||||
+ goto done;
|
||||
+
|
||||
+ rv = 0;
|
||||
+
|
||||
+done:
|
||||
+ remoteDriverUnlock(priv);
|
||||
+ return rv;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+remoteDomainGetVcpusFlags (virDomainPtr domain, unsigned int flags)
|
||||
+{
|
||||
+ int rv = -1;
|
||||
+ remote_domain_get_vcpus_flags_args args;
|
||||
+ remote_domain_get_vcpus_flags_ret ret;
|
||||
+ struct private_data *priv = domain->conn->privateData;
|
||||
+
|
||||
+ remoteDriverLock(priv);
|
||||
+
|
||||
+ make_nonnull_domain (&args.dom, domain);
|
||||
+ args.flags = flags;
|
||||
+
|
||||
+ memset (&ret, 0, sizeof ret);
|
||||
+ if (call (domain->conn, priv, 0, REMOTE_PROC_DOMAIN_GET_VCPUS_FLAGS,
|
||||
+ (xdrproc_t) xdr_remote_domain_get_vcpus_flags_args, (char *) &args,
|
||||
+ (xdrproc_t) xdr_remote_domain_get_vcpus_flags_ret, (char *) &ret) == -1)
|
||||
+ goto done;
|
||||
+
|
||||
+ rv = ret.num;
|
||||
+
|
||||
+done:
|
||||
+ remoteDriverUnlock(priv);
|
||||
+ return rv;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
remoteDomainPinVcpu (virDomainPtr domain,
|
||||
unsigned int vcpu,
|
||||
unsigned char *cpumap,
|
||||
@@ -10468,8 +10521,8 @@ static virDriver remote_driver = {
|
||||
remoteDomainRestore, /* domainRestore */
|
||||
remoteDomainCoreDump, /* domainCoreDump */
|
||||
remoteDomainSetVcpus, /* domainSetVcpus */
|
||||
- NULL, /* domainSetVcpusFlags */
|
||||
- NULL, /* domainGetVcpusFlags */
|
||||
+ remoteDomainSetVcpusFlags, /* domainSetVcpusFlags */
|
||||
+ remoteDomainGetVcpusFlags, /* domainGetVcpusFlags */
|
||||
remoteDomainPinVcpu, /* domainPinVcpu */
|
||||
remoteDomainGetVcpus, /* domainGetVcpus */
|
||||
remoteDomainGetMaxVcpus, /* domainGetMaxVcpus */
|
||||
diff --git a/src/remote/remote_protocol.c b/src/remote/remote_protocol.c
|
||||
index 5c55713..38ea050 100644
|
||||
--- a/src/remote/remote_protocol.c
|
||||
+++ b/src/remote/remote_protocol.c
|
||||
@@ -1355,6 +1355,39 @@ xdr_remote_domain_set_vcpus_args (XDR *xdrs, remote_domain_set_vcpus_args *objp)
|
||||
}
|
||||
|
||||
bool_t
|
||||
+xdr_remote_domain_set_vcpus_flags_args (XDR *xdrs, remote_domain_set_vcpus_flags_args *objp)
|
||||
+{
|
||||
+
|
||||
+ if (!xdr_remote_nonnull_domain (xdrs, &objp->dom))
|
||||
+ return FALSE;
|
||||
+ if (!xdr_u_int (xdrs, &objp->nvcpus))
|
||||
+ return FALSE;
|
||||
+ if (!xdr_u_int (xdrs, &objp->flags))
|
||||
+ return FALSE;
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+bool_t
|
||||
+xdr_remote_domain_get_vcpus_flags_args (XDR *xdrs, remote_domain_get_vcpus_flags_args *objp)
|
||||
+{
|
||||
+
|
||||
+ if (!xdr_remote_nonnull_domain (xdrs, &objp->dom))
|
||||
+ return FALSE;
|
||||
+ if (!xdr_u_int (xdrs, &objp->flags))
|
||||
+ return FALSE;
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+bool_t
|
||||
+xdr_remote_domain_get_vcpus_flags_ret (XDR *xdrs, remote_domain_get_vcpus_flags_ret *objp)
|
||||
+{
|
||||
+
|
||||
+ if (!xdr_int (xdrs, &objp->num))
|
||||
+ return FALSE;
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+bool_t
|
||||
xdr_remote_domain_pin_vcpu_args (XDR *xdrs, remote_domain_pin_vcpu_args *objp)
|
||||
{
|
||||
char **objp_cpp0 = (char **) (void *) &objp->cpumap.cpumap_val;
|
||||
diff --git a/src/remote/remote_protocol.h b/src/remote/remote_protocol.h
|
||||
index 756da11..d75e76c 100644
|
||||
--- a/src/remote/remote_protocol.h
|
||||
+++ b/src/remote/remote_protocol.h
|
||||
@@ -750,6 +750,24 @@ struct remote_domain_set_vcpus_args {
|
||||
};
|
||||
typedef struct remote_domain_set_vcpus_args remote_domain_set_vcpus_args;
|
||||
|
||||
+struct remote_domain_set_vcpus_flags_args {
|
||||
+ remote_nonnull_domain dom;
|
||||
+ u_int nvcpus;
|
||||
+ u_int flags;
|
||||
+};
|
||||
+typedef struct remote_domain_set_vcpus_flags_args remote_domain_set_vcpus_flags_args;
|
||||
+
|
||||
+struct remote_domain_get_vcpus_flags_args {
|
||||
+ remote_nonnull_domain dom;
|
||||
+ u_int flags;
|
||||
+};
|
||||
+typedef struct remote_domain_get_vcpus_flags_args remote_domain_get_vcpus_flags_args;
|
||||
+
|
||||
+struct remote_domain_get_vcpus_flags_ret {
|
||||
+ int num;
|
||||
+};
|
||||
+typedef struct remote_domain_get_vcpus_flags_ret remote_domain_get_vcpus_flags_ret;
|
||||
+
|
||||
struct remote_domain_pin_vcpu_args {
|
||||
remote_nonnull_domain dom;
|
||||
int vcpu;
|
||||
@@ -2281,6 +2299,8 @@ enum remote_procedure {
|
||||
REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS = 196,
|
||||
REMOTE_PROC_DOMAIN_SET_MEMORY_PARAMETERS = 197,
|
||||
REMOTE_PROC_DOMAIN_GET_MEMORY_PARAMETERS = 198,
|
||||
+ REMOTE_PROC_DOMAIN_SET_VCPUS_FLAGS = 199,
|
||||
+ REMOTE_PROC_DOMAIN_GET_VCPUS_FLAGS = 200,
|
||||
};
|
||||
typedef enum remote_procedure remote_procedure;
|
||||
|
||||
@@ -2422,6 +2442,9 @@ extern bool_t xdr_remote_domain_define_xml_args (XDR *, remote_domain_define_xm
|
||||
extern bool_t xdr_remote_domain_define_xml_ret (XDR *, remote_domain_define_xml_ret*);
|
||||
extern bool_t xdr_remote_domain_undefine_args (XDR *, remote_domain_undefine_args*);
|
||||
extern bool_t xdr_remote_domain_set_vcpus_args (XDR *, remote_domain_set_vcpus_args*);
|
||||
+extern bool_t xdr_remote_domain_set_vcpus_flags_args (XDR *, remote_domain_set_vcpus_flags_args*);
|
||||
+extern bool_t xdr_remote_domain_get_vcpus_flags_args (XDR *, remote_domain_get_vcpus_flags_args*);
|
||||
+extern bool_t xdr_remote_domain_get_vcpus_flags_ret (XDR *, remote_domain_get_vcpus_flags_ret*);
|
||||
extern bool_t xdr_remote_domain_pin_vcpu_args (XDR *, remote_domain_pin_vcpu_args*);
|
||||
extern bool_t xdr_remote_domain_get_vcpus_args (XDR *, remote_domain_get_vcpus_args*);
|
||||
extern bool_t xdr_remote_domain_get_vcpus_ret (XDR *, remote_domain_get_vcpus_ret*);
|
||||
@@ -2762,6 +2785,9 @@ extern bool_t xdr_remote_domain_define_xml_args ();
|
||||
extern bool_t xdr_remote_domain_define_xml_ret ();
|
||||
extern bool_t xdr_remote_domain_undefine_args ();
|
||||
extern bool_t xdr_remote_domain_set_vcpus_args ();
|
||||
+extern bool_t xdr_remote_domain_set_vcpus_flags_args ();
|
||||
+extern bool_t xdr_remote_domain_get_vcpus_flags_args ();
|
||||
+extern bool_t xdr_remote_domain_get_vcpus_flags_ret ();
|
||||
extern bool_t xdr_remote_domain_pin_vcpu_args ();
|
||||
extern bool_t xdr_remote_domain_get_vcpus_args ();
|
||||
extern bool_t xdr_remote_domain_get_vcpus_ret ();
|
||||
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
|
||||
index e80fb5f..d57e6d0 100644
|
||||
--- a/src/remote/remote_protocol.x
|
||||
+++ b/src/remote/remote_protocol.x
|
||||
@@ -768,6 +768,21 @@ struct remote_domain_set_vcpus_args {
|
||||
int nvcpus;
|
||||
};
|
||||
|
||||
+struct remote_domain_set_vcpus_flags_args {
|
||||
+ remote_nonnull_domain dom;
|
||||
+ unsigned int nvcpus;
|
||||
+ unsigned int flags;
|
||||
+};
|
||||
+
|
||||
+struct remote_domain_get_vcpus_flags_args {
|
||||
+ remote_nonnull_domain dom;
|
||||
+ unsigned int flags;
|
||||
+};
|
||||
+
|
||||
+struct remote_domain_get_vcpus_flags_ret {
|
||||
+ int num;
|
||||
+};
|
||||
+
|
||||
struct remote_domain_pin_vcpu_args {
|
||||
remote_nonnull_domain dom;
|
||||
int vcpu;
|
||||
@@ -2062,7 +2077,9 @@ enum remote_procedure {
|
||||
REMOTE_PROC_DOMAIN_EVENT_IO_ERROR_REASON = 195,
|
||||
REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS = 196,
|
||||
REMOTE_PROC_DOMAIN_SET_MEMORY_PARAMETERS = 197,
|
||||
- REMOTE_PROC_DOMAIN_GET_MEMORY_PARAMETERS = 198
|
||||
+ REMOTE_PROC_DOMAIN_GET_MEMORY_PARAMETERS = 198,
|
||||
+ REMOTE_PROC_DOMAIN_SET_VCPUS_FLAGS = 199,
|
||||
+ REMOTE_PROC_DOMAIN_GET_VCPUS_FLAGS = 200
|
||||
|
||||
/*
|
||||
* Notice how the entries are grouped in sets of 10 ?
|
||||
diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs
|
||||
index 838423e..d505886 100644
|
||||
--- a/src/remote_protocol-structs
|
||||
+++ b/src/remote_protocol-structs
|
||||
@@ -461,6 +461,18 @@ struct remote_domain_set_vcpus_args {
|
||||
remote_nonnull_domain dom;
|
||||
int nvcpus;
|
||||
};
|
||||
+struct remote_domain_set_vcpus_flags_args {
|
||||
+ remote_nonnull_domain dom;
|
||||
+ u_int nvcpus;
|
||||
+ u_int flags;
|
||||
+};
|
||||
+struct remote_domain_get_vcpus_flags_args {
|
||||
+ remote_nonnull_domain dom;
|
||||
+ u_int flags;
|
||||
+};
|
||||
+struct remote_domain_get_vcpus_flags_ret {
|
||||
+ int num;
|
||||
+};
|
||||
struct remote_domain_pin_vcpu_args {
|
||||
remote_nonnull_domain dom;
|
||||
int vcpu;
|
||||
--
|
||||
1.7.2.3
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user