Koozali.org: home of the SME Server

[SOLVED]Problem with rpmbuild -ba

[SOLVED]Problem with rpmbuild -ba
« 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

« Last Edit: May 27, 2015, 04:34:00 PM by Cervantes Dimitri »

guest22

Re: Problem with rpmbuild -ba
« Reply #1 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.

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: Problem with rpmbuild -ba
« Reply #2 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
C'est la fin du monde !!! :lol:

Re: Problem with rpmbuild -ba
« Reply #3 on: May 27, 2015, 09:39:20 AM »
I just send the mail, thank you !

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Problem with rpmbuild -ba
« Reply #4 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.

Re: Problem with rpmbuild -ba
« Reply #5 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)