-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2010-07-25 12:31, Anders Johansson wrote:
On Sunday 25 July 2010 12:19:58 Carlos E. R. wrote:
Hi,
How about someone making a daemon that shares via some p2p protocol the /var/cache/zypp/packages/* contents amongst all local networked computers, so that what one downloads from outside can be reused by any other opensuse computer in the same network, automatically?
Don't look at me, I have no idea how to do that ;-)
Well, one obvious way would be to mount that directory from some sort of network file system, perhaps NFS. Then you wouldn't even need a daemon, the machines would just pick it up automatically, you wouldn't have packages taking up space on all machines, and there wouldn't be masses of traffic between the machines
I've doing exactly that, for some time O:-) There a few problems. One, is it not automatic. You have to make sure that all repos save the packages they download (which is not the default setting), and you have to do that one by one on all machines. Another, is that the same repo must use the exact same directory for storing those packages, on all the machines. Sometimes the name is "random" and difficult to guess. In mine Packman got the name of the mirror; another repo got "http:longsomething" as directory name. This directory name is taken from the "alias" of the repository (not the name), which is not shown in the yast module that handles repository management; you have to use zypper for that, change all the "alias" coordinately on all your computers. And the directories do not show till you really try to install something from there. Another is that do you have to activate nfs, server in one, client on another. In my network, the yast module says there are no clients on my network, which is false, it works as soon as I configure it manually. However, there is a big bug in yast client module (11.2 at least) that it _wrecks_ completely your fstab file, so be warned. It does so even if it doesn't add any nfs share, just opening the firewall and searching for one does it. Then, there are procedural problems. You can not run updates on two machines at the same time. What happens if two are downloading the same file to the same nfs share? Or if one tries to install an rpm that hasn't been fully downloaded on another? Or... what happens if one runs "zypper clean"? I think it will clear the main shared repo storage... absolute havoc! Or, what happens if your run package management without first starting the local nfs client? No, it can not be running full time, a machine can be a laptop that is often off the local network. My proposal is different. It has to be automatic, and distributed. It doesn't mean that all packages are available on all computers. Rather, that when one is about to download a package, it asks first the local network if anybody has it, and uses it. If not, it downloads it and makes it available to the rest. Whether that copy is stored again on that computer is something for the devs to decide. Perhaps it should be stored on a percent of the available machines. Or a few machines with room to spare are defined as p2p-servers for the rest - meaning that the main nfs server doesn't have to be running always, as in my setup above. It could have utilities to copy everything available on the network to another computer, for example to create a DVD repo to updte an off-line machine. The YOU and zypper modules should be aware of the presence of the daemon, and warn if the main local storages do not appear to be online. If the go ahead is issued, whatever is downloaded has to be stored locally, and later forwarded to the storage when it appears. See? I have ideas ;-) Just that I'm no linux programmer and can't do this myself. - -- Cheers / Saludos, Carlos E. R. (from 11.2 x86_64 "Emerald" GM (Elessar)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAkxMG1AACgkQU92UU+smfQWTvgCfTOx5N+c3fV70MC3LmfKTq+v+ LJkAnj+VvGy+lnQPTVX8G+dVp9jgqSBX =dqK9 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org