Skip to contentSkip to conversation

live cvs ebuild for gentoo - maybe?

Qemu-devel Rudi Lippert 5 participants 10 messages Apr 2, 2004

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

does anyone have experience with live cvs ebuilds for gentoo linux? maybe jocelyn could create such an ebuild for qemu. this would make building qemu as easy as installing any other package as it would include all the dependencies.
of course, this would only help gentoo users, but it seems that there are quite a few of us interested in qemu.

another €0.02 - that's four cents
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAbRS81nTg39QS/TsRAvMeAJ9jA7ZzzMZuBIXacflMB1fMr07KHQCfSqm8 fTN752g25g6LQecptV3PVg4=
=tu1J
-----END PGP SIGNATURE-----

#1 lore raw

Hello,

Quoted 6 lines · Rudi Lippert

does anyone have experience with live cvs ebuilds for gentoo linux? maybe jocelyn could create such an ebuild for qemu. this would make building qemu as easy as installing any other package as it would include all the dependencies.
of course, this would only help gentoo users, but it seems that there are quite a few of us interested in qemu.

My qemu cvs ebuild is attached; but be warned that I'm new to writing ebuilds and so don't blame me if somethings fails.

Gabriel.

Signature · 1 line
Gabriel Ebner - reverse "ta.renbeleirbag@eg"

# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2

S="${WORKDIR}/qemu"
DESCRIPTION="Multi-platform & multi-targets dynamic translator" SRC_URI="" HOMEPAGE="http://fabrice.bellard.free.fr/qemu/"

KEYWORDS="x86 ~ppc -alpha -sparc -arm"
SLOT="0"
LICENSE="GPL-2 LGPL-2.1"
IUSE=""

RDEPEND="virtual/glibc media-libs/libsdl media-libs/alsa-lib" DEPEND="${RDEPEND} dev-util/cvs"

RESTRICT="nostrip"

TARGET_LIST="arm-user i386-user i386-softmmu ppc-user sparc-user"

src_unpack() {
	# This is hackish, but it works.
	addwrite ${DISTDIR}/cvs-src
	mkdir -p ${DISTDIR}/cvs-src/
	cd ${DISTDIR}/cvs-src

	einfo "Checking out latest qemu from CVS..."
	if ! [ -n "`grep savannah.nongnu.org $HOME/.ssh/known_hosts`" ]; then
		ewarn "You probably want to add the savannah.nongnu.org ssh key" \
			"to your .ssh/known_hosts"
	fi

	cvs -z3 -d:ext:[email protected]:/cvsroot/qemu co qemu \
		|| die "could not checkout source from cvs"
	cp -a qemu ${S}

	# Fix an ownership porblem
	chown -R root:root ${S}	
}
src_compile() {
	./configure --prefix=/usr \
				--target-list="${TARGET_LIST}" || die "could not configure"
	emake || die "make failed"
}
src_install() {
	make install prefix=${D}/usr sharedir=${D}/usr/share/qemu \
		mandir=${D}/usr/share/man
	dodoc TODO VERSION COPYING* README README.distrib *.html
}

pkg_postinstall() {
einfo "You will need the Universal TUN/TAP driver compiled into" einfo "kernel or as a module to use the virtual network device."
}

#2 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

i am heavily impressed! where all my attempts to build qemu from cvs failed, this ebuild installed like a charm. you really made my day. danke!

you might want to add "!app-emulation/qemu" to the RDEPEND, so that this cannot be installed on top of a standard qemu installation. most people won't run into that error, but i think it is just more complete with that line. i attached a file including this DEPEND.

"[Qemu-devel] Re: live cvs ebuild for gentoo - maybe?" (Gabriel Ebner, Friday 02 April 2004 13:12):

Quoted 6 lines

Hello,

My qemu cvs ebuild is attached; but be warned that I'm new to writing ebuilds and so don't blame me if somethings fails.

Gabriel.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAbWEm1nTg39QS/TsRAm8TAJoDnW8Zj7MZxPVu8z+mgBqsrrqSPACghxUG QZPQ13I6t35wnvL4Azvb4NI=
=ar7w
-----END PGP SIGNATURE-----

# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2

S="${WORKDIR}/qemu"
DESCRIPTION="Multi-platform & multi-targets dynamic translator" SRC_URI="" HOMEPAGE="http://fabrice.bellard.free.fr/qemu/"

KEYWORDS="x86 ~ppc -alpha -sparc -arm"
SLOT="0"
LICENSE="GPL-2 LGPL-2.1"
IUSE=""

