View previous topic :: View next topic |
Author |
Message |
flying_walus n00b
Joined: 07 Sep 2002 Posts: 58
|
Posted: Sat Dec 21, 2002 6:29 pm Post subject: how to build packages on fast dual-p4 for emerge on slow p3? |
|
|
I've just finished setting up a dual p4 machine, and would like to use it's superior compiler speed to compile the packages i need to install on my p3 laptop.
i see that "emerge package" should generate a binary package, but it looks as though it also tries to install said package on the machine that's doing the compiling.
i very much do not want to install packages compiled wth "march=pentium3" on my p4 machine, so how to _just_ package, no install?
thanks |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sat Dec 21, 2002 7:28 pm Post subject: |
|
|
ebuild package will do that. However, another option you might want to consider is making a chroot environment with P3 compiler flags on the P4. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
craftyc Guru
Joined: 23 May 2002 Posts: 443 Location: Behind You.
|
Posted: Sat Dec 21, 2002 11:56 pm Post subject: |
|
|
Wouldn't the --buildpkg option work for this? Or does emerge install the package as well as creating an archive of the binaries? _________________ Postcount ++ |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sun Dec 22, 2002 5:30 am Post subject: |
|
|
It installs after it builds the package - "emerge" always merges to the live filesystem. "ebuild package" is the only way I know of to just get a binary package, without installing it. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
Zadeh Tux's lil' helper
Joined: 31 Oct 2002 Posts: 131
|
Posted: Sun Dec 22, 2002 4:52 pm Post subject: |
|
|
# export CFLAGS="-march=pentium3 ..."
# ebuild </path/to/package> package
After you're done, to reset your previous CFLAGS, just:
# source /etc/make.conf
Some more native options would be nice though. After installing a whole system it'd be neat if you could just do something like:
# emerge --package-system CFLAGS="-march=pentium3 ..." PKGDIR=${All}/pentium3 |
|
Back to top |
|
|
flying_walus n00b
Joined: 07 Sep 2002 Posts: 58
|
Posted: Sun Dec 22, 2002 6:19 pm Post subject: what i ended up doing |
|
|
Since i was doing basically the same things to both systems, i wrote a script that created a pIII package for every port i'd installed on the p4, waited a couple of hours, and then used them to build the pIII system.
It would be nice if you didn't need to specify the exact path for each ebuild file, but hey - the actual install took less than an hour, so i'm not complaining.
Script: (in retrospect, i could have saved a couple of cycles by not hopping from directory to directory, but then, that's why i've got hyperthreading, right?)
Code: |
#! /bin/bash
export BASE=/var/db/pkg
export PORTAGE=/usr/portage
cd ${BASE}
for AREA in $( ls )
do
cd ${BASE/${AREA}
for PKG in $( ls )
do
WHERE=$( echo "${AREA}/${PKG}}" | sed 's/-[0-9].*$//' )
WHAT = "${PKG}.ebuild"
cd ${PORTAGE}/${WHERE}
ebuild ${WHAT} package
rm -rf /var/tmp/portage
done
done
|
|
|
Back to top |
|
|
tedj n00b
Joined: 10 Jul 2003 Posts: 49
|
Posted: Tue Oct 24, 2006 6:38 pm Post subject: |
|
|
(Thank god for Google search of forums.gentoo.org)
Here's my script for rebuilding kde for redeployment.
Code: | #!/bin/bash
export BASE=/var/db/pkg/kde-base
export PORTAGE=/usr/portage/kde-base
cd ${BASE}
for AREA in $( ls )
do
cd ${BASE/${AREA}}
for PKG in $( ls )
do
WHERE=$( echo "${AREA}/${PKG}" | sed 's/-[0-9].*$//' )
WHAT="${PKG}.ebuild"
cd ${PORTAGE}/${WHERE}
ebuild ${WHAT} package
rm -rf /var/tmp/portage
done
done
|
|
|
Back to top |
|
|
|