Hya m8s!
i searched around the forum looking for some info on how to create my own repo and i came up with nothing so i decided to research it and come up with a really easy way to do it and here is what i have found.
HOWTO: Custom repo (local or remote)
REQ: In order to use this how to you will need several things
dpkg-dev
local/remote dir for repo
some .deb files to test
spare time!
** I will be assuming you are going to use a local repo but if you want to use one for your network then all you need to do is create the repo dir in /var/www and follow the same steps
Step One
Most systems come with the following files but just ot be safe run these
If you havent created your repo directory do it now (i made mine in /var/www because i use apache)Code:sudo apt-get install apt-utils sudo apt-get install dpkg-dev
Step TwoCode:mkdir /home/your repo dir/
Now we are going to fill our repo with some .debs (if you are making this repo then you should have some you want to install)
Step Three
We are going to create a script that will make the .debs apt-get'able
Enter the following lines into autorepoCode:cd /bin/ sudo nano autorepo
Save the file. Now we have to make it executableCode:#!/bin/bash sudo dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz sudo dpkg-scansources . /dev/null | gzip -9c > Sources.gz
Step FourCode:sudo chmod +x autorepo
We are going to create our repo packages.gz and sources.gz
you should get some output and be able to see 2 new files in the dir. If you placed the .debs in the repo and they are good packages you shouldnt see any errors if you do get some errors its okay just continue on to the next step to verify if the script works. You can also run this script manually too.Code:cd /home/your repo name/ autorepo
Step Five
Time to update your sources.list
add the following to the bottom of the listCode:sudo nano /etc/apt/sources.list
Its important to remeber that you need to add your repo dir with a space and then "/" otherwise apt will not beable to read the files correctly.Code:##My Repo deb file:///path/to/repository/ reponame/ example: deb file:///home/ repo/ and for remote: deb http://host name or ip/ repo/
Lets test it out now fire up synaptic and do a repo update now search for the names of the .debs you have in your repo with any luck they will be there.
If you have any further questions PM me or reply here! I hope this helps somebody!
cheers,
CDK



Adv Reply



Bookmarks