RDEPEND=" virtual/glibc
media-libs/libsdl
media-libs/alsa-lib
!app-emulation/qemu"

DEPEND="${RDEPEND} dev-util/cvs"

RESTRICT="nostrip"

TARGET_LIST="arm-user i386-user i386-softmmu ppc-user sparc-user"

src_unpack() {
	# This is hackish, but it works.
	addwrite ${DISTDIR}/cvs-src
	mkdir -p ${DISTDIR}/cvs-src/
	cd ${DISTDIR}/cvs-src

	einfo "Checking out latest qemu from CVS..."
	if ! [ -n "`grep savannah.nongnu.org $HOME/.ssh/known_hosts`" ]; then
		ewarn "You probably want to add the savannah.nongnu.org ssh key" \
			"to your .ssh/known_hosts"
	fi

	cvs -z3 -d:ext:[email protected]:/cvsroot/qemu co qemu \
		|| die "could not checkout source from cvs"
	cp -a qemu ${S}

	# Fix an ownership porblem
	chown -R root:root ${S}	
}
src_compile() {
	./configure --prefix=/usr \
				--target-list="${TARGET_LIST}" || die "could not configure"
	emake || die "make failed"
}
src_install() {
	make install prefix=${D}/usr sharedir=${D}/usr/share/qemu \
		mandir=${D}/usr/share/man
	dodoc TODO VERSION COPYING* README README.distrib *.html
}

pkg_postinstall() {
einfo "You will need the Universal TUN/TAP driver compiled into" einfo "kernel or as a module to use the virtual network device."
}

#4 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
This ebuild does not use CVS correctly. It should inherit the cvs eclass and use the builtin functions for checking out the CVS tree.
There are a couple of examples of how to use it in portage, just do an esearch for "-cvs".

//David Holm

Quoted 6 lines · Grzegorz Kulewski

Hmm, as far as I know under /usr/portage/distfiles is cvs dir for sources for "packages" from cvs. So, why not use it?

regards

Quoted 8 lines

Grzegorz Kulewski

_______________________________________________
Qemu-devel mailing list
[email protected]
http://mail.nongnu.org/mailman/listinfo/qemu-devel

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAbYuixVDe1wIoqX0RAt7PAJwIAVvAHTWk5qWZ5i+wSXrS540JeQCgi3qL zhXjxZsd6lg81cqfDtanTh4=
=nkZs
-----END PGP SIGNATURE-----

#5 lore raw

Hello,

Quoted 4 lines · David Holm

This ebuild does not use CVS correctly. It should inherit the cvs eclass and use the builtin functions for checking out the CVS tree. There are a couple of examples of how to use it in portage, just do an esearch for "-cvs".

Well, I took that part from mozilla-firebird-cvs...

I've included a new ebuild supporting a sdl USE flag and using the cvs eclass as you suggested.

Gabriel.

Signature · 1 line
Gabriel Ebner - reverse "ta.renbeleirbag@eg"

# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2

ECVS_AUTH="ext"
export CVS_RSH="ssh"
ECVS_SERVER="savannah.gnu.org:/cvsroot/qemu"
ECVS_MODULE="qemu"
ECVS_USER="anoncvs"
ECVS_PASS=""
ECVS_CVS_OPTIONS="-dP"
ECVS_SSH_HOST_KEY="savannah.gnu.org,199.232.41.3 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAzFQovi+67xa+wymRz9u3plx0ntQnELBoNU4SCl3RkwSFZkrZsRTC0fTpOKatQNs1r/BLFoVt21oVFwIXVevGQwB+Lf0Z+5w9qwVAQNu/YUAFHBPTqBze4wYK/gSWqQOLoj7rOhZk0xtAS6USqcfKdzMdRWgeuZ550P6gSzEHfv0="

inherit cvs

S="${WORKDIR}/${ECVS_MODULE}" DESCRIPTION="Multi-platform & multi-targets dynamic translator" SRC_URI="" HOMEPAGE="http://fabrice.bellard.free.fr/qemu/"

KEYWORDS="x86 ppc -alpha -sparc -arm"
SLOT="0"
LICENSE="GPL-2 LGPL-2.1"
IUSE="sdl"

DEPEND="virtual/glibc
sdl? ( media-libs/libsdl )"
RDEPEND="!app-emulation/qemu"

RESTRICT="$RESTRICT nostrip"

TARGET_LIST="arm-user i386-user i386-softmmu ppc-user sparc-user"

src_compile() {
	econf --target-list="${TARGET_LIST}" `use_enable sdl` \
		|| die "configure failed"
	emake || die "make failed"
}
src_install() {
	einstall sharedir=${D}/usr/share/qemu
	dodoc TODO VERSION COPYING* README README.distrib *.html
}

pkg_postinstall() {
einfo "You will need the Universal TUN/TAP driver compiled into" einfo "kernel or as a module to use the virtual network device."
}

#6 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

problem with that one. seems to exit the sandbox...
- ---BEGIN OUTPUT---
make[1]: Leaving directory `/var/tmp/portage/qemu-cvs-1.2/work/qemu/sparc-user' mkdir -p "/usr/bin"
install -m 755 -s qemu-mkcow "/usr/bin"
ACCESS DENIED unlink: /usr/bin/qemu-mkcow
install: cannot remove `/usr/bin/qemu-mkcow': Permission denied
make: *** [install] Error 1

!!! ERROR: app-emulation/qemu-cvs-1.2 failed.
!!! Function einstall, Line 388, Exitcode 2
!!! einstall failed

- --------------------------- ACCESS VIOLATION SUMMARY
- ---------------------------
LOG FILE = "/tmp/sandbox-app-emulation_-_qemu-cvs-1.2-11919.log"

unlink: /usr/bin/qemu-mkcow
- --------------------------------------------------------------------------------
- ---END OUTPUT---
the logfile doesn't say anything of interest.

i'm sorry, but i don't feel like testing this today. i'll go to sleep now. good night out there!

Am Freitag, 2. April 2004 22:07 schrieb Gabriel Ebner:

Quoted 8 lines

Hello,

Quoted 4 lines · David Holm

This ebuild does not use CVS correctly. It should inherit the cvs eclass and use the builtin functions for checking out the CVS tree. There are a couple of examples of how to use it in portage, just do an esearch for "-cvs".

Quoted 6 lines

Well, I took that part from mozilla-firebird-cvs...

I've included a new ebuild supporting a sdl USE flag and using the cvs eclass as you suggested.

Gabriel.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAbdnR1nTg39QS/TsRApiEAKCD0ggXNX4/OI/Hp6dPotSXyzow9wCeOeEm yqOWkiSj0KqiiiJ6hewKA90=
=+yd/
-----END PGP SIGNATURE-----

#7 lore raw

Hello,

Quoted 14 lines · Rudi Lippert

problem with that one. seems to exit the sandbox...
- ---BEGIN OUTPUT---
make[1]: Leaving directory `/var/tmp/portage/qemu-cvs-1.2/work/qemu/sparc-user' mkdir -p "/usr/bin"
install -m 755 -s qemu-mkcow "/usr/bin"
ACCESS DENIED unlink: /usr/bin/qemu-mkcow
install: cannot remove `/usr/bin/qemu-mkcow': Permission denied
make: *** [install] Error 1

!!! ERROR: app-emulation/qemu-cvs-1.2 failed.
!!! Function einstall, Line 388, Exitcode 2
!!! einstall failed

Quoted 7 lines

- --------------------------- ACCESS VIOLATION SUMMARY
- ---------------------------
LOG FILE = "/tmp/sandbox-app-emulation_-_qemu-cvs-1.2-11919.log"

unlink: /usr/bin/qemu-mkcow
-

--------------------------------------------------------------------------------

Quoted 4 lines

- ---END OUTPUT--- the logfile doesn't say anything of interest.

i'm sorry, but i don't feel like testing this today. i'll go to sleep now. good night out there!

Oops, that's corrected with qemu-cvs-1.3 which I had just posted before I read this because I got that too. Seems to be a recent cvs commit.

Gabriel.

Signature · 1 line
Gabriel Ebner - reverse "ta.renbeleirbag@eg"
#8 lore raw
In reply to Gabriel Ebner

Hello,

