Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[ebuild] creation (résolu)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
sd44
Apprentice
Apprentice


Joined: 21 Jul 2007
Posts: 277
Location: Nantes 44

PostPosted: Sat Sep 01, 2007 2:54 pm    Post subject: [ebuild] creation (résolu) Reply with quote

Salut

voila je suis en train de faire un ebuild pour AutoScan et je rencontre des difficulté.

tout se passe bien jusqu'a la copie des fichiers
Code:

>>> Install AutoScan-Network-1.03 into /var/tmp/portage/net-misc/AutoScan-Network-1.03/image/ category net-misc
*** Installing executable...
Instance (AutoScan_Agent) : 0
install -c -m 755 bin/AutoScan_Agent /usr/sbin/
ACCESS DENIED  open_wr:   /usr/sbin/AutoScan_Agent
install: ne peut créer le fichier régulier `/usr/sbin/AutoScan_Agent': Permission non accordée
make: *** [install] Erreur 1

!!! ERROR: net-misc/AutoScan-Network-1.03 failed.
Call stack:
  ebuild.sh, line 1638:   Called dyn_install
  ebuild.sh, line 1083:   Called qa_call 'src_install'
  ebuild.sh, line 44:   Called src_install
  AutoScan-Network-1.03.ebuild, line 74:   Called die

!!! emake install failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/net-misc/AutoScan-Network-1.03/temp/build.log'.

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/var/log/sandbox/sandbox-net-misc_-_AutoScan-Network-1.03-7830.log"

open_wr:   /usr/sbin/AutoScan_Agent
--------------------------------------------------------------------------------



si j'ai bien compris sandbox créé un environement protegé genre chroot et du coup je ne peux faire mes cp

voila mon ebuild
Code:

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:  $

DESCRIPTION="A utility for network exploration or security auditing"
HOMEPAGE="http://autoscan.fr/"
SRC_URI="http://127.0.0.1/${P}.tar.gz"

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

DEPEND="sys-libs/glibc"

src_compile() {

   econf --distrib-gentoo --without-gui || die "econf failed"
   emake || die "emake failed"
}

src_install() {
   emake install || die "emake install failed"

}

_________________
Pourquoi faire simple quand on peut faire compliqué ?


Last edited by sd44 on Sat Sep 01, 2007 7:23 pm; edited 1 time in total
Back to top
View user's profile Send private message
geekounet
Bodhisattva
Bodhisattva


Joined: 11 Oct 2004
Posts: 3772
Location: Wellington, Aotearoa

PostPosted: Sat Sep 01, 2007 3:00 pm    Post subject: Reply with quote

Salut, il faut que tu lui dises d'installer dans l'image temporaire, comme ceci :
Code:
src_install() {
        emake install DESTDIR="${D}" || die
}

;)
Back to top
View user's profile Send private message
sd44
Apprentice
Apprentice


Joined: 21 Jul 2007
Posts: 277
Location: Nantes 44

PostPosted: Sat Sep 01, 2007 3:02 pm    Post subject: Reply with quote

oui j'avais vu ça sur d'autre ebuild mais ça ne marche pas !

le ./configure est fait main, que manque t'il ?
_________________
Pourquoi faire simple quand on peut faire compliqué ?
Back to top
View user's profile Send private message
sd44
Apprentice
Apprentice


Joined: 21 Jul 2007
Posts: 277
Location: Nantes 44

PostPosted: Sat Sep 01, 2007 4:15 pm    Post subject: Reply with quote

pour info voila le makefile généré
n'hesité surtout pas a mettre vos commentaire car je seche sur ce coup là

Code:

PACKAGE  = AutoScan_Network
VERSION  = 1.03
REP_BASE = AutoScan-Network-1.03
REP_TOP = ${PWD}
GCONF = xml:merged:/etc/gconf/gconf.xml.defaults
REP_AUTOSCAN_NETWORK = src/AutoScan/
REP_AUTOSCAN_AGENT = src/AutoScan_Agent/

SHTOOL = ./shtool
INSTALL =  install
prefix = /usr
exec_prefix = ${prefix}
bindir = ${exec_prefix}/sbin
DESTDIR =

all: Rep_Bin AutoScan_Agent
   pwd
   mv src/AutoScan_Agent/AutoScan_Agent bin/

Rep_Bin :
   rm -fR bin/; mkdir bin

AutoScan_Network : $(REP_AUTOSCAN_NETWORK)/Makefile
   @echo Compiling AutoScan_Network; cd $(REP_AUTOSCAN_NETWORK) && $(MAKE)

AutoScan_Agent : $(REP_AUTOSCAN_AGENT)/Makefile
   @echo Compiling AutoScan_Agent; cd $(REP_AUTOSCAN_AGENT) && $(MAKE)

dist-clean:   clean mandriva-clean fedora-clean
   rm -rf Makefile $(REP_AUTOSCAN_NETWORK)config.h $(REP_AUTOSCAN_AGENT)config.h $(REP_AUTOSCAN_NETWORK)Makefile $(REP_AUTOSCAN_AGENT)Makefile
   rm -Rf Package/GUI/Debian/bin; rm -Rf Package/GUI/Debian/usr
   rm -Rf Package/DAEMON/Debian/etc; rm -Rf Package/DAEMON/Debian/usr
   rm -Rf Package/GUI/Ubuntu/usr
   rm -Rf Package/DAEMON/Ubuntu/etc; rm -Rf Package/DAEMON/Ubuntu/usr

clean:
   rm -f $(REP_AUTOSCAN_NETWORK)core $(REP_AUTOSCAN_NETWORK)*.o $(REP_AUTOSCAN_AGENT)core $(REP_AUTOSCAN_AGENT)*.o; rm -fR bin;rm -Rf src/AutoScan/.deps; rm -Rf src/AutoScan_Agent/.deps

package:   dist-clean
   @echo "Creating tar.gz..."
   tar czf $(PACKAGE).$(VERSION).tar.gz ../$(REP_BASE)/*


mandriva-clean:
   rm -Rf Package/GUI/Mandrake/BUILD
   rm -Rf Package/GUI/Mandrake/RPMS
   rm -Rf Package/GUI/Mandrake/SOURCES
   rm -Rf Package/GUI/Mandrake/SRPMS
   rm -Rf Package/GUI/Mandrake/tmp
   rm -Rf Package/DAEMON/Mandrake/BUILD
   rm -Rf Package/DAEMON/Mandrake/RPMS
   rm -Rf Package/DAEMON/Mandrake/SOURCES
   rm -Rf Package/DAEMON/Mandrake/SRPMS
   rm -Rf Package/DAEMON/Mandrake/tmp

fedora-clean:
   rm -Rf Package/GUI/Fedora/BUILD
   rm -Rf Package/GUI/Fedora/RPMS
   rm -Rf Package/GUI/Fedora/SOURCES
   rm -Rf Package/GUI/Fedora/SRPMS
   rm -Rf Package/GUI/Fedora/tmp

install:
   @echo '*** Installing executable...'
   @instance=`ps aux  | grep "[0-9] /usr/sbin/AutoScan_Agent" | wc -l`; echo "Instance (AutoScan_Agent) : $$instance"; if [ "$$instance" -eq 2 ]; then echo "kill Agent"; killall AutoScan_Agent; fi
   $(SHTOOL) mkdir -f -p -m 755 /usr/sbin
   $(INSTALL) -c -m 755 bin/AutoScan_Agent /usr/sbin/

   @echo '*** Installing Script...'
   rc-update add autoscan default
   /etc/init.d/autoscan start

   @echo '*** Fixing permissions...'
   chown root:root /usr/sbin/AutoScan_Agent

   @echo '*** Old version...'
   if [ -f /bin/AutoScan_Network ]; then rm /bin/AutoScan_Network; fi
   if [ -f /bin/AutoScan_Agent ]; then rm /bin/AutoScan_Agent; fi

   @echo '*** Done installing.'



ps : j'utilise désormais la modif de geekounet : emake install DESTDIR="${D}" || die
_________________
Pourquoi faire simple quand on peut faire compliqué ?
Back to top
View user's profile Send private message
sd44
Apprentice
Apprentice


Joined: 21 Jul 2007
Posts: 277
Location: Nantes 44

PostPosted: Sat Sep 01, 2007 6:48 pm    Post subject: Reply with quote

up ? help 8O
_________________
Pourquoi faire simple quand on peut faire compliqué ?
Back to top
View user's profile Send private message
sd44
Apprentice
Apprentice


Joined: 21 Jul 2007
Posts: 277
Location: Nantes 44

PostPosted: Sat Sep 01, 2007 7:22 pm    Post subject: Reply with quote

bon bah j'ai résolu le probleme :

attention faire les copies avec le prefix $(D) qui correspond a l'images
en fait je pensais que j'installais directement dans / !
_________________
Pourquoi faire simple quand on peut faire compliqué ?
Back to top
View user's profile Send private message
Magic Banana
Veteran
Veteran


Joined: 13 Dec 2005
Posts: 1912
Location: Belo Horizonte, Minas Gerais, Brasil

PostPosted: Sat Sep 01, 2007 7:24 pm    Post subject: Reply with quote

Tu dois créer le dossier destiné à héberger le logiciel avec la commande :
Créer le répertoire du logiciel:
dodir LÀ_OÙ_TU_VEUX_VRAIMENT_INSTALLER


Ensuite tu fais tout le travail dans ${D}/LÀ_OÙ_TU_VEUX_VRAIMENT_INSTALLER.

Pour ce qui est de l'exécutable il faut le copier avec la commande "dobin", pour la page de manuel "doman", etc.

Par exemple voilà la section src_install() de l'ebuild que j'ai écrit pour offline-emerge :
Code:
src_install() {
     dodir /usr/share/offline-emerge
     cp fetch ${D}/usr/share/offline-emerge
     dobin offline-emerge
     doman offline-emerge.1
}


C'est très basique dans mon cas puisqu'il n'y a pas de phase de compilation (offline-emerge est écrit en bash).

EDIT : Arf ! Tu vas plus vite que moi pour écrire tes messages ! :twisted:
Back to top
View user's profile Send private message
sd44
Apprentice
Apprentice


Joined: 21 Jul 2007
Posts: 277
Location: Nantes 44

PostPosted: Sat Sep 01, 2007 7:32 pm    Post subject: Reply with quote

oui d'ailleurs je me demandais pourquoi on me donnait la réponse apres que je l'ai trouvé :lol:
ceci dit je n'utilise pas dodir et dobin mais shtool ou mkdir et cp

y a t'il une différence importante ?
_________________
Pourquoi faire simple quand on peut faire compliqué ?
Back to top
View user's profile Send private message
Magic Banana
Veteran
Veteran


Joined: 13 Dec 2005
Posts: 1912
Location: Belo Horizonte, Minas Gerais, Brasil

PostPosted: Sat Sep 01, 2007 8:08 pm    Post subject: Reply with quote

Personnellement je n'ai fait que suivre les informations sur la page man des ebuilds. Je suppose donc qu'il vaut mieux utiliser les commandes que je t'ai données.
Back to top
View user's profile Send private message
sd44
Apprentice
Apprentice


Joined: 21 Jul 2007
Posts: 277
Location: Nantes 44

PostPosted: Sat Sep 01, 2007 8:14 pm    Post subject: Reply with quote

^^
_________________
Pourquoi faire simple quand on peut faire compliqué ?
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8708
Location: ~Brussels - Belgique

PostPosted: Sat Sep 01, 2007 8:20 pm    Post subject: Reply with quote

psst, on dit "compliqué" et pas "compliquer" ;)
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
Magic Banana
Veteran
Veteran


Joined: 13 Dec 2005
Posts: 1912
Location: Belo Horizonte, Minas Gerais, Brasil

PostPosted: Sat Sep 01, 2007 8:43 pm    Post subject: Reply with quote

sd44 wrote:
^^


Je parle de cette page (que tu peux aussi obtenir avec la commande "man 5 ebuild").
Back to top
View user's profile Send private message
sd44
Apprentice
Apprentice


Joined: 21 Jul 2007
Posts: 277
Location: Nantes 44

PostPosted: Sat Sep 01, 2007 9:34 pm    Post subject: Reply with quote

oui j'avais lu cette page de man et pein d'autre aussi lol

ps : merci xavier je suis vraiment minable en ortho :oops:
_________________
Pourquoi faire simple quand on peut faire compliqué ?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French 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