Internal restructuring of stx-integ

Create new directories:
   ceph
   config
   config-files
   filesystem
   kernel
   kernel/kernel-modules
   ldap
   logging
   strorage-drivers
   tools
   utilities
   virt

Retire directories:
   connectivity
   core
   devtools
   support
   extended

Delete two packages:
   tgt
   irqbalance

Relocated packages:
   base/
      dhcp
      initscripts
      libevent
      lighttpd
      linuxptp
      memcached
      net-snmp
      novnc
      ntp
      openssh
      pam
      procps
      sanlock
      shadow
      sudo
      systemd
      util-linux
      vim
      watchdog

   ceph/
      python-cephclient

   config/
      facter
      puppet-4.8.2
      puppet-modules

   filesystem/
      e2fsprogs
      nfs-utils
      nfscheck

   kernel/
      kernel-std
      kernel-rt

   kernel/kernel-modules/
      mlnx-ofa_kernel

   ldap/
      nss-pam-ldapd
      openldap

   logging/
      syslog-ng
      logrotate

   networking/
      lldpd
      iproute
      mellanox
      python-ryu
      mlx4-config

   python/
      python-2.7.5
      python-django
      python-gunicorn
      python-setuptools
      python-smartpm
      python-voluptuous

   security/
      shim-signed
      shim-unsigned
      tboot

   strorage-drivers/
      python-3parclient
      python-lefthandclient

   virt/
      cloud-init
      libvirt
      libvirt-python
      qemu

   tools/
      storage-topology
      vm-topology

   utilities/
      tis-extensions
      namespace-utils
      nova-utils
      update-motd

Change-Id: I37ade764d873c701b35eac5881eb40412ba64a86
Story: 2002801
Task: 22687
Signed-off-by: Scott Little <scott.little@windriver.com>
This commit is contained in:
Scott Little 2018-08-01 10:02:19 -04:00
commit 1a18f537bf
53 changed files with 8763 additions and 0 deletions

6
libvirt/.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
!.distro
.distro/centos7/rpmbuild/RPMS
.distro/centos7/rpmbuild/SRPMS
.distro/centos7/rpmbuild/BUILD
.distro/centos7/rpmbuild/BUILDROOT
.distro/centos7/rpmbuild/SOURCES/libvirt*tar.gz

16
libvirt/PKG-INFO Normal file
View File

@ -0,0 +1,16 @@
Metadata-Version: 1.1
Name: libvirt
Version: 1.2.17
Summary: Library providing a simple virtualization API
Home-page:
Author: Windriver
Author-email: info@windriver.com
License: Apache-2.0
Description:
Libvirt is a C toolkit to interact with the virtualization capabilities
of recent versions of Linux (and other OSes). The main package includes
the libvirtd server exporting the virtualization support.
Platform: UNKNOWN

37
libvirt/README Normal file
View File

@ -0,0 +1,37 @@
The Centos 7 libvirt source rpm was taken from:
http://vault.centos.org/centos/7/updates/Source/SPackages/libvirt-1.2.17-13.el7_2.3.src.rpm
It's possible to resolve the source rpm based on the yum repos:
$ yumdownloader --source --urls libvirt
The libvirt source code was forked under .../cgcs/git/libvirt.
Notes: - The branch is based on upstream tag v1.2.17-maint.
- Then each RedHat patches have been committed one by one in the same
order specified in the RedHat spec (actually this was automated to use
'git am' for each of the patches mentionned in the spec).
- The last patch from RedHat is tagged 'libvirt-1.2.17-13.el7_2.3'.
- After this tag, all the patches are port from R2.
The libvirt git repository doesn't come with the ./configure script (and its
dependancies). This has to be built using autoconf (but the libvirt releases
comes with those, releases are generated using 'make dist').
One caveat is that bootstrap is made to be executed in a git tree. Trying to
execute it out of tree, like the Centos build environment, was unsuccessfull
so far.
The current workaround for now is to commit the configure scripts in the
libvirt git repo:
$ NOCONFIGURE=1 ./autogen.sh --copy
$ NOCONFIGURE=1 ./autogen.sh --copy
# Remove all .gitignore temporarily for showing modified files
$ find . -name .gitignore | xargs rm
$ git add -A
$ git reset HEAD .gitignore
# Repeat last command for all .gitignore files removed
$ git commit
Autogen is executed twice. The first time soft links are created under
build-aux/. Running it a second time makes bootstrap copying them and
replacing the soft links (there is most likely a smarter way to do this).

