Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing portage on other distros, easier than ever
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 11, 12, 13  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
tony11235
Apprentice
Apprentice


Joined: 15 May 2006
Posts: 198

PostPosted: Wed Oct 03, 2007 2:20 pm    Post subject: Reply with quote

Yes, but only for the main tools like gcc, binutils, etc. Now I'm not so sure that I want to have to deal with putting everything that I already have installed in that file. I think I'll just forget about this.
_________________
"What can be asserted without evidence can also be dismissed without evidence"
Back to top
View user's profile Send private message
zecora
l33t
l33t


Joined: 17 Aug 2004
Posts: 627
Location: Minneapolis, MN

PostPosted: Wed Oct 17, 2007 6:44 pm    Post subject: Reply with quote

Code:

>>> Updating Portage cache:  100%

!!! Problem with sandbox binary. Disabling...


!!! Problem with sandbox binary. Disabling...

!!! ARCH is not set... Are you missing the /etc/make.profile symlink?
!!! Is the symlink correct? Is your portage tree complete?

!!! Problem with sandbox binary. Disabling...


*** --inject has been deprecated.
*** If you manage a piece of software yourself, add it's name and
*** version (eg foo/bar-1.0) to /etc/portage/profile/package.provided.
*** If you want to prevent portage from upgrading a package, add it to
*** /etc/portage/package.mask prepending it with '>' (eg >foo/bar-1.0)
*** For more information on fine-grained portage control, please see
*** the portage man page.

emerge: please specify at least one cat/pkg-ver to inject.
!!! Problem with sandbox binary. Disabling...

!!! ARCH is not set... Are you missing the /etc/make.profile symlink?
!!! Is the symlink correct? Is your portage tree complete?

!!! Problem with sandbox binary. Disabling...


*** --inject has been deprecated.
*** If you manage a piece of software yourself, add it's name and
*** version (eg foo/bar-1.0) to /etc/portage/profile/package.provided.
*** If you want to prevent portage from upgrading a package, add it to
*** /etc/portage/package.mask prepending it with '>' (eg >foo/bar-1.0)
*** For more information on fine-grained portage control, please see
*** the portage man page.

emerge: please specify at least one cat/pkg-ver to inject.
!!! Problem with sandbox binary. Disabling...

!!! ARCH is not set... Are you missing the /etc/make.profile symlink?
!!! Is the symlink correct? Is your portage tree complete?

!!! Problem with sandbox binary. Disabling...


*** --inject has been deprecated.
*** If you manage a piece of software yourself, add it's name and
*** version (eg foo/bar-1.0) to /etc/portage/profile/package.provided.
*** If you want to prevent portage from upgrading a package, add it to
*** /etc/portage/package.mask prepending it with '>' (eg >foo/bar-1.0)
*** For more information on fine-grained portage control, please see
*** the portage man page.

emerge: please specify at least one cat/pkg-ver to inject.
!!! Problem with sandbox binary. Disabling...

!!! ARCH is not set... Are you missing the /etc/make.profile symlink?
!!! Is the symlink correct? Is your portage tree complete?

!!! Problem with sandbox binary. Disabling...

!!! ARCH is not set... Are you missing the /etc/make.profile symlink?
!!! Is the symlink correct? Is your portage tree complete?

!!! Problem with sandbox binary. Disabling...


*** --inject has been deprecated.
*** If you manage a piece of software yourself, add it's name and
*** version (eg foo/bar-1.0) to /etc/portage/profile/package.provided.
*** If you want to prevent portage from upgrading a package, add it to
*** /etc/portage/package.mask prepending it with '>' (eg >foo/bar-1.0)
*** For more information on fine-grained portage control, please see
*** the portage man page.

emerge: please specify at least one cat/pkg-ver to inject.
!!! Problem with sandbox binary. Disabling...

!!! ARCH is not set... Are you missing the /etc/make.profile symlink?
!!! Is the symlink correct? Is your portage tree complete?

Inject has failed. Please verify and continue with cut & paste of rest of the steps
ERROR.


I run the script and this is the msg I get. I am trying to set this up on Ubuntu v7.04. If you could please help me out with this msg.
Back to top
View user's profile Send private message
zecora
l33t
l33t


Joined: 17 Aug 2004
Posts: 627
Location: Minneapolis, MN

PostPosted: Fri Oct 19, 2007 4:26 pm    Post subject: Reply with quote

