Skip to content

Commit 15af6e0

Browse files
committed
Initial commit
0 parents  commit 15af6e0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+10207
-0
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
rpm/
2+
deb/
3+
*~
4+
*.o
5+
*.so
6+
*.pc

.travis.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
sudo: required
2+
dist: bionic
3+
language: generic
4+
install: git clone https://github.com/QubesOS/qubes-builder ~/qubes-builder
5+
script: ~/qubes-builder/scripts/travis-build
6+
env:
7+
- DISTS_VM=fc29 USE_QUBES_REPO_VERSION=4.1 USE_QUBES_REPO_TESTING=1
8+
- DISTS_VM=fc30 USE_QUBES_REPO_VERSION=4.1 USE_QUBES_REPO_TESTING=1
9+
- DISTS_VM=stretch USE_QUBES_REPO_VERSION=4.1 USE_QUBES_REPO_TESTING=1
10+
- DISTS_VM=buster USE_QUBES_REPO_VERSION=4.1 USE_QUBES_REPO_TESTING=1
11+
- DISTS_VM=bullseye USE_QUBES_REPO_VERSION=4.1 USE_QUBES_REPO_TESTING=1
12+
- DISTS_VM=centos7 USE_QUBES_REPO_VERSION=4.1 USE_QUBES_REPO_TESTING=1
13+
- DIST_DOM0=fc31 USE_QUBES_REPO_VERSION=4.1 USE_QUBES_REPO_TESTING=1

Makefile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
PREFIX ?= /usr
2+
SBIN ?= $(PREFIX)/sbin
3+
LIBDIR ?= $(PREFIX)/lib
4+
INCLUDEDIR ?= $(PREFIX)/include
5+
6+
help:
7+
@echo "make all -- build binaries"
8+
@echo "make clean -- cleanup"
9+
10+
all:
11+
$(MAKE) -C libkvmchan
12+
13+
install:
14+
install -D libkvmchan/kvmchand ${DESTDIR}$(SBIN)/kvmchand
15+
install -D libkvmchan/libkvmchan.so ${DESTDIR}$(LIBDIR)/libkvmchan.so
16+
install -D -m 0644 libkvmchan/libkvmchan.h ${DESTDIR}$(INCLUDEDIR)/libkvmchan.h
17+
install -D -m 0644 libkvmchan/libkvmchan-priv.h ${DESTDIR}$(INCLUDEDIR)/libkvmchan-priv.h
18+
install -D -m 0644 libkvmchan/kvmchan.pc ${DESTDIR}$(LIBDIR)/pkgconfig/kvmchan.pc
19+
20+
clean:
21+
make -C libkvmchan clean

Makefile.builder

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
RPM_SPEC_FILES := rpm_spec/libkvmchan.spec
2+
ARCH_BUILD_DIRS := archlinux
3+
4+
ifeq ($(PACKAGE_SET),vm)
5+
ifneq ($(filter $(DISTRIBUTION), debian qubuntu),)
6+
DEBIAN_BUILD_DIRS := debian
7+
endif
8+
9+
WIN_COMPILER = msbuild
10+
WIN_SOURCE_SUBDIRS = windows
11+
WIN_BUILD_DEPS = vmm-xen-windows-pvdrivers
12+
WIN_OUTPUT_LIBS = bin
13+
WIN_OUTPUT_HEADERS = include
14+
WIN_PREBUILD_CMD = set_version.bat && powershell -executionpolicy bypass -File set_version.ps1 < nul
15+
WIN_SLN_DIR = vs2017
16+
endif
17+
18+
# vim: filetype=make

archlinux/PKGBUILD

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/bin/bash
2+
# shellcheck disable=SC2034
3+
4+
# This is an example PKGBUILD file. Use this as a start to creating your own,
5+
# and remove these comments. For more information, see 'man PKGBUILD'.
6+
# NOTE: Please fill out the license field for your package! If it is unknown,
7+
# then please put 'unknown'.
8+
9+
# Maintainer: Olivier Medoc <[email protected]>
10+
pkgname=libkvmchan
11+
pkgver=`cat version`
12+
pkgrel=2
13+
14+
epoch=
15+
pkgdesc="An implementation of the Xen libvchan shared memory API for KVM+QEMU."
16+
arch=("x86_64")
17+
url="http://qubes-os.org/"
18+
license=('GPL')
19+
groups=()
20+
depends=(pkgconfig)
21+
makedepends=(check-devel libvirt-devel libxml2-devel)
22+
checkdepends=()
23+
optdepends=()
24+
provides=('qubes-core-libs' 'qubes-libvchan')
25+
conflicts=()
26+
replaces=('')
27+
backup=()
28+
options=()
29+
install=
30+
changelog=
31+
32+
source=()
33+
34+
noextract=()
35+
md5sums=() #generate with 'makepkg -g'
36+
37+
38+
build() {
39+
40+
ln -s $srcdir/../libkvmchan $srcdir/libkvmchan
41+
42+
(cd libkvmchan; make)
43+
44+
}
45+
46+
package() {
47+
48+
install -D libkvmchan/kvmchand $pkgdir/usr/sbin/kvmchand
49+
install -D libkvmchan/libkvmchan.so $pkgdir/usr/lib/libkvmchan.so
50+
install -D -m 0644 libkvmchan/libkvmchan.h $pkgdir/usr/include/libkvmchan.h
51+
install -D -m 0644 libkvmchan/libkvmchan-priv.h $pkgdir/usr/include/libkvmchan-priv.h
52+
install -D -m 0644 libkvmchan/kvmchan.pc $pkgdir/usr/lib/pkgconfig/kvmchan.pc
53+
54+
}
55+
56+
# vim:set ts=2 sw=2 et:
57+

