# Installing portage on other distros, easier than ever

## devsk

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... :Smile: ). 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...  :Smile: 

Here it goes:

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

```

#!/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.

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

```

#!/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:

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

```

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!!

/EDITLast edited by devsk on Sun Sep 18, 2005 1:10 am; edited 24 times in total

----------

## devsk

Wow! Not a single response. This is a great news for gentoo! A lot has changed since jan last year. I thought lot of people didn't want to re-install linux and just wanted portage to work on their distro so they could have the best of both worlds. But I think most people have already jumped ship to gentoo(or they don't understand the beauty the portage is). And after having used the former favourite distro for a while alongwith Gentoo, I know why I shouldn't ask "why"?  :Smile: 

----------

## Khan

 *devsk wrote:*   

> Wow! Not a single response. This is a great news for gentoo! A lot has changed since jan last year. I thought lot of people didn't want to re-install linux and just wanted portage to work on their distro so they could have the best of both worlds. But I think most people have already jumped ship to gentoo(or they don't understand the beauty the portage is). And after having used the former favourite distro for a while alongwith Gentoo, I know why I shouldn't ask "why"? 

 

 I totally jumped ship from Mandrake to Gentoo. It was time to learn all I could about Linux in general and what it really takes to run this OS. While I have certainly hit a number of bumps (most notably ALSA with nForce2), these forums (especially the Documentation, Tips & Tricks one) really made a HUGE diffference in helping me overcome those areas that I wasn't sure about. Also, the installation docs are by far some of the best I have ever seen. I've pointed several of my Windows co-workers at them and even they agree that anyone can install Gentoo. Kudos to everyone here and I'm looking forward to installing the 2.6.x kernel....once Gentoo updates their documentation   :Twisted Evil: 

----------

## devsk

you might wanna look here...

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

upgrading to 2.6 is easier than it looks...I would recommend gentoo-dev-sources (instead of development-sources) mainly for acpi and bootsplash, if you are not into "patching the kernel yourself" kind of mode...

----------

## pcassidy

I'm trying to get portage up and running on a redhat 7.3 box in work(while my boss isn't looking)

I don't have access to a working gentoo machine.

Can anyone supply me with the contents of /usr/portage/profiles? I've looked around and

tried downloading some packages, but I can't find it anywhere?

Thanks,

Paul

----------

## pcassidy

Got it working,

 my version of python wasn't installed properly.  a quick re-install and emerge sync works

perfectly!!!

Thanks for the script!!

----------

## Mister Bill

rock on.

Tomorrow I'm going to install Mandrake and tell you how the script turns out.

----------

## ixion

devsk, you're a genius! I'm slowly but surely getting this going on a RedHat9 server... it's been slow-going, but I've got hopes that it will pull through... I would've just gone with Gentoo on the server if it was my decision, but it isn't so I'm trying to make admin'ing it as painless as possible..  :Smile: 

I have run into a couple problems, however. 

First, ncurses bombs during 'emerge portage':

```

cd ../obj_s;  g++ -I../c++ -I../include -I. -DHAVE_CONFIG_H  -DNDEBUG -D_GNU_SOURCE -I. -I../include -O2 -mcpu=i686 -pipe -fPIC -c ../c++/cursesf.cc

/bin/sh: line 1: g++: command not found

make[1]: *** [../obj_s/cursesf.o] Error 127

make[1]: Leaving directory `/var/tmp/portage/ncurses-5.3-r5/work/ncurses-5.3/c++'

make: *** [all] Error 2

!!! ERROR: sys-libs/ncurses-5.3-r5 failed.

!!! Function src_compile, Line 58, Exitcode 2

!!! make failed

```

I've tried copying over 'g++' from my gentoo laptop (which runs a different version of gcc (3.2.3-r3) and that didn't work. I even symlinked g++ to gcc (version 3.3.2) on the RH system, but that didn't work either. I installed GCC on the Red Hat system via rpm.. How should I properly get 'g++' working? Not being a good programmer, I don't know what to do..:-/

----------

## devsk

you would need package "gcc-c++". if you are gcc 3.3.2, then 

http://mirrors.kernel.org/fedora/core/1/i386/os/Fedora/RPMS/gcc-c++-3.3.2-1.i386.rpm

would need to be downloaded and installed.

your redhat CD will have the compatible "gcc-c++" RPM if you are not updated to the latest...

----------

## russryder

I'm about to put a fresh install of fedora on my machine.  Gentoo just won't play well with my mn31n nforce2 mobo, and my co-worker has fedora running well on his, so I'll going to try to get the portage working on it.  I'll post my results when I'm finished.

----------

## jago25_98

can't connect to [url]ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/gentoo-x86-portage/sys-apps/portage/files/ [/url] anymore.

 Got an alternative?

----------

## devsk

plenty of them:

http://www.gentoo.org/main/en/mirrors.xml

----------

## jago25_98

ah, but uk one doesn't have

[url]gentoo-x86-portage/sys-apps/portage/files/[/url]

----------

## devsk

I think you are left with the script. they have removed the x86 rescue tar(very naughty of them)...at least I couldn't find it...you can still give the script a run!!

----------

## axxackall

Does anyone know what's happened to portage in cygwin? Is the project still alive?

----------

## mt2

I was wondering if anyone was able to get this to work. I can't find the portage-rescuse anywhere...

Thanks!

----------

## Mister Bill

So, are there any packages that would be considered "unsafe" on Slackware (other than the fab-four, of course).

----------

## devsk

not used slackware, so no idea. In general, anything that changes stuff with boot and login should be emerged with great care.

----------

## merkaba

i've tried this on a redhat 8.0 install. 

it seems to work for the most part. 

i didn't run the script directly, just typed out each command in the script one by one to make sure everything worked. a couple of points to note:

- the newest portage is portage-2.0.50-r1.tar.bz2

- useradd fails with the -G option because the group is already created in the previous step. using -g instead works.

- `emerge -p glibc|grep ebuild|cut -d" " -f8` includes all of the dependencies of glibc including gcc and binutils so there's no need to inject them seperately.

- a couple extra symlinks are needed to get rid of some errors during emerges:

cd /etc/init.d

ln -s /sbin/depscan.sh .

ln -s /sbin/functions.sh .

----------

## devsk

thanks for the comments. I have updated the script with those.

----------

## raid517

Hi I love portage and I have been trying to get this script to work on a Slackware 9.1 install (mainly because I simply don't have the time to invest 72 hours+ to get Gentoo up and running - I've done it about 8 times already and I think that's enough to show how capable I am). However Slackware just does not have the same range of sofware that Gentoo has.

The main problem when I run this script is that - well to be honest it doesn't work: Here is the way I have laid it out and also the output I got after running it. (I had to move most of it over to the left to line up with the command prompt - as the html formatting above seems to have knocked it out of line - or to put it another way it just wouldn't run at all like that.

Here is what I did and the ouput I got:

```
#!/bin/bash 

# 

# call with one argument "again" or call it with no arguments at all 

# call it with no arguments first time. 

# call it again with "again" to bypass some operations. 

# 

                                                                                 

if [ "$#" == "1" ];then 

again=$1 

else 

again="" 

fi 

                                                                                 

if [ "`id -u`" != "0" ]; then 

echo "" 

echo "Su as root and try again." 

echo "" 

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 

                                                                                 

if [ "$again" == "" ];then 

mkdir -p /usr/lib/portage/bin 

mkdir -p /usr/portage/profiles 

mkdir /etc/env.d 

                                                                                 

wget ftp://gentoo.mirrors.pair.com/distfiles/portage-2.0.50-r1.tar.bz2 -O /tmp/portage-2.0.50-r1.tar.bz2 

cd /tmp 

if [ ! -f portage-2.0.50-r1.tar.bz2 ];then 

echo "" 

echo "Mirror error. Try this script again after a while without any args". 

echo "" 

exit 1 

fi 

tar jxf portage-2.0.50-r1.tar.bz2 

                                                                                 

cd portage-2.0.50-r1/bin 

cp * /usr/lib/portage/bin 

export PATH=/usr/lib/portage/bin:$PATH 

cd ../pym ; cp * /usr/lib/python2.2/site-packages 

cd ../man ;cp *.1 /usr/man/man1 ;cp *.5 /usr/man/man5 

cd ../src/python-missingos 

./setup.py install 

cd ../sandbox-1.1 

make && make install 

cd ../../cnf; cp * /etc 

                                                                                 

if [ "`id portage`" == "" ]; then 

groupadd -g 250 portage 

useradd -d /var/tmp/portage -g portage -u 250 portage 

fi 

                                                                                 

cd /usr/sbin 

ln -s ../lib/portage/bin/regenworld . 

ln -s ../lib/portage/bin/pkgmerge . 

ln -s ../lib/portage/bin/fixpackages . 

ln -s ../lib/portage/bin/etc-update . 

ln -s ../lib/portage/bin/env-update . 

ln -s ../lib/portage/bin/emerge-webrsync . 

ln -s ../lib/portage/bin/ebuild.sh . 

ln -s ../lib/portage/bin/ebuild . 

ln -s ../lib/portage/bin/dispatch-conf . 

ln -s ../lib/portage/bin/archive-conf . 

                                                                                 

cd /usr/bin 

ln -s ../lib/portage/bin/xpak . 

ln -s ../lib/portage/bin/repoman . 

ln -s ../lib/portage/bin/quickpkg . 

ln -s ../lib/portage/bin/portageq . 

ln -s ../lib/portage/bin/g-cpan.pl . 

    

ln -s ../lib/portage/bin/emerge . 

fi 

export PATH=/usr/lib/portage/bin:$PATH                                                          

echo "CC=gcc;CXX=g++" > /etc/env.d/compilers.sh 

echo "LDPATH=\"/lib:/usr/lib:/usr/local/lib:/usr/X11R6/lib:/usr/kerberos/lib\"" > /etc/env.d/10ldpath 

. /etc/env.d/compilers.sh 

emerge sync 

# 

# emerge sync should get /usr/portage/profiles 

# 

if [ -d /usr/portage/profiles/default-x86-1.4 ];then 

ln -s /usr/portage/profiles/default-x86-1.4 /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 portage 

                                                                                 

cd /tmp 

cp /usr/portage/distfiles/rc-scripts*.tar.bz2 . 

tar xjpf rc-scripts*.tar.bz2 

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 gawk 

 

# FOLLOWING SHOULD NOT GIVE ANY ERRORS HERE. You screwed up if it did. 

emerge 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 ""
```

```
bash-2.05b# ./Portage.sh

./Portage.sh: line 7:  : command not found

./Portage.sh: line 13:  : command not found

./Portage.sh: line 19:  : command not found

./Portage.sh: line 27:  : command not found

mkdir: cannot create directory `/etc/env.d': File exists

./Portage.sh: line 32:  : command not found

--10:26:13--  ftp://gentoo.mirrors.pair.com/distfiles/portage-2.0.50-r1.tar.bz2

           => `/tmp/portage-2.0.50-r1.tar.bz2'

Resolving gentoo.mirrors.pair.com... done.

Connecting to gentoo.mirrors.pair.com[216.92.2.140]:21... connected.

Logging in as anonymous ... Logged in!

==> SYST ... done.    ==> PWD ... done.

==> TYPE I ... done.  ==> CWD /distfiles ... done.

==> PORT ... done.    ==> RETR portage-2.0.50-r1.tar.bz2 ... done.

Length: 222,535 (unauthoritative)

100%[====================================>] 222,535       43.85K/s    ETA 00:00

10:26:19 (43.85 KB/s) - `/tmp/portage-2.0.50-r1.tar.bz2' saved [222535]

./Portage.sh: line 42:  : command not found

cp: omitting directory `functions'

cp: copying multiple files, but last argument `/usr/lib/python2.2/site-packages' is not a directory

Try `cp --help' for more information.

/usr/bin/env: python2.2: No such file or directory

make: Nothing to be done for `all'.

install -d -m 0755 /lib

install -d -m 0755 /usr/lib/portage/bin

install -d -m 0755 /usr/lib/portage/lib

install -m 0755 libsandbox.so /lib

install -m 0755 sandbox /usr/lib/portage/bin

install -m 0644 sandbox.bashrc /usr/lib/portage/lib

./Portage.sh: line 53:  : command not found

./Portage.sh: line 58:  : command not found

ln: `./regenworld': File exists

ln: `./pkgmerge': File exists

ln: `./fixpackages': File exists

ln: `./etc-update': File exists

ln: `./env-update': File exists

ln: `./emerge-webrsync': File exists

ln: `./ebuild.sh': File exists

ln: `./ebuild': File exists

ln: `./dispatch-conf': File exists

ln: `./archive-conf': File exists

./Portage.sh: line 70:  : command not found

ln: `./xpak': File exists

ln: `./repoman': File exists

ln: `./quickpkg': File exists

ln: `./portageq': File exists

ln: `./g-cpan.pl': File exists

./Portage.sh: line 77:  : command not found

ln: `./emerge': File exists

./Portage.sh: line 80:  : command not found

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

./Portage.sh: line 81: export: ` ': not a valid identifier

Traceback (most recent call last):

  File "/usr/lib/portage/bin/emerge", line 10, in ?

    import emergehelp,xpak,string,re,commands,time,shutil,traceback,atexit,signal,socket,types

  File "/usr/lib/portage/bin/emergehelp.py", line 7, in ?

    from output import *

ImportError: No module named output

Something wrong. Get /usr/portage/profiles dir from a working

Gentoo system and try again.

bash-2.05b#
```

I checked and /usr/portage/profiles is there - but what would be the point of getting one from a working portage install just to copy it? I mean if I did that I would need to install Gentoo - and if I did this, why wouldn't I just keep it?

Any help anyone can offer would be very much appreciated, I was really  hoping that someone would come up with a working script to do this some day.

GJ

----------

## devsk

all "if" statements have failed with "command not found"....shell 'export' fails...that's old 'sh' behaviour, not bash behaviour. Try save the script as Portage (w/o .sh) and then run it, make sure /bin/bash is not pointing to /bin/sh (older sh) and BASH_ENV is set to some sane script.

that copy to python2.2/site-packages is not required for portage 2.0.50, I will remove it from the script. simply cut and paste the script again. it works without any editing/identation/editing required.

----------

## raid517

Thanks for fixing your script.  :Smile:  I'll give it another go.

GJ

----------

## merkaba

portage rescue files are still available here:

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

the link is in the README.RESCUE

----------

## raid517

Erm how do you use it? I got it but I'm still getting the same errors got after running the script.

GJ

----------

## raid517

Rats, it still doesn't work.

I removed the .sh extension and here is the output I got:

```
bash-2.05b# ./Portage

./Portage: line 7:  : command not found

./Portage: line 11:  : command not found

./Portage: line 13:  : command not found

./Portage: line 19:  : command not found

./Portage: line 27:  : command not found

./Portage: line 36: syntax error near unexpected token `then'

./Portage: line 36: `    if [ ! -f portage-2.0.50-r1.tar.bz2 ];then '

bash-2.05b#
```

I guess there is a good reason for this - probably because I didn't understand the other stuff you wrote. (Hey kill me if you want - but I admit I'm not a programmer).

I just want to learn how to do it this once - and if I get it going no matter what distro I am using, I think I will always use Portage.

GJ

----------

## devsk

it is the bash/sh compatibility issue. A statement like

```
if [ "again" == "again" ]; then

echo "DONE"

fi
```

will execute under bash but not under standard sh. 

does the above code cut and pasted directly into a shell, execute? now cut and paste the same thing into a file and execute the file like "/bin/bash -c <filename>", post the results. post the output of "echo $SHELL" as well.

----------

## raid517

Yes it executes cleanly. Here is the output:

```
root@raid517:~# if [ "again" == "again" ]; then

>  echo "DONE"

>  fi

DONE

root@raid517:~# ./Test

DONE

root@raid517:~#
```

Thanks for helping out like this BTW.

GJ

----------

## devsk

cut and paste the script from page 1 (only select green text) again into a new file, 

```
chmod +x <filename>
```

 and without any editing, do a 

```
/bin/bash -c <filename>
```

post the file back here as well, so I can cut and paste it and test it. this is bizzare...

----------

## raid517

As requested - I simply renamed the file test2 - since my last test was test1.

```
bash-2.05b# chmod +x test2

bash-2.05b# /bin/bash -c test2

/bin/bash: line 1: test2: command not found

bash-2.05b# /bin/bash -c test2
```

```
#!/bin/bash 

 # 

 # call with one argument "again" or call it with no arguments at all 

 # call it with no arguments first time. 

 # call it again with "again" to bypass some operations. 

 # 

                                                                                 

 if [ "$#" == "1" ];then 

    again=$1 

 else 

    again="" 

 fi 

                                                                                 

 if [ "`id -u`" != "0" ]; then 

    echo "" 

    echo "Su as root and try again." 

    echo "" 

 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 

                                                                                 

 if [ "$again" == "" ];then 

    mkdir -p /usr/lib/portage/bin 

    mkdir -p /usr/lib/portage/pym 

    mkdir -p /usr/portage/profiles 

    mkdir /etc/env.d 

                                                                                 

    wget ftp://gentoo.mirrors.pair.com/distfiles/portage-2.0.50-r1.tar.bz2 -O /tmp/portage-2.0.50-r1.tar.bz2 

    cd /tmp 

    if [ ! -f portage-2.0.50-r1.tar.bz2 ];then 

       echo "" 

       echo "Mirror error. Try this script again after a while without any args". 

       echo "" 

       exit 1 

    fi 

    tar jxf portage-2.0.50-r1.tar.bz2 

                                                                                 

    cd portage-2.0.50-r1/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/man/man1 ;cp *.5 /usr/man/man5 

    cd ../src/python-missingos 

    ./setup.py install 

    cd ../sandbox-1.1 

    make && make install 

    cd ../../cnf; cp * /etc 

                                                                                 

    if [ "`id portage`" == "" ]; then 

       groupadd -g 250 portage 

       useradd -d /var/tmp/portage -g portage -u 250 portage 

    fi 

                                                                                 

    cd /usr/sbin 

    ln -s ../lib/portage/bin/regenworld . 

    ln -s ../lib/portage/bin/pkgmerge . 

    ln -s ../lib/portage/bin/fixpackages . 

    ln -s ../lib/portage/bin/etc-update . 

    ln -s ../lib/portage/bin/env-update . 

    ln -s ../lib/portage/bin/emerge-webrsync . 

    ln -s ../lib/portage/bin/ebuild.sh . 

    ln -s ../lib/portage/bin/ebuild . 

    ln -s ../lib/portage/bin/dispatch-conf . 

    ln -s ../lib/portage/bin/archive-conf . 

                                                                                 

    cd /usr/bin 

    ln -s ../lib/portage/bin/xpak . 

    ln -s ../lib/portage/bin/repoman . 

    ln -s ../lib/portage/bin/quickpkg . 

    ln -s ../lib/portage/bin/portageq . 

    ln -s ../lib/portage/bin/g-cpan.pl . 

    ln -s ../lib/portage/bin/emerge . 

 fi 

                     

 export PATH=/usr/lib/portage/bin:$PATH                                                          

 echo "CC=gcc;CXX=g++" > /etc/env.d/compilers.sh 

 echo "LDPATH=\"/lib:/usr/lib:/usr/local/lib:/usr/X11R6/lib:/usr/kerberos/lib\"" > /etc/env.d/10ldpath 

 . /etc/env.d/compilers.sh 

 emerge sync 

 # 

 # emerge sync should get /usr/portage/profiles 

 # 

 if [ -d /usr/portage/profiles/default-x86-1.4 ];then 

    ln -s /usr/portage/profiles/default-x86-1.4 /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 portage 

                                                                                 

 cd /tmp 

 cp /usr/portage/distfiles/rc-scripts*.tar.bz2 . 

 tar xjpf rc-scripts*.tar.bz2 

 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 gawk 

 

 # FOLLOWING SHOULD NOT GIVE ANY ERRORS HERE. You screwed up if it did. 

 emerge 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 ""
```

----------

## devsk

"." is not in PATH, either add that or run like this 

```
/bin/bash -c ./test2
```

----------

## raid517

Dude I will do it tomorrow I promise. It's too late now. But I really do hope you check back. I mean once I get this done - like I said it doesn't matter what distro I use any more - I will always be able to run portage.

I wish there was just some kind of standard Gentoo install I could use like a stage 5 or 6 with full GUI etc so I wouldn't need to do stuff like this. Oh well I guess people have been asking for this for a long time.

There hasn't been much movement unfortunately.

GJ

----------

## raid517

Ok man.... I did what you said and:

```
bash-2.05b# /bin/bash -c ./test2

./test2: line 7:  : command not found

./test2: line 11:  : command not found

./test2: line 13:  : command not found

./test2: line 19:  : command not found

./test2: line 27:  : command not found

./test2: line 36: syntax error near unexpected token `then'

./test2: line 36: `    if [ ! -f portage-2.0.50-r1.tar.bz2 ];then '

bash-2.05b#
```

I don't know what you mean that I should add "." to my path.

How exactly should I do that?

GJ

----------

## devsk

```
cd /bin

ls -al sh bash

echo $SHELL
```

post output...

----------

## raid517

```
root@raid517:~# cd /bin

root@raid517:/bin# ls -al sh bash

-rwxr-xr-x    1 root     bin        628640 Jun 24  2003 bash

lrwxrwxrwx    1 root     root            4 Mar  3 08:27 sh -> bash

root@raid517:/bin# echo $SHELL

/bin/bash

root@raid517:/bin#
```

GJ

----------

## devsk

I don't know how slackware builds its bash, but one thing is for sure: either the text contains garbage (which editor are you using?) or the installed bash is screwed up, because same text runs fine on my machine. 

From the errors, with the bash you have, you won't be able to use portage even if you could get it installed somehow because ebuild.sh (a shell script which portage uses to build packages) uses the same syntax and it will fail with similar "command not found" errors.

I think I am running out of ideas here...may be somebody who knows bash on slackware better, might comment here.

try to find out what options did the slackware install the bash with...post output of:

```
/bin/bash +O
```

----------

## raid517

```
root@raid517:~# /bin/bash +O

shopt -u cdable_vars

shopt -u cdspell

shopt -u checkhash

shopt -u checkwinsize

shopt -s cmdhist

shopt -u dotglob

shopt -u execfail

shopt -u expand_aliases

shopt -u extglob

shopt -u histreedit

shopt -u histappend

shopt -u histverify

shopt -s hostcomplete

shopt -u huponexit

shopt -s interactive_comments

shopt -u lithist

shopt -u login_shell

shopt -u mailwarn

shopt -u no_empty_cmd_completion

shopt -u nocaseglob

shopt -u nullglob

shopt -s progcomp

shopt -s promptvars

shopt -u restricted_shell

shopt -u shift_verbose

shopt -s sourcepath

shopt -u xpg_echo

root@raid517:~#
```

I'm considering moving to Mandrake 10 as soon as possible anyway. I just thought learning how to do this now would help later.

My favoite editor of choice is nano - which is a very simple non-gui text editor I grew used to when I was a regular gentoo user. Either that or emacs - which is a bit bulky comared to nano.

But for cut and paste this time I used emacs.

I could try something else if you think it would help?

GJ

----------

## devsk

If we ever solve this, it would be the bizzarest problem I would have ever seen solved...

your shell opts are same as mine.

if you open the file in "vi", do you see ^M or any other garbage...

try cut &paste into a new file in "vi".

----------

## raid517

Ahh NM I just copied and pasted the text into a conole using nano and it executed cleanly.

Sor we are all sorted now, the only thing is I got a warning message about:

```
!!! /etc/make.profile is not a symlink and will probably prevent most merges.

!!! It should point into a profile within /usr/portage/profiles/

!!! (You can safely ignore this message when syncing. It's harmless.)
```

I guess then because I am merging for the first time (or at least the script does this?) that I can safely ignore this?

Also it keeps crapping out during emerge sync with:

```
!!! /etc/make.profile is not a symlink and will probably prevent most merges.

!!! It should point into a profile within /usr/portage/profiles/

!!! (You can safely ignore this message when syncing. It's harmless.)-
```

Any clues how I can over come this?

It seems i can't do anything until i get it to merge.

GJ

----------

## devsk

I have no idea why this line didn't execute when you executed the script, but anyway , do this manually:

```
ln -s /usr/portage/profiles/default-x86-1.4 /etc/make.profile
```

let me know if you are able to, let's say, 'emerge grep' after this.

----------

## raid517

```
If at first you don't succeed, redefine success.

root@raid517:~# ln -s /usr/portage/profiles/default-x86-1.4 /etc/make.profile

root@raid517
```

Success!

But...

```
root@raid517:~# emerge grep

Calculating dependencies ...done!

>>> emerge (1 of 2) sys-devel/libtool-1.4.3-r4 to /

>>> md5 src_uri ;-) libtool-1.4.3.tar.gz

>>> md5 src_uri ;-) libtool-1.3.5.tar.gz

>>> Unpacking source...

>>> Unpacking libtool-1.4.3.tar.gz to /var/tmp/portage/libtool-1.4.3-r4/work

>>> Unpacking libtool-1.3.5.tar.gz to /var/tmp/portage/libtool-1.4.3-r4/work

/usr/sbin/ebuild.sh: line 64: einfo: command not found

/usr/sbin/ebuild.sh: line 238: einfo: command not found

/usr/sbin/ebuild.sh: line 327: eend: command not found

/usr/sbin/ebuild.sh: line 238: einfo: command not found

/usr/sbin/ebuild.sh: line 327: eend: command not found

/usr/sbin/ebuild.sh: line 238: einfo: command not found

/usr/sbin/ebuild.sh: line 327: eend: command not found

/usr/sbin/ebuild.sh: line 83: einfo: command not found

/usr/sbin/ebuild.sh: line 238: einfo: command not found

/usr/sbin/ebuild.sh: line 327: eend: command not found

/usr/sbin/ebuild.sh: line 238: einfo: command not found

/usr/sbin/ebuild.sh: line 327: eend: command not found

/usr/sbin/ebuild.sh: line 238: einfo: command not found

/usr/sbin/ebuild.sh: line 327: eend: command not found

/usr/sbin/ebuild.sh: line 238: einfo: command not found

/usr/sbin/ebuild.sh: line 327: eend: command not found

/usr/sbin/ebuild.sh: line 238: einfo: command not found

/usr/sbin/ebuild.sh: line 327: eend: command not found

/usr/sbin/ebuild.sh: line 238: einfo: command not found

/usr/sbin/ebuild.sh: line 327: eend: command not found

/usr/sbin/ebuild.sh: line 238: einfo: command not found

/usr/sbin/ebuild.sh: line 327: eend: command not found

/usr/sbin/ebuild.sh: line 238: einfo: command not found

/usr/sbin/ebuild.sh: line 327: eend: command not found

/usr/sbin/ebuild.sh: line 238: einfo: command not found

/usr/sbin/ebuild.sh: line 327: eend: command not found

/usr/sbin/ebuild.sh: line 238: einfo: command not found

/usr/sbin/ebuild.sh: line 327: eend: command not found

/usr/sbin/ebuild.sh: line 238: einfo: command not found

/usr/sbin/ebuild.sh: line 327: eend: command not found

/usr/sbin/ebuild.sh: line 238: einfo: command not found

/usr/sbin/ebuild.sh: line 327: eend: command not found

/usr/sbin/ebuild.sh: line 238: einfo: command not found

/usr/sbin/ebuild.sh: line 327: eend: command not found

/usr/sbin/ebuild.sh: line 238: einfo: command not found

/usr/sbin/ebuild.sh: line 327: eend: command not found

/usr/sbin/ebuild.sh: line 238: einfo: command not found

/usr/sbin/ebuild.sh: line 327: eend: command not found

/usr/sbin/ebuild.sh: line 238: einfo: command not found

/usr/sbin/ebuild.sh: line 327: eend: command not found

/usr/sbin/ebuild.sh: line 118: einfo: command not found

>>> Source unpacked.

/usr/sbin/ebuild.sh: line 134: einfo: command not found

creating cache ./config.cache

checking for a BSD compatible install... /usr/bin/ginstall -c

checking whether build environment is sane... yes

checking whether make sets ${MAKE}... yes

checking for working aclocal... found

checking for working autoconf... found

checking for working automake... found

checking for working autoheader... found

checking for working makeinfo... found

checking for gcc... gcc

checking whether the C compiler (gcc -O2 -mcpu=i686 -pipe ) works... yes

checking whether the C compiler (gcc -O2 -mcpu=i686 -pipe ) is a cross-compiler... no

checking whether we are using GNU C... yes

checking whether gcc accepts -g... yes

checking for ranlib... ranlib

checking host system type... i686-pc-linux-gnu

checking build system type... i686-pc-linux-gnu

checking for ld used by GCC... /usr/i486-slackware-linux/bin/ld

checking if the linker (/usr/i486-slackware-linux/bin/ld) is GNU ld... yes

checking for BSD-compatible nm... /usr/bin/nm -B

checking whether ln -s works... yes

checking for mawk... no

checking for gawk... gawk

updating cache ./config.cache

creating ./config.status

creating Makefile

creating doc/Makefile

creating tests/Makefile

configuring in libltdl

running /bin/sh ./configure  --host=i686-pc-linux-gnu --prefix=/usr --infodir=/usr/share/info --enable-ltdl-install --cache-file=.././config.cache --srcdir=.

loading cache .././config.cache

checking for a BSD compatible install... (cached) /usr/bin/ginstall -c

checking whether build environment is sane... yes

checking whether make sets ${MAKE}... (cached) yes

checking for working aclocal... found

checking for working autoconf... found

checking for working automake... found

checking for working autoheader... found

checking for working makeinfo... found

checking whether to enable maintainer-specific portions of Makefiles... no

checking for gcc... (cached) gcc

checking whether the C compiler (gcc -O2 -mcpu=i686 -pipe ) works... yes

checking whether the C compiler (gcc -O2 -mcpu=i686 -pipe ) is a cross-compiler... no

checking whether we are using GNU C... (cached) yes

checking whether gcc accepts -g... (cached) yes

checking for working const... yes

checking for inline... inline

checking host system type... i686-pc-linux-gnu

checking build system type... i686-pc-linux-gnu

checking for ranlib... (cached) ranlib

checking for ld used by GCC... (cached) /usr/i486-slackware-linux/bin/ld

checking if the linker (/usr/i486-slackware-linux/bin/ld) is GNU ld... (cached) yes

checking for BSD-compatible nm... (cached) /usr/bin/nm -B

checking whether ln -s works... (cached) yes

updating cache .././config.cache

loading cache .././config.cache within ltconfig

checking for object suffix... o

checking for executable suffix... no

checking for gcc option to produce PIC... -fPIC

checking if gcc PIC flag -fPIC works... yes

checking if gcc supports -c -o file.o... yes

checking if gcc supports -c -o file.lo... yes

checking if gcc supports -fno-rtti -fno-exceptions ... yes

checking if gcc static flag -static works... -static

checking if the linker (/usr/i486-slackware-linux/bin/ld) is GNU ld... yes

checking whether the linker (/usr/i486-slackware-linux/bin/ld) supports shared libraries... yes

checking command to parse /usr/bin/nm -B output... ok

checking how to hardcode library paths into programs... immediate

checking for /usr/i486-slackware-linux/bin/ld option to reload object files... -r

checking dynamic linker characteristics... Linux ld.so

checking if libtool supports shared libraries... yes

checking whether to build shared libraries... yes

checking whether to build static libraries... yes

checking for objdir... .libs

creating libtool

updating cache .././config.cache

loading cache .././config.cache

checking which extension is used for shared libraries... .so

checking which variable specifies run-time library path... LD_LIBRARY_PATH

checking for objdir... .libs

checking how to run the C preprocessor... gcc -E

checking for ANSI C header files... yes

checking for malloc.h... yes

checking for memory.h... yes

checking for stdlib.h... yes

checking for stdio.h... yes

checking for ctype.h... yes

checking for dlfcn.h... yes

checking for dl.h... no

checking for dld.h... no

checking for string.h... yes

checking for strchr... yes

checking for strrchr... yes

checking whether libtool supports -dlopen/-dlpreopen... yes

checking for dlopen in -ldl... yes

checking for shl_load... no

checking for shl_load in -ldld... no

checking for dld_link in -ldld... no

checking for dlerror... yes

checking command to parse /usr/bin/nm -B output... yes

checking for _ prefix in compiled symbols... (cached) no

updating cache .././config.cache

creating ./config.status

creating Makefile

creating config.h

/usr/sbin/ebuild.sh: line 139: einfo: command not found

rm -f acinclude.m4

cp ./libtool.m4 acinclude.m4

cd . && aclocal

cd . && automake --gnu --include-deps Makefile

cd . && autoconf

/bin/sh ./config.status --recheck

running /bin/sh ./configure  --host=i686-pc-linux-gnu --prefix=/usr --infodir=/usr/share/info --enable-ltdl-install --no-create --no-recursion

configure: WARNING: If you wanted to set the --build type, don't use --host.

    If a cross compiler is detected then cross compile mode will be used.

checking for a BSD-compatible install... /usr/bin/ginstall -c

checking whether build environment is sane... autom4te: cannot not rename autom4te.cache/traces.0t as autom4te.cache/traces.0: No such file or directory

configure.in: no proper invocation of AM_INIT_AUTOMAKE was found.

configure.in: You should verify that configure.in invokes AM_INIT_AUTOMAKE,

configure.in: that aclocal.m4 is present in the top-level directory,

configure.in: and that aclocal.m4 was recently regenerated (using aclocal).

Makefile.am:26: `aclocal_DATA' is used but `aclocaldir' is undefined

DIST_SUBDIRS: variable `CONF_SUBDIRS' is used but `CONF_SUBDIRS' is undefined

make: *** [Makefile.in] Error 1

make: *** Waiting for unfinished jobs....

yes

/var/tmp/portage/libtool-1.4.3-r4/work/libtool-1.3.5/missing: Unknown `--run' option

Try `/var/tmp/portage/libtool-1.4.3-r4/work/libtool-1.3.5/missing --help' for more information

configure: WARNING: `missing' script is too old or missing

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking for i686-pc-linux-gnu-strip... no

checking for strip... strip

checking for i686-pc-linux-gnu-gcc... no

checking for gcc... gcc

checking for C compiler default output... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables...

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ANSI C... none needed

checking for style of include used by make... GNU

checking dependency style of gcc... none

checking for i686-pc-linux-gnu-ranlib... no

checking for ranlib... ranlib

checking build system type... i686-pc-linux-gnu

checking host system type... i686-pc-linux-gnu

checking for ld used by GCC... /usr/i486-slackware-linux/bin/ld

checking if the linker (/usr/i486-slackware-linux/bin/ld) is GNU ld... yes

checking for BSD-compatible nm... /usr/bin/nm -B

checking whether ln -s works... yes

checking for gawk... (cached) gawk

configure: creating ./config.status

!!! ERROR: sys-devel/libtool-1.4.3-r4 failed.

!!! Function src_compile, Line 140, Exitcode 2

!!! (no error message)
```

So unfortunately not. It can't get passed this libtool bug.

It also complains about a lot of command not found errors too.

I've left the funny random Slackware console messages in, as it seems kinda appropriate on this occasion lol.

Any suggestions?

GJ

----------

## devsk

I don't think you executed the script fully...what message did you see after the you ran it?

from "einfo: command not found", this was also not executed:

```
cd /etc/init.d

ln -s /sbin/depscan.sh .

ln -s /sbin/functions.sh .
```

you will have to look at the script and the output of the so called "successful" run and see what all it did and what it didn't. may be just execute those steps manually one by one...

----------

## raid517

Well for some reason my init.d file in Slackware got deleted. I'm not sure how - it was there before I started messing with portage. But anyway I restored it from a back up and ran the script again - so both those shortcuts are now there. Unfortunately it is still borking on libtools. Moreover an awful lot of stuff I would like to get from portage (KDE 3.2, Mozilla 1.6 and many others) all seem to depend very heavily on this libtools package.

I know from my experiences with Gentoo in the past that portage can get stuck like this on certain packages - but it is odd that is should happen so early - and specifically as a part of the process of installing and updating portage itself.

Maybe its about use flags? Do I need and specific flags set to use libtools?

GJ

----------

## devsk

there are packages(gcc, glibc, binutils, baselayout) you should never emerge and should have them injected. make sure you read the first post in this thread carefully.

post your libtool errors...gentoo has a certain way of doing automake/autoconf whereby it points automake executable to shell script which calls 1.4 version by default and expects WANT_AUTOMAKE environment variable set if you want to use 1.78 or later. ||ly for autoconf. so, its not a bug.

you should emerge m4, automake, autoconf and libtool before you start using portage full time. REMEMBER THAT ITS GOING TO OVERWRITE your existing auto* tools, so make up your mind about proceeding with portage all the way.

post output of "emerge zlib"...that should be safest to do w/o any changes.

----------

## raid517

Well just to be clear portage began downloading and updating a bumch of stuff while the script was running - so I had no control over whether to use it or not. I understand what you said about setting up exclusions - but I wonder if any harm was caused because portage downloaded a bunch of stuff during the install process anyway? Is it perhaps possible to set up your script so that it automatically set exclusions on files for non gentoo distributions that probably should never be updated by portage?

In any case I am still stuck on the part of the script where - without my intervention - it and/or portage attempts to download and install libtools.

As requested here is the output:

```
:~# emerge libtool

Calculating dependencies ...done!

>>> emerge (1 of 1) sys-devel/libtool-1.4.3-r4 to /

>>> md5 src_uri ;-) libtool-1.4.3.tar.gz

>>> md5 src_uri ;-) libtool-1.3.5.tar.gz

>>> Unpacking source...

>>> Unpacking libtool-1.4.3.tar.gz to /var/tmp/portage/libtool-1.4.3-r4/work

>>> Unpacking libtool-1.3.5.tar.gz to /var/tmp/portage/libtool-1.4.3-r4/work

 * Patching libtool-1.3.5 ...

 * Applying libtool-1.2f-cache.patch...                                   [ ok ]

 * Applying libtool-1.3.5-nonneg.patch...                                 [ ok ]

 * Applying libtool-1.3.5-mktemp.patch...                                 [ ok ]

 * Patching libtool-1.4.3 ...

 * Applying libtool-1.3.5-mktemp.patch...                                 [ ok ]

 * Applying libtool-1.4-nonneg.patch...                                   [ ok ]

 * Applying libtool-1.4.2-s390_x86_64.patch...                            [ ok ]

 * Applying libtool-1.4.2-relink-58664.patch...                           [ ok ]

 * Applying libtool-1.4.2-multilib.patch...                               [ ok ]

 * Applying libtool-1.4.2-demo.patch...                                   [ ok ]

 * Applying libtool-1.4.3-quotes.patch...                                 [ ok ]

 * Applying libtool-1.4.3-lib64.patch...                                  [ ok ]

 * Applying libtool-1.4.2-add-x11r6-lib-in-ignores-for-rpath.patch...     [ ok ]

 * Applying libtool-1.4.2-archive-shared.patch...                         [ ok ]

 * Applying libtool-1.4.3-ltmain-SED.patch...                             [ ok ]

 * Applying libtool-1.4.2-expsym-linux.patch...                           [ ok ]

 * Applying libtool-1.4.3-amd64-alias.patch...                            [ ok ]

 * Applying libtool-1.4.3-libtoolize--config-only.patch...                [ ok ]

 * Applying libtool-1.4.3-pass-thread-flags.patch...                      [ ok ]

 * Applying libtool-1.4.2-portage.patch...                                [ ok ]

 * Generate ltmain.sh ...

>>> Source unpacked.

 * Configuring libtool-1.3.5 ...

creating cache ./config.cache

checking for a BSD compatible install... /usr/bin/ginstall -c

checking whether build environment is sane... yes

checking whether make sets ${MAKE}... yes

checking for working aclocal... found

checking for working autoconf... found

checking for working automake... found

checking for working autoheader... found

checking for working makeinfo... found

checking for gcc... gcc

checking whether the C compiler (gcc -march=athlon-xp -O3 -pipe ) works... yes

checking whether the C compiler (gcc -march=athlon-xp -O3 -pipe ) is a cross-compiler... no

checking whether we are using GNU C... yes

checking whether gcc accepts -g... yes

checking for ranlib... ranlib

checking host system type... i686-pc-linux-gnu

checking build system type... i686-pc-linux-gnu

checking for ld used by GCC... /usr/i486-slackware-linux/bin/ld

checking if the linker (/usr/i486-slackware-linux/bin/ld) is GNU ld... yes

checking for BSD-compatible nm... /usr/bin/nm -B

checking whether ln -s works... yes

checking for mawk... mawk

updating cache ./config.cache

creating ./config.status

creating Makefile

creating doc/Makefile

creating tests/Makefile

configuring in libltdl

running /bin/sh ./configure  --host=i686-pc-linux-gnu --prefix=/usr --infodir=/usr/share/info --enable-ltdl-install --cache-file=.././config.cache --srcdir=.

loading cache .././config.cache

checking for a BSD compatible install... (cached) /usr/bin/ginstall -c

checking whether build environment is sane... yes

checking whether make sets ${MAKE}... (cached) yes

checking for working aclocal... found

checking for working autoconf... found

checking for working automake... found

checking for working autoheader... found

checking for working makeinfo... found

checking whether to enable maintainer-specific portions of Makefiles... no

checking for gcc... (cached) gcc

checking whether the C compiler (gcc -march=athlon-xp -O3 -pipe ) works... yes

checking whether the C compiler (gcc -march=athlon-xp -O3 -pipe ) is a cross-compiler... no

checking whether we are using GNU C... (cached) yes

checking whether gcc accepts -g... (cached) yes

checking for working const... yes

checking for inline... inline

checking host system type... i686-pc-linux-gnu

checking build system type... i686-pc-linux-gnu

checking for ranlib... (cached) ranlib

checking for ld used by GCC... (cached) /usr/i486-slackware-linux/bin/ld

checking if the linker (/usr/i486-slackware-linux/bin/ld) is GNU ld... (cached) yes

checking for BSD-compatible nm... (cached) /usr/bin/nm -B

checking whether ln -s works... (cached) yes

updating cache .././config.cache

loading cache .././config.cache within ltconfig

checking for object suffix... o

checking for executable suffix... no

checking for gcc option to produce PIC... -fPIC

checking if gcc PIC flag -fPIC works... yes

checking if gcc supports -c -o file.o... yes

checking if gcc supports -c -o file.lo... yes

checking if gcc supports -fno-rtti -fno-exceptions ... yes

checking if gcc static flag -static works... -static

checking if the linker (/usr/i486-slackware-linux/bin/ld) is GNU ld... yes

checking whether the linker (/usr/i486-slackware-linux/bin/ld) supports shared libraries... yes

checking command to parse /usr/bin/nm -B output... ok

checking how to hardcode library paths into programs... immediate

checking for /usr/i486-slackware-linux/bin/ld option to reload object files... -r

checking dynamic linker characteristics... Linux ld.so

checking if libtool supports shared libraries... yes

checking whether to build shared libraries... yes

checking whether to build static libraries... yes

checking for objdir... .libs

creating libtool

updating cache .././config.cache

loading cache .././config.cache

checking which extension is used for shared libraries... .so

checking which variable specifies run-time library path... LD_LIBRARY_PATH

checking for objdir... .libs

checking how to run the C preprocessor... gcc -E

checking for ANSI C header files... yes

checking for malloc.h... yes

checking for memory.h... yes

checking for stdlib.h... yes

checking for stdio.h... yes

checking for ctype.h... yes

checking for dlfcn.h... yes

checking for dl.h... no

checking for dld.h... no

checking for string.h... yes

checking for strchr... yes

checking for strrchr... yes

checking whether libtool supports -dlopen/-dlpreopen... yes

checking for dlopen in -ldl... yes

checking for shl_load... no

checking for shl_load in -ldld... no

checking for dld_link in -ldld... no

checking for dlerror... yes

checking command to parse /usr/bin/nm -B output... yes

checking for _ prefix in compiled symbols... (cached) no

updating cache .././config.cache

creating ./config.status

creating Makefile

creating config.h

 * Building libtool-1.3.5 ...

rm -f acinclude.m4

cp ./libtool.m4 acinclude.m4

cd . && aclocal

cd . && automake --gnu --include-deps Makefile

cd . && autoconf

/bin/sh ./config.status --recheck

running /bin/sh ./configure  --host=i686-pc-linux-gnu --prefix=/usr --infodir=/usr/share/info --enable-ltdl-install --no-create --no-recursion

configure: WARNING: If you wanted to set the --build type, don't use --host.

    If a cross compiler is detected then cross compile mode will be used.

checking for a BSD-compatible install... /usr/bin/ginstall -c

checking whether build environment is sane... autom4te: cannot not rename autom4te.cache/traces.0t as autom4te.cache/traces.0: No such file or directory

configure.in: no proper invocation of AM_INIT_AUTOMAKE was found.

configure.in: You should verify that configure.in invokes AM_INIT_AUTOMAKE,

configure.in: that aclocal.m4 is present in the top-level directory,

configure.in: and that aclocal.m4 was recently regenerated (using aclocal).

Makefile.am:26: `aclocal_DATA' is used but `aclocaldir' is undefined

DIST_SUBDIRS: variable `CONF_SUBDIRS' is used but `CONF_SUBDIRS' is undefined

make: *** [Makefile.in] Error 1

make: *** Waiting for unfinished jobs....

yes

/var/tmp/portage/libtool-1.4.3-r4/work/libtool-1.3.5/missing: Unknown `--run' option

Try `/var/tmp/portage/libtool-1.4.3-r4/work/libtool-1.3.5/missing --help' for more information

configure: WARNING: `missing' script is too old or missing

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking for i686-pc-linux-gnu-strip... no

checking for strip... strip

checking for i686-pc-linux-gnu-gcc... no

checking for gcc... gcc

checking for C compiler default output... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables...

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ANSI C... none needed

checking for style of include used by make... GNU

checking dependency style of gcc... none

checking for i686-pc-linux-gnu-ranlib... no

checking for ranlib... ranlib

checking build system type... i686-pc-linux-gnu

checking host system type... i686-pc-linux-gnu

checking for ld used by GCC... /usr/i486-slackware-linux/bin/ld

checking if the linker (/usr/i486-slackware-linux/bin/ld) is GNU ld... yes

checking for BSD-compatible nm... /usr/bin/nm -B

checking whether ln -s works... yes

checking for gawk... (cached) gawk

configure: creating ./config.status

!!! ERROR: sys-devel/libtool-1.4.3-r4 failed.

!!! Function src_compile, Line 140, Exitcode 2

!!! (no error message)
```

I also can't emerge inject anything. If I try emerge inject GCC (or any other package) this is what I get:

```
root@raid517:~# emerge inject gcc

!!! gcc is not a specific cat/pkg-version, skipping...

root@raid517:~#
```

So I have no clue what is causing that.

As for the other output you requested, here is what i got:

```
root@raid517:~# emerge zlib

Calculating dependencies ...done!

>>> emerge (1 of 1) sys-libs/zlib-1.1.4-r2 to /

>>> md5 src_uri ;-) zlib-1.1.4.tar.bz2

>>> Unpacking source...

>>> Unpacking zlib-1.1.4.tar.bz2 to /var/tmp/portage/zlib-1.1.4-r2/work

 * Applying zlib-1.1.4-gentoo.security.patch...                           [ ok ]

>>> Source unpacked.

Checking for gcc...

Checking for shared library support...

Building shared library libz.so.1.1.4 with gcc.

Checking for unistd.h... Yes.

Checking whether to use vsnprintf() or snprintf()... using vsnprintf()

Checking for vsnprintf() in stdio.h... Yes.

Checking for return value of vsnprintf()... Yes.

Checking for errno.h...  Yes.

Checking for mmap support... Yes.

gcc -march=athlon-xp -O3 -pipe -fPIC -DHAVE_UNISTD_H -DHAS_vsnprintf -DHAS_vsnprintf_return -DUSE_MMAP   -c -o example.o example.c

gcc -march=athlon-xp -O3 -pipe -fPIC -DHAVE_UNISTD_H -DHAS_vsnprintf -DHAS_vsnprintf_return -DUSE_MMAP   -c -o adler32.o adler32.c

gcc -march=athlon-xp -O3 -pipe -fPIC -DHAVE_UNISTD_H -DHAS_vsnprintf -DHAS_vsnprintf_return -DUSE_MMAP   -c -o compress.o compress.c

gcc -march=athlon-xp -O3 -pipe -fPIC -DHAVE_UNISTD_H -DHAS_vsnprintf -DHAS_vsnprintf_return -DUSE_MMAP   -c -o crc32.o crc32.c

gcc -march=athlon-xp -O3 -pipe -fPIC -DHAVE_UNISTD_H -DHAS_vsnprintf -DHAS_vsnprintf_return -DUSE_MMAP   -c -o gzio.o gzio.c

gcc -march=athlon-xp -O3 -pipe -fPIC -DHAVE_UNISTD_H -DHAS_vsnprintf -DHAS_vsnprintf_return -DUSE_MMAP   -c -o uncompr.o uncompr.c

gcc -march=athlon-xp -O3 -pipe -fPIC -DHAVE_UNISTD_H -DHAS_vsnprintf -DHAS_vsnprintf_return -DUSE_MMAP   -c -o deflate.o deflate.c

gcc -march=athlon-xp -O3 -pipe -fPIC -DHAVE_UNISTD_H -DHAS_vsnprintf -DHAS_vsnprintf_return -DUSE_MMAP   -c -o trees.o trees.c

gcc -march=athlon-xp -O3 -pipe -fPIC -DHAVE_UNISTD_H -DHAS_vsnprintf -DHAS_vsnprintf_return -DUSE_MMAP   -c -o zutil.o zutil.c

gcc -march=athlon-xp -O3 -pipe -fPIC -DHAVE_UNISTD_H -DHAS_vsnprintf -DHAS_vsnprintf_return -DUSE_MMAP   -c -o inflate.o inflate.c

gcc -march=athlon-xp -O3 -pipe -fPIC -DHAVE_UNISTD_H -DHAS_vsnprintf -DHAS_vsnprintf_return -DUSE_MMAP   -c -o infblock.o infblock.c

gcc -march=athlon-xp -O3 -pipe -fPIC -DHAVE_UNISTD_H -DHAS_vsnprintf -DHAS_vsnprintf_return -DUSE_MMAP   -c -o inftrees.o inftrees.c

gcc -march=athlon-xp -O3 -pipe -fPIC -DHAVE_UNISTD_H -DHAS_vsnprintf -DHAS_vsnprintf_return -DUSE_MMAP   -c -o infcodes.o infcodes.c

gcc -march=athlon-xp -O3 -pipe -fPIC -DHAVE_UNISTD_H -DHAS_vsnprintf -DHAS_vsnprintf_return -DUSE_MMAP   -c -o infutil.o infutil.c

gcc -march=athlon-xp -O3 -pipe -fPIC -DHAVE_UNISTD_H -DHAS_vsnprintf -DHAS_vsnprintf_return -DUSE_MMAP   -c -o inffast.o inffast.c

gcc -march=athlon-xp -O3 -pipe -fPIC -DHAVE_UNISTD_H -DHAS_vsnprintf -DHAS_vsnprintf_return -DUSE_MMAP   -c -o minigzip.o minigzip.c

gcc -shared -Wl,-soname,libz.so.1 -o libz.so.1.1.4 adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o

rm -f libz.so libz.so.1

ln -s libz.so.1.1.4 libz.so

ln -s libz.so.1.1.4 libz.so.1

gcc -march=athlon-xp -O3 -pipe -fPIC -DHAVE_UNISTD_H -DHAS_vsnprintf -DHAS_vsnprintf_return -DUSE_MMAP -o example example.o -L. -lz

gcc -march=athlon-xp -O3 -pipe -fPIC -DHAVE_UNISTD_H -DHAS_vsnprintf -DHAS_vsnprintf_return -DUSE_MMAP -o minigzip minigzip.o -L. -lz

hello world

uncompress(): hello, hello!

gzread(): hello, hello!

gzgets() after gzseek: hello!

inflate(): hello, hello!

large_inflate(): OK

after inflateSync(): hello, hello!

inflate with dictionary: hello, hello!

                *** zlib test OK ***

Checking for gcc...

Building static library libz.a version 1.1.4 with gcc.

Checking for unistd.h... Yes.

Checking whether to use vsnprintf() or snprintf()... using vsnprintf()

Checking for vsnprintf() in stdio.h... Yes.

Checking for return value of vsnprintf()... Yes.

Checking for errno.h...  Yes.

Checking for mmap support... Yes.

ar rc libz.a adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o

>>> Install zlib-1.1.4-r2 into /var/tmp/portage/zlib-1.1.4-r2/image/ category sys-libs

man:

prepallstrip:

strip:

strip:

   usr/lib/libz.so.1.1.4

making executable: /usr/lib/libz.so.1.1.4

>>> Completed installing into /var/tmp/portage/zlib-1.1.4-r2/image/

>>> Merging sys-libs/zlib-1.1.4-r2 to /

--- /usr/

--- /usr/lib/

>>> /usr/lib/libz.so.1 -> libz.so.1.1.4

>>> /usr/lib/libz.so -> libz.so.1.1.4

>>> /usr/lib/libz.a

>>> /usr/lib/libz.so.1.1.4

--- /usr/share/

--- /usr/share/doc/

--- /usr/share/doc/zlib-1.1.4-r2/

--- /usr/share/doc/zlib-1.1.4-r2/txt/

>>> /usr/share/doc/zlib-1.1.4-r2/txt/algorithm.txt.gz

>>> /usr/share/doc/zlib-1.1.4-r2/FAQ.gz

>>> /usr/share/doc/zlib-1.1.4-r2/README.gz

>>> /usr/share/doc/zlib-1.1.4-r2/ChangeLog.gz

--- /usr/share/man/

--- /usr/share/man/man3/

>>> /usr/share/man/man3/zlib.3.gz

--- /usr/include/

>>> /usr/include/zconf.h

>>> /usr/include/zlib.h

>>> Safely unmerging already-installed instance...

--- !mtime obj /usr/share/man/man3/zlib.3.gz

--- !mtime obj /usr/share/doc/zlib-1.1.4-r2/txt/algorithm.txt.gz

--- !mtime obj /usr/share/doc/zlib-1.1.4-r2/README.gz

--- !mtime obj /usr/share/doc/zlib-1.1.4-r2/FAQ.gz

--- !mtime obj /usr/share/doc/zlib-1.1.4-r2/ChangeLog.gz

--- !mtime obj /usr/lib/libz.so.1.1.4

--- !mtime obj /usr/lib/libz.a

--- !mtime obj /usr/include/zlib.h

--- !mtime obj /usr/include/zconf.h

--- !empty dir /usr/share/man/man3

--- !empty dir /usr/share/man

--- !empty dir /usr/share/doc/zlib-1.1.4-r2/txt

--- !empty dir /usr/share/doc/zlib-1.1.4-r2

--- !empty dir /usr/share/doc

--- !empty dir /usr/share

--- !empty dir /usr/lib

--- !empty dir /usr/include

--- !empty dir /usr

--- !targe sym /usr/lib/libz.so.1

--- !targe sym /usr/lib/libz.so

>>> original instance of package unmerged safely.

>>> Regenerating /etc/ld.so.cache...

 * Caching service dependencies...                                        [ ok ]

>>> sys-libs/zlib-1.1.4-r2 merged.

>>> clean: No packages selected for removal.

>>> Auto-cleaning packages ...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

```

You see I am simply waiting for the script to finish completing all the tasks that it set out to accomplish - I am not yet myself trying to use portage - nor am I able to, since if I try to emerge anything it simply tries to start emerging libtools again.

I think maybe we are not that far off with a solution - but what that solution might be currently escapes me.

GJ

----------

## devsk

script does inject the packages it considers unsafe(those fabfour). you should do emerge -p <packagename> before any merge. you can check if those packages are already injected or not and then inject them.

you have to emerge these four in that order: m4, automake, autoconf and libtool to get past the libtool issue.

You did emerge zlib successfully.

emerge inject takes argument like "sys-libs/zlib-1.1.4-r2". That means, you do a "emerge -p gcc" first, see the output and emerge inject that. e.g.

```
emerge -p gcc
```

 says

```
[ebuild   N   ] sys-devel/gcc-3.2.3-r2
```

you say 

```
emerge inject sys-devel/gcc-3.2.3-r2
```

what does "emerge -p portage" say?

----------

## raid517

```

Calculating dependencies ...done!

[ebuild  N    ] sys-devel/libtool-1.5.2-r5

[ebuild  N    ] sys-libs/ncurses-5.4-r1

[ebuild  N    ] sys-apps/texinfo-4.6

[ebuild  N    ] sys-apps/groff-1.19

[ebuild  N    ] sys-apps/cronbase-0.2.1-r3

[ebuild  N    ] sys-apps/man-1.5m

[ebuild  N    ] app-shells/bash-2.05b-r9

[ebuild  N    ] sys-libs/readline-4.3-r5

[ebuild  N    ] dev-libs/openssl-0.9.7c-r1

[ebuild  N    ] dev-util/dialog-0.9_beta20031207

[ebuild  N    ] sys-apps/grep-2.5.1-r1

[ebuild  N    ] app-portage/gentoolkit-0.2.0_pre6

[ebuild  N    ] dev-lang/tcl-8.4.6

[ebuild  N    ] sys-devel/flex-2.5.4a-r5

[ebuild  N    ] dev-libs/glib-1.2.10-r5

[ebuild  N    ] sys-apps/miscfiles-1.3-r1

[ebuild  N    ] sys-devel/gcc-config-1.3.5

[ebuild  N    ] sys-libs/cracklib-2.7-r8

[ebuild  N    ] sys-libs/pam-0.77

[ebuild  N    ] sys-apps/shadow-4.0.4.1

[ebuild  N    ] sys-apps/pam-login-3.14

[ebuild  N    ] app-crypt/hashalot-0.1.0

[ebuild  N    ] sys-apps/util-linux-2.12-r4

[ebuild  N    ] media-libs/libpng-1.2.5-r4

[ebuild  N    ] media-libs/freetype-2.1.5-r1

[ebuild  N    ] x11-misc/ttmkfdir-3.0.9-r1

[ebuild  N    ] dev-libs/expat-1.95.7

[ebuild  N    ] sys-apps/ed-0.2-r3

[ebuild  N    ] media-libs/fontconfig-2.2.1

[ebuild  N    ] app-arch/unzip-5.50-r2

[ebuild  N    ] x11-base/xfree-4.3.0-r5

[ebuild  N    ] dev-lang/tk-8.4.6

[ebuild  N    ] sys-libs/db-1.85-r1

[ebuild  N    ] sys-libs/gdbm-1.8.0-r5

[ebuild  N    ] dev-lang/python-2.3.3

[ebuild  N    ] dev-java/java-config-1.2.6

[ebuild  N    ] dev-java/blackdown-jre-1.4.1

[ebuild  N    ] dev-java/blackdown-jdk-1.4.1

[ebuild  N    ] sys-libs/db-4.1.25_p1-r3

[ebuild  N    ] sys-devel/libperl-5.8.3

[ebuild  N    ] dev-lang/perl-5.8.3

[ebuild  N    ] sys-devel/m4-1.4-r1

[ebuild  N    ] sys-devel/autoconf-2.59-r3

[ebuild  N    ] sys-devel/automake-1.8.2

[ebuild  N    ] dev-perl/Locale-gettext-1.01-r1

[ebuild  N    ] sys-apps/help2man-1.33.1

[ebuild  N    ] sys-apps/coreutils-5.0.91-r4

[ebuild  N    ] sys-apps/debianutils-1.16.7-r4

[ebuild  N    ] sys-apps/portage-2.0.50-r1

root@raid517:~#
```

I managed to get all the other stuff injected as you said.

The only problem is now that even if I try to install the other things in order, no matter what order I try, yours or anyone else's, the first thing it does is try to install libtool.

It really does seem like unless I can get libtool installed that the script will not be able to work fully.

But we have certainly made some progress!  :Smile: 

GJ

----------

## devsk

just inject pam, pam-login, shadow, cronbase, python, perl, xfree for now and see what it returns for "emerge -p portage"....it should be pretty minimal stuff. 

portage is still not installed. once portage installs properly, you can emerge those.

I didn't have this much trouble running this script and getting portage to work  even on Solaris.

Since you are kickstarted by now, at this moment, I would strongly suggest to read man pages on "portage", "emerge", "ebuild". You gonna need to know each one of these in-and-out to get portage working correctly...and keeping it that way.

keep posting your problems here though...I will be more than happy to help you.

----------

## raid517

Thanks man...

GJ

----------

## raid517

```
root@raid517:~# emerge -p portage

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

Calculating dependencies ...done!

[ebuild  N    ] sys-devel/libtool-1.5.2-r5

[ebuild  N    ] sys-libs/ncurses-5.4-r1

[ebuild  N    ] app-shells/bash-2.05b-r9

[ebuild  N    ] sys-apps/texinfo-4.6

[ebuild  N    ] sys-devel/m4-1.4-r1

[ebuild  N    ] sys-devel/autoconf-2.59-r3

[ebuild  N    ] sys-devel/automake-1.8.2

[ebuild  N    ] dev-perl/Locale-gettext-1.01-r1

[ebuild  N    ] sys-apps/help2man-1.33.1

[ebuild  N    ] sys-apps/coreutils-5.0.91-r4

[ebuild  N    ] sys-apps/debianutils-1.16.7-r4

[ebuild  N    ] sys-apps/portage-2.0.50-r1
```

So it looks like it is still stuck on libtool.

Any idea how to get round it? I do have libtool installed from Slackware - if somehow that might be useful.

Also a few of those inject operations produced errors like this:

```
root@raid517:~# emerge inject dev-lang/perl-5.8.3

!!! BAD COUNTER in 'dev-lang/perl-5.8.3'

>>> Injected dev-lang/perl-5.8.3.
```

GJ

----------

## devsk

those "BAD COUNTER" errors during inject are fine.

you can let it emerge libtool, it will just overwrite the existing install with newer version.

just do:

```

emerge inject sys-libs/ncurses-5.4-r1

emerge portage > /tmp/portage.log 2>&1 &

tail -f /tmp/portage.log

```

there is a bug in ncurses-5.4, so you don't want that version for now. Rest of the packages required by portage are safe to emerge, so just type above commands and relax.

----------

## malmjako

I downloaded http://dev.gentoo.org/~carpaski/portage_rescue/portage-rescue-2.0.44-ppc.tbz2 and extracted it. When doing an emerge sync I got the following response:

```
# emerge sync

>>> Note: /etc/make.profile isn't available; an 'emerge sync' will probably fix this.

Traceback (most recent call last):

  File "/usr/bin/emerge", line 2, in ?

    import os,sys,portage,xpak,string,re,commands,time,threading,shutil

  File "/usr/lib/python2.2/site-packages/portage.py", line 4135, in ?

    do_vartree()

  File "/usr/lib/python2.2/site-packages/portage.py", line 4128, in do_vartree

    del x

UnboundLocalError: local variable 'x' referenced before assignment
```

It appears that there are two tab stops mising in /usr/lib/python2.2/site-packages/portage.py on line 4128:

```

      for x in myvkeys:

         vkeysplit=x.split("/")

         if not virts_p.has_key(vkeysplit[1]):

            virts_p[vkeysplit[1]]=virts[x]

# Was before

#       del x

# but should be

            del x

```

After changing this, emerge sync works. Someone should probably fix this...

/Jakob Malm

----------

## devsk

2.0.44 is ollllddddd, portage stands at 2.0.50-r1 ATM, I think it should be fixed by now...we won't be having it running on all kinds of platforms otherwise...   :Very Happy: 

----------

## raid517

Hmm welll i tried hard to get that script going on Slackware - and I'm sorry to say that it was just no go. Everything you suggested still left me trying to get gentoo's libtools to emerge - and nothing I did would make it do that.

I also just toasted a perfectly good SuSe system by trying it, which promptly crapped out on some python compiling error (similar to the last but with a completely seperate ebuild this time).

So maybe I should try the tarball method? The only problem is that I can't even extract the tarball cleanly at this time.

If I try I get this error::

```
tar xjpUvf portage-rescue-2.0.50-r1-x86.tbz2 -C

./

./etc/

tar: ./etc: Cannot unlink: Directory not empty

./etc/make.globals

./etc/etc-update.conf

./etc/dispatch-conf.conf

./etc/make.conf.example

./lib/

tar: ./lib: Cannot unlink: Directory not empty

./lib/libsandbox.so

./var/

tar: ./var: Cannot unlink: Directory not empty

./var/tmp/

tar: ./var/tmp: Cannot unlink: Directory not empty

./var/tmp/.keep

./usr/

tar: ./usr: Cannot unlink: Directory not empty

./usr/bin/

tar: ./usr/bin: Cannot unlink: Directory not empty

./usr/bin/xpak

./usr/bin/repoman

./usr/bin/g-cpan.pl

./usr/bin/portageq

./usr/bin/emerge

./usr/bin/quickpkg

./usr/bin/tbz2tool

./usr/lib/

tar: ./usr/lib: Cannot unlink: Directory not empty

./usr/lib/python2.2/

tar: ./usr/lib/python2.2: Cannot unlink: Directory not empty

./usr/lib/python2.2/site-packages/

tar: ./usr/lib/python2.2/site-packages: Cannot unlink: Directory not empty

./usr/lib/python2.2/site-packages/missingos.so

./usr/lib/portage/

tar: ./usr/lib/portage: Cannot unlink: Directory not empty

./usr/lib/portage/bin/

tar: ./usr/lib/portage/bin: Cannot unlink: Directory not empty

./usr/lib/portage/bin/fixpackages

./usr/lib/portage/bin/dispatch-conf-dialog

./usr/lib/portage/bin/domo

./usr/lib/portage/bin/xpak

./usr/lib/portage/bin/queryhost.sh

./usr/lib/portage/bin/fix-db.py

./usr/lib/portage/bin/dolib.so

./usr/lib/portage/bin/donewins

./usr/lib/portage/bin/mirror.py

./usr/lib/portage/bin/env-update

./usr/lib/portage/bin/fixdbentries

./usr/lib/portage/bin/repoman

./usr/lib/portage/bin/dopython

./usr/lib/portage/bin/dobin

./usr/lib/portage/bin/dodir

./usr/lib/portage/bin/dodoc

./usr/lib/portage/bin/doexe

./usr/lib/portage/bin/dojar

./usr/lib/portage/bin/doins

./usr/lib/portage/bin/dolib

./usr/lib/portage/bin/doman

./usr/lib/portage/bin/dosed

./usr/lib/portage/bin/dosym

./usr/lib/portage/bin/emake

./usr/lib/portage/bin/pmake

./usr/lib/portage/bin/etc-update

./usr/lib/portage/bin/dolib.a

./usr/lib/portage/bin/sandbox

./usr/lib/portage/bin/g-cpan.pl

./usr/lib/portage/bin/emerge-webrsync

./usr/lib/portage/bin/regenworld

./usr/lib/portage/bin/chkcontents

./usr/lib/portage/bin/portageq

./usr/lib/portage/bin/prepstrip

./usr/lib/portage/bin/archive-conf

./usr/lib/portage/bin/ebuild

./usr/lib/portage/bin/dohard

./usr/lib/portage/bin/dohtml

./usr/lib/portage/bin/doinfo

./usr/lib/portage/bin/dosbin

./usr/lib/portage/bin/emerge

./usr/lib/portage/bin/fowners

./usr/lib/portage/bin/fperms

./usr/lib/portage/bin/newsbin

./usr/lib/portage/bin/prepallman

./usr/lib/portage/bin/pkgmerge.new

./usr/lib/portage/bin/db-update.py

./usr/lib/portage/bin/newbin

./usr/lib/portage/bin/newdoc

./usr/lib/portage/bin/newexe

./usr/lib/portage/bin/newins

./usr/lib/portage/bin/newman

./usr/lib/portage/bin/dispatch-conf

./usr/lib/portage/bin/md5check.py

./usr/lib/portage/bin/md5check.sh

./usr/lib/portage/bin/extra_functions.sh

./usr/lib/portage/bin/ebuild.sh

./usr/lib/portage/bin/preplib.so

./usr/lib/portage/bin/pkgmerge

./usr/lib/portage/bin/prepinfo

./usr/lib/portage/bin/prepallstrip

./usr/lib/portage/bin/newlib.a

./usr/lib/portage/bin/quickpkg

./usr/lib/portage/bin/emergehelp.py

./usr/lib/portage/bin/prepalldocs

./usr/lib/portage/bin/prepallinfo

./usr/lib/portage/bin/pkgname

./usr/lib/portage/bin/newlib.so

./usr/lib/portage/bin/find-requires

./usr/lib/portage/bin/tbz2tool

./usr/lib/portage/bin/fixvirtuals

./usr/lib/portage/bin/prepall

./usr/lib/portage/bin/preplib

./usr/lib/portage/bin/prepman

./usr/lib/portage/lib/

tar: ./usr/lib/portage/lib: Cannot unlink: Directory not empty

./usr/lib/portage/lib/sandbox.bashrc

./usr/lib/portage/pym/

tar: ./usr/lib/portage/pym: Cannot unlink: Directory not empty

./usr/lib/portage/pym/portage_db_anydbm.py

./usr/lib/portage/pym/xpak.py

./usr/lib/portage/pym/portage.py

./usr/lib/portage/pym/portage_db_test.py

./usr/lib/portage/pym/portage_db_flat.py

./usr/lib/portage/pym/dispatch_conf.py

./usr/lib/portage/pym/dcdialog.py

./usr/lib/portage/pym/portage_db_cpickle.py

./usr/lib/portage/pym/getbinpkg.py

./usr/lib/portage/pym/cvstree.py

./usr/lib/portage/pym/output.py

./usr/lib/portage/pym/emergehelp.py

./usr/lib/portage/pym/portage_db_template.py

./usr/sbin/

tar: ./usr/sbin: Cannot unlink: Directory not empty

./usr/sbin/fixpackages

./usr/sbin/env-update

./usr/sbin/etc-update

./usr/sbin/emerge-webrsync

./usr/sbin/regenworld

./usr/sbin/archive-conf

./usr/sbin/ebuild

./usr/sbin/dispatch-conf

./usr/sbin/ebuild.sh

./usr/sbin/pkgmerge

./usr/share/

tar: ./usr/share: Cannot unlink: Directory not empty

./usr/share/doc/

tar: ./usr/share/doc: Cannot unlink: Directory not empty

./usr/share/doc/portage-2.0.50-r1/

tar: ./usr/share/doc/portage-2.0.50-r1: Cannot unlink: Directory not empty

./usr/share/doc/portage-2.0.50-r1/ChangeLog.gz

./usr/share/man/

tar: ./usr/share/man: Cannot unlink: Directory not empty

./usr/share/man/man1/

tar: ./usr/share/man/man1: Cannot unlink: Directory not empty

./usr/share/man/man1/ebuild.1.gz

./usr/share/man/man1/repoman.1.gz

./usr/share/man/man1/etc-update.1.gz

./usr/share/man/man1/emerge.1.gz

./usr/share/man/man1/quickpkg.1.gz

./usr/share/man/man1/env-update.1.gz

./usr/share/man/man5/

tar: ./usr/share/man/man5: Cannot unlink: Directory not empty

./usr/share/man/man5/vim.eclass.5.gz

./usr/share/man/man5/eutils.eclass.5.gz

./usr/share/man/man5/cvs.eclass.5.gz

./usr/share/man/man5/ebuild.5.gz

./usr/share/man/man5/ssl-cert.eclass.5.gz

./usr/share/man/man5/portage.5.gz

./usr/share/man/man5/games.eclass.5.gz

./usr/share/man/man5/rpm.eclass.5.gz

./usr/share/man/man5/make.conf.5.gz

./usr/share/man/man5/perl-module.eclass.5.gz

./usr/share/man/man5/flag-o-matic.eclass.5.gz

./usr/share/man/man5/stardict.eclass.5.gz

./usr/share/man/man5/gcc.eclass.5.gz

./usr/share/man/man5/distutils.eclass.5.gz

bzip2: (stdin): trailing garbage after EOF ignored

tar: Error exit delayed from previous errors

linux:~ # 
```

I assume that these are more than just the superficial errors that the readme referes to?

GJ

 [/code]

----------

## devsk

dude, you have to stick with one thing. what happened when you typed:

```
emerge inject sys-libs/ncurses-5.4-r1

emerge portage > /tmp/portage.log 2>&1 &

tail -f /tmp/portage.log 
```

according to the output of "emerge -p portage" that you showed me, it would have tried to emerge libtool...what errors did you see in /tmp/portage.log when it tried to emerge libtool?

If you don't want it to emerge libtool, just inject libtool and go on with "emerge portage" step.

Unfortunately, I won't be able to help you if you do random things and not report the output of the commands I ask you to run. you were so close when I asked you to fire that "emerge portage > /tmp...." command. you never told me what errors it gave you.

sorry about the toasted SuSe system...but hey, this post has a warning in the beginning!!

EDIT/ I saw the output of zlib merge yesterday which proved that basic aspects of the portage were working correctly long time ago....another thing, with this post I just became a Guru....  :Very Happy: 

----------

## raid517

Well I kinda thought I was being helpful. I thought that maybe the best approach was a clean start - so I moved on to Suse.

It didn't seem very random at the time. I'm sure you really can't be around 24/7 - but its tough to live for long periods of time with a machine in various stages of limbo.

I thought since you said you never experienced any difficulties like this on other distros that maybe that was the best answer.

In any case Slacksware is no more. I had used Suse previously to Slackware anyway - but I've always been kind of dissapointed with the package selection on Suse. Things can get old pretty fast.

Nonetheless I really do appreciate all your effort and if toasting a Suse install is what it takes to get portage going - then so be it.

I think the rescue tarball approach is probably the best method. I don't suppose you could reinstate your original instructions for the tarball - as there are still quite a few mirrors that are serving it? Also what do you think is causing those errors when I try to unpack it?

GJLast edited by raid517 on Sat Mar 06, 2004 7:48 am; edited 1 time in total

----------

## devsk

that warning is fine according to the README...

I think the exact command was supposed to be:

```
tar xjpUvf portage-rescue-2.0.50-r1-x86.tbz2 -C /
```

then you are supposed to do:

```
export FEATURES="-sandbox"

emerge sync

emerge portage

unset FEATURES

emerge metadata
```

----------

## raid517

Umm... No the package should extract cleanly - and quite with warnings about garbage - what that is is an additonal error message. I've seen it do it before on Slackware - but for some reason I can't quite recall at this time some other problem cropped up that stopped me from using it.

Well anyway I'm enjoying a bit of a first ATM - for the first time in two years of messing with Linux I have finally got a full accelerated digital optical sound and full blown accelerated video running. I have just finished playing a game of GTA Vice city via WineX - and have been unable to notice any kind of significant performance hit from doing so.

It was an interesting experience - but it does rather show that you have to be fairly commited to get anywhere with Linux.

Anyhoo I digress - the package should quit cleanly - with only some warnings about garbage - but I don't think there should be an error message there.

GJ

----------

## devsk

did you notice that your command was incomplete (trailing "/" was missing)...so, unless you were doing it from /, it would be messy anyway....if you emerge sync despite the tar error, what happens? emerge sync is pretty harmless, in the sens that its not installing/modifying any packages.

another thing: "emerge portage" will try to emerge the whole world of packages...manually inject the packages that you injected yesterday e.g. like baselayout, gcc, glibc, pam,...

----------

## mahir

it took me like 2 months to get

xinelibs working on fedora

and portage just installed it

 :Very Happy: 

dammmmmmmmmm

this is mad

so help me out

1) could i install fedora with the minial settings, and/or desktop settings..

then give it a portage layer and then use portage for everything?

2) would portage work on cygwin?

3) would portage work on freedos (like i saw posted before)

----------

## devsk

Mahir,

1. doable. you can infact gentoofy your minimal fedora install with this...

2. more doable than having portage on solaris. I had some trouble porting portage on solaris but its working great now(I recently emerged KDE with it:D ). So, go for it!

3. no idea!

for all 3, you should be ready to put in extra work to set it up and be ready to take on code walkthrough's and fix problems, familiarity with python and shell scripting would help...this link might come in handy when looking at portage code:

http://dev.gentoo.org/~g2boojum/portage.html

----------

## Lodd3r

i got it perfectly installed now error's but when i continue as you can see below i get this error and i don't know how to adjust it or to fix it i'm running slackware plz help.

```
root@linux:~# export FEATURES="-sandbox"

root@linux:~# emerge sync

Traceback (most recent call last):

  File "/usr/bin/emerge", line 6, in ?

    import os,sys,portage,emergehelp,xpak,string,re,commands,time,threading,shutil,traceback

ImportError: No module named portage

```

Last edited by Lodd3r on Sun Mar 14, 2004 8:12 pm; edited 1 time in total

----------

## devsk

which version did you install?

>=2.0.50 looks in /usr/lib/portage/pym for modules. Does that dir have portage.py?

earlier versions used to look at /usr/lib/python2.[23]/site-packages, so you should have portage.py.

----------

## Lodd3r

thx man the problem is solved

----------

## ali3nx

I have some very interesting news to report on this project... I have used the  scripts here on a variety of systems, fedora, suse, slackware and a few other versios of redhat and i find that the version if python installed in most common fedora, slackware and suse system has a problem with gentoo portage. I ran the script and the install failed with missingos not found and emerge halting with python modules not being found. I merely built python-2.3.3.tbz2 on a system with a comparable cpu, wget the file from the server, extract python-2.3.3.tbz2 to / then cd /usr/bin && rm -f python && ln -s python2.3 python and re-run the script and it will work without a problem   :Very Happy: 

I will post more on this very soon. I have done this on three different dedicated servers and it worked every time.

----------

## sirro

 *mahir wrote:*   

> 2) would portage work on cygwin?

 

It does, but one of the greatest problem seems to be, that many packages depend on glibc which is not ported to cygwin. (hope it will ever be) So many packages fail to compile...  :Sad: 

[1] http://www.toso-digitals.de/gentoo/index.html

[2] http://www.gentoo.org/news/en/gwn/20030707-newsletter.xml#doc_chap1_sect3

----------

## axxackall

 *sirro wrote:*   

>  *mahir wrote:*   2) would portage work on cygwin? 
> 
> It does, but one of the greatest problem seems to be, that many packages depend on glibc which is not ported to cygwin. (hope it will ever be) So many packages fail to compile... 
> 
> 

 

Many packages are already ported to cygwin in a way that when you build them from sources manually and run configure it detects cygwin and is aware of "no glibc in cygwin" problem. I build from sources: python, perl, guile, apache, windowmaker, texmacs, emacs, cvs, ssh, postgresql and many other useful command line and X11 programs.

----------

## devsk

Is there no libc on cygwin? is that even possible? solaris doesn't have glibc either, but libc.so was enough for me to get portage working on solaris and install KDE 3.2 with it and it works pretty well.

----------

## skyfolly

man, this sounds complicated.

----------

## uglyb0b

Bad idea. Installing portage on other distros makes the entire point of Gentoo, Portage, devoid. If it's on other distros then the inscentive to use gentoo is effectively removed. If you want portage, use Gentoo.

----------

## provicemo

 *uglyb0b wrote:*   

> Installing portage on other distros makes the entire point of Gentoo, Portage, devoid. 

 

Using Portage supports Gentoo's philosophy, i dont think it destroys it. I'd rather see people with mandrake and portage opposed to windows and not portage.

----------

## uglyb0b

 *provicemo wrote:*   

>  *uglyb0b wrote:*   Installing portage on other distros makes the entire point of Gentoo, Portage, devoid.  
> 
> Using Portage supports Gentoo's philosophy, i dont think it destroys it. I'd rather see people with mandrake and portage opposed to windows and not portage.

 

sure, but everyone knows that the contrast between Mandrake and Gentoo is larger than Windows and Linux. Why use Gentoo when you can use emerge and some other distro is a much more different question than use Linux or Windows.

----------

## axxackall

 *uglyb0b wrote:*   

> sure, but everyone knows that the contrast between Mandrake and Gentoo is larger than Windows and Linux.

 

Everyone knows? No, I don't. I don't know that windows (which version?) has more similarities to Linux (which distro?) than Mandrake and Gentoo.

A big point of Gentoo is Portage. If portage is spreaded then it's a big part of Gentoo is spreaded. 

And what's the problem if Mandrake users will improve their Linux experience? Besides, generally being happy for more happy people, I appreciate if Mandrake users will post bugs back to Portage bugzilla. Even more - post their enhancement ideas. 

Finally, it's an open source project. You cannot tell them "Stop it!" and expect them to stop. People often doing interesting things because they can, not even because they have to.

----------

## mahir

portage and urmpi

gentoo and mandrake.

i dont see the point in the argument..

or the debate even...

they are completely different..

like you said, the whole point go gentoo IS portage...

and the whole point to mandrake is what exactly?

you cant take urpmi and put it on gentoo (cos, well you could - but it wouldnt be worth it)

however you can take portage and more or less put it on CYGWIN (an extreme example, but it works and you get my point)

the reason why people use windows more then most other os's for desktop systems (apart from unfair tactics etc) is cos its efficient. its not FUN, but it works, (badly) but yea - 

it works--

and well

rpm is mmmmmmmmmmmm lame

so lame, they had to add apt-get to it, to make it worth using

urmpi needs a console to work on anyway (from what i remember)

apt-get is ok, but

common

its APT-GET

apt-get install bla

compared too

emerge bla

if you can take portage and use it on other distro's

why arent we pushing it?

if you found an item of code, that workd for a peice of software, that made the whole use of that program and software easier, more secure and more efficient(cost-efficient even) wouldnt u share the wealth?

so portage is our wealth..

actually

somebody should start a poll

comparing effeciency of portage against other install systems..

like a benchmark for source-installtions between portage and apt-get and/or urpmi.

----------

## uglyb0b

 *Quote:*   

> Finally, it's an open source project. You cannot tell them "Stop it!" and expect them to stop. People often doing interesting things because they can, not even because they have to.

 

Sure, I know that. Yet, I think that if you want portage you should use Gentoo. I like to think of myself as a software purist. 

 *Quote:*   

> a benchmark for source-installtions between portage and apt-get and/or urpmi.

 

Exactly right. I think that binary distributions may be quicker to install, but they may not be as fast. Source distributions are more time consuming, and may not give THAT much of a performance boost, but a boost it is.

I hate arguments.

----------

## axxackall

 *uglyb0b wrote:*   

> I think that if you want portage you should use Gentoo.

 

Not necessary. I used Portage to deploy customized Cygwin distros and it saved a lot to me. And I don't think I did anything wrong. Despite the fact that I like to think of myself as a software purist too  :Smile: 

----------

## provicemo

For some reason saying something like 'if you want to use portage, then get gentoo' feels as wrong to be as 'if you want to use MS Office, then get windows'. That just doesnt seem fair to me, it seems greedy. 

I rather share portage than force Gentoo onto someone. but i dunno, maybe i'm crazy or something

----------

## uglyb0b

 *axxackall wrote:*   

>  *uglyb0b wrote:*   I think that if you want portage you should use Gentoo. 
> 
> Not necessary. I used Portage to deploy customized Cygwin distros and it saved a lot to me. And I don't think I did anything wrong. Despite the fact that I like to think of myself as a software purist too 

 

I mean installing portage on other distributions and using it for everyday package management and installing, alongside crappy rpm or deb.

 *provicemo wrote:*   

> For some reason saying something like 'if you want to use portage, then get gentoo' feels as wrong to be as 'if you want to use MS Office, then get windows'. That just doesnt seem fair to me, it seems greedy.

 

I disagree. Portage is Gentoo. Portage is at the heart of almost everything you do in the enviroment. Think about Gentoo without Portage. It's pretty much just slackware or linux from scratch, isn't it? You never hear of us installing apt-get on Gentoo, or rpm (aside from rpm2targz) on gentoo, do you? And whats so bad about switching to gentoo? It's not that hard.

----------

## sirro

 *uglyb0b wrote:*   

> I disagree. Portage is Gentoo. Portage is at the heart of almost everything you do in the enviroment. Think about Gentoo without Portage. It's pretty much just slackware or linux from scratch, isn't it? You never hear of us installing apt-get on Gentoo, or rpm (aside from rpm2targz) on gentoo, do you? And whats so bad about switching to gentoo? It's not that hard.

 

Lets turn it around and say: The Linux-Kernel is the second heart of gentoo, without that kernel Gentoo would be useless at all. Think about Gentoo without Linux-Kernel.

But you have heard, that other distros are also using that Kernel, rigth? So whats the problem?

Installing portage in other environments is nice. Sometimes it seems very useful (portaris) and sometimes it seems like only proof-of-concept (cygwin). Why don't show anyone that portage is portable and why don't let people who like participate from that?

Everyone should decide for himself what he wants. Thats (part of) what GNU/Linux is about: Freedom of choice...

BTW: This does not look like noone is interested in rpm on gentoo:  :Wink: 

```
*  app-arch/rpm

      Latest version available: 4.2_pre069

      Latest version installed: [ Not Installed ]

      Size of downloaded files: 8,508 kB

      Homepage:    http://www.rpm.org/

      Description: Red Hat Package Management Utils

      License:     GPL-2 LGPL-2
```

----------

## Syntaxis

 *uglyb0b wrote:*   

> I think that if you want portage you should use Gentoo.

 

Similarly, if you want Debianutils (http://gentoo-portage.com/search-result.php?search=debianutils) you should just switch to Debian, right?  :Rolling Eyes: 

----------

## hulk2nd

the interesting thing in the whole idea is, to combine the package system of a big binary distro with the package system of a big distro that uses sources.

two advantages: packages can be installed fast AND you can always be up to date.

and if both package systems could use the same backend (database ...) this would be dreamlike   :Razz: 

greets,

hulk

----------

## Aurora

Hmmm...I read about 2.5 pages of this thread (sry, too lazy to read the whole thing) and I just don't see why someone would be willing to invest the time to install portage but not Gentoo...

I guess there are reasons why, though, as the original poster wouldn't have posted if he didn't feel portage could be useful in another distro.

However, although portage is absolutely wonderful, one other huge reason I use Gentoo is choice, flexibility, and it's streamlined!  Fedora is utterly bloated (yeah, I know someone might chime in and argue about this one; there are like 50,000 deamons running when you first boot that distro! -- maybe a slight exaggeration, but still, it gets my point across nonetheless).

Anyways...  Gentoo's heart is portage...but, hey, that's OSS -- you gotta take the pros with the cons.  If they want it, it's free (and openly available).  I think Gentoo (the real definition of Gentoo -- the whole package) is indeed for those willing to build a system from the ground up the way they want to (okay, it's not LFS, but whatever -- it's flexible and "built for me" in many different ways).  If someone just wants an easy way to compile something onto their Fedora system, oh well, their loss!  They're missing out on Larry and all the cool Gentoo stuff that comes along with it  :Very Happy: 

----------

## devsk

portage is a package mgmt system for compiling from source, and for unix systems like solaris etc. it is perfect for getting the best of "open" world. one may not have the option of re-installing another OS on the system. fedora may not be a good example...after fedora, I ported portage to solaris and it works well after some patching. go here for screenshot of kde3.2 on solaris 2.6:

https://forums.gentoo.org/viewtopic.php?t=113387&start=100

----------

## axxackall

has anyone succeeded with Portage on OS X? I found fink so boerken (comparing to Portage on Gentoo), but I have several reason still to stick to OSX on that Mac (instead of going with Gentoo/PPC there). If anyone succeeded with Portage/OSX then I'll give it a shot (instead of fink).

----------

## Epcylon

First I'd like to make one point regarding the last page or so of this thread, before I ask my own question...

You could also think of it like this... once you install portage on a box running some other distro, and use it as the primary way of installing software. Haven't you in fact turned the box into a gentoo box?   :Rolling Eyes: 

Now on to my question..

I have the dubious honour of being allowed to install software on a shared location on our uni network. This is for so-called unsupported software that the sysadmins doesn't want to bother with. I'd like to use portage for it, but there are a few problems I don't know if we could get around.

First of all. I can't touch *anything* outside the location given to me (namely /site/hacks ... don't ask  :Wink: ) so anything installed would have to live happily in that location. Second, I don't have root access or any kind of elevated access beyond being able to write to that location. So any changes to files in /etc are out, and placing of files in /etc are out, placing anything in /usr or /var is out.

Is it possible to get portage working under these conditions, and what would I have to do to get it done?

----------

## devsk

you should try to follow the thread for portaris posted two posts above this post by me. On solaris, I completely installed it in /home/<user>/portage/ as ROOT, hence pkges install in /home/<user>/portage/usr. There are quite a few changes(most documented in that thread) required but it can be done.

----------

## jhoh

Everyone,

I have successfully used this script on Fedora.  Great work.  My real question, however is if this script can be used without a local compiler.  Follow me:

My idea is to use a central Gentoo server to build packages in .tbz2 format under /usr/portage/packages/<cpu> where <cpu> is p3, p2, p4, etc. With the packages built with an appropriate make.conf for the targeted platform.

/usr/portage would be an NFS mount containing the portage tree and the .tbz2itized (sp?) packages.

I can then uncomment the "emerge sync" line from the script, copy over the make.conf from the server that created the .tbz2's (from the <cpu> directory), and change the "emerge -O portage" and "emerge -O gawk" lines to "emerge --usepkg -O portage/gawk".

Wouldn't this allow me continue on with "emerge --usepkg <package>" and, assuming .tbz2's existed for all dependencies in /usr/portage/packages/<cpu>..., then the Fedora machine would never need to compile a thing...right?

----------

## cork

I'm currently a total linux noob who is running a Mandrake 10 dual boot with WInXP. I've been having a lot of trouble installing software using rpm's because of missing various dependancies. I heard that their are ways that the dependancies can be worked out automatically but am unsure of how to install the program to do this. I've been reading your thread but am totally lost with what to do. I uncompress the portage tarball for my arch(x86) and then tried to run your script. The script seemed to run fine but then i looked and their is no /etc/portage folder and though i can use emerge nothing goes through succesfully.  Please tell me what other i need to provide if neccessary.  I"ve tried to emerge a few programs now and i notice that this comes up from time to time

/usr/sbin/ebuild.sh: line 238: einfo: command not found

and things of that nature

----------

## devsk

read the post fully, its just four pages, I remember its been dealt with. in  mozilla, on each of these four pages, press '/' and then type "einfo". If I remember correctly, file /sbin/functions.sh should be present and /etc/rc.d/init.d/functions.sh should link to it, but make sure to double check.

----------

## MasquedAvenger

I should bite my tongue, and I apologize for coming into the thread so late and I understand that i cannot understand the entire context of this discussion.  That being said, I must respond to the following:

 *Quote:*   

> They have removed the x86 rescue tar from portage, may be thinking it was like giving portage away to non-gentoo distros too easily...using the script isn't very tough either....so, what's next, remove this post? guys, relax! once people realise the beauty of portage, they will all be Gentoo anyway!! So, take it easy and let everyone cherish the beauty!!
> 
> 

 

If that's true, it sure seems as if that's going against the true spirit of Open Source.  But then again, like I said, I came in late, and this response probably isn't worth much, so forgive me if this has already been addressed and/or I'm not understanding things clearly...

James

----------

## someguy

cant get it to work on damnsmall linux (debian based) 

```
ln: `./fixpackages': File exists

ln: `./etc-update': File exists

ln: `./env-update': File exists

ln: `./emerge-webrsync': File exists

ln: `./ebuild.sh': File exists

ln: `./ebuild': File exists

ln: `./dispatch-conf': File exists

ln: `./archive-conf': File exists

ln: `./xpak': File exists

ln: `./repoman': File exists

ln: `./quickpkg': File exists

ln: `./portageq': File exists

ln: `./g-cpan.pl': File exists

ln: `./emerge': File exists

/usr/bin/env: python2.2: No such file or directory

Something wrong. Get /usr/portage/profiles dir from a working

Gentoo system and try again.

```

an yes i have done 

```
Something wrong. Get /usr/portage/profiles dir from a working

Gentoo system and try again.

```

no biggie tho

----------

## devsk

you probably have python 2.3 and older version of file /usr/lib/portage/bin/emerge which refers to python2.2. easiest solution is to edit that file and replace python2.2 with python

----------

## skyfolly

cool!!!!!!!! finally got it running on my Fedora Core 2 box, thanks a lot! I hope you could write a complete howto on this topic and post it upon www.tldp.org, so all linuxers can benetfit from your efforts.

----------

## woolsherpahat

Hello.

I'm trying to get this to work on a default install of Mandrake 10.0.  I used your script to install portage and it works... for the most part. Your script was able to update portage to the most recent version (2.0.50-r8 ) but during the same runtime it failed to emerge gawk.  

```

Calculating dependencies ...done!

>>> emerge (1 of 1) sys-apps/gawk-3.1.3-r1 to /

>>> md5 src_uri ;-) gawk-3.1.3.tar.gz

>>> Unpacking source...

>>> Unpacking gawk-3.1.3.tar.gz to /var/tmp/portage/gawk-3.1.3-r1/work

 * Applying 64bitnumfile.patch...

 * Failed Patch: 64bitnumfile.patch!

 *

 * Include in your bugreport the contents of:

 *

 *   /var/tmp/portage/gawk-3.1.3-r1/temp/64bitnumfile.patch-6499.out

!!! ERROR: sys-apps/gawk-3.1.3-r1 failed.

!!! Function epatch, Line 322, Exitcode 0

!!! Failed Patch: 64bitnumfile.patch!

```

I also tried to emerge openbox as a test of portage's functionality but it failed due to another epatch error.  

Thanks for the script and the support of this excellent project.

----------

## devsk

 *10k1 wrote:*   

> 
> 
>  * Applying 64bitnumfile.patch...
> 
>  * Failed Patch: 64bitnumfile.patch!
> ...

 

well you could have included that file...anyway, "emerge patch" first and then post any errors you get...

----------

## woolsherpahat

Wow, thanks for the quick response.  patch emerged just fine however gawk still provides some errors.

```

/bin/sh: line 1: yacc: command not found

make[2]: *** [awkgram.c] Error 127

make[2]: *** Waiting for unfinished jobs....

make[2]: Leaving directory `/var/tmp/portage/gawk-3.1.3-r1/work/gawk-3.1.3'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/var/tmp/portage/gawk-3.1.3-r1/work/gawk-3.1.3'

make: *** [all] Error 2

```

I tried looking for a yacc ebuild but couldn't find one.  My guess is that it's some sort of C++ development thing.  I did use the development install option for Mandrake.

----------

## devsk

you should have yacc ebuild in the portage tree somewhere. try:

```
emerge dev-util/yacc

emerge sys-devel/bison
```

----------

## woolsherpahat

Alright.  Yacc was merged sucessfuly but bison failed due to not having "GNU M4 1.4".  I was trying to emerge bison without dependencies.  Should I just go ahead and emerge bison and it's dependecies and see if that helps it install?  I did use your handy little script to prune all the "dangerous" packages out of the portage tree so I am safe to just use emerge normally?

Thanks for your time and paitence.

UPDATE:

Sweet, I got gawk to emerge!  That was the only thing that failed when I ran your script so I'm assuming I'm good to go.  Portage is update to date and everything. I used your package.mask to prune my portage tree of anything "dangerous" so can I now use portage like I would on a normal gentoo system?  Can I just go ahead an emerge gnome?

----------

## devsk

 *10k1 wrote:*   

> Portage is update to date and everything. I used your package.mask to prune my portage tree of anything "dangerous" so can I now use portage like I would on a normal gentoo system?  Can I just go ahead an emerge gnome?

 

yes. gnome is very straightforward...just double check with "emerge -pv gnome" before emerging though.

remember that whenever a new version of the "dangerous" pkgs is available, the effect of the inject is gone...that means you should always sync your portage tree with that little script. name it as "injectPackages" and cron schedule to run once a week or a day (your choice), but never do "emerge sync" alone.

----------

## geforce

Will I have the EMERGE command if I install Gentoo's portage on RedHat for example ?

----------

## woolsherpahat

devsk:

Hmm. I'm not having a very good time with this.  I'm emerging kahakai and on average about 50% of the ebuilds seems to fail.  Mostly development libraries and media libraries.  The majority of these already seemed to be installed via rpm so I injected them into portage and continued on with my emerge.  Basicly my question is: Is it normal to have about 50% of your ebuilds fail to compile while using portage on a different distro?

geforce:

Yah, more or less but it doesn't seem to work as seemlessly as it does on a pure-gentoo system.

----------

## devsk

if you post some errors, we can see if its the portage internal system which is causing the problem or if its something distro specific....on FC1 and now on FC2, I have used portage fairly well without a single problem....so 50% is kinda large number...I don't get that many errors even on solaris hacked version of portage.

----------

## micolous

Installing portage on a 'vanilla' debian sarge/testing installation (for x86).  This has worked for me using the 20040104 debian-installer CD.

Using tasksel, select Development/C/C++, and install them.  I'm too lazy to stuff around with dependencies, and this seems to cover most portage's dependencies without breaking much or installing too much software.  I found xfree and a couple of other packages failed to install here, because they weren't on the apt mirror I was using.  If this occurs for everyone else, then this is a Debian problem, not a problem with this mini-Howto or Gentoo.  A workaround to this is:

```
apt-get --fix-missing dselect-upgrade
```

And then we continue.

```
# Update existing packages that were installed using debian-installer from the CD.

apt-get upgrade

# Remove CVS and Subversion, they're definitely not needed right now.

apt-get remove cvs subversion

# Install python, rysnc, bzip2.  Why bzip2 is not in the development stuff or installed by default is honestly beyond me.

apt-get install python2.2 python2.2-dev rsync bzip2

# remove the uucp group (and user).

userdel uucp

# add wheel

groupadd -g 10 wheel

# install gawk using apt.

apt-get install gawk

# run the portage installer (from the start of this thread).

chmod 700 gentooise.sh

./gentooise.sh

# edit /etc/make.conf:

nano -w /etc/make.conf

```

Here you'll need to set your FEATURES flag (about line 270) to include userpriv.  Create this on a new line; don't use the template given.  You should also setup your USE flags, and CFLAGS.

```
# emerge gawk

emerge -Ov gawk

# after the access violation, you'll need to merge the package yourself.  Replace [version] with the version number of gawk that's in portage.

cp -rv /var/tmp/portage/gawk-[version]/image/* /

# and tell portage gawk is installed

emerge inject sys-apps/gawk-[version]

# and inject portage's deps, so you don't have complaints later.

emerge inject `emerge -p portage | gawk -F" " '{ print $4 }'`

# emerge openssl, this takes some time, due to the size of the package and the crypto-tests it runs.

emerge openssl

# here I rebooted, merely to test my faith, and see if everything went OK.  You can skip this if you like.

reboot

# after reboot, and logging in as root, we need to emerge ncurses.  This also takes some time.

emerge ncurses

# you'll need to update the ncurses configs using etc-update.  only if emerge asks you to do so, however.

etc-update

# now emerge grep

emerge grep

# this failed for me with an access violation (/var/backups/infodir.bak).  so we need to merge grep ourselves.

cp -rvf /var/tmp/portage/grep-[version]/image/* /

emerge inject sys-apps/grep-[version]

# emerge gentoolkit.

emerge gentoolkit

```

If you use any non-ext2/3 partitions, I found Debian (using the 20040103 debian-installer CD) forgets to install the fsck for them.  You should do that now, as per section 10c of the Installation Handbook.

Now you should be able to install applications using emerge (Portage).  Try to avoid using apt and dpkg now, as they will probably break your install through conflicting dependencies.  You should also start to emerge important missing packages like fortune-mod-all  :Wink: 

Some portage applications require (real) perl from portage, which we injected (fake installed) earlier.  You'll need to emerge it properly:

```
emerge gdbm libperl perl
```

But bear in mind this will break apt.

Update (2004-06-21): You also should emerge flex.

-----

This should be made into a proper howto, but it seems nobody so far is willing to do this... :Rolling Eyes:   I could write it, just give me some notice first, and I don't have the time to go and download every distro on the plan, install it, break it, lather, rinse, repeat; so I coudn't write a howto by myself.  I could contribute my experience with using Debian and the portage installer, and collect some of the others in this thread, though.

A good patch to the portage installer script is if you get emerge to do a emerge-webrsync then emerge sync.  That way, you only have to get one big file over (ht|f)tp, instead of lots of little ones over rsync.  Then the emerge sync will only have to get a much smaller amount of files.  It's probably faster that way.

And as for uucp, hopefully it's nothing important.  On my laptop I plan to run a local apache setup, with php and mono, along with mysql server, so I can do my development work on there.Last edited by micolous on Mon Jun 21, 2004 8:28 am; edited 1 time in total

----------

## woolsherpahat

Wow, installing portage on debian.  You are a brave person!  Don't let them know you did that.  

I'd love to help work on a howto for this.  I can add my experience with Mandrake 10.0.  I'll be starting over from scratch sometime soon since I was having unrelated kernel problems.  I'll let everyone know how it goes.

----------

## micolous

 *10k1 wrote:*   

> Wow, installing portage on debian.  You are a brave person!  Don't let them know you did that.

 

Yeah, reading posts on the debian-users mailing list about availiblity of Portage on Debian, they didn't seem terribly happy about the idea  :Smile: 

I actually broke it all bigtime later as I got carried away (and tried to use Gentoo stuff for init, and emerge pam, pam-login, baselayout...).  I'm going to do a Gentoo Stage3 install on it, with lots of moving around of the USB flashdisk due to lack of immediately working network.  I don't want to download everything again, or get another Gentoo ISO, and I have about 2 GB in /usr/portage/distfiles/ I can transfer files from. (Shared distfiles are great  :Smile: )

----------

## mahir

any updates on this topic?

bump..

news? events? who uses it

who has it working?

any tweaks...

----------

## mahir

so i /m on fc2... and i'm currently doing a yum update too fc3 test 1..

so i thought i'd try out this portage on fedora

(i am an active gentoo user btw)

ne who

i am doing an emerge -vp system and this is what i get

```
[root@jtmahir gnome-themes-extras]# emerge -vp system

 

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

 

Calculating system dependencies ...done!

[ebuild  N    ] sys-devel/patch-2.5.9  -build -static  197 kB

[ebuild  N    ] sys-libs/zlib-1.2.1-r2  -build  277 kB

[ebuild  N    ] sys-devel/gnuconfig-20040214  -(uclibc)  30 kB

[ebuild  N    ] sys-apps/module-init-tools-3.0-r2   347 kB

[ebuild  N    ] dev-python/python-fchksum-1.7.1   26 kB

[ebuild  N    ] sys-libs/ncurses-5.4-r1  -debug  2,103 kB

[ebuild  N    ] app-shells/bash-2.05b-r9  -build +nls -(uclibc)  1,923 kB

[ebuild  N    ] sys-libs/readline-4.3-r4   940 kB

[ebuild  N    ] sys-devel/flex-2.5.4a-r5   372 kB

[ebuild  N    ] sys-devel/bc-1.06-r5  +readline  272 kB

[ebuild  N    ] sys-devel/gettext-0.12.1  -emacs +nls  5,592 kB

[ebuild  N    ] sys-apps/sed-4.0.9  -build +nls -static  751 kB

[ebuild  N    ] sys-apps/texinfo-4.6  -build +nls -static  1,316 kB

[ebuild  N    ] sys-apps/groff-1.18.1-r4  +X -cjk  2,310 kB

[ebuild  N    ] sys-apps/cronbase-0.3   [empty/missing/bad digest]

[ebuild  N    ] sys-apps/man-1.5l-r6  +nls  213 kB

[ebuild  N    ] sys-libs/db-4.1.25_p1-r3  -doc -java -tcltk  3,008 kB

[ebuild  N    ] sys-libs/db-1.85-r1   264 kB

[ebuild  N    ] sys-libs/gdbm-1.8.0-r5  +berkdb -static  130 kB

[ebuild  N    ] sys-devel/libperl-5.8.2  +berkdb -debug +gdbm -threads  11,617 kB

[ebuild  N    ] dev-lang/perl-5.8.2-r1  +berkdb -doc +gdbm -threads -(uclibc)  11,617 kB

[ebuild  N    ] sys-apps/help2man-1.29   36 kB

[ebuild  N    ] sys-apps/diffutils-2.8.4-r4  -build +nls -static  809 kB

[ebuild  N    ] dev-libs/openssl-0.9.7d-r1  -emacs -(uclibc)  4,866 kB

[ebuild  N    ] dev-libs/expat-1.95.6-r1   285 kB

[ebuild  N    ] dev-lang/python-2.3.3-r1  +X +berkdb -bootstrap -build -doc +gdbm -ipv6 +ncurses +readline +ssl -tcltk -(uclibc) -ucs2  7,026 kB

[ebuild  N    ] app-shells/sash-3.6  +readline  49 kB

[ebuild  N    ] sys-libs/slang-1.4.9  -cjk  616 kB

[ebuild  N    ] app-editors/nano-1.3.2-r1  -build -debug -justify +ncurses +nls -nomac +slang +spell -wsconvert  922 kB

[ebuild  N    ] net-misc/dhcpcd-1.3.22_p4-r4  -build -static  148 kB

[ebuild  N    ] dev-util/yacc-1.9.1-r2   63 kB

[ebuild  N    ] sys-kernel/linux-headers-2.4.21-r1   27,864 kB

[ebuild  N    ] sys-devel/libtool-1.4.3-r4  -(uclibc)  1,663 kB

[ebuild  N    ] sys-devel/m4-1.4.1  +nls  335 kB

[ebuild  N    ] sys-devel/autoconf-2.59-r3   1,336 kB

[ebuild  N    ] net-misc/iputils-021109-r3  -ipv6 -static -(uclibc)  418 kB

[ebuild  N    ] dev-libs/popt-1.7-r1  +nls  561 kB

[ebuild  N    ] net-misc/rsync-2.6.0-r2  -acl -build -static  517 kB

[ebuild  N    ] net-misc/wget-1.9-r2  -debug -ipv6 +nls -socks5 +ssl -static -(uclibc)  1,309 kB

[ebuild  N    ] app-arch/bzip2-1.0.2-r3  -build -debug -static  649 kB

[ebuild  N    ] sys-apps/kbd-1.12-r2  +nls  864 kB

[ebuild  N    ] app-arch/cpio-2.5   181 kB

[ebuild  N    ] sys-devel/automake-1.8.3   2,552 kB

[ebuild  N    ] sys-apps/coreutils-5.2.1  -acl -build +nls -(selinux) -static -(uclibc)  4,255 kB

[ebuild  N    ] sys-apps/debianutils-1.16.7-r4  -build -static  25 kB

[ebuild  N    ] sys-fs/e2fsprogs-1.35  +nls -static  3,078 kB

[ebuild  N    ] sys-apps/ed-0.2-r3   181 kB

[ebuild  N    ] sys-apps/fbset-2.1   27 kB

[ebuild  N    ] sys-apps/file-4.08  -build  356 kB

[ebuild  N    ] sys-apps/findutils-4.1.20-r1  -afs -build +nls -(selinux) -static  759 kB

[ebuild  N    ] dev-libs/glib-1.2.10-r5   411 kB

[ebuild  N    ] sys-apps/miscfiles-1.3-r1  -(uclibc)  2,153 kB

[ebuild  N    ] sys-devel/gcc-config-1.3.5   [empty/missing/bad digest]

[ebuild  N    ] sys-libs/cracklib-2.7-r8  -debug  20 kB

[ebuild  N    ] sys-libs/pam-0.77  +berkdb -pwdb -(selinux)  3,551 kB

[ebuild  N    ] sys-apps/shadow-4.0.4.1-r3  +nls +pam -(selinux) -(uclibc)  795 kB

[ebuild  N    ] sys-apps/slocate-2.7-r5  -(uclibc)  110 kB

[ebuild  N    ] sys-apps/grep-2.5.1-r1  -build +nls -static -(uclibc)  667 kB

[ebuild  N    ] app-arch/gzip-1.3.3-r4  -build +nls -static  304 kB

[ebuild  N    ] sys-apps/hdparm-5.4   35 kB

[ebuild  N    ] sys-apps/less-381   259 kB

[ebuild  N    ] sys-apps/man-pages-1.67   1,585 kB

[ebuild  N    ] sys-apps/net-tools-1.60-r8  -build +nls -static -(uclibc)  203 kB

[ebuild  N    ] sys-apps/procps-3.1.15  -debug  260 kB

[ebuild  N    ] sys-apps/psmisc-21.2-r4  +nls -(selinux)  252 kB

[ebuild  N    ] sys-apps/setserial-2.17-r2   51 kB

[ebuild  N    ] sys-apps/pam-login-3.14  -livecd +nls -(selinux)  137 kB

[ebuild  N    ] app-arch/sharutils-4.2.1-r9  +nls  298 kB

[ebuild  N    ] app-arch/ncompress-4.2.4  -build  31 kB

[ebuild  N    ] app-arch/tar-1.14  -build +nls -static  1,052 kB

[ebuild  N    ] app-crypt/hashalot-0.3   78 kB

[ebuild  N    ] sys-apps/util-linux-2.12-r4  +crypt +nls +pam -(selinux) -static -(uclibc)  1,819 kB

[ebuild  N    ] sys-apps/which-2.16   122 kB

[ebuild  N    ] sys-devel/bin86-0.16.0   113 kB

[ebuild  N    ] sys-devel/bison-1.875  +nls -static -(uclibc)  795 kB

[ebuild  N    ] sys-devel/make-3.80  -build +nls -static -(uclibc)  1,183 kB

[ebuild  N    ] sys-libs/pwdb-0.62  -(selinux)  130 kB

[ebuild  N    ] sys-apps/tcp-wrappers-7.6-r8  -ipv6 -static  115 kB

[ebuild  N    ] net-misc/openssh-3.8.1_p1-r1  -X509 -chroot -ipv6 -kerberos -ldap +pam -(selinux) -skey -smartcard -static +tcpd -(uclibc)  939 kB

[ebuild  N    ] sys-fs/devfsd-1.3.25-r6   41 kB

 

Total size of downloads: 122,600 kB

 

[root@jtmahir gnome-themes-extras]#

```

would this cause any problems??

if so

what problems..

----------

## devsk

a lot of problems...lot of FC scripts use perl and python. upgrading (or downgrading) these will always call for re-emerge of dependent  modules and porting of those FC scripts. these should be left alone(injected and yummed)

module-init-tools, devfsd, cronbase, pam, linux-headers, shadow, hdparm, pwdb, pam-login, dhcpd: all can create pain of multiple config files and reconfigurations...two basic benefits of compiling from source don't apply to these mostly: faster code and bleeding edge software. so inject and yum them, and live happily. unless, of course, you are hell bent on converting your FC system into a gentoo clone.... :Smile: )

----------

## xRay_

Hey, thanks for that script.

Gentoo will always be my 1st love but i decided to use Arch for the meantime, pretty cool to have portage still  :Smile: 

Ill probably come crawling back like I always do...:p

----------

## raid517

Hi, has anyone got any tips for getting portage working on Windows - via Windows Services for Unix? I tried unpacking the rescue tarball to do it, but tar and untar in SFU doesn't respond to any of the usual switches - so I can't even unpack it. Why do it? Well there is portage on Mac OS X, so why not Windows? SFU will be included as an integral part of Longhorn anyway - so unix will be a real part of MS' next OS. Also SFU feels a lot more 'intergrated' right now than Cygwin does. And also because it would just be plumb 'cool' to do it. There is even an Xwindow manager for SFU with full accelerated opengl support. So it would be a very neat thing to do.

GJ

----------

## Legout

HI Guys!!

I found this discussion!! I used Gentoo for a while. But i change to Arch Linux, because i can install binaries there. i don like the long time to compile something. But i loved at gentoo, that nearly every programm/app i wanted to install, was in portage. So i tried to port portage/emerge to my Distro!! 

I found an interesting Project that did exactly what i was looking for:

Have a look at "emerde". Itś very easy to install and it works great for me!!

http://emerde.freaknet.org

----------

## xRay_

 *Legout wrote:*   

> HI Guys!!
> 
> I found this discussion!! I used Gentoo for a while. But i change to Arch Linux, because i can install binaries there. i don like the long time to compile something. But i loved at gentoo, that nearly every programm/app i wanted to install, was in portage. So i tried to port portage/emerge to my Distro!! 
> 
> I found an interesting Project that did exactly what i was looking for:
> ...

 

Very cool ! Thanks for the link.

----------

## raid517

Thanks for that, yes it is indeed very cool. the only thing is I fuzzed it up slightly. When the install process finishes it recommends that you install various packages in order for it to function properly. Unfortunately I accidentally dismissed this window - and I don't know what these packages were. I can't find it anywhere in the docs, and I tried emailing the list and the author, but they didn't respond. The question is, what are these packages?

I'd prefer to avoid as many problems as possible.

Any input would be appreciated.

GJ

----------

## Legout

make a copy of /usr/portage and reinstall it with autoinstall -norsync!!!

----------

## raid517

OK, I don't know if that answers what I asked. But I will try. I guess this means I will get the info I want but reinstalling will be much quicker this time?

The one disavantage with this is that you don't seem to be able to update portage at all. I mean I often get a message that 'an update to portage is avaiable, it is recomended that you update.' But when I try to emerge the new version of portage it just says I can't and that I should inject the package to skip that dependency.

It also toasted my module-init tools install for my 2.6x kernel, when a version it decided it would download refused to compile. The result was that my Slackware got very sick and couldn't load any of my modules correctly.

Manually installing it didn't help either unfortunately.

But oh well, I guess even portage isn't quite perfect.

GJ

----------

## unattachme

OK, I just ran the script posted in the beggining.  It told me, after erroring, that it needed the portage user & group, even gave me a line for each to copy in /etc/passwd & /etc/group.  The only problem I had (spent all of about 1.5 minutes on it) was when I changed my $PORTDIR in make.conf, I forgot to update the symlink @ /etc/make.profile. 

My thanx to the maker of ths script, and my bad if the 'make.profile' thing's already been gone over.

----------

## unattachme

 :Laughing:   :Evil or Very Mad:   :Laughing:   :Evil or Very Mad: 

......couldn't resist

----------

## chrisl456

Just wanted add a tip for installing Portage on Mandrake 9.2.

After getting Portage up & going, I found I couldn't get KDE working (X looked like it started, but then it just quit). I had to change my /etc/env.d/10ldpath to:

```
LDPATH="/usr/X11R6/lib:/usr/lib/qt3/lib:/usr/lib/wine:/lib:/usr/lib:/usr/local/lib:/usr/kerberos/lib"
```

 Everything's worked fine so far, but I haven't done anything too crazy yet - I've only upgraded nano.  :Smile: 

HTH someone.

----------

## plb

I installed this using the script on a Redhat 9 box and it seemed to work flawlesly. However after restarting I can no longer log into the system. I can't ssh into the box either.  Fortunately, I had webmin installed so I can at least look through the logs and run basic commands. Anyone have an idea what could hae gone wrong? I'm thinking bin/bash is hosed. 

Thanks!

Edit to add more info:

Trying to ssh into the box, I get connection reset by peer.

Trying to log into the console there is no error message, but it doesnt accept any input from the login promt.

----------

## garnie

trying to do this on a debian . . hard work though . . i have got it running but every single package i try fails not one have completed compiling .  heres the error code i apt-get install gcc gawk 

but perhaps i need some more ??

debian:/# emerge patch

Calculating dependencies ...done!

```

>>> emerge (1 of 1) sys-devel/patch-2.5.9 to /

>>> md5 src_uri ;-) patch-2.5.9.tar.gz

>>> Unpacking source...

>>> Unpacking patch-2.5.9.tar.gz to /var/tmp/portage/patch-2.5.9/work

tar: Read 8704 bytes from /usr/portage/distfiles/patch-2.5.9.tar.gz

>>> Source unpacked.

configure: WARNING: If you wanted to set the --build type, don't use --host.

    If a cross compiler is detected then cross compile mode will be used.

checking for i686-pc-linux-gnu-gcc... no

checking for gcc... gcc

checking for C compiler default output... configure: error: C compiler cannot create executables

See `config.log' for more details.

make: *** No targets specified and no makefile found.  Stop.

!!! ERROR: sys-devel/patch-2.5.9 failed.

!!! Function src_compile, Line 38, Exitcode 2

!!! emake failed

debian:/#
```

This eror comes with almost all of the packages . . (some like portage comes with no error message)

EDIT: i did the apt-get install make and guess what i found a package named "make"  :Smile:  lame that it is no there as standard . .but anyway it seems to be gcc there is the main problm here . . how ever i been looking over some docs how ever nothing i could find . .

----------

## BlindSpy

great guide! thanks

----------

## gch

Hi everyone,

I've been trying this out on a RH9 machine.  The machine is administered by my school, and has a lot of useful software installed, which is why I don't want to ditch it for Gentoo altogether.  This is why installing portage atop it is very useful, particularly for keeping certain software up-to-date.  (I never want to have to use GARNOME again).

Anyways, I get the rescue tarball installed, and am able to inject some packages, and emerge some others so that I can finally emerge a new version of portage, which goes fine.

Throughout the process I get lots of errors having to do with 

```
einfo: command not found
```

But I'm guessing that's from the rescue version of portage not having it.

Anyways, after I get the new portage installed, it fails to work.  Whenever I run emerge, it hangs before it does anything.  Pressing CTRL-C gives me the Python stack trace:

```

mymachine root # emerge -p some_package

Traceback (most recent call last):

  File "/usr/bin/emerge", line 278, in ?

    tmpsettings = portage.config(clone=portage.settings)

  File "/usr/lib/portage/pym/portage.py", line 1297, in __init__

    self.regenerate()

  File "/usr/lib/portage/pym/portage.py", line 1388, in regenerate

    self.configdict["auto"]["USE"]=autouse(db[root]["vartree"],use_cache=use_cache)

  File "/usr/lib/portage/pym/portage.py", line 1117, in autouse

    myresult=dep_check(mydep,myvartree.dbapi,None,use="no",use_cache=use_cache)

  File "/usr/lib/portage/pym/portage.py", line 3305, in dep_check

    mylist=flatten(dep_listcleanup(dep_zapdeps(mysplit,mysplit2)))

  File "/usr/lib/portage/pym/portage.py", line 3048, in dep_zapdeps

    myresult=dep_zapdeps(unreduced[x],reduced[x])

  File "/usr/lib/portage/pym/portage.py", line 3034, in dep_zapdeps

    elif myportapi.match(x):

  File "/usr/lib/portage/pym/portage.py", line 4724, in match

    return self.xmatch("match-visible",mydep)

  File "/usr/lib/portage/pym/portage.py", line 4711, in xmatch

    myval=match_from_list(mydep,self.xmatch("list-visible",None,mydep,mykey))

  File "/usr/lib/portage/pym/portage.py", line 4697, in xmatch

    myval=self.gvisible(self.visible(self.cp_list(mykey)))

  File "/usr/lib/portage/pym/portage.py", line 4792, in gvisible

    myaux=db["/"]["porttree"].dbapi.aux_get(mycpv, ["KEYWORDS"])

  File "/usr/lib/portage/pym/portage.py", line 4544, in aux_get

    myret=doebuild(myebuild,"depend","/",self.mysettings,dbkey=mydbkey)

  File "/usr/lib/portage/pym/portage.py", line 2069, in doebuild

    mysettings.reset(use_cache=use_cache)

  File "/usr/lib/portage/pym/portage.py", line 1334, in reset

    self.regenerate(use_cache=use_cache)

  File "/usr/lib/portage/pym/portage.py", line 1388, in regenerate

    self.configdict["auto"]["USE"]=autouse(db[root]["vartree"],use_cache=use_cache)

  File "/usr/lib/portage/pym/portage.py", line 1117, in autouse

    myresult=dep_check(mydep,myvartree.dbapi,None,use="no",use_cache=use_cache)

  File "/usr/lib/portage/pym/portage.py", line 3305, in dep_check

    mylist=flatten(dep_listcleanup(dep_zapdeps(mysplit,mysplit2)))

  File "/usr/lib/portage/pym/portage.py", line 3048, in dep_zapdeps

    myresult=dep_zapdeps(unreduced[x],reduced[x])

  File "/usr/lib/portage/pym/portage.py", line 3034, in dep_zapdeps

    elif myportapi.match(x):

  File "/usr/lib/portage/pym/portage.py", line 4724, in match

    return self.xmatch("match-visible",mydep)

  File "/usr/lib/portage/pym/portage.py", line 4711, in xmatch

    myval=match_from_list(mydep,self.xmatch("list-visible",None,mydep,mykey))

  File "/usr/lib/portage/pym/portage.py", line 4697, in xmatch

    myval=self.gvisible(self.visible(self.cp_list(mykey)))

  File "/usr/lib/portage/pym/portage.py", line 4792, in gvisible

    myaux=db["/"]["porttree"].dbapi.aux_get(mycpv, ["KEYWORDS"])

  File "/usr/lib/portage/pym/portage.py", line 4542, in aux_get

    mylock = lockfile(mydbkey,unlinkfile=1)

  File "/usr/lib/portage/pym/portage.py", line 89, in lockfile

    fcntl.flock(myfd,fcntl.LOCK_EX)

KeyboardInterrupt

```

It's obviously failing to get the lock on some DB file, I think.  Any ideas???

----------

## ilikelinux

Can any help witht his problem?

```
[root@server root]# /etc/init.d/sendmail start

/sbin/depscan.sh: line 6: /etc/init.d/functions.sh: No such file or directory

/sbin/depscan.sh: line 8: ebegin: command not found

/sbin/depscan.sh: line 14: eerror: command not found

 * Could not get SVCDIR!

 * Could not get SVCDIR!

gawk: /lib/rcscripts/awk/gendepends.awk:440: fatal: expression for `>>' redirection has null string value

/depcache: /depcache: No such file or directory

 * Error running '/sbin/depscan.sh'!

 * Please correct any problems above.

[root@server root]#

```

This happens when i try to start sendmail

----------

## jamapii

/sbin/depscan.sh belongs to sys-apps/baselayout

I did something like

```

mkdir -p /tmp/1

ROOT=/tmp/1 emerge --nodeps baselayout

```

then find the files in /tmp/1 that don't conflict with the existing "baselayout" and copy them over. Then do something like

```
emerge --inject sys-apps/baselayout-0.0
```

[/code]

----------

## ilikelinux

thanks that fixed it, either that or it was something else i did.

----------

## jamapii

Another hint: I did 2 partial upgrades from Suse 7.3 to current Gentoo with this method. But I did not "emerge --inject" the versions that portage wanted, but rather the versions I had (as of "rpm -qa|grep ...").

This way, portage should know when it should upgrade, and when it needn't. If portage wants to upgrade, and you don't, use "--nodeps". And if it doesn't compile, you know your prerequisites are probably too old.

----------

## devsk

rescue tarball doesn't create certain files belonging to baselayout which the script in the post actually copies manually. So, anyone who is not using the script and having those depscan or 'ebegin not found' kind of errors, make sure you follow the script to see where those files from baselayout are copied and then copy them manually.

----------

## duff

Awesome HOW-TO, and thanks, micolous, for the Debian tips.  Just finished installing portage on a debian system so I could get packages not in the official debian repos (and I don't feel like looking all over the place for other reposes).  Haven't added much so far, just win32codec, mplayer, and mplayerplug-in, so now I can watch trailers on apple's website. Thanks again!

[ gratuitous  screenshot ]

----------

## M2Ys4U

trying to run it on Cygwin and I get  *Quote:*   

> Operating system "CYGWIN_NT-5.1" currently unsupported. Exiting.

 ... is there anything I can edit to make it ignore this fact?  :Rolling Eyes: 

----------

## Landus Mikain

Wait till someone turns this into an RPM and puts it on the gnutella network...............

----------

## devsk

 *M2Ys4U wrote:*   

> trying to run it on Cygwin and I get  *Quote:*   Operating system "CYGWIN_NT-5.1" currently unsupported. Exiting. ... is there anything I can edit to make it ignore this fact? 

 

yes. grep for "Operating system" in portage_data.py and make changes till you are happy... :Smile: 

----------

## M2Ys4U

thanks

----------

## M2Ys4U

this is going to need some hacking to get working in Cygwin... >_>

Unfortunatly, I'm not a programmer.

And the surrent portage-on-cygwin stuff ain't workin' for me  :Sad: 

----------

## mahir

is it at all possible, to have an updated howto, considering portage has changed considerably and fc3 isnt as ugly as fc2 used to be..

thank much.

 *devsk wrote:*   

> 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/
> ...

 

----------

## devsk

 *mahir wrote:*   

> is it at all possible, to have an updated howto, considering portage has changed considerably and fc3 isnt as ugly as fc2 used to be..
> 
> thank much.
> 
> 

 yes its possible... :Smile: 

soon...

----------

## mahir

hahaha

okay

u got me

lol

can we do that? the upgrade? infact let me rephrase

may you update? or may anyone update the howto?

----------

## Nicholas.Walker

So in order to have emerege not emerge the fab four packages I have to type emerge inject <package> right?

or is there something else I need to do?

----------

## devsk

essentially that...new portage (2.0.51) has a package.provided file where you are supposed put the package name with verson number...its useful because most of the time the dependency is like ">=<pkg>-version", so you can put "sys-apps/abc-100" to keep it satisfied forever(well, almost).

moreover, emerging 'empty' will honour the files listed in package.provided.

----------

## Nicholas.Walker

uhhh you lost me.

(newbie)

----------

## devsk

 *Nicholas.Walker wrote:*   

> uhhh you lost me.
> 
> (newbie)

 

its ok to get lost...as long as you look it up and find your way...just inject, its still supported.

I am onto updating the first page..

----------

## kimchi_sg

 *devsk wrote:*   

> I am onto updating the first page..

 

Hopefully you can revamp the script to use package.provided, instead of the inject kludge. Then I will give it a shot on Cygwin.  :Smile: 

----------

## devsk

won't make a difference(not for cygwin, not for any other OS). inject will be supported for some time. apart from putting package names in a file and 'empty' honouring the 'injects' there is no difference.

----------

## kimchi_sg

My attempt at running the script on Cygwin for Win2k failed when emerge sync died thusly:

```

Administrator@SLABTOP ~

$ /gentooize.sh

Su as root and try again.

/usr/bin/env: python2.2: No such file or directory

gcc   -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT -Wall -c libsandbox.c

cc1: warning: -fPIC ignored for target (all code is position independent)

libsandbox.c: In function `init_wrappers':

libsandbox.c:219: error: `RTLD_NEXT' undeclared (first use in this function)

libsandbox.c:219: error: (Each undeclared identifier is reported only once

libsandbox.c:219: error: for each function it appears in.)

libsandbox.c: In function `get_dlsym':

libsandbox.c:349: error: `RTLD_NEXT' undeclared (first use in this function)

libsandbox.c: In function `init_env_entries':

libsandbox.c:958: warning: implicit declaration of function `strndupa'

libsandbox.c:958: warning: assignment makes pointer from integer without a cast

In file included from libsandbox.c:1380:

getcwd.c:97:23: sys/dir.h: No such file or directory

getcwd.c:224:1: warning: "__lstat" redefined

getcwd.c:207:1: warning: this is the location of the previous definition

In file included from libsandbox.c:1380:

getcwd.c: In function `__egetcwd':

getcwd.c:346: error: `__ptr_t' undeclared (first use in this function)

getcwd.c:346: error: parse error before "dotlist"

getcwd.c:382: warning: assignment from incompatible pointer type

getcwd.c:383: error: dereferencing pointer to incomplete type

getcwd.c:384: error: dereferencing pointer to incomplete type

getcwd.c:385: error: dereferencing pointer to incomplete type

getcwd.c:385: error: dereferencing pointer to incomplete type

getcwd.c:387: error: dereferencing pointer to incomplete type

getcwd.c:388: warning: implicit declaration of function `_D_ALLOC_NAMLEN'

getcwd.c:397: error: dereferencing pointer to incomplete type

getcwd.c:419: warning: implicit declaration of function `_D_EXACT_NAMLEN'

getcwd.c:441: error: void value not ignored as it ought to be

getcwd.c:448: error: dereferencing pointer to incomplete type

getcwd.c:461: error: parse error before "dotlist"

getcwd.c:472: error: parse error before "dotlist"

In file included from libsandbox.c:1381:

canonicalize.c: In function `erealpath':

canonicalize.c:153: warning: implicit declaration of function `__mempcpy'

canonicalize.c:153: warning: assignment makes pointer from integer without a cas

t

canonicalize.c:163: error: void value not ignored as it ought to be

make: *** [libsandbox.o] Error 1

id: portage: No such user

/gentooize.sh: line 51: groupadd: command not found

/gentooize.sh: line 52: useradd: command not found

portage initialization: your system doesn't have a 'wheel' group.

Please fix this as it is a normal system requirement. 'wheel' is GID 10

'emerge baselayout' and an 'etc-update' should remedy this problem.

portage: 'portage' user or group missing. Please update baselayout

         and merge portage user(250) and group(250) into your passwd

         and group files. Non-root compilation is disabled until then.

         Also note that non-root/wheel users will need to be added to

         the portage group to do portage commands.

         For the defaults, line 1 goes into passwd, and 2 into group.

         portage:x:250:250:portage:/var/tmp/portage:/bin/false

         portage::250:portage

!!! /etc/make.profile is not a symlink and will probably prevent most merges.

!!! It should point into a profile within /usr/portage/profiles/

!!! (You can safely ignore this message when syncing. It's harmless.)

emerge: root access required.

>>> starting rsync with rsync://134.68.220.74/gentoo-portage...

>>> checking server timestamp ...

C:\cygwin\bin\python2.4.exe (144): *** unable to remap C:\cygwin\bin\cygssl-0.9.

7.dll to same address as parent(0xC50000) != 0xC60000

C:\cygwin\bin\python2.4.exe (144): *** unable to remap C:\cygwin\bin\cygssl-0.9.

7.dll to same address as parent(0xC50000) != 0xC60000

    746 [main] python2.4 1584 sync_with_child: child 144(0x1CC) died before init

ialization with status code 0x1

  11122 [main] python2.4 1584 sync_with_child: *** child state child loading dll

s

Traceback (most recent call last):

  File "/usr/lib/portage/bin/emerge", line 2449, in ?

    exitcode=portage.spawn(mycommand,portage.settings,free=1)

  File "/usr/lib/portage/pym/portage.py", line 1568, in spawn

    return portage_exec.spawn_bash(mystring,env=env,**keywords)

  File "/usr/lib/portage/pym/portage_exec.py", line 46, in spawn_bash

    return spawn(args,env=env,opt_name=opt_name,**keywords)

  File "/usr/lib/portage/pym/portage_exec.py", line 97, in spawn

    mypid.append(os.fork())

OSError: [Errno 11] Resource temporarily unavailable

Something wrong. Get /usr/portage/profiles dir from a working

Gentoo system and try again.

Administrator@SLABTOP ~

$
```

 :Sad: 

Any thing i must edit in /usr/bin/emerge for this to work?

Also, I wonder if the errors before emerge sync bombed caused it to misbehave.

But then again I'm thrilled that this can be even thought of.  :Very Happy: 

----------

## devsk

you need to run it as 'root' user, whatever that means on cygwin.

the script made the mistake of not exitting on finding this....now corrected. sandbox doesn't compile on solaris either, so it has to be left out of the script...

----------

## kimchi_sg

 *devsk wrote:*   

> you need to run it as 'root' user, whatever that means on cygwin.
> 
> the script made the mistake of not exitting on finding this....now corrected. sandbox doesn't compile on solaris either, so it has to be left out of the script...

 

It seems sandbox does not compile here also.  :Sad: 

Also, since the script (and emerge itself) checks if I'm running as root by checking if I'm running as UID 0, there's no way I can run emerge in Cygwin, unless I can change it to check for UID 18 somehow.

 *Cygwin ML post wrote:*   

> 
> 
> Now, as far as root is concerned, Unix programs think of "root" as uid 0.
> 
> The Cygwin versions of those programs are usually patched to consider uid 18 to be root (this corresponds to the LocalSystem account, which has very high privileges on NT systems, unlike the Administrator account).
> ...

 

----------

## kimchi_sg

I hacked portage_data.py so that it would check for UID 500 (NT Administrator account) instead of UID 0, and emerge sync still dies.

```
>>> starting rsync with rsync://134.68.220.73/gentoo-portage...

>>> checking server timestamp ...

C:\cygwin\bin\python2.4.exe (1856): *** unable to remap C:\cygwin\bin\cygssl-0.9

.7.dll to same address as parent(0xC50000) != 0xC60000

C:\cygwin\bin\python2.4.exe (1856): *** unable to remap C:\cygwin\bin\cygssl-0.9

.7.dll to same address as parent(0xC50000) != 0xC60000

    909 [main] python2.4 1724 sync_with_child: child 1856(0x1C8) died before ini

tialization with status code 0x1

   9682 [main] python2.4 1724 sync_with_child: *** child state child loading dll

s

Traceback (most recent call last):

  File "/usr/bin/emerge", line 2449, in ?

    exitcode=portage.spawn(mycommand,portage.settings,free=1)

  File "/usr/lib/portage/pym/portage.py", line 1568, in spawn

    return portage_exec.spawn_bash(mystring,env=env,**keywords)

  File "/usr/lib/portage/pym/portage_exec.py", line 46, in spawn_bash

    return spawn(args,env=env,opt_name=opt_name,**keywords)

  File "/usr/lib/portage/pym/portage_exec.py", line 97, in spawn

    mypid.append(os.fork())

OSError: [Errno 11] Resource temporarily unavailable
```

----------

## devsk

that's python refusing  to spawn /bin/bash. does /bin/bash exist?

your python has problem loading SSL dll's as well. have you tested python on cygwin for fork() and stuff?

----------

## kimchi_sg

 *devsk wrote:*   

> that's python refusing  to spawn /bin/bash. does /bin/bash exist?

 

Bash is present:

```
$ which bash

/usr/bin/bash

$ ls -l /bin/bash

-rwxrwxrwx  1 Administrator Users 527360 Oct 20  2003 /bin/bash
```

(on Cygwin, /usr/bin and /bin are mapped to the same physical directory.)

 *devsk wrote:*   

> your python has problem loading SSL dll's as well. have you tested python on cygwin for fork() and stuff?

 

I don't have prior experience with python, how can I test this?

----------

## dlong500

I have tried running the install script on a Redhat 9 VPS (Virtual private server) under Virtuozzo.

After the script performs an emerge sync I get the following error:

 *Quote:*   

> Failed to write to mtimedb: 'module' object has no attribute 'HIGHEST_PROTOCOL'

 

Then after that it continues but repeats the following output many times:

 *Quote:*   

> 
> 
> Performing Global Updates: /usr/portage/profiles/updates/3Q-2002
> 
> (Could take a couple of minutes if you have a lot of binary packages.)
> ...

 

Then it finally dies with the following message:

 *Quote:*   

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

 

Does anyone have any idea what I can do?  :Sad: 

[Edit]

In searching around, I think that part of it may be my version of python, which is 2.2.2.

However, if I install a newer version of python, it is my understanding that it will install in a second copy of it in a different location instead of replacing the original, because overwriting the original version could break RH9 system scripts.  If this is so, how do I get portage to work off the newer version??Last edited by dlong500 on Wed Feb 23, 2005 5:37 pm; edited 1 time in total

----------

## devsk

 *kimchi_sg wrote:*   

>  *devsk wrote:*   that's python refusing  to spawn /bin/bash. does /bin/bash exist? 
> 
> Bash is present:
> 
> ```
> ...

 

try lowering the python version. stable 2.3.4 maybe. I mean, even Gentoo hasn't moved to 2.4, you are on cygwin... :Smile: )

----------

## devsk

 *dlong500 wrote:*   

> I have tried running the install script on a Redhat 9 VPS (Virtual private server) under Virtuozzo.
> 
> After the script performs an emerge sync I get the following error:
> 
>  *Quote:*   Failed to write to mtimedb: 'module' object has no attribute 'HIGHEST_PROTOCOL' 
> ...

 

/var/lib/portage is now created by the script. again python at play. what is 'python -V' on your machine...get 2.3.4 version rpm from somewhere and try again.

----------

## devsk

 *dlong500 wrote:*   

> 
> 
> In searching around, I think that part of it may be my version of python, which is 2.2.2.
> 
> However, if I install a newer version of python, it is my understanding that it will install in a second copy of it in a different location instead of replacing the original, because overwriting the original version could break RH9 system scripts.  If this is so, how do I get portage to work off the newer version??

 

install the new rpm, 2.3.4. Most of your old stuff would be under /usr/lib/python2.2/site-packages. Include this path in PYTHONPATH env. variable and set it system wide in /etc/profile.

export PYTHONPATH=/usr/lib/python2.3/site-packages:/usr/lib/python2.2/site-packages.

note that, the python in PATH should be the newer executable.

look under /usr/lib/python2.2/site-packages, and slowly re-install those things over time to the newer location. all RH9 system packages are updatable... :Smile: 

----------

## dlong500

devsk, I have tried to install the new python 2.3.4 rpm, but I'm having a problem.

I downloaded a source rpm for the new version of Python, and was able to build an rpm from it; however, when I try to install it I get the following:

 *Quote:*   

> [root@davison i386]# rpm -ivh python2-2.3.4*.rpm
> 
> Preparing...                ########################################### [100%]
> 
>         file /usr/bin/python2 from install of python2-2.3.4-3pydotorg conflicts with file from package python-2.2.2-26
> ...

 

Am I supposed to install it a different way, or what?  I'm not sure how to proceed, and I don't want to screw my system up since its a VPS a long way from me...

----------

## devsk

cp /usr/bin/python2 /usr/bin/python2_2.2.2

and proceed with 'f' option to force the install. There should only be one conflict and that is the executable. I think rpm has found it correctly. Everything else is in separate directories. if you get into trouble, just rename the 2.3.4 with some prefix and restore /usr/bin/python2_2.2.2 to /usr/bin/python2 and you would be fine.

----------

## dlong500

Thanks so much for your help devsk!

I think I've got it working now.

A few more question though...  How would you recommend migrating the majority of the programs being managed by rpm to being managed by portage?

In other words, if I want to start updating apache, perl, php, etc.. using portage, how do I begin that process?  Should I force an uninstall using rpm -e --nodeps?  And if so, will portage install things in different locations that could create problems?  Is there a safe way to know what files/directories to delete for a particular application before emerging the version maintained by portage?  And is there a safe order to uninstalling programs managed by rpm that one is going to migrate to portage?

Have there been any problems trying to switch from rpm to portage for heavy footprint applications like apache and perl?

I want to dive into this but thought I'd ask if anyone has a recommended method to this madness  :Cool: 

----------

## devsk

first, apache and perl are not in the same category. I have emerged perl without any proble and updated my system after that. second, thing to note about portage on fedora/redhat is that the server scripts(/etc/init.d) need to be hand modified to work on redhat/fedora because there is no /sbin/runscript, which part of baselayout/sysvinit packages (although you could try hacking up a /sbin/runscript and its associated croonies like start-stop-daemon, I would say it has potential to break your system boot). so, you change the scripts installed by portage to use /bin/bash.

so stay away from server programs in general...that kinda sucks because thos are the programs which you wanna update the most for security reasons.

if you ever dare and succeed in cleanly creating a safe /sbin/runscript and family, which won't kill my fedora system, don't forget to update us here on that.

----------

## dlong500

I'd really like to be able to manage apache through portage, so I'll look into what it will take to create a runscript family.

That would be cool.

Oh, I forgot to mention that (I think) there is a small typo in the current script in the first post of this thread.

In the line:

```

ln -s /usr/portage/profiles/default-linux/ x86/2004.2/gcc34 /etc/make.profile

```

There is a space before x86, and as soon as I removed it the script worked fine.  (Otherwise it doesn't create the /etc/make.profile symlink)

Also, you mentioned that you now emerge gcc and binutils on your FC2 install.  Will that work for me on a Redhat 9 VPS or is there a distinction there?

Once again, thanks so much for your help.

----------

## kimchi_sg

Update: Python no longer segfaults on my system after I un-installed the Cygwin version 2.4, and compiled 2.3.4 fresh from www.python.org instead. (But ./configure sure took a long time...  :Razz: )

But I have 2 more problems now:

emerge --sync refuses to go to updating the cache for some reason. I have set 

```
RSYNC_TIMEOUT=1800

RSYNC_RETRIES=30
```

 but when I try to sync it ends up retrying and retrying with the following message (it has been doing this for 3 hours already):

```
Number of files: 111825

Number of files transferred: 61

Total file size: 87180631 bytes

Total transferred file size: 19764 bytes

Literal data: 19764 bytes

Matched data: 0 bytes

File list size: 2650351

Total bytes sent: 1370

Total bytes received: 2673590

sent 1370 bytes  received 2673590 bytes  3312.64 bytes/sec

total size is 87180631  speedup is 32.59

rsync error: some files could not be transferred (code 23) at /home/lapo/packagi

ng/tmp/rsync-2.6.3/main.c(1146)

>>> retry ...
```

I will try to compile rsync from source to see if this fixes the problem.

EDIT: I gave up waiting for it to stop looping and now am trying emerge --metadata instead.

EDIT 2: emerge --metadata completed successfully, but not without several ominous looking errors like this (for several packages):

```
Failed cache update: net-www/apache-2.0.52-r1 "Corruption detected when reading

key 'apache-2.0.52-r1': Key count mismatch"
```

emerge is refusing to read /etc/make.conf! This is a bit annoying as I have to pass it parameters on the command line. For example, it keeps on insisting to sync from rsync.gentoo.org when I have set 

```
RSYNC="rsync://mirror.averse.net/gentoo-portage"
```

Also, emerge --info shows that my CHOST, CFLAGS and CXXFLAGS are being ignored silently.  :Confused: 

EDIT 3: I continued with the part of the script after emerge --sync and it starts dying again after injecting baselayout.

```
>>> Injected sys-apps/baselayout-1.9.4-r6.

portage: 'portage' user or group missing. Please update baselayout

         and merge portage user(250) and group(250) into your passwd

         and group files. Non-root compilation is disabled until then.

         Also note that non-root/wheel users will need to be added to

         the portage group to do portage commands.

         For the defaults, line 1 goes into passwd, and 2 into group.

         portage:x:250:250:portage:/var/tmp/portage:/bin/false

         portage::250:portage

*** You are not in the portage group. You may experience cache problems

*** due to permissions preventing the creation of the on-disk cache.

*** Please add this user to the portage group if you wish to use portage.

[: ==: unknown operand

portage: 'portage' user or group missing. Please update baselayout

         and merge portage user(250) and group(250) into your passwd

         and group files. Non-root compilation is disabled until then.

         Also note that non-root/wheel users will need to be added to

         the portage group to do portage commands.

         For the defaults, line 1 goes into passwd, and 2 into group.

         portage:x:250:250:portage:/var/tmp/portage:/bin/false

         portage::250:portage

*** You are not in the portage group. You may experience cache problems

*** due to permissions preventing the creation of the on-disk cache.

*** Please add this user to the portage group if you wish to use portage.

Calculating dependencies ...done!

Failed to open file for writedict(): //var/lib/portage/world

>>> emerge (1 of 1) sys-apps/portage-2.0.51-r15 to /

Traceback (most recent call last):

  File "/usr/bin/emerge", line 3045, in ?

    mydepgraph.merge(mydepgraph.altlist())

  File "/usr/bin/emerge", line 1830, in merge

    retval=portage.doebuild(y,"clean",myroot,self.pkgsettings,edebug,cleanup=1)

  File "/usr/lib/portage/pym/portage.py", line 2407, in doebuild

    os.chown(mysettings["BUILD_PREFIX"],portage_uid,portage_gid)

OSError: [Errno 22] Invalid argument: '/var/tmp/portage'

cd: can't cd to /etc/init.d

portage: 'portage' user or group missing. Please update baselayout

         and merge portage user(250) and group(250) into your passwd

         and group files. Non-root compilation is disabled until then.

         Also note that non-root/wheel users will need to be added to

         the portage group to do portage commands.

         For the defaults, line 1 goes into passwd, and 2 into group.

         portage:x:250:250:portage:/var/tmp/portage:/bin/false

         portage::250:portage

*** You are not in the portage group. You may experience cache problems

*** due to permissions preventing the creation of the on-disk cache.

*** Please add this user to the portage group if you wish to use portage.

Calculating dependencies ...done!

Failed to open file for writedict(): //var/lib/portage/world

>>> emerge (1 of 1) sys-apps/gawk-3.1.3-r2 to /

Traceback (most recent call last):

  File "/usr/bin/emerge", line 3045, in ?

    mydepgraph.merge(mydepgraph.altlist())

  File "/usr/bin/emerge", line 1830, in merge

    retval=portage.doebuild(y,"clean",myroot,self.pkgsettings,edebug,cleanup=1)

  File "/usr/lib/portage/pym/portage.py", line 2407, in doebuild

    os.chown(mysettings["BUILD_PREFIX"],portage_uid,portage_gid)

OSError: [Errno 22] Invalid argument: '/var/tmp/portage'

portage: 'portage' user or group missing. Please update baselayout

         and merge portage user(250) and group(250) into your passwd

         and group files. Non-root compilation is disabled until then.

         Also note that non-root/wheel users will need to be added to

         the portage group to do portage commands.

         For the defaults, line 1 goes into passwd, and 2 into group.

         portage:x:250:250:portage:/var/tmp/portage:/bin/false

         portage::250:portage

*** You are not in the portage group. You may experience cache problems

*** due to permissions preventing the creation of the on-disk cache.

*** Please add this user to the portage group if you wish to use portage.

Calculating dependencies ...done!

Failed to open file for writedict(): //var/lib/portage/world

>>> emerge (1 of 1) sys-apps/portage-2.0.51-r15 to /

Traceback (most recent call last):

  File "/usr/bin/emerge", line 3045, in ?

    mydepgraph.merge(mydepgraph.altlist())

  File "/usr/bin/emerge", line 1830, in merge

    retval=portage.doebuild(y,"clean",myroot,self.pkgsettings,edebug,cleanup=1)

  File "/usr/lib/portage/pym/portage.py", line 2407, in doebuild

    os.chown(mysettings["BUILD_PREFIX"],portage_uid,portage_gid)

OSError: [Errno 22] Invalid argument: '/var/tmp/portage'
```

----------

## devsk

 *dlong500 wrote:*   

> I'd really like to be able to manage apache through portage, so I'll look into what it will take to create a runscript family.
> 
> 

 

me too.

 *dlong500 wrote:*   

> 
> 
> In the line:
> 
> ```
> ...

 

thanks.

 *dlong500 wrote:*   

> 
> 
> Also, you mentioned that you now emerge gcc and binutils on your FC2 install.  Will that work for me on a Redhat 9 VPS or is there a distinction there?
> 
> Once again, thanks so much for your help.

 

yes, why not. make sure if you emerge gcc-3.4.3, you also emerge libstdc++-v3. moreover there are gcc-config and binutils-config that you need to emerge before gcc/binutils, so that a proper profile is created during gcc/binutils install.

----------

## devsk

 *kimchi_sg wrote:*   

> 
> 
> rsync error: some files could not be transferred (code 23) at /home/lapo/packagi
> 
> ng/tmp/rsync-2.6.3/main.c(1146)
> ...

 

I have seen this before. try lowering your rsync version.

 *Quote:*   

> 
> 
> portage: 'portage' user or group missing. Please update baselayout
> 
>          and merge portage user(250) and group(250) into your passwd
> ...

 

you need to setup portage:portage somehow. nothing would work otherwise. make sure /var/lib/portage and /etc/init.d exist.

moreover, its 

```
SYNC="rsync://mirror.averse.net/gentoo-portage"
```

 and not RSYNC.

----------

## kimchi_sg

 *devsk wrote:*   

> you need to setup portage:portage somehow. nothing would work otherwise. make sure /var/lib/portage and /etc/init.d exist.
> 
> moreover, its 
> 
> ```
> ...

 

I have tried creating a portage user and group, but Windows 2000 does not allow a new group with the same name as an existing user, or vice versa.  :Sad: 

The "RSYNC" entry was mistyped in the post, I used SYNC="..." actually. My bad.  :Sad: 

----------

## devsk

doesn't cygwin provide an abstraction for users/groups?

----------

## kimchi_sg

 *devsk wrote:*   

> doesn't cygwin provide an abstraction for users/groups?

 

No, users and groups have to be created via Windows standard Administrative Tools.

(Source)

----------

## dlong500

 *devsk wrote:*   

> (although you could try hacking up a /sbin/runscript and its associated croonies like start-stop-daemon...

 

I want to do this, but I am by no means an expert at this kind of thing.  I'm willing to put some work into it, but if you could provide some more details into the basics of what needs to go on, then I could use the direction to play around a bit with the idea.  I'm willing to experiment (although I need to make sure I don't overly trash my VPS).

My first idea would be to put some kind of wrapper init script that won't change for each server program that I want portage to manage.  That script would follow Redhat init guidlines and immediately call the gentoo-style init script.  This way, portage can update the startup script without affecting Redhat's init system.  Of course, this assumes that some form of runscript is in place and working.  Does that sound like a starting point or did you have a much better concept in mind?

I'd prefer something that wouldn't even require manually creating the wrapper scripts, but I'm not sure how to integrate the Gentoo method of dependency checking with Redhat's method.  By the way, what exactly is Redhat's method?  It seems a little obscure compared to Gentoo's method.

I guess Apache and Mysql/Postgresql would really be the only server programs that I'd want to be managing through portage, and how often do init scripts change anyway?  Maybe the first step would just be to get a Redhat style script working after the first emerge of Apache, and then just keep that script in place as upgrades occur.  Does emerging a server program interfere with Redhat's init system in general or is the problem just with getting the portage installed daemon to start up properly?

Have I dished out enough questions?

----------

## kimchi_sg

 *devsk wrote:*   

>  *kimchi_sg wrote:*   
> 
> rsync error: some files could not be transferred (code 23) at /home/lapo/packagi
> 
> ng/tmp/rsync-2.6.3/main.c(1146)
> ...

 

I have tried with compiled-from-source versions of rsync 2.6.3 to 2.6.0, and all of them have this error.  :Sad: 

rsync 2.5.7 does not work, it just hangs right before downloading the timeshamp.chk file.

Could the fact that my laptop has only 128MB of RAM be a factor? The rsync homepage does say that the program is fairly memory-intensive.

I feel like giving this up, but somehow, Portage on Windows is too fascinating an idea to be discarded like that.  :Very Happy: 

P.S. I have googled for "portage cygwin" and found this page: http://www.toso-digitals.de/gentoo/install.html , which also describes portage on cygwin. Should I try the procedures on this one? After all, the worst thing that could happen is me nuking a cygwin install, but there is nothing that a re-run of Cygwin's setup.exe couldn't fix.  :Smile: 

----------

## devsk

 *dlong500 wrote:*   

> 
> 
> I want to do this, but I am by no means an expert at this kind of thing.  I'm willing to put some work into it, but if you could provide some more details into the basics of what needs to go on, then I could use the direction to play around a bit with the idea.  I'm willing to experiment (although I need to make sure I don't overly trash my VPS).
> 
> My first idea would be to put some kind of wrapper init script that won't change for each server program that I want portage to manage.  That script would follow Redhat init guidlines and immediately call the gentoo-style init script.  This way, portage can update the startup script without affecting Redhat's init system.  Of course, this assumes that some form of runscript is in place and working.  Does that sound like a starting point or did you have a much better concept in mind?
> ...

 

Me too. but its complex and can break your system easily. Trust me, I had done this the first time and I had to restore from my backup iamges. I am currently looking at a possibility of just doing 'ebuild baselayout-1.9.11-r1 install' and then copying some needed programs manually. I will keep you posted if I get anywhere.

----------

## devsk

 *kimchi_sg wrote:*   

>  *devsk wrote:*    *kimchi_sg wrote:*   
> 
> rsync error: some files could not be transferred (code 23) at /home/lapo/packagi
> 
> ng/tmp/rsync-2.6.3/main.c(1146)
> ...

 

it essentially does the similar things. but, it might be more streamlined for cygwin. give it a shot.

----------

## kimchi_sg

 *devsk wrote:*   

>  *kimchi_sg wrote:*   I feel like giving this up, but somehow, Portage on Windows is too fascinating an idea to be discarded like that. 
> 
> P.S. I have googled for "portage cygwin" and found this page: http://www.toso-digitals.de/gentoo/install.html , which also describes portage on cygwin. Should I try the procedures on this one? After all, the worst thing that could happen is me nuking a cygwin install, but there is nothing that a re-run of Cygwin's setup.exe couldn't fix.  
> 
> it essentially does the similar things. but, it might be more streamlined for cygwin. give it a shot.

 

Just spoke to dev bonsaikitten on #gentoo yesterday and it seems that this project has been inactive for more than 2 years now.  :Sad: 

I'm now trying to "emerge --sync" now, and rsync is merrily speeding along, but I haven't hit the "show stopper" part yet - the updating of the Portage database.

Some workarounds I used during the install of this "portage on win32", posting it here in case anyone is as hare-brained enough to try it as well  :Razz:  :

Do not install python 2.4 from the cygwin setup.exe as it is incompatible with the version of portage bundled in the zip file ( version 2.0.48 ). Instead, go to http://www.python.org/2.2.3 , and download python 2.2.3 from a local mirror site. Move the download file (Python-2.2.3.tgz) into your Cygwin home directory, then 

```
tar zxvf Python-2.2.3.tgz
```

 Change to the Python-2.2.3 directory, read the README file, and then execute these commands to install Python 2.2.3: 

```
./configure && make && make install
```

The default installation directory prefix for python 2.2.3 is /usr/local . I did not change this location, but if you wish to install it in a more accessible and standard location instead, pass the following option to the configure script: 

```
./configure --prefix=/usr
```

With Wordpad or your favourite editor, edit [path/to/your/python/libraries]/site-packages/portage.py (the default python libraries directory is /usr/local/lib/python-2.2 ), and change all occurances of 

```
uid==0
```

 to 

```
uid==500
```

Will keep you guys posted as "emerge --sync" completes...  :Very Happy: 

Update: Still hitting the rsync "Some files could not be transferred bug" with the cygwin rsync 2.6.3.

Update 2: ... and the same problem with rsync 2.6.0. Is it due to my RAM, or... ?  :Confused: 

Update 3: After reading this post, my thinking is that since Cygwin's file access is very, very slow, Portage gets updated while I'm syncing and hence the error. If only I could hack the rsync source to stop it from aborting.  :Sad: 

----------

## rush_ad

has anyone tried this out on suse 9.2? i was thinking about installing portage on suse 9.2 but dont know how to use the script. can someone please explain me step by step. 

total dummy here.

----------

## devsk

 *rush_ad wrote:*   

> has anyone tried this out on suse 9.2? i was thinking about installing portage on suse 9.2 but dont know how to use the script. can someone please explain me step by step. 
> 
> total dummy here.

 cut and paste the script code from the post and put it in a file /tmp/install-portage.sh, then 'chmod +x /tmp/install-portage.sh'. login as root and run '/tmp/install-portage.sh'.

----------

## rush_ad

do i need to download anything and put that in the same folder? or just the script is fine?

do i need to install the portage tarball before using the script

----------

## devsk

no.

----------

## rush_ad

do you know if doing this would make suse not function in anyway? planning to try this out once i get home.

----------

## devsk

 *rush_ad wrote:*   

> do you know if doing this would make suse not function in anyway? planning to try this out once i get home.

 depends on how far you push it and what you emerge. its good for getting all the latest patches and many custom kernels. not to forget user level packages like gnome/kde. Its not good for packages which run as daemons/services.

PS: by 'it' I mean portage on 'non-gentoo' system.

----------

## dlong500

I think I'm well on my way to getting services like apache working on my Redhat 9 VPS when installed by portage.

I took your idea, devsk, of installing baselayout to the temp directory and then copying over certain files.  I then modified the Redhat-style init script for apache to simply call the gentoo init script for the start, stop, and reload commands.  Everything seems to be working both when calling the Gentoo-style script directly and through the Redhat-style script, so the next step I suppose is to try restarting the VPS (I'm a little scared).  I'm hoping that everything the Gentoo-style script needs is available at the time the system runs the Redhat-style wrapper script.

If this works, then I guess it's on to Mysql!!

I'm sure I've done things that were unnecessary and/or have left uneeded junk lying around my system, but I'll post the steps I went through to get it all working.  It actually wasn't as hard as I thought it would be (assuming my system boots back up properly).  Long live portage!

----------

## devsk

make sure you note all that you did somewhere. and then don't forget to post back here... :Smile: 

----------

## dlong500

Ok, here is the rundown on what I have done so far to my Redhat 9 VPS.

1) I ran the script devsk posted at the beginning of this thread

2) I emerged m4, automake, autoconf and libtool (and a few of their dependencies)

3) I created symlinks to /dev/null in /var/lib/init.d/started/ for common services that Portage looks for when installing applications.  These services are handled by Redhat, so we fool portage:

```
ln -s /dev/null checkfs

ln -s /dev/null checkroot

ln -s /dev/null clock

ln -s /dev/null hostname

ln -s /dev/null localmount

ln -s /dev/null modules

```

4) I emerged a whole bunch of other programs (see below for entire list of emerged apps so far)

5) In order to try getting gentoo installed services (like Apache, Mysql), I did the following:

```
ebuild sys-apps/baselayout-1.9.4-r6.ebuild install

cp /var/tmp/portage/baselayout-1.9.4-r6/image/sbin/runscript /sbin/

cp /var/tmp/portage/baselayout-1.9.4-r6/image/sbin/runscript.sh /sbin/

cp /var/tmp/portage/baselayout-1.9.4-r6/image/sbin/start-stop-daemon /sbin/

cp /var/tmp/portage/baselayout-1.9.4-r6/image/sbin/rc /sbin/

cp -R /var/tmp/portage/baselayout-1.9.4-r6/image/lib/rcscripts/sh /lib/rcscripts

```

6) I opted to let Redhat handle dependency checking by creating wrapper scripts to control the gentoo style init scripts (It would be too much work to hack rc-update to work with the Redhat init system considering the small number of portage installed daemons I'm going to work with.)  The following is a wrapper script I wrote for apache2:

```
#!/bin/bash

#

# Redhat Wrapper for Gentoo Startup script for the Apache Web Server

#

# chkconfig: - 85 15

# description: Apache is a World Wide Web server.  It is used to serve \

#              HTML files and CGI.

# processname: apache2

# pidfile: /var/run/apache2.pid

# config: /etc/httpd/conf/httpd.conf

# Source function library.

. /etc/rc.d/init.d/functions

start() {

        /etc/init.d/apache2 start

        RETVAL=0

        return $RETVAL

}

stop() {

        /etc/init.d/apache2 stop

        RETVAL=0

}

reload() {

        /etc/init.d/apache2 reload

        RETVAL=0

}

# See how we were called.

case "$1" in

  start)

        start

        ;;

  stop)

        stop

        ;;

  status)

        status $httpd

        RETVAL=$?

        ;;

  restart)

        stop

        start

        ;;

  condrestart)

        if [ -f /var/run/httpd.pid ] ; then

                stop

                start

        fi

        ;;

  reload)

        reload

        ;;

  graceful|help|configtest|fullstatus)

        $apachectl $@

        RETVAL=$?

        ;;

  *)

        echo $"Usage: $prog {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}"

        exit 1

esac

exit $RETVAL

```

This script (called httpd) simply passes commands to the gentoo-style script (apache2).  This script is linked to the proper runlevels in Redhat's init system so I don't even have to mess with Gentoo-style runlevel handling.  I could probably enhance this some for logging purposes to capture the result of the gentoo-style script and use that to create a return value instead of just hard-coding a success value.

7) I've tested rebooting my VPS and Apache2 starts up just fine.  I'm currently working on getting Mysql installed by portage (just making sure none of the dependencies will mess with anything).

The following is the list of portage installed apps/utilities so far:

app-arch/bzip2 *

app-arch/cpio *

app-arch/gzip *

app-arch/ncompress *

app-arch/tar *

app-portage/gentoolkit *

app-portage/ufed *

app-shells/bash *

app-shells/sash *

dev-lang/perl *

dev-lang/python *

dev-libs/expat *

dev-libs/openssl *

dev-libs/popt *

dev-perl/Locale-gettext *

dev-perl/TermReadKey *

dev-python/python-fchksum *

dev-util/ccache *

dev-util/dialog *

dev-util/yacc *

net-misc/iputils *

net-misc/rsync *

net-misc/wget *

net-www/apache *

sys-apps/coreutils *

sys-apps/debianutils *

sys-apps/diffutils *

sys-apps/findutils *

sys-apps/gawk *

sys-apps/grep *

sys-apps/groff *

sys-apps/help2man *

sys-apps/less *

sys-apps/portage *

sys-apps/procps *

sys-apps/sed *

sys-apps/texinfo *

sys-apps/which *

sys-devel/autoconf *

sys-devel/autoconf-wrapper *

sys-devel/automake *

sys-devel/automake-wrapper *

sys-devel/bc *

sys-devel/binutils *

sys-devel/binutils-config *

sys-devel/bison *

sys-devel/flex *

sys-devel/gcc *

sys-devel/gcc-config *

sys-devel/gettext *

sys-devel/gnuconfig *

sys-devel/libperl *

sys-devel/libtool *

sys-devel/m4 *

sys-devel/make *

sys-devel/patch *

sys-libs/db *

sys-libs/gdbm *

sys-libs/gpm *

sys-libs/ncurses *

sys-libs/readline *

sys-libs/zlib *

The one thing I'm trying to figure out is how I can remove entries from the RPM database without affecting files installed by Portage.  In other words, if I didn't remove an app using 'rpm -e <app>' before emerging it, how can I remove the entry from the RPM database without screwing up the portage installed app?

I'll post more as I get further... :Very Happy: 

----------

## devsk

 *dlong500 wrote:*   

> 
> 
> This script (called httpd) simply passes commands to the gentoo-style script (apache2).  This script is linked to the proper runlevels in Redhat's init system so I don't even have to mess with Gentoo-style runlevel handling.  I could probably enhance this some for logging purposes to capture the result of the gentoo-style script and use that to create a return value instead of just hard-coding a success value.
> 
> 

 

I usually name the red hat wrappers with .rh extension so that portage can keep on overwriting its scripts. Is apache2 the name of the gentoo script for apache or you renamed it that way? I don't see much point of doing the latter.

----------

## dlong500

Yes, appending a .rh extension sounds like a good idea that I'll start using, but to answer your question, portage created the apache2 init script with that name, so I just used httpd (which was previously the redhat name for the apache init script).

By the way, I see you have mentioned that glibc should not be emerged, but what about glib?  Are there any others besides the ones you mentioned (baselayout, glibc) that you have had trouble with?  So far I've had good luck (with a few hiccups along the way, such as having to disable sandbox for coreutils).  I now have mysql under portage control as well.  Soon will come vpopmail and horde!

----------

## devsk

 *dlong500 wrote:*   

> Yes, appending a .rh extension sounds like a good idea that I'll start using, but to answer your question, portage created the apache2 init script with that name, so I just used httpd (which was previously the redhat name for the apache init script).
> 
> By the way, I see you have mentioned that glibc should not be emerged, but what about glib?  Are there any others besides the ones you mentioned (baselayout, glibc) that you have had trouble with?  So far I've had good luck (with a few hiccups along the way, such as having to disable sandbox for coreutils).  I now have mysql under portage control as well.  Soon will come vpopmail and horde!

 

glib is fine. in fact, all of gnome/kde packages and its dependencies are ok to emerge. X is another thing which operates differently, only slightly though. the package contents were very different and I never took the chance. apart from that I don't remeber anything.

----------

## dlong500

 *devsk wrote:*   

> glib is fine. in fact, all of gnome/kde packages and its dependencies are ok to emerge. X is another thing which operates differently, only slightly though. the package contents were very different and I never took the chance. apart from that I don't remeber anything.

 

Cool.  Fortunately I don't need to install anything gui related being that this system is a remote VPS, so X is not an issue.  It won't be too long till I've got just about everything under portage control.  Oh, I forgot to ask about one thing: what about emerging linux-headers?  Would this mess with things given that I'm using a redhat-compiled kernel versus one that came through portage?  I guess I'm not exactly sure what those headers are used for...

----------

## devsk

 *dlong500 wrote:*   

>  *devsk wrote:*   glib is fine. in fact, all of gnome/kde packages and its dependencies are ok to emerge. X is another thing which operates differently, only slightly though. the package contents were very different and I never took the chance. apart from that I don't remeber anything. 
> 
> Cool.  Fortunately I don't need to install anything gui related being that this system is a remote VPS, so X is not an issue.  It won't be too long till I've got just about everything under portage control.  Oh, I forgot to ask about one thing: what about emerging linux-headers?  Would this mess with things given that I'm using a redhat-compiled kernel versus one that came through portage?  I guess I'm not exactly sure what those headers are used for...

 

glibc compiles against kernel headers...I picked up matching versions from a gentoo box and did emerge on linux26_headers, and updated my glibc to appropriate yum version. After that I emerged 2.6.9 nitro2 kernel. The setup (alongwith suspend to disk) has been so stable that I haven't upgraded after that.

unless you want a custom kernel, you can leave all these alone and let yum manage it.

----------

## dlong500

Ok I've got a question...

I've set up wrapper scripts to call the gentoo-style init scripts for apache2, mysql, and svscan (qmail).  Everything works fine at first, but I discovered that when I used a reboot command none of the shutdown scripts for those above mentioned daemons ran.  So, upon restarting, the wrapper scripts called the gentoo-style scripts but it didn't work because runscript thought the daemons were already started!  I had to use the 'zap' command to clear them.

I then tried to use the shutdown command instead (shutdown -r now) but this still does not seem to run the shutdown scripts for those daemons.  So that means every time I shutdown/reboot none of those daemons come back up because runscript thinks they're already running.  Even worse, if the hosting provider were to take the system down when I'm gone for some reason, the daemons won't come back up when they put the system back online!!  How can I get around this?

First, why are the shutdown scripts not running on a normal shutdown command? (The K symlinks are present in runlevels 0, 1, and 6)

Second, what happens if something crashes so the system is restarted without running the shutdown scripts?  Does this mean I will have to manually go in and 'zap' those daemons' init scripts before I can restart them?  That would be unacceptable for a system hosting websites and email...

Please help!! :Confused: 

----------

## dearborn98

I need help installing portage on Fedora Core 1.  I paste the script line for line.  I recieve no errors up to the first "emerge -O portage" , at which point I get this error:

/usr/lib/portage/bin/ebuild.sh: line 255: einfo: command not found

/usr/lib/portage/bin/ebuild.sh: line 277: einfo: command not found

/usr/lib/portage/bin/ebuild.sh: line 279: einfo: command not found

/usr/lib/portage/bin/ebuild.sh: line 280: einfo: command not found

/usr/lib/portage/bin/ebuild.sh: line 281: einfo: command not found

/usr/lib/portage/bin/ebuild.sh: line 283: ewarn: command not found

/usr/lib/portage/bin/ebuild.sh: line 284: ewarn: command not found

/usr/lib/portage/bin/ebuild.sh: line 285: ewarn: command not found

/usr/lib/portage/bin/ebuild.sh: line 286: ewarn: command not found

/usr/lib/portage/bin/ebuild.sh: line 287: ewarn: command not found

/usr/lib/portage/bin/ebuild.sh: line 289: einfo: command not found

/usr/lib/portage/bin/ebuild.sh: line 291: einfo: command not found

/usr/lib/portage/bin/ebuild.sh: line 292: einfo: command not found

/usr/lib/portage/bin/ebuild.sh: line 293: einfo: command not found

Recalculating the counter... Counter updated successfully.

/usr/lib/portage/bin/ebuild.sh: line 336: einfo: command not found

/usr/lib/portage/bin/ebuild.sh: line 386: einfo: command not found

/usr/lib/portage/bin/ebuild.sh: line 387: einfo: command not found

/usr/lib/portage/bin/ebuild.sh: line 388: einfo: command not found

/usr/lib/portage/bin/ebuild.sh: line 389: einfo: command not found

>>> Regenerating /etc/ld.so.cache...

>>> sys-apps/portage-2.0.51.19 merged.

>>> clean: No packages selected for removal.

After this error reporting, I can still paste the rest of the script up to the end with no other errors.   When I reboot, kde will not start, I only get a log-on screen.

Can any one help?

----------

## devsk

those errors are fine from first run. installing portage can not screw up kde. did you emerge anything after installing? even if you emerge kde and then logout and login, it should just work. I did the same thing and kde works fine.

wait a minute...does redhat install kde in /usr/lib/kde3 or something like that? I think portage updated your /etc/ld.so.conf with paths like /lib, /usr/lib, /usr/X11R6/lib but didn't include the ones it didn't know about. post your /etc/ld.so.conf.

btw, your portage install is gone through fine...

edit: I have updated the script to not screw up the existing ld.so.conf. (But, that doesn't mean you can run the updated script and get your kde to run as before because now script will be using the changed ld.so.conf to build the new ld.so.conf)Last edited by devsk on Thu Mar 10, 2005 8:02 pm; edited 2 times in total

----------

## devsk

 *dlong500 wrote:*   

> Ok I've got a question...
> 
> I've set up wrapper scripts to call the gentoo-style init scripts for apache2, mysql, and svscan (qmail).  Everything works fine at first, but I discovered that when I used a reboot command none of the shutdown scripts for those above mentioned daemons ran.  So, upon restarting, the wrapper scripts called the gentoo-style scripts but it didn't work because runscript thought the daemons were already started!  I had to use the 'zap' command to clear them.
> 
> I then tried to use the shutdown command instead (shutdown -r now) but this still does not seem to run the shutdown scripts for those daemons.  So that means every time I shutdown/reboot none of those daemons come back up because runscript thinks they're already running.  Even worse, if the hosting provider were to take the system down when I'm gone for some reason, the daemons won't come back up when they put the system back online!!  How can I get around this?
> ...

 

dlong, it should work. I am not sure why its not working. I probably need to look into daemon start/stop program.

----------

## dlong500

 :Cool:  Ok, I figured it out...

I knew there was something I was missing about how the Redhat init/shutdown system worked.  What happened is that I had not put a line in my Redhat wrapper scripts to create a file in the '/var/lock/subsys' directory.  Evidently, this is the Redhat equivalent of the Gentoo 'var/lib/init.d/started' directory.  It only executes shutdown scripts for files listed in this directory, and since I had not put entries in there upon each daemon startup, it never included apache, mysql, or svscan in the shutdown script run-through.

Now here's where it gets compounded...

The Redhat init system clears the '/var/lock/subsys' directory upon rebooting (obviously because the programs CAN'T be running at that time), but it does not clear the 'var/lib/init.d/started' directory, because (of course) it is Redhat, not Gentoo.  So when the wrapper scripts called the Gentoo init scripts for the daemons, the start-stop-daemon looked at 'var/lib/init.d/started' and complained that the programs were already running!

So.... here's what I did.  I modified the Redhat wrapper scripts to add the necessary info for the Redhat init/shutdown system to function properly (as in the apache2.rhw script below):

```
#!/bin/bash

#

# Redhat Wrapper for Gentoo Startup script for the Apache Web Server

#

# chkconfig: 2345 85 50

# description: Apache is a World Wide Web server.  It is used to serve \

#              HTML files and CGI.

# processname: apache2

# pidfile: /var/run/apache2.pid

# config: /etc/apache2/conf/apache2.conf

# Source function library.

. /etc/rc.d/init.d/functions

start() {

        /etc/init.d/apache2 start

        RETVAL=$?

        if [ $RETVAL = 0 ]; then

                touch /var/lock/subsys/apache2.rhw

        else

                rm -f /var/lib/init.d/started/apache2

        fi

        return $RETVAL

}

stop() {

        /etc/init.d/apache2 stop

        RETVAL=$?

        [ $RETVAL = 0 ] && rm -f /var/lock/subsys/apache2.rhw /var/run/apache2.pid /var/lib/init.d/started/apache2

        return $RETVAL

}

reload() {

        /etc/init.d/apache2 reload

        RETVAL=$?

        return $RETVAL

}

# See how we were called.

case "$1" in

  start)

        start

        ;;

  stop)

        stop

        ;;

  restart)

        stop

        start

        ;;

  reload)

        reload

        ;;

  *)

        echo $"Usage: $prog {start|stop|restart|reload}"

        exit 1

esac

exit $RETVAL

```

This should get the shutdown script to run under normal conditions, but in order to make sure that a system crash wouldn't leave start-stop-daemon thinking that apache was running, I created the following init script that clears the '/var/lib/init.d/started/' directory at bootup, and then resets the fake symlinks for the few programs we don't want gentoo init scripts to complain about:

```
#!/bin/bash

#

# Redhat Wrapper to initialize subsystem for Gentoo-style init scripts

#

# chkconfig: 2345 15 15

# description: Subsystem initialization for Gentoo-style init scripts

# processname: gentoo-init.rhw

# See how we were called.

case "$1" in

  start)

        if [ -f /var/lock/subsys/gentoo-init.rhw ] ; then

                echo $"Subsystem has already been initialized"

                exit 1

        fi

        source /etc/init.d/functions.sh

        # clear gentoo-style init script started directory

        rm -f $svcdir/started/*

        # obviate the startup of these dependencies

        for dep in checkfs checkroot clock hostname localmount modules

        do

                ln -sf /dev/null "$svcdir/started/$dep"

        done

        touch /var/lock/subsys/gentoo-init.rhw

        RETVAL=0

        ;;

  stop)

        RETVAL=0

        ;;

  *)

        echo $"Usage: $prog {start|stop}"

        exit 1

esac

exit $RETVAL

```

This way, even a crash (or any other event that causes shutdown scripts to not be run) will not interfere with starting the daemons.

Mixing two different init systems is a bit more complicated than I thought it would be, but I think everything is straight now.  I'm gradually getting to where I want to be with this system. :Smile: 

Edit: I should note that the idea for the startup initialization script was based off reading the following page made by someone giving instructions for running Gentoo in a chrooted environment on a Redhat system.  While not quite the same idea as installing portage on another distro, it gives some valuable information concerning the interaction of gentoo scripts with a Redhat environment:

http://kapcoweb.com/p/static/docs/jc-gentoo-howto/jc-gentoo-howto.htmlLast edited by dlong500 on Thu Mar 10, 2005 8:03 pm; edited 1 time in total

----------

## thoffmeyer

Love this, when I was running slackware, I put portage on it  :Razz: 

----------

## dearborn98

devsk:

Just wanted to say thank you.  My Fedora 1 system is up and running with portage.

I use partition magic, so I always keep a copy of my operating system for back-up.  I copied over my back-up system, re-ran the new scritp, everything runs fine now, including portage.

As weird as it may sound, I'm now going to try to install portage on SuSE 9.2.  Any suggestions?

I have another computer installed with a Live CD Gentoo installation from scratch.  It's running great, too.

I'm hooked on Gentoo. Portage a great feature!!!

You mentioned after the scripts, that services should not be emerged on other distros with portage.  What do you mean by sevices?  Do you mean web, mail, and other internet packages?

Anyways, thanks again for your help.   :Smile: 

----------

## devsk

 *Quote:*   

> You mentioned after the scripts, that services should not be emerged on other distros with portage. What do you mean by sevices? Do you mean web, mail, and other internet packages? 

 please follow the posts above by dlong. that's exactly what we are discussing there. If you want to use portage for installing, setting andstarting up service daemons (like the ones mentioned by dlong), you need to do what dlong did. Its slightly involved and very doable and stable.

I wanna take a moment to thank dlong for reverse engineering some of the startup/shutdown issues and updating us here. Thanks, dlong!

----------

## semijoyful

I absolutely love Gentoo.  It's great to really get a crash test into Linux with that OS; however, I am currently running Fedora 3 on my system.  I'm confused on what rescue file I'm supposed to download.  I went to http://dev.gentoo.org/~carpaski/portage_rescue/, but I'm not sure which x86 file I need.  Can someone steer me in the right direction.  I'll post my results when I can.

Thnx-Semijoyful:D

----------

## dlong500

 *semijoyful wrote:*   

> I absolutely love Gentoo.  It's great to really get a crash test into Linux with that OS; however, I am currently running Fedora 3 on my system.  I'm confused on what rescue file I'm supposed to download.  I went to http://dev.gentoo.org/~carpaski/portage_rescue/, but I'm not sure which x86 file I need.  Can someone steer me in the right direction.  I'll post my results when I can.
> 
> Thnx-Semijoyful:D

 

I would think you would want portage-rescue-2.0.51-r14-x86.tbz2 assuming your system is the x86 platform.  That said, the script seems to work great for me.

----------

## semijoyful

Thanks for the information.  I went ahead and copy and pasted the first script and ran it.  I then copy and pasted the second script and ran that one.  To see if I was successful, I ran emerge.  The thing was that I received the following message before it started emerging:

```
portage: 'portage' user or group missing. Please update baselayout

         and merge portage user(250) and group(250) into your passwd

         and group files. Non-root compilation is disabled until then.

         Also note that non-root/wheel users will need to be added to

         the portage group to do portage commands.

         For the defaults, line 1 goes into passwd, and 2 into group.

         portage:x:250:250:portage:/var/tmp/portage:/bin/false

         portage::250:portage
```

On top of that, when it does emerge, it gives me this for example:

```
01:24:39 (98.16 KB/s) - `/usr/portage/distfiles/texinfo-4.8.tar.bz2' saved [1,521,822/1,521,822]

>>> md5 src_uri ;-) texinfo-4.8.tar.bz2

>>> Merging sys-apps/texinfo-4.8 to /

find: /var/tmp/portage/texinfo-4.8/image//: No such file or directory

find: /var/tmp/portage/texinfo-4.8/image//: No such file or directory

>>> Regenerating /etc/ld.so.cache...

>>> sys-apps/texinfo-4.8 merged.

>>> clean: No packages selected for removal.
```

The "No such file or directory" bothers me.

What did I do wrong, and how can I fix it?

Thank you for all your help!

-Semijoyful:)

----------

## devsk

post output of 

```
id -a portage
```

----------

## semijoyful

Here's the output.  I thought that the first error was because I wasn't logged on as root, so I tried it again just for kicks.  I must have missed something?

```
[freshjoy@localhost ~]$ id -a portage

id: portage: No such user

[freshjoy@localhost ~]$ su

Password:

[root@localhost freshjoy]# id -a portage

id: portage: No such user

[root@localhost freshjoy]#
```

Thankful,

Semijoyful

----------

## kimchi_sg

 *semijoyful wrote:*   

> I must have missed something?
> 
> ```
> [freshjoy@localhost ~]$ id -a portage
> 
> ...

 

Why don't you just add the users as Portage suggests? Even the lines to paste into /etc/passwd and /etc/group are provided to you.

----------

## semijoyful

Well, like I said I'm a n00b of sorts.  I definitely learned a lot when I was setting up Gentoo.  Anyways, I don't currently have a /etc/group or etc/passwd.  I don't know if me running Fedora 3 has anything to do with that.

Trying to learn,

-Semijoyful

----------

## devsk

```
groupadd -g 250 portage

useradd -d /var/tmp/portage -g portage -u 250 portage 
```

----------

## semijoyful

I thank you for the code, but it's not working:

```
[root@localhost freshjoy]# groupadd -g 250 portage

bash: groupadd: command not found

[root@localhost freshjoy]# useradd -d /var/tmp/portage -g portage -u 250 portage
```

Any ideas?

-Semijoyful[/quote]

----------

## kimchi_sg

 *semijoyful wrote:*   

> I thank you for the code, but it's not working:
> 
> ```
> [root@localhost freshjoy]# groupadd -g 250 portage
> 
> ...

 

Maybe they are called addgroup and adduser respectively.

Also, if you installed the "System Administration" packages during the Fedora install, there should be a graphical control panel for managing users and groups. You can use that instead.

----------

## devsk

 *semijoyful wrote:*   

> I thank you for the code, but it's not working:
> 
> ```
> [root@localhost freshjoy]# groupadd -g 250 portage
> 
> ...

 [/quote]that explains why the script didn't create  it. your user 'root' is pretty much screwed because he doesn't have /usr/sbin and /sbin in his path and that's where most of the admin utilities are...I will update the script to use /usr/sbin/useradd instead of depend on the PATH to find useradd etc.

----------

## semijoyful

devsk and others, thank you for helping me through this.  I think I just about got it.  I am curious about some stuff that showed up towards the end of the code:

```
[root@localhost sbin]# emerge -O portage

Calculating dependencies ...done!

>>> emerge (1 of 1) sys-apps/portage-2.0.51.19 to /

>>> md5 src_uri ;-) portage-2.0.51.19.tar.bz2

>>> Merging sys-apps/portage-2.0.51.19 to /

find: /var/tmp/portage/portage-2.0.51.19/image//: No such file or directory

find: /var/tmp/portage/portage-2.0.51.19/image//: No such file or directory

 * Checking //var/lib/portage for bad/illegal files:

 * Feature additions are noted in help and make.conf descriptions.

 * Update configs using 'etc-update' please. Maintaining current configs

 * for portage and other system packages is fairly important for the

 * continued health of your system.

 * NOTICE: There have been changes in the location of some internal files

 *         to better match the FHS. The changes do not directly affect users

 *         but please be advised that changing between versions of portage

 *         with and without these changes may introduce some inconsistencies

 *         in package data regarding 'world' and 'virtuals' (provides).

 *         /var/cache/edb/world has moved to /var/lib/portage/world

 *         /var/cache/edb/virtuals has been deprecated and is now calculated

 *         on demand. Strictly _USER_ modifications to virtuals may go into

 *         /etc/portage/profile/virtuals and will not be modified by portage.

Recalculating the counter... Counter updated successfully.

 * Compiling python modules...

 * You may run 'emerge metadata' to perform cache updates if you have

 * changed versions of portage. This will provide a fairly dramatic

 * speedup. Alternatively, you may 'emerge sync' if it has been more

 * than 30 minutes since your last sync.

>>> Regenerating /etc/ld.so.cache...

 * Caching service dependencies...

gawk: /lib/rcscripts/awk/cachedepends.awk:73: fatal: extension: cannot open `/lib/rcscripts/filefuncs.so' (/lib/rcscripts/filefuncs.so: cannot open shared object file: No such file or directory)

bash: /var/lib/init.d/depcache: No such file or directory

>>> sys-apps/portage-2.0.51.19 merged.

>>> clean: No packages selected for removal.

>>> Auto-cleaning packages ...

>>> No outdated packages were found on your system.
```

Should I be concerned about any of this?

Obrigado!

-Semijoyful

----------

## devsk

 *semijoyful wrote:*   

> 
> 
> Should I be concerned about any of this?
> 
> Obrigado!
> ...

 

find problem, yes!

do this :

```
emerge -O gawk

emerge -O findutils

emerge -O portage
```

----------

## devsk

 *kimchi_sg wrote:*   

> 
> 
> [list=1][*]emerge --sync refuses to go to updating the cache for some reason. I have set 
> 
> ```
> ...

 

its not rsync, but the portage tree which is corrupt with filenames which don't make sense inside of cygwin. The files in question are:

```
/usr/portage/dev-lang/ruby/files/ruby-1.8.0-CGI::Session.patch

/usr/portage/dev-ruby/shim-ruby18/files/shim-ruby18-CGI::Session.patch
```

':' can't be escaped either. So, file creation will always fail with 'Invalid argument'. emerge-webrsync will also fail because even tar can't create this file.

And because rsync fails to to copy these files, emerge thinks that rsync failed and hence restarts it.

I made a custom portage tree sans these files on another system and 'emerge metadata' went fine. I can emerge programs normally(I updated less, patch just for kicks) but there are lot of porting issues like filename "//var/db" is not valid on cygwin because it starts searching network path, while on linux its same as "/var/db". Then there are tonnes of file locking issues and there are some bugs in portage python code. And I am not sure if people at gentoo are very receptive of bug fixes for operating systems outside of Linux(I faced lot of problems fixing issues for solaris for example).

Currently, I don't have much time otherwise I could peruse it further. May be later sometime.

If they fix issues with "//" in pathnames, this port seems easier than solaris.

PS: you can create root:root, portage:portage on cygwin. Following assumes that you know passwd/group file formats.

Create root user, portage group, wheel group, portage2 user in windows 2000. Assign groups to newer users as needed. Then do mkpasswd -l > /etc/passwd and mkgroup -l > /etc/group to create /etc/passwd and /etc/group. Edit /etc/group to COPY PASTE (NOT cut paste) line containing Administrators and change Administrators to root and last field to '0'. Make wheel's group id be 10 and portage groupid be 250. Edit /etc/passwd to assign userid '0' to root. 'id -a root' should now list 0 for userid and 0 for gid. Also manually edit entry for portage2 user and make it portage and assign userid '250'. Remember that you should NOT touch fields starting with "S-", those are SIDs used by cygwin to map to real user/group in windows system.

after re-login, you should essentially end up with linux like users for portage and root. Make sure to make a copy of these files somewhere because mkpasswd/mkgroup again and these changes are history.

----------

## mrnegitoro

Hi, 

Is the most recent version of your script at the very beginning of this topic? I'm running Slackware 10.1 and I don't really want to do a whole reinstall with Gentoo or be bother to back up all my data. Portage is a much better system than slapt-get (I find). Will my Slackware box basically become a Gentoo box? Is this a stupid question? 

Thanks for such an excellent script!

----------

## devsk

 *Quote:*   

> Is the most recent version of your script at the very beginning of this topic?

 that's pretty much it.

 *Quote:*   

> Will my Slackware box basically become a Gentoo box?

 

no, your box will become a hybrid... :Smile:  gendora or slackgen or whatever you wanna call it. There are issues with startup/shutdown scripts for daemons/services, because they are essentially different on different distros. If you threads 7,8,9 you will get a wealth of knowledge about fedora integration, which you can probably apply to slackware.

----------

## mrnegitoro

Hi again,

I have a Slackgen box now! Thanks!

However, I can't help myself, I must ask another "newbie" question. On your Fedora Red Hat box are you emerging over all your rpm binary installs? I assume I should uninstall any Slackware packages I have that I might wish to then reinstall using portage?

Thanks again!

----------

## devsk

 *mrnegitoro wrote:*   

> Hi again,
> 
> I have a Slackgen box now! Thanks!
> 
> However, I can't help myself, I must ask another "newbie" question. On your Fedora Red Hat box are you emerging over all your rpm binary installs? I assume I should uninstall any Slackware packages I have that I might wish to then reinstall using portage?
> ...

 its fine to overwrite because portage resolves dependencies and will install lowest level packages first. So, you won't get into situations where your emerge will fail because of existing old install files. Morever, whenever applicable, portage points newer packages to its own installed packages for builds.

there is some cruft left from rpm install. So, usually I would recommend un-install the app if it is safe to do so and then emerge.

----------

## rush_ad

anybody had luck installing this on SuSE? does it conflict with YaST?

----------

## rush_ad

i am going to try it on suse 9.3 when it is released, it will be soon.

----------

## dearborn98

Was able to install portage on SUSE 9.1 .  Had problems with this part of the script:

cd ../src/python-missingos

   ./setup.py install 

Showed errors relating to python, even after changing the python2.2 to python2.3 in the setup.py script.  I dug up a python2.2-src.rpm from an older version of SUSE, installed it with YAST.  I also used devsk export:

export PYTHONPATH=/usr/lib/python2.3/site-packages:/usr/lib/python2.2/site-packages

Script worked fine afterwords.

When I installed portage on SuSE 9.2, I pasted the script line for line.  I had to change a few lines in order to get emerge --sync to work without any errors.  

To make this script work, I also had to change the python2.2 to python2.3 in the /python-missingos setup.py file.  I do not know how to add this change to the script so as to make the whole script work from start to finish.

This is the part of the script that I had to change to get portage to work on my SuSE 9.2 (along with python2.2 to python2.3 in setup.py) :

#!/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 /usr/local/portage

   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

   mkdir -p /usr/man/man1

   mkdir -p /usr/man/man5

   mkdir -p /usr/portage/sys-apps/portage/files

   cd /usr/portage/sys-apps/portage/files

   wget http://dev.gentoo.org/~carpaski/portage_rescue/portage-rescue-2.0.51-r14-x86.tbz2

   cd /tmp

   rm -rf portage-2.0.51.18                                                                     

   wget ftp://gentoo.mirrors.pair.com/distfiles/portage-2.0.51.18.tar.bz2 -O /tmp/portage-2.0.51.18.tar.bz2

   if [ ! -f portage-2.0.51.18.tar.bz2 ];then

      echo ""

      echo "Mirror error. Try this script again after a while without any args".

      echo ""

      exit 1

   fi

   tar jxf portage-2.0.51.18.tar.bz2

   export PYTHONPATH=/usr/lib/python2.3/site-packages:/usr/lib/python2.2/site-packages

   cd portage-2.0.51.18/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/man/man1 ;cp *.5 /usr/man/man5

   cd /usr/portage/sys-apps/portage/files

   tar xjpUvf portage-rescue-2.0.51-r14-x86.tbz2

   cd /tmp/portage-2.0.51.18/src/python-missingos

   ./setup.py install

   cd ../sandbox-1.1

   make && make install

   cd ../../cnf; cp * /etc

I Didn't like SUSE 9.2 as much as 9.1, to me it seemed to run slower than SUSE 9.1.

SUSE 9.1 and 9.2 seems to be stable with portage.   :Smile: 

YAST still works good.  Still able to install programs with YAST.  The SUSE updater (susewatcher) is still updating the system via internet.

----------

## rush_ad

this is what i get on suse 9.3\\

EDIT: using the above script. i also get erros using the scipt on  the first page.

```
linux:/home/pankaj # /tmp/install-portage.sh

--10:17:48--  http://dev.gentoo.org/%7Ecarpaski/portage_rescue/portage-rescue-2.0.51-r14-x86.tbz2

           => `portage-rescue-2.0.51-r14-x86.tbz2'

Resolving dev.gentoo.org... 134.68.220.30

Connecting to dev.gentoo.org[134.68.220.30]:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 330,151 [text/plain]

100%[====================================>] 330,151      453.97K/s

10:17:49 (452.86 KB/s) - `portage-rescue-2.0.51-r14-x86.tbz2' saved [330151/330151]

--10:17:49--  ftp://gentoo.mirrors.pair.com/distfiles/portage-2.0.51.18.tar.bz2

           => `/tmp/portage-2.0.51.18.tar.bz2'

Resolving gentoo.mirrors.pair.com... 216.92.2.140

Connecting to gentoo.mirrors.pair.com[216.92.2.140]:21... connected.

Logging in as anonymous ... Logged in!

==> SYST ... done.    ==> PWD ... done.

==> TYPE I ... done.  ==> CWD /distfiles ... done.

==> PASV ... done.    ==> RETR portage-2.0.51.18.tar.bz2 ...

No such file `portage-2.0.51.18.tar.bz2'.

bzip2: Compressed file ends unexpectedly;

        perhaps it is corrupted?  *Possible* reason follows.

bzip2: Inappropriate ioctl for device

        Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.

You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover

data from undamaged sections of corrupted files.

tar: Child returned status 2

tar: Error exit delayed from previous errors

/tmp/install-portage.sh: line 49: cd: portage-2.0.51.18/bin: No such file or directory

cp: omitting directory `gconfd-pankaj'

cp: omitting directory `gconfd-root'

cp: omitting directory `hsperfdata_pankaj'

cp: omitting directory `kde-pankaj'

cp: omitting directory `ksocket-pankaj'

cp: omitting directory `orbit-pankaj'

cp: cannot open `OSL_PIPE_1000_SingleOfficeIPC_3f2f44c6e7b6dbc1b90d8f6eac2d389' for reading: No such device or address

/tmp/install-portage.sh: line 52: cd: ../pym: No such file or directory

cp: omitting directory `gconfd-pankaj'

cp: omitting directory `gconfd-root'

cp: omitting directory `hsperfdata_pankaj'

cp: omitting directory `kde-pankaj'

cp: omitting directory `ksocket-pankaj'

cp: omitting directory `orbit-pankaj'

cp: cannot open `OSL_PIPE_1000_SingleOfficeIPC_3f2f44c6e7b6dbc1b90d8f6eac2d389' for reading: No such device or address

/tmp/install-portage.sh: line 53: cd: ../man: No such file or directory

cp: cannot stat `*.1': No such file or directory

cp: cannot stat `*.5': No such file or directory

./

tar: .: Cannot mkdir: No such file or directory

./etc/

./etc/make.globals

./etc/etc-update.conf

./etc/dispatch-conf.conf

./etc/make.conf.example

./lib/

./lib/libsandbox.so

./var/

./var/tmp/

./var/tmp/.keep

./usr/

./usr/bin/

./usr/bin/xpak

./usr/bin/repoman

./usr/bin/g-cpan.pl

./usr/bin/portageq

./usr/bin/ebuild

./usr/bin/emerge

./usr/bin/quickpkg

./usr/bin/tbz2tool

./usr/lib/

./usr/lib/portage/

./usr/lib/portage/bin/

./usr/lib/portage/bin/fixpackages

./usr/lib/portage/bin/dispatch-conf-dialog

./usr/lib/portage/bin/domo

./usr/lib/portage/bin/xpak

./usr/lib/portage/bin/queryhost.sh

./usr/lib/portage/bin/fix-db.py

./usr/lib/portage/bin/dolib.so

./usr/lib/portage/bin/donewins

./usr/lib/portage/bin/mirror.py

./usr/lib/portage/bin/env-update

./usr/lib/portage/bin/fixdbentries

./usr/lib/portage/bin/repoman

./usr/lib/portage/bin/dopython

./usr/lib/portage/bin/dobin

./usr/lib/portage/bin/dodir

./usr/lib/portage/bin/dodoc

./usr/lib/portage/bin/doexe

./usr/lib/portage/bin/dojar

./usr/lib/portage/bin/doins

./usr/lib/portage/bin/dolib

./usr/lib/portage/bin/doman

./usr/lib/portage/bin/dosed

./usr/lib/portage/bin/dosym

./usr/lib/portage/bin/emake

./usr/lib/portage/bin/etc-update

./usr/lib/portage/bin/portage_gpg_update.sh

./usr/lib/portage/bin/doconfd

./usr/lib/portage/bin/doinitd

./usr/lib/portage/bin/dolib.a

./usr/lib/portage/bin/sandbox

./usr/lib/portage/bin/g-cpan.pl

./usr/lib/portage/bin/emerge-webrsync

./usr/lib/portage/bin/regenworld

./usr/lib/portage/bin/chkcontents

./usr/lib/portage/bin/portageq

./usr/lib/portage/bin/clean_locks

./usr/lib/portage/bin/prepstrip

./usr/lib/portage/bin/archive-conf

./usr/lib/portage/bin/ebuild

./usr/lib/portage/bin/doenvd

./usr/lib/portage/bin/dohard

./usr/lib/portage/bin/dohtml

./usr/lib/portage/bin/doinfo

./usr/lib/portage/bin/dosbin

./usr/lib/portage/bin/emerge

./usr/lib/portage/bin/fowners

./usr/lib/portage/bin/fperms

./usr/lib/portage/bin/newenvd

./usr/lib/portage/bin/newsbin

./usr/lib/portage/bin/prepallman

./usr/lib/portage/bin/pkgmerge.new

./usr/lib/portage/bin/db-update.py

./usr/lib/portage/bin/newbin

./usr/lib/portage/bin/newdoc

./usr/lib/portage/bin/newexe

./usr/lib/portage/bin/newins

./usr/lib/portage/bin/newman

./usr/lib/portage/bin/fixvardbentries

./usr/lib/portage/bin/dispatch-conf

./usr/lib/portage/bin/md5check.py

./usr/lib/portage/bin/md5check.sh

./usr/lib/portage/bin/ebuild.sh

./usr/lib/portage/bin/preplib.so

./usr/lib/portage/bin/pkgmerge

./usr/lib/portage/bin/prepinfo

./usr/lib/portage/bin/prepallstrip

./usr/lib/portage/bin/newconfd

./usr/lib/portage/bin/newinitd

./usr/lib/portage/bin/newlib.a

./usr/lib/portage/bin/quickpkg

./usr/lib/portage/bin/prepalldocs

./usr/lib/portage/bin/prepallinfo

./usr/lib/portage/bin/env-update.sh

./usr/lib/portage/bin/pkgname

./usr/lib/portage/bin/newlib.so

./usr/lib/portage/bin/find-requires

./usr/lib/portage/bin/tbz2tool

./usr/lib/portage/bin/fixvirtuals

./usr/lib/portage/bin/prepall

./usr/lib/portage/bin/preplib

./usr/lib/portage/bin/prepman

./usr/lib/portage/lib/

./usr/lib/portage/lib/sandbox.bashrc

./usr/lib/portage/pym/

./usr/lib/portage/pym/portage_const.py

./usr/lib/portage/pym/portage_db_anydbm.py

./usr/lib/portage/pym/xpak.py

./usr/lib/portage/pym/portage.py

./usr/lib/portage/pym/portage_dep.py

./usr/lib/portage/pym/portage_db_test.py

./usr/lib/portage/pym/portage_exception.py

./usr/lib/portage/pym/portage_data.py

./usr/lib/portage/pym/portage_db_flat.py

./usr/lib/portage/pym/portage_gpg.py

./usr/lib/portage/pym/portage_locks.py

./usr/lib/portage/pym/portage_checksum.py

./usr/lib/portage/pym/dispatch_conf.py

./usr/lib/portage/pym/dcdialog.py

./usr/lib/portage/pym/portage_contents.py

./usr/lib/portage/pym/portage_localization.py

./usr/lib/portage/pym/portage_db_cpickle.py

./usr/lib/portage/pym/portage_file.py

./usr/lib/portage/pym/getbinpkg.py

./usr/lib/portage/pym/portage_exec.py

./usr/lib/portage/pym/cvstree.py

./usr/lib/portage/pym/output.py

./usr/lib/portage/pym/emergehelp.py

./usr/lib/portage/pym/portage_db_template.py

./usr/lib/portage/pym/portage_util.py

./usr/sbin/

./usr/sbin/fixpackages

./usr/sbin/env-update

./usr/sbin/etc-update

./usr/sbin/emerge-webrsync

./usr/sbin/regenworld

./usr/sbin/archive-conf

./usr/sbin/ebuild

./usr/sbin/dispatch-conf

./usr/sbin/ebuild.sh

./usr/sbin/pkgmerge

./usr/share/

./usr/share/doc/

./usr/share/doc/portage-2.0.51-r14/

./usr/share/doc/portage-2.0.51-r14/ChangeLog.gz

./usr/share/man/

./usr/share/man/man1/

./usr/share/man/man1/ebuild.1.gz

./usr/share/man/man1/repoman.1.gz

./usr/share/man/man1/etc-update.1.gz

./usr/share/man/man1/emerge.1.gz

./usr/share/man/man1/quickpkg.1.gz

./usr/share/man/man1/env-update.1.gz

./usr/share/man/man1/dispatch-conf.1.gz

./usr/share/man/man1/g-cpan.pl.1.gz

./usr/share/man/man5/

./usr/share/man/man5/ebuild.5.gz

./usr/share/man/man5/portage.5.gz

./usr/share/man/man5/make.conf.5.gz

bzip2: (stdin): trailing garbage after EOF ignored

tar: Error exit delayed from previous errors

/tmp/install-portage.sh: line 56: cd: /tmp/portage-2.0.51.18/src/python-missingos: No such file or directory

/tmp/install-portage.sh: line 57: ./setup.py: No such file or directory

/tmp/install-portage.sh: line 58: cd: ../sandbox-1.1: No such file or directory

make: *** No targets specified and no makefile found.  Stop.

/tmp/install-portage.sh: line 60: cd: ../../cnf: No such file or directory

cp: omitting directory `etc'

cp: omitting directory `lib'

cp: omitting directory `usr'

cp: omitting directory `var'

linux:/home/pankaj #                                                    
```

any idea?

----------

## devsk

 *dearborn98 wrote:*   

> Was able to install portage on SUSE 9.1 .  Had problems with this part of the script:
> 
> cd ../src/python-missingos
> 
>    ./setup.py install 
> ...

 

those errors are fine. if you have python2.3 installed, you don't even need python-missingos. that's the reason script ignores these errors. You didn't need to change the script and include rescue tar in it for that.

rush_ad, try to run the script from page 1 of this thread.

----------

## dearborn98

Devsk:

Had problems running your script on pre-SuSE 9.2 versions as a bash script.  Other versions of SuSE would stop in the middle of the script with errors, and then the system was broke. Because of this, I had been pasting it line for line (with some modifications) to get portage installed successfully on SuSE.  

Decided to try to run your script again as a bash script on SuSE 9.2 (as you suggested to rush_ad.)  The script ran all the way through with SuSE 9.2 successfully.

As you said, the python-2.3 did made the difference.  Thanks for all the info.

----------

## raid517

A much simpler way to do this is just to install Gentoo in a chroot environment and run gentoo applications directly from your chroot directory. I do this with both Debian and Gentoo. Indeed you can have any package manager you want if you do things this way.And you have less danger of breaking things.

GJ

----------

## dlong500

 *raid517 wrote:*   

> A much simpler way to do this is just to install Gentoo in a chroot environment and run gentoo applications directly from your chroot directory. I do this with both Debian and Gentoo. Indeed you can have any package manager you want if you do things this way.And you have less danger of breaking things.

 

That may work for many cases, but I would be concerned with the overhead of essentially running two operating systems especially for things like web servers.  However, in my specific case I am locked into a Redhat system running a Virtuozzo VPS (Virtual Private Server).  It is not possible (at least at the current time) to install another kernel in a chrooted environment on a VPS, so that is why I wanted to be able to use portage natively within the Redhat OS.  If I wasn't locked into Redhat on the base system I would most certainly choose Gentoo as my OS anyway and forego all this complication, but alas, I cannot as of yet...

----------

## raid517

You don't 'run two operating systems.' You only run one. The chroot simply runs using your installed kernel and is only active when installing applications. You cannot run 'two kernels simultaniously' - not unless you are using a virtual machine, or some other kind of exotic set up. All you are doing is using chroot to install applications from one distribution into another. You want Debian in Gentoo, Gentoo in Debian, Red Hat in Suse? No problem. The choice is yours.

You really ought to read up on chroot. It requires none of this complicated messing about - nor will it risk harming your original OS install - as most of these other methods always (in time) eventually do.

GJ

----------

## rush_ad

i installed portage on suse 9.3 using the script on first page. everything was fine.

then i tried "emerge vlc" and it told me that it needs to install 101 packages. what do i do? and when i tried "emerge -O vlc" it worked.

----------

## raid517

You do it at your own risk. However my experience of these kinds of scripts is that eventually they all seriously screw something up.

GJ

----------

## devsk

 *rush_ad wrote:*   

> i installed portage on suse 9.3 using the script on first page. everything was fine.
> 
> then i tried "emerge vlc" and it told me that it needs to install 101 packages. what do i do? and when i tried "emerge -O vlc" it worked.

 portage doesn't know about the packages which are already installed in suse. you have two options: 1. overwrite those packages with the ones from portage OR 2. let portage know about them. You can use the following to create /etc/portage/profile/package.provided file which is a plain list of packages which you don't want portage to install.

```

mkdir -p /etc/portage/profile

emerge -pv --nocolor vlc|grep "ebuild "|awk '{print $4}' >> /etc/portage/profile/package.provided

```

then have a look at the file /etc/portage/profile/package.provided and remove the packages which you want portage to install/overwrite.

raid517: you need to qualify your statement: they can seriously screw something up if you don't know what they or YOU are doing.

----------

## raid517

I'll qualify it with this... They can lead to sometimes seemingly unresolvable conflicts that are often way too much more hassle to resolve than the effort to fix them is worth. Sure they can be overcome, sure they can be fixed - but it's a bit like in the world of Debian. It's not considered safe to even mix packages from different repositories or Debian based distributions - let alone mix entirely different Linux versions.

In any case as I have said I personally have a preference for chroot - like I said, I can keep my 'other OS' in a sandpit and prevent them from interacting with my main OS almost completely. Yet I can still run any application I want from them at will. I of course acknowledge that this may not be everyone else's preference.

Best regards,

GJ

----------

## devsk

I have yet to see an example of such inconsistency so far. I have been running nitro2 kernel emerged from portage on FC2 for a year, with working suspend to disk, bootsplash and some other very bleeding edge features. most of the other stuff I use also comes from portage. no problems so far. Otherwise I would be looking at FC3 by now. It all depends on how much one knows about what's happening when one emerges a package.

----------

## raid517

Like I said, you can fix most things. But don't underestimate the level of knowledge that is required. Not everone has this immediately to hand. A competant hacker can fix almost anything - but that isn't true of everyone.

You can take your pick I guess. A chroot can be set up, installed and run by a n00b in a matter of a few minutes - but like I said too, a serious hacker might prefer a more 'intergrated approach.' The end result in any case is the same.

Besides which, after a year of running your install, I doubt there will be very much left of your original Fedora install? Isn't it pretty much just pure Gentoo by now?

I only suggested this method as a quick and safe way to run packages for one OS inside another. I didn't mean to ruffle anyone's feathers in doing so.

I guess it is just all about choice.

GJ

----------

## devsk

I think we are both right.... :Smile: 

----------

## chakkaradeepcc

hi all,

am using LFS as my base system..when i ran the script i was able to "emerge rsync" and i do have my "/usr/portage" files....but stll am not able to perform any step after that becoz it is telling there is no symlink to "/etc/make.profile"...what is this file and it also tells "your ARCH is not set"........how do i rectify this error??...

i would be happy if somebdy help me out..

with regards,

C.C.Chakkaradeep

----------

## chakkaradeepcc

hi guys,

it was m y mistake........there was a typo mistake in my script....i corrected and now my LFS system has Portage into it!....... :Very Happy: 

with reagards,

C.C.Chakkaradeep

----------

## My_World

Running the script as is has a few problems....

The portage emntioned in the script is way outdated and I had to modify it to get the newer portage, but then I ran into the follow problems:

```

02:15:58 (14.24 KB/s) - `/tmp/portage-2.0.51.22.tar.bz2' saved [257823]

/usr/bin/env: python2.2: No such file or directory

./port: line 48: cd: ../sandbox-1.1: No such file or directory

make: *** No targets specified and no makefile found.  Stop.

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

!!! /etc/make.profile is not a symlink and will probably prevent most merges.

!!! It should point into a profile within /usr/portage/profiles/

!!! (You can safely ignore this message when syncing. It's harmless.)

!!! /usr/bin/rsync does not exist, so rsync support is disabled.

!!! Type "emerge net-misc/rsync" to enable rsync support.

Something wrong. Get /usr/portage/profiles dir from a working

Gentoo system and try again.

```

Any suggestions how to fix this?

Trying to get it running on Slackware 10.1.

----------

## chapium

I get this message a lot, should i be worried?

>>> md5 src_uri  :Wink:  rc-scripts-1.4.16.tar.bz2

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

!!! 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.

>>> Injected sys-apps/baselayout-1.9.4-r6.

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

----------

## chapium

what changes to the script are needed for ppc?

emerging gawk and portage failed.  

I set make.conf to link to make.conf.ppc

Trying to emerge portage now

(I think this is doomed for failure)

----------

## My_World

I doubt this script is being maintained anymore.

There is a reference on the first page to getting Gentoo portage going on a non gentoo system without this script, also by the same author. Gonna try it tonight again.

 :Razz: 

----------

## devsk

 *My_World wrote:*   

> Running the script as is has a few problems....
> 
> The portage emntioned in the script is way outdated and I had to modify it to get the newer portage, but then I ran into the follow problems:
> 
> ```
> ...

 somehow I am not getting email notific. of updates made here. Anyway, your problem seems to be easy. /usr/bin/rsync should exist before you can run the script successfully. if its /bin/rsync on your system, setup a link with 'ln -s /bin/rsync /usr/bin/rsync'.

----------

## devsk

 *chapium wrote:*   

> I get this message a lot, should i be worried?
> 
> >>> md5 src_uri  rc-scripts-1.4.16.tar.bz2
> 
> !!! Problem with sandbox binary. Disabling...
> ...

 

what distro is this? if that's the only error, you can ignore it. it should not be an issue because next time you try to upgrade portage to latest, it will install sandbox as a separate package.

----------

## devsk

 *chapium wrote:*   

> what changes to the script are needed for ppc?
> 
> emerging gawk and portage failed.  
> 
> I set make.conf to link to make.conf.ppc
> ...

 your link '/etc/make.profile' should point to appropriate ppc specific profile. Hunt for one in /usr/portage/profiles and 'ln -sf' your /etc/make.profile.

----------

## bobbymcsteels

Ok have been trying to do this on ubuntu and hit a few snags can any1 help me out??

I have run the script  and got this error:-

```
root@McStizzle:/home/mcsteels # sh portageget

--12:59:15--  ftp://gentoo.mirrors.pair.com/distfiles/portage-2.0.51.19.tar.bz2

           => `/tmp/portage-2.0.51-r15.tar.bz2'

Resolving gentoo.mirrors.pair.com... 216.92.2.140

Connecting to gentoo.mirrors.pair.com[216.92.2.140]:21... connected.

Logging in as anonymous ... Logged in!

==> SYST ... done.    ==> PWD ... done.

==> TYPE I ... done.  ==> CWD /distfiles ... done.

==> PASV ... done.    ==> RETR portage-2.0.51.19.tar.bz2 ... done.

Length: 284,502 (unauthoritative)

100%[====================================>] 284,502       56.29K/s    ETA 00:00

12:59:22 (54.53 KB/s) - `/tmp/portage-2.0.51-r15.tar.bz2' saved [284,502]

portageget: line 41: cd: portage-2.0.51-r15/bin: No such file or directory

cp: omitting directory `gconfd-mcsteels'

cp: omitting directory `gconfd-root'

cp: omitting directory `keyring-EN53QQ'

cp: omitting directory `libgksu1.2-ckiZmF'

cp: cannot open `mapping-mcsteels' for reading: No such device or address

cp: omitting directory `orbit-mcsteels'

cp: omitting directory `orbit-root'

cp: omitting directory `portage-2.0.51.19'

cp: omitting directory `ssh-CjEPay8963'

portageget: line 44: cd: ../pym: No such file or directory

cp: omitting directory `gconfd-mcsteels'

cp: omitting directory `gconfd-root'

cp: omitting directory `keyring-EN53QQ'

cp: omitting directory `libgksu1.2-ckiZmF'

cp: cannot open `mapping-mcsteels' for reading: No such device or address

cp: omitting directory `orbit-mcsteels'

cp: omitting directory `orbit-root'

cp: omitting directory `portage-2.0.51.19'

cp: omitting directory `ssh-CjEPay8963'

portageget: line 45: cd: ../man: No such file or directory

cp: cannot stat `*.1': No such file or directory

cp: cannot stat `*.5': No such file or directory

portageget: line 46: cd: ../src/python-missingos: No such file or directory

portageget: line 47: ./setup.py: No such file or directory

portageget: line 48: cd: ../sandbox-1.1: No such file or directory

make: *** No targets specified and no makefile found.  Stop.

portageget: line 50: cd: ../../cnf: No such file or directory

cp: omitting directory `gconfd-mcsteels'

cp: omitting directory `gconfd-root'

cp: omitting directory `keyring-EN53QQ'

cp: omitting directory `libgksu1.2-ckiZmF'

cp: cannot open `mapping-mcsteels' for reading: No such device or address

cp: omitting directory `orbit-mcsteels'

cp: omitting directory `orbit-root'

cp: omitting directory `portage-2.0.51.19'

cp: omitting directory `ssh-CjEPay8963'

portageget: line 84: emerge: command not found

Something wrong. Get /usr/portage/profiles dir from a working

Gentoo system and try again.

```

Any help with this would be great cheers

Bobby[/code]

----------

## devsk

The error is because the version that script referred is not there in the repository. I have changed and made the script independent of portage tar's minor versions. Please recopy the script and rerun. It should run fine, otherwise let me know.

----------

## bobbymcsteels

ok i have retried that script... seemed to run ok and have tried to emerge things but now i have this error msg:-

```

root@McStizzle:/home/mcsteels # emerge fluxbox

portage initialization: your system doesn't have a 'wheel' group.

Please fix this as it is a normal system requirement. 'wheel' is GID 10

'emerge baselayout' and an 'etc-update' should remedy this problem.

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

Calculating dependencies ...done!

>>> emerge (1 of 65) app-crypt/hashalot-0.3 to /

>>> md5 files   ;-) hashalot-0.3.ebuild

>>> md5 files   ;-) files/digest-hashalot-0.3

>>> md5 src_uri ;-) hashalot-0.3.tar.gz

>>> Unpacking source...

>>> Unpacking hashalot-0.3.tar.gz to /var/tmp/portage/hashalot-0.3/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 for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for gawk... no

checking for mawk... mawk

checking whether make sets $(MAKE)... yes

checking for a BSD-compatible install... /usr/bin/install -c

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/hashalot-0.3/work/hashalot-0.3/config.log

!!! ERROR: app-crypt/hashalot-0.3 failed.

!!! Function econf, Line 485, Exitcode 0

!!! econf failed
```

Not being too fimiliar with gentoo i have no idea what it means or how to fix it..... What do you think??

----------

## devsk

 *bobbymcsteels wrote:*   

> 
> 
> root@McStizzle:/home/mcsteels # emerge fluxbox
> 
> 

 

just a sanity check. have you verified (emerge -pv fluxbox) what pkgs will be installed with this? make sure that you read the first page of this thread again. you should NOT emerge glibc/baselayout and some others. verify that they won't be emerged as part of 'emerge fluxbox'. If they appear there, make sure you inject them or list them in /etc/portage/profile/package.provided.

 *bobbymcsteels wrote:*   

> 
> 
> checking for i686-pc-linux-gnu-gcc... no
> 
> checking for gcc... no
> ...

 

error says it all. you have no compiler in your path. Install a working C and C++ compiler. you can later update it to one from portage if you like.

----------

## bobbymcsteels

ok now i am getting this sort of thing:-

```
gcc -c  -DHAVE_CONFIG_H -Ded_PROGRAM=\"/bin/ed\" -I. -I. -O2 -mcpu=i686 -pipe -DLINUX -D_XOPEN_SOURCE=500 addext.c

gcc -c  -DHAVE_CONFIG_H -Ded_PROGRAM=\"/bin/ed\" -I. -I. -O2 -mcpu=i686 -pipe -DLINUX -D_XOPEN_SOURCE=500 argmatch.c

gcc -c  -DHAVE_CONFIG_H -Ded_PROGRAM=\"/bin/ed\" -I. -I. -O2 -mcpu=i686 -pipe -DLINUX -D_XOPEN_SOURCE=500 backupfile.c

gcc -c  -DHAVE_CONFIG_H -Ded_PROGRAM=\"/bin/ed\" -I. -I. -O2 -mcpu=i686 -pipe -DLINUX -D_XOPEN_SOURCE=500 basename.c

gcc -c  -DHAVE_CONFIG_H -Ded_PROGRAM=\"/bin/ed\" -I. -I. -O2 -mcpu=i686 -pipe -DLINUX -D_XOPEN_SOURCE=500 dirname.c

gcc -c  -DHAVE_CONFIG_H -Ded_PROGRAM=\"/bin/ed\" -I. -I. -O2 -mcpu=i686 -pipe -DLINUX -D_XOPEN_SOURCE=500 getopt.c

gcc -c  -DHAVE_CONFIG_H -Ded_PROGRAM=\"/bin/ed\" -I. -I. -O2 -mcpu=i686 -pipe -DLINUX -D_XOPEN_SOURCE=500 getopt1.c

gcc -c  -DHAVE_CONFIG_H -Ded_PROGRAM=\"/bin/ed\" -I. -I. -O2 -mcpu=i686 -pipe -DLINUX -D_XOPEN_SOURCE=500 inp.c

gcc -c  -DHAVE_CONFIG_H -Ded_PROGRAM=\"/bin/ed\" -I. -I. -O2 -mcpu=i686 -pipe -DLINUX -D_XOPEN_SOURCE=500 maketime.c

gcc -c  -DHAVE_CONFIG_H -Ded_PROGRAM=\"/bin/ed\" -I. -I. -O2 -mcpu=i686 -pipe -DLINUX -D_XOPEN_SOURCE=500 partime.c

gcc -c  -DHAVE_CONFIG_H -Ded_PROGRAM=\"/bin/ed\" -I. -I. -O2 -mcpu=i686 -pipe -DLINUX -D_XOPEN_SOURCE=500 patch.c

patch.c: In function `numeric_string':

patch.c:840: error: unrecognizable insn:

(insn:HI 184 183 26 0 0x2a9614af00 (set (reg/v:SI 65)

        (plus:SI (mult:SI (reg/v:SI 65)

                (const_int 2 [0x2]))

            (const_int -1 [0xffffffffffffffff]))) -1 (insn_list 183 (nil))

    (nil))

patch.c:840: internal compiler error: in extract_insn, at recog.c:2175

Please submit a full bug report,

with preprocessed source if appropriate.

See <URL:http://gcc.gnu.org/bugs.html> for instructions.

For Debian GNU/Linux specific bug reporting instructions, see

<URL:file:///usr/share/doc/gcc-3.3/README.Bugs>.

make: *** [patch.o] Error 1

!!! ERROR: sys-devel/patch-2.5.9 failed.

!!! Function src_compile, Line 38, Exitcode 2

!!! emake failed
```

I used apt to get the compilers that i have.... is it posible that the 1's from apt dont work with portage??

PS been tryin to get help with this from the guys on irc(#gentoo and #gentoo-portage) and both channels didnt want to know the guys in portage thought i was jokin  :Crying or Very sad: Last edited by bobbymcsteels on Wed Jul 20, 2005 9:05 am; edited 1 time in total

----------

## devsk

you are getting an ICE. that means a compiler bug. What version of gcc is this? Please file a bug report and try to downgrade to a stable gcc (3.4.4) with stable binutils (2.16.1). This problem has nothing to do with portage.

----------

## kimchi_sg

 *devsk wrote:*   

> 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:
> ...

 

Can you please enlighten us, whether to continue using the original script, or switch to this download-untar-emerge method? If this newer method is safe only for certain circumstances, which ones?  :Smile: 

P.S. Now attempting a shot at this again, this time using Cygwin on Windows 98 on Qemu on Gentoo.  :Twisted Evil: 

 *chapium wrote:*   

> 
> 
> (I think this is doomed for failure)
> 
> 

 

It will be, if you do not have enough determination to get it to work.

The title of this thread seems to be slightly misleading, judging by the amount of "failure" posts. It would seem that getting portage to work on a non-Gentoo environment is even harder than installing Gentoo. My $0.02.  :Wink: 

----------

## devsk

 *kimchi_sg wrote:*   

>  *devsk wrote:*   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:
> ...

 

the script is still the way to go on a linux machine because it injects some of the stuff which you may not remember and may screw up your system.

 *Quote:*   

> 
> 
> P.S. Now attempting a shot at this again, this time using Cygwin on Windows 98 on Qemu on Gentoo. 
> 
> 

 

cygwin is a different ballgame altogether. I did complete a full portage install on it and it works after lot of patching (there is a separate thread, I think you took big part in it). But there are basic issues like python locking support which is not complete, dlls in use can not be overwritten (and hence emerge will fail right in the end when merging). I haven't booted into windows for a long time and my current interest is opensolaris. I have a triple boot and sometimes I wish I could run all three at the same time. But there is only so much one can do.... :Smile: 

 *Quote:*   

> 
> 
> It will be, if you do not have enough determination to get it to work.
> 
> The title of this thread seems to be slightly misleading, judging by the amount of "failure" posts. It would seem that getting portage to work on a non-Gentoo environment is even harder than installing Gentoo. My $0.02. 

 

its difficult on a system which is not linux but determination helps. Its a breeze on a linux (any distro) and works pretty well(if you don't mess with distro specific boot stuff, glibc etc.). It works on solaris and cygwin, with few quirks and with solaris a bit easier.

----------

## kimchi_sg

 *devsk wrote:*   

> It works on solaris and cygwin, with few quirks and with solaris a bit easier.

 

Make that "a LOT easier":  :Razz: 

```
# emerge --info

!!! CANNOT IMPORT FTPLIB: No module named _socket

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

Performing Global Updates: /usr/portage/profiles/updates/3Q-2002

(Could take a couple of minutes if you have a lot of binary packages.)

  .='update pass'  *='binary update'  @='/var/db move'

  s='/var/db SLOT move' S='binary SLOT move' p='update /etc/portage/package.*'

........................................................................................Traceback (most recent call last):

  File "/usr/bin/emerge", line 10, in ?

    import portage

  File "/usr/lib/portage/pym/portage.py", line 7381, in ?

    do_upgrade(mykey)

  File "/usr/lib/portage/pym/portage.py", line 7320, in do_upgrade

    myworld=open("/"+WORLD_FILE,"w")

IOError: [Errno 136] No such host or network path: '//var/lib/portage/world'

```

I give up.

----------

## devsk

 *kimchi_sg wrote:*   

>  *devsk wrote:*   It works on solaris and cygwin, with few quirks and with solaris a bit easier. 
> 
> Make that "a LOT easier": 
> 
> ```
> ...

 

I think the key was to fix all places with stuff like open("/"+WORLD_FILE,"w"), where WORLD_FILE already has a leading '/'. it starts searching for hostname 'var' in this case.

>> CANNOT IMPORT FTPLIB: No module named _socket

this is a python build issue.

yeah, a lot easier... :Smile: 

----------

## cuciferus

```
Su as root and try again.
```

This is what i get on Suse 9.3 removed code till first mkdir and it's under way now working

No biggi u say: I say this is my first temper with a source code

 :Very Happy: 

----------

## cuciferus

oki got system emergeed & stuff and then i emerged glibc with ntp & ntponly as new USE and now emerge & man & mc & even frozen bublle crashez with "segmentation fault" message

what can I do?

----------

## devsk

 *cuciferus wrote:*   

> oki got system emergeed & stuff and then i emerged glibc with ntp & ntponly as new USE and now emerge & man & mc & even frozen bublle crashez with "segmentation fault" message
> 
> what can I do?

 boot from the rescue CD and re-install the glibc that came with your distro...I would say never emerge glibc on a non-gentoo distro but if you insist and want to be daring, remove nptlonly USE flag and reemerge, and then report here if you succeeded.

----------

## jza

i too found this to be a great idea since I manage a cluster at work.  Unfortunately, it uses platform Rocks, which is based on red hat enterprise 3, and installing anything there (especially after being used to the gentoo/debian world) is a major pain.  But unfortunately I've been haveing a lot of trouble.  For me, the script installed fine, but i've been having a really hard time getting the major stuff installed (X, mplayer, waimea, scientific tools, etc.).  I've injected stuff like perl, python, 'the big 4', etc.

But I keep getting errors when trying to install X.  The system already had XFree 4.3 and gnome installed, so I tried masking xorg, but that caused other packages down the line to have compile errors.  I'm kind of at a loss now.  I'm thinking of reinstalling the system, but with a minimal install, to see if that will help, but i'm not sure if it will work even then.  Has anyone experience similar problems?

----------

## devsk

 *jza wrote:*   

> i too found this to be a great idea since I manage a cluster at work.  Unfortunately, it uses platform Rocks, which is based on red hat enterprise 3, and installing anything there (especially after being used to the gentoo/debian world) is a major pain.  But unfortunately I've been haveing a lot of trouble.  For me, the script installed fine, but i've been having a really hard time getting the major stuff installed (X, mplayer, waimea, scientific tools, etc.).  I've injected stuff like perl, python, 'the big 4', etc.
> 
> But I keep getting errors when trying to install X.  The system already had XFree 4.3 and gnome installed, so I tried masking xorg, but that caused other packages down the line to have compile errors.  I'm kind of at a loss now.  I'm thinking of reinstalling the system, but with a minimal install, to see if that will help, but i'm not sure if it will work even then.  Has anyone experience similar problems?

 you should have left X alone and injected xorg. if you did that and got errors down the line, you could get help on those errors if you post them, because there is no hard dependency (that I know of) for xorg 6.8 for any package and xfree should have been just fine.

what errors did you get when trying to install X?

----------

## jza

i got the error (while merging qt): 

```

>>> Unpacking qt-x11-free-3.3.4.tar.bz2 to /var/tmp/portage/qt-3.3.4-r3/work

 * Applying qt-no-rpath-uic.patch ...                                     [ ok ]

 * Applying qt-no-rpath.patch ...                                         [ ok ]

 * Applying qt-3.3.4-qclipboard-hack.patch ...                            [ ok ]

 * Applying qt-3.3.4-flickerfree_qiconview_buffered.patch ...             [ ok ]

 * Applying qt-3.3.4-flickerfree_qscrollview_fixwindowactivate.patch ...  [ ok ]

 * Applying qt-3.3.4-0051-qtoolbar_77047.patch ...                        [ ok ]

 * Applying qt-3.3.4-0047-fix-kmenu-widget.diff ...                       [ ok ]

>>> Source unpacked.

IBASE auto-detection...

  Could not find libgds.* anywhere in /lib /usr/lib

IBASE disabled.

MySQL auto-detection...

  Could not find libmysqlclient.* anywhere in /lib /usr/lib

MySQL disabled.

ODBC auto-detection...

  Could not find libodbc.* anywhere in /lib /usr/lib

ODBC disabled.

PostgreSQL auto-detection...

  Could not find libpq.* anywhere in /lib /usr/lib

PostgreSQL disabled.

NIS auto-detection... ()

  Found nsl lib in /usr/lib

  Found rpcsvc/ypclnt.h in /usr/include

  Found rpcsvc/yp_prot.h in /usr/include

NIS enabled.

CUPS auto-detection... ()

  Found cups lib in /usr/lib

  Found cups/cups.h in /usr/include

CUPS enabled.

OpenGL auto-detection... ()

  Could not find GLU lib anywhere in  /usr/X11R6/lib /usr/X11R6/lib /usr/shlib /usr/lib /lib

OpenGL disabled.

Xcursor auto-detection... ()

  Found Xcursor lib in /usr/X11R6/lib

  Found X11/Xcursor/Xcursor.h in /usr/X11R6/include

  Found Xcursor version 1.0

Xcursor enabled.

XRandR auto-detection... ()

  Found XRandR lib in /usr/X11R6/lib

  Found X11/extensions/Xrandr.h in /usr/X11R6/include

  Found XRandR version 1.1

XRandR enabled.

XRender auto-detection... ()

  Found XRender lib in /usr/X11R6/lib

  Found X11/extensions/Xrender.h in /usr/X11R6/include

XRender enabled.

Xft auto-detection... ()

  Could not find Xft lib anywhere in  /usr/X11R6/lib /usr/shlib /usr/lib /lib

Xft disabled.

Xft support cannot be enabled due to functionality tests!

 Turn on verbose messaging (-v) to ./configure to see the final report.

 If you believe this message is in error you may use the continue

 switch (-continue) to ./configure to continue.

!!! ERROR: x11-libs/qt-3.3.4-r3 failed.

!!! Function src_compile, Line 153, Exitcode 101

!!! (no error message)

!!! If you need support, post the topmost build error, NOT this status message.

```

Why should I not use the xorg from portage?

----------

## jza

here's another trying to get waimea

```

/usr/bin/ld: cannot find -lX11

collect2: ld returned 1 exit status

make[3]: *** [libImlib2.la] Error 1

make[3]: Leaving directory `/var/tmp/portage/imlib2-1.2.0-r2/work/imlib2-1.2.0/src/lib'

make[2]: *** [all-recursive] Error 1

make[2]: Leaving directory `/var/tmp/portage/imlib2-1.2.0-r2/work/imlib2-1.2.0/src'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/var/tmp/portage/imlib2-1.2.0-r2/work/imlib2-1.2.0'

make: *** [all-recursive-am] Error 2

!!! ERROR: media-libs/imlib2-1.2.0-r2 failed.

!!! Function enlightenment_die, Line 73, Exitcode 0

!!! emake failed

!!! SEND BUG REPORTS TO vapier@gentoo.org NOT THE E TEAM

!!! If you need support, post the topmost build error, NOT this status message.

```

and another one in svgalibs (trying to merge octave)

```

make[1]: Entering directory `/var/tmp/portage/svgalib-1.9.19-r3/work/svgalib-1.9.19/lrmi-0.6m'

gcc -c  -pipe -O2 -fomit-frame-pointer -fno-pie -o lrmi.o lrmi.c

In file included from lrmi.c:16:

/usr/include/asm/vm86.h:4:4: #error <asm-x86_64/vm86.h> does not exist

lrmi.c:182: field `vm' has incomplete type

lrmi.c: In function `get_int_seg':

lrmi.c:198: warning: cast to pointer from integer of different size

lrmi.c: In function `get_int_off':

lrmi.c:205: warning: cast to pointer from integer of different size

lrmi.c: In function `pushw':

lrmi.c:213: dereferencing pointer to incomplete type

lrmi.c:214: dereferencing pointer to incomplete type

lrmi.c:214: dereferencing pointer to incomplete type

lrmi.c: In function `LRMI_init':

lrmi.c:268: warning: cast from pointer to integer of different size

lrmi.c:276: warning: cast from pointer to integer of different size

lrmi.c:277: warning: cast from pointer to integer of different size

lrmi.c:284: `CPU_386' undeclared (first use in this function)

lrmi.c:284: (Each undeclared identifier is reported only once

lrmi.c:284: for each function it appears in.)

lrmi.c: In function `set_regs':

lrmi.c:308: `IF_MASK' undeclared (first use in this function)

lrmi.c:308: `IOPL_MASK' undeclared (first use in this function)

lrmi.c: In function `run_vm86':

lrmi.c:792: `VM86_INTx' undeclared (first use in this function)

lrmi.c:805: `VIF_MASK' undeclared (first use in this function)

lrmi.c:805: `TF_MASK' undeclared (first use in this function)

lrmi.c:810: `VM86_UNKNOWN' undeclared (first use in this function)

lrmi.c: In function `LRMI_int':

lrmi.c:894: `IF_MASK' undeclared (first use in this function)

lrmi.c:894: `IOPL_MASK' undeclared (first use in this function)

make[1]: *** [lrmi.o] Error 1

make[1]: Leaving directory `/var/tmp/portage/svgalib-1.9.19-r3/work/svgalib-1.9.19/lrmi-0.6m'

make: *** [lrmi] Error 2

!!! ERROR: media-libs/svgalib-1.9.19-r3 failed.

!!! Function src_compile, Line 72, Exitcode 2

!!! Failed to build libraries and utils!

!!! If you need support, post the topmost build error, NOT this status message.

```

----------

## devsk

 *jza wrote:*   

> 
> 
> Xft auto-detection... ()
> 
>   Could not find Xft lib anywhere in  /usr/X11R6/lib /usr/shlib /usr/lib /lib
> ...

 

you forced xft on qt and don't have xft installed. it is part of xorg. you are out of luck if your xorg/xfree didn't install xft. You have to emerge xorg or install a latest rpm.

 *jza wrote:*   

> 
> 
> Why should I not use the xorg from portage?

 

its a big package and distros have different places for different things in the package...you can certainly emerge it. but you better clean the older rpm install thoroughly, otherwise it will be a mish-mash.

----------

## jza

 *Quote:*   

> 
> 
> its a big package and distros have different places for different things in the package...you can certainly emerge it. but you better clean the older rpm install thoroughly, otherwise it will be a mish-mash.

 

i see, that's what I thought originally, which is why I figured i would just use the xorg from portage since a lot of packages depend on it, and if i'm gonna be getting all my multimedia stuff from there (we do visualization stuff), i should use it (doesn't this make sense?).  This brings me back to my original idea of just going back to a minimal install, I have to reinstall anyway to go to rhel 4 anyway, alhtough this comes with the same version of xorg as portage, so i'm not sure what to do. On the one hand, it may cause problems with dependencies/locations in the portage tree.  On the other hand, i'm not sure if portage's xorg will successfully merge in redhat.  Of course if rpm  didn't suck as much as it did, i wouldn't have to worry about this  :Smile: [/quote]

----------

## devsk

 *jza wrote:*   

>  *Quote:*   
> 
> its a big package and distros have different places for different things in the package...you can certainly emerge it. but you better clean the older rpm install thoroughly, otherwise it will be a mish-mash. 
> 
> i see, that's what I thought originally, which is why I figured i would just use the xorg from portage since a lot of packages depend on it, and if i'm gonna be getting all my multimedia stuff from there (we do visualization stuff), i should use it (doesn't this make sense?).  This brings me back to my original idea of just going back to a minimal install, I have to reinstall anyway to go to rhel 4 anyway, alhtough this comes with the same version of xorg as portage, so i'm not sure what to do. On the one hand, it may cause problems with dependencies/locations in the portage tree.  On the other hand, i'm not sure if portage's xorg will successfully merge in redhat.  Of course if rpm  didn't suck as much as it did, i wouldn't have to worry about this 

 [/quote]

I just did an upgrade on FC2 from xorg 6.7 to portage xorg 6.8.2 successfully. very hacky instructions, but they work. key things:

0. verify that the xorg from portage will compile. how? compile it... :Smile:  

```
ebuild /usr/portage/x11-base/xorg-x11/xorg-x11-6.8.2-r2.ebuild compile
```

.

1. logout and stop gdm/kdm. Rename /usr/X11R6 to /usr/X11R6.FC2 

```
 mv /usr/X11R6 /usr/X11R6.FC2
```

2. search exact version of xorg packages and filter out files installed outside of /usr/X11R6 and save them.

```
for i in `rpm -qa|grep xorg|grep 6.7.0-9|sed -e "s:-6.*$::g"`;

do

  rpm -ql $i|grep -v "/usr/X11R6" >> /var/tmp/xorg-outside.list;

done

for i in $(cat /var/tmp/xorg-outside.list);

do

  cp $i $i.FC2 ;

done

```

change for your version numbers.

3. rename links to /usr/X11R6:

```
$ cd /usr/include

root@ /usr/include 

$ mv Mrm Mrm.FC2

root@ /usr/include 

$ mv uil uil.FC2

root@ /usr/include 

$ mv Xm Xm.FC2

root@ /usr/include 

$ cd /usr/lib

root@ /usr/lib 

$ l|grep X11R6

lrwxrwxrwx    1 root  root         29 Nov 14  2004 libGLU.so -> ../../usr/X11R6/lib/libGLU.so

lrwxrwxrwx    1 root  root         31 Nov 14  2004 libGLU.so.1 -> ../../usr/X11R6/lib/libGLU.so.1

root@ /usr/lib 

$ mv libGLU.so libGLU.so.FC2

root@ /usr/lib 

$ mv libGLU.so.1 libGLU.so.1.FC2

root@ /usr/lib 

$ mv /usr/include/DPS /usr/include/DPS.FC2

```

now 

```
emerge -pv opengl-update xorg-x11
```

 to check what will be installed and finally,

emerge opengl-update xorg-x11 (this one you can use the above ebuild command with 'compile' replaced with 'merge', because you already compiled it).

And voila, my fps doubled up!!

delete .FC2 files and dirs when you are comfy with new X.Last edited by devsk on Mon Aug 15, 2005 8:30 pm; edited 1 time in total

----------

## jza

thanks, i'll be trying it this week

----------

## lambada

One very important thing

MAKE SURE YOU HAVE RSYNC INSTALLED. Otherwise emerge sync will surely fail.

 It took me some time to figure this out. :Rolling Eyes: 

lambada

----------

## PRC

I was pondering in my car ride today about something. Could you actually run portage on a non gentoo system. It's just a program like any other program. it just manages sources and installs them. Its like Gentoo is not just a linux distrobution but a scheme or a plan. You can install what you want....your not really installing gentoo linux..your installing your own linux. You can install the Gentoo Linux maintained kernel source, or you can use whatever one you want. I mean if you could run portage on any distrobution, wouldn't that be cool. Anyone test it?

curtis119: merged a duplicate thread to this one. This post is the beginning of the duplicate.

----------

## Dlareh

I don't suppose you are excited enough to feel like reading an 11 page thread on the subject?

----------

## PRC

That's cool...thanks for the link...It seems more like a "HOWTO" then a discussion on the real impact on if portage became a installer beyond just gentoo (maybe there already is?). If other distrobutions quit trying to make independent binary files, and just installed from source, which some end up doing half the time with some of these binary distros......I was on my Mandrake machine and needed to download something....wish they had portage on it...makes me not want to leave gentoo, which I don't plan to....

----------

## Dlareh

 *G4User wrote:*   

> That's cool...thanks for the link...It seems more like a "HOWTO" then a discussion on the real impact on if portage became a installer beyond just gentoo (maybe there already is?). If other distrobutions quit trying to make independent binary files, and just installed from source, which some end up doing half the time with some of these binary distros......I was on my Mandrake machine and needed to download something....wish they had portage on it...makes me not want to leave gentoo, which I don't plan to....

 

Were you by chance... smoking something... recently?

----------

## PRC

Nope.....lol...I'm quite tired....so that might be the case....Boredom comes at the price of mental stability sometimes...

----------

## pablo_supertux

 *G4User wrote:*   

> I was pondering in my car ride today about something. Could you actually run portage on a non gentoo system. It's just a program like any other program. 

 

yes it is. One pool manager of my faculty has installed the portage on sun solaris 9 and it works well. Actually he had to change some things, but I don't know exactly what he did.

----------

## widremann

Portage and apt-get together on the same system would be really nice.  You could install binaries, or from source, and neither way would be more difficult than the other.  Sometimes, I just want a piece of software without compiling for hours and dealing with those issues.  And other times, I want to tweak and compile from source.  

What we really need is for Gentoo to have better RPM integration, so that binary package installation is possible (the current system sucks, I'm sorry).

----------

## cheater1034

http://emerde.freaknet.org/

I did this on slackware 10.1 twice. The first time it didn't work because it was a full installation.

The second time it worked, but I was getting errors a lot for some reason, and after a short period of time i couldn't emerge anything

I'm sure with proper configuration it works better than what I did with it,

----------

## allucid

 *widremann wrote:*   

> Portage and apt-get together on the same system would be really nice.  You could install binaries, or from source, and neither way would be more difficult than the other.  Sometimes, I just want a piece of software without compiling for hours and dealing with those issues.  And other times, I want to tweak and compile from source.  
> 
> What we really need is for Gentoo to have better RPM integration, so that binary package installation is possible (the current system sucks, I'm sorry).

 

why not just install apt-get (or similar) on gentoo?

----------

## curtis119

I merged a duplicate thread to this one. The duplicate begins on Sept 17.

----------

## jamapii

yes I know it's considered obsolete, but here's a way to tell portage about the files in these old --injected rpm packages:

(assuming sendmail has been --injected)

cd /var/db/pkg/*/sendmail*

rpm -q --list sendmail > CONTENTS

This won't create a correct CONTENTS because it needs checksums etc., but it's sufficient to use quickpkg to create a tbz2 package from the old version

----------

## kiljoi

Hey guys, another Slackware user trying to adapt portage.  I have tried using the script in this thread, the rescue tarball, and emerde, but I only get this far:

```
root@kiljoi:/etc# emerge --sync

config_profile_path not specified to class config
```

Using all three attempts, I get this far.  Anyone have any ideas?

----------

## kiljoi

Anybody?

----------

## coriolan

That script is too old. What I did with my RHEL laptop was that I downloaded the portage tarball from one of the mirrors. Then I simply make installed it. Having done that I synced and emerged world, but I masked glibc, gcc, and baselayout. Baselayout is dangerous in other distros. There was also this thread which is also rather old. You should try the manual way.

----------

## kiljoi

Thanks for the help.  I'll give that a go and see if it works.

----------

## stevenjoseph

Hi, i've been using gentoo for 5 months. I have never used a faster distro than this and im really loving it. Now i have a few questions about gentoo related to using portage on other systems

I have compiled my system for my Athlon-xp ... will my binaries work on other machines?

Just a thought ... is it possibel to make a cd with a snapshot of the portage sources etc... and a few scripts to make it possible for networkless installs .... my friends are less fortunate not having a broadband link. 

Thanks 

Great work guys I'm still learning but ... i'll make my contribution ... really love this distro  :Very Happy: 

----------

## coriolan

This is probably not the thread for that question but perhaps this one. Binaries work on other machines provided they have the same architecture and the same dynamic libraries as the computer you built it for in the first place.

----------

## d11wtq

Anyone know what might be the cause of this?

```

i686-pc-linux-gnu-gcc -O2 -pipe -fPIC -DNO_vsnprintf -DUSE_MMAP -DPIC -fPIC -c adler32.c -o adler32.lo

i686-pc-linux-gnu-gcc -O2 -pipe -fPIC -DNO_vsnprintf -DUSE_MMAP -DPIC -fPIC -c compress.c -o compress.lo

i686-pc-linux-gnu-gcc -O2 -pipe -fPIC -DNO_vsnprintf -DUSE_MMAP -DPIC -fPIC -c crc32.c -o crc32.lo

i686-pc-linux-gnu-gcc -O2 -pipe -fPIC -DNO_vsnprintf -DUSE_MMAP -DPIC -fPIC -c gzio.c -o gzio.lo

i686-pc-linux-gnu-gcc -O2 -pipe -fPIC -DNO_vsnprintf -DUSE_MMAP -DPIC -fPIC -c uncompr.c -o uncompr.lo

i686-pc-linux-gnu-gcc -O2 -pipe -fPIC -DNO_vsnprintf -DUSE_MMAP -DPIC -fPIC -c deflate.c -o deflate.lo

i686-pc-linux-gnu-gcc -O2 -pipe -fPIC -DNO_vsnprintf -DUSE_MMAP -DPIC -fPIC -c trees.c -o trees.lo

i686-pc-linux-gnu-gcc -O2 -pipe -fPIC -DNO_vsnprintf -DUSE_MMAP -DPIC -fPIC -c zutil.c -o zutil.lo

i686-pc-linux-gnu-gcc -O2 -pipe -fPIC -DNO_vsnprintf -DUSE_MMAP -DPIC -fPIC -c inflate.c -o inflate.lo

i686-pc-linux-gnu-gcc -O2 -pipe -fPIC -DNO_vsnprintf -DUSE_MMAP -DPIC -fPIC -c infback.c -o infback.lo

i686-pc-linux-gnu-gcc -O2 -pipe -fPIC -DNO_vsnprintf -DUSE_MMAP -DPIC -fPIC -c inftrees.c -o inftrees.lo

i686-pc-linux-gnu-gcc -O2 -pipe -fPIC -DNO_vsnprintf -DUSE_MMAP -DPIC -fPIC -c inffast.c -o inffast.lo

i686-pc-linux-gnu-gcc -shared -Wl,-soname,libz.so.1 -Wl,--version-script,mapfile -o libz.so.1.2.3 adler32.lo compress.lo crc32.lo gzio.lo uncompr.lo deflate.lo trees.lo zutil.lo inflate.lo infback.lo inftrees.lo inffast.lo -lc

rm -f libz.so libz.so.1

ln -s libz.so.1.2.3 libz.so

ln -s libz.so.1.2.3 libz.so.1

i686-pc-linux-gnu-gcc -O2 -pipe -fPIC -DNO_vsnprintf -DUSE_MMAP -o example example.o -L. libz.so.1.2.3

/usr/lib/libc_nonshared.a(elf-init.oS)(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0): In function `__i686.get_pc_thunk.bx':