Code:
sent 2605 bytes  received 3696631 bytes  93651.54 bytes/sec
total size is 178693700  speedup is 48.31

>>> Updating Portage cache:  100%



 * An update to portage is available. It is _highly_ recommended
 * that you update portage now, before any other packages are updated.
 * Please do so and then update ALL of your configuration files.

[root@localhost init.d]# emerge -pv portage

These are the packages that I would merge, in order:

!!! ARCH is not set... Are you missing the /etc/make.profile symlink?
!!! Is the symlink correct? Is your portage tree complete?

[root@localhost init.d]#


I reinstalled the system and switched to Fedora. I get this msg after I emerge --sync and then try to update portage.
Back to top
View user's profile Send private message
zecora
l33t
l33t


Joined: 17 Aug 2004
Posts: 627
Location: Minneapolis, MN

PostPosted: Fri Oct 19, 2007 7:27 pm    Post subject: Reply with quote

I fixed that issue by doing
Code:
ln -sf /usr/portage/profiles/default-linux/x86/2006.1 /etc/make.profile
it seems it is not working when I try to
Code:
emerge portage
.

Here is the msg I get.

Code:
[root@localhost ~]# emerge portage
!!! Problem with sandbox binary. Disabling...

Calculating dependencies ...done!
>>> emerge (1 of 46) dev-libs/expat-2.0.1 to /
>>> md5 files   ;-) expat-2.0.1.ebuild
>>> md5 files   ;-) expat-1.95.8.ebuild
>>> md5 files   ;-) expat-1.95.7.ebuild
>>> md5 files   ;-) expat-1.95.7-r1.ebuild
>>> md5 files   ;-) expat-2.0.0.ebuild
>>> md5 files   ;-) files/digest-expat-2.0.1
>>> md5 files   ;-) files/digest-expat-1.95.8
>>> md5 files   ;-) files/expat-2.0.0-test-cpp.patch
>>> md5 files   ;-) files/digest-expat-2.0.0
>>> md5 files   ;-) files/digest-expat-1.95.7-r1
>>> md5 files   ;-) files/digest-expat-1.95.7
>>> md5 files   ;-) files/expat-2.0.0-test-64bit.patch
>>> md5 src_uri ;-) expat-2.0.1.tar.gz
>>> Unpacking source...
>>> Unpacking expat-2.0.1.tar.gz to /var/tmp/portage/expat-2.0.1/work
>>> Source unpacked.
./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --build=i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for i686-pc-linux-gnu-gcc... no
checking for gcc... no
checking for i686-pc-linux-gnu-cc... no
checking for cc... no
checking for cc... no
checking for i686-pc-linux-gnu-cl... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

!!! Please attach the config.log to your bug report:
!!! /var/tmp/portage/expat-2.0.1/work/expat-2.0.1/config.log

!!! ERROR: dev-libs/expat-2.0.1 failed.
!!! Function econf, Line 485, Exitcode 0
!!! econf failed
!!! If you need support, post the topmost build error, NOT this status message.

[root@localhost ~]#


EDIT: Says I need a working Compiler. So How do I get that setup?
Back to top
View user's profile Send private message
pwiddy
n00b
n00b


Joined: 26 Oct 2007
Posts: 1

PostPosted: Tue Oct 30, 2007 7:37 pm    Post subject: Reply with quote

zecora, your problem is probably due to the fact that you haven't installed gcc on your fedora system. I'm not sure if you need more than just gcc. Everything worked well for me on an x86 system running Ubuntu 7.04. But I have installed various development tools. But
Code:
apt-get install build-essential
should do if you are using Ubuntu. There may be more, but since I had all this already installed I'm not sure if you need more

So just start by installing gcc and see if you are able to resolve this problem.
Back to top
View user's profile Send private message
jaytho
n00b
n00b


Joined: 22 Apr 2008
Posts: 1

PostPosted: Tue Apr 22, 2008 12:58 am    Post subject: Got it going on redhat:python 2.2.4 readline patch Reply with quote

seems like a lot of interdepencies between portage<>python versions.

from a redhat release 4, nahant update 5 (needed to redo apache2)

Installed python 2.3.7 from scratch to make portage go,
then when I attempt to emerge portage, readline patch borks patching dev-lang/python-2.4.4-r6