debian-quilt

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
# vim: set ts=4 sw=4 sts=4 et :
3+
#
4+
# Given a series.conf file and debian patches directory, patches
5+
# are copied to debian patch directory
6+
7+
USAGE="${0} <series.conf> <patchdir>"
8+
9+
set -e
10+
set -o pipefail
11+
12+
DIR="${0%/*}"
13+
SERIES_CONF="${1}"
14+
PATCH_DIR="${2}"
15+
16+
if test $# -lt 2 || [ ! -e "${SERIES_CONF}" ] || [ ! -d "${PATCH_DIR}" ] ; then
17+
echo "${USAGE}" >&2
18+
exit 1
19+
fi
20+
21+
# Clear patch series.conf file
22+
rm -f "${PATCH_DIR}/series"
23+
touch "${PATCH_DIR}/series"
24+
25+
while read patch_file
26+
do
27+
if [ -e "${DIR}/${patch_file}" ]; then
28+
echo -e "${patch_file##*/}" >> "${PATCH_DIR}/series"
29+
cp "${DIR}/${patch_file}" "${PATCH_DIR}"
30+
fi
31+
done < "${SERIES_CONF}"

debian/README

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
libkvmchan
2+
----------
3+
4+
See http://www.qubes-os.org/
5+
6+
-- Jason Mehring <[email protected]> Mon, 28 Jul 2020 13:34:00 -0500

debian/README.configuration

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
Debian Packaging Guide
2+
----------------------
3+
https://www.debian.org/doc/manuals/maint-guide/first.en.html
4+
5+
6+
===============================================================================
7+
Bash.rc
8+
===============================================================================
9+
# Assume usename 'user' running this, otherwise
10+
# /home/user/.bashrc
11+
cat >>~/.bashrc <<'EOF'
12+
13+
DEBFULLNAME="Qubes Builder"
14+
export DEBMAIL DEBFULLNAME
15+
16+
alias dquilt="quilt --quiltrc=${HOME}/.quiltrc-dpkg"
17+
complete -F _quilt_completion $_quilt_complete_opt dquilt
18+
EOF
19+
20+
21+
===============================================================================
22+
Quilt RC
23+
===============================================================================
24+
cat >>~/.quiltrc-dpkg <<'EOF'
25+
d=. ; while [ ! -d $d/debian -a `readlink -e $d` != / ]; do d=$d/..; done
26+
if [ -d $d/debian ] && [ -z $QUILT_PATCHES ]; then
27+
# if in Debian packaging tree with unset $QUILT_PATCHES
28+
QUILT_PATCHES="debian/patches"
29+
QUILT_PATCH_OPTS="--reject-format=unified"
30+
QUILT_DIFF_ARGS="-p ab --no-timestamps --no-index --color=auto"
31+
QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index"
32+
QUILT_COLORS="diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33"
33+
if ! [ -d $d/debian/patches ]; then mkdir $d/debian/patches; fi
34+
fi
35+
EOF
36+
37+
===============================================================================
38+
Create a fresh Debian configuration
39+
===============================================================================
40+
apt-get dh-make
41+
42+
# Example
43+
$ cd ~/gentoo
44+
$ wget http://example.org/gentoo-0.9.12.tar.gz
45+
$ tar -xvzf gentoo-0.9.12.tar.gz
46+
$ cd gentoo-0.9.12
47+
$ dh_make -f ../gentoo-0.9.12.tar.gz
48+
49+
50+
===============================================================================
51+
Adding Patches
52+
===============================================================================
53+
https://www.debian.org/doc/manuals/maint-guide/modify.en.html
54+
55+
# When anyone (including yourself) provides a patch foo.patch to the source
56+
# later, modifying a 3.0 (quilt) source package is quite simple:
57+
$ dpkg-source -x gentoo_0.9.12.dsc
58+
$ cd gentoo-0.9.12
59+
$ dquilt import ../foo.patch
60+
$ dquilt push
61+
$ dquilt refresh
62+
$ dquilt header -e
63+
... describe patch
64+
65+
66+
67+
===============================================================================
68+
Other
69+
===============================================================================
70+
# To list all dh_ modules...
71+
man -k dh_
72+
73+
# To indicate what build-depends are required!
74+
dpkg-depcheck -d ./configure
75+
76+
# Test build (unsigned)
77+
dpkg-buildpackage -us -uc