View File

@ -0,0 +1,8 @@
SRC_DIR="$CGCS_BASE/git/libvirt"
COPY_LIST="\
libvirt-3.5.0/* \
$CGCS_BASE/downloads/gnulib-ffc927e.tar.gz \
$CGCS_BASE/downloads/keycodemapdb-8370ba8.tar.gz"
TIS_BASE_SRCREV=9bd7c96bd0a0cc879c1e44277f5a734166bf1add
TIS_PATCH_VER=GITREVCOUNT
BUILD_IS_SLOW=4

2146
libvirt/centos/libvirt.spec Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,14 @@
/var/log/libvirt/libvirtd.log
{
nodateext
size 10M
start 1
rotate 20
missingok
notifempty
compress
sharedscripts
postrotate
/etc/init.d/syslog reload > /dev/null 2>&1 || true
endscript
}

View File

@ -0,0 +1,15 @@
/var/log/libvirt/lxc/*.log
{
nodateext
size 10M
start 1
rotate 20
missingok
notifempty
compress
sharedscripts
postrotate
/etc/init.d/syslog reload > /dev/null 2>&1 || true
endscript
}

View File

@ -0,0 +1,15 @@
/var/log/libvirt/qemu/*.log
{
nodateext
size 10M
start 1
rotate 4
missingok
notifempty
compress
sharedscripts
postrotate
/etc/init.d/syslog reload > /dev/null 2>&1 || true
endscript
}

View File

@ -0,0 +1,15 @@
/var/log/libvirt/uml/*.log
{
nodateext
size 10M
start 1
rotate 4
missingok
notifempty
compress
sharedscripts
postrotate
/etc/init.d/syslog reload > /dev/null 2>&1 || true
endscript
}

View File

@ -0,0 +1,14 @@
/var/log/libvirt/libvirtd.log
{
nodateext
size 10M
start 1
rotate 20
missingok
notifempty
compress
sharedscripts
postrotate
/etc/init.d/syslog reload > /dev/null 2>&1 || true
endscript
}

View File

@ -0,0 +1,15 @@
/var/log/libvirt/lxc/*.log
{
nodateext
size 10M
start 1
rotate 20
missingok
notifempty
compress
sharedscripts
postrotate
/etc/init.d/syslog reload > /dev/null 2>&1 || true
endscript
}

View File

@ -0,0 +1,15 @@
/var/log/libvirt/qemu/*.log
{
nodateext
size 10M
start 1
rotate 4
missingok
notifempty
compress
sharedscripts
postrotate
/etc/init.d/syslog reload > /dev/null 2>&1 || true
endscript
}

View File

@ -0,0 +1,15 @@
/var/log/libvirt/uml/*.log
{
nodateext
size 10M
start 1
rotate 4
missingok
notifempty
compress
sharedscripts
postrotate
/etc/init.d/syslog reload > /dev/null 2>&1 || true
endscript
}

6
qemu/.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
!.distro
.distro/centos7/rpmbuild/RPMS
.distro/centos7/rpmbuild/SRPMS
.distro/centos7/rpmbuild/BUILD
.distro/centos7/rpmbuild/BUILDROOT
.distro/centos7/rpmbuild/SOURCES/qemu*tar.gz

19
qemu/PKG-INFO Normal file
View File

@ -0,0 +1,19 @@
Metadata-Version: 1.1
Name: qemu
Version: 2.3.0
Summary: QEMU is a FAST! processor emulator
Home-page:
Author: Windriver
Author-email: info@windriver.com
License: Apache-2.0
Description:
qemu-kvm is an open source virtualizer that provides hardware emulation for
the KVM hypervisor. qemu-kvm acts as a virtual machine monitor together with
the KVM kernel modules, and emulates the hardware for a full system such as
a PC and its assocated peripherals.
As qemu-kvm requires no host kernel patches to run, it is safe and easy to use.
Platform: UNKNOWN

17
qemu/README Normal file
View File

@ -0,0 +1,17 @@
Get the RedHat source rpm from:
$ wget wget http://cbs.centos.org/kojifiles/packages/qemu-kvm-ev/2.3.0/31.el7_2.7.1/src/qemu-kvm-ev-2.3.0-31.el7_2.7.1.src.rpm
Uncompress the source rpm:
$ rpm2cpio qemu-kvm-ev-2.3.0-31.el7_2.7.1.src.rpm | cpio -idmv
All the patches from the redhat source rpm have been applied in git/qemu using
scripts/autopatch.sh.
Some of these patches can't be applied cleanly with 'git am'. So this script
attempd to execute 'git am' on each of them, if it fails it tries to patch
the files manually with 'git apply --index'.
A git tag 'qemu-kvm-ev-2.3.0-31.el7_2.7.1' has been added to the last patch
applied.
The Titanium Cloud specific patches will be added after this tag.

View File

@ -0,0 +1,8 @@
SRC_DIR="$CGCS_BASE/git/qemu"
COPY_LIST="$CGCS_BASE/downloads/kvm-unit-tests.git-4ea7633.tar.bz2 \
$FILES_BASE/* \
$PKG_BASE/qemu/qemu_clean \
$PKG_BASE/qemu/qemu_clean.service \
$PKG_BASE/qemu/qemu-system-x86.conf"
TIS_BASE_SRCREV=c284b3d419e1cc9b1f25661f4f636f19b1399970
TIS_PATCH_VER=GITREVCOUNT

View File

@ -0,0 +1 @@
KERNEL=="kvm", GROUP="kvm", MODE="0666"

View File

@ -0,0 +1,5 @@
# Enable kvm-setup by default. This can have odd side effects on
# PowerNV systems that aren't intended as KVM hosts, but at present we
# only support RHEL on PowerNV for the purpose of being a RHEV host.
enable kvm-setup.service

View File

@ -0,0 +1,10 @@
# The KVM HV implementation on Power can require a significant amount
# of unswappable memory (about half of which also needs to be host
# physically contiguous) to hold the guest's Hash Page Table (HPT) -
# roughly 1/64th of the guest's RAM size, minimum 16MiB.
#
# These limits allow unprivileged users to start smallish VMs, such as
# those used by libguestfs.
#
* hard memlock 65536
* soft memlock 65536

View File

@ -0,0 +1,2 @@
SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", \
TAG+="systemd" ENV{SYSTEMD_WANTS}="qemu-guest-agent.service"

View File

@ -0,0 +1,9 @@
The ROM images on /usr/share/qemu-kvm/rhel6-*.rom come from the
Red Hat Enterprise Linux 6.4 package gpxe-roms-qemu-0.9.7-6.9.el6.noarch.rpm.
The source code for those images can be downloaded from:
http://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/gpxe-0.9.7-6.9.el6.src.rpm
For more information on how to obtain source code for Red Hat Enterprise Linux
software, you can refer to Chapter 1. Obtaining Red Hat Enterprise Linux of the
Red Hat Enterprise Linux Installation Guide.

Binary file not shown.

View File

@ -0,0 +1 @@
allow virbr0

View File

@ -0,0 +1,118 @@
#!/bin/sh
_prefix=$1
shift
_libdir=$1
shift
_sysconfdir=$1
shift
_localstatedir=$1
shift
_libexecdir=$1
shift
pkgname=$1
shift
arch=$1
shift
nvr=$1
shift
optflags=$1
shift
have_fdt=$1
shift
have_gluster=$1
shift
have_guest_agent=$1
shift
have_numa=$1
shift
have_rbd=$1
shift
have_rdma=$1
shift
have_seccomp=$1
shift
have_spice=$1
shift
have_usbredir=$1
shift
have_tcmalloc=$1
shift
if [ "$have_rbd" == "enable" ]; then
rbd_driver=rbd,
fi
if [ "$have_gluster" == "enable" ]; then
gluster_driver=gluster,
fi
./configure \
--prefix=${_prefix} \
--libdir=${_libdir} \
--sysconfdir=${_sysconfdir} \
--interp-prefix=${_prefix}/qemu-%M \
--localstatedir=${_localstatedir} \
--libexecdir=${_libexecdir} \
--extra-ldflags="$extraldflags -pie -Wl,-z,relro -Wl,-z,now" \
--extra-cflags="${optflags} -fPIE -DPIE -O2" \
--with-pkgversion=${nvr} \
--with-confsuffix=/${pkgname} \
--with-coroutine=ucontext \
--with-system-pixman \
--disable-bluez \
--disable-brlapi \
--enable-cap-ng \
--enable-coroutine-pool \
--disable-curl \
--enable-curses \
--disable-debug-tcg \
--enable-docs \
--disable-gtk \
--enable-kvm \
--disable-libiscsi \
--disable-libnfs \
--disable-libssh2 \
--disable-libusb \
--disable-bzip2 \
--enable-linux-aio \
--enable-live-block-migration \
--disable-lzo \
--disable-opengl \
--enable-pie \
--disable-qom-cast-debug \
--disable-sdl \
--enable-snappy \
--disable-sparse \
--disable-strip \
--enable-tpm \
--enable-trace-backend=nop \
--disable-uuid \
--disable-vde \
--disable-vhdx \
--disable-vhost-scsi \
--enable-vhost-net \
--enable-virtfs \
--disable-vnc-jpeg \
--disable-vnc-png \
--disable-vnc-sasl \
--disable-vte \
--enable-werror \
--disable-xen \
--disable-xfsctl \
--enable-attr \
--${have_fdt}-fdt \
--${have_gluster}-glusterfs \
--${have_guest_agent}-guest-agent \
--${have_numa}-numa \
--${have_rbd}-rbd \
--${have_rdma}-rdma \
--${have_seccomp}-seccomp \
--${have_spice}-spice \
--${have_usbredir}-usb-redir \
--${have_tcmalloc}-tcmalloc \
--audio-drv-list=pa,alsa \
--block-drv-rw-whitelist=qcow2,raw,file,host_device,nbd,iscsi,${gluster_driver}${rbd_driver}blkdebug \
--block-drv-ro-whitelist=vmdk,vhdx,vpc,https,ssh \
"$@"

View File

@ -0,0 +1,13 @@
[Unit]
Description=Kernel Samepage Merging
ConditionPathExists=/sys/kernel/mm/ksm
[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=-/etc/sysconfig/ksm
ExecStart=/usr/libexec/ksmctl start
ExecStop=/usr/libexec/ksmctl stop
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,4 @@
# The maximum number of unswappable kernel pages
# which may be allocated by ksm (0 for unlimited)
# If unset, defaults to half of total memory
# KSM_MAX_KERNEL_PAGES=

View File

@ -0,0 +1,77 @@
/* Start/stop KSM, for systemd.
* Copyright (C) 2009, 2011 Red Hat, Inc.
* Written by Paolo Bonzini <pbonzini@redhat.com>.
* Based on the original sysvinit script by Dan Kenigsberg <danken@redhat.com>
* This file is distributed under the GNU General Public License, version 2
* or later. */
#include <unistd.h>
#include <stdio.h>
#include <limits.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#define KSM_MAX_KERNEL_PAGES_FILE "/sys/kernel/mm/ksm/max_kernel_pages"
#define KSM_RUN_FILE "/sys/kernel/mm/ksm/run"
char *program_name;
int usage(void)
{
fprintf(stderr, "Usage: %s {start|stop}\n", program_name);
return 1;
}
int write_value(uint64_t value, char *filename)
{
FILE *fp;
if (!(fp = fopen(filename, "w")) ||
fprintf(fp, "%llu\n", (unsigned long long) value) == EOF ||
fflush(fp) == EOF ||
fclose(fp) == EOF)
return 1;
return 0;
}
uint64_t ksm_max_kernel_pages()
{
char *var = getenv("KSM_MAX_KERNEL_PAGES");
char *endptr;
uint64_t value;
if (var && *var) {
value = strtoll(var, &endptr, 0);
if (value < LLONG_MAX && !*endptr)
return value;
}
/* Unless KSM_MAX_KERNEL_PAGES is set, let KSM munch up to half of
* total memory. */
return sysconf(_SC_PHYS_PAGES) / 2;
}
int start(void)
{
if (access(KSM_MAX_KERNEL_PAGES_FILE, R_OK) >= 0)
write_value(ksm_max_kernel_pages(), KSM_MAX_KERNEL_PAGES_FILE);
return write_value(1, KSM_RUN_FILE);
}
int stop(void)
{
return write_value(0, KSM_RUN_FILE);
}
int main(int argc, char **argv)
{
program_name = argv[0];
if (argc < 2) {
return usage();
} else if (!strcmp(argv[1], "start")) {
return start();
} else if (!strcmp(argv[1], "stop")) {
return stop();
} else {
return usage();
}
}

138
qemu/centos/files/ksmtuned Normal file
View File

@ -0,0 +1,138 @@
#!/bin/bash
#
# Copyright 2009 Red Hat, Inc. and/or its affiliates.
# Released under the GPL
#
# Author: Dan Kenigsberg <danken@redhat.com>
#
# ksmtuned - a simple script that controls whether (and with what vigor) ksm
# should search for duplicated pages.
#
# starts ksm when memory commited to qemu processes exceeds a threshold, and
# make ksm work harder and harder untill memory load falls below that
# threshold.
#
# send SIGUSR1 to this process right after a new qemu process is started, or
# following its death, to retune ksm accordingly
#
# needs testing and ironing. contact danken@redhat.com if something breaks.
if [ -f /etc/ksmtuned.conf ]; then
. /etc/ksmtuned.conf
fi
debug() {
if [ -n "$DEBUG" ]; then
s="`/bin/date`: $*"
[ -n "$LOGFILE" ] && echo "$s" >> "$LOGFILE" || echo "$s"
fi
}
KSM_MONITOR_INTERVAL=${KSM_MONITOR_INTERVAL:-60}
KSM_NPAGES_BOOST=${KSM_NPAGES_BOOST:-300}
KSM_NPAGES_DECAY=${KSM_NPAGES_DECAY:--50}
KSM_NPAGES_MIN=${KSM_NPAGES_MIN:-64}
KSM_NPAGES_MAX=${KSM_NPAGES_MAX:-1250}
# millisecond sleep between ksm scans for 16Gb server. Smaller servers sleep
# more, bigger sleep less.
KSM_SLEEP_MSEC=${KSM_SLEEP_MSEC:-10}
KSM_THRES_COEF=${KSM_THRES_COEF:-20}
KSM_THRES_CONST=${KSM_THRES_CONST:-2048}
total=`awk '/^MemTotal:/ {print $2}' /proc/meminfo`
debug total $total
npages=0
sleep=$[KSM_SLEEP_MSEC * 16 * 1024 * 1024 / total]
[ $sleep -le 10 ] && sleep=10
debug sleep $sleep
thres=$[total * KSM_THRES_COEF / 100]
if [ $KSM_THRES_CONST -gt $thres ]; then
thres=$KSM_THRES_CONST
fi
debug thres $thres
KSMCTL () {
case x$1 in
xstop)
echo 0 > /sys/kernel/mm/ksm/run
;;
xstart)
echo $2 > /sys/kernel/mm/ksm/pages_to_scan
echo $3 > /sys/kernel/mm/ksm/sleep_millisecs
echo 1 > /sys/kernel/mm/ksm/run
;;
esac
}
committed_memory () {
local pidlist
pidlist=$(pgrep -d ' ' -- '^qemu(-kvm|:.{1,11})$')
if [ -n "$pidlist" ]; then
ps -p "$pidlist" -o rsz=
fi | awk '{ sum += $1 }; END { print 0+sum }'
}
free_memory () {
awk '/^(MemFree|Buffers|Cached):/ {free += $2}; END {print free}' \
/proc/meminfo
}
increase_npages() {
local delta
delta=${1:-0}
npages=$[npages + delta]
if [ $npages -lt $KSM_NPAGES_MIN ]; then
npages=$KSM_NPAGES_MIN
elif [ $npages -gt $KSM_NPAGES_MAX ]; then
npages=$KSM_NPAGES_MAX
fi
echo $npages
}
adjust () {
local free committed
free=`free_memory`
committed=`committed_memory`
debug committed $committed free $free
if [ $[committed + thres] -lt $total -a $free -gt $thres ]; then
KSMCTL stop
debug "$[committed + thres] < $total and free > $thres, stop ksm"
return 1
fi
debug "$[committed + thres] > $total, start ksm"
if [ $free -lt $thres ]; then
npages=`increase_npages $KSM_NPAGES_BOOST`
debug "$free < $thres, boost"
else
npages=`increase_npages $KSM_NPAGES_DECAY`
debug "$free > $thres, decay"
fi
KSMCTL start $npages $sleep
debug "KSMCTL start $npages $sleep"
return 0
}
function nothing () {
:
}
loop () {
trap nothing SIGUSR1
while true
do
sleep $KSM_MONITOR_INTERVAL &
wait $!
adjust
done
}
PIDFILE=${PIDFILE-/var/run/ksmtune.pid}
if touch "$PIDFILE"; then
loop &
echo $! > "$PIDFILE"
fi

