SergeHallyn_localrepo
1640
Comment:
|
← Revision 8 as of 2013-02-08 14:42:09 ⇥
1885
|
Deletions are marked like this. | Additions are marked like this. |
Line 19: | Line 19: |
[ much to be filled in] I installed apt-move, not actually sure it's needed: |
Create the mirror directories: |
Line 24: | Line 22: |
sudo apt-get install apt-move sudo apt-move update |
release=precise mkdir -p /mirrors/debian/pool/main mkdir -p /mirrors/debian/dists/$release/main/binary-amd64 |
Line 28: | Line 27: |
If you want to use this for deboostrap, then download the files debootstrap will need, and copy them into the mirror: |
|
Line 29: | Line 30: |
mkdir -p /mirrors/debian/pool/main mkdir -p /mirrors/debian/dists/precise/main/binary-amd64 |
debootstrap --download-only $release $release-cache cp $release-cache/var/cache/apt/archive/* /mirrors/debian/pool/main |
Line 33: | Line 34: |
Copy the packages into pool/main: | Copy the customized packages into pool/main: |
Line 43: | 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 54: | Line 55: |
Suite "precise"; Codename "precise"; |
Suite "$release"; Codename "$release"; |
Line 61: | 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 65: | Line 65: |
Now, you can run debootstrap referring to this mirror: | Now, you can add this mirror to your sources.list, |
Line 68: | 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)