[ubuntu-za] add repo

Hilton Gibson hilton.gibson at gmail.com
Wed Feb 15 18:41:50 UTC 2012


Some people use this:
http://www.ubuntu.sun.ac.za/wiki/index.php/MakeLocalMirror


On 15 February 2012 19:47, Hannes Coetzee <scorpking at scorpking.za.org>wrote:

> On 15/02/2012 09:56, Miles wrote:
>
>> Hi all, can someone please tell me how to add my external drives
>> /media/storage/packsM (Which is a rsync of /var/cache/apt/archives) as
>> the repo the my sudo apt-get update and synaptic and update manager will
>> use as the repo to do updates and installations of packages from. will
>> the path /media/storage/packsM work or must I have a separate partition
>> on the external called /media/repositories. My pc can not do unity so I
>> need to keep Maverick with all its packages and updates etc here in case
>> of needing to do a clean install for whatever reason and also be able to
>> install Maverick on other drives with out needing to go online to get
>> updates. My son is going to get the whole repo for me on an uncapped
>> line for me to copy to my external. Oh ya, and are all the security
>> updates and other updates kept at the same online repo? And is there a
>> difference between official downloaded repos and a backup of my
>> apt-cache. Thanks in advance for the help.
>> Miles
>>
>>
>>  The easiest way is to copy the debs in /var/cache/apt/archives to the
> same place on the machine where you want to install updates on.
>
> The next option is to get a copy of the mirror using apt-mirror and copy
> that to a disk. Once you have a copy of the mirror add the following in
> your sources.list file: deb file:/path_to_mirror/archive.**
> ubuntu.com/ubuntu/ <http://archive.ubuntu.com/ubuntu/> maverick main
> restricted universe multiverse .You might have more than one mirror
> available so add what is needed. To keep your mirror up to date from an
> external source just copy changed files with cp -ru /source-mirror/*
> /destination-mirror/ .That will only copy new files.
>
> The third option is a little more difficult but might be what you are
> looking for. I saved all the packages I had to a local repo back when I
> still used Hardy. I've included the script I used below. Copy all the
> archives to the folder where you want your repo and cd into it, then run
> the script and it should sort everything out for you. Make a backup of your
> archives just in case. I hope this will be enough info to get you started.
>
> Hannes
>
> <-----------------------/usr/**bin/update_repo.sh------------**
> ------------>
> <-----------------------------**--------START-----------------**
> --------------------->
>
> #!/bin/sh
> apt-move -d maverick update
> echo "Rebuilding Main Packages.."
> apt-ftparchive packages pool/main/ | gzip -9c > dists/maverick/main/binary-
> **i386/Packages.gz
> echo "Rebuilding Restricted Packages.."
> apt-ftparchive packages pool/restricted/ | gzip -9c >
> dists/maverick/restricted/**binary-i386/Packages.gz
> echo "Rebuilding Contrib Packages.."
> apt-ftparchive packages pool/contrib/ | gzip -9c >
> dists/maverick/contrib/binary-**i386/Packages.gz
> echo "Rebuilding Non-free Packages.."
> apt-ftparchive packages pool/non-free/ | gzip -9c >
> dists/maverick/non-free/**binary-i386/Packages.gz
> echo "Rebuilding Partner Packages.."
> apt-ftparchive packages pool/partner/ | gzip -9c >
> dists/maverick/partner/binary-**i386/Packages.gz
> echo "Rebuilding Multiverse.."
> apt-ftparchive packages pool/multiverse/ | gzip -9c >
> dists/maverick/multiverse/**binary-i386/Packages.gz
> #echo "Rebuilding Hardy Updates.."
> #apt-ftparchive packages pool/maverick-updates/ | gzip -9c >
> dists/maverick/maverick-**updates/binary-i386/Packages.**gz
> echo "Creating release file.."
> rm dists/maverick/Release
> apt-ftparchive -c myapt.conf release dists/maverick/ > Release
> mv Release dists/maverick/
>
> #Add this line to /etc/apt/sources.list
> #deb file:/ubuntu/ maverick contrib main multiverse non-free restricted
> partner maverick-updates
>
> #gpg -bao dists/maverick/Release.gpg dists/maverick/Release
>
>
>
> #mkdir .disk
> #echo Ubuntu-Updates `date +%Y-%m-%d` > .disk/info
> #gpg --export -a "Your Name" > public.key
> #mkisofs -r -A "Ubuntu Updates `date +%Y%m%d`" -o ubuntu-updates.iso
> /ubuntu
> #exit
>
> echo "All done.."
>
> <-----------------------------**--------END-------------------**
> ------------------->
>
>
> --
> ubuntu-za mailing list
> ubuntu-za at lists.ubuntu.com
> https://lists.ubuntu.com/**mailman/listinfo/ubuntu-za<https://lists.ubuntu.com/mailman/listinfo/ubuntu-za>
>



-- 
Hilton Gibson
Systems Administrator
JS Gericke Library
Room 1025D
Stellenbosch University
Private Bag X5036
Stellenbosch
7599
South Africa

Cell: +27 846 464 758 | Phone: +27 21 808 4100
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-za/attachments/20120215/08a72500/attachment.html>


More information about the ubuntu-za mailing list