Update Flatpak-related notes

This commit is contained in:
Gabriel Arazas 2021-11-17 13:33:44 +08:00
parent e33781ec0c
commit 6200120c94
5 changed files with 57 additions and 12 deletions

View File

@ -3,7 +3,7 @@
:END:
#+title: Command line: Flatpak
#+date: "2021-06-04 07:39:11 +08:00"
#+date_modified: "2021-08-14 16:04:15 +08:00"
#+date_modified: "2021-11-08 20:12:02 +08:00"
#+language: en
@ -29,8 +29,11 @@ Most of the query-related subcommands (e.g., =search=, =list=) has the following
* Subcommands
- =info PACKAGE [BRANCH]= prints related information of the package.
+ =-M, --show-permissions= prints the permissions of the package in a INI-like format.
+ =-m, --show-metadata= prints the metadata in a INI-like format.
- =-M, --show-permissions= prints the permissions of the package in a INI-like format.
- =-m, --show-metadata= prints the metadata in a INI-like format.
- =remote-ls [REMOTE]= lists all of the packages of the given remote.
- =--app= only includes standalone applications.
- =--runtime= only lists runtimes.

View File

@ -3,7 +3,7 @@
:END:
#+title: Command line: pacman
#+date: "2021-06-08 15:00:04 +08:00"
#+date_modified: "2021-11-06 12:05:11 +08:00"
#+date_modified: "2021-11-06 12:12:06 +08:00"
#+language: en
#+property: header_args :eval no
@ -109,4 +109,4 @@ pacman -Q --native --quiet | fzf --multi --prompt "Remove installed package(s) >
for example, you cannot know what files are owned by the package unless it is installed (also you have =pkgfile= for that)
- pacman also cannot view the PKGBUILD of packages that are not installed;
you can use
you can use the =asp= tool for that (i.e., ~asp show ${PACKAGE}~)

View File

@ -0,0 +1,18 @@
:PROPERTIES:
:ID: 53061a97-e907-4a31-9109-a2f6c57c6e22
:END:
#+title: Open Build Service
#+date: 2021-11-12 09:45:15 +08:00
#+date_modified: 2021-11-17 13:22:28 +08:00
#+language: en
- a generic package builder that supports buiding packages for other distributions (e.g., [[id:f3f1201a-9fb9-4481-981f-5f50f8982a5e][Arch Linux]], Debian, roam:Fedora, FreeBSD) and architectures
- for [[id:f3f1201a-9fb9-4481-981f-5f50f8982a5e][Arch Linux]], you can configure =pacman= to include the result;
for example, adding the OpenSUSE repository that outputs specifically for Arch Linux packages
#+begin_src conf
[openSUSE_Tools_Arch]
SigLevel = Optional TrustAll
Server = http://download.opensuse.org/repositories/openSUSE:/Tools/Arch/$arch/
#+end_src

View File

@ -3,7 +3,7 @@
:END:
#+title: Neovim Lua integration
#+date: "2021-07-15 07:45:50 +08:00"
#+date_modified: "2021-07-20 23:31:52 +08:00"
#+date_modified: "2021-11-16 19:15:13 +08:00"
#+language: en
@ -25,6 +25,7 @@
+ =vim.opt= will return an Option object, it has a common API;
to learn more about it, see =vim.opt= and its subsections
+ to run Vimscript, you can use =vim.cmd= — e.g., ~vim.cmd "colorscheme nord"~
+ interacting with Neovim API through =vim.api=
- there are Neovim configurations written in Lua
+ [[https://github.com/mjlbach/defaults.nvim][defaults.nvim]]
- comprehensive examples include Neovim plugins that are already written in Lua
@ -32,3 +33,4 @@
+ [[https://github.com/wbthomason/packer.nvim][packer.nvim]] is a more comprehensive package manager
+ [[https://github.com/L3MON4D3/LuaSnip][LuaSnip]] is a snippet engine
+ [[https://github.com/nvim-telescope/telescope.nvim][telescope.nvim]] is a fuzzy finder integrated inside Neovim
- for more information to create Lua modules, see =lua-require-example= help section

View File

@ -3,16 +3,38 @@
:END:
#+title: Flatpak packages
#+date: "2021-06-27 23:46:41 +08:00"
#+date_modified: "2021-11-04 16:21:45 +08:00"
#+date_modified: "2021-11-17 13:31:30 +08:00"
#+language: en
- a Flatpak package usually is an application that depends on runtimes which are collections of library
- while runtimes can be created, there are only a handful of them in the official Flathub remote
- some of the runtimes include Freedesktop, GNOME, and KDE
A Flatpak package usually is an application that depends on runtimes which are collections of library.
For more information, Flatpak has a [[https://docs.flatpak.org/][documentation page]] complete with references and tutorials to get started.
* Terminologies
To get us on the same page very quickly, here's the terminologies you'll encounter when dealing with Flatpak.
- *Remotes* are the repositories of packages in a similar vein to [[id:53061a97-e907-4a31-9109-a2f6c57c6e22][Open Build Service]] projects.
- The *manifest* is the term for package definition which will be passed into the builder service similar to [[id:963c043e-4972-4b29-8360-223ec3465203][Nix packages]].
- *Runtimes* are a bundle of libraries and applications to be shared from several packages.
This is how Flatpak reduces the total build size for all packages.
Among others, it has runtime for Freedesktop, GNOME, and KDE platforms.
- *Base applications* are smaller bundles of libraries not large enough to be a runtime.
It enables control by adding this mini-bundle into a package.
This is typically specialized in scope (e.g., Electron applications).
* Extra information
- you can run the runtimes to know the installed packages (e.g., ~flatpak run org.freedesktop.Sdk//19.08~)
- Flatpak can get packages from a repository referred to as *remotes* similar to Arch packages or FreeBSD ports
- the package definition are referred to as a *manifest* similar to [[id:963c043e-4972-4b29-8360-223ec3465203][Nix packages]]
- Flatpak can create bundles from a manifest, enabling easier distribution without a Flatpak remote
- similar to [[id:963c043e-4972-4b29-8360-223ec3465203][Nix packages]] and [[id:be917383-84c4-4bf5-9ca0-b04bfb778f4f][Guix package manager]], sandboxing is an important part of the build process;
thus, there are limitations such as no network availability, filesystem access, and socket access;