OVH Cloud OVH Cloud

Erreur pendant la construction d'un RPM

1 réponse
Avatar
Fauberteau Frédéric
Bonsoir,
je me suis lancé comme objectif (pas très dur) de construire mes
packages pour ma distribution chérie, la Mandrake 9.2. J'ai commencé
avec un truc super simple, mais j'obtiens une erreur lorsque je lance
rpm -bb :

Executing(%prep): /bin/sh -e /home/triaxx/rpm/tmp/rpm-tmp.97109
+ umask 022
+ cd /home/triaxx/rpm/BUILD
+ setup -q
/home/triaxx/rpm/tmp/rpm-tmp.97109: line 22: setup: command not found
error: Bad exit status from /home/triaxx/rpm/tmp/rpm-tmp.97109 (%prep)

voici mon .spec :
%define name wmmemfree
%define version 0.7
%define release 0mdk9.2

Name: %{name}
Summary: Tool for monitoring your physical and swap memory.
Version: %{version}
Release: %{release}
License: GPL
Group: Monitoring
Packager: Frédéric Fauberteau <mangeur_de_code@hotmail.com>
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
Source: %{name}-%{version}.tar.bz2
BuildRequires: XFree86 libxpm4

%description
WMMemFree is a dock app. It allowes to monitor swap and physical memory.

%prep
setup -q

%build
sed 's/\/usr\/local/\/usr/g' Makefile > tmpfile
mv -f tmpfile Makefile
%make

%install
rm -Rf $RPM_BUILD_ROOT
%makeinstall

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root,755)
%doc ChangeLog COPYING INSTALL README THANKS TODO WMS
%{_bindir}/wmmemfree
%{_mandir}/man1/wmmemfree.1

%changelog
* Sat Oct 2 2004 Frédéric Fauberteau <mangeur_de_code@hotmail.com>
0.7-0mkd9.2
- Test for create the rpm

Je ne comprends vraiment pas pourquoi j'obtiens un "command not found",
quelqu'un aurait-il un éclaircissement ?
Merci d'avance.

1 réponse

Avatar
Fauberteau Frédéric
Fauberteau Frédéric a écrit :
%prep
setup -q



Si tu avais fait un 'man setup', tu aurais vu que setup est un programme
qui s'occupe de charger les systèmes de fichiers du noyau. En fait, tu
as oublié le "%" devant setup et maintetant :
%setup -q s'occupe d'extraire tes sourses dans le répertoire qui va bien.

Bon courage :-)