linux directory hier

Boris Samorodov bsam at ipt.ru
Sat Sep 3 04:16:30 PDT 2005


On Sat, 3 Sep 2005 11:40:15 +0200 Alexander Leidinger wrote:
> On Fri, 02 Sep 2005 17:13:31 +0400
> Boris Samorodov <bsam at ipt.ru> wrote:

> > The case with acroread7 was really in incorrect plist file at 
> > emulation/linux_base-8 port. Plist is dynamic and doesn't use @unexec
> > command when uninstallig. Hehce we have errors at non-empty
> > directories (ie /compat/linux/share/locale) where third party
> > programms write files.

> Now that I had some time to look at this more closely: The right fix
> for the acroread7 port would be to install into PREFIX (be it LOCALBASE
> or X11BASE doesn't matter ATM) instead into LINUXBASE. The goal is to
> only install "support files" like libs and linux_base stuff into
> LINUXBASE and every application which an user wants to run (like
> acroread, a game, Oracle or something else) into the appropriate PREFIX
> (LOCALBASE or X11BASE).

(First of, I'm not a much linux-programs user. Actually, I use only
acroread. Thats why my opinion on the matter is very poor.)

Right now we install (almost?) all linux programs to LINUXBASE. Do we
have an example of your approach at ports?

To use linux programs we replace at run time root to LINUXBASE. Hence
all that programms needed is there. Wouldn't it me a pain to decide at
run time where to look needed files? For example, conf files, paths,
etc. Besides, we will have to use /opt and other linux hiers at
FreeBSD's /...

> > The task is to create a static plist for emulation/linux_base-8
> > port. Now I should decide which directories are used only by
> > linux_base port and which may be used by other programms. Seems to me

> As long as the dependency is correctly registered, one shouldn't
> remove the dependency. If he removes it, it's ok to get errors (e.g.
> from dirrm). The only big no-no is to overwrite existing files. If this
> is the case we have to find the right solution (somethimes we have to
> allow such behavior -- like with ld.so.cache -- and look how to solve
> this cleanly).

Well, thats right. At normal conditions all does well. If we install
packages with dependencies and remove them in revers order. Then no
files and directories should remain. But pointyhat doesn't remove
packages in revers order. Look at

http://pointyhat.freebsd.org/errorlogs/i386-errorlogs/a.7.2005072221/acroread7-7.0.1.log

after the line "Deleting acroread7-7.0.1". We see deleting rpm, popt,
linux_base(!)... leaving all other linux stuff to later deletion.

> The acroread port is not a good example how to do a linux port. It
> generates a plist at install time, it isn't PREFIX clean, and it plays
> tricks in the plist (setting the cwd). All of this isn't necessary and
> could be done cleanly.

It seems to me that the problem should be quite common for linux programs
if pointyhat is not removing packages in revers order. Why does only
acroread suffer it?

BTW, at my patch I used "@exec mkdir" to create some empty directories
needed by the port. FreeBSD's package manager can't deal with empty
dirs when creating a package. If you like, I'll do it at pkg-install
script.

> The existing acroread port works for most people and your @unexec patch
> for linux_base-8 is ok to silence the warnings you see. I'm willing to
> commit the fix in case you don't want to do the work to fixup the
> acroread port. Technically this isn't the right fix, but from a
> pragmatic (and political) point of view I'm willing to do it.

It's not that "I don't want". Right now I don't have much spare
time. Maybe some time later.


WBR
-- 
Boris B. Samorodov, Research Engineer
InPharmtech Co,     http://www.ipt.ru
Telephone & Internet Service Provider


More information about the freebsd-emulation mailing list