FLATPAK-BUILD-EXPORT(1)

πŸ’– FLATPAK-BUILD-EXPORT πŸ’–

okay so bestie, this is the flatpak build-export page from the flatpak manual β€” section 1, commands-and-tools territory, and it's literally the moment your build dir becomes a real, shareable repo. slay. let's go. ✨


🌸 NAME 🌸

flatpak-build-export β€” create a repository from a build directory. yes that's the whole job. that's the vibe. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

flatpak build-export [OPTION...] LOCATION DIRECTORY [BRANCH]

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: this command creates or updates a repository with an application build. 🫢

  • LOCATION β€” the location of the repository.
  • DIRECTORY β€” must be a finalized build directory. (finalized!! don't skip that part, it's giving unfinished-business otherwise πŸ’€)
  • BRANCH β€” if it's not specified, it's assumed to be "master".

If LOCATION already exists, it's assumed to be an OSTree repository. Otherwise a brand new OSTree repository gets created at that location. You can go peek at the repository with the ostree tool, like a little vibe check. πŸ‘‘

The contents of DIRECTORY are committed on the branch with the name:

app/APPNAME/ARCH/BRANCH

where ARCH is the architecture of the runtime that the application is using. A commit filter is used to enforce that only the contents of the files/ and export/ subdirectories and the metadata file are included in the commit. Anything else is ignored. periodt. πŸ™ˆ

When you're exporting a flatpak to be published to the internet, --collection-id=COLLECTION-ID should be specified as a globally unique reverse DNS value, to identify the collection of flatpaks this will be added to. Setting a globally unique collection ID lets the apps in the repository be shared over peer to peer systems without needing further configuration. iconic behaviour tbh. ✨

πŸ’‘ bestie note: the build-update-repo command should be used to update repository metadata whenever application builds are added to a repository. don't forget it, it's the main character of repo maintenance.

✨ OPTIONS ✨

The following options are understood β€” and yes, we're listing ALL of them, no skipping, no cap. πŸ“

  • -h, --help β€” show help options and exit. the classic escape hatch. πŸšͺ
  • -s, --subject=SUBJECT β€” one line subject for the commit message.
  • -b, --body=BODY β€” full description for the commit message.
  • --collection-id=COLLECTION-ID β€” set as the collection ID of the repository. Setting a globally unique collection ID allows the apps in the repository to be shared over peer to peer systems without needing further configuration. But heads up: if you're exporting to an existing repository, the collection ID must match the existing configured collection ID for that repository. no mismatches, we don't do that here. 😭
  • --subset=SUBSET β€” mark the commit to be included in the named subset. This will cause the commit to be put in the named subset summary (in addition to the main one), allowing users to see only this subset instead of the whole repo. lowkey a curation moment. πŸ’…
  • --arch=ARCH β€” specify the architecture component of the branch to export. Only host compatible architectures can be specified; see flatpak --supported-arches for valid values.
  • --exclude=PATTERN β€” exclude files matching PATTERN from the commit. This option can be used multiple times.
  • --include=PATTERN β€” don't exclude files matching PATTERN from the commit, even if they match the --exclude patterns. This option can be used multiple times.
  • --metadata=FILENAME β€” use the specified filename as metadata in the exported app instead of the default file (called metadata). This is useful if you want to commit multiple things from a single build tree, typically used in combination with --files and --exclude. multi-purpose build tree, we love to see it. 🌈
  • --files=SUBDIR β€” use the files in the specified subdirectory as the file contents, rather than the regular files directory.
  • --timestamp=DATE β€” use the specified ISO 8601 formatted date or NOW, for the current time, in the commit metadata and, if --update-appstream is used, the appstream data.
  • --end-of-life=REASON β€” mark the build as end-of-life. REASON is a message that may be shown to users installing this build. it's giving farewell tour. πŸ₯€
  • --end-of-life-rebase=ID β€” mark the build as end-of-life. Unlike --end-of-life, this one takes an ID that supersedes the current one. By the user's request, the application data may be preserved for the new application.
  • --disable-fsync β€” don't fsync when writing to the repository. This can result in data loss in exceptional situations, but can improve performance when working with temporary or test repositories.
  • --update-appstream β€” update the appstream branch after the build.
  • --no-update-summary β€” don't update the summary file after the new commit is added. This means the repository will not be useful for serving over http until build-update-repo has been run. This is useful is you want to do multiple repo operations before finally updating the summary.
  • --gpg-sign=KEYID β€” sign the commit with this GPG key. This option can be used multiple times.
  • --gpg-homedir=PATH β€” GPG Homedir to use when looking for keyrings
  • -r, --runtime β€” export a runtime instead of an app (this uses the usr subdir as files).
  • -v, --verbose β€” print debug information during command processing.
  • --ostree-verbose β€” print OSTree debug information during command processing.

🧚 EXAMPLES 🧚

here's the moment you've been waiting for, bestie:

$ flatpak build-export ~/repos/gnome-calculator/
~/build/gnome-calculator/ org.gnome.Calculator

    Commit: 9d0044ea480297114d03aec85c3d7ae3779438f9d2cb69d717fb54237acacb8c
    Metadata Total: 605
    Metadata Written: 5
    Content Total: 1174
    Content Written: 1
    Content Bytes Written: 305

look at that commit hash. ate and left no crumbs. 😌


πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, they're all in the friend group:


okay that's the whole page, you're officially a build-export girlie now 🫢 this manual came from the flatpak project and lives in the FLATPAK BUILD-EXPOR(1) manual β€” go forth, export your builds, and slay. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from