Group: Software/research/DistributingSoftware

From LibrePlanet
Jump to: navigation, search
(Docker: Add information about packaging applications directly in docker through Guix)
(Docker: clarify that the details in the guix manual only concern guix pack and not how to run a registry for instance)
Line 38: Line 38:
 
It is also possible to package applications directly in docker images. Guix has support for that through commands like that:
 
It is also possible to package applications directly in docker images. Guix has support for that through commands like that:
 
  guix pack -f docker -S /bin=bin guile guile-readline
 
  guix pack -f docker -S /bin=bin guile guile-readline
More details are available in the [https://guix.gnu.org/en/manual/devel/en/guix.html#Invoking-guix-pack guix pack section of the Guix manual].
+
More details about packaging applications directly are available in the [https://guix.gnu.org/en/manual/devel/en/guix.html#Invoking-guix-pack guix pack section of the Guix manual].
  
 
=== GNU/Linux ===
 
=== GNU/Linux ===

Revision as of 08:13, 5 April 2023

Introduction

Some activities or strategies either requires wide adoption to work, or require to have ways for users to use specific free software applications regardless of the operating systems or platforms they use.

For instance if lot of people produce documents in formats that are either undocumented and/or legally risky to use and/or not already implemented (well) in free software, then free software is at a disadvantage. To fix that we'd need wide addoption of standard formats like OpenDocument. But for that adoption to happen, users also need to be able to run software like Libreoffice on their computer without necessarily switching to GNU/Linux.

This article is meant to summarize the status of porting and distributing software on other platforms, from the point of view of users of FSF certified distributions.

Platforms

Android

One of the big issues with Android is that a lot of applications depend on the nonfree Google SDK.

However it is still possible to build pure Java applications for Android 6.0 or later with PureOS. Replicant also has an SDK for Android 4.2 or later that can also build native applications (like emacs that are written in C).

Users can then install applications through various way:

  • with the 'adb install path/to/application.apk' command
  • By downloading an apk package with a browser and running it

However this has downsides as gpg signatures are not verified, and it's more work to keep applications installed in this way up to date.

It is also possible to get your application packaged by F-Droid but the F-Droid repositories are not compliant with the free system distribution guidelines (FSDG). In addition most of the applications in the F-Droid repositories depend on the nonfree Google SDKs.

A way to help here would be to build and distributions 100% free software SDKs and to make an FSDG compliant F-Droid repository (and ship a modified F-Droid with only that repository available).

More details is available on the SDK page of the Replicant wiki.

BSD

We currently don't have any BSD FSDG compliant distribution, though Hyperbola is working on something like that. So we might be able to test our software on BSD distributions in the future.

Docker

There are various ways to distribute applications through docker.

The DistroExecutionEnvironments and DockerRegistries wiki pages have more details about how to run various FSDG compliant distributions inside docker and how to distribute the images.

It is also possible to package applications directly in docker images. Guix has support for that through commands like that:

guix pack -f docker -S /bin=bin guile guile-readline

More details about packaging applications directly are available in the guix pack section of the Guix manual.

GNU/Linux

There are various ways to distribute your software for GNU/Linux. The best way is probably to write it in a way that is easy to package in GNU/Linux distributions, for instance by not having too much dependencies and by using dependencies already packaged by most GNU/Linux distributions. This also makes sure that the software is distributed securely, mirrored, etc.

As Guix packages can also runs on top of most GNU/Linux distributions, it is also an option for distributing software, but it is often less convenient for users of other distributions than Guix because if they install software through Guix they end up with duplicated dependencies that takes space, and a need to also keep their Guix installation up to date. In addition they might need to install Guix manually if they are not using Debian or derivative distributions (like PureOS, and Trisquel).

Packaging software in Guix is also useful for Guix users.

iOS

There is no free compiler for iOS that runs on GNU/Linux. Long time ago it was possible to use gcc to do cross builds, but that setup required nonfree software to be extracted from the iphone to be able to produce working applications. Nowadays there may still be free software compilers that run on (jailbroken) iOS, and they may be used as a basis for making a free compiler that works on GNU/Linux.

The issue here is that Apple's Appstore terms and conditions are incompatible with free software. So the only option compatible with free software here is to ask users to jailbreak their phone and publish the application package. VLC does that for instance.

MacOS

Most of not all free software applications that run on MacOS depend on a nonfree compiler named Xcode.

There is also a project like Wine for MacOS called Darling, but someone needs to review the source code to understand if it's fully free or not. Darling also depends on the nonfree Xcode compiler.

A way to help here would be to build 100% free software compiler that run on GNU/Linux directly and that can produce binaries for MacOS, or to produce a 100% free compiler that run on Darling and remove the Darling dependency on Xcode. There might already be free compilers that run on MacOSX but they seems to all depend on Xcode too (for being built) so a way around that would be to build them and then with the binaries being built, to build them again. This way free software compiler binaries could be released.

MacOS also has some package managers that run both on GNU/Linux and MacOS (like homebrew) but they are most likely not FSDG compliant.

MacOS also started making it hard for users to run unsigned applications, and users probably still need an Internet connection to run applications on recent MacOS (MacOS ask the permission of Apple before running each applications).

Web

Distributing software as web applications has many issues. One of the main issues is to avoid SASS.

It can still work and respect users freedom if users self-host the software, or if they are part of a collective that hosts the software, and that users only do work for the collective with that hosted software. For instance a collective could host a Nextcloud instance and run Libreoffice through that, and users would collaborate on documents together for the collective.

To make sure users can easily self-host, and that it can be deployed easily, securely, with minimal maintenance, it is a good idea to make sure that the software can be packaged in GNU/Linux distributions, and that the software is relatively easy to configure and deploy.

When JavaScript is used, it's also a good idea to make sure that licenses are mentioned by using the standard promoted by LibreJS for that.

Windows

There are free software toolchain like mingw64 that enable to build software for Windows from GNU/Linux. That software can then be tested with Wine.

Guix also has a mingw64 toolchain and it was used by bitcoin-core to build bitcoin for Windows. For that they only used the basic toolchain as-is and did the compilation manually. This is probably because most Guix packages don't cross compile for Windows: at the time of writing, the GNU hello guix package cross compile fine but not many more Guix packages.

The limitations here is that with recent Windows versions, some functionalities are not available anymore without drivers signed by Microsoft. Some applications like Wireshark need functionalities provided by drivers. I have no idea if users are able to run modified versions of drivers or not. But if they can't that would make all signed drivers nonfree.