Looks like the patch comes up empty looking at /var/tmp/portage/python...01_all_readline.patch-30274.out

should I keep python outside of portage and update (or are their portage package dependencies?)

or attempt without readline (what is readline?)

or tweak the ebuild

also, apache2ctl requires runscript- where does that come from?

TIA
Back to top
View user's profile Send private message
Pliablemammal
n00b
n00b


Joined: 02 Oct 2006
Posts: 52
Location: Sacramento

PostPosted: Sun Nov 30, 2008 3:33 am    Post subject: Trying it on YDL 6.1 and PS3 Reply with quote

Having some difficulty here, looks like the x86 will have to be changed to ppc64, but not sure what I should link to make it work?
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8720
Location: ~Brussels - Belgique

PostPosted: Wed Jun 09, 2010 5:30 am    Post subject: Reply with quote

Hello,

I am trying to install portage on a LFS-based system (just for the geeky fun).
I have a toolchain + python 2.6 and try to install portage.

I see that portage-2.1 and 2.2 are quite different than 2.0.
Will portage 2.0 still work today with a current portage tree ?

Did anybody tried that operation on those last recent days ?

EDIT: I will try with pkgcore or paludis, because they have installation scripts.
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8720
Location: ~Brussels - Belgique

PostPosted: Tue Jul 20, 2010 7:12 pm    Post subject: Reply with quote

Hello,

I managed to build a "Gentoo From Scratch" !

I started from LinuxFromScratch 6.6 book, but only built the chroot system (in /tools), then install portage, then emerge 2-3 needed packages, then generate a stage 1, and voilà !

I am currently testing my script. If someone is interested, I will publish it later.
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
ferringb
Retired Dev
Retired Dev


Joined: 03 Apr 2003
Posts: 357

PostPosted: Fri Jul 23, 2010 10:15 am    Post subject: Reply with quote

XavierMiller wrote:
Hello,

I managed to build a "Gentoo From Scratch" !

I started from LinuxFromScratch 6.6 book, but only built the chroot system (in /tools), then install portage, then emerge 2-3 needed packages, then generate a stage 1, and voilà !

I am currently testing my script. If someone is interested, I will publish it later.

Bit curious...
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8720
Location: ~Brussels - Belgique

PostPosted: Fri Jul 23, 2010 11:26 am    Post subject: Reply with quote

I'm fixing some bugs in my script, the big problems are around. Yet some ld.so problems, maybe a bug in the initial toolchain (I feel I removed too much base packages from LFS).
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
krystys
n00b
n00b


Joined: 24 Jul 2010
Posts: 4

PostPosted: Sat Jul 24, 2010 10:51 am    Post subject: Reply with quote

it would be absolutely great if you could tell us how to install portage-emerge on a LFS 6.6
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8720
Location: ~Brussels - Belgique

PostPosted: Mon Jul 26, 2010 9:18 pm    Post subject: Reply with quote

Hello,

The scripts "Gentoo From Scratch" begins to be stable: I managed how to switch from a "/tools" based minimal system (as described in Linux From Scratch book version 6.6, but staying in /tools), install python (easy), portage (quite straightforward by copying all needed files in the right place), then amend the "/tools" toolchain to point again to "/lib(64)", and generate the stage 1.

The script is under test on my machine for the night, let's hope it will reach a stage 3 :)
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
krystys
n00b
n00b


Joined: 24 Jul 2010
Posts: 4

PostPosted: Tue Jul 27, 2010 9:12 am    Post subject: Reply with quote

but at least can you tell us how you installed portage? and did emerge work?

Last edited by krystys on Tue Jul 27, 2010 1:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8720
Location: ~Brussels - Belgique

PostPosted: Tue Jul 27, 2010 9:18 am    Post subject: Reply with quote

Yep.

Assuming python is installed:

Code:
mkdir -p /usr/share/portage/config
mkdir -p /usr/lib/portage
cp -a bin pym /usr/lib/portage
for f in archive-conf dispatch-conf emaint emerge-webrsync env-update etc-update fixpackages quickpkg regenworld
do
    ln -s ../lib/portage/bin/$f /usr/sbin/$f
done
ln -s env-update /usr/sbin/update-env
ln -s etc-update /usr/sbin/update-etc
cp cnf/make.globals cnf/sets.conf /usr/share/portage/config
for f in ebuild egencache emerge portageq repoman
do
    ln -s ../lib/portage/bin/$f /usr/bin/$f
