Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Linux system packaging backend #1106

Merged
merged 58 commits into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
0b870a6
Add a DEB backend.
freakboy3742 Jan 30, 2023
b690018
Add documentation for the deb backend.
freakboy3742 Feb 5, 2023
3b548b6
Get existing tests passing.
freakboy3742 Feb 5, 2023
ea7c825
Correct markup errors in bullet points, and add deb to docs index.
freakboy3742 Feb 5, 2023
07583fc
Ensure that generated DEB packages can pass linting.
freakboy3742 Feb 11, 2023
6074251
Add support for deadsnakes as a Python source.
freakboy3742 Feb 11, 2023
36b2079
Add tests for all the new non-deb functionality.
freakboy3742 Feb 11, 2023
5d7fe73
Add tests for finalize_app_config()
freakboy3742 Feb 12, 2023
915346d
Add an abstraction for dealing with bare Docker images.
freakboy3742 Feb 12, 2023
b6b3cb6
Corrected some Docker tests on Windows.
freakboy3742 Feb 12, 2023
6f61f55
Add tests for some edge cases that were missed.
freakboy3742 Feb 12, 2023
f47f551
Ensure that different Python source builds are isolated.
freakboy3742 Feb 12, 2023
fb9df21
Fix glibc detection.
freakboy3742 Feb 12, 2023
f6b08b0
Improve handling of long_description.
freakboy3742 Feb 12, 2023
9bbdea5
Merge branch 'main' into deb
freakboy3742 Feb 13, 2023
047a413
Simplified the Docker options, and clarified Deadsnakes is Ubuntu only.
freakboy3742 Feb 17, 2023
9357a57
Add test coverage for deb backend.
freakboy3742 Feb 18, 2023
a27ed14
Convert deb backend into a generic system backend.
freakboy3742 Feb 21, 2023
4394362
Add tests to complete Linux coverage.
freakboy3742 Feb 23, 2023
8dc608e
Only strip the app binary.
freakboy3742 Feb 23, 2023
dbc8fd6
Add platform identification for Linux Mint and Pop! OS.
freakboy3742 Feb 24, 2023
7fb900e
Improved docs and error handling for logging contexts.
freakboy3742 Feb 26, 2023
8d7b5a8
Cleaned up raw Docker operations.
freakboy3742 Feb 26, 2023
6c5fe37
Minor cleanups from code review.
freakboy3742 Feb 26, 2023
a3c8858
Corrected some typos.
freakboy3742 Feb 28, 2023
73cfdc5
Use the image default command to open a shell.
freakboy3742 Mar 1, 2023
c813838
Add a little walrus, just for @rmartin16.
freakboy3742 Mar 1, 2023
28b7e69
Retrieve the minimum Python version programatically
freakboy3742 Mar 1, 2023
1041299
Make some default encodings explicit.
freakboy3742 Mar 1, 2023
b58359d
Roll back escape calls for logging context.
freakboy3742 Feb 27, 2023
49cedc1
Use app_name to avoid spaces, and use a project-specific folder for t…
freakboy3742 Mar 2, 2023
475b191
Simplification of logic around permissions.
freakboy3742 Mar 2, 2023
a28868f
Add RPM packaging.
freakboy3742 Mar 2, 2023
8445aed
Disable some tests that can't run on Windows.
freakboy3742 Mar 2, 2023
c269e66
Remove a redundant description about long_descrption.
freakboy3742 Mar 3, 2023
96a892f
Use /etc/os-release as a more reliable source of vendor info.
freakboy3742 Mar 3, 2023
5ac225d
Catch edge case of non-FreeDesktop distros.
freakboy3742 Mar 3, 2023
35f32ac
Put a fixed filesystem path in tools so it can be overriden in tests.
freakboy3742 Mar 3, 2023
6ae1b86
Merge branch 'main' into linux-system
freakboy3742 Mar 3, 2023
9fcb6ed
Remove version compatibility approach to /etc/os-release handling.
freakboy3742 Mar 3, 2023
2feffb3
Ensure that deb packages use the right Python dependency.
freakboy3742 Mar 4, 2023
9c76a1a
Ensure that system packages are available.
freakboy3742 Mar 4, 2023
a5dba44
Restore the backwards compatibility shim for freedesktop_os_release().
freakboy3742 Mar 4, 2023
07925a2
Typo fixes from code review.
freakboy3742 Mar 6, 2023
ace0f88
Update docs reference to os-release.
freakboy3742 Mar 6, 2023
9ed73f5
Simplified the list of required system packages.
freakboy3742 Mar 6, 2023
580f52e
Adopt a fallback os-release parser based on the published standard.
freakboy3742 Mar 6, 2023
3304e76
Add OpenSuSE os-release output to the test set.
freakboy3742 Mar 6, 2023
fd5bd3d
Adapt tests to different text in different Python versions.
freakboy3742 Mar 6, 2023
ca31d22
Add initial support for ARM64 hardware on system packages.
freakboy3742 Mar 7, 2023
6f95fbe
Build Docker images in a Docker context.
freakboy3742 Mar 7, 2023
416d7fb
Revert pull=always to improve the user experience.
freakboy3742 Mar 7, 2023
364d45d
Use a non-streaming run rather than check_output so we get progress b…
freakboy3742 Mar 7, 2023
8ac7c10
Restored the log line describing docker prepration.
freakboy3742 Mar 7, 2023
b04a62b
Add default packages needed for Red Hat builds.
freakboy3742 Mar 7, 2023
d68d73d
Merge branch 'main' into linux-system
freakboy3742 Mar 8, 2023
8107e6f
Add some extra RPM directives to help with Pyside packaging.
freakboy3742 Mar 8, 2023
3828f9d
Modify rpmbuild directives for pyside compatibility.
freakboy3742 Mar 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/1062.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A Linux System backend was added, supporting ``.deb`` as a packaging format.
1 change: 1 addition & 0 deletions changes/1063.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Support for `.rpm` packaging was added to the Linux system backend.
1 change: 1 addition & 0 deletions changes/986.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
When installing application sources and dependencies, any ``__pycache__`` folders are now automatically removed.
22 changes: 21 additions & 1 deletion docs/reference/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,13 @@ be obtained by running ``briefcase -h``, and inspecting the help for the
--------------------------------------------------------------