debian/changelog

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
libkvmchan (4.1.0-1) unstable; urgency=medium
2+
3+
* Initial commit
4+
5+
-- Jason Mehring <[email protected]> Mon, 28 Jul 2020 13:34:00 -0500

debian/compat

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9

debian/control

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Source: libkvmchan
2+
Section: libs
3+
Priority: extra
4+
Maintainer: Jason Mehring <[email protected]>
5+
## XXX: libvirt-dev and libxml2-dev are temp depends. The libkvmchan code needs
6+
## to be split into host / guest modules since libvirt is only required on
7+
## host.
8+
Build-Depends: debhelper, quilt, autotools-dev, check, libvirt-dev, libxml2-dev
9+
Standards-Version: 3.9.5
10+
Homepage: http://www.qubes-os.org
11+
12+
Package: libkvmchan
13+
Section: libs
14+
Architecture: amd64
15+
#Depends: libxenstore3.0, ${shlibs:Depends}, ${misc:Depends}
16+
Depends: ${shlibs:Depends}, ${misc:Depends}
17+
Description:
18+
An implementation of the Xen libvchan shared memory API for KVM+QEMU. It
19+
utilizes ivshmem to provide the memory backend and a custom daemon to allow
20+
run-time configuration of vchans.
21+
22+
Package: libkvmchan-dev
23+
Section: libdevel
24+
Architecture: amd64
25+
Depends: libkvmchan (= ${binary:Version}), ${misc:Depends}
26+
Description: Development files for libkvmchan communication library.

debian/copyright

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: libkvmchan
3+
Source: <https://github.com/shawnanastasio/libkvmchan>
4+
5+
Files: *
6+
Copyright: ?-2020 Qubes Developers
7+
License: GPL-2+
8+
This package is free software; you can redistribute it and/or modify
9+
it under the terms of the GNU General Public License as published by
10+
the Free Software Foundation; either version 2 of the License, or
11+
(at your option) any later version.
12+
.
13+
This package is distributed in the hope that it will be useful,
14+
but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
GNU General Public License for more details.
17+
.
18+
You should have received a copy of the GNU General Public License
19+
along with this program. If not, see <http://www.gnu.org/licenses/>
20+
.
21+
On Debian systems, the complete text of the GNU General
22+
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
23+
24+
Files: debian/*
25+
Copyright: 2020 Jason Mehring <[email protected]>
26+
License: GPL-2+
27+
This package is free software; you can redistribute it and/or modify
28+
it under the terms of the GNU General Public License as published by
29+
the Free Software Foundation; either version 2 of the License, or
30+
(at your option) any later version.
31+
.
32+
This package is distributed in the hope that it will be useful,
33+
but WITHOUT ANY WARRANTY; without even the implied warranty of
34+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35+
GNU General Public License for more details.
36+
.
37+
You should have received a copy of the GNU General Public License
38+
along with this program. If not, see <http://www.gnu.org/licenses/>
39+
.
40+
On Debian systems, the complete text of the GNU General
41+
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
42+
43+
Files: libkvmchan/*
44+
Copyright: 2018-2019 Shawn Anastasio
45+
License: GPL-3+
46+
This package is free software: you can redistribute it and/or modify
47+
it under the terms of the GNU Lesser General Public License as published by
48+
the Free Software Foundation, either version 3 of the License, or
49+
(at your option) any later version.
50+
.
51+
This package is distributed in the hope that it will be useful,
52+
but WITHOUT ANY WARRANTY; without even the implied warranty of
53+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
54+
GNU Lesser General Public License for more details.
55+
.
56+
You should have received a copy of the GNU Lesser General Public License
57+
along with this program. If not, see <https://www.gnu.org/licenses/>.
58+
.
59+
On Debian systems, the complete text of the GNU General
60+
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".

debian/libkvmchan-dev.install

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
usr/include/libkvmchan.h
2+
usr/include/libkvmchan-priv.h
3+
usr/lib/pkgconfig/kvmchan.pc

debian/libkvmchan.install

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
usr/sbin/kvmchand
2+
usr/lib/libkvmchan.so

debian/patches/.gitignore

Whitespace-only changes.

debian/rules

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/make -f
2+
# -*- makefile -*-
3+
4+
# Uncomment this to turn on verbose mode.
5+
#export DH_VERBOSE=1
6+
7+
DPKG_EXPORT_BUILDFLAGS = 1
8+
include /usr/share/dpkg/default.mk
9+
10+
export DESTDIR=$(shell pwd)/debian/tmp
11+
12+
%:
13+
dh $@ --with autotools-dev
14+
15+
override_dh_auto_build:
16+
make all LIBDIR=/usr/lib
17+
18+
override_dh_auto_install:
19+
make install LIBDIR=/usr/lib

debian/source/format

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0 (quilt)

debian/source/options

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
extend-diff-ignore = "(^|/)(.git/.*)$"
2+
extend-diff-ignore = "(^|/)(deb/.*)$"
3+
extend-diff-ignore = "(^|/)(pkgs/.*)$"
4+
extend-diff-ignore = "(^|/)(rpm/.*)$"

0 commit comments

Comments
 (0)