Last time i made a simple hello rpm. openSUSE – Build a rpm package
Now i want to create a simple repository containing this rpm such that i can install this rpm after adding this repository to the YaST in openSUSE.
Introduction
Basically there are 3 types of Repositories
- Plain Cache Sources
- repomd/rpm md/YUM Sources
- YaST Sources
For more details about different repository type, please refer to the following article
Create a YUM repository
1. Install the createrepo package.
- Ubuntu user – apt-get install createrepo
- openSUSE user – Just use the YaST Software Management
2. Create the following a repository folder and put your rpms into it
Example:
/var/www/suse_repo/
\- i586/
\- hello-2.1.1-1.i586.rpm
\- other-1.0-1.i586.rpm
\- i686/
\- hello-2.1.1-1.i686.rpm
\- other-1.0.i686.rpm
\- noarch/
\- hello-2.1.1-1.noarch.rpm
\- other-1.0.noarch.rpm
3. createrepo /var/www/suse_repo/rpms
4. Your yum repository is created =)
5. Add this new yum repository in openSUSE
- zypper addrepo -t <repository type> <path> <repository name>
Example:
- Add as local repository: zypper addrepo -t YUM /var/www/suse_repo local_repo
- Add as http repository: zypper addrepo -t YUM http://<host>/suse_repo local_repo
For the http repository, just copy the repository folder to the Document Root of the web server like /var/www in Apache.
6. Check whether your repository is working or not by using the zypper se <package name> command
Remarks:
i found that there is an problem when i tried to add the http repository under the YaST GUI of openSUSE 11.2. I always got the Connection Timeout. So i have to add the repository by the zypper command.
Done =)
References:
Thanks buddy.. 🙂
LikeLike
Hi, I just thought you’d like to know the link to ‘openSUSE – Creating YaST Installation Sources’ has changed and can now be found on: http://en.opensuse.org/SDB:Creating_YaST_installation_sources
LikeLike
I have updated the link. Thanks a lot. =)
LikeLike