beeware / beeware/briefcase

Add support for Linux source packages

Open
#1,152 0 comments 0 reactions 0 assignees View on GitHub
enhancement linux
Dominant language
Python
Stars
3.3k
Forks
549
Avg merge
1d 4h
Merged PRs (30d)
40

Description

### What is the problem or limitation you are having?

Briefcase has the ability to build binary system packages that include a pre-compiled binary. However, it may also be useful to be able to generate source packages - packages that do the compilation of the stub binary and the installation of python binary artefacts as part of the install process, rather than as part of the packaging process.

### Describe the solution you'd like

It should be possible to target a packaging format of `briefcase package linux system -p source`. This will generate an `.srpm` on Redhat-alikes, `.dsc` on Debian-alikes, and an AUR-compatible package Arch-alikes. `-p srpm`, `-p dsc` and `-p aur` should also be permitted "explicit" packaging formats.

### Describe alternatives you've considered

Don't offer the feature. Source packages are an edge case, and shouldn't generally be needed; they're only really of use:
1) on Arch, where AUR distribution requires that there are no compiled artefacts
2) on other platforms as a speculative approach for supporting as-yet-unreleased distribution releases.

### Additional context

There are effectively 3 separate implementations for this feature - DSC, SRPM, and AUR. Whichever platform is implemented first will need to set up the general infrastructure for building source packages.

When implementing this feature, it is important to ensure that `briefcase package` and `briefcase package -p source` can co-exist. For example:
* if a user has built a binary package, and then builds a source package, the source package *does not* include any of the compiled artefacts (e.g., a compiled `/usr/bin/myapp`).
* if the binary package is compiled after the source package, it is important to ensure that the compiled artefacts *have* been built, and are included in the binary package.

It is probably sufficient to exclude `/usr/lib/myapp/app_packages` entirely from the source build, and ensure that a `requirements.txt` for installing app packages is included in the source package. However, in doing this, we must ensure that requirements.txt *does not* include any local file references.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the `briefcase package linux system -p source` command and the existing binary packaging flow. Compare the three requested targets—`.dsc`, `.srpm`, and AUR—and identify the shared source-package infrastructure. Done means explicit and generic source formats work without compiled artefacts, while including a `requirements.txt` with no local file references.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python
Domain
build-system, release
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.