qemu-cvs-1.3:

  *  Fixes missing DEPEND for texi2html / tetex
  *  Fixes missing RDEPEND for libsdl and glibc
  *  Fixes installation sandbox violations (my ebuild's flaws) suddenly

introduced in qemu cvs. (There is now a bindir variable in config-host.mak which I had to circumvent.)

Gabriel.

Signature · 1 line
Gabriel Ebner - reverse "ta.renbeleirbag@eg"

# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2

ECVS_AUTH="ext"
export CVS_RSH="ssh"
ECVS_SERVER="savannah.gnu.org:/cvsroot/qemu"
ECVS_MODULE="qemu"
ECVS_USER="anoncvs"
ECVS_PASS=""
ECVS_CVS_OPTIONS="-dP"
ECVS_SSH_HOST_KEY="savannah.gnu.org,199.232.41.3 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAzFQovi+67xa+wymRz9u3plx0ntQnELBoNU4SCl3RkwSFZkrZsRTC0fTpOKatQNs1r/BLFoVt21oVFwIXVevGQwB+Lf0Z+5w9qwVAQNu/YUAFHBPTqBze4wYK/gSWqQOLoj7rOhZk0xtAS6USqcfKdzMdRWgeuZ550P6gSzEHfv0="

inherit cvs

S="${WORKDIR}/${ECVS_MODULE}" DESCRIPTION="Multi-platform & multi-targets dynamic translator" SRC_URI="" HOMEPAGE="http://fabrice.bellard.free.fr/qemu/"

KEYWORDS="x86 ppc -alpha -sparc -arm"
SLOT="0"
LICENSE="GPL-2 LGPL-2.1"
IUSE="sdl"

DEPEND="virtual/glibc

		sdl? ( media-libs/libsdl )
		|| ( app-text/tetex app-text/texi2html )"

RDEPEND="virtual/glibc
sdl? ( media-libs/libsdl )
!app-emulation/qemu"

RESTRICT="$RESTRICT nostrip"

TARGET_LIST="arm-user i386-user i386-softmmu ppc-user sparc-user"

src_compile() {
	econf --target-list="${TARGET_LIST}" `use_enable sdl` \
		|| die "configure failed"
	emake || die "make failed"
}
src_install() {
	echo sharedir=${D}/usr/share/qemu >>config-host.mak
	echo bindir=${D}/usr/bin >>config-host.mak

	einstall
	dodoc TODO VERSION COPYING* README README.distrib *.html
}

pkg_postinstall() {
einfo "You will need the Universal TUN/TAP driver compiled into" einfo "kernel or as a module to use the virtual network device."
}

#9 lore raw
In reply to Gabriel Ebner
Quoted 10 lines · Gabriel Ebner

Hello,

Quoted 6 lines · Rudi Lippert

does anyone have experience with live cvs ebuilds for gentoo linux? maybe jocelyn could create such an ebuild for qemu. this would make building qemu as easy as installing any other package as it would include all the dependencies.
of course, this would only help gentoo users, but it seems that there are quite a few of us interested in qemu.

Quoted 3 lines

My qemu cvs ebuild is attached; but be warned that I'm new to writing ebuilds and so don't blame me if somethings fails.

Here's another ebuild.
This one minimises the patch against qemu-0.5.2 ebuild and seems to be usable.

Signature · 2 lines
Jocelyn Mayer <[email protected]>
Never organized

# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2

DESCRIPTION="Multi-platform & multi-targets dynamic translator" SRC_URI="" HOMEPAGE="http://fabrice.bellard.free.fr/qemu/"

KEYWORDS="x86 ppc -alpha -sparc -arm"
SLOT="0"
LICENSE="GPL-2 LGPL-2.1"
IUSE=""

DEPEND="virtual/glibc
dev-util/cvs
media-libs/libsdl"
RDEPEND=""

RESTRICT="nostrip fetch"

TARGET_LIST="arm-user i386-user i386-softmmu ppc-user sparc-user"

src_unpack() {
	# This is hackish, but it works.
	addwrite ${DISTDIR}/cvs-src
	mkdir -p ${DISTDIR}/cvs-src/
	cd ${DISTDIR}/cvs-src

	einfo "Checking out latest qemu from CVS..."
	export CVS_RSH=ssh
	cvs -z3 -d:ext:[email protected]:/cvsroot/qemu co qemu \
		|| die "could not checkout source from cvs"
	cp -a qemu ${S}

	# Fix an ownership porblem
	chown -R portage:portage ${S}	
}
src_compile () {
	./configure --prefix=/usr \
				--target-list="${TARGET_LIST}" || die "could not configure"
	make || die "make failed"
}

src_install() {
dobin qemu-mkcow
dodir /usr/share/qemu
insinto /usr/share/qemu
doins pc-bios/bios.bin pc-bios/vgabios.bin doman qemu.1

dobin arm-user/qemu-arm
dobin i386-user/qemu-i386
dobin sparc-user/qemu-sparc
dobin ppc-user/qemu-ppc
dobin sparc-user/qemu-sparc

dobin i386-softmmu/qemu

dodoc README README.distrib *.html linux.sh
}

pkg_postinstall() {
echo ">> You will need the Universal TUN/TAP driver compiled into" echo ">> kernel or as a module to use the virtual network device."
}