From owner-freebsd-emulation@freebsd.org Fri Jun 19 04:00:56 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 9CF0933E5D2 for ; Fri, 19 Jun 2020 04:00:56 +0000 (UTC) (envelope-from mi+t@aldan.algebra.com) Received: from symbion.zaytman.com (symbion.zaytman.com [64.112.176.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "symbion", Issuer "Narawntapu" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49p4pv4wYBz4V0H; Fri, 19 Jun 2020 04:00:55 +0000 (UTC) (envelope-from mi+t@aldan.algebra.com) Received: from narawntapu.narawntapu (pool-100-1-228-105.nwrknj.fios.verizon.net [100.1.228.105]) by symbion.zaytman.com (8.15.2/8.15.2) with ESMTPS id 05J40n82093447 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 19 Jun 2020 00:00:49 -0400 (EDT) (envelope-from mi+t@aldan.algebra.com) X-Authentication-Warning: symbion.zaytman.com: Host pool-100-1-228-105.nwrknj.fios.verizon.net [100.1.228.105] claimed to be narawntapu.narawntapu Received: from aldan.narawntapu (aldan [192.168.3.13]) by narawntapu.narawntapu (8.15.2/8.15.2) with ESMTP id 05J40hME066129; Fri, 19 Jun 2020 00:00:43 -0400 (EDT) (envelope-from mi+t@aldan.algebra.com) X-Authentication-Warning: narawntapu.narawntapu: Host aldan [192.168.3.13] claimed to be aldan.narawntapu To: freebsd-emulation@FreeBSD.org, clement@FreeBSD.org, Tijl Coosemans From: "Mikhail T." Subject: How to properly install a Linux desktop app? Message-ID: Date: Fri, 19 Jun 2020 00:00:43 -0400 MIME-Version: 1.0 Content-Language: en-US X-DCC-MGTINTERNET-Metrics: narawntapu 1170; bulk rep Body=3 Fuz1=3 Fuz2=3 rep=69% X-Rspamd-Queue-Id: 49p4pv4wYBz4V0H X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of mi@aldan.algebra.com has no SPF policy when checking 64.112.176.10) smtp.mailfrom=mi@aldan.algebra.com X-Spamd-Result: default: False [3.75 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; HAS_XAW(0.00)[]; DMARC_NA(0.00)[algebra.com]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.52)[0.519]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.40)[0.397]; NEURAL_SPAM_LONG(0.93)[0.932]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:394548, ipnet:64.112.176.0/24, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TAGGED_FROM(0.00)[t]; RECEIVED_SPAMHAUS_PBL(0.00)[100.1.228.105:received] X-Mailman-Approved-At: Fri, 19 Jun 2020 05:25:35 +0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.33 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 04:00:56 -0000 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, -mi