Re: linux emulation problems - path length restrictions in linux_rename

2000-04-10 Thread Marcel Moolenaar

Matthew Dillon wrote:

> Basically I had to take the linux_base port, and then chroot into
> /usr/compat/linux and install the rpm's for most of redhat, including
> the compiler environment, and the ld.so and ldd piece from slackware
> (because redhat's is broken under emulation).

Sounds like a lot of work. This is what I did (besides installing
linux_base and linux_devtools)

1) Get JRE to work

   in /usr/local/jre/bin edit jre, rmiregister, checkVersion:
#!/compat/linux/bin/sh
[OK, I lied. I said I only changed a single script :-]

   create /compat/linux/bin/arch to contain:
#!/bin/sh
uname -m

   rm /compat/linux/usr/bin/ldd

2) Get Oracle8i installer to work

   set DISPLAY

   set TMP

   link /compat/linux/etc/mtab to /etc/fstab

It took me a couple of hours, but I didn't spend any time getting an
actual database working. Oracle8i was fairly new at the time and I
wasn't going to waste any time tracing bugs that also existed on Linux.
My primary concern was the Linuxulator :-)

-- 
Marcel Moolenaar
  mail: [EMAIL PROTECTED] / [EMAIL PROTECTED]
  tel:  (408) 447-4222


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: linux emulation problems - path length restrictions in linux_rename

2000-04-10 Thread Matthew Dillon

:> (No, this fix alone isn't enough to do an oracle install, it's just too
:> grungy a beast).
:
:In 1999Q2 I did an install of Oracle8i, which failed due to an installer
:problem, IIRC. I only modified 1 script to overcome the shell execution
:problem. You are using Blackdown JDK, are you?
:
:-- 
:Marcel Moolenaar

Yes.  I've managed to get oracle-8i installed on FreeBSD under linux
emulation, but it was a chore.  It took 30 hours before I was able to
figure it out from a combination of playing around and locating the
redhat install support documents on oracle's site.

Basically I had to take the linux_base port, and then chroot into
/usr/compat/linux and install the rpm's for most of redhat, including
the compiler environment, and the ld.so and ldd piece from slackware
(because redhat's is broken under emulation).  On the upside, this 
actually worked - I have a nearly complete linux environment 
(fortunately oracle does not require /proc or /dev in general), I was
able to download and install the linux jre 1.1.6 (which oracle requires),
and I was able to get most of oracle installed.  Unfortunately, half 
the oracle Java assistants still don't work.  Fortunately the base 
binaries work and I was able to create databases.  Unfortunately, the
oracle install process is fragile and a chore - you screwup, you start
over.

I can't say I'm impressed.  Oracle itself is a very complete relational
database, but their replication capabilities suck.  They only do 
non-quorum fully synchronous replication or non-quorum fully 
asynchronous replication.  They do not do quorum synchronous replication
(which means that if you have 10 replicated sites in a multi-master
configuration, and one goes down, you are screwed), and they don't
support asynchronous (to the transaction) commits in a replicated 
environment (where basically a site sends the phase-2 commit
acknowledgement before actually committing the physical data, which makes
transactions go a whole lot faster without sacrificing much, if any,
data integrity).  Also, Oracle's replication is built out of SQL
procedures and triggers and is very, *VERY* fragile.  If you make
one mistake running management commands, you screw the whole cluster.
Unacceptable!

-Matt
Matthew Dillon 
<[EMAIL PROTECTED]>



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: linux emulation problems - path length restrictions in linux_rename

2000-04-10 Thread Marcel Moolenaar

[CC to -emulation as well]

Matthew Dillon wrote:
> 
> I just noticed that the reserved area of the user stack that the linux
> emulator uses to copy modified paths is only 256 bytes long.
> 
> linux_rename() makes two calls to the path munging code, which means
> that the two path arguments are limited in aggregate to 256 bytes,
> which is wrong.

I've kept a PR open that addresses this indirectly. The real bug is that
there's no length checking, which means that if the combined length
exceeds 256, bad things happen.

> I've also noted another major issue with the linux emulation, and that
> is with shell script execution.
> 
> If you are running a linux binary which then fork/exec's a shell script,
> the interpreter path at the top of the shell script does not undergo
> the path munging code, which breaks the script out of the linux emulation
> mode (because it runs the FreeBSD /bin/sh, /bin/csh, etc instead of the
> linux version).

This is something I have on my TODO list for a while now.

> I have a fix for the latter problem.  It's fairly trivial.
> Without a fix the only way one can reliably run serious linux apps
> (like an oracle install for example) under linux emulation is to
> chroot into /compat/linux.  I would appreciate a review:

It basicly looks all right. I haven't tried it yet and also didn't study
it closely. I was thinking along the lines of creating more of a
"context". This way we can have different behaviour depending on
"context". Context being "FreeBSD" or "Linux" or whatever. I hoped to
save the addition of "try-this-first" pointers to existing structures.
Not that it is bad in general, but I somehow always end up thinking that
there's something structurally wrong if you end up doing it like that
:-)

> (No, this fix alone isn't enough to do an oracle install, it's just too
> grungy a beast).

In 1999Q2 I did an install of Oracle8i, which failed due to an installer
problem, IIRC. I only modified 1 script to overcome the shell execution
problem. You are using Blackdown JDK, are you?

-- 
Marcel Moolenaar
  mail: [EMAIL PROTECTED] / [EMAIL PROTECTED]
  tel:  (408) 447-4222


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



linux emulation problems - path length restrictions in linux_rename

2000-04-08 Thread Matthew Dillon

I just noticed that the reserved area of the user stack that the linux
emulator uses to copy modified paths is only 256 bytes long.

linux_rename() makes two calls to the path munging code, which means
that the two path arguments are limited in aggregate to 256 bytes,
which is wrong.

I've also noted another major issue with the linux emulation, and that
is with shell script execution.

If you are running a linux binary which then fork/exec's a shell script,
the interpreter path at the top of the shell script does not undergo
the path munging code, which breaks the script out of the linux emulation
mode (because it runs the FreeBSD /bin/sh, /bin/csh, etc instead of the
linux version).

I have a fix for the latter problem.  It's fairly trivial. 
Without a fix the only way one can reliably run serious linux apps
(like an oracle install for example) under linux emulation is to 
chroot into /compat/linux.  I would appreciate a review:

http://www.backplane.com/FreeBSD4/linux-script-01.diff

(No, this fix alone isn't enough to do an oracle install, it's just too
grungy a beast).

-Matt



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message