done
cp -r cnf/logrotate.d /etc
cp cnf/dispatch-conf.conf /etc
cp cnf/etc-update.conf /etc
ln -s ../usr/share/portage/config/make.globals /etc/make.globals
old_pwd=$PWD
cd /etc
case $(uname -m) in
    i?86)
        ln -s ../usr/portage/profiles/default/linux/x86/10.0 /etc/make.profile
        ;;
    x86_64)
        ln -s ../usr/portage/profiles/default/linux/amd64/10.0/no-multilib /etc/make.profile
        ;;
    *)
        echo TODO: Your processor architecture ($(uname -m)) is not supported by this script.
        exit 1
        ;;
esac
echo USE=\"-berkdb -fortran -gdbm -hal -ipv6\" > /etc/make.conf
#TODO: add other supported processors
echo ACCEPT_KEYWORDS=\"~$(case $(uname -m) in i?86) echo x86 ;; x86_64) echo amd64;; esac)\" >> /etc/make.conf
echo CHOST=\"$(uname -m)-pc-linux-gnu\" >> /etc/make.conf
echo MAKEOPTS=\"$MAKEOPTS\" >> /etc/make.conf
cat >> /etc/make.conf << "EOF"

CFLAGS="-O2 -pipe -fomit-frame-pointer -march=native -mtune=native"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--as-needed"

EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="candy parallel-fetch"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
PORTAGE_ELOG_CLASSES="log warn error"
PORTAGE_ELOG_SYSTEM="echo save"
EOF
mkdir /etc/portage
echo  sys-apps/portage > /etc/portage/package.unmask
echo Europe/Brussels > /etc/timezone
cd /usr
if [[ -f $DISTFILES/portage-snapshot.tar.bz2 ]]
then
    echo --- unpacking Portage snapshot...
    tar xpf $DISTFILES/portage-snapshot.tar.bz2 || exit 1
fi
if [[ -f $DISTFILES/portage-distfiles.tar ]]
then
    echo --- unpacking some distfiles...
    mkdir -p /usr/portage/distfiles
    cd /usr/portage/distfiles
    tar xf $DISTFILES/portage-distfiles.tar || exit 1
fi
cd $old_pwd

if [[ ! $(grep portage /etc/passwd) ]]
then
    echo portage:x:250:250:portage:/var/tmp/portage:/bin/false >> /etc/passwd
fi
if [[ ! $(grep portage /etc/group) ]]
then
    echo portage::250:portage >> /etc/group
fi
if [[ ! -d /usr/portage ]]
then
    emerge --sync || exit 1
fi
emerge --info || exit 1;


And obviously, emerge works :)
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
krystys
n00b
n00b


Joined: 24 Jul 2010
Posts: 4

PostPosted: Tue Jul 27, 2010 1:11 pm    Post subject: Reply with quote

Thank you, this sure solves my problems and others for sure.

And also, what do i need to download - portage-latest.tar.bz2?
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8720
Location: ~Brussels - Belgique

PostPosted: Tue Jul 27, 2010 7:26 pm    Post subject: Reply with quote

Hello,

Just to say I fully succeeded a script that install Gentoo from Scratch 8)
I will give first details in French, in my topic, and later, I will translate it in English. The script will be published later, when it will be complete (pre-requisites tests, automatic download of needed sources, check with some non-Gentoo live CDs as Ubuntu and LinuxFromScratch, ...)

The script I gave before to install Portage is included in my script, you can use it on any other distribution. Let's hope Portage developers will provide a configure and makefile in a next version of Portage....
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
yanom
n00b
n00b


Joined: 02 Oct 2010
Posts: 6

PostPosted: Sun Oct 10, 2010 5:11 pm    Post subject: Reply with quote

does this still work, 6 years later?
_________________
I have no signature.
Back to top
View user's profile Send private message
Daviljoe193
n00b
n00b


Joined: 25 Aug 2013
Posts: 1
Location: Somewhere in Fall River

PostPosted: Wed Aug 28, 2013 10:16 pm    Post subject: Reply with quote

yanom wrote:
does this still work, 6 years later?

If it helps, I'll be occupying myself on making a tutorial on installing portage on any Linux distro, starting with the bulky bastard Ubuntu. :)
_________________
"You must realize that the computer has it in for you. The irrefutable proof of this is that the computer always does what you tell it to do." BSD Fortune
Back to top
View user's profile Send private message
ArneBab
Guru
Guru


