From owner-freebsd-emulation@freebsd.org Fri Jun 19 08:52:32 2020 Return-Path: Delivered-To: freebsd-emulation@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8F5E03449DE for ; Fri, 19 Jun 2020 08:52:32 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay111.isp.belgacom.be (mailrelay111.isp.belgacom.be [195.238.20.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign RSA OV SSL CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49pCHN0Bjtz3Wcj; Fri, 19 Jun 2020 08:52:31 +0000 (UTC) (envelope-from tijl@freebsd.org) IronPort-SDR: PEYSP3kRXcZd5iWGoqym4E4TC39jFcpm2+3zqdRk1jyrwek7+qZy51UKw/Nd+W2syHG3wPCbWo 6hMB4NbP1JTwXTdN1Aeg+pnM6lfrsCOvUlhG/XkPsQxArQpUFEqvd9C2HdracAaZfjpD5xkyBs 83cpm3NFOr+eviG213mF9Z/2Q2Xx11Rz9pBRB3G6cJMPVaTvg+T43gcWFhmmCA2ndJgqdB/naB VXT77sdXHwWqEoJuxtFF+KUNGEIyDjHINUstBvINxRXfHvTYUab7FIwrl0S12PRc19hA+cSIyG 0mE= X-Belgacom-Dynamic: yes IronPort-PHdr: =?us-ascii?q?9a23=3AOX7YdRz7njZ3WonXCy+O+j09IxM/srCxBDY+r6?= =?us-ascii?q?Qd2uIUIJqq85mqBkHD//Il1AaPAdyGrasb1aGO7OjJYi8p2d65qncMcZhBBV?= =?us-ascii?q?cuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx?= =?us-ascii?q?7xKRR6JvjvGo7Vks+7y/2+94fcbglVhDexe65+IRe3oAneqsUbg5ZpJ7osxB?= =?us-ascii?q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Pxi?= =?us-ascii?q?e0AINZaXtdCl+RC3vocJ+EW/gUYiKIPsBhiiAEVaSmS4I50BGutQj2y6Z8I+?= =?us-ascii?q?XO/i0XqIjs1N5v6+LJkREy+iJ7AN+H026XVW17gmQIRzpllJx49AZYy1SD2K?= =?us-ascii?q?l8y8AeX5QH4vIKTi8zMZLVyapzD9//UBjIONyOTQD1bM+hBGQNqdZ56NgJeE?= =?us-ascii?q?t4EtO5xkTf3iiuK5EPmrGhP7By9bjTiSuib/1hwmrLgfFyx2ItRdFCYDWr?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2AeAwBxe+xe/142QldmHAEBAQEBAQc?= =?us-ascii?q?BARIBAQQEAQFAB4FDgxlUAV6NJYV4ghCIW4IlkH4LAQEBAQEBAQEBIxQEAQG?= =?us-ascii?q?ERAKCKSU4EwIDAQEBAwIFAQEGAQEBAQEBBQQBhg45DII7IoMWAQU6HB4FEAs?= =?us-ascii?q?YLlcGE4MngwC4A4E0hVGEFYEFgTiFM0WHAYIAg3MuPooxBI8BR4pMmjuCZIh?= =?us-ascii?q?CkFYvnnarSoYuWIEgTTAIgyQJRxkNVpVYhjk/AzA3AgYIAQEDCZB4AQE?= X-IPAS-Result: =?us-ascii?q?A2AeAwBxe+xe/142QldmHAEBAQEBAQcBARIBAQQEAQFAB?= =?us-ascii?q?4FDgxlUAV6NJYV4ghCIW4IlkH4LAQEBAQEBAQEBIxQEAQGERAKCKSU4EwIDA?= =?us-ascii?q?QEBAwIFAQEGAQEBAQEBBQQBhg45DII7IoMWAQU6HB4FEAsYLlcGE4MngwC4A?= =?us-ascii?q?4E0hVGEFYEFgTiFM0WHAYIAg3MuPooxBI8BR4pMmjuCZIhCkFYvnnarSoYuW?= =?us-ascii?q?IEgTTAIgyQJRxkNVpVYhjk/AzA3AgYIAQEDCZB4AQE?= Received: from 94.54-66-87.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([87.66.54.94]) by relay.skynet.be with ESMTP; 19 Jun 2020 10:52:29 +0200 Received: from localhost (localhost [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id 05J8qSb3051813; Fri, 19 Jun 2020 10:52:28 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Fri, 19 Jun 2020 10:52:27 +0200 From: =?UTF-8?B?VMSzbA==?= Coosemans To: "Mikhail T." Cc: freebsd-emulation@FreeBSD.org, clement@FreeBSD.org Subject: Re: How to properly install a Linux desktop app? Message-ID: <20200619105227.6d294efd@FreeBSD.org> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49pCHN0Bjtz3Wcj X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:5432, ipnet:195.238.0.0/19, country:BE]; TAGGED_RCPT(0.00)[t]; local_wl_from(0.00)[freebsd.org] X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 08:52:32 -0000 On Fri, 19 Jun 2020 00:00:43 -0400 "Mikhail T." wrote: > Hello! > > I'm preparing a port of a Linux application (Zoom conferencing client). > > The vendor (zoom.us) offers RPMs for both x86_64 and i686, which makes > it tempting to just USE_LINUX_RPM. However, that knob unconditionally > turns on the USE_LINUX_PREFIX, which bsd.port.mk says /not/ to use "for > leaf ports (e.g. a game or program)". > > Not using the USE_LINUX_PREFIX, poses another challenge. Zoom comes with > quite a few Linux libraries of its own, which are all dumped into a > non-standard location. My port is installing a > /compat/linux/etc/ld.so.conf.d/zoom.conf listing that location, but that > will be ignored unless ldconfig -- a Linux one -- is invoked, wouldn't > it be? > > Finally, if I do rely USE_LINUX_PREFIX and the bulk of the port gets > installed under /compat/linux/opt/zoom, there is a problem with the > DESKTOP_ENTRIES -- because they would be under /compat/linux too, > instead of under ${LOCALBASE}. > > usr/share/applications/Zoom.desktop > usr/share/mime/packages/zoom.xml > usr/share/pixmaps/Zoom.png > usr/share/pixmaps/application-x-zoom.png > > (I think, the current setting of DESKTOPDIR based on PREFIX is incorrect > -- it should be under LOCALBASE instead. But that's a separate story.) > > What are my options with this new port? > > 1. Follow the examples of existing ports (like citrix_ica): > 1. Do not use the USE_LINUX_RPM. > 2. Do not bother with Linux' ldconfig. > 3. Instead of ${LINUXBASE}/etc/ld.so.conf.d/zoom.conf, create the > ${PREFIX}/bin/zoom script with LD_LIBRARY_PATH setting. (This > will keep the libraries bundled with Zoom unavailable to other > Linux programs.) > 2. An alternative method: > 1. Do declare the USE_LINUX_RPM (and set the SRC_DISTFILES to empty). > 2. Install the ${LINUXBASE}/etc/ld.so.conf.d/zoom.conf and declare > the USE_LDCONFIG. (This will make the Zoom-libraries available > to other Linux apps.) > 3. Explicitly set DESKTOPDIR based on LOCALBASE. > > Opinions? Thank you! Yours, You should not use USE_LINUX_RPM. It's meant for infrastructure ports. You can look at astro/google-earth as an example. It also installs an rpm with an /opt directory. Basically the /opt directory goes to ${STAGEDIR}${LINUXBASE} and everything else goes to ${STAGEDIR}${PREFIX}. You should not need an ld conf file or ldconfig or LD_LIBRARY_PATH. The google-earth rpm installs a symlink from /usr/bin to a script in /opt I believe. The port replaces that with a little script in ${PREFIX}/bin that executes the script in /opt with ${LINUXBASE}/bin/sh. If Zoom installs a symlink in /usr/bin you can do something similar. If it installs a real script in /usr/bin you can probably install that in ${PREFIX}/bin if you replace the shebang at the top with ${LINUXBASE}/bin/sh (using REINPLACE_CMD).