Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Frage zu Portage und Sandbox
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) Diskussionsforum
View previous topic :: View next topic  
Author Message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Sun Sep 23, 2012 9:20 am    Post subject: Frage zu Portage und Sandbox Reply with quote

Hallo Zusammen,

ich habe mir ein ebuild gebastelt, das den "touchcol Branch" von graphlcd-base auscheckt und installiert.

Das Problem ist nun, dass am Ende eine udev-Regel installiert werden soll und das lässt die Sandbox nicht zu. :(

Code:
....
install -m 755 -o root -g root -s lcdtestpattern /tmp/portage/app-misc/graphlcd-base-9999/image//usr/bin
make[2]: Leaving directory `/tmp/portage/app-misc/graphlcd-base-9999/work/graphlcd-base-9999/tools/lcdtestpattern'
make[1]: Leaving directory `/tmp/portage/app-misc/graphlcd-base-9999/work/graphlcd-base-9999/tools'
test -d "/etc/udev/rules.d/" && install -m 644 -o root -g root "99-graphlcd-base.rules" "/etc/udev/rules.d/"
ACCESS DENIED  unlink:       /etc/udev/rules.d/99-graphlcd-base.rules
install: cannot remove `/etc/udev/rules.d/99-graphlcd-base.rules': Permission denied
make: *** [install] Error 1
 * ERROR: app-misc/graphlcd-base-9999 failed (install phase):
 *   make install failed
 *
 * Call stack:
 *     ebuild.sh, line  85:  Called src_install
 *   environment, line 2638:  Called die
 * The specific snippet of code:
 *       make DESTDIR="${D}"/usr LIBDIR="${D}"/usr/$(get_libdir) install || die "make install failed";
 *
 * If you need support, post the output of `emerge --info '=app-misc/graphlcd-base-9999'`,
 * the complete build log and the output of `emerge -pqv '=app-misc/graphlcd-base-9999'`.
 * This ebuild is from an overlay named 'local-repo': '/usr/local/portage/'
 * The complete build log is located at '/log/portage/app-misc:graphlcd-base-9999:20120923-091147.log'.
 * For convenience, a symlink to the build log is located at '/tmp/portage/app-misc/graphlcd-base-9999/temp/build.log'.
 * The ebuild environment file is located at '/tmp/portage/app-misc/graphlcd-base-9999/temp/environment'.
 * Working directory: '/tmp/portage/app-misc/graphlcd-base-9999/work/graphlcd-base-9999'
 * S: '/tmp/portage/app-misc/graphlcd-base-9999/work/graphlcd-base-9999'
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE "/var/log/sandbox/sandbox-17415.log"

VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: unlink
S: deny
P: /etc/udev/rules.d/99-graphlcd-base.rules
A: /etc/udev/rules.d/99-graphlcd-base.rules
R: /etc/udev/rules.d/99-graphlcd-base.rules
C: install -m 644 -o root -g root 99-graphlcd-base.rules /etc/udev/rules.d/
--------------------------------------------------------------------------------

>>> Failed to emerge app-misc/graphlcd-base-9999, Log file:

>>>  '/log/portage/app-misc:graphlcd-base-9999:20120923-091147.log'


Installiere ich mit:

Code:
FEATURES="-sandbox -usersandbox" emerge app-misc/graphlcd-base


funktioniert alles wie gewünscht.

Die Frage ist nun, ob man das ebuild so anpassen kann, dass quasi die sandbox umgangen wird?
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4565

PostPosted: Sun Sep 23, 2012 9:40 am    Post subject: Reply with quote

Ich hab jetzt extra graphlcd-base gecloned, make ausgeführt, und ich find partout keine udev-Regel, die installiert werden sollte. Deshalb ist das wohl etwas was du selber installierst/reingepatchst.
Poste doch bitte mal dein ebuild und alle files, die du einbindest (patches usw.)
Back to top
View user's profile Send private message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Sun Sep 23, 2012 9:48 am    Post subject: Reply with quote

franzf wrote:
[...] Poste doch bitte mal dein ebuild und alle files, die du einbindest (patches usw.)


Bitteschön: :)

Code:
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2



EAPI=1
SRC_URI=""

: ${EGIT_REPO_URI:=${GRAPHLCD_BASE_GIT_REPO_URI:-git://projects.vdr-developer.org/graphlcd-base.git}}
: ${EGIT_BRANCH:=${GRAPHLCD_BASE_GIT_BRANCH:-master}}

inherit git-2 eutils flag-o-matic multilib

DESCRIPTION="Graphical LCD Driver"
HOMEPAGE="http://graphlcd.berlios.de/"
SRC_URI=""


KEYWORDS="amd64 x86"
SLOT="0"
LICENSE="GPL-2"
IUSE="truetype g15 graphicsmagick"

DEPEND=""

RDEPEND="truetype? ( media-libs/freetype
      media-fonts/corefonts )
      g15? ( app-misc/g15daemon )
      graphicsmagick? ( media-gfx/imagemagick )"

src_unpack() {

   git-2_src_unpack ${A}
   cd "${S}"

   sed -i Make.config -e "s:usr\/local:usr:" -e "s:FLAGS *=:FLAGS ?=:"
   use !truetype && sed -i "s:HAVE_FREETYPE2:#HAVE_FREETYPE2:" Make.config
       use graphicsmagick && sed -i "s/^IMAGELIB\ =\s*$/IMAGELIB\ =\ imagemagick/" glcdgraphics/Makefile



}

src_install() {

   make DESTDIR="${D}"/usr LIBDIR="${D}"/usr/$(get_libdir) install || die "make install failed"

   insinto /etc
   doins graphlcd.conf

   dodoc docs/*
}


/etc/make.conf
Code:
# graphlcd-base

# GRAPHLCD_BASE_GIT_REPO_URI="git://projects.vdr-developer.org/graphlcd-base.git"
GRAPHLCD_BASE_GIT_BRANCH="touchcol"
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4565

PostPosted: Sun Sep 23, 2012 10:01 am    Post subject: Reply with quote

Ah, das mit dem branch hab ich vollkommen verpennt :D
UDEVRULESDIR kannst du wie DESTDIR und LIBDIR in der make install-Zeile angeben. Häng auf die selbe Weise ein "${D}" davor, und alles sollte passen (evtl. musst du ${D}/etc/udev/rules.d noch selber anlegen)
Back to top
View user's profile Send private message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Sun Sep 23, 2012 10:41 am    Post subject: Reply with quote

Ich bin mir nicht sicher, ob ich Dich richtig verstanden habe?

Wenn ich die Zeile, wie folg abändere, dann geht es auf jeden Fall nicht. :(

Code:
   make DESTDIR="${D}"/usr LIBDIR="${D}"/usr/$(get_libdir) UDEVRULESDIR="${D}"/etc/udev/rules.d install || die "make install failed"


Code:
....
make[2]: Entering directory `/tmp/portage/app-misc/graphlcd-base-9999/work/graphlcd-base-9999/tools/lcdtestpattern'
install -d /tmp/portage/app-misc/graphlcd-base-9999/image//usr/bin
install -m 755 -o root -g root -s lcdtestpattern /tmp/portage/app-misc/graphlcd-base-9999/image//usr/bin
make[2]: Leaving directory `/tmp/portage/app-misc/graphlcd-base-9999/work/graphlcd-base-9999/tools/lcdtestpattern'
make[1]: Leaving directory `/tmp/portage/app-misc/graphlcd-base-9999/work/graphlcd-base-9999/tools'
test -d "/tmp/portage/app-misc/graphlcd-base-9999/image//etc/udev/rules.d" && install -m 644 -o root -g root "99-graphlcd-base.rules" "/tmp/portage/app-misc/graphlcd-base-9999/image//etc/udev/rules.d"
make: *** [install] Error 1
 * ERROR: app-misc/graphlcd-base-9999 failed (install phase):
 *   make install failed
 *
 * Call stack:
 *     ebuild.sh, line  85:  Called src_install
 *   environment, line 2638:  Called die
 * The specific snippet of code:
 *       make DESTDIR="${D}"/usr LIBDIR="${D}"/usr/$(get_libdir) UDEVRULESDIR="${D}"/etc/udev/rules.d install || die "make install failed";
 *
 * If you need support, post the output of `emerge --info '=app-misc/graphlcd-base-9999'`,
 * the complete build log and the output of `emerge -pqv '=app-misc/graphlcd-base-9999'`.
 * This ebuild is from an overlay named 'local-repo': '/usr/local/portage/'
 * The complete build log is located at '/log/portage/app-misc:graphlcd-base-9999:20120923-103745.log'.
 * For convenience, a symlink to the build log is located at '/tmp/portage/app-misc/graphlcd-base-9999/temp/build.log'.
 * The ebuild environment file is located at '/tmp/portage/app-misc/graphlcd-base-9999/temp/environment'.
 * Working directory: '/tmp/portage/app-misc/graphlcd-base-9999/work/graphlcd-base-9999'
 * S: '/tmp/portage/app-misc/graphlcd-base-9999/work/graphlcd-base-9999'

>>> Failed to emerge app-misc/graphlcd-base-9999, Log file:

>>>  '/log/portage/app-misc:graphlcd-base-9999:20120923-103745.log'
.....
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4565

PostPosted: Sun Sep 23, 2012 11:05 am    Post subject: Reply with quote

Das ist weil das "test -d" im Makefile fehlschlägt - wie bereits angedeutet musst du das Verzeichnis noch erstellen:
Code:
mkdir -p "${D}"/etc/udev/rules.d

in src_install
Ich bin da aber nicht der Guru, kann mir vorstellen dass die "Gentiquette" sagt, das gehört bereits ins src_prepare. Evtl. gibts auch eine bessere Alternative zum mkdir (wie man z.B. normalerweise "emake" statt "make" ins ebuild nimmt).
Back to top
View user's profile Send private message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Sun Sep 23, 2012 11:17 am    Post subject: Reply with quote

1000 THX @ franzf,

nun gehts. :)

