docs(docs): separate symlink and config installation

Document the executable and APT hook as symlinks into the repository\ncheckout. This keeps development changes immediately available at the\ninstalled paths.\n\nKeep the runtime configuration as an installed copy so local settings remain\nindependent from the checkout. Explain the expected paths and the need to\nupdate the APT executable path when choosing different locations.
This commit is contained in:
2026-09-16 09:27:02 +02:00
parent 24a6ce31a4
commit e227e27ec8

View File

@@ -6,14 +6,25 @@ This is the Ubuntu/APT counterpart to [zfs-pacman-hook](https://quico.space/quic
## Setup
Install the files as follows:
Clone this repository into an arbitrary location `<repo>`. Install the
executable and APT hook as symlinks so that changes in the checkout are
immediately available. Install the runtime configuration as a copy so that
local configuration is not tied to the repository checkout:
```bash
sudo install -Dm755 apt-zfs-snapshot.sh /usr/local/sbin/apt-zfs-snapshot
sudo install -Dm644 apt-zfs-snapshot.conf /etc/apt-zfs-snapshot.conf
sudo install -Dm644 90apt-zfs-snapshot.conf /etc/apt/apt.conf.d/90apt-zfs-snapshot.conf
sudo chmod +x <repo>/apt-zfs-snapshot.sh
sudo ln -s <repo>/apt-zfs-snapshot.sh \
/usr/local/sbin/apt-zfs-snapshot
sudo ln -s <repo>/90apt-zfs-snapshot.conf \
/etc/apt/apt.conf.d/90apt-zfs-snapshot.conf
sudo install -Dm644 <repo>/apt-zfs-snapshot.conf \
/etc/apt-zfs-snapshot.conf
```
The symlink targets must remain at the paths used in the commands above. If
you choose different target locations, update the executable path in
`90apt-zfs-snapshot.conf` as well.
Set `dry_run='true'` in `/etc/apt-zfs-snapshot.conf`, run a harmless APT operation, and inspect the planned names. Set it back to `false` after verifying dataset selection and naming.
The helper runs as root through APT and requires Bash, `zfs`, and `findmnt`.