QA:Testcase YumPresto createrepo

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
(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....')
 
(fix repo file)
 
(2 intermediate revisions by one user not shown)
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
 
+
== connect to your repo: ==
+
you have to use http server, it couldnt be file:///
+
 
+
# ln -s /tmp/mynew/ /var/www/html/Packages
+
# setenforce 0
+
# ^just for a while, test if it works
+
# service http restart
+
 
+
=== repofile ===
+
cat /etc/yum.repos.d/myrepo.repo
+
 
  [myrepo]
 
  [myrepo]
 
  name=myrepo
 
  name=myrepo
  baseurl=http://localhost/Packages/
+
  baseurl=http://localhost/mynew/
  enable=1
+
  enabled=1
 
  gpgcheck=0
 
  gpgcheck=0
 
+
# Test if everything works
== test ==
+
## yum clean metadata
# yum clean metadata
+
## yum clean all
# yum clean all
+
## yum update sos --enablerepo=myrepo
# yum update sos --enablerepo=myrepo
+
|results=All commands above should finish as expected. When you are running final yum, yum should download ''*.drpm'' instead of ''*.rpm'' file.
 +
}}
 +
[[Category:YumPresto_Test_Cases]]

Latest revision as of 10:02, 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/mynew/
enabled=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.