View File

@ -0,0 +1,21 @@
# Configuration file for ksmtuned.
# How long ksmtuned should sleep between tuning adjustments
# KSM_MONITOR_INTERVAL=60
# Millisecond sleep between ksm scans for 16Gb server.
# Smaller servers sleep more, bigger sleep less.
# KSM_SLEEP_MSEC=10
# KSM_NPAGES_BOOST=300
# KSM_NPAGES_DECAY=-50
# KSM_NPAGES_MIN=64
# KSM_NPAGES_MAX=1250
# KSM_THRES_COEF=20
# KSM_THRES_CONST=2048
# uncomment the following if you want ksmtuned debug info
# LOGFILE=/var/log/ksmtuned
# DEBUG=1

View File

@ -0,0 +1,12 @@
[Unit]
Description=Kernel Samepage Merging (KSM) Tuning Daemon
After=ksm.service
Requires=ksm.service
[Service]
ExecStart=/usr/sbin/ksmtuned
ExecReload=/bin/kill -USR1 $MAINPID
Type=forking
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,31 @@
#! /bin/bash
kvm_setup_powerpc () {
if grep '^platform[[:space:]]*:[[:space:]]*PowerNV' /proc/cpuinfo > /dev/null; then
# PowerNV platform, which is KVM HV capable
if [ -z "$SUBCORES" ]; then
SUBCORES=1
fi
# Step 1. Load the KVM HVmodule
if ! modprobe -b kvm_hv; then
return
fi
# Step 2. Configure subcore mode
# FIXME: Should we check for POWER8 first?
/usr/sbin/ppc64_cpu --subcores-per-core=$SUBCORES
# Step 3. Disable SMT (multithreading)
/usr/sbin/ppc64_cpu --smt=off
fi
}
case $(uname -m) in
ppc64|ppc64le)
kvm_setup_powerpc
;;
esac
exit 0

View File

@ -0,0 +1,14 @@
[Unit]
Description=Perform system configuration to prepare system to run KVM guests
# Offlining CPUs can cause irqbalance to throw warnings if it's running
Before=irqbalance.service
# libvirtd reads CPU topology at startup, so change it before
Before=libvirtd.service
[Service]
Type=oneshot
EnvironmentFile=-/etc/sysconfig/kvm
ExecStart=/usr/lib/systemd/kvm-setup
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,12 @@
# Setting modprobe kvm_intel/kvm_amd nested = 1
# only enables Nested Virtualization until the next reboot or
# module reload. Uncomment the option applicable
# to your system below to enable the feature permanently.
#
# User changes in this file are preserved across upgrades.
#
# For Intel
#options kvm_intel nested=1
#
# For AMD
#options kvm_amd nested=1

View File

@ -0,0 +1,19 @@
# This is a systemd environment file, not a shell script.
# It provides settings for "/lib/systemd/system/qemu-guest-agent.service".
# Comma-separated blacklist of RPCs to disable, or empty list to enable all.
#
# You can get the list of RPC commands using "qemu-ga --blacklist='?'".
# There should be no spaces between commas and commands in the blacklist.
BLACKLIST_RPC=guest-file-open,guest-file-close,guest-file-read,guest-file-write,guest-file-seek,guest-file-flush
# Fsfreeze hook script specification.
#
# FSFREEZE_HOOK_PATHNAME=/dev/null : disables the feature.
#
# FSFREEZE_HOOK_PATHNAME=/path/to/executable : enables the feature with the
# specified binary or shell script.
#
# FSFREEZE_HOOK_PATHNAME= : enables the feature with the
# default value (invoke "qemu-ga --help" to interrogate).
FSFREEZE_HOOK_PATHNAME=/etc/qemu-ga/fsfreeze-hook