: multiple definition of `__i686.get_pc_thunk.bx'

example.o(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0): first defined here

collect2: ld returned 1 exit status

make: *** [example] Error 1

!!! ERROR: sys-libs/zlib-1.2.3 failed.

!!! Function src_compile, Line 39, Exitcode 2

!!! (no error message)

!!! If you need support, post the topmost build error, NOT this status message.

[root@pc-cac ~]#

```

That's when trying to emerge portage after the initial setup and emerge sync on Archlinux (Intel P4 64bit), I've tried changing profiles from x86 to ia64 but the same thing happens.  I get an error at the very start too but I'm not sure if that's the cause.

 *Quote:*   

> 
> 
> !!! Problem with sandbox binary. Disabling...
> 
> Calculating dependencies ...done!
> ...

 

----------

## d11wtq

Rock On!!!  :Very Happy: 

Here's what I did.... I've emerge several things with plenty of deps and I'm pretty sure this is working great  :Smile: 

For those who've never used Archlinux it also pulls packages from a repository using a tool they call "pacman" -- these packages are prebuilt, often corrupt, and the repository they have is pretty small.  I'm forced to to use AL (Archlinux) at work so I'm stuck there but if this lets me sneakily get away from using pacman and use portage then fantastic -- if ever my boss installs something on the machine he'll use pacman and see nothing wrong  :Razz: 