Joined: 24 Jan 2006
Posts: 429
Location: Graben-Neudorf, Germany

PostPosted: Wed Oct 30, 2013 9:19 am    Post subject: Reply with quote

Daviljoe193 wrote:
yanom wrote:
does this still work, 6 years later?

If it helps, I'll be occupying myself on making a tutorial on installing portage on any Linux distro, starting with the bulky bastard Ubuntu. :)


If it could be done in userspace, that would be quite useful. 2 years ago I lost about 3 month, because I had to teach a cluster the basic moves - like numpy and scipy…

Back then I tried a prefix-install of Gentoo, but it sadly did not work out.
_________________
Being unpolitical means being political without realizing it. - Arne Babenhauserheide ( http://draketo.de )

pkgcore: So fast that it feels unreal - by doing only what is needed.
Back to top
View user's profile Send private message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Wed Oct 30, 2013 4:48 pm    Post subject: Reply with quote

XavierMiller wrote:
Hello,

Just to say I fully succeeded a script that install Gentoo from Scratch 8)
I will give first details in French, in my topic, and later, I will translate it in English. The script will be published later, when it will be complete (pre-requisites tests, automatic download of needed sources, check with some non-Gentoo live CDs as Ubuntu and LinuxFromScratch, ...)

The script I gave before to install Portage is included in my script, you can use it on any other distribution. Let's hope Portage developers will provide a configure and makefile in a next version of Portage....


w00t!! I just mentioned this on another post. I want to try it. Plz make a guide ASAP.

In other words, portage has detached itself from Gentoo into its own living form and spread to other distros from within.

XavierMiller, plz incrust portage into m$$, that'd be the ultimate frontier of gentoo.

What this does, is that only portage needs to be maintained!!

A package manager that takes over and system!! lololol.
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8720
Location: ~Brussels - Belgique

PostPosted: Wed Oct 30, 2013 6:50 pm    Post subject: Reply with quote

That exist already : gentoo prefix based on Interix (or not working : based on cygwin)
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
necrose99
n00b
n00b


Joined: 23 Apr 2014
Posts: 10
Location: United States

PostPosted: Wed Apr 23, 2014 5:13 pm    Post subject: Re: Installing portage on other distros, easier than ever Reply with quote

pure awesomeness

devsk wrote:
OK guys, after I figured that lot of people had problems regarding this, I thought a script is in order and hence a separate thread.

WARNING: I have verified each and every step in this script. I have everything in there from my own experience. Before you attempt to use it, make sure that you have a backup of the system(for weak hearted guys...:)). Have a look at the script and know what it does. Although, its not destructive in the sense that unless and until you emerge glibc straightaway, you are safe. Don't emerge glibc,gcc,binutils,baselayout. Alias emerge to something which asks for confirmation if its not "emerge -p <>". And if e.g. "emerge -p tar" tells you that its going to emerge binutils, make sure to inject binutils first. Make sure you have enough space in /(roughly at least 1GB). Just a friendly warning... :)

Here it goes:
---------------------------------------------------------------
Code:

#!/bin/bash
#
                                                                               
if [ "`id -u`" != "0" ]; then
   echo ""
   echo "Su as root and try again."
   echo ""
   exit 1
fi
                                                                               
pythonV=`python -V 2>&1`
if [ "$pythonV" \< "Python 2.2.0" ];then
   echo ""
   echo "Install python 2.2 and then try again"
   echo ""
   exit 1
