PDA

View Full Version : creare pacchetti rpm in ambiente RH


cavay
21-05-2007, 13:20
Raga ho l'esigenza di rilasciare un pacchetto sw sotto forma di RPM, mi potreste aiutare?
Fino ad oggi lo stesso sw lo rilasciavo in forma tgz , contenente un alberatura del tipo
----PROJ
----Makefile
---------config
---------lib
---------bin
---------log

dove il Makefile se lanciato linka tutte le librerie contenute in lib e crea l'eseguiibile in bin. Eseguibile che utilizza le dir config e log!!

cavay
22-05-2007, 09:23
Mi mancano delle informazioni, nessuno puo aiutarmi??

Ho creato il file semplice spec

Summary: GNU MyProj
Name: MyProj
Version: 1
Release: 0
Source0: %{name}-%{version}.tar.gz
License: GPL
Group: Development/Tools
%description
The GNU MyProj program reformats C code to any of a variety of
formatting standards, or you can define your own.
%prep
%setup -q
%build
%install
make DESTDIR=.
%files

dopodichè eseguo il comando "rpmbuild -ba nomeFile.spec" e ottendo un output :
Executing(%prep): /bin/sh -e /home/testuser/rpm/tmp/rpm-tmp.62034
+ umask 022
+ cd /home/testuser/rpm/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/testuser/rpm/BUILD
+ rm -rf MyProj-1
+ /usr/bin/gzip -dc /home/testuser/rpm/SOURCES/MyProj-1.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd MyProj-1
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /home/testuser/rpm/tmp/rpm-tmp.26730
+ umask 022
+ cd /home/espositof/rpm/BUILD
+ cd MyProj-1
+ LANG=C
+ export LANG
+ unset DISPLAY
+ exit 0
Executing(%install): /bin/sh -e /home/testuser/rpm/tmp/rpm-tmp.26730
+ umask 022
+ cd /home/testuser/rpm/BUILD
+ cd MyProj-1
+ LANG=C
+ export LANG
+ unset DISPLAY
+ make DESTDIR=.
Linking ././bin/MyProj1 ...
error or warning in ./Link.err

********* ././bin/MyProj1 BUILD *************

+ /usr/lib/rpm/find-debuginfo.sh /home/testuser/rpm/BUILD/MyProj-1
0 blocks
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
Processing files: MyProj-1-0
Processing files: MyProj-debuginfo-1-0
Provides: q_netem.so.debug
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Checking for unpackaged file(s): /usr/lib/rpm/check-files %{buildroot}
Wrote: /home/testuser/rpm/SRPMS/MyProj-1-0.src.rpm
Wrote: /home/testuser/rpm/RPMS/i586/MyProj-1-0.i586.rpm
Wrote: /home/testuser/rpm/RPMS/i586/MyProj-debuginfo-1-0.i586.rpm


Se provo poi ad installare l'rpm non ottengo alcun risultato; inoltre se lancio la query "rpm -ql /home/testuser/rpm/RPMS/i586/MyProj-1-0.i586.rpm" mi risponde con "contains no files"!!

Cosa sto facendo?