Creating a Debian Repository

Below are instructions for creating your own Debian repository. The instructions are based on http://www.debian.org/doc/manuals/repository-howto/repository-howto.en.html

REPO_DIR={pick some location}
mkdir $REPO_DIR
mkdir $REPO_DIR/binary
mkdir $REPO_DIR/source
cp *.deb *.ddeb $REPO_DIR/binary
cd $REPO_DIR
dpkg-scanpackages binary  /dev/null | gzip -9c > binary/Packages.gz
dpkg-scansources  source  /dev/null | gzip -9c > source/Sources.gz

Using the Debian repository you just created

One needs to add a new file to the /etc/apt/sources.list.d/ directory. For instance a new file called mariadb.list

# sergey's MariaDB repository
#
deb file:///home/psergey/testrepo binary/
deb-src file:///home/psergey/testrepo source/

after which one can run

apt-get update  # Let apt learn about the new repository
apt-get install mariadb-server

and collect bugs :-).

"apt-get install" will spray output of scripts and servers all over /var/log. It is also possible to set DEBIAN_SCRIPT_DEBUG=1 to get some (not all) of it to stdout.

Cleaning up after failed installation

Run

dpkg --get-selections | grep mariadb
dpkg --get-selections | grep mysql

to see what is installed, and then

 dpkg --purge <packages>

until the former produces empty output. Note: after some failures, /etc/mysql and /var/lib/mysql are not cleaned and still need to be removed manually.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.