fi
                                                                               
   mkdir -p /usr/lib/portage/bin
   mkdir -p /usr/lib/portage/pym
   mkdir -p /usr/portage/profiles
   mkdir -p /etc/env.d
   mkdir -p /etc/portage/profile
   mkdir -p /var/log/portage
   mkdir -p /var/tmp/portage
   mkdir -p /etc/config-archive
   mkdir -p /var/lib/init.d
   mkdir -p /var/lib/portage
     
   cd /tmp
   rm -rf portage-2.*                                                                     
   wget ftp://gentoo.mirrors.pair.com/distfiles/portage-2.0.*
   portar=`/bin/ls portage-2.0.* 2>/dev/null |sort|tail -n 1`
   if [ ! -f "${portar}" ];then
      echo ""
      echo "Mirror error. Try this script again after a while without any args".
      echo ""
      exit 1
   fi
   tar jxf ${portar}
                                                                               
   cd portage-2.*/bin
   cp * /usr/lib/portage/bin
   export PATH=/usr/lib/portage/bin:$PATH
   cd ../pym ; cp * /usr/lib/portage/pym/
   cd ../man ;cp *.1 /usr/share/man/man1 ;cp *.5 /usr/share/man/man5
   cd ../src/python-missingos
   ./setup.py install
   cd ../sandbox-1.1
   make && make install
   cd ../../cnf; cp * /etc
                                                                               
   if [ "`id portage`" == "" ]; then
      /usr/sbin/groupadd -g 250 portage
      /usr/sbin/useradd -d /var/tmp/portage -g portage -u 250 portage
   fi
                                                                               
   cd /usr/sbin
   ln -sf ../lib/portage/bin/regenworld .
   ln -sf ../lib/portage/bin/pkgmerge .
   ln -sf ../lib/portage/bin/fixpackages .
   ln -sf ../lib/portage/bin/etc-update .
   ln -sf ../lib/portage/bin/env-update .
   ln -sf ../lib/portage/bin/emerge-webrsync .
   ln -sf ../lib/portage/bin/ebuild.sh .
   ln -sf ../lib/portage/bin/ebuild .
   ln -sf ../lib/portage/bin/dispatch-conf .
   ln -sf ../lib/portage/bin/archive-conf .
                                                                               
   cd /usr/bin
   ln -sf ../lib/portage/bin/xpak .
   ln -sf ../lib/portage/bin/repoman .
   ln -sf ../lib/portage/bin/quickpkg .
   ln -sf ../lib/portage/bin/portageq .
   ln -sf ../lib/portage/bin/g-cpan.pl .
   ln -sf ../lib/portage/bin/emerge .
                   
export PATH=/usr/lib/portage/bin:$PATH                                                         
echo "CC=gcc;CXX=g++" > /etc/env.d/compilers.sh
myldpath="/lib:/usr/lib"
# before we call portage the first time, we should save our ld.so.conf
for i in $(cat /etc/ld.so.conf);do myldpath=$myldpath:$i;done
echo "LDPATH=\"${myldpath}\"" > /etc/env.d/10ldpath
. /etc/env.d/compilers.sh
emerge sync
#
# emerge sync should get /usr/portage/profiles
#
if [ -d /usr/portage/profiles/default-linux ];then
   rm -f /etc/make.profile
   ln -s /usr/portage/profiles/default-linux/x86/2004.2/gcc34 /etc/make.profile
else
   echo ""
   echo "Something wrong. Get /usr/portage/profiles dir from a working"
   echo "Gentoo system and try again."
   echo ""
   exit 1
fi
                                                                               
# inject the "dangerous" packages first.
glibcP=`emerge -p -O glibc|grep ebuild|cut -d" " -f8`
emerge inject $glibcP
gccP=`emerge -p -O gcc|grep ebuild|cut -d" " -f8`
emerge inject $gccP
binP=`emerge -p -O binutils|grep ebuild|cut -d" " -f8`
emerge inject $binP
                                                                               
# fetch the baselayout.
emerge -f -O baselayout
                                                                               
# now inject it too.
baseP=`emerge -p -O baselayout|grep ebuild|cut -d" " -f8`
emerge inject $baseP

#was inject success
ret=`emerge -p baselayout|grep "ebuild   R"`

if [ "$ret" == "" ] ;then
  echo "Inject has failed. Please verify and continue with cut & paste of rest of the steps"
  echo "ERROR."
  exit 1
fi
                                                                               
# if it fails with some errors, its fine.
emerge -O portage
                                                                               
cd /tmp
fileN=`ls /usr/portage/distfiles/rc-scripts-*|sort|tail -n1`
tar xjpf $fileN
cd rc-scripts*/sbin
cp depscan.sh /sbin; cp functions.sh /sbin
mkdir -p /lib/rcscripts/awk
cd ../src/awk
cp *.awk /lib/rcscripts/awk/
cd /etc/init.d
ln -s /sbin/depscan.sh .
ln -s /sbin/functions.sh .
                                                                               
emerge -O bison gawk

# FOLLOWING SHOULD NOT GIVE ANY ERRORS HERE. You screwed up if it did.
emerge -O portage
                                                                               
if ! fgrep -q "/etc/profile.env" /etc/profile ; then
  echo ". /etc/profile.env" >> /etc/profile
fi
                                                                               
echo ""
echo "#############################################################"
echo "You are now free to enjoy portage. Make sure you tune"
echo "/etc/make.conf and other portage configuration files to take"
echo "advantage of portage. If you screwed up, its OK. Pick yourself"
echo "up and give it another go."
echo "#############################################################"
echo ""

-----------------------------------------------------------------------------

This script is now officially tested by me and others.

Thanks.

PS:
I use the following script to prune out all packages I have marked unsafe for portage on Fedora.
-------------------------------------------------
Code:

#!/bin/bash
emerge sync
emerge -p -uD world > /tmp/world.update
for i in `cat /etc/portage/package.mask.ORG` ;
do
matching=`grep "$i" /tmp/world.update`
if [ -n "$matching" ]; then
toInject=`echo $matching|cut -d " " -f 4`;
echo "Injecting $toInject"
echo "$toInject" >> /etc/portage/profile/package.provided
fi
done
echo "# #"
echo "################# UPDATES #######################"
echo "# #"
cat /tmp/world.update

-------------------------------------------

Currently, my /etc/portage/package.mask.ORG looks like this:
--------------
Code:

sys-apps/baselayout
sys-apps/sysvinit
sys-fs/devfsd
sys-kernel/linux-headers
sys-libs/pwdb
sys-libs/pam
sys-libs/pam-login
sys-apps/kbd
sys-devel/bin86
net-misc/iputils
sys-apps/shadow
net-misc/dhcpcd
sys-apps/modutils
sys-libs/glibc
sys-apps/cronbase
x11-base/opengl-update
net-mail/mailbase
net-nds/portmap
sys-fs/e2fsprogs

-------------------

No specific reason for anything other than baselayout, glibc, gcc, binutils, I usually update these fabfour with up2date once in a while. These four you should never emerge on redhat/fedora. Remember, services are handled by different mechanisms in gentoo and other distros, so anything which has to do with services you can't really emerge because you didn't emerge baselayout and hence don't have rc-update script. you could hack around them though.

perfect for keeping xfree, gnome, multimedia kind of stuff up2date.

Good luck.

EDIT: How can I forget to thanks Crichards for floating this idea here? Thanks crichards!! please refer this thread as well:

https://forums.gentoo.org/viewtopic.php?t=28559

EDIT: mar 10, 05
existing ld.so.conf is killed by portage because it doesn't know about redhat installed stuff. Fixed this in the script.
/EDIT

EDIT: feb 21 '05
update the script for latest portage. I link /etc/make.profile with gcc34 profile, feel free to change to your taste after installing. also, I do emerge gcc,binutils now on my FC2 install, works out better. so apart from some very specific stuff like sysvinit, baselayout, glibc you can pretty emerge whole system. I did a custom nitro2 install sometime back using portage on FC2, works out fine.
/EDIT

EDIT: 03-03-2004

Somebody posted the link for rescue tars in responses, just updating it here at the top:

http://dev.gentoo.org/~carpaski/portage_rescue/

/EDIT

EDIT: Jan 22
found a much easier way to install portage on a non-gentoo system.

get the rescue tarball for your arch from here:

ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/gentoo-x86-portage/sys-apps/portage/files/

read the README.RESCUE. Untar, emerge sync and emerge portage should get you on your way!!

/EDIT
Back to top
View user's profile Send private message
Killerchronic
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2007
Posts: 91
Location: UK

PostPosted: Tue Apr 29, 2014 6:32 pm    Post subject: Re: Installing portage on other distros, easier than ever Reply with quote

necrose99 wrote:
pure awesomeness


You do realise you just quoted a post from 10 years ago?


I'm having to use debian on a few system i run now, have no choice in it, would be lovely if i could run portage in them, so much more used to it and tbh i find it actually works better than apt most of the time.
Back to top
View user's profile Send private message
axiomoixa
n00b
n00b


Joined: 19 Mar 2015
Posts: 1

PostPosted: Thu Mar 19, 2015 2:30 pm    Post subject: Reply with quote

so does the script still work after a decade?

or is there a friendlier method developed for installing Portage on non-Gentoo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3 ... 11, 12, 13
Page 13 of 13

 
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