par Muzo » 22 Nov 2003 15:34
Bonjour,
<BR>
<BR>J'essaie de créer un rpm pour SME.
<BR>J'ai bien suivit la doc de Mittel.
<BR>J'ai installé le RPM : e-smith-skel-2.0.rpm.
<BR>
<BR>Ai-je oublié un RPM?
<BR>
<BR>J'ai mis mes fichiers avec toute l'arborescence dans le répertoire SOURCES.
<BR>J'en ai fait un tarball (tar.gz).
<BR>J'ai fait le script module-0.1.spec comme indiqué. Le voici :
<BR>
<BR><!-- BBCode Start --><I>Summary: e-smith module.
<BR>%define name module
<BR>Name: %{name}
<BR>%define version 0.1
<BR>%define release 1
<BR>Version: %{version}
<BR>Release: %{release}
<BR>Copyright: Freely distributable
<BR>Group: Collaboration/module
<BR>Source: %{name}-%{version}.tar.gz
<BR>#Patch0: %{name}-%{version}.patch.yyyymmddnn
<BR>Packager: Muzo
<BR>BuildRoot: /var/tmp/e-smith-buildroot
<BR>BuildRequires: e-smith-devtools
<BR>BuildArchitectures: noarch
<BR>Requires: e-smith-base, e-smith-lib, e-smith >= 4.1
<BR>AutoReqProv: no
<BR>
<BR>%changelog
<BR>* Fri Nov 21 2003 Muzo
<BR>- initial release
<BR>
<BR>%description
<BR>Module.
<BR>
<BR>%prep
<BR>%setup
<BR>
<BR>%install
<BR>rm -rf $RPM_BUILD_ROOT
<BR>(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
<BR>rm -f %{name}-%{version}-filelist
<BR>/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist
<BR>echo "%doc COPYING" >> %{name}-%{version}-filelist
<BR>
<BR>%clean
<BR>rm -rf $RPM_BUILD_ROOT
<BR>
<BR>%pre
<BR>%preun
<BR>%post
<BR>%postun
<BR>
<BR>%files -f %{name}-%{version}-filelist
<BR>%defattr(-,root,root)
<BR></I><!-- BBCode End -->
<BR>
<BR>Quand je fait : <!-- BBCode Start --><B>rpm -bp module-0.1.spec</B><!-- BBCode End --> il me fait bien un exit 0.
<BR>
<BR>Par contre lorsque je fait : <!-- BBCode Start --><B>rpm -ba module-0.1.spec</B><!-- BBCode End -->
<BR>j'ai l'erreur suivante :
<BR>
<BR><!-- BBCode Start --><I>Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.37839
<BR>+ umask 022
<BR>+ cd /root/rpms/BUILD
<BR>+ cd /root/rpms/BUILD
<BR>+ rm -rf module-0.1
<BR>+ /bin/gzip -dc /root/rpms/SOURCES/module-0.1.tar.gz
<BR>+ tar -xvvf -
<BR>drwxr-xr-x root/root 0 2003-11-22 01:13:24 module-0.1/
<BR>drwxr-xr-x root/root 0 2003-11-22 01:13:10 module-0.1/etc/
<BR>drwxr-xr-x root/root 0 2003-11-22 01:13:11 module-0.1/etc/e-smith/
<BR>drwxr-xr-x root/root 0 2003-11-22 01:13:10 module-0.1/etc/e-smith/web/
<BR>drwxr-xr-x root/root 0 2003-11-22 01:13:10 module-0.1/etc/e-smith/web/functions/
<BR>-rw-r--r-- root/root 9858 2003-11-21 21:41:12 module-0.1/etc/e-smith/web/functions/module
<BR>drwxr-xr-x root/root 0 2003-11-22 01:13:10 module-0.1/etc/e-smith/web/panels/
<BR>drwxr-xr-x root/root 0 2003-11-22 01:13:10 module-0.1/etc/e-smith/web/panels/manager/
<BR>drwxr-xr-x root/root 0 2003-11-22 01:13:10 module-0.1/etc/e-smith/web/panels/manager/cgi-bin/
<BR>-rw-r--r-- root/root 9858 2003-11-21 21:41:12 module-0.1/etc/e-smith/web/panels/manager/cgi-bin/module
<BR>drwxr-xr-x root/root 0 2003-11-22 01:13:11 module-0.1/etc/e-smith/templates/
<BR>drwxr-xr-x root/root 0 2003-11-22 01:13:11 module-0.1/etc/e-smith/templates/etc/
<BR>drwxr-xr-x root/root 0 2003-11-22 01:13:11 module-0.1/etc/e-smith/templates/etc/module.conf/
<BR>-rw-r--r-- root/root 1839 2003-11-19 16:45:54 module-0.1/etc/e-smith/templates/etc/module.conf/40IBayAccess
<BR>-rw-r--r-- root/root 2752 2003-11-19 16:45:54 module-0.1/etc/e-smith/templates/etc/module.conf/60AnonymousIBay
<BR>drwxr-xr-x root/root 0 2003-11-22 01:13:24 module-0.1/usr/
<BR>drwxr-xr-x root/root 0 2003-11-22 01:13:24 module-0.1/usr/lib/
<BR>drwxr-xr-x root/root 0 2003-11-22 01:13:24 module-0.1/usr/lib/perl5/
<BR>drwxr-xr-x root/root 0 2003-11-22 01:13:24 module-0.1/usr/lib/perl5/site_perl/
<BR>drwxr-xr-x root/root 0 2003-11-22 01:13:24 module-0.1/usr/lib/perl5/site_perl/esmith/
<BR>drwxr-xr-x root/root 0 2003-11-22 01:13:24 module-0.1/usr/lib/perl5/site_perl/esmith/FormMagik/
<BR>drwxr-xr-x root/root 0 2003-11-22 01:13:24 module-0.1/usr/lib/perl5/site_perl/esmith/FormMagik/Panel/
<BR>-rw-r--r-- root/root 9841 2003-11-21 21:59:50 module-0.1/usr/lib/perl5/site_perl/esmith/FormMagik/Panel/module.pm
<BR>+ STATUS=0
<BR>+ '[' 0 -ne 0 ']'
<BR>+ cd module-0.1
<BR>++ /usr/bin/id -u
<BR>+ '[' 0 = 0 ']'
<BR>+ /bin/chown -Rhf root .
<BR>++ /usr/bin/id -u
<BR>+ '[' 0 = 0 ']'
<BR>+ /bin/chgrp -Rhf root .
<BR>+ /bin/chmod -Rf a+rX,g-w,o-w .
<BR>+ exit 0
<BR>Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.37839
<BR>+ umask 022
<BR>+ cd /root/rpms/BUILD
<BR>+ cd module-0.1
<BR>+ rm -rf /var/tmp/e-smith-buildroot
<BR>+ cd root
<BR>/var/tmp/rpm-tmp.37839: cd: root: Aucun fichier ou répertoire de ce type
<BR>+ rm -f module-0.1-filelist
<BR>+ /sbin/e-smith/genfilelist /var/tmp/e-smith-buildroot
<BR>Could not chdir to /var/tmp/e-smith-buildroot: Aucun fichier ou répertoire de ce type
<BR>error: Bad exit status from /var/tmp/rpm-tmp.37839 (%install)
<BR>
<BR>
<BR>RPM build errors:
<BR> Bad exit status from /var/tmp/rpm-tmp.37839 (%install)</I><!-- BBCode End -->
<BR>
<BR>
<BR>Je n'ai pas de fichier <!-- BBCode Start --><B>e-smith-buildroot</B><!-- BBCode End --> dans /var/temp.
<BR>Doit-on le créer? ou ai je commis une erreur??
<BR> <IMG SRC="images/smiles/icon_confused.gif">
<BR>De plus je viens de constater qui'il faut : <!-- BBCode Start --><B>BuildRequires: e-smith-devtools</B><!-- BBCode End -->. je n'ai pas cette contrib. Est-elle utile?
<BR>
<BR>Dans /var/tmp/rpm-tmp.3839 j'ai le script suivant :
<BR><!-- BBCode Start --><I>#!/bin/sh
<BR>
<BR> RPM_SOURCE_DIR="/root/rpms/SOURCES"
<BR> RPM_BUILD_DIR="/root/rpms/BUILD"
<BR> RPM_OPT_FLAGS="-O2 -march=i386 -mcpu=i686"
<BR> RPM_ARCH="i386"
<BR> RPM_OS="linux"
<BR> export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
<BR> RPM_DOC_DIR="/usr/share/doc"
<BR> export RPM_DOC_DIR
<BR> RPM_PACKAGE_NAME="module"
<BR> RPM_PACKAGE_VERSION="0.1"
<BR> RPM_PACKAGE_RELEASE="1"
<BR> export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
<BR> RPM_BUILD_ROOT="/var/tmp/e-smith-buildroot"
<BR> export RPM_BUILD_ROOT
<BR>
<BR> set -x
<BR> umask 022
<BR> cd /root/rpms/BUILD
<BR>cd module-0.1
<BR>rm -rf $RPM_BUILD_ROOT
<BR>(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
<BR>rm -f module-0.1-filelist
<BR>/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > module-0.1-filelist
<BR>echo "%doc COPYING" >> module-0.1-filelist
<BR>
<BR>
<BR>
<BR>
<BR> /usr/lib/rpm/brp-compress
<BR> /usr/lib/rpm/brp-strip
<BR> /usr/lib/rpm/brp-strip-comment-note </I><!-- BBCode End -->
<BR>
<BR>AU SECOURRSSS !!! <IMG SRC="images/smiles/icon_help.gif">
<BR>
<BR>Je reste un Newbie <IMG SRC="images/smiles/icon_wink.gif">
/Muzo
"La vie n'est pas un combat, mais une passion à défendre!" MASS HYSTERIA - Knowledge is power