LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Build Simple RPM of SMB (https://www.linuxquestions.org/questions/fedora-35/build-simple-rpm-of-smb-945251/)

malcmcmul 05-16-2012 04:31 AM

Build Simple RPM of SMB
 
OS: Fedora 11, Samba: 3.6.5, trying to create an RPM.

I've just done an autogen, ./configure, make and make install of the Samba 3.6.5 and it's all gone swimmingly. But now I'm trying to create an RPM package of this Samba, to easily deploy on several other Fed 11 systems. However I'm having some troubles as there seems to be differing views on what goes into the spec file. As it's a very simple installation, a lot of what I've read doesn't apply to me.

I've created my RPM directory, inserted the samba tar file into SOURCES and created a .spec file with various information inside it. How do I basically just say "There's my source, build it, give me an RPM".

Or perhaps I'm expecting it to be easier than it is.

EDIT: I've attempted a basic SPEC file already and received the following error: "error: File: /home/user1/rpmbuild/SOURCES/samba.3.6.5.tar: No such file or directory". I never even gave that path :(

EDIT1: I'm also following these lecture notes: http://www.ucs.cam.ac.uk/support/uni...s/rpmbuild.pdf and fall over at Slide 20 with a bad exit status

kbp 05-16-2012 05:49 AM

Do you have to run Fedora 11? .. my recommendation would be to download the source rpm for the version you want and rebuild it.

malcmcmul 05-16-2012 06:01 AM

Quote:

Originally Posted by kbp (Post 4679780)
Do you have to run Fedora 11? .. my recommendation would be to download the source rpm for the version you want and rebuild it.

I definitely can't change the version of Fedora.

That's just it, I've downloaded the latest Samba source code, compiled it and it works fine. I'm just trying to put this into an RPM.

knudfl 05-16-2012 06:35 AM

How about 'rpmbuild --rebuild samba-3.6.5-86.fc17.1.src.rpm' ?
Or 'rpmbuild -bb samba.spec', using the spec file from the package.

http://dl.fedoraproject.org/pub/fedo...fc17.1.src.rpm
( The link will change, when Fedora 17 is out next week.)

.

malcmcmul 05-16-2012 06:45 AM

Quote:

Originally Posted by knudfl (Post 4679812)
How about 'rpmbuild --rebuild samba-3.6.5-86.fc17.1.src.rpm' ?
Or 'rpmbuild -bb samba.spec', using the spec file from the package.

http://dl.fedoraproject.org/pub/fedo...fc17.1.src.rpm
( The link will change, when Fedora 17 is out next week.)

.

I believe this would work if Samba was an RPM already but it's not - it's source code. Therefore I'm essentially trying to build a Samba RPM from scratch. So far I have:

/home/user_1/Samba with directory /BUILD, /RPMS, /SOURCES, /SPECS and /SRPMS. In /SOURCES there is the Samba source code in a .tar file. In /SPECS there is a samba.spec.

When I do a rpmbuild -v -bb --clean SPECS/samba.spec it will get as far as untarring the source code but falls over in the %build section (the autogen.sh, ./configure and make).

kbp 05-16-2012 08:46 AM

You're missing the point, we're advising you to download a source rpm not a source tarball, these are 2 different things. Using a source rpm you can simply rebuild it, it already contains a functioning spec file.


All times are GMT -5. The time now is 08:30 PM.