build a src.rpm file

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

build a src.rpm file

Postby flink » Jan 2nd, '22, 22:47

I want to compile by myself a src.rpm into a rpm file.

I follow the Wiki Packaging for Beginners - Understanding the Directory proposal.

http://rpm.pbone.net/resultsb_dist_90_s ... c.rpm.html
Download the file docker-20.10.9-3.mga9.src.rpm
.

Code: Select all
[franz@localhost SRPMS]$ pwd
/home/franz/rpmbuild/SRPMS
[franz@localhost SRPMS]$ ls
docker-20.10.9-3.mga9.src.rpm         docker-containerd-1.5.8-1.mga9.src.rpm  docker-registry-2.7.1-3.mga8.src.rpm
docker-compose-1.29.2-1.mga9.src.rpm  docker-machine-0.16.2-3.mga8.src.rpm
[franz@localhost SRPMS]$


Code: Select all
[franz@localhost SRPMS]$ sudo urpmi docker-20.10.9-3.mga9.src.rpm
[sudo] Passwort für franz:
Bitte benutzen Sie --buildrequires oder --install-src, Vorgabe ist --buildrequires


It does not work how the Wiki guide shows it.
flink
 
Posts: 207
Joined: Mar 3rd, '12, 19:23

Re: build a src.rpm file

Postby sturmvogel » Jan 3rd, '22, 00:41

You missed to unpack the source rpm according this wiki:
https://wiki.mageia.org/en/Packagers_RPM_tutorial#From_a_source_package
sturmvogel
 
Posts: 741
Joined: Jul 30th, '12, 00:39

Re: build a src.rpm file

Postby flink » Jan 3rd, '22, 10:03

So the Packaging_for_beginners is not really for beginners, because it is missing important informations.

I have executed the SRC-RPM compilation.

Code: Select all
[franz@localhost rpmbuild]$ rpm -i /home/franz/cauldron/SRPMS/docker-20.10.9-3.mga9.src.rpm
Warnung: Benutzer iurt existiert nicht - root wird verwendet
Warnung: Gruppe iurt existiert nicht - root wird verwendet


Do I need a user and group iurt?
flink
 
Posts: 207
Joined: Mar 3rd, '12, 19:23

Re: build a src.rpm file

Postby sturmvogel » Jan 3rd, '22, 10:59

Here is the information about iurt. It is only necessary if you will get a packager and provide and upload official Mageia packages to the build server. For your personal use it's not necessary.
https://wiki.mageia.org/en/Iurt
sturmvogel
 
Posts: 741
Joined: Jul 30th, '12, 00:39

Re: build a src.rpm file

Postby doktor5000 » Jan 3rd, '22, 17:55

flink wrote:So the Packaging_for_beginners is not really for beginners, because it is missing important informations.

https://wiki.mageia.org/en/Packaging_fo ... nvironment shows how to create the build environment and https://wiki.mageia.org/en/Packaging_fo ... _structure shows how to install the src.rpm.
So what is missing exactly ? It doesn't suggest anywhere to install the src.rpm with urpmi as you did.

flink wrote:I have executed the SRC-RPM compilation.

Code: Select all
[franz@localhost rpmbuild]$ rpm -i /home/franz/cauldron/SRPMS/docker-20.10.9-3.mga9.src.rpm
Warnung: Benutzer iurt existiert nicht - root wird verwendet
Warnung: Gruppe iurt existiert nicht - root wird verwendet



No, you installed the src.rpm into your rpm build environment. And no, you don't need that user.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18054
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: build a src.rpm file

Postby doktor5000 » Jan 3rd, '22, 17:59

sturmvogel wrote:Here is the information about iurt. It is only necessary if you will get a packager and provide and upload official Mageia packages to the build server. For your personal use it's not necessary.

iurt is still pretty useful even if you're not a packager and if you want to rebuild packages in a clean chroot instead of your regular Mageia installation.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18054
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: build a src.rpm file

Postby papoteur » Jan 8th, '22, 13:18

And instead of iurt, you can use mock.
The chroot method used by mock or iurt has the advantage to leave your standard system without packages installed only for the build. Another advantage is that you can build packages for other systems than yours, like for cauldron on Mageia 8, or for 32bits (or even for aarch64) on 64bits.
The drawback is that it uses lot of disk space, like 2 or 3 Gb by system.
papoteur
 
Posts: 93
Joined: Oct 27th, '11, 22:28


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest