Create Source Rpm File

Building RPMs. The basic procedure to build an RPM is as follows: Get the source code you are building the RPM for to build on your system. Make a patch of any changes you had to make to the sources to get them to build properly. Make a spec file for the package. Make sure everything is in its proper.

Active6 years, 9 months ago

I know there is a previously asked question, but I still have some doubts so asking again.

How do I create a yum repo file?

I know that in the /etc/yum.repos.d/ I have to create .repo file. Below is the pattern:

1 [name ]

2 name=

3 baseurl=

4 enabled=1

5 gpgcheck=1

6 gpgkey=

Here in the baseurl which link should I give? I'm fully confused about this. How do I get that baseurl link? Can anyone please explain to me clearly?

I am using CentOS 6.2.

Community
maxmax
2,6329 gold badges45 silver badges62 bronze badges

4 Answers

Found thishere. Hope it helps.

The 'baseurl' line is the path that machine uses to get to the repository. If the machine has direct access to it or mounts it as a filesystem you can use a baseurl line like:

There are 3 slashes (/) following the file:, not 2. That is correct.

If you access the file via an http or https server you would use something like:

Ganesh R.
4,8691 gold badge21 silver badges27 bronze badges
mrzmrz

This is what i do

  1. I create the Folder call RPMS
  2. Then copy all the files from /Media/RHEL*/Server to /RPMS using cp * /RPMS when I'm in /Media/RHEL*/Server directory then it takes some minutes to copy all Rpms
  3. Then i create Repo for /RPMS
  4. After that i make a copy of /etc/yum.repos/rhel-source and name itrhel-local.repo
  5. Then vi rhel-local.repo and add following lines

[rhel-local.repo]

name=rhel-local

Create Source Rpm File

baseurl=file:///RPMS

enabled=1

gpgcheck=0

Finally run yum clean all and yum list all

BASEURL is the absolute path to files

Hope this helps

OmiPenguinOmiPenguin
4302 gold badges7 silver badges17 bronze badges

Build From Source Rpm

The baseurl is the location of the repository's files. You obtain this information from the provider of the repository.

Most repositories already provide a pre-configured .repo file which you can drop into /etc/yum.repos.d or a release.rpm which you can install which contains such a .repo file (this way is better since the repo can then keep itself updated).

Michael HamptonMichael Hampton
11.4k3 gold badges35 silver badges70 bronze badges

You can create a file named google-chrome.repo with the following contents:

Sam MSam M

Centos Kernel Source Rpm

Not the answer you're looking for? Browse other questions tagged linuxyumcentos-6 or ask your own question.