rpms/qemu/devel qemu.init, NONE, 1.1 qemu.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

David Woodhouse (dwmw2) fedora-extras-commits at redhat.com
Sun Feb 13 12:57:25 UTC 2005


Author: dwmw2

Update of /cvs/extras/rpms/qemu/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7976/devel

Modified Files:
	.cvsignore sources 
Added Files:
	qemu.init qemu.spec 
Log Message:
auto-import qemu-0.6.1-1 on branch devel from qemu-0.6.1-1.src.rpm


--- NEW FILE qemu.init ---
#!/bin/sh
#
# qemu	Allow users to run non-native Linux programs by just clicking on them
#	(or typing ./file.exe)
#
# chkconfig: 2345 35 98
# description: Allow users to run non-native Linux programs by just clicking \
#	       on them (or typing ./file.exe)

. /etc/rc.d/init.d/functions
RETVAL=0
QEMU=/usr/bin

start() {
	cpu=`uname -m`
        case "$cpu" in
	    i386|i486|i586|i686|i86pc|BePC)
		cpu="i386"
		;;
	    "Power Macintosh"|ppc|ppc64)
		cpu="ppc"
		;;
	    armv4l|armv5l)
		cpu="arm"
		;;
	esac

	echo -n $"Registering binary handler for qemu applications"
	/sbin/modprobe binfmt_misc &>/dev/null
	if [ "$cpu" != i386 -a -x $QEMU/qemu-i386 -a -d /usr/qemu-i386 ] ; then
	    echo ":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\xfb\xff\xff\xff:$QEMU/qemu-i386:" > /proc/sys/fs/binfmt_misc/register
	    echo ":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\xfb\xff\xff\xff:$QEMU/qemu-i386:" > /proc/sys/fs/binfmt_misc/register
	fi
	if [ "$cpu" != arm -a -x $QEMU/qemu-arm -a -d /usr/qemu-arm ] ; then
	    echo   ":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\xfb\xff\xff\xff:$QEMU/qemu-arm:" > /proc/sys/fs/binfmt_misc/register
	fi
	if [ "$cpu" != ppc -a -x $QEMU/qemu-ppc -a -d /usr/qemu-ppc ] ; then
	    echo   ":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\xfb\xff\xff\xff:$QEMU/qemu-ppc:" > /proc/sys/fs/binfmt_misc/register
	echo do ppc
	fi
	if [ "$cpu" != sparc -a -x $QEMU/qemu-sparc -a -d /usr/qemu-sparc ] ; then
	    echo   ":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\xfb\xff\xff\xff:$QEMU/qemu-sparc:" > /proc/sys/fs/binfmt_misc/register
	fi
	echo
}

stop() {
	echo -n $"Unregistering binary handler for qemu applications"
	for a in i386 i486 ppc arm sparc ] ; do 
	    [ -r /proc/sys/fs/binfmt_misc/qemu-$a ] && echo "-1" >/proc/sys/fs/binfmt_misc/qemu-$a
	done
	echo
}

reload() {
	stop
	start
}

qemu_status() {
	if ls /proc/sys/fs/binfmt_misc/qemu-* &>/dev/null; then 
		echo $"qemu binary format handlers are registered."
		return 0
	else
		echo $"qemu binary format handlers are not registered."
		return 3
	fi
}

case "$1" in
	start)
		start
		;;
	stop)
		stop
		;;
	status)
		qemu_status
		RETVAL=$?
		;;
	restart)
		stop
		start
		;;
	condrestart)
		if qemu_status &>/dev/null; then
			stop
			start
		fi
		;;
	*)
		echo $"Usage: $prog {start|stop|status|restart|condrestart}"
		exit 1
esac
exit $RETVAL



