Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
portage and update sharing
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
fuzzythebear
Guru
Guru


Joined: 28 Nov 2004
Posts: 317

PostPosted: Fri Oct 28, 2005 9:42 am    Post subject: portage and update sharing Reply with quote

This is what i want to accomplish :

I got two gentoo boxes : one is the gateway for the whole
network . Box is an athlon 1800 ,the other my work box
also an athlon 1800 same mobo as the gate.

Since i find it a heck of a waste of a finely working box i decided to start
using the gateway also as a distcc server . From my box i use both my
comp and the gate for compiles.Works fine. I also at the same time made it
the other way around so the gate could also use my workstation for the heck of it :)
That works fine .

My next step is a shared distfiles repo to save on the gateway's disk space
again no big deal i been told , just use NFS to share the directories .
Where im at a loss is that a friend , absent at the moment , told me that
i could use the built updates on both machines .. and that's where i dont
seem to find trace of a document on how to acheive this.

( Again .. it may exist im sure but i just havent found where yet )

Thing is .. both boxes dont have all the same programs installed in them.
There are differences .. ex the firewall that aint installed on the workstation.

How can this share be acheived ?
How do we tell the different boxes that the updates are already compiled ?
How do we tell the gate it's updates are on the workstation or the other way
around ?
How do we make sure even if the updates arent in the shares that then
the box should go ahead and compile it's own ?

Many questions .. :)

Im also interrested in harnessing more of the gate's power if it's possible
can we even talk clustering ( LOL ) in this case ?

The more i get out of that box the better it seems.. cpu at 1% use seems
a lot of waste : |

Ideas .. suggestions ? good uses for a perfectly fine gentoo
box sitting idle passing packets ?

Thanks for the suggestions : )

Fuzzy



``I guess I should warn you, if I turn out to be particularly clear, you've probably misunderstood what I said.'' A Greenspan
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1884

PostPosted: Fri Oct 28, 2005 10:34 am    Post subject: Reply with quote

Code:

man emerge

Code:

--buildpkg (-b)
              Tells emerge to build binary packages for all ebuilds processed in addition  to  actually  merging the  packages.  Useful for maintainers or if you administrate multiple Gentoo Linux systems (build once, emerge tbz2s everywhere).  The package will be created in the ${PKGDIR}/All  directory.   An alternative  for  already-merged  packages  is  to use quickpkg which creates a tbz2 from the live filesystem.
--usepkg (-k)
              Tells emerge to use binary packages (from $PKGDIR) if they are available, thus  possibly  avoiding some   time-consuming   compiles.   This  option  is  useful  for  CD  installs;  you  can  export PKGDIR=/mnt/cdrom/packages and then use this option to have emerge "pull" binary packages from the CD in order to satisfy dependencies.
Back to top
View user's profile Send private message
fuzzythebear
Guru
Guru


Joined: 28 Nov 2004
Posts: 317

PostPosted: Fri Oct 28, 2005 1:26 pm    Post subject: those eyes .. Reply with quote

ok so morale of the story .. => after several hours more
reading .. dang those eyes are a source of motivation .. :)

in the gateway add usepkg to FEATURES in make.conf
in the workstation .. add buildpkg to FEATURES in make.conf
add to the same in both
PORTDIR=/usr/portage
PKGDIR=${PORTDIR}/packages
export the workstations /usr/portage/distfiles and /usr/portage/packages
( sharing through NFS with the gate )
( more man pages and wild guesses, more questions but..yet .. those eyes.. ;)
create the /usr/portage/packages dir on both machines
clean out the /usr/portage/distfiles on the gate
mount directories to the same location ( /usr/portage/distfiles and packages )
on the gateway ( make fstab entries and mount )
that should be it .. probably is .. i hope ..

ric All # ls
eix-0.3.0-r1.tbz2
so the test pack built is here ..
now on the gate ..
It gets the source from the gateway .
still is building the app ..
maybe i misunderstand the tar.gz will still be compiled ?
what am i missing ?

