2021-04-22 11:49:06 +02:00
|
|
|
# My personalized Arch Linux packages
|
2021-04-19 21:56:06 +02:00
|
|
|
|
|
|
|
## Some notes
|
|
|
|
|
2021-04-22 21:17:17 +02:00
|
|
|
* https://disconnected.systems/blog/archlinux-meta-packages/
|
|
|
|
* https://nerdstuff.org/posts/2020/2020-002_meta_packages/
|
|
|
|
|
2021-04-22 21:19:29 +02:00
|
|
|
* https://gitlab.com/archi3linux/meta/-/blob/master/PKGBUILD
|
|
|
|
* https://github.com/alfredopalhares/arch-pkgbuilds
|
|
|
|
|
2021-04-26 19:04:35 +02:00
|
|
|
|
|
|
|
### Managing custom packages; managing a remote repository
|
2021-04-22 21:23:34 +02:00
|
|
|
|
|
|
|
1) One could use [crema](https://gitlab.com/mipimipi/crema)
|
|
|
|
2) Or some self made shell scripts: [pkg/de-p1st-repo/README.md](pkg/de-p1st-repo/README.md)
|
|
|
|
|
2021-04-26 19:04:35 +02:00
|
|
|
|
|
|
|
## Notes about PKGBUILD
|
|
|
|
|
2021-04-20 10:34:01 +02:00
|
|
|
### Package naming
|
2021-04-19 21:56:06 +02:00
|
|
|
|
|
|
|
* [package naming](https://wiki.archlinux.org/index.php/Arch_package_guidelines#Package_naming)
|
|
|
|
|
|
|
|
Package names are prefixed with `de-p1st` as this is one of my
|
2021-04-26 19:06:31 +02:00
|
|
|
domains ([p1st.de](https://p1st.de)) which itself is an abbreviation of
|
|
|
|
[privacy1st.de](https://privacy1st.de)
|
2021-04-20 10:32:43 +02:00
|
|
|
|
2021-04-26 19:04:35 +02:00
|
|
|
### Creating config files
|
2021-04-21 21:49:21 +02:00
|
|
|
|
|
|
|
```shell
|
|
|
|
install -Dm644 $src $pkgdir/$dst
|
|
|
|
```
|
2021-04-20 10:32:43 +02:00
|
|
|
|
2021-04-26 19:04:35 +02:00
|
|
|
Example: [pkg/de-p1st-sudo/PKGBUILD](pkg/de-p1st-sudo/PKGBUILD)
|
2021-04-20 10:32:43 +02:00
|
|
|
|
2021-04-26 19:04:35 +02:00
|
|
|
### Changing existing config files
|
2021-04-21 21:49:21 +02:00
|
|
|
|
2021-04-22 21:07:47 +02:00
|
|
|
* `holo` from the AUR
|
2021-04-26 19:04:35 +02:00
|
|
|
* [https://github.com/holocm/holo/blob/master/doc/holo-files.8.pod]()
|
|
|
|
|
|
|
|
```shell
|
|
|
|
install -Dm0544 some-config.conf.holoscript "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/path/to/some-config.conf.holoscript
|
|
|
|
```
|
2021-04-22 21:07:47 +02:00
|
|
|
|
2021-04-26 19:04:35 +02:00
|
|
|
Example:
|
|
|
|
* [pkg/de-p1st-pacman/pacman.conf.holoscript](pkg/de-p1st-pacman/pacman.conf.holoscript)
|
|
|
|
* [pkg/de-p1st-pacman/PKGBUILD](pkg/de-p1st-pacman/PKGBUILD)
|
2021-04-21 21:49:21 +02:00
|
|
|
|
2021-04-26 19:04:35 +02:00
|
|
|
### Home skeleton
|
2021-04-20 10:32:43 +02:00
|
|
|
|
2021-04-29 14:54:30 +02:00
|
|
|
Pacman should **never** change files in `$HOME`. To still be able to include
|
|
|
|
customized configurations, one can copy them to the skeleton used for new users:
|
|
|
|
|
|
|
|
Files from `/etc/skel` are copied to `/home/$USER` when new users are created.
|
2021-04-29 14:49:02 +02:00
|
|
|
|
|
|
|
Example: [pkg/de-p1st-gnupg/PKGBUILD](pkg/de-p1st-gnupg/PKGBUILD)
|
2021-04-21 21:49:21 +02:00
|
|
|
|
2021-05-01 17:04:27 +02:00
|
|
|
### Enabling services
|
2021-04-21 21:49:21 +02:00
|
|
|
|
2021-04-23 12:55:23 +02:00
|
|
|
* systemd.preset - Service enablement presets
|
|
|
|
* [man 5 systemd.preset](https://www.systutorials.com/docs/linux/man/5-systemd.preset/)
|
|
|
|
|
2021-05-03 22:21:56 +02:00
|
|
|
**Note**: the preset name shall start with a number < 99.
|
2021-05-03 18:53:10 +02:00
|
|
|
|
2021-04-26 19:04:35 +02:00
|
|
|
```shell
|
2021-05-03 18:45:52 +02:00
|
|
|
install -Dm0644 systemd.preset "$pkgdir"/usr/lib/systemd/system-preset/20-"$pkgname".preset
|
2021-04-26 19:04:35 +02:00
|
|
|
```
|
2021-04-23 12:55:23 +02:00
|
|
|
|
2021-04-26 19:04:35 +02:00
|
|
|
Example package:
|
|
|
|
* [pkg/de-p1st-networkmanager/systemd.preset](pkg/de-p1st-networkmanager/systemd.preset)
|
|
|
|
* [pkg/de-p1st-networkmanager/PKGBUILD](pkg/de-p1st-networkmanager/PKGBUILD)
|
2021-05-04 16:52:34 +02:00
|
|
|
|
|
|
|
### Multiple providers
|
|
|
|
|
|
|
|
Example:
|
|
|
|
* Two packages (`de-p1st-test2` and `de-p1st-test3`) provide `de-p1st-test`
|
|
|
|
* If one installs `de-p1st-test` he can interactively choose one which provider to select:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ sudo pacman -S de-p1st-test
|
|
|
|
:: There are 2 providers available for de-p1st-test:
|
|
|
|
:: Repository de-p1st
|
|
|
|
1) de-p1st-test2 2) de-p1st-test3
|
|
|
|
|
|
|
|
Enter a number (default=1):
|
|
|
|
```
|
2021-05-13 17:44:02 +02:00
|
|
|
|
|
|
|
**TODO**: How does Pacman pick the default option? Are packages simply
|
|
|
|
ordered alphabetically?
|