Best file format for BSD Applications? reddit / BSD ---------------------------------------------------------------------- FriendlyPipe2 · 2018-08-19 20:42 What is the best file format for developers trying to add BSD support to their applications? ---------------------------------------------------------------------- FUZxxl · 2018-08-19 20:45 I don't understand your question. Could you elaborate? Is this related to [this post](https://www.reddit.com/r/BSD/comments/97xnds/be st_universal_application_format_with_bsd_linux/)? ---------------------------------------------------------------------- FriendlyPipe2 · 2018-08-19 20:50 >I don't understand your question. Could you elaborate? What file format (Example, Tar.gz, .jar) is best for enabling an app to work with BSD. >Is this related to [this post](https://www.reddit.com/r/BSD/comments/ 97xnds/best_universal_application_format_with_bsd_linux/)? No, that post is about adding universal support between Linux and BSD. However that post does state some alternative file formats like .jar and AppImages. In Linux we have many, what do you have in BSD? Especially for proprietary software but not to remove open-source. ---------------------------------------------------------------------- FUZxxl · 2018-08-19 20:55 On BSD, you distribute your application as a source tar ball that can be build with standard tools. If you cannot do a source distribution, distribute a binary tar ball that follows the same structure as in `/usr`, i.e. it should contain directories like this: my-app/bin my-app/lib my-app/share my-app/share/man my-app/libexec my-app/libdata etc etc. This tar ball should not depend on where it is unpacked, merely adding its `bin` directory to `PATH` should be sufficient to run your application. Do not distribute self-extracting shell scripts, these are super annoying and useless. On BSD systems, always assume that the operator is knowledgeable about UNIX and reads your installation instructions. Bonus points if you don't have to be root at any point to install your application. ---------------------------------------------------------------------- localtoast · 2018-08-19 23:19 also they're going to have a very bad time if they assume "BSD" is a monolithic single entity ---------------------------------------------------------------------- Kernigh · 2018-08-20 01:42 An application that runs on other Unix clones (like Linux or illumos) might need few or no changes to run on BSD. The best way to support BSD is to provide the source code of an application. Each BSD can build the code and provide a binary package. For example, [GNU Emacs](https://www.gnu.org/software/emacs/) comes in an archive like `emacs-26.1.tar.gz` (or `.tar.xz`). The code of Emacs is in C language and works with several systems. Each BSD can patch and compile Emacs for their system: FreeBSD builds the FreeBSD package, NetBSD builds the NetBSD package, and so on. The same happens with hundreds of other packages. Each BSD system is different: FreeBSD can't run a NetBSD package. Each architecture is different: an ARM processor can't run Intel x86 code. Each system or architecture needs a different package. OpenBSD doesn't keep backward compatibility, so OpenBSD 6.3 can't run some applications from OpenBSD 6.2. FreeBSD and NetBSD have some Linux compatibility, so they can run some Linux applications. ---------------------------------------------------------------------- phessler · 2018-08-20 18:24 > proprietary software those basically don't run on OpenBSD. Libraries change far too often. ---------------------------------------------------------------------- FriendlyPipe2 · 2018-08-21 03:07 TarBalls are....ok? Is there an executable file format that works on BSD? Similar to [AppImages](https://appimage.org/) or [Flatpak](https://flatpak.org/)? Not necessarily universal just easy to use? Do BSD operating systems have something like .deb files? I agree that every application needs a tar ball but, I still feel like they are a pain to use. ---------------------------------------------------------------------- FUZxxl · 2018-08-21 07:27 > TarBalls are....ok? Yes. With a strong preference for source tar balls. > Is there an executable file format that works on BSD? BSD uses ELF executables. There is nothing like AppImages or Flatpak, both of which are not really a thing on Linux either. They are very recent designs and don't really mesh well with the way things work on UNIX in general. > Do BSD operating systems have something like .deb files? Some BSD systems have their own package management for third party software. The common scheme is to have a `/usr/ports` directory which contains a directory with some files for each ported program. Those files allow you to do download, patch, build, and install the ported program without manual intervention. Some systems even provide binary package management. In any case, it is highly unusual for third parties to provide their own binary packages. The expectation is that you provide your source package and some maintainer adds a corresponding port to the ports tree. > I agree that every application needs a tar ball but, I still feel like they are a pain to use. Not at all. As I said before: always expect that the operator is competent. And don't make your tar balls a pain to build by using weird setups. Just use common stuff (e.g. GNU autotools or cmake) and try to write portable code. ---------------------------------------------------------------------- someoneelsesfriend · 2018-08-22 23:54 The idea of a package management repository (packages in this case being used to define distinct pieces of software, and not binary packages - though it can mean both) [comes from FreeBSD](https://svnweb.freebsd.org/changeset/base/2181), in the form of its Ports framework which has served for inspiration in OpenBSD Ports, NetBSD pkgsrc, Gentoo portage, and probably others I'm forgetting. Add to that the ports framework is now being used to build binary packages by the FreeBSD project, by way of a bulk builder known as poudriere.