From f3af5692059067cf8692b5cd1e0d7395c41fec06 Mon Sep 17 00:00:00 2001 From: David Runge Date: Fri, 23 Oct 2020 22:13:52 +0200 Subject: Set CacheDir and HookDir for profile more sanely archiso/mkarchiso: Change `_pacman()` to use the *modified* pacman.conf from the work_dir, instead of using the *unmodified* pacman.conf from the profile. Change `_make_pacman_conf()` to compare the system's and the profile's CacheDir setting and use the profile's CacheDir setting only if it's not the default and not the same as the system's. Always set the HookDir to the airootfs' override directory, so that no hooks from the host system are being run. Remove DBPath, LogFile and RootDir settings from the work_dir pacman.conf as they are otherwise referring to the host system, **even if** pacman is being called with the `-r` flag. Fix a typo in _make_custom_airootfs(). README.profile.rst: Add information about the pacman.conf in a profile and how configuration options behave, when used by mkarchiso. Fixes #73 Fixes #74 --- README.profile.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 README.profile.rst (limited to 'README.profile.rst') diff --git a/README.profile.rst b/README.profile.rst new file mode 100644 index 0000000..7e8e177 --- /dev/null +++ b/README.profile.rst @@ -0,0 +1,24 @@ +======= +profile +======= + +An archiso profile consists of several configuration files and a directory for files to be added to the resulting image. + +pacman.conf +=========== + +A configuration for pacman is required per profile. + +Some configuration options will not be used or will be modified: + +* `CacheDir`: the profile's option is **only** used if it is not the default (i.e. `/var/cache/pacman/pkg`) and if it is + not the same as the system's option. In all other cases the system's pacman cache is used. +* `HookDir`: it is **always** set to the `/etc/pacman.d/hooks` airootfs directory in the work directories airootfs to + allow modification via the profile and ensure interoparability with hosts using dracut (see #73 for further + information) +* `RootDir`: it is **always** removed, as setting it explicitely otherwise refers to the host's root filesystem (see + `man 8 pacman` for further information on the `-r` option used by `pacstrap`) +* `LogFile`: it is **always** removed, as setting it explicitely otherwise refers to the host's pacman log file (see + `man 8 pacman` for further information on the `-r` option used by `pacstrap`) +* `DBPath`: it is **always** removed, as setting it explicitely otherwise refers to the host's pacman database (see + `man 8 pacman` for further information on the `-r` option used by `pacstrap`) -- cgit v1.2.3-70-g09d2