SergeHallyn_localrepo

Differences between revisions 1 and 7 (spanning 6 versions)
Revision 1 as of 2012-05-18 17:04:56
Size: 1633
Editor: serge-hallyn
Comment:
Revision 7 as of 2012-05-18 20:11:42
Size: 1782
Editor: serge-hallyn
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

[ Note - this is not yet working ]
Line 19: Line 21:
[ much to be filled in] Create the mirror directories:
Line 21: Line 23:
I installed apt-move, not actually sure it's needed: {{{
mkdir -p /mirrors/debian/pool/main
mkdir -p /mirrors/debian/dists/precise/main/binary-amd64
}}}
Line 23: Line 28:
[[[
sudo apt-get install apt-move
sudo apt-move update
]]]
Download the files debootstrap will need, and copy them into the mirror:
Line 28: Line 30:
[[[
mkdir -p /mirrors/debian/pool/main
mkdir -p /mirrors/debian/dists/precise/main-amd64
]]]
{{{
debootstrap --download-only precise precise-cache
cp precise-cache/var/cache/apt/archive/* /mirrors/debian/pool/main
}}}
Line 33: Line 35:
Copy the packages into pool/main: Copy the customized packages into pool/main:
Line 35: Line 37:
[[[ {{{
Line 37: Line 39:
]]] }}}
Line 41: Line 43:
[[[ {{{
Line 44: Line 46:
]] }}}
Line 48: Line 50:
[[[ {{{
Line 50: Line 52:
cat > releases.conf << EOF cat > release.conf << EOF
Line 63: Line 65:
]]] }}}
Line 67: Line 69:
[[[ {{{
Line 69: Line 71:
]]] }}}

Creating local package mirror

[ Note - this is not yet working ]

References

Motivation

If you want to test a package during debootstrap, you can create a local mirror and have deboostrap refer to that.

There are probably simpler ways of doing this. Right now I'm documenting the steps I took which made this work. I suspect several steps can be dropped.

Steps

First, create the packages as you see fit.

Create the mirror directories:

mkdir -p /mirrors/debian/pool/main
mkdir -p /mirrors/debian/dists/precise/main/binary-amd64

Download the files debootstrap will need, and copy them into the mirror:

debootstrap --download-only precise precise-cache
cp precise-cache/var/cache/apt/archive/* /mirrors/debian/pool/main

Copy the customized packages into pool/main:

cp *.deb /mirrors/debian/pool/main/

Now create Packages list:

cd /mirrors/debian
apt-ftparchive packages pool/main | gzip -9c > dists/precise/main/binary-amd64/Packages.gz

We need a Releases file:

cd /mirrors/debian
cat > release.conf << EOF
APT::FTPArchive::Release {
Origin "APT-Move";
Label "APT-Move";
Suite "precise";
Codename "precise";
Architectures "amd64";
Components "main";
Description "Local Updates";
};
EOF
apt-ftparchive -c release.conf release dists/precise/ > dists/precise/Release
#gpg -bao dists/precise/Release.gpg dists/precise/Release - not needed?

Now, you can run debootstrap referring to this mirror:

debootstrap --no-check-gpg precise precise-rootfs file:///mirrors/debian

SergeHallyn_localrepo (last edited 2013-02-08 14:42:09 by serge-hallyn)