Skip to content

Setting sensible defaults for some CLI arguments #743

@bbhtt

Description

@bbhtt
  • --state-dir - Default to a global state dir like ~/.cache/flatpak-builder to enable sharing of downloaded artifacts and ccache artifacts across multiple manifests. This should speed up downloads and builds for someone building multiple things. The requirement is that the checkout app dir and state dir must stay on the same filesystem. This will also prevent people git add-ing .flatpak-builder.

  • --ccache - Default it to on, every SDK ships ccache nowadays and if someone doesn't they should. See also make --ccache on by default #582

  • --subject - Set to SHA of head if inside a git directory. Already done by flatpak-github-actions and Flathub since ages.

  • --body - Set to something sensible like a hash of the manifest from state directory.

  • --force-clean - Enable by default. Every new build should never reuse the checked out app dir and it currently errors anyway.

  • --override-source-date-epoch - Set to a fixed date to enable reproducible builds by default. Manifest last modification timestamp is not reproducibile (see No option to get a deterministic build timestamp flathub/flathub#2617) and a fixed date has been the standard for reproducible builds since a long time.

  • --compose-url-policy - Default to 'full' to get back the appstream-glib behaviour which was lost during libappstream transition in 1.3.x. We will require and link against libappstream >=1.1.2 anyways.

  • --user - Default to at least installing on the Flatpak user installation instead of system. Building and installing as user makes more sense and the system code path has been forever broken due to requiring auth etc flatpak-builder --install leads to "error: Flatpak system operation ConfigureRemote not allowed for user" #290

For each of these options, the plan is to

  • change the default
  • mark the old argument as deprecated (probably in the code and docs only and not any user facing warning)
  • hide it from help
  • introduce a negative --disable-foo where it makes sense
  • update the documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions