플랫팩 빌더(Flatpak Builder)🔗
flatpak-builder has already been introduced in 첫번째 플랫팩 응용프로그램 빌드
and Building Introduction. It is packaged by most of the popular
distributions and there is also a flatpak-builder Flatpak package
on Flathub (this may contain Flathub specific downstream modifications).
This page provides additional details on how to use flatpak-builder,
including the various command options that are available.
내보내기(exporting)🔗
flatpak-builder provides two options for exporting an application in
order to run it. The first is to export to a repository, from which the
application can be run. The second is to automatically install locally.
저장소로 내보내기🔗
The --repo option allows a repository to be specified, for the application
to be exported to. This takes the format:
$ flatpak-builder --repo=<repo> <build-dir> <manifest>
Here, <repo> is a path to a repository. If no repository exists at the
specified location, the repository will be created. If the application is
already in the specified repository, flatpak-builder will add the build
as a new version of the existing application.
You can put more than one application in the same repository by using the same
--repo path for multiple invocations of flatpak-builder.
참고
By default, flatpak-builder splits off translations and debug information
into separate .Locale and .Debug extensions. These extensions are
automatically exported into a repository along with the application.
빌드 결과물의 직접 설치🔗
Instead of exporting to a repository, the Flatpak that is produced by
flatpak-builder can be automatically installed locally, using the
--install option:
$ flatpak-builder --install <build-dir> <manifest>
This approach has the advantage of skipping the separate install step that is needed when exporting to a repository.
서명🔗
플랫팩 저장소로 커밋(commit)한 내역들은 GPG 서명되어야 한다. 저장소를 생성 및 변경 하는 데에 플랫팩 빌더를 사용할 경우, 서명을 위해 매개변수로 GPG 키를 넘겨준다. 이 때, 다음과 같이 —gpg-sign 옵션을 사용한다:
$ flatpak-builder --gpg-sign=<key> --repo=<repository> <manifest>
Here, <key> is the ID of the GPG key that is to be used. The
--gpg-homedir option can also be used to specify the home directory of
the key that is being used.
일반적으로 추천하는 사항은 아니지만, 저장소를 추가할 때 —no-gpg-verify 옵션을 사용하면 GPG 검증을 건너뛰는 것도 가능하다. 단, GPG 검증을 활성화 하지 않은 저장소를 업데이트할 때에는 관리자 계정(root)을 필요로 하게 된다는 점을 유의하자.