View File

@ -0,0 +1,18 @@
[Unit]
Description=QEMU Guest Agent
BindsTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device
After=dev-virtio\x2dports-org.qemu.guest_agent.0.device
[Service]
UMask=0077
EnvironmentFile=/etc/sysconfig/qemu-ga
ExecStart=/usr/bin/qemu-ga \
--method=virtio-serial \
--path=/dev/virtio-ports/org.qemu.guest_agent.0 \
--blacklist=${BLACKLIST_RPC} \
-F${FSFREEZE_HOOK_PATHNAME}
StandardError=syslog
Restart=always
RestartSec=0
[Install]

View File

@ -0,0 +1,17 @@
:qemu-i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386:
:qemu-i486:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386:
:qemu-alpha:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-alpha:
:qemu-arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm:
:qemu-armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb:
:qemu-sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sparc:
:qemu-ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-ppc:
:qemu-m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x04:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-m68k:
:qemu-mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips:
:qemu-mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsel:
:qemu-mipsn32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mipsn32:
:qemu-mipsn32el:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsn32el:
:qemu-mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips64:
:qemu-mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mips64el:
:qemu-sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-sh4:
:qemu-sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sh4eb:
:qemu-s390x:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-s390x:

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
# Increase default vhost memory map limit to match
# KVM's memory slot limit
options vhost max_mem_regions=509

