Compare commits

...

24 Commits

Author SHA1 Message Date
3b98c8470f rebuilt with libbrltty 6.1 [release 5.1.0-2mamba;Fri Oct 09 2020] 2024-01-05 17:00:33 +01:00
89884dbc13 automatic version update by autodist [release 5.1.0-1mamba;Thu Aug 13 2020] 2024-01-05 17:00:32 +01:00
0db3cf4300 automatic version update by autodist [release 5.0.0-1mamba;Mon May 04 2020] 2024-01-05 17:00:32 +01:00
269bd7b347 rebuilt with debug package [release 4.2.0-2mamba;Wed Mar 04 2020] 2024-01-05 17:00:32 +01:00
0f67a37710 update to 4.2.0 [release 4.2.0-1mamba;Tue Jan 28 2020] 2024-01-05 17:00:32 +01:00
4008da7de3 automatic version update by autodist [release 4.0.0-1mamba;Wed Apr 24 2019] 2024-01-05 17:00:32 +01:00
e3a8ad4faf update to 3.1.0 [release 3.1.0-1mamba;Mon Feb 11 2019] 2024-01-05 17:00:32 +01:00
af367825ea automatic version update by autodist [release 3.0.0-1mamba;Sun Sep 09 2018] 2024-01-05 17:00:31 +01:00
6942294e48 automatic version update by autodist [release 2.11.1-1mamba;Fri Feb 16 2018] 2024-01-05 17:00:31 +01:00
01b796527d automatic version update by autodist [release 2.11.0-1mamba;Sat Jan 06 2018] 2024-01-05 17:00:31 +01:00
6fbf21ac45 automatic version update by autodist [release 2.10.1-1mamba;Sun Oct 08 2017] 2024-01-05 17:00:31 +01:00
dbb2f56449 automatic version update by autodist [release 2.10.0-1mamba;Sat Sep 23 2017] 2024-01-05 17:00:31 +01:00
bcb9700192 automatic version update by autodist [release 2.8.0-1mamba;Fri Dec 23 2016] 2024-01-05 17:00:31 +01:00
0f901e5e65 rebuilt by autoport with build requirements: libxen-devel>=4.8.0-1mamba [release 2.7.0-2mamba;Sat Dec 10 2016] 2024-01-05 17:00:31 +01:00
243cf48af6 automatic version update by autodist [release 2.7.0-1mamba;Sat Sep 03 2016] 2024-01-05 17:00:30 +01:00
ab896ead15 automatic version update by autodist [release 2.6.1-1mamba;Thu Aug 18 2016] 2024-01-05 17:00:30 +01:00
d717d7630b update to 2.6.0 [release 2.6.0-1mamba;Fri Jul 22 2016] 2024-01-05 17:00:30 +01:00
9b542a88de added qemu-guest-agent package
switch initscript to systemd service [release 2.4.1-2mamba;Fri Feb 05 2016]
2024-01-05 17:00:30 +01:00
cc0f4cc7d3 automatic version update by autodist [release 2.4.1-1mamba;Wed Nov 04 2015] 2024-01-05 17:00:30 +01:00
9dfeb48fe3 automatic version update by autodist [release 2.4.0.1-1mamba;Wed Sep 23 2015] 2024-01-05 17:00:29 +01:00
bbf02be50c automatic version update by autodist [release 2.4.0-1mamba;Sat Sep 12 2015] 2024-01-05 17:00:29 +01:00
781e4f697b automatic version update by autodist [release 2.3.0-1mamba;Tue Apr 28 2015] 2024-01-05 17:00:29 +01:00
a29fb97439 automatic update by autodist [release 2.2.1-1mamba;Tue Mar 17 2015] 2024-01-05 17:00:29 +01:00
9f355fa7f7 automatic version update by autodist [release 2.1.2-1mamba;Fri Sep 26 2014] 2024-01-05 17:00:29 +01:00
5 changed files with 266 additions and 83 deletions

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"

19
qemu-ga-sysconfig Normal file
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

