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.
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.
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.This is what i do
- I create the Folder call RPMS
- 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
- Then i create Repo for /RPMS
- After that i make a copy of /etc/yum.repos/rhel-source and name itrhel-local.repo
- Then vi rhel-local.repo and add following lines
[rhel-local.repo]
name=rhel-local

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
OmiPenguinOmiPenguinBuild 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).
You can create a file named google-chrome.repo with the following contents: