Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Eigenes ebuild verursacht sandbox access violation
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
skibbi
Apprentice
Apprentice


Joined: 13 Apr 2004
Posts: 202
Location: Rostock - Germany

PostPosted: Sun Apr 22, 2007 5:20 pm    Post subject: Eigenes ebuild verursacht sandbox access violation Reply with quote

Hi,
da media-video/mmsv2 im portage tree recht alt ist, hab ichs für die neue Version angepasst aber ich bekomme nun immer access violations weil beim erstellen des programms neuerdings auch einige ordner angelegt werden (z.B. /ar/lib/mms/).
Welche Anpassungen muss ich vornehmen damit die Verzeichnisse korrekt angelegt werden, die sandbox aber nicht mehr rumjault?

Hier nor mein angepasstes ebuild für mms version 1.0.8.3

Code:
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-video/mmsv2/mmsv2-1.0.8_rc2.ebuild,v 1.1 2006/08/29 20:49:46 arj Exp $

inherit eutils

DESCRIPTION="Menu system for easy movie and audio playback and image viewing."
HOMEPAGE="http://mms.sunsite.dk/"

MY_P="1.0.8.3"

SRC_URI="http://mms.sunsite.dk/mms-${MY_P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="debug lirc svga sdl dvb dxr3"

RDEPEND="media-libs/imlib2
        x11-libs/libXScrnSaver
        media-libs/taglib
        >=dev-libs/libpcre-4.3
        =dev-db/sqlite-2*
        media-tv/xmltv
        media-libs/xine-lib
        media-video/cxfe
        lirc? ( app-misc/lirc )
        svga? ( media-libs/svgalib )
        sdl? ( media-libs/libsdl )
        dxr3? ( media-video/em8300-libraries )"

DEPEND="${RDEPEND}
        sys-devel/autoconf
        sys-devel/automake"

S="${WORKDIR}/mms-1.0.8.3"

src_compile() {

        local myconf=

        ( use debug ) \
                && myconf="${myconf} --enable-debug"

        ( use lirc ) \
                && myconf="${myconf} --enable-lirc"

        ( use svga ) \
                && myconf="${myconf} --enable-vgagl"

        ( ! use sdl ) \
                && myconf="${myconf} --disable-sdl"

        ( use dxr3 ) \
                && myconf="${myconf} --enable-dxr3"

        ( use dvb ) \
                && myconf="${myconf} --enable-dvb"

        cd ${S}

        ./configure --prefix=/usr --enable-xine-audio \
                ${myconf} || die

        emake -j1 || die
}

src_install() {
        cd ${S}

        make PREFIX=${D}/usr \
             BINDIR=${D}/usr/bin \
             CONFIGDIR=${D}/etc/mms \
             DATADIR=${D}/usr/share/mms \
             install || die "Failed to install mmsv2!"

        dodoc doc/BUGS doc/Changelog doc/LICENSE doc/README doc/TODO
}

pkg_postinst() {
        einfo "Be sure to change /etc/mms/config and /etc/mms/input* to your needs"
        einfo "You also need to place a TV.xml file in /etc/mms for epg to work"
        einfo
        einfo "Documentation is available online: http://mms.sunsite.dk/doc/index.html"
}
Back to top
View user's profile Send private message
Carlo
Developer
Developer


Joined: 12 Aug 2002
Posts: 3356

PostPosted: Sun Apr 22, 2007 6:03 pm    Post subject: Reply with quote

Nimm erst mal die autotools aus DEPEND und nutze bitte autotools.eclass (WANT_AUTOCONF/MAKE vor inherit setzten). MY_P wäre in deinem Fall eher MY_PV, aber bitte nie die Version hart kodieren und das gleich mehrfach. Wenn $P mmsv2-1.0.8.3 ist, dann setze MY_P="${P/v2/}". ( use foo ) && myconf=... ist sehr umständlich und mit ( ) öffnest du jedes Mal unnötigerweise eine Subshell. Durchsuche das Repostory mal nach use_enable (definiert in ebuild.sh).

Bzgl. der Zugriffsverletzung: Bitte nicht jede Variable auf ${D}/foo setzen, auch wenn einstall() dies als letzten Rettungsanker bei total miesen Build-Skripten für dich erledigt. "Normalerweise" sollte eine Variable DESTDIR, destdir oder auch installdir existieren, die du auf ${D} setzt. Ist das nicht der Fall, ist der zu präferierende Weg das Build-Skript zu patchen. Wenn dies zu aufwendig wird, gibt's wie schon erwähnt einstall() - und manchmal geht es gar nicht ohne patchen.
_________________
Please make sure that you have searched for an answer to a question after reading all the relevant docs.
Back to top
View user's profile Send private message
skibbi
Apprentice
Apprentice


Joined: 13 Apr 2004
Posts: 202
Location: Rostock - Germany

PostPosted: Mon Apr 23, 2007 4:57 pm    Post subject: Reply with quote

Jo das ist ja nich mein eigenes, sondern das aktuelle ausm Portage tree, dass ich erneuert hab, weil der maintainer die Feature Requests ausm bugzilla bisher nich bearbeitet hatte.
Und ich hab von der Sache so gut wie gar keine Ahnung. Leider gibt es (oder ich find die nich) nirgends ne ordentliche Doku zu der ebuild Geschichte der machart "Howto write ebuilds" oder sowas.
Wo finde ich informationen damit ich das lernen kann? Oder sind nur die man pages quellen dafür?
Back to top
View user's profile Send private message
ScytheMan
l33t
l33t


Joined: 30 Nov 2005
Posts: 605

PostPosted: Mon Apr 23, 2007 5:13 pm    Post subject: Reply with quote

http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=1

http://devmanual.gentoo.org/quickstart/index.html
Back to top
View user's profile Send private message
schmutzfinger
Veteran
Veteran


Joined: 26 Oct 2003
Posts: 1287
Location: Dresden/Germany

PostPosted: Mon Apr 23, 2007 6:09 pm    Post subject: Reply with quote

Jetzt hast du bestimmt schon einiges gelernt. Aber das wichtigste für OpenSource Entwicklung ist ... gucken obs schon einer gemacht hat. Bevor man irgendwas macht immer bugtracker/mailinglisten etc checken.

https://bugs.gentoo.org/show_bug.cgi?id=155767

Mit selbermachen lernt man zwar mehr aber manchmal ist das ja nur ein notwendiges Übel ;).
Back to top
View user's profile Send private message
skibbi
Apprentice
Apprentice


Joined: 13 Apr 2004
Posts: 202
Location: Rostock - Germany

PostPosted: Mon Apr 23, 2007 7:04 pm    Post subject: Reply with quote

Narf nagut aber ich kann die kenntnisse trotzdem gut gebrauchen weil ich schon öfters mir mal gewünscht hätte zu verstehen was da passiert, wenn mal wieder was schief gegangen ist. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum