View previous topic :: View next topic |
Author |
Message |
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9555 Location: beyond the rim
|
Posted: Fri Feb 06, 2004 6:11 pm Post subject: |
|
|
Never heard of Solaris for PPC, but if it exists the example is probably void, so replace ppc with ia64/amd64/mips/hppa/alpha/arm |
|
Back to top |
|
|
stonent Veteran
Joined: 07 Aug 2003 Posts: 1139 Location: Texas
|
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2998 Location: Bay Area, CA
|
Posted: Sun Feb 08, 2004 6:39 pm Post subject: |
|
|
stonent wrote: | I don't remember what I'm running at this point but I did look at what the stage 1 had and downloaded the appropriate pieces using pkg-get (bolthole version)
If they already had a binutils package, then I'm using it.
mv, cp, tar, tty, install need to be GNU for portage to run (I'm actually using the BSD SunOS install in /usr/ccs (i think) linked to the real one.
I've also been thinking about how we could bootstrap a stage 1 under solaris. Basically I came up with this.
You'll need the bolthole pkg-get package installed as well as wget in your path.
Then a script will run out to bolthole and pkg-get all of the latest versions of python, gcc, etc that are needed to run portage. These will install into /opt/csw
Then it will wget the solaris stage1 tarball and bootstrap using the bolthole packages (probably install them into /opt/portage or something) and when it is done with stage 1, it will remove the /opt/csw packages and run completely off of the compiled packages instead to rebuilt itself just like the real portage does. |
I think that gcc, binutils, python and perl compiled without any modification on solaris...so, your bootstrap script can wget gcc first, compile it with solaris tools with proper optimization, install it in /opt/csw. Then wget and install binutils into /opt/portage with new gcc. Then install gcc again, this time with gnu-ld and using gcc from /opt/csw, into /opt/portage. Compile and install binutils again. Finally install python and perl into /opt/portage with gcc and gnu-ld. You would have /opt/portage as your GNU system, ready for installing portage. You can now remove /opt/csw.
All these steps are most likely going to succeed (they did for me), so putting them in a script is doable just by modifying PATH, LD_LIBRARY_PATH and ./configure args at appropriate times. |
|
Back to top |
|
|
stonent Veteran
Joined: 07 Aug 2003 Posts: 1139 Location: Texas
|
Posted: Mon Feb 09, 2004 6:51 am Post subject: |
|
|
Write a script? Oh boy, now I have to learn a scripting language...
I tried to make an e-build that filled the headers and kernel virtuals but it wouldn't emerge.
Code: | bash-2.05# emerge solaris-headers.ebuild
Calculating dependencies \Traceback (most recent call last):
File "/opt/csw/bin/emerge", line 2181, in ?
retval,favorites=mydepgraph.select_files(myfiles)
File "/opt/csw/bin/emerge", line 789, in select_files
if not self.create(["ebuild",portage.root,mykey],None,"--onlydeps" not in myopts):
File "/opt/csw/bin/emerge", line 740, in create
edepend[x]=string.join(portage.portdb.aux_get(mykey,[x]), " ")
File "/opt/csw/lib/python2.3/site-packages/portage.py", line 3748, in aux_get
myebuild,in_overlay=self.findname2(mycpv)
ValueError: need more than 0 values to unpack |
I guess it needs something to unpack. Here's the ebuild:
Code: | bash-2.05# cat solaris-headers.ebuild
IUSE=""
S=${WORKDIR}/${P}
DESCRIPTION="Fills the virtual/kernel and virtual/os-headers for Solaris"
PROVIDE="virtual/kernel virtual/os-headers"
HOMEPAGE="http://www.sun.com/ http://www.gentoo.org/"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="x86 sparc"
DEPEND=""
src_install() {
einfo "This provides the virtual for os-headers and os-kernel"
}
|
_________________ Inspiron 4100 & Sun UltraAXe
Portage on Solaris|Dell Laptop Hacks
The way you feel about organized religion is the same way I feel about organized socialism. |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9555 Location: beyond the rim
|
Posted: Mon Feb 09, 2004 8:30 am Post subject: |
|
|
missing version number in the filename (even if it's meaningless). |
|
Back to top |
|
|
stonent Veteran
Joined: 07 Aug 2003 Posts: 1139 Location: Texas
|
Posted: Tue Feb 10, 2004 4:59 am Post subject: |
|
|
What have you been using for as? I'm trying to compile gcc-sparc64 3.3.2 and it failed looking for as so I linked /usr/ccs/bin/as to /usr/bin/as
Also the xargs error is getting annoying. _________________ Inspiron 4100 & Sun UltraAXe
Portage on Solaris|Dell Laptop Hacks
The way you feel about organized religion is the same way I feel about organized socialism. |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2998 Location: Bay Area, CA
|
Posted: Tue Feb 10, 2004 7:25 am Post subject: |
|
|
As I mentioned, I build gcc and binutils with /usr/ccs/bin tools. Then rebuilt gcc with newly built binutils tools(as, ld, nm, strip...). Now, everything is GNU.
xargs is part of findutils. After emerging findutils, I don't get any xargs problems. And that is one reason why I say that portage will work great if the whole system is as much GNU as possible. |
|
Back to top |
|
|
stonent Veteran
Joined: 07 Aug 2003 Posts: 1139 Location: Texas
|
Posted: Tue Feb 10, 2004 3:51 pm Post subject: |
|
|
Genone wrote: | missing version number in the filename (even if it's meaningless). |
Ok I just named it solaris-headers-1.0.ebuild and put it in sys-kernel/solaris-headers
It still wants to emerge linux-headers 2.4.19-r1 for some reason. _________________ Inspiron 4100 & Sun UltraAXe
Portage on Solaris|Dell Laptop Hacks
The way you feel about organized religion is the same way I feel about organized socialism. |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2998 Location: Bay Area, CA
|
Posted: Tue Feb 10, 2004 7:04 pm Post subject: |
|
|
I don't know what problem you are trying to address here...maybe its because I don't understand what a 'virtual' is... |
|
Back to top |
|
|
stonent Veteran
Joined: 07 Aug 2003 Posts: 1139 Location: Texas
|
Posted: Tue Feb 10, 2004 8:58 pm Post subject: |
|
|
Well, it doesn't think it has a kernel or headers so mine tries to emerge a kernel and headers if I don't do a -O _________________ Inspiron 4100 & Sun UltraAXe
Portage on Solaris|Dell Laptop Hacks
The way you feel about organized religion is the same way I feel about organized socialism. |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2998 Location: Bay Area, CA
|
Posted: Tue Feb 10, 2004 9:52 pm Post subject: |
|
|
I did emerge inject of exact version e.g. sys-kernel/linux-headers-2.4.19-r1, it reported was required, it didn't try to emerge kernel or os headers after that.
I have a small script which does "emerge rsync", prunes out "forbidden" packages and injects (latest version from emerge -puD world) them immediately, so later, emerging a package doesn't require an analysis.
genone, what exactly is a virtual? |
|
Back to top |
|
|
stonent Veteran
Joined: 07 Aug 2003 Posts: 1139 Location: Texas
|
Posted: Wed Feb 11, 2004 5:34 am Post subject: |
|
|
A virtual is a general dependency. Such as bash requires some kind of c library, so a virtual of libc is required. But there can be many kinds, libc, glibc, tinyglibc, solaris libc...
So by filling the virtual, it won't need a specific one , just a kind of one. I made the ebuild above because solaris already comes with headers and a kernel, so anything that requires headers and a kernel, will not try to emerge them.. _________________ Inspiron 4100 & Sun UltraAXe
Portage on Solaris|Dell Laptop Hacks
The way you feel about organized religion is the same way I feel about organized socialism. |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2998 Location: Bay Area, CA
|
Posted: Wed Feb 11, 2004 7:09 am Post subject: |
|
|
so, why is inject not satisfying a virtual dependency in your setup, while it does seem to do for me? there is still something missing here... |
|
Back to top |
|
|
stonent Veteran
Joined: 07 Aug 2003 Posts: 1139 Location: Texas
|
Posted: Wed Feb 11, 2004 3:42 pm Post subject: |
|
|
I don't know, somewhere along the line we did some different things. Right now, I seem to be noticing that things I emerge are not being updated because I'll try to emerge something else and it will re-emerge something that I already have.
I still have to do -O because not enough stuff works to let it go by itself. But for fun, last night I tried emerging xchat and it started to do gettext which I had already emerged.
BTW: The patch issue seemed to have resolved itself, things patch now. I also statically linked /bin/sh to /opt/csw/bin/bash because some of the scripts seem to assume that /bin/sh is really bash, and thereby try to do some things that a true bourne shell can't do. (I see a lot of /bin/sh: Invalid argument flash by unless I link it to bash)
Mine's a little more confusing too since Solaris 9 has so much GNU stuff that comes with it, many times I can't tell if it is using things in /opt/csw or the other things. _________________ Inspiron 4100 & Sun UltraAXe
Portage on Solaris|Dell Laptop Hacks
The way you feel about organized religion is the same way I feel about organized socialism. |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2998 Location: Bay Area, CA
|
Posted: Wed Feb 11, 2004 8:26 pm Post subject: |
|
|
Quote: | Mine's a little more confusing too since Solaris 9 has so much GNU stuff that comes with it, many times I can't tell if it is using things in /opt/csw or the other things. |
putting /opt/csw ahead in PATH/LD_LIBRARY_PATH should solve this...
another thing: Are you using the ROOT env variable to install in /opt/csw? there are few bugs there. e.g. for PATH, ebuild.sh should have included ${ROOT}bin, ${ROOT}usr/bin in PATH as well when it includes only standard /bin, /usr/bin etc. So, no matter what your $PATH is in the shell where you emerge from, it will overwritten with /opt/csw gone from it for the rest of the execution. |
|
Back to top |
|
|
stonent Veteran
Joined: 07 Aug 2003 Posts: 1139 Location: Texas
|
Posted: Wed Feb 11, 2004 8:59 pm Post subject: |
|
|
Yeah I always use ROOT=/opt/csw and the path includes opt/csw first I haven't messed with ldpath.
I might look at ebuild.sh and see about forcing it to do some stuff in /opt/csw _________________ Inspiron 4100 & Sun UltraAXe
Portage on Solaris|Dell Laptop Hacks
The way you feel about organized religion is the same way I feel about organized socialism. |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2998 Location: Bay Area, CA
|
Posted: Wed Feb 11, 2004 9:50 pm Post subject: |
|
|
Quote: | Yeah I always use ROOT=/opt/csw and the path includes opt/csw first I haven't messed with ldpath. |
then modify ebuild.sh to include /opt/csw/[s]bin and /opt/csw/usr/[s]bin in PATH.
emerge inject will never inject into /opt/csw and that explains why you always have to inject. I modified usr/lib/portage/bin/emerge to inject in both places. apply this change:
REPLACE (simple grep should take you there):
Code: | if portage.db["/"]["vartree"].exists_specific(x):
print "!!! Not injecting",x+"; Package already exists."
else: |
WITH:
Code: | if portage.db[portage.root]["vartree"].exists_specific(x):
print "!!! user Not injecting",x+"; Package already exists."
else:
portage.db[portage.root]["vartree"].dbapi.cpv_inject(x)
print ">>> user Injected",x+"."
emergelog(" === inject: "+x)
if portage.db["/"]["vartree"].exists_specific(x):
print "!!! Not injecting",x+"; Package already exists."
else: |
This will inject it at both places. So, this will solve your virtuals problem.
then REPLACE:
Code: |
mydep["/"]=edepend["DEPEND"]
mydep[myroot]=edepend["RDEPEND"]
if not self.select_dep("/",mydep["/"],myparent=mp,myuse=myuse):
return 0
elif not self.select_dep(myroot,mydep[myroot],myparent=mp,myuse=myuse):
return 0 |
WITH:
Code: |
mydep["/"]=edepend["DEPEND"]
mydep[myroot]=edepend["DEPEND"]+" "+edepend["RDEPEND"]
if not self.select_dep(myroot,mydep[myroot],myparent=mp,myuse=myuse):
return 0
#elif not self.select_dep("/",mydep["/"],myparent=mp,myuse=myuse):
#return 0 |
This will make sure that all deps are resolved from ${ROOT} and not from "/".
This will solve your problem with it asking to emerge again already emerged packages.
But with ROOT=/opt/csw, there is more trouble. In ebuild.sh, econf() does configure with prefix=/usr, which means in pkgconfig/*.pc files, that's what will be recorded. Installed packages will also assume that they are installed in /usr when they are in /opt/csw. e.g. gtk+ will conclude from pango *.pc files that its installed in /usr and it won't be there. libtool archives are problems in the same manner.
I think ROOT feature is there to duplicate "/" to ${ROOT}, so to emerge gtk+ in $ROOT, you need same pango in "/" as well as in $ROOT. When you chroot to $ROOT, you will see it exactly like in "/".
The pathspec(real install in non "/" location) that genone was talking about, will require extensive changes... |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2998 Location: Bay Area, CA
|
Posted: Wed Mar 10, 2004 2:54 am Post subject: |
|
|
Genone, I really need your help today. I figured that "emerge -puD world" was not showing kde as a package which has upgrade available, although 3.2.1 is in portage and kde-base/kde is in "world" file.
I changed the following in ${ROOT}usr/lib/portage/bin/emerge:
Code: | #actually available -- this prevents emerge from bombing out due to no match being found (we want a silent ignore)
if "empty" in myparams:
if portage.db["/"]["vartree"].dbapi.match(x):
sysdict[x]=worlddict[x]
elif portage.db[portage.root]["vartree"].dbapi.match(x):
#package is installed
sysdict[x]=worlddict[x]
else:
print "\n*** Package in world file is not installed: "+x |
to:
Code: | #actually available -- this prevents emerge from bombing out due to no match being found (we want a silent ignore)
if "empty" in myparams:
if portage.db["/"]["vartree"].dbapi.match(x):
sysdict[x]=worlddict[x]
elif portage.db[portage.root]["vartree"].dbapi.match(x):
#package is installed
sysdict[x]=worlddict[x]
else:
print "\n*** Package in world file is not installed: "+x |
please note the extra tabs. is that a correct change? it seems like we return from first "if" check always if root is "/" and hence it has never been caught. "emerge -pu kde" showed correctly. |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9555 Location: beyond the rim
|
Posted: Wed Mar 10, 2004 3:29 am Post subject: |
|
|
Hmm, I would have to check back with someone who is more familiar with that part (personally I try to stay out of anything related to the dependency resolver ), but if it works right with that change I'd guess it's ok |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2998 Location: Bay Area, CA
|
Posted: Wed Mar 10, 2004 6:08 am Post subject: |
|
|
Genone, great!! Thanks for your reply. As usual, very quick!! Please let me know if you find something. thanks again man! |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2998 Location: Bay Area, CA
|
Posted: Fri Mar 19, 2004 12:58 am Post subject: |
|
|
Genone wrote: | Hmm, I would have to check back with someone who is more familiar with that part (personally I try to stay out of anything related to the dependency resolver ), but if it works right with that change I'd guess it's ok |
Genone, any news on this? |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9555 Location: beyond the rim
|
Posted: Fri Mar 19, 2004 2:09 am Post subject: |
|
|
No, it's hard to get catch Nick these days and the fact that we live in different timezones doesn't help much. Your best bet is probably to file a bug and hope that Nick or Nakano get to it. |
|
Back to top |
|
|
stonent Veteran
Joined: 07 Aug 2003 Posts: 1139 Location: Texas
|
Posted: Fri Mar 19, 2004 3:55 am Post subject: |
|
|
I haven't been messing with mine in a while. Mainly due to some stuff in solaris is currently broke by my tinkering with it. I'm running Solaris 9, but I picked up a Solaris 7 11/99 media kit off Ebay and hope to get it going. Since Solaris 8 and 9 include so much GNU software installed in /usr/bin it is interfereing with me trying to get my own stuff going. _________________ Inspiron 4100 & Sun UltraAXe
Portage on Solaris|Dell Laptop Hacks
The way you feel about organized religion is the same way I feel about organized socialism. |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2998 Location: Bay Area, CA
|
Posted: Tue Mar 23, 2004 4:56 am Post subject: |
|
|
I emerged XFree86 successfully, only to find that the damn thing doesn't support my Creator3D card under solaris....it supports it under linux though....what a shame!
all the same source code but solaris ioctl's refuse to return proper values for the fb device...any idea why would this program fail with ENOTTY:
Code: | #include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/fbio.h>
#include <errno.h>
#include <string.h>
main()
{
int fd = open("/dev/fb0", O_RDONLY, 0);
struct fbgattr fbattr;
if (fd < 0)
printf("open failed\n");
memset(&fbattr, 0, sizeof(fbattr));
if (ioctl(fd, FBIOGATTR, &fbattr) < 0) {
printf("FBIOGATTR failed (%s)\n", strerror(errno));
if (ioctl(fd, FBIOGTYPE, &fbattr.fbtype) < 0) {
printf("FBIOGTYPE failed (%s)\n", strerror(errno));
}
}
} |
anyway, I can still use the libraries it installed, if nothing else... |
|
Back to top |
|
|
stonent Veteran
Joined: 07 Aug 2003 Posts: 1139 Location: Texas
|
Posted: Tue Mar 23, 2004 5:10 am Post subject: |
|
|
I wonder if it would work on a PGX64? Those are a bit more PC like, since creators all use AFX, SBUS or UPA if I recall.
Are you still using Solaris 2.6? _________________ Inspiron 4100 & Sun UltraAXe
Portage on Solaris|Dell Laptop Hacks
The way you feel about organized religion is the same way I feel about organized socialism. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|