linux ports policy

Alexander Leidinger netchild at FreeBSD.org
Tue Dec 12 07:07:00 PST 2006


Quoting Rong-En Fan <rafan at FreeBSD.org> (from Tue, 12 Dec 2006  
21:39:18 +0800):

CCing keramida and pav in the hope someone of them can put something  
into the porters handbook. Also CCing emulation@ because this is a  
generic topic of interest (and maybe someone can detect a bug or two  
in what I describe below).

> I CC'ed netchild@ and jylefort at .
>
> I saw there was a mail last year:
>
> http://lists.freebsd.org/pipermail/freebsd-ports/2005-March/022212.html
>
> about the policy on linux ports. The concern is about whether
> we should prefix linux- for every linux ports.
>
> Current PH says nothing about this. So, what's the policy now?

We have no policy.

Now that the official part is done :) the current way things are handled:

Infrastructure ports should be installed into LINUXBASE (generic  
libs). Enduser ports (e.g. acroread, games, ...) should install into  
LOCALBASE. Ports for which native versions are likely to appear  
(current examples are infrastructure ports like libs, and browsers  
like firefox/opera) need to be prefixed with "linux-". This includes  
not only the port name but also the binaries and the install location  
(in case of enduser applications; we don't want them to interfere with  
native applications if they install plugins or some application  
specific libs).

I can't remember to have seen an agreement that we need to prefix  
every linux port with the linux- prefix. If a linux port uses the  
prefix, it is nice in my eyes, but I don't think it needs to be done  
in any case. Maybe "Porters are encouraged to add the linux- prefix  
but are not required to do it." describes it best.

As always this are just some guides. If it is not possible to use a  
different location for applications specific libs (most of the time it  
is possible), the porter needs to find a working solution, but he  
needs to be aware that there may be problems when mixing native stuff  
with linux stuff. Sometimes using CONFLICTS may be a good solution,  
sometimes installing an enduser application into LINUXBASE and  
providing a wrapper in LOCALBASE to start the stuff in LINUXBASE may  
be the way to go.

Comments for this particular case are below.

> On Mon, Dec 11, 2006 at 12:45:44PM -0500, Jose Alonso Cardenas Marquez wrote:
>> On Wed, 6 Dec 2006 16:07:52 +0000 (UTC)
>> Rong-En Fan <rafan at FreeBSD.org> wrote:
>>
>> > rafan       2006-12-06 16:07:52 UTC
>> >
>> >   FreeBSD ports repository
>> >
>> >   Modified files:
>> >     games                Makefile
>> >   Added files:
>> >     games/mtaserver      Makefile distinfo pkg-descr pkg-plist
>> >     games/mtaserver/files mtad.in pkg-message.in
>> >   Log:
>> >   Add mtaserver 0.5, multi Theft Auto: Vice City and GTA3 dedicated
>> >   server.
>> >
>> >   PR:             ports/106399
>> >   Submitted by:   Alexander Logvinov <ports at logvinov.com>
>> >
>> >   Revision  Changes    Path
>> >   1.1060    +1 -0      ports/games/Makefile
>> >   1.1       +44 -0     ports/games/mtaserver/Makefile (new)
>> >   1.1       +6 -0      ports/games/mtaserver/distinfo (new)
>> >   1.1       +39 -0     ports/games/mtaserver/files/mtad.in (new)
>> >   1.1       +6 -0      ports/games/mtaserver/files/pkg-message.in (new)
>> >   1.1       +6 -0      ports/games/mtaserver/pkg-descr (new)
>> >   1.1       +8 -0      ports/games/mtaserver/pkg-plist (new)
>>
>> Hi :)
>>
>> It's a linux-base ports and you missed some things
>>
>> - Use linux- prefix for port-directory,port-name, port-rcscript and
>> port-executable file.

While I would be happy to see a native version of a game, I don't  
think there will be one from a commercial vendor (the GPLed stuff from  
id software doesn't count). So I think it is ok to keep it as it is.

>> - Respect DOCSDIR (Changelog, README, LICENSE)

If the port does not referency anything of this at runtime: yes.

>> - Use ${INSTALL_*} macros for executable and data files

Yes.

>> - Use ${BRANDELF} if it's necessary

It is necessary, for every ELF executable (but do *not* brand a lib or  
plugin). We have Makefile glue for this.

>> - I think that is not good idea install this app to
>> ${PREFIX}/${PORTNAME}, if you see another linux_base-games, they use
>> ${PREFIX}/lib/${PORTNAME}

Wouldn't libexec be a better place? For a this particular case I agree  
with installing it somewhere else, but for e.g. linux_dist-gentoo  
lib/xxx would not be ok. So if someone puts a sentence or two about  
this into the PH, we should mention that there are some valid reason  
to not do it this way.

>> - You could install data files to ${DATADIR}, and you could create a
>> syslink to it into ${PREFIX}/lib/${PORTNAME}

I think this only makes sense when the data can be shared where the  
rest of lib/$PORTNAME is not usable or does not make sense. I doupt  
this is the case for this port, but I know nothing about the game.

Bye,
Alexander.

-- 
http://www.Leidinger.net  Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org     netchild @ FreeBSD.org  : PGP ID = 72077137
The end move in politics is always to pick up a gun.
		-- Buckminster Fuller



More information about the freebsd-emulation mailing list