5730
qemu/centos/qemu-kvm.spec Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
options kvm-intel nested=1

41
qemu/qemu/qemu_clean Normal file
View File

@ -0,0 +1,41 @@
#!/bin/bash
#
# chkconfig: 2345 50 50
#
### BEGIN INIT INFO
# Provides: qemu_clean
# Short-Description: Clean up stale unix sockets for qemu
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
start()
{
cd /var/lib/libvirt/qemu
rm -f instance-*.monitor
rm -f cgcs.heartbeat.*
}
stop ()
{
# Nothing to do
return
}
case "$1" in
start)
start
;;
stop)
stop
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
exit 0

View File

@ -0,0 +1,14 @@
[Unit]
Description=Titanium Cloud libvirt QEMU cleanup
After=syslog.target network.target logmgmt.service
Before=libvirtd.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/etc/init.d/qemu_clean start
ExecStop=/etc/init.d/qemu_clean stop
ExecReload=
[Install]
WantedBy=multi-user.target

26
qemu/scripts/autopatch.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
SOURCE_SPEC=~/qemu/qemu-kvm.spec
SOURCE_PATCH_DIR=~/qemu/
# Base patch order on the '%patch' statements (not 'Patchx:' definition)
for patch in `cat $SOURCE_SPEC | grep '%patch[0-9]\{1,\} ' | awk '{print $1'}`; do
# Resolve patch name base on it's id/number
id=`echo $patch | sed 's/%patch//'`
p=`grep "Patch$id:" $SOURCE_SPEC | awk '{print $2}'`
echo "-> Processing patch: $p"
git am -3 $SOURCE_PATCH_DIR/$p
if [ $? -ne 0 ]; then
echo "--> Failed, falling back to manual patching"
git am --abort
# patch -p1 < $SOURCE_PATCH_DIR/$p
git apply --index $SOURCE_PATCH_DIR/$p
if [ $? -ne 0 ]; then
echo "--> Failed manual patching, abort"
else
git add -A
git commit -m "Manual patch apply: $p"
fi
fi
done

View File

@ -0,0 +1,14 @@
Metadata-Version: 1.1
Name: libvirt-python
Version: 1.2.17
Summary: The libvirt virtualization API python2 binding
Home-page:
Author:
Author-email:
License: LGPLv2+
Description:
The libvirt-python package contains a module that permits applications
written in the Python programming language to use the interface
supplied by the libvirt library to use the virtualization capabilities
of recent versions of Linux (and other OSes).

View File

@ -0,0 +1 @@
TIS_PATCH_VER=1

View File

@ -0,0 +1,28 @@
From 1f430bb5fbae2d5135ad4e547de3ac30f32b299b Mon Sep 17 00:00:00 2001
Message-Id: <1f430bb5fbae2d5135ad4e547de3ac30f32b299b.1502820262.git.Jim.Somerville@windriver.com>
From: Jim Somerville <Jim.Somerville@windriver.com>
Date: Tue, 15 Aug 2017 14:04:06 -0400
Subject: [PATCH 1/1] Update package versioning for TIS format
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
---
SPECS/libvirt-python.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SPECS/libvirt-python.spec b/SPECS/libvirt-python.spec
index c2ad17f..6108b7e 100644
--- a/SPECS/libvirt-python.spec
+++ b/SPECS/libvirt-python.spec
@@ -7,7 +7,7 @@
Summary: The libvirt virtualization API python2 binding
Name: libvirt-python
Version: 3.5.0
-Release: 1%{?dist}%{?extra_release}
+Release: 1%{?_tis_dist}.%{tis_patch_ver}
Source0: http://libvirt.org/sources/python/%{name}-%{version}.tar.gz
Url: http://libvirt.org
License: LGPLv2+
--
1.8.3.1

View File

@ -0,0 +1 @@
0001-Update-package-versioning-for-TIS-format.patch

View File

@ -0,0 +1 @@
mirror:Source/libvirt-python-3.5.0-1.fc24.src.rpm