Zypper Repository Setup: Difference between revisions

From Yocto Project
Jump to navigationJump to search
(Created page with '== Requirements == Setting up a zypper repository from the rpm files created during a Poky build is fairly straightforward. You will need: * Apache 2 installed and configured (…')
 
(Should be zypper refresh not update at the end)
Line 29: Line 29:
  zypper addrepo -t rpm-md http://server.name/rpm somealias
  zypper addrepo -t rpm-md http://server.name/rpm somealias


6. Update:
6. Fetch the repository information:
  zypper update
  zypper refresh

Revision as of 12:36, 6 April 2011

Requirements

Setting up a zypper repository from the rpm files created during a Poky build is fairly straightforward. You will need:

  • Apache 2 installed and configured (may not need too much configuration)
  • createrepo installed

Steps

1. Add the directory to your apache config (/etc/httpd/conf/httpd.conf):

<VirtualHost *:80>
  ....
    Alias /rpm /path/to/tmp/deploy/rpm
    <Directory "/path/to/tmp/deploy/rpm/">
      Options +Indexes
    </Directory>
</VirtualHost>

2. cd to the tmp/deploy/rpm directory

cd /path/to/tmp/deploy/rpm/

3. Create the repository data (if you're updating, add --update to save time)

createrepo .

4. If you're using SELinux you need to label the files accessible via apache:

chcon -R -h -t httpd_sys_content_t .

5. On the target machine add the zypper repo (where somealias is a local alias for the repo):

zypper addrepo -t rpm-md http://server.name/rpm somealias

6. Fetch the repository information:

zypper refresh