Difference between revisions of "Unix/Linux Repositories"

(APT (Debian))
 
(5 intermediate revisions by 2 users not shown)
Line 4: Line 4:
  
 
== Client configuration ==
 
== Client configuration ==
 +
 +
=== APT (Debian) ===
 +
 +
To be able to download and install packages with '''apt''', the public key with which the packages were signed is required. To import the key run this as root:
 +
 +
<pre>
 +
wget -q http://www.eiffel.com/downloads/packages/eiffelsoftware-key.gpg -O- | apt-key add -
 +
</pre>
  
 
For '''apt''', run following commands as root:
 
For '''apt''', run following commands as root:
Line 13: Line 21:
 
apt-get update
 
apt-get update
 
</pre>
 
</pre>
 +
  
 
After this typing '''apt-cache search eiffelstudio''' in your console should list a number of available packages for EiffelStudio.
 
After this typing '''apt-cache search eiffelstudio''' in your console should list a number of available packages for EiffelStudio.
 +
 +
Note: when installing the package, be sure to be under root account (at this point you should avoid using sudo).
 +
 +
=== Yum (RPM) ===
  
 
For '''yum''' its quite similar:
 
For '''yum''' its quite similar:
Line 45: Line 58:
 
</pre>
 
</pre>
  
For '''yum''' (RPM), these tools are required:
+
For '''yum''' (RPM), only '''createrepo''' is necessary:
 
+
* yum-arch
+
* createrepo
+
  
 
<pre>
 
<pre>
Line 61: Line 71:
  
 
<pre>
 
<pre>
dpkg-scanpackages . > Packages
+
dpkg-scanpackages -m . > Packages
 
gzip -c9 Packages > Packages.gz
 
gzip -c9 Packages > Packages.gz
  
Line 74: Line 84:
  
 
<pre>
 
<pre>
yum-arch .
 
 
createrepo .
 
createrepo .
 
</pre>
 
</pre>
Line 80: Line 89:
  
 
Finally, copy all generated files together with the archives to the location of your repository (http://www.eiffel.com/downloads/packages/deb for the '''Apt''' files, respectively http://www.eiffel.com/downloads/packages/yum for the '''Yum''' files).
 
Finally, copy all generated files together with the archives to the location of your repository (http://www.eiffel.com/downloads/packages/deb for the '''Apt''' files, respectively http://www.eiffel.com/downloads/packages/yum for the '''Yum''' files).
 
  
 
== See also ==
 
== See also ==
  
 
* [[Unix/Linux Packages]]
 
* [[Unix/Linux Packages]]

Latest revision as of 08:28, 30 May 2008


This page describes how to configure the apt or yum to look for EiffelStudio packages. Additionally it also explains how to create the actual repositories.

Client configuration

APT (Debian)

To be able to download and install packages with apt, the public key with which the packages were signed is required. To import the key run this as root:

wget -q http://www.eiffel.com/downloads/packages/eiffelsoftware-key.gpg -O- | apt-key add -

For apt, run following commands as root:

echo "
deb http://www.eiffel.com/downloads/packages/deb ./
" >> /etc/apt/sources.list
apt-get update


After this typing apt-cache search eiffelstudio in your console should list a number of available packages for EiffelStudio.

Note: when installing the package, be sure to be under root account (at this point you should avoid using sudo).

Yum (RPM)

For yum its quite similar:

echo "
[base]
name=Eiffel Software
baseurl=http://www.eiffel.com/downloads/packages/yum
enabled=1
" >> /etc/yum.conf

Then yum search eiffelstudio should list the available packages.

Creating repositories

Note: for simplification, we will assume all packages are located in a single directory. This is because there are no distribution/release specific packages of EiffelStudio.

Requirements

For creating an Apt (Debian) repository, following packages are required:

  • dpkg-dev
  • apt-utils
  • gnupg (signing the packages)
apt-get install dpkg-dev apt-utils gnupg

For yum (RPM), only createrepo is necessary:

yum install yum-arch createrepo

Using tools

In both cases, copy all .deb/.rpm archives into an empty directory (use different directories for Debian/RPM).

To create the Apt repository, run following commands in the directory where the .deb archives are located:

dpkg-scanpackages -m . > Packages
gzip -c9 Packages > Packages.gz

apt-ftparchive release . > Release
gpg -abs --default-key $KEY -o Release.gpg Release

Note: the uncompressed Packages file is actually not needed for an online repository. However Apt does use the uncompressed version if your repository is located on a CD-ROM.


Again for Yum its a similar procedure:

createrepo .


Finally, copy all generated files together with the archives to the location of your repository (http://www.eiffel.com/downloads/packages/deb for the Apt files, respectively http://www.eiffel.com/downloads/packages/yum for the Yum files).

See also