[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tomorrow's meeting



On Wed, 2002-09-25 at 09:07, Erich Schroeder wrote:
> On 24 Sep 2002, Jeff Licquia wrote:
> 
> > So, making an apt-able CD involves generating a few files and putting
> > them on the CD: a nice description of the CD (no, it doesn't use the CD
> > title), the package databases, and the calculated ID file.  I can tell
> > you what those files are for Debian, but I don't have any idea what they
> > are for RPM.  On Debian, I can also tell you that the files are the same
> > format for both; you can copy a Debian CD to your hard disk and give apt
> > "file:" URIs in sources.list and it will work.
> > 
> 
> I figured that it would be something like the steps of making the http apt 
> repository (which I have not done either). Is there any possibility for 
> the "special files" to be created on the hard drive, and pointing to a 
> standard RedHat (or whatever rpm-based) disk? It sure would be nice to be 
> able to use the standard disks.

Possibly.

An apt sources.list line splits the URI into two or more parts:

deb http://http.us.debian.org/debian woody main contrib non-free

The first part of the URI is used as a "root URI" of sorts.  The second
and following parts are used to construct URIs for some of these special
files that it needs.  Those special files are expected to contain paths
to the packages themselves relative to the "root URI".

So, in Debian, one of the special files is called "Packages".  Using the
above example, one of those will be found at:

http://http.us.debian.org/debian/dists/woody/main/binary-i386/Packages.gz

Let's say that this Packages file refers to a package called "bash". 
That reference will likely look like this in the file:

pool/main/b/bash/bash_2.05a-11_i386.deb

Combine this with the "root URI" and you get:

http://http.us.debian.org/debian/pool/main/b/bash_2.05a-11_i386.deb

That's the URI apt will download.  Notice that the relative path to the
package has nothing to do with the location of apt's special file; it's
in a totally different place relative to the root URI.

Of course, this is all for Debian.  I've noticed that apt-rpm
sources.list lines usually look like:

rpm http://rpm.example.com/rpm-path ./

That's an allowed form in Debian as well; some of the cute stuff about
apt knowing how Debian lays out repositories is turned off.  But the
basic principle is the same: the first URI is the "base", and the second
tells apt where to find its special files.

So, let's say you have the Red Hat official CD mounted on
/mirror/rpm/cdrom, and you want it to work with apt.  What you need to
do is create your special files so that their relative paths point to
"cdrom/RedHat/RPMS/...", and stick them somewhere under /mirror/rpm. 
Then your sources.list line would look like:

rpm file:///mirror/rpm path/to/special/files/

Now, the part I don't know is how to create those special files for
apt-rpm that have those relative paths.  It's even possible that the
apt-rpm people, in their folly, may have broken all this so it doesn't
work.


-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.