AptMoveHowto

Differences between revisions 1 and 15 (spanning 14 versions)
Revision 1 as of 2005-11-16 15:55:03
Size: 2107
Editor: modemcable201
Comment: First draft
Revision 15 as of 2006-01-12 03:45:07
Size: 3228
Editor: modemcable219
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
For example, I will show how to make a cd which contains the edubuntu-desktop package with all of it's dependancies. For example, I will show how to make a cd which contains the xubuntu-desktop package with all of it's dependencies.
Line 5: Line 5:
The user of the cd will not need to use the command-line. The user of the cd will not need to use the command-line to use it.
Line 7: Line 7:
= Step one - Install the apt-move package =  = Step one Install the apt-move package =
Line 9: Line 9:
{{{sudo apt-get install apt-move}}} Apt-move is a tool for creating a debian package repository file structure out of packages that have been downloaded to /var/cache/apt/archives. Installed packages are downloded there by apt for installation. Apt-move will create this local repository in /mirrors, by default.
{{{
sudo apt-get install apt-move dpkg-dev
}}}
Line 11: Line 14:
(Or just use synaptic) (Or just use synaptic) You need to enable the universe repository. See AddingRepositoriesHowto
Line 15: Line 18:
{{{CONTENTS=no }}}
{{{
CONTENTS=no
}}}
Line 17: Line 23:
{{{CONTENTS=yes {{{
CONTENTS=yes
Line 21: Line 28:
= Step two - Download the packages you want to put on the cd = = Step two Download the packages you want to put on the cd =
Line 23: Line 30:
In this example, we are starting from a freshly-installed system. We need to clean out the cache of packages in /var/cache/apt/archive. If you have already installed other packages, be sure that you leave them there so that they are put on your custom cd. In this example, we are starting from a ''freshly-installed system''. We need to clean out the cache of packages in /var/cache/apt/archive. If you have already installed other packages, be sure that you leave them there so that they are put on your custom cd.  If unsure about what dependancies you already have installed, ''perhaps this can be done from the live cd''?
Line 25: Line 32:
So, delete every package in /var/cache/apt/archives So, delete every package in /var/cache/apt/archives. Do not delete these files manually! Instead use:
Line 27: Line 34:
{{{sudo rm /var/cache/apt/archives/*.deb {{{sudo apt-get clean
Line 30: Line 37:
And then install (or just download the edubuntu-desktop packages) And then install (or just download the xubuntu-desktop packages)
Line 32: Line 39:
sudo apt-get -d install edubuntu-desktop {{{
sudo apt-get -d install xubuntu-desktop
}}}
Line 37: Line 45:
= Step three - Run apt move to create the archive structure = = Step three Run apt move to create the archive structure =
Line 47: Line 55:
= Step four - Burn the cd = It would seem that some ubuntu packages are not inserted into the packages.gz file by apt-move. Is this because of some ubuntu-specific reposiitory structure? You must delete the Packages.gz file and remake it with dpkg-scanpackages. Make the directory writable and then cd into it and run:

{{{
cd /mirrors/debian/dists/stable/main/binary-i386

sudo dpkg-scanpackages ../../../../pool/ /dev/null > Packages
}}}

You can identify the cd by making a .disk directory and making an info file in it.

Make the /mirrors/debian direcory writable and do

{{{mkdir /mirrors/debian/.disk
echo "Custom packages" $(hostname) $(date +%y%m%d) > /mirrors/debian/.disk/info
}}}

= Step four Burn the cd =
Line 50: Line 74:
Copy the folders contained in /mirrors/debian to a cd. Copy the contents of what is contained in /mirrors/debian to a cd.
Line 52: Line 76:
On a non-networked ubuntu machine, you can run synaptic, insert the cd and Go into Synaptic -> Edit -> Add Cdrom and it will ask you to pick a name for this cd. Enter it and it will add the contents of the cd to your repositories. On a non-networked ubuntu machine, you can run synaptic, insert the cd and go into Synaptic -> Edit -> Add Cdrom and it will add the contents of the cd to your repositories.
Line 56: Line 80:
{{{sudo apt-cdrom add}}} {{{
sudo apt-cdrom add}}}
Line 60: Line 85:
 * Properly name the cd before you burn it so that the user does not have to do it.
CategoryDocumentation CategoryCleanup

This page will describe how to make a cd which contains packages you have downloaded on one machine using apt or synaptic. The cd will be a repository that you can easily use on another machine using synaptic or apt-cdrom.

For example, I will show how to make a cd which contains the xubuntu-desktop package with all of it's dependencies.

The user of the cd will not need to use the command-line to use it.

Step one Install the apt-move package

Apt-move is a tool for creating a debian package repository file structure out of packages that have been downloaded to /var/cache/apt/archives. Installed packages are downloded there by apt for installation. Apt-move will create this local repository in /mirrors, by default.

sudo apt-get install apt-move dpkg-dev

(Or just use synaptic) You need to enable the universe repository. See AddingRepositoriesHowto

I change the setting in /etc/apt-move.conf from

CONTENTS=no 

to

CONTENTS=yes

So that a file with the contents of the packages will be created.

Step two Download the packages you want to put on the cd

In this example, we are starting from a freshly-installed system. We need to clean out the cache of packages in /var/cache/apt/archive. If you have already installed other packages, be sure that you leave them there so that they are put on your custom cd. If unsure about what dependancies you already have installed, perhaps this can be done from the live cd?

So, delete every package in /var/cache/apt/archives. Do not delete these files manually! Instead use:

{{{sudo apt-get clean }}}

And then install (or just download the xubuntu-desktop packages)

sudo apt-get -d install xubuntu-desktop

This will put the packages in /var/cache/apt/archives. Apt-move will look there by default.

Step three Run apt move to create the archive structure

Make sure you have enough disk space first.

{{{sudo apt-move get sudo apt-move move sudo apt-move packages }}}

It would seem that some ubuntu packages are not inserted into the packages.gz file by apt-move. Is this because of some ubuntu-specific reposiitory structure? You must delete the Packages.gz file and remake it with dpkg-scanpackages. Make the directory writable and then cd into it and run:

cd /mirrors/debian/dists/stable/main/binary-i386

sudo dpkg-scanpackages ../../../../pool/ /dev/null > Packages

You can identify the cd by making a .disk directory and making an info file in it.

Make the /mirrors/debian direcory writable and do

{{{mkdir /mirrors/debian/.disk echo "Custom packages" $(hostname) $(date +%y%m%d) > /mirrors/debian/.disk/info }}}

Step four Burn the cd

Copy the contents of what is contained in /mirrors/debian to a cd.

On a non-networked ubuntu machine, you can run synaptic, insert the cd and go into Synaptic -> Edit -> Add Cdrom and it will add the contents of the cd to your repositories.

You can also do it from the command-line with

sudo apt-cdrom add

** To DO:

  • Add an override file so that you can use pinning on the offline repository packages.

CategoryDocumentation CategoryCleanup

AptMoveHowto (last edited 2008-08-06 16:19:39 by localhost)