Koozali.org: home of the SME Server

Obsolete Releases => SME 9.x Contribs => Topic started by: Cervantes Dimitri on May 26, 2015, 10:41:52 AM

Title: [SOLVED]Problem with rpmbuild -ba
Post by: Cervantes Dimitri on May 26, 2015, 10:41:52 AM
Hello i got a probleme when i use this command : rpmbuild -ba name.spec

it say :

+ cd syncthing-0.11
/home/rpmbuild/rpm/tmp/rpm-tmp.YE15PD: line 40: cd: syncthing-0.11: No such file or directory
erreur: Mauvais status de sortie pour /home/rpmbuild/rpm/tmp/rpm-tmp.YE15PD (%prep)


Erreur de construction de RPM:
    Mauvais status de sortie pour /home/rpmbuild/rpm/tmp/rpm-tmp.YE15PD (%prep)

(sorry it's in french, but it say : bad status of exit (?) for ....) it's about the %prep i think, but it's my first rpm package, so i don't know what is wrong with it.

here it is the source file i use for my package : https://github.com/syncthing/syncthing/releases/download/v0.11.5/syncthing-source-v0.11.5.tar.gz

and the spec file i use :
Code: [Select]
Name: syncthing           
Version: 0.11       
Release: 5     
Summary: syncthing on SMEServer       

Group: Applications         
License: MIT       
URL: https://github.com/syncthing/syncthing/releases     
Source0: https://github.com/syncthing/syncthing/releases/download/v0.11.5/syncthing-source-v0.11.5.tar.gz       
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)       

%description
Syncthing replaces Dropbox and BitTorrent Sync with something open, trustworthy and decentralized. Your data is your data alone and you deserve to choose where it is stored, if it is shared with some third party and how it's transmitted over the Internet.

%prep


%setup -q


%build

%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc



%changelog

Title: Re: Problem with rpmbuild -ba
Post by: guest22 on May 26, 2015, 10:34:55 PM
Hi, and welcome. Looking forward to your final contrib. I'm sure one of the guys/galls wil jump in soonish.
Title: Re: Problem with rpmbuild -ba
Post by: Daniel B. on May 27, 2015, 09:29:17 AM
Please, subscribe to the devinfo mailing list here: http://lists.contribs.org/mailman/listinfo/devinfo

Then, send your full build logs to this mailing, it'll be easier to help you than on the forum.

Cheers,
Daniel
Title: Re: Problem with rpmbuild -ba
Post by: Cervantes Dimitri on May 27, 2015, 09:39:20 AM
I just send the mail, thank you !
Title: Re: Problem with rpmbuild -ba
Post by: CharlieBrady on May 27, 2015, 04:19:05 PM
Your rpm is called syncthing, and version is 0.11. Your Source0 is called syncthing-source-v0.11.5.tar.gz. The %setup macro assumes that the top level directory of Source0 will be called %{name}-%{version} - i.e. syncthing-0.11. That is why it is doing "cd syncthing-0.11".

However, if you look at syncthing-source-v0.11.5.tar.gz, you will see that the top level directory is called just 'syncthing'.

I think if you use:

%setup -q -n syncthing

or

%syncthing -q -n %{name}

you won't have that error.
Title: Re: Problem with rpmbuild -ba
Post by: Cervantes Dimitri on May 27, 2015, 04:33:08 PM
Damn, i just forgot to post, i solved this error !

But thank you for your answer. (And yes, it was my %setup)