--- NEW FILE qemu.spec ---
Summary: QEMU is a FAST! processor emulator
Name: qemu
Version: 0.6.1
Release: 1
License: LGPL
Group: Development/Tools
URL: http://fabrice.bellard.free.fr/qemu
Source0: http://fabrice.bellard.free.fr/qemu/%{name}-%{version}.tar.gz
Source1: qemu.init
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: SDL-devel
PreReq: /sbin/chkconfig
PreReq: /sbin/service
ExclusiveArch: %{ix86} ppc alpha sparc armv4l x86_64

%description
By using dynamic translation it achieves a reasonable speed while being easy
to port on new host CPUs. QEMU has two operating modes:

 * User mode emulation. In this mode, QEMU can launch Linux processes compiled
   for one CPU on another CPU. Linux system calls are converted because of
   endianness and 32/64 bit mismatches. Wine (Windows emulation) and DOSEMU
   (DOS emulation) are the main targets for QEMU.
 * Full system emulation. In this mode, QEMU emulates a full system, including
   a processor and various peripherials. Currently, it is only used to launch
   an x86 Linux kernel on an x86 Linux system. It enables easier testing and
   debugging of system code. It can also be used to provide virtual hosting
   of several virtual PC on a single server. 

As QEMU requires no host kernel patches to run, it is very safe and easy to use.

%prep
%setup -q

%build
./configure --prefix=%{_prefix} --interp-prefix=%{_prefix}/qemu-%%M
make

%install
rm -rf $RPM_BUILD_ROOT

make prefix="${RPM_BUILD_ROOT}%{_prefix}" \
	bindir="${RPM_BUILD_ROOT}%{_bindir}" \
	sharedir="${RPM_BUILD_ROOT}%{_prefix}/share/qemu" \
	mandir="${RPM_BUILD_ROOT}%{_mandir}" \
	docdir="${RPM_BUILD_ROOT}%{_docdir}" \
	datadir="${RPM_BUILD_ROOT}%{_prefix}/share/qemu" install
	
install -D $RPM_SOURCE_DIR/qemu.init $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/qemu 

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/chkconfig --add qemu

%preun
if [ $1 = 0 ]; then
        /sbin/service qemu stop > /dev/null 2>&1
fi

%files
%defattr(-,root,root)
%doc Changelog README README.distrib TODO
%doc qemu-tech.texi qemu-doc.texi 
%doc linux-2.6-qemu-fast.patch
%doc %{_docdir}
%{_bindir}
%{_prefix}/share/qemu
%{_mandir}
%{_sysconfdir}/rc.d/init.d/qemu

%changelog
* Sun Nov 21 2004 David Woodhouse <dwmw2 at redhat.com> 0.6.1-1
- Update to 0.6.1

* Tue Jul 20 2004 David Woodhouse <dwmw2 at redhat.com> 0.6.0-2
- Compile fix from qemu CVS, add x86_64 host support

* Mon May 12 2004 David Woodhouse <dwmw2 at redhat.com> 0.6.0-1
- Update to 0.6.0.

* Sat May 8 2004 David Woodhouse <dwmw2 at redhat.com> 0.5.5-1
- Update to 0.5.5.

* Thu May 2 2004 David Woodhouse <dwmw2 at redhat.com> 0.5.4-1
- Update to 0.5.4.

* Thu Apr 22 2004 David Woodhouse <dwmw2 at redhat.com> 0.5.3-1
- Update to 0.5.3. Add init script.

* Thu Jul 17 2003 Jeff Johnson <jbj at redhat.com> 0.4.3-1
- Create.


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/qemu/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	13 Feb 2005 12:47:24 -0000	1.1
+++ .cvsignore	13 Feb 2005 12:57:23 -0000	1.2
@@ -0,0 +1 @@
+qemu-0.6.1.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/qemu/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	13 Feb 2005 12:47:24 -0000	1.1
+++ sources	13 Feb 2005 12:57:23 -0000	1.2
@@ -0,0 +1 @@
+f1b5e103321832d2786dd4110f6c8ae4  qemu-0.6.1.tar.gz




More information about the fedora-extras-commits mailing list