arch/README.md

92 lines
2.4 KiB
Markdown
Raw Normal View History

2021-06-21 13:16:46 +02:00
# My personalized Arch Linux distribution
2021-04-19 21:56:06 +02:00
2021-06-18 21:46:50 +02:00
## Submodules - Initialization and Updating
2021-06-16 16:12:02 +02:00
2021-06-16 20:21:21 +02:00
There are several AUR packages added as submodules inside [pkg](pkg).
See [build-pkg/pkglist-AUR.txt](build-pkg/pkglist-AUR.txt) for a full list.
2021-06-16 16:12:02 +02:00
2021-06-18 21:46:50 +02:00
They were added in the following manner:
2021-06-16 16:12:02 +02:00
```shell
2021-06-16 20:21:21 +02:00
AUR=(xorg-meta riseup-vpn nordic-kde-git ...)
for pkg in "${AUR[@]}"; do
git submodule add "https://aur.archlinux.org/${pkg}.git" pkg/"${pkg}"
done
2021-06-16 16:12:02 +02:00
```
2021-06-18 21:46:50 +02:00
To initialize the submodules, run
2021-06-17 15:32:47 +02:00
```shell
git submodule init
```
2021-06-16 16:12:02 +02:00
To update all submodules, run
```shell
2021-06-26 16:46:42 +02:00
if stdout="$(git submodule update --remote)"; then
# We capture only the part after "pkg" until the next "'" using sed
# Source: https://unix.stackexchange.com/a/165590/315162
sed 's|^Submodule path '\''pkg/\([^'\'']*\).*|\1|' <<< "$stdout"
else
echo "Some error occurred! Maybe there are local changes in some of the submodules?
"
#echo "$stdout"
fi
```
It may happen that some submodules have a detached HEAD (due to local changes, etc.)
and do not get updated with the above command. One can list those submodules as follows:
```shell
git submodule status | grep --invert-match '(heads/master)$'
2021-06-22 23:26:03 +02:00
2021-06-26 16:46:42 +02:00
# One could then reset them to master with e.g.
# git reset --hard
# git checkout master
2021-06-16 16:12:02 +02:00
```
2021-06-18 21:46:50 +02:00
2021-05-14 14:50:43 +02:00
## Build packages from source
Fork this repository.
Then and adjust the following files:
* [pkg/de-p1st-repo/arch-repo.cfg](pkg/de-p1st-repo/arch-repo.cfg)
2021-06-16 16:12:02 +02:00
* For your build-machine, adjust section `LOCAL MACHINE CONFIGURATION`: Add absolute path of folder [build-pkg/out](build-pkg/out) to array `LOCAL_PKG_DIRS`
2021-05-14 14:50:43 +02:00
as the build packages will be stored there.
* For your mirror-server, adjust section `REMOTE MIRROR SERVER CONFIGURATION` accordingly.
* [pkg/de-p1st-pacman/pacman.d/de-p1st](pkg/de-p1st-pacman/pacman.d/de-p1st)
* Add the address of your mirror-server.
2021-06-18 21:46:50 +02:00
Build [de-p1st-repo](pkg/de-p1st-repo):
2021-05-14 14:50:43 +02:00
```shell
2021-06-12 12:16:10 +02:00
cd build-pkg
sudo docker-compose run --rm makepkg de-p1st-repo
2021-05-14 14:50:43 +02:00
```
2021-06-18 21:46:50 +02:00
Install it on your build-machine and your mirror-server:
2021-05-14 14:50:43 +02:00
```shell
2021-06-18 21:46:50 +02:00
# On your local machine
2021-05-14 14:50:43 +02:00
sudo pacman -U out/de-p1st-repo*.pkg.tar.*
2021-06-18 21:46:50 +02:00
# Copy the package to your mirror-server and install it there as well!
2021-05-14 14:50:43 +02:00
```
Then you can start building all packages and adding them to your mirror-server:
```shell
2021-06-14 20:16:40 +02:00
./build-all.sh
2021-05-14 14:50:43 +02:00
```
2021-06-18 22:00:09 +02:00
## Install Arch Linux
2021-04-21 21:49:21 +02:00
2021-06-18 21:46:50 +02:00
See [pkg/de-p1st-installer/README.md](pkg/de-p1st-installer/README.md)
2021-05-13 19:23:32 +02:00
2021-06-18 21:46:50 +02:00
## Notes and TODOs
2021-05-13 17:44:02 +02:00
2021-06-18 21:46:50 +02:00
See [notes.md](notes.md)