Making your own RPM repository on a DVD

Submitted by Swobodin on Mon, 2006-02-13 12:06. ::
Installing RPM packages is a mess! You have to fill dependencies, manage conflicts, choose the correct version, etc. Yum (Yellowdog Updater Modified) can handle all this!
Yum is an interactive, automated update program which can be used for maintaining systems using RPM. By default, Yum is installed with Fedora Core. You will have to install the createrepo package as well.
First, get as much RPMS as you can, here's a tip to download all the Fedora Core Extra repository, and cd to the directory where only there are only the RPMS.
Sign the packages that you created but are not signed:
Create the RPMS directories
Move the files according to their type and architecture:
Now, create your yum repository:
This will add a directory called repodata
Burn, if you wish, your data to a DVD (replace hdX by your DVD writer device)
After creating the repository, we need to access to it. Let's suppose that our repository is on /media/dvdrom
Test whether the repository correctly works
Create a file /etc/httpd/conf.d/yum.conf and add the following lines
Add a file /etc/yum.repos.d/localwww.conf
Start Apache as root
If necessary, add the append to /etc/fstab
Allow anonymous FTP in /etc/vsftpd/vsftpd.conf
Add the file Add a file /etc/yum.repos.d/localftp.conf
Start vsftp as root
You have finally your repository on a DVD media that you may share with others if you are on a network; you may easily install and remove some programs
(Don't wonder: I have found out and done all this just to install that jumping penguin game :-P All dependencies were fixed and I could correctly play).
Happy yum'ing!
Yum is an interactive, automated update program which can be used for maintaining systems using RPM. By default, Yum is installed with Fedora Core. You will have to install the createrepo package as well.
First, get as much RPMS as you can, here's a tip to download all the Fedora Core Extra repository, and cd to the directory where only there are only the RPMS.
Sign the packages that you created but are not signed:
- Generate a key if you don't have.
- Edit ~/.rpmmacros and set the following values:
%packager Your Name <>
%distribution Your Name
%vendor Your name
%_signature gpg
%_gpg_name your_key_finger - Import (as root)
- The Redhat/Fedora keys
- On Fedora Core 4 (Stentz):
su -c 'rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*'
- On Fedora Core 3 (Heidelberg):
su -c 'rpm --import /usr/share/doc/fedora-release-3/RPM-GPG-KEY*'
- On Fedora Core 4 (Stentz):
- Your key:
gpg -a --export your_mail > RPM-GPG-KEY-mine
su -c 'rpm --import RPM-GPG-KEY-mine'
- The Redhat/Fedora keys
- Sign the packages
rpm --addsign *rpm
You will be asked for your password, the system will skip the already signed packages.
rm -fv *-debuginfo-*rpm
Create the RPMS directories
mkdir -p {SRPMS,RPMS/{i386,i586,i686,noarch,athlon,ppc,x86_64}}
Move the files according to their type and architecture:
for i in 386 586 686 noarch athlon ppc x86_68
do if [ -f *${i}.rpm ]
then mv *${i}.rpm RPMS/*${i}
fi
done
mv *src.rpm SRPMS
Now, create your yum repository:
createrepo -v $PWD
This will add a directory called repodata
Burn, if you wish, your data to a DVD (replace hdX by your DVD writer device)
growisofs -Z /dev/hdX -RUJ $PWD
After creating the repository, we need to access to it. Let's suppose that our repository is on /media/dvdrom
As a local directory
Add, as root, the file /etc/yum.repos.d/local.repo and edit it:[local]
name=Local Repository $releasever - $basearch - Some Extras
baseurl=file:///media/dvdrom
enabled=1
gpgcheck=1
Test whether the repository correctly works
yum list available
As a Web directory
Apache (httpd) is supposed to be installed here.Create a file /etc/httpd/conf.d/yum.conf and add the following lines
Alias /yum/ "/media/dvdrom/"
AllowOverride All
Options Indexes FollowSymLinks
Order allow,deny
Allow From All
Add a file /etc/yum.repos.d/localwww.conf
[localwww]
name=Local WWW Repository $releasever - $basearch - Some Extras
baseurl=http://127.0.0.1/yum/
enabled=1
gpgcheck=1
Start Apache as root
su -c '/etc/rc.d/init.d/httpd start'
As an FTP directory
Assuming that you installed vsftpd, create a mount point of the CD device in the FTP local directorysu
mkdir /var/ftp/pub/fedora
mount /dev/hdX /var/ftp/pub/fedora
If necessary, add the append to /etc/fstab
/dev/hdX /media/dvdrom auto user,unhide,noauto,exec,ro 0 0
Allow anonymous FTP in /etc/vsftpd/vsftpd.conf
anonymous_enable=YES
anon_upload_enable=NO
anon_mkdir_write_enable=NO
Add the file Add a file /etc/yum.repos.d/localftp.conf
[localftp]
name=Local FTP Repository $releasever - $basearch - Some Extras
baseurl=http://127.0.0.1/yum/
enabled=1
gpgcheck=1
Start vsftp as root
su -c '/etc/rc.d/init.d/vsftpd start'
You have finally your repository on a DVD media that you may share with others if you are on a network; you may easily install and remove some programs
yum install ppracer
(Don't wonder: I have found out and done all this just to install that jumping penguin game :-P All dependencies were fixed and I could correctly play).
Happy yum'ing!
Recent comments
3 days 21 hours ago
1 week 4 days ago
2 weeks 1 day ago
2 weeks 4 days ago
3 weeks 5 days ago
4 weeks 13 hours ago
6 weeks 5 days ago
7 weeks 5 days ago
8 weeks 1 hour ago
8 weeks 3 days ago