then the question of how to prevent packs to use the prebuilt ones
where hardware dictates still is eluding me ..

Suggestions ?

Fuzzy

( Man .. those eyes and that look are an unexpected source of motivation ... :)
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1884

PostPosted: Sat Oct 29, 2005 4:35 am    Post subject: Reply with quote

This only works for pakets with the smallest common features. If you have compiled pakets for Pentium 4 you cannot run them on a Pentium 3 or Athlon XP machine. I dont know of a solution for packages for more than one architecture being shared over this.
Back to top
View user's profile Send private message
JSharku
Apprentice
Apprentice


Joined: 09 Feb 2003
Posts: 189
Location: Belgium

PostPosted: Sat Oct 29, 2005 10:20 am    Post subject: Reply with quote

It should work that way yes, although I don't see a 'usepkg' option in /etc/make.conf.example
Code:
# FEATURES are settings that affect the functionality of portage. Most of
#     these settings are for developer use, but some are available to non-
#     developers as well.
#
#  'autoaddcvs'  causes portage to automatically try to add files to cvs
#                that will have to be added later. Done at generation times
#                and only has an effect when 'cvs' is also set.
#  'buildpkg'    causes binary packages to be created of all packages that
#                are being merged.
#  'ccache'      enables ccache support via CC.
#  'collision-protect'
#                prevents packages from overwriting files that are owned by
#                another package or by no package at all.
#  'cvs'         causes portage to enable all cvs features (commits, adds),
#                and to apply all USE flags in SRC_URI for digests -- for
#                developers only.
#  'digest'      causes digests to be generated for all packages being merged.
#  'distcc'      enables distcc support via CC.
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
#                is enabled by default. Tools exist to help clean the locks
#                after crashes: /usr/lib/portage/bin/clean_locks.
#  'fixpackages' allows portage to fix binary packages that are stored in
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
#                also a script that can be run at any given time to force
#                the same actions.
#  'gpg'         enables basic verification of Manifest files using gpg.
#                This features is UNDER DEVELOPMENT and reacts to features
#                of strict and severe. Heavy use of gpg sigs is coming.
#  'keeptemp'    prevents the clean phase from deleting the temp files ($T)
#                from a merge.
#  'keepwork'    prevents the clean phase from deleting the WORKDIR.
#  'maketest'    causes ebuilds to perform testing phases if they are capable
#                of it. Some packages support this automaticaly via makefiles.
#  'noauto'      causes ebuild to perform only the action requested and
#                not any other required actions like clean or unpack -- for
#                debugging purposes only.
#  'noclean'     prevents portage from removing the source and temporary files
#                after a merge -- for debugging purposes only.
#  'nostrip'     prevents the stripping of binaries.
#  'notitles'    disables xterm titlebar updates (which contain status info).
#  'sandbox'     enables sandboxing when running emerge and ebuild.
#  'strict'      causes portage to react strongly to conditions that are
#                potentially dangerous, like missing/incorrect Manifest files.
#  'userpriv'    allows portage to drop root privileges while it is compiling,
#                as a security measure.  As a side effect this can remove
#                sandbox access violations for users.
#  'usersandbox' enables sandboxing while portage is running under userpriv.
Have you tried it with the -k switch explicitly set on the command line?

Sharku
_________________
If only life were portage-driven:
Code:
USE="-bitch -in-laws nice gorgeous smart" emerge girlfriend
*sigh*
--
Open Source for Windows!
Back to top
View user's profile Send private message
Monkeh
Veteran
Veteran


Joined: 06 Aug 2005
Posts: 1656
Location: England

PostPosted: Sat Oct 29, 2005 11:06 am    Post subject: Reply with quote

Set FEATURES=buildpkg on both machines, and when you emerge something on one machine, you can just emerge -K on the other. Just try not to get your USE-flags in a muddle.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum