From Fedora Project Wiki

(Created page with '== prepare system == '''download createrepo + some old package , for ex sos''' # rpm -Uvh http://kojipkgs.fedoraproject.org/packages/createrepo/0.9.7/4.fc11/noarch/createrepo-0....')
 
Line 1: Line 1:
== prepare system ==
{{QA/Test_Case
 
|description=Users should be able to create delta-rpms enabled repositories.
'''download createrepo + some old package , for ex sos'''
|actions=
# rpm -Uvh http://kojipkgs.fedoraproject.org/packages/createrepo/0.9.7/4.fc11/noarch/createrepo-0.9.7-4.fc11.noarch.rpm
# Download createrepo + some old package, for example sos
# rpm -Uvh  http://kojipkgs.fedoraproject.org/packages/sos/1.8/9.fc11/noarch/sos-1.8-9.fc11.noarch.rpm --oldpackage
## rpm -Uvh http://kojipkgs.fedoraproject.org/packages/createrepo/0.9.7/4.fc11/noarch/createrepo-0.9.7-4.fc11.noarch.rpm
# yum install httpd
## rpm -Uvh  http://kojipkgs.fedoraproject.org/packages/sos/1.8/9.fc11/noarch/sos-1.8-9.fc11.noarch.rpm --oldpackage
 
## yum install httpd
== Create your own repo ==
# Create your own repo
 
## mkdir /var/www/html/myold /var/www/html/mynew
 
## cd  /var/www/html/myold
# mkdir /tmp/myold /tmp/mynew
## wget http://kojipkgs.fedoraproject.org/packages/sos/1.8/9.fc11/noarch/sos-1.8-9.fc11.noarch.rpm
# cd  /tmp/myold
## cd /var/www/html/mynew
# wget http://kojipkgs.fedoraproject.org/packages/sos/1.8/9.fc11/noarch/sos-1.8-9.fc11.noarch.rpm
## wget http://kojipkgs.fedoraproject.org/packages/sos/1.8/10.fc11/noarch/sos-1.8-10.fc11.noarch.rpm
# cd /tmp/mynew
## createrepo --database --deltas --oldpackagedirs=/var/www/html/myold/ /var/www/html/mynew/
# wget http://kojipkgs.fedoraproject.org/packages/sos/1.8/10.fc11/noarch/sos-1.8-10.fc11.noarch.rpm
# Start http server with service httpd start
# createrepo --database --deltas --oldpackagedirs=/tmp/myold/ /tmp/mynew/
# Connect to your repo (you have to use http server, it ''could not be file://'') with this repofile in /ets/yum.repos.d/myrepo.repo
 
  [myrepo]
== connect to your repo: ==
  name=myrepo
you have to use http server, it couldnt be file:///
  baseurl=http://localhost/Packages/
 
  enable=1
# ln -s /tmp/mynew/ /var/www/html/Packages
  gpgcheck=0
# setenforce 0
# Test if everything works
# ^just for a while, test if it works
## yum clean metadata
# service http restart
## yum clean all
 
## yum update sos --enablerepo=myrepo
=== repofile ===
|results=All commands above should finish as expected. When you are running final yum, yum should download ''*.drpm'' instead of ''*.rpm'' file.
cat /etc/yum.repos.d/myrepo.repo
}}
[myrepo]
[[Category:YumPresto_Test_Cases]]
name=myrepo
baseurl=http://localhost/Packages/
enable=1
gpgcheck=0
 
== test ==
# yum clean metadata
# yum clean all
# yum update sos --enablerepo=myrepo

Revision as of 10:00, 16 April 2009

Description

Users should be able to create delta-rpms enabled repositories.


How to test

  1. Download createrepo + some old package, for example sos
    1. rpm -Uvh http://kojipkgs.fedoraproject.org/packages/createrepo/0.9.7/4.fc11/noarch/createrepo-0.9.7-4.fc11.noarch.rpm
    2. rpm -Uvh http://kojipkgs.fedoraproject.org/packages/sos/1.8/9.fc11/noarch/sos-1.8-9.fc11.noarch.rpm --oldpackage
    3. yum install httpd
  2. Create your own repo
    1. mkdir /var/www/html/myold /var/www/html/mynew
    2. cd /var/www/html/myold
    3. wget http://kojipkgs.fedoraproject.org/packages/sos/1.8/9.fc11/noarch/sos-1.8-9.fc11.noarch.rpm
    4. cd /var/www/html/mynew
    5. wget http://kojipkgs.fedoraproject.org/packages/sos/1.8/10.fc11/noarch/sos-1.8-10.fc11.noarch.rpm
    6. createrepo --database --deltas --oldpackagedirs=/var/www/html/myold/ /var/www/html/mynew/
  3. Start http server with service httpd start
  4. Connect to your repo (you have to use http server, it could not be file://) with this repofile in /ets/yum.repos.d/myrepo.repo
 [myrepo]
 name=myrepo
 baseurl=http://localhost/Packages/
 enable=1
 gpgcheck=0
  1. Test if everything works
    1. yum clean metadata
    2. yum clean all
    3. yum update sos --enablerepo=myrepo

Expected Results

All commands above should finish as expected. When you are running final yum, yum should download *.drpm instead of *.rpm file.