Configuration options that are specific to a particular output format. For
example, ``macOS`` applications can be generated in ``app`` or ``dmg`` format.
example, macOS applications can be generated in ``app`` or ``dmg`` format.

This section can contain additional layers. for example, an app targeting the
Linux ``system`` backend can define a ``tool.briefcase.app.<app
name>.linux.system.ubuntu.jammy`` section to provide configurations specific to
Ubuntu 22.04 "Jammy" deployments. See the documentation for each backend for
more details.

Project configuration
=====================
Expand Down Expand Up @@ -278,6 +284,14 @@ to an image to use as the background for the installer. As with ``splash``, the
path should *exclude* the extension, and a platform-appropriate extension will
be appended when the application is built.

``long_description``
~~~~~~~~~~~~~~~~~~~~

A longer description of the purpose of the application. This description can be
multiple paragraphs, if necessary. The long description *must not* be a copy of
the ``description``, or include the ``description`` as the first line of the
``long_description``.
mhsmith marked this conversation as resolved.
Show resolved Hide resolved

``requires``
~~~~~~~~~~~~

Expand All @@ -289,6 +303,12 @@ application level, *and* platform level, the final set of requirements will be
the *concatenation* of requirements from all levels, starting from least to
most specific.

``revision``
~~~~~~~~~~~~

An identifier used to differentiate specific builds of the same version of an
app. Defaults to ``1`` if not provided.

``splash``
~~~~~~~~~~

Expand Down
56 changes: 28 additions & 28 deletions docs/reference/platforms/android.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ Icon format
Android projects use ``.png`` format icons, in round and square variants. An
application must provide the icons in the following sizes, for 2 variants:

* ``round``:
* ``round``:

* 48px
* 72px
* 96px
* 144px
* 192px
* 48px
* 72px
* 96px
* 144px
* 192px

* ``square``:
* ``square``:

* 48px
* 72px
* 96px
* 144px
* 192px
* 48px
* 72px
* 96px
* 144px
* 192px

Splash Image format
===================
Expand All @@ -34,27 +34,27 @@ should be a square image with a transparent background. It must be specified
in a range of sizes and variants, to suit different possible device sizes
and device display densities:

* ``normal`` (typical phones; up to 480 density-independent pixels):
* ``normal`` (typical phones; up to 480 density-independent pixels):

* 320px
* 480px (hdpi)
* 640px (xhdpi)
* 1280px (xxxhdpi)
* 320px
* 480px (hdpi)
* 640px (xhdpi)
* 1280px (xxxhdpi)

* ``large`` (large format phones, or phone-tablet "phablet" hybrids; up to
720 density-indpendent pixels):
* ``large`` (large format phones, or phone-tablet "phablet" hybrids; up to
720 density-indpendent pixels):

* 480px
* 720px (hdpi)
* 960px (xhdpi)
* 1920px (xxxhdpi)
* 480px
* 720px (hdpi)
* 960px (xhdpi)
* 1920px (xxxhdpi)

* ``xlarge`` (tablets; larger than 720 density-independent pixels)
* ``xlarge`` (tablets; larger than 720 density-independent pixels)

* 720px
* 1080px (hdpi)
* 1440px (xhdpi)
* 2880px (xxxhdpi)
* 720px
* 1080px (hdpi)
* 1440px (xhdpi)
* 2880px (xxxhdpi)

Consult `the Android documentation
<https://developer.android.com/training/multiscreen/screensizes>`__
Expand Down
32 changes: 16 additions & 16 deletions docs/reference/platforms/iOS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@ Icon format
iOS projects use ``.png`` format icons. An application must provide icons of
the following sizes:

* 20px
* 29px
* 40px
* 58px
* 60px
* 76px
* 80px
* 87px
* 120px
* 152px
* 167px
* 180px
* 1024px
* 20px
* 29px
* 40px
* 58px
* 60px
* 76px
* 80px
* 87px
* 120px
* 152px
* 167px
* 180px
* 1024px

Splash Image format
===================

iOS projects use ``.png`` format splash screen images. A splash screen should
be a square, transparent image, provided in the following sizes:

* 1024px
* 2048px
* 3072px
* 1024px
* 2048px
* 3072px

You can specify a background color for the splash screen using the
``splash_background_color`` configuration setting.
Expand Down
16 changes: 8 additions & 8 deletions docs/reference/platforms/linux/appimage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ Icon format
AppImages uses ``.png`` format icons. An application must provide icons in
the following sizes:

* 16px
* 32px
* 64px
* 128px
* 256px
* 512px
* 16px
* 32px
* 64px
* 128px
* 256px
* 512px

Splash Image format
===================
Expand All @@ -76,8 +76,8 @@ Application configuration
=========================

The following options can be added to the
``tool.briefcase.app.<appname>.linux`` section of your ``pyproject.toml``
file.
``tool.briefcase.app.<appname>.linux.appimage`` section of your
``pyproject.toml`` file.

``system_requires``
~~~~~~~~~~~~~~~~~~~
Expand Down
16 changes: 8 additions & 8 deletions docs/reference/platforms/linux/flatpak.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ Icon format
Flatpak uses ``.png`` format icons. An application must provide icons in
the following sizes:

* 16px
* 32px
* 64px
* 128px
* 256px
* 512px
* 16px
* 32px
* 64px
* 128px
* 256px
* 512px

Splash Image format
===================
Expand All @@ -60,8 +60,8 @@ Application configuration
=========================

The following options can be added to the
``tool.briefcase.app.<appname>.linux`` section of your ``pyproject.toml``
file.
``tool.briefcase.app.<appname>.linux.flatpak`` section of your
``pyproject.toml`` file.

``flatpak_runtime_repo_alias``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
7 changes: 4 additions & 3 deletions docs/reference/platforms/linux/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
Linux
=====

Briefcase supports packaging Linux apps in `AppImage <https://appimage.org>`__
and `Flatpak <https://flatpak.org>`__ formats.
Briefcase supports packaging Linux apps as native system packages, as an `AppImage
<https://appimage.org>`__, and in `Flatpak <https://flatpak.org>`__ format.

The default output format for Linux is :doc:`AppImage <./appimage>`.
The default output format for Linux is :doc:`system packages <./system>`.

.. toctree::
:maxdepth: 1

system
appimage
flatpak
Loading