The problem I was having was the glibc files were out of date (I think)... I tried using portage to get these but the errors were just re-appearing so I used pacman for the last few times (I hope):

```

pacman -S gcc

pacman -S binutils

pacman -S glibc

emerge sync

emerge portage

# Voila !! ;)

```

I think that shoudl apply to *any* distro.... makes sure the following are installed and up to date before you try to follow the info in this thread:

rsync

glibc

gcc

binutils

You'll also want to emerge profiles after the first sync too.

Side note:

If you get "ebegin: command not found" or "ewarn" etc errors

```

ln -s /sbin/depscan.h /etc/init.d/

ln -s /sbin/functions.sh /etc/init.d/

```

If you do all the you should have what you have on Gentoo.

----------

## thoffmeyer

Woot, time to put this on CentOS  :Very Happy: 

----------

## jago25_98

I believe there's a better way to do this now somewhere. Where would be an updated guide to that?

Oh, and I should add that a simpler way to do this is to dual boot (what filesystems could you share? /tmp/ /home/ ...?) and chroot to run things. One way could be to have 2 programs (perhaps 2 menu's in x) to launch things from as different users in different roots.

----------

## eeek

My 'testing'/workstation setup uses Archlinux at the moment-so please don't flame me-

Might someone care to give their 'real world' experience with a snafu that's crept up? It looks like it's a GCC version conflict error- My personel suspicition is their's probably a setting that I may need to change:

To test the setup I ran emerge -p tar

```

These are the packages that I would merge, in order

Calculating dependencies /

!!! All ebuilds that could satisfy "sys-libs/glibc" have been masked.

!!! One of the following masked packages is required to complete your request:

- sys-libs/glibc-2.3.4.20041102-r2 (masked by: package.mask, -* keyword)

- sys-libs/glibc-2.3.4.20041102-r1 (masked by: package.mask)

- sys-libs/glibc-2.3.6-r2 (masked by: package.mask, ~x86 keyword)

- sys-libs/glibc-2.3.6-r1 (masked by: package.mask, -* keyword)

- sys-libs/glibc-2.3.3.20040420-r2 (masked by: package.mask)

- sys-libs/glibc-2.3.6 (masked by: package.mask, -* keyword)

- sys-libs/glibc-2.3.5 (masked by: package.mask)

- sys-libs/glibc-2.3.2-r12 (masked by: package.mask)

- sys-libs/glibc-2.3.4.20040619-r2 (masked by: package.mask, ~x86 keyword)

- sys-libs/glibc-2.3.4.20040808-r1 (masked by: package.mask)

- sys-libs/glibc-2.3.5-r3 (masked by: package.mask, ~x86 keyword)

- sys-libs/glibc-2.3.5-r2 (masked by: package.mask)

- sys-libs/glibc-2.2.5-r10 (masked by: package.mask)

- sys-libs/glibc-2.3.4.20050125-r1 (masked by: package.mask, ~x86 keyword)

- sys-libs/glibc-2.3.5-r1 (masked by: package.mask)

For more information, see MASKED PACKAGES section in the emerge man page or

refer to the Gentoo Handbook.

!!!    (dependency required by "dev-java/blackdown-jre-1.4.2.03" [ebuild])

```

My initial reaction is that it's a syncing problem.

Because when i've run emerge -p tar to test if my setup is installed correctly without actually installing anything it sometimes reports just the files and dependencies it would retrieve. However

even after I ran emerge --sync

emerge -p limewire reports:

```

 !!! All ebuilds that could satisfy "sys-libs/glibc" have been masked.

!!! One of the following masked packages is required to complete your request:

- sys-libs/glibc-2.3.4.20041102-r2 (masked by: package.mask, -* keyword)

- sys-libs/glibc-2.3.4.20041102-r1 (masked by: package.mask)

- sys-libs/glibc-2.3.6-r2 (masked by: package.mask, ~x86 keyword)

- sys-libs/glibc-2.3.6-r1 (masked by: package.mask, -* keyword)

- sys-libs/glibc-2.3.3.20040420-r2 (masked by: package.mask)

- sys-libs/glibc-2.3.6 (masked by: package.mask, -* keyword)

- sys-libs/glibc-2.3.5 (masked by: package.mask)

- sys-libs/glibc-2.3.2-r12 (masked by: package.mask)

- sys-libs/glibc-2.3.4.20040619-r2 (masked by: package.mask, ~x86 keyword)

- sys-libs/glibc-2.3.4.20040808-r1 (masked by: package.mask)

- sys-libs/glibc-2.3.5-r3 (masked by: package.mask, ~x86 keyword)

- sys-libs/glibc-2.3.5-r2 (masked by: package.mask)

- sys-libs/glibc-2.2.5-r10 (masked by: package.mask)

- sys-libs/glibc-2.3.4.20050125-r1 (masked by: package.mask, ~x86 keyword)

- sys-libs/glibc-2.3.5-r1 (masked by: package.mask)

For more information, see MASKED PACKAGES section in the emerge man page or

refer to the Gentoo Handbook.

!!!    (dependency required by "dev-java/blackdown-jre-1.4.2.03" [ebuild])

```

Is it possible that I need to modify something in someway?

Or is it possible I inadvertantly missed a step? if so what?

----------

## Omega21

Any reason for this to not work on a PPC install of Kubuntu??

----------

## equilibrium

I'm trying to get this to run on my ubuntu dapper install, really missing emerge  :Sad: 

So far when I install I get

```
!!! 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.

```

and

```
!!! 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?
```

I have tried making a remaking the symlink to /etc/make.profile

```
rm -fr /etc/make.profile

ln -sf /usr/portage/profiles/default-linux/x86/2006.1/make.defaults /etc/make.profile
```

I've even tried editing /etc/make.conf adding in stuff for P4

```
CHOST="i686-pc-linux-gnu"

CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"

CXXFLAGS="${CFLAGS}"
```

But the ARCH is not set error won't go away   :Confused:   :Evil or Very Mad: 

typing arch comes up with - "i686"

----------

## devsk

 *equilibrium wrote:*   

> 
> 
> ```
> 
> ln -sf /usr/portage/profiles/default-linux/x86/2006.1/make.defaults /etc/make.profile
> ...

 

that's wrong. it should be

```
 ln -sf /usr/portage/profiles/default-linux/x86/2006.1 /etc/make.profile
```

... :Smile: 

----------

## equilibrium

damn I was too slow to edit that  :Sad:  hehe but I got it working  :Smile:  thx

I just edited the install script and changed line91 

replacing "/usr/portage/profiles/default-linux/x86/2004.2/gcc34" with "/usr/portage/profiles/default-linux/x86/2006.1"

need an etc-update after finish but hopefully I will be able to emerge some stuff now   :Very Happy: 

----------

## equilibrium

I notice emerge says 2006.1 is depreciated so I've changed it to 2006.0. Also have been unable to fix the sandbox error as sandbox doesn't seem to want to compile  :Sad: 

```
mawk: ../../sandbox-1.2.17/scripts/gen_symbol_version_map.awk: line 130: function asort never defined

\n*** Failed to generate 'libsandbox.map' !\n

make[2]: *** [libsandbox.map] Error 1
```

----------

## Elv13

the last part of the script dont work for me, i get

# #

################# UPDATES #######################

# #

These are the packages that would be merged, in order:

Calculating world dependencies

!!! All ebuilds that could satisfy ">=sys-apps/baselayout-1.11.14" have been masked.

!!! One of the following masked packages is required to complete your request:

- sys-apps/baselayout-1.12.8-r1 (masked by: package.mask)

- sys-apps/baselayout-1.11.15-r3 (masked by: package.mask)

- sys-apps/baselayout-1.12.4-r7 (masked by: package.mask)

- sys-apps/baselayout-1.13.0_alpha10 (masked by: package.mask, package.mask)

# Roy Marples <uberlord@gentoo.org> (02 Oct 2006)

# masked for testing due to major ebuild and installation changes

- sys-apps/baselayout-1.12.5-r2 (masked by: package.mask)

- sys-apps/baselayout-1.12.6 (masked by: package.mask)

- sys-apps/baselayout-1.11.14-r8 (masked by: package.mask)

- sys-apps/baselayout-1.12.8 (masked by: package.mask)

- sys-apps/baselayout-1.13.0_alpha10-r1 (masked by: package.mask, package.mask)

- sys-apps/baselayout-1.13.0_alpha10-r2 (masked by: package.mask, package.mask)

For more information, see MASKED PACKAGES section in the emerge man page or

refer to the Gentoo Handbook.

(dependency required by "sys-fs/udev-103" [ebuild])

!!! Problem resolving dependencies for sys-apps/portage

!!! Depgraph creation failed.

----------

## larrythecow

Hoorah! I got portage working on Myah OS 2.3 (basically slackware with improvements). However sometimes when installing certain programs I get:

checking whether the C compiler (gcc -O2 -pipe ) works... no

configure: error: installation or configuration problem: C compiler cannot create executables.

gpm for example returns this.

----------

## larrythecow

 :Very Happy:  Gentoo is awesome and so is Myah OS but Mytoo.. well this error sort of ruins  the fun  :Sad: . Some programs install perfectly but lots get this and since I get lots of dependencies in my Mytoo's young life then I can't install much.

----------

## devsk

portage would have told you to look at the config.log file in the /var/tmp/portage/<pkg>/...blah. Did you look at it? If you do, you will probably know how to fix it.

----------

## larrythecow

This file contains any messages produced by compilers while

running configure, to aid debugging if configure makes a mistake.

configure:563: checking for gcc

configure:676: checking whether the C compiler (gcc -O2 -pipe ) works

configure:692: gcc -o conftest -O2 -pipe   conftest.c  1>&5

gcc: installation problem, cannot exec `as': No such file or directory

configure: failed program was:

#line 687 "configure"

#include "confdefs.h"

main(){return(0);}

Is the output of log so I try to look for as.

I did 'which as' and it returned no as.    So I obtained as and I get the same error.

I checked config.log again and now it says:

This file contains any messages produced by compilers while

running configure, to aid debugging if configure makes a mistake.

configure:563: checking for gcc

configure:676: checking whether the C compiler (gcc -O2 -pipe ) works

configure:692: gcc -o conftest -O2 -pipe   conftest.c  1>&5

collect2: cannot find `ld'

configure: failed program was:

#line 687 "configure"

#include "confdefs.h"

main(){return(0);}

Turns out my ld symlink was bad so I made a new one and then gpm failed with "yacc not found". When will this madness end?!  :Razz: 

Thanks a lot.

----------

## devsk

```
emerge bison
```

----------

## larrythecow

I got yacc, bison and ranlib and then it worked  :Very Happy: 

I'm now emerging ncurses!

----------

## larrythecow

I'm up to emerging binutils with "emerge portage". is it safe to emerge binutils?

----------

## devsk

yes, it should be safe. but no harm in keeping an rpm (if that's your original install method) around if need be.

----------

## larrythecow

Slackware is source based so it uses its own format which lives in a tarball. No rpms. 

I am loving my MyToo  :Very Happy: 

----------

## larrythecow

Not sure why though, but it is a bit slow however.

What would normally take 1m on Gentoo takes 10m on MyToo. Not sure why, but I suspect is is because I haven't finished an emerge portage yet.

The reason I haven't done emerge portage is because I get stuck on dev-perl/Locale-gettext-1.05.

 * Using ExtUtils::MakeMaker

checking for gettext... no

checking for gettext in -lintl...gettext function not found. Please install libintl at Makefile.PL line 18.

 no

I have gettext and libintl.

----------

## larrythecow

When I emerge python I get:

* Applying 2.4.2-readline.patch ...

 * Failed Patch: 2.4.2-readline.patch !

 *  ( /var/tmp/portage/dev-lang/python-2.4.4/work/2.4.4/2.4.2-readline.patch )

----------

## larrythecow

***** 2.4.2-readline.patch *****

================================

PATCH COMMAND:	 patch -p0 -g0 -E --no-backup-if-mismatch < /var/tmp/portage/dev-lang/python-2.4.4/work/2.4.4/2.4.2-readline.patch

================================

patching file configure

Hunk #1 succeeded at 19582 (offset 276 lines).

misordered hunks! output would be garbled

Hunk #3 FAILED at 19800.

Hunk #4 succeeded at 19788 (offset 58 lines).

1 out of 4 hunks FAILED -- saving rejects to file configure.rej

patching file configure.in

Hunk #1 succeeded at 2975 (offset 129 lines).

================================

PATCH COMMAND:	 patch -p1 -g0 -E --no-backup-if-mismatch < /var/tmp/portage/dev-lang/python-2.4.4/work/2.4.4/2.4.2-readline.patch

================================

missing header for unified diff at line 4 of patch

can't find file to patch at input line 4

Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

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

|diff -u configure configure

|--- configure	2005-03-29 00:23:02.000000000 +0100

|+++ configure	2005-04-26 14:14:49.373258580 +0100

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

No file to patch.  Skipping patch.

4 out of 4 hunks ignored

missing header for unified diff at line 252 of patch

can't find file to patch at input line 252

Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

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

|diff -u configure.in configure.in

|--- configure.in	2005-03-29 00:23:34.000000000 +0100

|+++ configure.in	2005-04-26 14:01:03.721206572 +0100

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

No file to patch.  Skipping patch.

2 out of 2 hunks ignored

================================

PATCH COMMAND:	 patch -p2 -g0 -E --no-backup-if-mismatch < /var/tmp/portage/dev-lang/python-2.4.4/work/2.4.4/2.4.2-readline.patch

================================

missing header for unified diff at line 4 of patch

can't find file to patch at input line 4

Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

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

|diff -u configure configure

|--- configure	2005-03-29 00:23:02.000000000 +0100

|+++ configure	2005-04-26 14:14:49.373258580 +0100

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

No file to patch.  Skipping patch.

4 out of 4 hunks ignored

missing header for unified diff at line 252 of patch

can't find file to patch at input line 252

Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

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

|diff -u configure.in configure.in

|--- configure.in	2005-03-29 00:23:34.000000000 +0100

|+++ configure.in	2005-04-26 14:01:03.721206572 +0100

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

No file to patch.  Skipping patch.

2 out of 2 hunks ignored

================================

PATCH COMMAND:	 patch -p3 -g0 -E --no-backup-if-mismatch < /var/tmp/portage/dev-lang/python-2.4.4/work/2.4.4/2.4.2-readline.patch

================================

missing header for unified diff at line 4 of patch

can't find file to patch at input line 4

Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

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

|diff -u configure configure

|--- configure	2005-03-29 00:23:02.000000000 +0100

|+++ configure	2005-04-26 14:14:49.373258580 +0100

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

No file to patch.  Skipping patch.

4 out of 4 hunks ignored

missing header for unified diff at line 252 of patch

can't find file to patch at input line 252

Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

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

|diff -u configure.in configure.in

|--- configure.in	2005-03-29 00:23:34.000000000 +0100

|+++ configure.in	2005-04-26 14:01:03.721206572 +0100

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

No file to patch.  Skipping patch.

2 out of 2 hunks ignored

================================

PATCH COMMAND:	 patch -p4 -g0 -E --no-backup-if-mismatch < /var/tmp/portage/dev-lang/python-2.4.4/work/2.4.4/2.4.2-readline.patch

================================

missing header for unified diff at line 4 of patch

can't find file to patch at input line 4

Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

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

|diff -u configure configure

|--- configure	2005-03-29 00:23:02.000000000 +0100

|+++ configure	2005-04-26 14:14:49.373258580 +0100

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

No file to patch.  Skipping patch.

4 out of 4 hunks ignored

missing header for unified diff at line 252 of patch

can't find file to patch at input line 252

Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

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

|diff -u configure.in configure.in

|--- configure.in	2005-03-29 00:23:34.000000000 +0100

|+++ configure.in	2005-04-26 14:01:03.721206572 +0100

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

No file to patch.  Skipping patch.

2 out of 2 hunks ignored

----------

## larrythecow

myah lib # emerge pycrypto

Calculating dependencies... done!

>>> Emerging (1 of 1) dev-python/pycrypto-2.0.1-r5 to /

 * pycrypto-2.0.1.tar.gz RMD160  :Wink:  ...                                                           [ ok ]

 * pycrypto-2.0.1.tar.gz SHA1  :Wink:  ...                                                             [ ok ]

 * pycrypto-2.0.1.tar.gz SHA256  :Wink:  ...                                                           [ ok ]

 * pycrypto-2.0.1.tar.gz size  :Wink:  ...                                                             [ ok ]

 * checking ebuild checksums  :Wink:  ...                                                              [ ok ]

 * checking auxfile checksums  :Wink:  ...                                                             [ ok ]

 * checking miscfile checksums  :Wink:  ...                                                            [ ok ]

 * checking pycrypto-2.0.1.tar.gz  :Wink:  ...                                                         [ ok ]

>>> Unpacking source...

>>> Unpacking pycrypto-2.0.1.tar.gz to /var/tmp/portage/dev-python/pycrypto-2.0.1-r5/work

 * Applying pycrypto-2.0.1-sha256.patch ...                                                       [ ok ]

 * Applying pycrypto-2.0.1-gmp.patch ...                                                          [ ok ]

 * Applying pycrypto-2.0.1-uint32.patch ...                                                       [ ok ]

 * Applying pycrypto-2.0.1-sancho-package-rename.patch ...                                        [ ok ]

>>> Source unpacked.

>>> Compiling source in /var/tmp/portage/dev-python/pycrypto-2.0.1-r5/work/pycrypto-2.0.1 ...

running build

running build_py

creating build

creating build/lib.linux-i686-2.4

creating build/lib.linux-i686-2.4/Crypto

copying ./__init__.py -> build/lib.linux-i686-2.4/Crypto

copying ./test.py -> build/lib.linux-i686-2.4/Crypto

creating build/lib.linux-i686-2.4/Crypto/Hash

copying ./Hash/__init__.py -> build/lib.linux-i686-2.4/Crypto/Hash

copying ./Hash/HMAC.py -> build/lib.linux-i686-2.4/Crypto/Hash

copying ./Hash/MD5.py -> build/lib.linux-i686-2.4/Crypto/Hash

copying ./Hash/SHA.py -> build/lib.linux-i686-2.4/Crypto/Hash

creating build/lib.linux-i686-2.4/Crypto/Cipher

copying ./Cipher/__init__.py -> build/lib.linux-i686-2.4/Crypto/Cipher

creating build/lib.linux-i686-2.4/Crypto/Util

copying ./Util/__init__.py -> build/lib.linux-i686-2.4/Crypto/Util

copying ./Util/number.py -> build/lib.linux-i686-2.4/Crypto/Util

copying ./Util/randpool.py -> build/lib.linux-i686-2.4/Crypto/Util

copying ./Util/RFC1751.py -> build/lib.linux-i686-2.4/Crypto/Util

copying ./Util/test.py -> build/lib.linux-i686-2.4/Crypto/Util

creating build/lib.linux-i686-2.4/Crypto/Protocol

copying ./Protocol/__init__.py -> build/lib.linux-i686-2.4/Crypto/Protocol

copying ./Protocol/AllOrNothing.py -> build/lib.linux-i686-2.4/Crypto/Protocol

copying ./Protocol/Chaffing.py -> build/lib.linux-i686-2.4/Crypto/Protocol

creating build/lib.linux-i686-2.4/Crypto/PublicKey

copying ./PublicKey/__init__.py -> build/lib.linux-i686-2.4/Crypto/PublicKey

copying ./PublicKey/DSA.py -> build/lib.linux-i686-2.4/Crypto/PublicKey

copying ./PublicKey/ElGamal.py -> build/lib.linux-i686-2.4/Crypto/PublicKey

copying ./PublicKey/pubkey.py -> build/lib.linux-i686-2.4/Crypto/PublicKey

copying ./PublicKey/qNEW.py -> build/lib.linux-i686-2.4/Crypto/PublicKey

copying ./PublicKey/RSA.py -> build/lib.linux-i686-2.4/Crypto/PublicKey

running build_ext

building 'Crypto.Hash.MD2' extension

creating build/temp.linux-i686-2.4

creating build/temp.linux-i686-2.4/src

-fno-strict-aliasing -DNDEBUG -O3 -march=i486 -mtune=i686 -O2 -pipe -fPIC -Isrc/ -I/usr/include/python2.4 -c src/MD2.c -o build/temp.linux-i686-2.4/src/MD2.o

unable to execute -fno-strict-aliasing: No such file or directory

error: command '-fno-strict-aliasing' failed with exit status 1

!!! ERROR: dev-python/pycrypto-2.0.1-r5 failed.

Call stack:

  ebuild.sh, line 1614:   Called dyn_compile

  ebuild.sh, line 971:   Called qa_call 'src_compile'

  environment, line 3542:   Called src_compile

  pycrypto-2.0.1-r5.ebuild, line 38:   Called distutils_src_compile

  distutils.eclass, line 38:   Called die

!!! compilation failed

!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! A complete build log is located at '/var/tmp/portage/dev-python/pycrypto-2.0.1-r5/temp/build.log'.

----------

## acern300

hello, i am a noob in linux, but i really need portage on a knoppix installation on a external harddrive. I dont really understand what i must do with this script  :Sad:  can somebudu tell me what i must do step by step? it would be really friendly  :Razz:  thank you  :Razz: 

----------

## gotha666

I dont know if anybody is still interested in this project but ...

I`ve tried to install portage on Slackware 10.2 with the package portage-2.1.3 and portage-2.0.51.22 but the script doesnt work properly. Thats why I started executing everything by hand and trying to correct it. I stuck on compiling and installing of sandbox just because there is no such directory in my archive. Any ideas?

Is this directory created after compiling some other package/s ?

I suppose i have to mention that I am using python-2.4 because this is the only provided package for Slackware 10.2

P.S. My english is... hm ... worse than I exprected so I hope you understand me  :Smile: 

----------

## tony11235

How do you get "!!! Problem with sandbox binary. Disabling..." error to go away?   I was trying to emerge emacs.  My portage.mask is the following:

```

sys-apps/baselayout

sys-devel/bin86

sys-libs/glibc

sys-apps/cronbase

sys-libs/pam

sys-libs/pam-login

sys-devel/gcc

sys-devel/binutils

```

Yet it when I emerge emacs, I still get the following:

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

```

Calculating dependencies \

!!! All ebuilds that could satisfy ">=sys-devel/binutils-2.16.1" have been masked.

!!! One of the following masked packages is required to complete your request:

- sys-devel/binutils-2.16.1-r3 (masked by: package.mask)

- sys-devel/binutils-2.17-r1 (masked by: package.mask)

- sys-devel/binutils-2.17 (masked by: package.mask)

- sys-devel/binutils-2.18 (masked by: package.mask, ~x86 keyword)

- sys-devel/binutils-2.17.50.0.12 (masked by: package.mask, -* keyword)

- sys-devel/binutils-2.17.50.0.17 (masked by: package.mask, missing keyword)

- sys-devel/binutils-2.17.50.0.16 (masked by: package.mask, -* keyword)

- sys-devel/binutils-2.16.91.0.6 (masked by: package.mask, -* keyword)

- sys-devel/binutils-2.18.50.0.1 (masked by: package.mask, missing keyword)

For more information, see MASKED PACKAGES section in the emerge man page or 

section 2.2 "Software Availability" in the Gentoo Handbook.

!!!    (dependency required by "sys-libs/db-4.5.20_p2" [ebuild])

```

----------

## desultory

Have you tried using /etc/portage/profile/package.provided?

----------

## tony11235

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.

----------

## zecora

```

>>> 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.

----------

## zecora

```
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.

----------

## zecora

I fixed that issue by doing 

```
ln -sf /usr/portage/profiles/default-linux/x86/2006.1 /etc/make.profile
```

 it seems it is not working when I try to 

```
emerge portage
```

. 

Here is the msg I get.

```
[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?

----------

## pwiddy

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 

```
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.

----------

## jaytho

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

----------

## Pliablemammal

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?

----------

## xaviermiller

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.

----------

## xaviermiller

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.

----------

## ferringb

 *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à !
> ...

 

Bit curious...

----------

## xaviermiller

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).

----------

## krystys

it would be absolutely great if you could tell us how to install portage-emerge on a LFS 6.6

----------

## xaviermiller

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  :Smile: 

----------

## krystys

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

----------

## xaviermiller

Yep.

Assuming python is installed:

```
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  :Smile: 

----------

## krystys

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

And also, what do i need to download - portage-latest.tar.bz2?

----------

## xaviermiller

Hello,

Just to say I fully succeeded a script that install Gentoo from Scratch   :Cool: 

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....

----------

## yanom

does this still work, 6 years later?

----------

## Daviljoe193

 *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.   :Smile: 

----------

## ArneBab

 *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.

----------

## _______0

 *XavierMiller wrote:*   

> Hello,
> 
> Just to say I fully succeeded a script that install Gentoo from Scratch  
> 
> 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, ...)
> ...

 

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.

----------

## xaviermiller

That exist already : gentoo prefix based on Interix (or not working : based on cygwin)

----------

## necrose99

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:
> ...

 

----------

## Killerchronic

 *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.

----------

## axiomoixa

so does the script still work after a decade?

or is there a friendlier method developed for installing Portage on non-Gentoo?

----------

