This commit is contained in:
JMARyA 2023-12-04 11:02:23 +01:00
commit c5cd492449
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
475 changed files with 27928 additions and 0 deletions

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,13 @@
---
website: https://brew.sh/
obj: application
---
# Brew
[MacOS](../../macos/macOS.md) and [Linux](../../linux/Linux.md) Package Manager.
## Install
```shell
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

View file

@ -0,0 +1,30 @@
---
website: https://flatpak.org/
obj: application
---
# Flatpak
Flatpak is a software utility for package management on [Linux](../../linux/Linux.md) systems. It provides a consistent and secure environment for applications to run across different distributions, ensuring compatibility and ease of installation. Applications are sandboxed with bubblewrap.
## Key Concepts
### 1. Flatpak Repository
A Flatpak repository is a collection of applications bundled as Flatpak packages. These repositories can be hosted locally or on the internet. Flatpak relies on repositories to download and install applications.
### 2. Flatpak Package
A Flatpak package is a compressed archive containing the application, its dependencies, and metadata required for installation. These packages are sandboxed to ensure compatibility and security.
### 3. Flatpak Runtime
Runtimes are collections of libraries and services that applications can use. Flatpak uses runtimes to ensure that applications have access to the necessary dependencies without conflicting with the host system.
### 4. Flatpak Ref
A Flatpak ref is a specific version of a runtime or an application. It is identified by a unique hash, allowing multiple versions to coexist on a system.
## Usage
#refactor
```shell
flatpak install <app> # Install applications
flatpak update # Update applications
flatpak uninstall <app> # Remove application
flatpak list # List installed applications
flatpak info <app> # Show info on app
```

View file

@ -0,0 +1,49 @@
---
arch-wiki: https://wiki.archlinux.org/title/PKGBUILD
obj: concept
---
A `PKGBUILD` is a shell script containing the build information required by Arch Linux packages. [Arch Wiki](https://wiki.archlinux.org/title/PKGBUILD)
Packages in Arch Linux are built using the makepkg utility. When makepkg is run, it searches for a PKGBUILD file in the current directory and follows the instructions therein to either compile or otherwise acquire the files to build a package archive (pkgname.pkg.tar.zst). The resulting package contains binary files and installation instructions, readily installable with pacman.
Mandatory variables are `pkgname`, `pkgver`, `pkgrel`, and `arch`. `license` is not strictly necessary to build a package, but is recommended for any PKGBUILD shared with others, as makepkg will produce a warning if not present.
# Example
PKGBUILD:
```sh
# Maintainer: User <mail>
pkgname=NAME
pkgver=VERSION
pkgrel=1
pkgdesc="DESCRIPTION"
arch=('x86_64')
url=URL
license=("MIT")
depends=("git")
makedepends=("git")
source=("FILE_NAME::FILE_URL")
sha256sums=("SKIP")
prepare() {
}
pkver() {
}
build() {
cd "$pkgname"
make
}
check() {
}
package() {
cd "$pkgname"
install -Dm755 ./app "$pkgdir/usr/bin/app"
}
```

View file

@ -0,0 +1,9 @@
---
tags: ["meta"]
obj: meta/collection
---
# Package Managers
- [Brew](Brew.md)
- [Flatpak](Flatpak.md)
- [Pacman](Pacman.md)

View file

@ -0,0 +1,61 @@
---
obj: application
---
# Pacman
Pacman is the default [Arch Linux](../../linux/Arch%20Linux.md) Package Manager
## Usage
Search for a package:
```shell
pacman -Ss <package>...
```
Update the local package base and upgrade all out-of-date packages:
```shell
pacman -Suy
```
Install a package:
```shell
pacman -S <package>...
```
Uninstall a package:
```shell
pacman -R <package>...
```
Uninstall a package and its depedencies, removing all new orphans:
```shell
pacman -Rcs <package>...
```
Get information about package:
```shell
pacman -Si <package>...
```
Install a package from local package file (.tar.xz):
```shell
pacman -U <file>
```
List explicitly installed packages:
```shell
pacman -Qe
```
List orphan packages (installed as dependencies and not required anymore):
```shell
pacman -Qdt
```
List installed packages and versions:
```shell
pacman -Q
```
Empty the entire pacman cache:
```shell
pacman -Scc
```

View file

@ -0,0 +1,59 @@
---
arch-wiki: https://wiki.archlinux.org/title/Makepkg
obj: application
---
# makepkg
makepkg is a tool for creating [pacman](Pacman.md) packages based on [PKGBUILD](PKGBUILD.md) files.
## Usage
Make a package:
```shell
makepkg
```
Make a package and install its dependencies:
```shell
makepkg --syncdeps
```
Make a package, install its dependencies then install it to the system:
```shell
makepkg --syncdeps --install
```
Make a package, but skip checking the source's hashes:
```shell
makepkg --skipchecksums
```
Clean up work directories after a successful build:
```shell
makepkg --clean
```
Verify the hashes of the sources:
```shell
makepkg --verifysource
```
## Options
| Option | Description |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-A, --ignorearch` | Ignore a missing or incomplete arch field in the build script |
| `-c, --clean` | Clean up leftover work files and directories after a successful build |
| `-d, --nodeps` | Do not perform any dependency checks. This will let you override and ignore any dependencies required. There is a good chance this option will break the build process if all of the dependencies are not installed |
| `-e, --noextract` | Do not extract source files or run the prepare() function (if present); use whatever source already exists in the $srcdir/ directory. This is handy if you want to go into $srcdir/ and manually patch or tweak code, then make a package out of the result. Keep in mind that creating a patch may be a better solution to allow others to use your [PKGBUILD](PKGBUILD.md). |
| `--skipinteg` | Do not perform any integrity checks (checksum and [PGP](../../tools/GPG.md)) on source files |
| `--skipchecksums` | Do not verify checksums of source files |
| `--skippgpcheck` | Do not verify [PGP](../../tools/GPG.md) signatures of source files |
| `-i, --install` | Install or upgrade the package after a successful build using [pacman](Pacman.md) |
| `-o, --nobuild` | Download and extract files, run the prepare() function, but do not build them. Useful with the `--noextract` option if you wish to tweak the files in $srcdir/ before building |
| `-r, --rmdeps` | Upon successful build, remove any dependencies installed by makepkg during dependency auto-resolution and installation |
| `-s, --syncdeps` | Install missing dependencies using [pacman](Pacman.md). When build-time or run-time dependencies are not found, [pacman](Pacman.md) will try to resolve them. If successful, the missing packages will be downloaded and installed |
| `-C, --cleanbuild` | Remove the $srcdir before building the package |
| `--noarchive` | Do not create the archive at the end of the build process. This can be useful to test the package() function or if your target distribution does not use [pacman](Pacman.md) |
| `--sign` | Sign the resulting package with [gpg](../../tools/GPG.md) |
| `--nosign` | Do not create a signature for the built package |
| `--key <key>` | Specify a key to use when signing packages |
| `--noconfirm` | (Passed to [pacman](Pacman.md)) Prevent [pacman](Pacman.md) from waiting for user input before proceeding with operations |