1

I have a .deb file built and checked-in into my git repository. I want to add this git repository url, as an apt-get repo in the debian system. So, everytime, i do apt-get install apt-repo-demo, it must fetch the latest checked-in debian file from git and install it.

How can i do this?

I use ubuntu 14.04.

3

Just to make sure I understand the situation, you have a git repository which is accessible via a protocol that apt will understand, like http or ftp, which contains .deb packages which you would like to serve over the network as a remote repository.

This wont be terribly difficult because it seems like you already have the transfer mechanism in place. All that remains is to generate the meta-data which identifies your folder as a repository which aptitude expects to find.

Install the package dpkg-dev.

Then run the following commands:

cd /path/to/your/repository
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz

Don't worry about the /dev/null too much. dpkg-scanpackages expects an override file to be passed which you don't need to bother with so you're passing it an empty file.

Then on your client all you need to do is edit your sources.list with

deb protocol://theurlofyourhost.com/the/path/to/your/repo

The command dpkg-scanpackages will have to be run every time you update a package and how you accomplish that will depend on what works best for you. A cron job running every few minutes, a custom service using inotify and the inotifywait command, or just a simple wrapper script to commit your changes run the command.

  • linuxconfig.org/…... this link has a detailed information about how i can set it up with just one apache server.... – Madhavan Jul 12 '15 at 4:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.