SHA256
1
0
forked from pool/qemu

Accepting request 399638 from home:algraf:branches:Virtualization

- Add sysctl script and %post on s390x to allow kvm usage (bsc#975331)

- Add sysctl script and %post on s390x to allow kvm usage (bsc#975331)

OBS-URL: https://build.opensuse.org/request/show/399638
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=296
This commit is contained in:
Bruce Rogers 2016-06-02 18:18:10 +00:00 committed by Git OBS Bridge
parent e07f3c2588
commit f5b3447608
6 changed files with 64 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#
# spec file for package qemu-linux-user
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed

View File

@ -13,6 +13,11 @@ Wed Jun 1 17:14:40 UTC 2016 - brogers@suse.com
ipxe-util-v5.24-perl-errors-on-redeclare.patch
- Specify build time disk space requirements for ppc64 and ppc64le
-------------------------------------------------------------------
Wed Jun 1 14:31:51 UTC 2016 - agraf@suse.com
- Add sysctl script and %post on s390x to allow kvm usage (bsc#975331)
-------------------------------------------------------------------
Thu May 26 16:23:33 UTC 2016 - brogers@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package qemu-testsuite
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -292,6 +292,9 @@ Requires: pwdutils
Requires: timezone
%if %{kvm_available}
Requires(post): udev
%ifarch s390x
Requires(post): procps
%endif
%endif
Recommends: qemu-block-curl
Recommends: qemu-tools
@ -990,6 +993,14 @@ exec %{_bindir}/qemu-system-x86_64 -machine accel=kvm "$@"
%endif
EOF
chmod 755 %{buildroot}%{_bindir}/qemu-kvm
%ifarch s390x
mkdir -p %{buildroot}%{_sysconfdir}/sysctl.d
cat > %{buildroot}%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x <<- 'EOF'
# To allow KVM to run on s390x, we need to set the sysctl below
vm.allocate_pgste = 1
EOF
chmod 644 %{buildroot}%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x
%endif
install -D -m 755 %{SOURCE2} %{buildroot}/usr/share/qemu/qemu-ifup
install -D -m 755 %{SOURCE3} %{buildroot}%{_bindir}/kvm_stat
install -D -m 644 %{SOURCE4} %{buildroot}%{_mandir}/man1/qemu-kvm.1.gz
@ -1040,6 +1051,9 @@ if [ "$(readlink -f /proc/1/root)" = "/" ]; then
/sbin/udevadm trigger || :
fi
%endif
%ifarch s390x
sysctl vm.allocate_pgste=1
%endif
%endif
%if 0%{?suse_version} >= 1130
@ -1101,6 +1115,9 @@ fi
%else
%{_udevrulesdir}/60-kvm.rules
%endif
%ifarch s390x
%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x
%endif
%endif
%files x86

View File

@ -13,6 +13,11 @@ Wed Jun 1 17:14:40 UTC 2016 - brogers@suse.com
ipxe-util-v5.24-perl-errors-on-redeclare.patch
- Specify build time disk space requirements for ppc64 and ppc64le
-------------------------------------------------------------------
Wed Jun 1 14:31:51 UTC 2016 - agraf@suse.com
- Add sysctl script and %post on s390x to allow kvm usage (bsc#975331)
-------------------------------------------------------------------
Thu May 26 16:23:33 UTC 2016 - brogers@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package qemu
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -292,6 +292,9 @@ Requires: pwdutils
Requires: timezone
%if %{kvm_available}
Requires(post): udev
%ifarch s390x
Requires(post): procps
%endif
%endif
Recommends: qemu-block-curl
Recommends: qemu-tools
@ -990,6 +993,14 @@ exec %{_bindir}/qemu-system-x86_64 -machine accel=kvm "$@"
%endif
EOF
chmod 755 %{buildroot}%{_bindir}/qemu-kvm
%ifarch s390x
mkdir -p %{buildroot}%{_sysconfdir}/sysctl.d
cat > %{buildroot}%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x <<- 'EOF'
# To allow KVM to run on s390x, we need to set the sysctl below
vm.allocate_pgste = 1
EOF
chmod 644 %{buildroot}%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x
%endif
install -D -m 755 %{SOURCE2} %{buildroot}/usr/share/qemu/qemu-ifup
install -D -m 755 %{SOURCE3} %{buildroot}%{_bindir}/kvm_stat
install -D -m 644 %{SOURCE4} %{buildroot}%{_mandir}/man1/qemu-kvm.1.gz
@ -1040,6 +1051,9 @@ if [ "$(readlink -f /proc/1/root)" = "/" ]; then
/sbin/udevadm trigger || :
fi
%endif
%ifarch s390x
sysctl vm.allocate_pgste=1
%endif
%endif
%if 0%{?suse_version} >= 1130
@ -1101,6 +1115,9 @@ fi
%else
%{_udevrulesdir}/60-kvm.rules
%endif
%ifarch s390x
%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x
%endif
%endif
%files x86

View File

@ -245,6 +245,9 @@ Requires: pwdutils
Requires: timezone
%if %{kvm_available}
Requires(post): udev
%ifarch s390x
Requires(post): procps
%endif
%endif
Recommends: qemu-block-curl
Recommends: qemu-tools
@ -898,6 +901,14 @@ exec %{_bindir}/qemu-system-x86_64 -machine accel=kvm "$@"
%endif
EOF
chmod 755 %{buildroot}%{_bindir}/qemu-kvm
%ifarch s390x
mkdir -p %{buildroot}%{_sysconfdir}/sysctl.d
cat > %{buildroot}%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x <<- 'EOF'
# To allow KVM to run on s390x, we need to set the sysctl below
vm.allocate_pgste = 1
EOF
chmod 644 %{buildroot}%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x
%endif
install -D -m 755 %{SOURCE2} %{buildroot}/usr/share/qemu/qemu-ifup
install -D -m 755 %{SOURCE3} %{buildroot}%{_bindir}/kvm_stat
install -D -m 644 %{SOURCE4} %{buildroot}%{_mandir}/man1/qemu-kvm.1.gz
@ -949,6 +960,9 @@ if [ "$(readlink -f /proc/1/root)" = "/" ]; then
/sbin/udevadm trigger || :
fi
%endif
%ifarch s390x
sysctl vm.allocate_pgste=1
%endif
%endif
%if 0%{?suse_version} >= 1130
@ -1010,6 +1024,9 @@ fi
%else
%{_udevrulesdir}/60-kvm.rules
%endif
%ifarch s390x
%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x
%endif
%endif
%files x86