Re: How to properly install a Linux desktop app?

2020-06-19 Thread Tijl Coosemans
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).
___
freebsd-emulation@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-emulation
To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"


[Bug 247430] Linux ports install too much

2020-06-19 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247430

Bug ID: 247430
   Summary: Linux ports install too much
   Product: Ports & Packages
   Version: Latest
  Hardware: Any
OS: Any
Status: New
  Severity: Affects Some People
  Priority: ---
 Component: Individual Port(s)
  Assignee: emulat...@freebsd.org
  Reporter: m...@freebsd.org

Most of the linux-c7-* ports download too much:
 a) both 64- and 32-bit RPMs;
 b) Source RPMs.

There may be a use case for a), but it should be possible to not install 32-bit
Linux libraries on amd64. Indeed, it should, probably, be the default -- as it
is on the actual RHEL7/CentOS7 systems already.

The b) seems outright bizarre -- why? GPL compliance? But everything with a
linux-c7-* port on FreeBSD, that has sources publicly available, also has a
native FreeBSD port, which downloads those sources (in a format more convenient
than SRPM too).

Why waste so much space -- and bandwidth -- on these?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-emulation@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-emulation
To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"