BTW:

So funktioniert es:

Code:
....
src_install() {

   mkdir -p "${D}"/etc/udev/rules.d
   make DESTDIR="${D}"/usr LIBDIR="${D}"/usr/$(get_libdir) UDEVRULESDIR="${D}"/etc/udev/rules.d install || die "make install failed"

   insinto /etc
   doins graphlcd.conf

   dodoc docs/*
}


So, leider nicht!

Code:
.....
src_prepare () {

   mkdir -p "${D}"/etc/udev/rules.d
}

src_install() {

   mkdir -p "${D}"/etc/udev/rules.d
   make DESTDIR="${D}"/usr LIBDIR="${D}"/usr/$(get_libdir) UDEVRULESDIR="${D}"/etc/udev/rules.d install || die "make install failed"

   insinto /etc
   doins graphlcd.conf

   dodoc docs/*
}
Back to top
View user's profile Send private message
Josef.95
Advocate
Advocate


Joined: 03 Sep 2007
Posts: 4520
Location: Germany

PostPosted: Sun Sep 23, 2012 11:41 am    Post subject: Reply with quote

Nur kurz angemerkt: Einem Live.Ebuild verpasst man normal keine Keywords (schon gar nicht stable) weil es schlicht falsch ist)
Setze doch am besten
Code:
KEYWORDS=""
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9507
Location: beyond the rim

PostPosted: Mon Oct 01, 2012 3:06 pm    Post subject: Reply with quote

Evtl. noch 'mkdir -p ...' durch 'dodir ...' ersetzen.
Ist übrigens nur ein Workaround, der eigentliche Fehler ist der 'test -d ...' Aufruf im Makefile (nur als Hintergrund Info).
Back to top
View user's profile Send private message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Mon Oct 01, 2012 3:16 pm    Post subject: Reply with quote

Genone wrote:
Evtl. noch 'mkdir -p ...' durch 'dodir ...' ersetzen.
Ist übrigens nur ein Workaround, der eigentliche Fehler ist der 'test -d ...' Aufruf im Makefile (nur als Hintergrund Info).


Ware es denn sinnvoller es mit sed im Makefile zu ändern und falls ja, wie?
Back to top
View user's profile Send private message
mrueg
Retired Dev
Retired Dev


Joined: 08 Jul 2012
Posts: 36
Location: Berlin, Deutschland

PostPosted: Mon Oct 01, 2012 10:09 pm    Post subject: Reply with quote

3PO wrote:
Genone wrote:
Evtl. noch 'mkdir -p ...' durch 'dodir ...' ersetzen.
Ist übrigens nur ein Workaround, der eigentliche Fehler ist der 'test -d ...' Aufruf im Makefile (nur als Hintergrund Info).


Ware es denn sinnvoller es mit sed im Makefile zu ändern und falls ja, wie?


nein. ist eine portage funktion, wenn du jetzt drauf anspielst dodir ins Makefile zu packen.

Du solltest statt make auch besser emake verwenden.

Die Sed-Lines in src_unpack gehören besser in src_prepare (und am besten mit einem || die abgeschlossen, klammerung hierbei nicht vergessen wenn du vorher ein && hast)


Die EAPI am besten auf 4 setzen, wenn es keinen grund gibt 1 zu nutzen.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum 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