18
qemu-guest-agent.service Normal file
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]

11
qemu.service Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=QEMU configuration for non-native binary formats
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/lib/systemd/scripts/qemu-binfmt start
ExecStop=/usr/lib/systemd/scripts/qemu-binfmt stop
[Install]
WantedBy=multi-user.target

299
qemu.spec
View File

@ -1,6 +1,6 @@
Name: qemu
Version: 2.1.1
Release: 1mamba
Version: 5.1.0
Release: 2mamba
Summary: A generic and open source processor emulator
Group: Applications/Emulators
Vendor: openmamba
@ -9,6 +9,10 @@ Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://qemu.org
Source: http://wiki.qemu.org/download/qemu-%{version}.tar.bz2
Source1: %{name}-initscript
Source2: qemu-guest-agent.service
Source3: 99-qemu-guest-agent.rules
Source4: qemu-ga-sysconfig
Source5: qemu.service
Patch0: %{name}-0.8.1-build.patch
Patch1: %{name}-0.8.0-dyngen.patch
Patch2: %{name}-0.8.0-gcc4_x86.patch
@ -19,61 +23,67 @@ Patch6: qemu-1.7.0-virtfs-ftbfs.patch
License: GPL, LGPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: ldconfig
BuildRequires: libSDL2-devel
BuildRequires: libX11-devel
BuildRequires: libaio-devel
BuildRequires: libalsa-devel
BuildRequires: libatk-devel
BuildRequires: libbluetooth-devel
BuildRequires: libbrltty-devel
BuildRequires: libbzip2-devel
BuildRequires: libcacard-devel
BuildRequires: libcairo-devel
BuildRequires: libcap-devel
BuildRequires: libcap-ng-devel
BuildRequires: libcares-devel
BuildRequires: libcurl-devel
BuildRequires: libfontconfig-devel
BuildRequires: libfreetype-devel
BuildRequires: libgcrypt-devel
BuildRequires: libepoxy-devel
BuildRequires: libgbm-devel
BuildRequires: libgcc
BuildRequires: libgdk-pixbuf-devel
BuildRequires: libGL-devel
BuildRequires: libglib-devel
BuildRequires: libgnutls-devel
BuildRequires: libgpg-error-devel
BuildRequires: libgss-devel
BuildRequires: libgtk2-devel
BuildRequires: libidn-devel
BuildRequires: libgtk-devel
BuildRequires: libharfbuzz-devel
BuildRequires: libjpeg-devel
BuildRequires: libncurses-devel
BuildRequires: libnspr-devel
BuildRequires: libnss-devel
BuildRequires: libopenldap-devel
BuildRequires: libopenssl-devel
BuildRequires: liblzo-devel
BuildRequires: libndctl-devel
BuildRequires: libnettle-devel
BuildRequires: libnfs-devel
BuildRequires: libnuma-devel
BuildRequires: libpam-devel
BuildRequires: libpango-devel
BuildRequires: libpixman-devel
BuildRequires: libpng-devel
BuildRequires: librtmp-devel
BuildRequires: libsasl-devel
%if "%{stage1}" != "1"
BuildRequires: libSDL-devel
%endif
BuildRequires: libssh2-devel
BuildRequires: libusbx-devel
BuildRequires: libuuid-devel
BuildRequires: libvte0-devel
BuildRequires: libX11-devel
BuildRequires: libpulseaudio-devel
BuildRequires: libsasl2-devel
BuildRequires: libsdl2_image-devel
BuildRequires: libseccomp-devel
BuildRequires: libsnappy-devel
BuildRequires: libspice-devel
BuildRequires: libssh-devel
BuildRequires: libstdc++6-devel
BuildRequires: libudev-devel
BuildRequires: libusb-devel
BuildRequires: libusbredir-devel
BuildRequires: libvte-devel
%ifnarch arm
BuildRequires: libxen-devel
BuildRequires: libXext-devel
%endif
BuildRequires: libxkbcommon-devel
BuildRequires: libxml2-devel
BuildRequires: libz-devel
BuildRequires: libzstd-devel
## AUTOBUILDREQ-END
BuildRequires: libxen-devel >= 4.2.2
BuildRequires: libadplug-devel >= 1.5.1
BuildRequires: libglib-static >= 2.34.1-2mamba
BuildRequires: libspice-devel
BuildRequires: spice-protocol-devel
BuildRequires: libusbredir-devel
BuildRequires: libcelt051-devel
BuildRequires: libnfs-devel
BuildRequires: libopenssl-static
BuildRequires: libbrltty-devel >= 6.1
#% if "%{_build_cpu}" != "ppc"
#BuildRequires: gcc34
#% endif
Conflicts: kvm
%systemd_requires
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
@ -82,6 +92,14 @@ QEMU has two operating modes:
- Full system emulation. In this mode, QEMU emulates a full system (for example a PC or a PowerMac), including a processor and various peripherials. It can be used to launch different Operating Systems without rebooting the PC or to debug system code.
- User mode emulation (Linux host only). In this mode, QEMU can launch Linux processes compiled for one CPU on another CPU.
%package guest-agent
Group: Applications/Emulators
Summary: QEMU agent for guest VMs
%systemd_requires
%description guest-agent
QEMU agent for guest VMs.
%package -n libcacard
Group: System/Libraries
Summary: QEMU virtual smart card emulator library
@ -107,6 +125,8 @@ Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
QEMU is a generic and open source processor emulator which achieves a good emulation speed by using dynamic translation.
This package contains static user mode emulators. In this mode, QEMU can launch Linux processes compiled for one CPU on another CPU.
%debug_package
%prep
%setup -q
#-D -T
@ -119,7 +139,7 @@ This package contains static user mode emulators. In this mode, QEMU can launch
#%patch4 -p1
#%endif
#%patch5 -p1
%patch6 -p1
#%patch6 -p1
%build
#:<< ___EOF
@ -134,18 +154,20 @@ This package contains static user mode emulators. In this mode, QEMU can launch
--static \
--disable-sdl \
--disable-curl \
--disable-bluez \
--disable-system \
--disable-smartcard-nss \
--disable-strip \
--disable-libssh2 \
--disable-libnfs \
--disable-libxml2 \
--disable-gnutls \
--enable-linux-user
# --disable-bluez \
# --disable-libssh2 \
# --disable-smartcard-nss \
# --disable-usb-redir \
# --disable-vde \
%make
%make LIBSSH_LIBS="-lssh -lcrypto -ldl -lgss"
mkdir static
find *-linux-user -name qemu-\* -exec mv {} static/ \;
@ -166,9 +188,10 @@ make clean
#% else
# --cc=%{_target_platform}-gcc34 \
%endif
--audio-drv-list=alsa \
--audio-drv-list="alsa pa" \
--enable-spice \
--enable-usb-redir
--enable-usb-redir \
--enable-guest-agent
%make
@ -176,45 +199,53 @@ make clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
install -D -m 755 %{S:1} \
%{buildroot}%{_initrddir}/%{name}
#install -D -m 755 %{S:1} \
# %{buildroot}%{_prefix}/lib/systemd/scripts/%{name}-binfmt
#install -D -m 0644 %{S:5} \
# %{buildroot}%{_unitdir}/qemu.service
install -d -m0755 %{buildroot}%{_binfmtdir}
scripts/qemu-binfmt-conf.sh --exportdir %{buildroot}%{_binfmtdir}/ \
--systemd ALL --qemu-path %{_bindir}
cd static
for f in *; do
# disable stripping static binaries by installing without -x
install -m644 $f %{buildroot}%{_bindir}/$f.static
## (obsolete?) disable stripping static binaries by installing without -x
install -m755 $f %{buildroot}%{_bindir}/$f.static
done
cd ..
# guest agent
install -d -m0755 %{buildroot}%{_sysconfdir}/qemu-ga
cp -a scripts/qemu-guest-agent/* %{buildroot}%{_sysconfdir}/qemu-ga/
install -D -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/qemu-guest-agent.service
install -D -m0644 %{SOURCE3} %{buildroot}%{_udevrulesdir}/99-qemu-guest-agent.rules
install -D -m0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/qemu-ga
%find_lang %{name}
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
# new install
if [ $1 -eq 1 ]; then
systemctl -q enable %{name} || true
systemctl -q daemon-reload
systemctl start %{name}
fi
#%post
#% binfmt_apply
#:
%post guest-agent
%systemd_post qemu-guest-agent.service
:
%preun
# erase
if [ $1 -eq 0 ]; then
systemctl stop %{name}
systemctl -q disable %{name}
fi
%preun guest-agent
%systemd_preun qemu-guest-agent.service
:
%postun
# upgrade
if [ $1 -eq 1 ]; then
systemctl -q daemon-reload
/sbin/chkconfig %{name}
[ $? -eq 0 ] && service %{name} restart
fi
%postun guest-agent
%systemd_postun_with_restart qemu-guest-agent.service
:
%posttrans
# clean old sysv broken links
find /etc/rc[0-6].d/ -type l -xtype l -exec rm -f {} \;
:
%post -n libcacard
@ -227,40 +258,142 @@ fi
%files -f %{name}.lang
%defattr(-,root,root)
%dir %{_sysconfdir}/qemu
%config %{_sysconfdir}/qemu/target-x86_64.conf
%{_initrddir}/%{name}
%{_bindir}/%{name}*
%{_bindir}/vscclient
%{_bindir}/elf2dmp
%exclude %{_bindir}/qemu-ga
%{_bindir}/ivshmem-client
%{_bindir}/ivshmem-server
%exclude %{_bindir}/%{name}*.static
%{_bindir}/virtfs-proxy-helper
%{_datadir}/applications/qemu.desktop
%{_datadir}/icons/hicolor/*/apps/qemu.png
%{_datadir}/icons/hicolor/*/apps/qemu.bmp
%{_datadir}/icons/hicolor/scalable/apps/qemu.svg
%{_libexecdir}/qemu-bridge-helper
%{_libexecdir}/qemu-pr-helper
%{_libexecdir}/virtfs-proxy-helper
%{_libexecdir}/virtiofsd
%{_datadir}/%{name}
%{_binfmtdir}/*.conf
%{_docdir}/%{name}
%{_mandir}/man1/%{name}*
%{_mandir}/man1/virtfs-proxy-helper.1.gz
%{_mandir}/man8/%{name}-nbd.8.gz
%{_mandir}/man1/qemu*
%{_mandir}/man1/virtfs-proxy-helper.1*
%{_mandir}/man1/virtiofsd.1*
%{_mandir}/man7/qemu-qmp-ref.7*
%{_mandir}/man7/qemu-block-drivers.7*
%{_mandir}/man7/qemu-cpu-models.7*
%{_mandir}/man8/qemu-nbd.8*
%doc COPYING COPYING.LIB
%files -n libcacard
%files guest-agent
%defattr(-,root,root)
%{_libdir}/libcacard.so.*
%dir %{_sysconfdir}/qemu-ga
%{_sysconfdir}/qemu-ga/fsfreeze-hook
%dir %{_sysconfdir}/qemu-ga/fsfreeze-hook.d
%{_sysconfdir}/qemu-ga/fsfreeze-hook.d/mysql-flush.sh.sample
%{_sysconfdir}/sysconfig/qemu-ga
%{_bindir}/%{name}-ga
%{_unitdir}/qemu-guest-agent.service
%{_udevrulesdir}/99-qemu-guest-agent.rules
%{_mandir}/man7/%{name}-ga-ref.7*
%{_mandir}/man8/qemu-ga.8*
%files -n libcacard-devel
%defattr(-,root,root)
%dir %{_includedir}/cacard
%{_includedir}/cacard/*.h
%{_libdir}/libcacard.a
%{_libdir}/libcacard.la
%{_libdir}/libcacard.so
%{_libdir}/pkgconfig/libcacard.pc
%doc LICENSE README
#% ifnarch x86_64
#%files -n libcacard
#%defattr(-,root,root)
#%{_libdir}/libcacard.so.*
#%files -n libcacard-devel
#%defattr(-,root,root)
#%dir %{_includedir}/cacard
#%{_includedir}/cacard/*.h
#%{_libdir}/libcacard.a
#%{_libdir}/libcacard.la
#%{_libdir}/libcacard.so
#%{_libdir}/pkgconfig/libcacard.pc
#%doc LICENSE README
##% endif
%files static
%defattr(-,root,root)
%attr(0755,root,root) %{_bindir}/%{name}*.static
%changelog
* Fri Oct 09 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 5.1.0-2mamba
- rebuilt with libbrltty 6.1
* Thu Aug 13 2020 Automatic Build System <autodist@mambasoft.it> 5.1.0-1mamba
- automatic version update by autodist
* Mon May 04 2020 Automatic Build System <autodist@mambasoft.it> 5.0.0-1mamba
- automatic version update by autodist
* Wed Mar 04 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 4.2.0-2mamba
- rebuilt with debug package
* Tue Jan 28 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 4.2.0-1mamba
- update to 4.2.0
* Wed Apr 24 2019 Automatic Build System <autodist@mambasoft.it> 4.0.0-1mamba
- automatic version update by autodist
* Mon Feb 11 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 3.1.0-1mamba
- update to 3.1.0
* Sun Sep 09 2018 Automatic Build System <autodist@mambasoft.it> 3.0.0-1mamba
- automatic version update by autodist
* Fri Feb 16 2018 Automatic Build System <autodist@mambasoft.it> 2.11.1-1mamba
- automatic version update by autodist
* Sat Jan 06 2018 Automatic Build System <autodist@mambasoft.it> 2.11.0-1mamba
- automatic version update by autodist
* Sun Oct 08 2017 Automatic Build System <autodist@mambasoft.it> 2.10.1-1mamba
- automatic version update by autodist
* Sat Sep 23 2017 Automatic Build System <autodist@mambasoft.it> 2.10.0-1mamba
- automatic version update by autodist
* Fri Dec 23 2016 Automatic Build System <autodist@mambasoft.it> 2.8.0-1mamba
- automatic version update by autodist
* Sat Dec 10 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 2.7.0-2mamba
- rebuilt by autoport with build requirements: libxen-devel>=4.8.0-1mamba
* Sat Sep 03 2016 Automatic Build System <autodist@mambasoft.it> 2.7.0-1mamba
- automatic version update by autodist
* Thu Aug 18 2016 Automatic Build System <autodist@mambasoft.it> 2.6.1-1mamba
- automatic version update by autodist
* Fri Jul 22 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 2.6.0-1mamba
- update to 2.6.0
* Fri Feb 05 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.1-2mamba
- added qemu-guest-agent package
- switch initscript to systemd service
* Wed Nov 04 2015 Automatic Build System <autodist@mambasoft.it> 2.4.1-1mamba
- automatic version update by autodist
* Wed Sep 23 2015 Automatic Build System <autodist@mambasoft.it> 2.4.0.1-1mamba
- automatic version update by autodist
* Sat Sep 12 2015 Automatic Build System <autodist@mambasoft.it> 2.4.0-1mamba
- automatic version update by autodist
* Tue Apr 28 2015 Automatic Build System <autodist@mambasoft.it> 2.3.0-1mamba
- automatic version update by autodist
* Tue Mar 17 2015 Automatic Build System <autodist@mambasoft.it> 2.2.1-1mamba
- automatic update by autodist
* Wed Dec 10 2014 Automatic Build System <autodist@mambasoft.it> 2.2.0-1mamba
- automatic version update by autodist
* Fri Sep 26 2014 Automatic Build System <autodist@mambasoft.it> 2.1.2-1mamba
- automatic version update by autodist
* Thu Sep 11 2014 Automatic Build System <autodist@mambasoft.it> 2.1.1-1mamba
- automatic version update by autodist