Compare commits

...

17 Commits

Author SHA1 Message Date
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
5 changed files with 192 additions and 45 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

187
qemu.spec
View File

@ -1,5 +1,5 @@
Name: qemu
Version: 2.1.2
Version: 3.1.0
Release: 1mamba
Summary: A generic and open source processor emulator
Group: Applications/Emulators
@ -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
@ -62,7 +66,7 @@ BuildRequires: libxen-devel
BuildRequires: libXext-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END
BuildRequires: libxen-devel >= 4.2.2
BuildRequires: libxen-devel >= 4.8.0-1mamba
BuildRequires: libadplug-devel >= 1.5.1
BuildRequires: libglib-static >= 2.34.1-2mamba
BuildRequires: libspice-devel
@ -74,6 +78,7 @@ BuildRequires: libnfs-devel
#BuildRequires: gcc34
#% endif
Conflicts: kvm
%systemd_requires
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
@ -82,6 +87,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
@ -119,7 +132,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
@ -136,12 +149,14 @@ This package contains static user mode emulators. In this mode, QEMU can launch
--disable-curl \
--disable-bluez \
--disable-system \
--disable-smartcard-nss \
--disable-strip \
--disable-libssh2 \
--disable-libnfs \
--disable-libxml2 \
--disable-gnutls \
--enable-linux-user
# --disable-smartcard-nss \
# --disable-usb-redir \
# --disable-vde \
@ -169,7 +184,7 @@ make clean
--audio-drv-list="alsa pa" \
--enable-spice \
--enable-usb-redir \
--enable-smartcard-nss
--enable-guest-agent
%make
@ -177,8 +192,14 @@ 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
@ -187,35 +208,37 @@ install -m644 $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
%binfmt_apply
:
%preun
# erase
if [ $1 -eq 0 ]; then
systemctl stop %{name}
systemctl -q disable %{name}
fi
%post guest-agent
%systemd_post qemu-guest-agent.service
:
%postun
# upgrade
if [ $1 -eq 1 ]; then
systemctl -q daemon-reload
/sbin/chkconfig %{name}
[ $? -eq 0 ] && service %{name} restart
fi
%preun guest-agent
%systemd_preun qemu-guest-agent.service
:
%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
@ -228,42 +251,116 @@ fi
%files -f %{name}.lang
%defattr(-,root,root)
%dir %{_sysconfdir}/qemu
%config %{_sysconfdir}/qemu/target-x86_64.conf
%{_initrddir}/%{name}
%{_bindir}/%{name}*
%{_bindir}/vscclient
%exclude %{_bindir}/qemu-ga
%{_bindir}/ivshmem-client
%{_bindir}/ivshmem-server
#%{_bindir}/vscclient
%exclude %{_bindir}/%{name}*.static
%{_bindir}/virtfs-proxy-helper
#%{_unitdir}/qemu.service
#%{_prefix}/lib/systemd/scripts/%{name}-binfmt
%{_libexecdir}/qemu-bridge-helper
%{_datadir}/%{name}
%{_binfmtdir}/*.conf
%{_prefix}
%{_docdir}/%{name}
%{_mandir}/man1/%{name}*
%{_mandir}/man1/virtfs-proxy-helper.1.gz
%{_mandir}/man8/%{name}-nbd.8.gz
%{_mandir}/man1/virtfs-proxy-helper.1*
%{_mandir}/man7/%{name}-qmp-ref.7*
%{_mandir}/man7/%{name}-block-drivers.7*
%{_mandir}/man8/%{name}-nbd.8*
%doc COPYING COPYING.LIB
#%ifnarch x86_64
%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
#%endif
#% 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
* 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