SergeHallyn_localrepo

Differences between revisions 7 and 8
Revision 7 as of 2012-05-18 20:11:42
Size: 1782
Editor: serge-hallyn
Comment:
Revision 8 as of 2013-02-08 14:42:09
Size: 1885
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 24: Line 22:
release=precise
Line 25: Line 24:
mkdir -p /mirrors/debian/dists/precise/main/binary-amd64 mkdir -p /mirrors/debian/dists/$release/main/binary-amd64
Line 28: Line 27:
Download the files debootstrap will need, and copy them into the mirror: If you want to use this for deboostrap, then download the files debootstrap will need, and copy them into the mirror:
Line 31: Line 30:
debootstrap --download-only precise precise-cache
cp precise-cache/var/cache/apt/archive/* /mirrors/debian/pool/main
debootstrap --download-only $release $release-cache
cp $release-cache/var/cache/apt/archive/* /mirrors/debian/pool/main
Line 45: Line 44:
apt-ftparchive packages pool/main | gzip -9c > dists/precise/main/binary-amd64/Packages.gz apt-ftparchive packages pool/main | gzip -9c > dists/$release/main/binary-amd64/Packages.gz
Line 56: Line 55:
Suite "precise";
Codename "precise";
Suite "$release";
Codename "$release";
Line 63: Line 62:
apt-ftparchive -c release.conf release dists/precise/ > dists/precise/Release
#gpg -bao dists/precise/Release.gpg dists/precise/Release - not needed?
apt-ftparchive -c release.conf release dists/$release/ > dists/$release/Release
Line 67: Line 65:
Now, you can run debootstrap referring to this mirror: Now, you can add this mirror to your sources.list,
Line 70: Line 68:
debootstrap --no-check-gpg precise precise-rootfs file:///mirrors/debian cat >> /etc/apt/sources.list << EOF
deb file:/mirrors/debian $release main
EOF

or you can run debootstrap referring to this mirror:

{{{
debootstrap --no-check-gpg $release $release-rootfs file:///mirrors/debian

Creating local package mirror

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:

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

If you want to use this for deboostrap, then download the files debootstrap will need, and copy them into the mirror:

debootstrap --download-only $release $release-cache
cp $release-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/$release/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 "$release";
Codename "$release";
Architectures "amd64";
Components "main";
Description "Local Updates";
};
EOF
apt-ftparchive -c release.conf release dists/$release/ > dists/$release/Release

Now, you can add this mirror to your sources.list,

cat >> /etc/apt/sources.list << EOF
deb file:/mirrors/debian $release main
EOF

or you can run debootstrap referring to this mirror:

{{{
debootstrap --no-check-gpg $release $release-rootfs file:///mirrors/debian

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