User Tools

Site Tools


howtos:creating_a_local_repository

Intro

When you build a list for scripting install's you properly end up with deb files in the list that isn't in the repository. This will kind of break the idea of rebuilding your machine automatically.

This howto will overcome this with some simple tricks.

Install needed software

We need dpkg-dev to make this work so install it like this:

sudo apt-get install dpkg-dev

MyDebs directory

Create a directory where you store the downloaded deb files:

mkdir ~/MyDebs

The update-script

Now make a script that will update the package list for apt-get:

cd ~/MyDebs
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz

Save it as update-mydebs in your local bin directory and make executable:

gedit ~/bin/update-mydebs      < paste in the above script lines save and close gedit
chmod +x ~/bin/update-mydebs

Sources.list

To bind it all together put the following into /etc/apt/sources.list:

deb file:/home/domingo/MyDebs ./

Using the script

After downloading a deb file run:

sudo update-mydebs
sudo apt-get update

Now apt-get/Synaptic/aptitude can find/search/install/keep track of the deb files you download.

Source

howtos/creating_a_local_repository.txt · Last modified: 02/12/2018 21:34 by 127.0.0.1