pb création de rpm binaire / mini tuto inside ,now

pb création de rpm binaire / mini tuto inside ,now - Codes et scripts - Linux et OS Alternatifs

Marsh Posté le 29-06-2003 à 23:38:37    

Salut ,  
ben voila ayant abandonné l'idée de faire un binaire comme celui de realoneplayer , je me suis lancé dans la fabrication de rpm ...
Alors voila la situation:
- g fait un rpm et un src.rpm de la libsge (container de libSDL+ ....)  
ca marche nickel , installation classique du rpm ok.
 
- ensuite je me suis lancé dans la création d'un rpm pour mon application (gui pour divx box RODRIGO)
    Je fais une source correcte tar.gz  
    Je lance la création de rpm et src rpm , tout se passe ok , sauf que qd je lance l'installation du binaire rpm , ca m'installe pas du tout le programme , ca met que c'est installé , mais le programme est absent .  
    Si par contre je lance un rpm --rebuild de mon src.rpm , ca marche .
 
 
Questions :
Comment voir ce que fait exactement le rpm du binaire quand on lance le rpm -Uvh *.rpm (pour savoir ou il me mets les fichiers)?
 
OU corriger ce qui va pas , Qu'est ce qui va pas ?
 
Si il y en a qui veulent m'aider je mets les rpms sur le net sans pb .
 
Je suis un peu a bout de souffle la , g beau chercher , je trouve pas et ca se trouve c'est tout bête.


Message édité par psebcopathe le 03-07-2003 à 08:22:47
Reply

Marsh Posté le 29-06-2003 à 23:38:37   

Reply

Marsh Posté le 30-06-2003 à 14:12:03    

persone ne sait faire des rpm ici ?

Reply

Marsh Posté le 01-07-2003 à 19:16:40    

je sais pas faire des RPM, mais je peux te dire que ta lib ne compile pas comme il faut :

[root@tue_amour tmp]# rpm --rebuild libSGE-020904-mdk.src.rpm  
Installing libSGE-020904-mdk.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.18701
+ umask 022
+ cd /usr/src/RPM/BUILD
+ cd /usr/src/RPM/BUILD
+ rm -rf libSGE-020904
+ /bin/gzip -dc /usr/src/RPM/SOURCES/libSGE-020904.tar.gz
+ tar -xvvf -
-rw-r--r-- seb/seb        9393 2002-01-02 16:25:16 libSGE-020904/sge_primitives.
h
drwxr-xr-x              Création du répertoire: libSGE-020904
-rw-r--r-- seb/seb        5143 2002-08-21 18:06:17 libSGE-020904/sge_tt_text.h
-rw-r--r-- seb/seb         327 2002-01-20 15:01:11 libSGE-020904/Todo
-rw-r--r-- seb/seb        5271 2002-05-05 10:42:24 libSGE-020904/docs/blib.html
drwxr-xr-x              Création du répertoire: libSGE-020904/docs
-rw-r--r-- seb/seb        1198 2001-06-06 13:41:12 libSGE-020904/docs/thanks.htm
l
-rw-r--r-- seb/seb        8214 2001-05-18 02:43:13 libSGE-020904/docs/shape.html
-rw-r--r-- seb/seb       12896 2002-01-02 20:49:59 libSGE-020904/docs/figures.ht
ml
-rw-r--r-- seb/seb        6197 2002-01-02 22:47:35 libSGE-020904/docs/surface.ht
ml
-rw-r--r-- seb/seb        5084 2002-08-21 23:20:00 libSGE-020904/docs/ttf.html
-rw-r--r-- seb/seb        4778 2001-06-26 16:06:59 libSGE-020904/docs/pixels.htm
l
-rw-r--r-- seb/seb        9064 2001-06-28 13:48:45 libSGE-020904/docs/text_class
es.html
-rw-r--r-- seb/seb        2095 2001-11-16 14:12:49 libSGE-020904/docs/index.html
-rw-r--r-- seb/seb        4447 2001-06-28 13:52:01 libSGE-020904/docs/bmf.html
-rw-r--r-- seb/seb        9150 2002-08-21 23:21:06 libSGE-020904/docs/toc.html
-rw-r--r-- seb/seb        1404 2001-06-26 13:40:41 libSGE-020904/docs/macros.htm
l
-rw-r--r-- seb/seb        9608 2001-11-17 23:13:10 libSGE-020904/docs/guide.html
-rw-r--r-- seb/seb        2988 2001-05-18 02:43:13 libSGE-020904/docs/collision.
html
-rw-r--r-- seb/seb        2538 2001-05-18 02:43:13 libSGE-020904/docs/color.html
-rw-r--r-- seb/seb        3500 2002-01-03 22:38:57 libSGE-020904/docs/rotate.htm
l
-rw-r--r-- seb/seb        4179 2001-06-25 15:33:40 libSGE-020904/docs/ttf-output
.html
-rw-r--r-- seb/seb        7705 2002-01-04 15:23:47 libSGE-020904/docs/intro.html
-rw-r--r-- seb/seb        4832 2001-06-28 13:50:26 libSGE-020904/docs/ttf-input.
html
-rw-r--r-- seb/seb        2226 2001-05-18 02:43:13 libSGE-020904/docs/misc.html
-rw-r--r-- seb/seb       62505 2002-09-04 18:57:23 libSGE-020904/sge_primitives.
cpp
-rw-r--r-- seb/seb        8436 2002-09-04 20:34:18 libSGE-020904/WhatsNew
-rw-r--r-- seb/seb        2147 2002-09-04 19:48:23 libSGE-020904/Makefile
-rw-r--r-- seb/seb         780 2003-06-29 19:02:15 libSGE-020904/Makefile.conf
-rw-r--r-- seb/seb       26430 2001-11-14 15:51:13 libSGE-020904/LICENSE
-rw-r--r-- seb/seb         852 2001-06-11 12:41:44 libSGE-020904/sge.h
-rw-r--r-- seb/seb        7144 2002-09-04 19:09:46 libSGE-020904/README
-rw-r--r-- seb/seb       43761 2002-08-21 20:07:45 libSGE-020904/sge_tt_text.cpp
-rw-r--r-- seb/seb       21408 2002-08-27 23:34:35 libSGE-020904/sge_rotation.cp
p
-rw-r--r-- seb/seb       16059 2002-08-25 20:00:05 libSGE-020904/sge_bm_text.cpp
-rw-r--r-- seb/seb        8384 2001-11-14 15:26:02 libSGE-020904/sge_collision.c
pp
-rw-r--r-- seb/seb       11235 2001-11-14 15:21:59 libSGE-020904/sge_shape.h
-rw-r--r-- seb/seb        1970 2001-11-14 15:23:46 libSGE-020904/sge_bm_text.h
-rw-r--r-- seb/seb       16551 2001-11-14 15:25:11 libSGE-020904/sge_shape.cpp
-rw-r--r-- seb/seb       33319 2002-08-27 23:22:29 libSGE-020904/sge_surface.cpp
-rw-r--r-- seb/seb        3578 2002-08-27 23:13:44 libSGE-020904/sge_internal.h
-rw-r--r-- seb/seb        3310 2001-11-14 15:24:12 libSGE-020904/sge_blib.h
-rw-r--r-- seb/seb         945 2001-11-14 15:22:30 libSGE-020904/sge_misc.h
-rw-r--r-- seb/seb        4829 2001-11-14 15:21:42 libSGE-020904/sge_surface.h
-rw-r--r-- seb/seb        1743 2001-11-14 15:23:36 libSGE-020904/sge_collision.h
-rw-r--r-- seb/seb       10001 2001-11-14 15:24:46 libSGE-020904/sge_textpp.cpp
-rw-r--r-- seb/seb       29142 2001-11-14 15:27:25 libSGE-020904/sge_blib.cpp
-rw-r--r-- seb/seb        1776 2001-11-14 15:22:10 libSGE-020904/sge_rotation.h
-rw-r--r-- seb/seb        1675 2002-01-04 15:10:01 libSGE-020904/INSTALL
-rw-r--r-- seb/seb        7101 2001-11-14 15:21:25 libSGE-020904/sge_textpp.h
-rw-r--r-- seb/seb        1822 2001-11-14 15:30:15 libSGE-020904/examples/bitmap
font.cpp
drwxr-xr-x              Création du répertoire: libSGE-020904/examples
-rw-r--r-- seb/seb        1070 2002-07-13 21:14:06 libSGE-020904/examples/Makefi
le
-rw-r--r-- seb/seb        2350 2001-06-26 12:53:28 libSGE-020904/examples/README
-rw-r--r-- seb/seb         578 2001-05-18 02:43:15 libSGE-020904/examples/smiley
.bmp
-rw-r--r-- seb/seb        3189 2002-01-03 15:57:33 libSGE-020904/examples/sprite
.cpp
-rw-r--r-- seb/seb       59958 2001-05-18 02:43:15 libSGE-020904/examples/font.b
mp
-rw-r--r-- seb/seb       39856 2001-05-18 02:43:15 libSGE-020904/examples/font.t
tf
-rw-r--r-- seb/seb        1775 2001-11-14 15:29:18 libSGE-020904/examples/sfont.
cpp
-rw-r--r-- seb/seb      102974 2001-05-18 02:43:15 libSGE-020904/examples/sfont.
2.cpp
-rw-r--r-- seb/seb        3152 2002-01-03 22:32:47 libSGE-020904/examples/rotate
.cpp
-rw-r--r-- seb/seb        2531 2001-11-14 15:30:08 libSGE-020904/examples/blib.c
pp
-rw-r--r-- seb/seb        3471 2001-11-14 15:29:45 libSGE-020904/examples/fire.c
pp
-rw-r--r-- seb/seb        2119 2001-11-14 15:29:39 libSGE-020904/examples/input.
cpp
-rw-r--r-- seb/seb        3605 2002-01-03 15:53:49 libSGE-020904/examples/alpha.
cpp
-rw-r--r-- seb/seb       12342 2001-05-18 02:43:16 libSGE-020904/examples/tux.bm
p
-rw-r--r-- seb/seb        2864 2002-01-02 20:30:01 libSGE-020904/examples/blitti
ng.cpp
-rw-r--r-- seb/seb        1865 2002-08-21 18:46:13 libSGE-020904/examples/basics
.cpp
-rw-r--r-- seb/seb        2220 2002-01-03 15:43:56 libSGE-020904/examples/basics
_c.c
-rw-r--r-- seb/seb       14953 2002-01-03 15:57:04 libSGE-020904/examples/speedt
est.cpp
-rw-r--r-- seb/seb        3551 2002-01-02 20:33:42 libSGE-020904/examples/collis
ion.cpp
-rw-r--r-- seb/seb        3898 2001-05-18 02:43:17 libSGE-020904/examples/ttf_re
adme
-rw-r--r-- seb/seb        2456 2002-01-03 15:55:09 libSGE-020904/examples/inputd
eluxe.cpp
-rw-r--r-- seb/seb          97 2003-03-18 21:14:27 libSGE-020904/sge_config.h
-rw-r--r-- seb/seb        2642 2001-11-14 15:25:51 libSGE-020904/sge_misc.cpp
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd libSGE-020904
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.30384
+ umask 022
+ cd /usr/src/RPM/BUILD
+ cd libSGE-020904
+ make
== SGE r020904
== Warning: Using C references!
== FreeType2 support enabled.
== SDL_Image (SFont) support disabled.
== Warning: No C++ classes will be build!
 
g++ -Wall -O3 -ffast-math -I/usr/include/SDL -D_REENTRANT -I/usr/include/freetyp
e2 -D_SGE_C -c sge_surface.cpp
g++ -Wall -O3 -ffast-math -I/usr/include/SDL -D_REENTRANT -I/usr/include/freetyp
e2 -D_SGE_C -c sge_primitives.cpp
g++ -Wall -O3 -ffast-math -I/usr/include/SDL -D_REENTRANT -I/usr/include/freetyp
e2 -D_SGE_C -c sge_tt_text.cpp
g++ -Wall -O3 -ffast-math -I/usr/include/SDL -D_REENTRANT -I/usr/include/freetyp
e2 -D_SGE_C -c sge_bm_text.cpp
g++ -Wall -O3 -ffast-math -I/usr/include/SDL -D_REENTRANT -I/usr/include/freetyp
e2 -D_SGE_C -c sge_misc.cpp
g++ -Wall -O3 -ffast-math -I/usr/include/SDL -D_REENTRANT -I/usr/include/freetyp
e2 -D_SGE_C -c sge_textpp.cpp
g++ -Wall -O3 -ffast-math -I/usr/include/SDL -D_REENTRANT -I/usr/include/freetyp
e2 -D_SGE_C -c sge_blib.cpp
g++ -Wall -O3 -ffast-math -I/usr/include/SDL -D_REENTRANT -I/usr/include/freetyp
e2 -D_SGE_C -c sge_rotation.cpp
g++ -Wall -O3 -ffast-math -I/usr/include/SDL -D_REENTRANT -I/usr/include/freetyp
e2 -D_SGE_C -c sge_collision.cpp
g++ -Wall -O3 -ffast-math -I/usr/include/SDL -D_REENTRANT -I/usr/include/freetyp
e2 -D_SGE_C -c sge_shape.cpp
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.87048
+ umask 022
+ cd /usr/src/RPM/BUILD
+ cd libSGE-020904
+ make install
== SGE r020904
== Warning: Using C references!
== FreeType2 support enabled.
== SDL_Image (SFont) support disabled.
== Warning: No C++ classes will be build!
 
g++ -Wall -O3 -ffast-math -I/usr/include/SDL -D_REENTRANT -I/usr/include/freetyp
e2 -D_SGE_C -fpic -fPIC -shared -o libSGE.so sge_surface.o sge_primitives.o sge_
tt_text.o sge_bm_text.o sge_misc.o sge_textpp.o sge_blib.o sge_rotation.o sge_co
llision.o sge_shape.o -L/usr/lib -lSDL -lpthread  -lfreetype
install -c -m 644 sge*.h /usr/include/SDL
install -c -m 644 libSGE.a /usr/lib
install -c libSGE.so /usr/lib/libSGE.so.020904
** Headerfiles installed in /usr/include/SDL
** Library files installed in /usr/lib
+ /usr/lib/rpm/brp-mandrake
Processing files: libSGE-020904-mdk
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.79602
+ umask 022
+ cd /usr/src/RPM/BUILD
+ cd libSGE-020904
+ DOCDIR=/var/tmp/libSGE-buildroot/usr/share/doc/libSGE-020904
+ export DOCDIR
+ rm -rf /var/tmp/libSGE-buildroot/usr/share/doc/libSGE-020904
+ /bin/mkdir -p /var/tmp/libSGE-buildroot/usr/share/doc/libSGE-020904
+ cp -pr README /var/tmp/libSGE-buildroot/usr/share/doc/libSGE-020904
+ exit 0
Finding  Provides: (using /usr/lib/rpm/find-provides)...
Finding  Requires: (using /usr/lib/rpm/find-requires)...
Using BuildRoot: /var/tmp/libSGE-buildroot to search libs
PreReq: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3
.0.4-1
Requires(rpmlib): rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileN
ames) <= 3.0.4-1
Requires: libSDL1.2
Wrote: /usr/src/RPM/RPMS/i686/libSGE-020904-mdk.i686.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.3399
+ umask 022
+ cd /usr/src/RPM/BUILD
+ cd libSGE-020904
+ rm -rf /var/tmp/libSGE-buildroot
+ exit 0
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.3399
+ umask 022
+ cd /usr/src/RPM/BUILD
+ rm -rf libSGE-020904
+ exit 0


 
et voilà les fichiers qu'on obtient :

[root@tue_amour i686]# rpm -ql -p libSGE-020904-mdk.i686.rpm  
/usr/share/doc/libSGE-020904
/usr/share/doc/libSGE-020904/README


---------------
Celui qui pose une question est idiot 5 minutes. Celui qui n'en pose pas le reste toute sa vie. |  Membre du grand complot pharmaceutico-médico-scientifico-judéo-maçonnique.
Reply

Marsh Posté le 01-07-2003 à 19:35:52    

merci , bien mince alors !
Bon ben va falloir que je reffasse ...
Merci !
 :sweat:  :cry:  

Reply

Marsh Posté le 02-07-2003 à 21:27:26    

Je t'encourage à faire des spec files. J'ai quant à moi guère de temps.
Si c'est pour Mandrake, tu peux t'inscrire au club volontaire pour obtenir de l'aide. Et ainsi, tes rpms, une fois testé par d'autres, seront validés pour le club.
 
Mais si tu veux faire, rapidement, des rpm à partir d'un tarball, n'hésite pas à tester checkinstall.
Cela marche ainsi :
configure
make
(su) checkinstall au lieu de make install.
 
Texstar s'en sert lui aussi quand il s'agit d'aller vite.

Reply

Marsh Posté le 03-07-2003 à 08:20:58    

merci du tip !!
malheureusement chekinstall n'a pas réussi a faire des rpms tout seul .
J'ai cependant trouvé sur le net un méthode pour faire des binaires assez simple .
 
 
Tout d'abord préparrer la contruction de rpms :  
urpmi rpm-build
créer les répertoires si ils n'exsitent pas :

Code :
  1. mkdir -p ~/rpm/{BUILD,RPMS/$ARCH,RPMS/noarch,SOURCES,SRPMS,SPECS,tmp}. Replace $ARPH with the architecture(s) you plan to build packages for, basically this can be i586 but also sparc/alpha/ppc.


 
Ensuite il faut créer les fichiers de configuration

Code :
  1. Add configuration files
  2. In order to build packages for Mandrake Linux, you will need to add two configuration files in your home directory:
  3. .rpmrc
  4. buildarchtranslate: i386: i586
  5. buildarchtranslate: i486: i586
  6. buildarchtranslate: i586: i586
  7. buildarchtranslate: i686: i586
  8. .rpmmacros
  9. %_topdir               YOUR_HOME_DIR/rpm
  10. %_tmppath              YOUR_HOME_DIR/rpm/tmp
  11. %_signature            gpg
  12. %_gpg_name             Mandrake Linux
  13. %_gpg_path             ~/.gnupg
  14. %distribution          Mandrake Linux
  15. %vendor                MandrakeSoft
  16. which you will have to edit to fit your name and directory.


 
 
1- télécharger autospec .
2- créer un répertoire ou l'n va mettre les binaires par exemeple :
test-0.1
3- créer l'arborescence de ce répertoire correspodant a l'endroit ou s'insatlleront les binaires .
admettons que j'ai un seul binaire qui s'apelle test_bin et que je veux installer dans /usr/local/bin , ben je fais :

Code :
  1. mkdir -p test-0.1/usr/local/bin
  2. cp test_bin test-0.1/usr/local/bin


on fait de même pour tous les binaire set la documentation.
 
4-on va la ra cine du répertoire test-0.1 et on tar.gz le répertoire  

Code :
  1. cd test-0.1
  2. tar cvzf /tmp/toto.tgz ./


 
5- on créé le spec avec autospec :

Code :
  1. tar tfz /tmp/toto.tgz | autospec -b > toto.spec


 
6-editer (vim, emacs ...) le fichier toto.spec pour changer les "tags" Group, Licence(Copyright), summary, description (avec vim, emacs ...). Les decommenter et changer la valeur "unknown"
 
7-generer le fichier rpm:
 
   1. passer root : su
   2. copier le tar a sa place  : cp ../toto.tgz ~/rpm/SOURCE/test-0.1-bin.tar.gz
   3. Copier le spec ou il faut : cp toto.spec ~/rpm/SPEC/test.spec
 4. fabriquer le rpm : rpm -bb ~/rpm/SPECS/test.spec
 
 
voila , ca a marché pour moi pour mon prog , mais je galère  encore sur libSGE ...  
J'espère que ca vous aura aidé.
Si vous voulez de plus amples informations allez à ces adresses :
 
http://www.linux-mandrake.com/howt [...] inary.html
et surtout
http://eric.gerbier.free.fr/fabrication-rpm.html
 
Quant à moi , ben j'ai fait un package pour mon interface graphique de divxbox (pour les dépendances et softs de tache de fond , aller voir sur http://rodrigo.tuxfamily.org/ )et voila le rm binaire : http://rodrigo.tuxfamily.org/fichi [...] 1.i586.rpm
 
 :jap:


Message édité par psebcopathe le 03-07-2003 à 15:46:39
Reply

Marsh Posté le 03-07-2003 à 12:42:01    

psebcopathe a écrit :


 
Questions :
Comment voir ce que fait exactement le rpm du binaire quand on lance le rpm -Uvh *.rpm (pour savoir ou il me mets les fichiers)?
 
 


rpm -Uvvvh ?
 
conseil :  
* hesite pas a utiliser rpmlint ( sur le src.rpm et sur les <arch>.rpm >
 
* evite de mettre des chemins "en dur" style /usr/bin ou usr/bin mais appelle les variables %rpm_build_root et %rpm_build_dir sinon c est pas beau :)

Reply

Marsh Posté le 03-07-2003 à 15:01:00    

merci du conseil , je note !
Bon ben pour le moment la mèthode exposée un peu plus haut marche bien , alors je reste avec .
autospec et checkinstall c'est bien .

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed