1 |
----- Original Message ---- |
2 |
|
3 |
> From: Dale <rdalek1967@×××××.com> |
4 |
> Nils Holland wrote: |
5 |
> > On 21:35 Mon 31 Jan , Francesco Talamona wrote: |
6 |
> >> On Monday 31 January 2011, BRM wrote: |
7 |
> >>> I just wrote a new script last night, but I'm still not sure that all |
8 |
> >>> of the parameters are correct |
9 |
> >>> |
10 |
> >> Why not something proven and reliable like "emerge --sync"? |
11 |
> >> |
12 |
> > In fact, what I always do is sync one of my machines with an official |
13 |
> > Gentoo mirror via "emerge --sync", and then I just use rsync to |
14 |
> > distribute the updated tree to all my other local machines as in: |
15 |
> > |
16 |
> > rsync --delete -trmv /usr/portage/<user>@<dest_host>:/usr/portage |
17 |
> > |
18 |
> > One might want to ask rsync to exclude the distfiles directory, |
19 |
> > but I always include it as it oftentimes saves me the download of a |
20 |
> > file I've already downloaded during an emerge on another machine. |
21 |
> > |
22 |
> > In any case, locally updating my tree via rsync has always worked fine |
23 |
> > for me. Leaving the "--delete" option to rsync out, however, |
24 |
> > immediately leads to problems, with various ebuild-related error |
25 |
> > messages on subsequent "emerge"s. I can imagine that the OP did, in |
26 |
> > fact, update his tree in such an inconsistent manner, but that can |
27 |
> > certainly be fixed, with the surest way being a "emerge --sync" using |
28 |
> > an official mirror. |
29 |
> > |
30 |
|
31 |
Definitely missed the delete option on the new script. |
32 |
|
33 |
> Maybe I am missing something but I have two machines here. I sync to the |
34 |
>Gentoo servers with the main rig and then sync the second rig from the main |
35 |
>rig. All you have to do is start the rsync service and set the IP address in |
36 |
>the SYNC line in make.conf on the second rig. This is my rsyncd.conf on the |
37 |
>main rig: |
38 |
> |
39 |
> # Simple example for enabling your own local rsync server |
40 |
> [gentoo-portage] |
41 |
> path = /usr/portage |
42 |
> comment = Gentoo Portage tree |
43 |
> exclude = /distfiles /packages |
44 |
> |
45 |
> If you want to include distfiles, just remove it from the exclude line. For |
46 |
>my distfiles, I run http-replicator to fetch those. It works pretty well. |
47 |
> |
48 |
|
49 |
If the machine you are hosting portage on (via rsync) is fast enough to complete |
50 |
all updates within the update cycle (e.g. sync'ing 1 time a day, so it has |
51 |
23:59:59 to complete all builds) then it is likely not a problem to do as that. |
52 |
|
53 |
If the machine is not fast enough - mine is a PII 233 w/160 MB RAM, takes a |
54 |
while do to updates - then you really have to separate out what you are hosting |
55 |
from what you are using. Otherwise you end up in the situation that you have |
56 |
started one system update (or software install), have a build failure for |
57 |
whatever reason, and then can't complete the same one due to changes in the |
58 |
local copy of portage. |
59 |
|
60 |
So, even if your system fell into the first situation - where it is fast enough |
61 |
- then I would still recommend doing the little extra to run as the second |
62 |
situation. It's just far easier to maintain. I'm actually surprised the Gentoo |
63 |
Mirror documentation doesn't recommend doing this to start with, but then again |
64 |
- the machine they recommend are magnitudes faster than what I'm running so it's |
65 |
not likely an issue. (Either that or everyone figures it out on their own and |
66 |
then just doesn't say anything.) |
67 |
|
68 |
Why? |
69 |
|
70 |
The local portage copy is always up-to-date, or reasonably so. No - I don't sync |
71 |
every 1/2 hour (like the official mirrors do), but I could force it to sync when |
72 |
I need to if that was an issue; typically once a day is sufficient and that's |
73 |
run by a cron job. But I also keep my server system relatively stable - I don't |
74 |
install a lot of software on it, and I don't necessarily update it frequently. |
75 |
So now I can update my laptop and desktop as well without having to first update |
76 |
the server itself since the rsync hosted portage is independent of the server. |
77 |
|
78 |
Ben |