Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Apr 2008 16:46:33 +0200
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        Hetzel <swhetzel@gmail.com>, freebsd-emulation@freebsd.org, Scot, Walter Venable <weaseal@gmail.com>
Subject:   Re: linux_base-f8 giving me guff
Message-ID:  <20080429164633.21308qxgswq81p00@webmail.leidinger.net>
In-Reply-To: <20080429131342.GZ18958@deviant.kiev.zoral.com.ua>
References:  <48164CD5.9030109@gmail.com> <790a9fff0804281537p27003437p10ff1d9bf7c7bff@mail.gmail.com> <20080429045001.GW18958@deviant.kiev.zoral.com.ua> <42172269@ipt.ru> <20080429101459.GX18958@deviant.kiev.zoral.com.ua> <95766063@serv3.int.kfs.ru> <20080429131342.GZ18958@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Kostik Belousov <kostikbel@gmail.com> (from Tue, 29 Apr 2008 =20
16:13:42 +0300):

> On Tue, Apr 29, 2008 at 04:51:28PM +0400, Boris Samorodov wrote:
>> On Tue, 29 Apr 2008 13:14:59 +0300 Kostik Belousov wrote:
>> > On Tue, Apr 29, 2008 at 10:46:10AM +0400, Boris Samorodov wrote:
>> > > (drop freebsd-ports@ from cross posting)
>> > >
>> > > On Tue, 29 Apr 2008 07:50:01 +0300 Kostik Belousov wrote:
>> > > > On Mon, Apr 28, 2008 at 05:37:18PM -0500, Scot Hetzel wrote:
>> > > > > On Mon, Apr 28, 2008 at 5:16 PM, Walter Venable =20
>> <weaseal@gmail.com> wrote:
>> > > > > > /usr/ports/emulators/linux_base-f8 $ sudo make
>> > > > > > =3D=3D=3D>  linux_base-f8-8_3 compat.linux.osrelease: 2.4.2 is =
=20
>> not supported.
>> > > > > > *** Error code 1
>> > > > > >
>> > > > > > Stop in /usr/ports/emulators/linux_base-f8.
>> > > > > >
>> > > > > > Ok -- I get it, linux kernel 2.4.2 isn't supported.  How =20
>> do I get around
>> > > > > > this issue?  I'm running 6.3-RELEASE-p2...
>> > > > >
>> > > > > sysctl compat.linux.osrelease=3D2.6.16
>> > >
>> > > > The question that seems to be relevant there is why the port =20
>> refuses to
>> > > > install with some compat.linux.osrelease value ? Does port run some
>> > > > linux binary during install time (unlikely) ?
>> > >
>> > > Any linux port that installs a shared library (including linux_base
>> > > ports) runs linux ldconfig while (at the very end of) installing.
>> > > Since that ldconfig cannot run with such an old kernel it stops with
>> > > the error.
>>
>> > Thank you for the explanation. I propose the error condition to be
>> > ignored, or warning to be printed etc. The ability to install linux-bas=
e
>> > and app ports without even loading linux.ko seems to be too useful.
>>
>> Can you please give (an) example(s) when it is necessary to install
>> files with stale /usr/compat/linux/etc/ld.so.cache?
>>
>> I'm not sure if it make more good than harm... So far we rely on
>> linuxulator being run and check for compat.linux.osrelease value
>> while installing. If that check is removed then we have only FreeBSD
>> OSVERSION which is very unreliable at compat.linux.osrelease quessing.
>
> Assume "I think" or "I propose" at the start of the each sentence below.
> This is only a gentle request for possible enhancement.
>
> It is wrong^H^H^H erm inconvenient to have ld.so.cache to be formed
> at the port installation time. The /usr/local/etc/rc.d/linux_ldconfig
> script that may be run at arbitrary time by the user is much more useful.
>
> I want to have the ability to install linux ports and make the packages
> from them in the chroots without disrupting the host or enabling the
> less tested linux kernel ABI support on the host. I do know about the
> per-jail ABI support, but it is not as convenient as chroot nor it
> solves the issue of the less tested kernel code.
>
> The linux_ldconfig rc script would also ease the local installations
> of the programs that are not present in the ports. Overall, this would
> bring the linux dso handling close to the handling of the freebsd dso,
> that I consider good enough.

We have different DTRT behaviors competing for a solution here.

One is that people want to install it without having the need of a =20
loaded linux kld (let's call this "expert way"). Another one is that =20
people want to use an installed port immediately (let's call it the =20
"user friendly way"). The FreeBSD linux ports are organized in the =20
user friendly way. In this second category we have two cases, one that =20
people don't have the linux stuff in the kernel, the other that the =20
linux bits are available in the kernel. The ports handle both cases by =20
telling the user what he has to do. As users don't read the install =20
messages (yes, overly simplified view of the world, I know), the linux =20
ports abort if the prerequisites are not met.

So far not much people have complained that the linux stuff is =20
organized like it is. In fact this is the first case I remember of =20
seeing such a request.

For the linux_base port we may already have the necessary stuff to =20
handle it after a reboot, but the linux kld can be loaded at any time, =20
and there's no way we can specify a dependency from loading the kld to =20
running the linux ldconfig in some way. Additionally, linux_base is =20
not the only port where we need to run linux programs. For example for =20
linux-gtk2 we have to run some programs which register some gtk plugins.

Getting this all right while keeping the current user friendlyness is =20
not done in few minutes.

I don't object to add some I_AM_AN_EXPERT__I_KNOW_WHAT_I_DO-knob which =20
disables the run of linux programs and removes the linux ABI checks, =20
but I don't think it is a good idea to rework the linux ports in a way =20
suggested in this thread. If you read the messages on the mailinglists =20
regarding the problems people have installing the linux stuff, you =20
will see that this outnumbers the number of people which want this =20
"expert functionality" by a large amount. The current way of the linux =20
ports is a refinement of several years of step by step improvements.

Making an export-knob is also not done in 2 minutes. An ifdef around =20
the linux kld check, and a ifdef around the run of ldconfig is _not_ =20
enough. We have several places where the linux ldconfig is run (e.g. =20
in the USE_LDCONFIG know of bsd.port.mk). Patches for this are welcome =20
on emulation@, but don't expect to get everything right the first time.

Note: there are not much domain specific experts. Some people may =20
think it is easy to do, but the evil part is in the details.

Hint for people which don't believe me and would like to produce =20
patches which changes the ports to not require the linux kld by =20
default: As long as you haven't looked into each emulation@ maintained =20
linux port line by line, and as long as you haven't considered the =20
needs of the novice users, don't even try to do some patches which =20
make the ports install without the linux kld by default, you will =20
waste a lot of your time if you don't make yourself familiar with all =20
the ports first.

Bye,
Alexander.

--=20
In which level of metalanguage are you now speaking?

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID =3D B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID =3D 72077137



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080429164633.21308qxgswq81p00>