Re: [opensuse] Local cache of updates, installed programs in openSUSE



On Fri, Aug 21, 2009 at 12:00 PM, David C.
Rankin<drankinatty@xxxxxxxxxxxxxxxxxx> wrote:

On Thursday 20 August 2009 11:27:18 pm Jay Mistry wrote:

Is it possible to have a local cache/ "repository" of all -

1) Updates (Critical, Security, Bug-fixes), and
2) Additional installed rpm's (that were installed through
Yast / PackageKit), e.g. Opera, Adobe Reader, VLC Player, etc.
so that I do not have to download all those again (800 MB + D/L)


Yes,

       I have done that for the past 6 months and love it. Basically I have 6-8
boxes that I update from a central computer in my house. Since all of my boxes
don't have the same package config, I created a "Generic" openSuSE repository
for each release (11.0, 11.1) and hold all the common packages there. The
directory structure I use for the repository is:

01:01 nirvana:~/linux/apps> l /home/backup/rpms/
total 32
drwxr-xr-x  8 david dcr 4096 2009-08-10 21:39 ./
drwxr-xr-x 28 david dcr 4096 2009-07-27 17:47 ../
drwxr-xr-x  6 david dcr 4096 2009-08-20 18:58 data/
drwxr-xr-x  3 david dcr 4096 2009-08-09 04:02 dups/
drwxr-xr-x 12 david dcr 4096 2009-08-20 18:58 openSUSE_11.0/
drwxr-xr-x  8 david dcr 4096 2009-04-07 19:05 openSUSE_11.1/
drwxr-xr-x  2 david dcr 4096 2009-04-08 00:33 openSUSE_11.2/

       Where you have the normal architecture divisions you would expect under 11.0,
11.1, etc. Like:

01:01 nirvana:~/linux/apps> l /home/backup/rpms/openSUSE_11.0
total 776
drwxr-xr-x 12 david dcr       4096 2009-08-20 18:58 ./
drwxr-xr-x  8 david dcr       4096 2009-08-10 21:39 ../
drwxr-xr-x  2 david dcr       4096 2009-08-07 14:14 compiz-new/
drwxr-xr-x  2 david dcr      77824 2009-08-09 04:02 delta/
drwxr-xr-x  2 david dcr       4096 2009-07-13 11:23 i386/
drwxr-xr-x  2 david skyline 155648 2009-08-19 18:56 i586/
drwxr-xr-x  2 david dcr      12288 2009-08-15 23:07 i686/
drwxr-xr-x  2 david dcr      69632 2009-08-20 18:58 noarch/
drwxr-xr-x  4 david dcr      12288 2009-07-27 16:44 openOffice/
drwxr-xr-x  2 root  root      4096 2009-08-20 18:58 repodata/
drwxr-xr-x  2 david dcr       4096 2009-08-08 02:01 src/
drwxr-xr-x  2 david skyline 425984 2009-08-20 18:58 x86_64/

       The additional compiz-new and openOffice directories above just hold the
alternate version for each like I have compiz 7.8 in my repository, but have
8.2 avaiable. For openOffice, I have 2.4 in the repo and 3.0.1 in the extra
openOffice directory.

       The key to making this work is to have all clients that do updates use a
script to separate all the files by architecture and then upload to the server
via rsync. That way the next box that gets updated, pulls the rpms from your
server instead of from the internet.

       By doing it this way, you have one central repository, that manages
duplicates, and that holds updated packages for rpms of all architectures..
Further, I put the repository under /home so it gets the space off the /
partition freeing up space there.

       The first thing you want to do is to is to set the "keeppackages" option for
each of your repository definition definition files in /etc/zypp/repo.d/ and
turn off the use of delta.rpms in your zypper.conf file. They may be smaller,
but they are a hell of a lot slower to install.

       I have just a couple of scripts that do the management of the repo. The
client-side and server-side scripts I use can be obtained at:

http://www.3111skyline.com/download/openSUSE/pkgmanage/

       After one of your computers has done an update, just run the zyppmerge.dev
script on the client and it will gather all the newnly downloaded rpms and
rsync them to the box you have chosen as the server (you just need to edit a
few variables to set the appropriate hostname, etc. This client side script
will then call the server-side script that will eliminate any duplicate
packages, update the deltarpm file and create and sign the repository with the
new files in it to update the repo before passing control back to the client.

       Give it a go and see if it meets you needs.


--
David C. Rankin, J.D.,P.E.
Rankin Law Firm, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
Telephone: (936) 715-9333
Facsimile: (936) 715-9339
www.rankinlawfirm.com
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx


David,

Thanks for the detailed note & procedure. However, I forgot to
mention: I am a home PC user and this is for a single desktop home PC
(my laptop runs Windows XP w/ Linux Mint 7).
I am not sure I followed all the instructions since there is no
server: only a single-user home PC. Will use of only the client-side
script do the job ?

The first thing you want to do is to is to set the "keeppackages" option for
each of your repository definition definition files in /etc/zypp/repo.d/ and
turn off the use of delta.rpms in your zypper.conf file. They may be smaller,
but they are a hell of a lot slower to install.

I got the 'keeppackages' option part ...

__editors.repo__  (from /etc/zypp/repos.d/editors.repo)
[editors]
name=editors
enabled=0
autorefresh=0
baseurl=http://download.opensuse.org/repositories/editors/openSUSE_11.1/
type=rpm-md
keeppackages=1
                             ^

... and the deltarpm's part (I think).  This is the relevant section
from /etc/zypp/zypp.conf . Do I need to remove the single # (hash)
from <download.use_deltarpm=false>, or will just changing the value
from default of "true" to "false' suffice ?

##
## Whether to consider using a .delta.rpm when downloading a package
##
## Valid values: boolean
## Default value: true
##
## Using a delta rpm will decrease the download size for package updates
## since it does not contain all files of the package but only the binary
## diff of changed ones. Recreating the rpm package on the local machine
## is an expensive operation (memory,CPU). If your network connection is
## not too slow, you benefit from disabling .delta.rpm.
##
# download.use_deltarpm = false
                                                    ^^^^^

After doing this , I am not sure how to proceed.

I found 2 relevant links through Google, but they refer to Fedora.

http://www.labtestproject.com/using_linux/setup_to_install_software_package_from_fedora_10_dvd
http://www.labtestproject.com/using_linux/install_software_from_fedora_installation_dvd


Thanks,

Jay

--
Linux User 483705 | openSUSE 11.1, Ubuntu 9.04  (i686) w/ Win XP
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



Relevant Pages

  • Re: Good practices with NFS sharing of binaries
    ... > In order to avoid having to install the same software on different ... Sharing the binary packages via automounter is quite a common practice. ... *building* the binaries on production NFS server is IMHO ... then you can look into the package and figure out whether ...
    (comp.unix.solaris)
  • Re: KB976569 KB979909 KB979906 fail to install
    ... It is the Fix it 50123 part of the package which is failing. ... A script required for this install to complete ...
    (microsoft.public.windowsupdate)
  • Re: Error When Removing AD from BDC
    ... downloaded it and saved the script in the folder specified. ... > you should move any fsmo roles off of this server. ... > tools if not loaded can be installed from the server install cd). ... > If you download a gui script I wrote it should be simple to set and run. ...
    (microsoft.public.win2000.active_directory)
  • [opensuse] eGroupWare - Complete Open-Souce Cal, Contact, KB, Tracker, etc. tool
    ... Just dropping a line for those who haven't heard of eGroupWare. ... It seamlessly integrates with OpenOffice/LibreOffice as a webdav server providing web based document collaboration. ... but I prefer the svn install. ... For small/medium business, this is a fantastic package. ...
    (SuSE)
  • Re: SSIS package wont run in production server
    ... I also would like to mention that on my production server, ... When you run the setup of SQL 2005, it is indeed possible to install only ... I have a package that I developed on my local machine and runs well. ...
    (microsoft.public.sqlserver.dts)