Page 1 of 5 123 ... LastLast
Results 1 to 10 of 47

Thread: How TO: Custom repo (local or remote)

  1. #1
    Join Date
    Jun 2005
    Beans
    13

    HOWTO: Custom repo (local or remote)

    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
    Code:
    sudo apt-get install apt-utils
    sudo apt-get install dpkg-dev
    If you havent created your repo directory do it now (i made mine in /var/www because i use apache)
    Code:
    mkdir /home/your repo dir/
    Step Two
    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
    Code:
    cd /bin/
    sudo nano autorepo
    Enter the following lines into autorepo
    Code:
    #!/bin/bash
    sudo dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
    sudo dpkg-scansources . /dev/null | gzip -9c > Sources.gz
    Save the file. Now we have to make it executable
    Code:
    sudo chmod +x autorepo
    Step Four
    We are going to create our repo packages.gz and sources.gz
    Code:
    cd /home/your repo name/
    autorepo
    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.

    Step Five
    Time to update your sources.list
    Code:
    sudo nano /etc/apt/sources.list
    add the following to the bottom of the list
    Code:
    ##My Repo
    deb file:///path/to/repository/ reponame/
    
    example:
    deb file:///home/ repo/
    
    and for remote:
    deb http://host name or ip/ repo/
    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.

    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
    Last edited by cdk; June 25th, 2005 at 12:09 PM.

  2. #2
    Join Date
    Mar 2005
    Beans
    108

    Re: How TO: Custom repo (local or remote)

    Is there anyway to automatically add to the repo all the .deb's you've got installed on your system? To create a sortof quick system restore?

  3. #3
    Join Date
    Jun 2005
    Beans
    13

    Re: How TO: Custom repo (local or remote)

    sounds interesting. im not sure how to go about it though. if you could some how output the list of packages installed on your system and then mirrior them to your repo it might work. any one else have some ideas?

  4. #4
    Join Date
    Mar 2005
    Location
    Phoenix, Arizona, USA
    Beans
    314
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Custom repo (local or remote)

    " Wrote 251 entries to output Packages file.
    Prototype mismatch: sub main::getopt: none vs (@) at /usr/bin/dpkg-scansources line 116."

  5. #5
    Join Date
    Jun 2005
    Beans
    13

    Re: How TO: Custom repo (local or remote)

    i have seen that error many times. Im no expert at this but i did exactly what i wrote above on a minimal ubuntu server and everything works. i just added some new packages to my repo to day and installed it on my workstation with no problems. Maybe someone here will know how to fix that error. In my experience i could still install from my repo even when i got that error.

    cheers,

  6. #6
    Join Date
    Mar 2005
    Location
    Phoenix, Arizona, USA
    Beans
    314
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: How TO: Custom repo (local or remote)

    Quote Originally Posted by cdk
    i have seen that error many times. Im no expert at this but i did exactly what i wrote above on a minimal ubuntu server and everything works. i just added some new packages to my repo to day and installed it on my workstation with no problems. Maybe someone here will know how to fix that error. In my experience i could still install from my repo even when i got that error.

    cheers,
    I was seemingly able to install from my repo as well. But I'd still like to know what the error was about.

    Does anyone have any ideas?

  7. #7
    Join Date
    Apr 2005
    Beans
    156

    Re: How TO: Custom repo (local or remote)

    It appears that the error is caused by the scansources line in the script. I commented that line and the error went away.

    My guess would be that if you don't have any sources for it to scan it kicks out the prototype mismatch.

  8. #8
    Join Date
    Jul 2005
    Beans
    61

    Re: How TO: Custom repo (local or remote)

    Quote Originally Posted by AndyAWS
    It appears that the error is caused by the scansources line in the script. I commented that line and the error went away.

    My guess would be that if you don't have any sources for it to scan it kicks out the prototype mismatch.
    dumb Q: why would you want to do this?

    aveline

  9. #9
    Join Date
    Apr 2005
    Beans
    156

    Re: How TO: Custom repo (local or remote)

    If you had source files in your local repo you would want to scan for them so that you could use apt-get to build and install them...probably nothing that the average user would need to do.

  10. #10
    Join Date
    Sep 2005
    Beans
    24

    Re: How TO: Custom repo (local or remote)

    This guide simply rocks! Thanks a lot man!

Page 1 of 5 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •