bundles/zfs: support arch linux

This commit is contained in:
Franzi 2022-02-12 11:24:50 +01:00
parent 961a2891a0
commit c1bb43286d
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 39 additions and 23 deletions

View file

@ -3,25 +3,26 @@ from json import dumps
from bundlewrap.metadata import MetadataJSONEncoder
actions = {
# For some reason, this module doesn't get auto-loaded on debian,
# even if installation of zfsutils-linux tries to start
# zfs-mount.service. We have no choice but to do it manually.
'modprobe_zfs': {
'command': 'modprobe zfs',
'unless': 'lsmod | grep ^zfs',
'needs': {
'pkg_apt:zfs-dkms',
if node.os == 'debian':
actions = {
# For some reason, this module doesn't get auto-loaded on debian,
# even if installation of zfsutils-linux tries to start
# zfs-mount.service. We have no choice but to do it manually.
'modprobe_zfs': {
'command': 'modprobe zfs',
'unless': 'lsmod | grep ^zfs',
'needs': {
'pkg_apt:zfs-dkms',
},
'needed_by': {
'pkg_apt:zfs-zed',
'pkg_apt:zfsutils-linux',
'zfs_dataset:',
'zfs_pool:',
},
'comment': 'If this fails, do a dist-upgrade, reinstall zfs-dkms, reboot',
},
'needed_by': {
'pkg_apt:zfs-zed',
'pkg_apt:zfsutils-linux',
'zfs_dataset:',
'zfs_pool:',
},
'comment': 'If this fails, do a dist-upgrade, reinstall zfs-dkms, reboot',
},
}
}
files = {
'/etc/modprobe.d/zfs.conf': {
@ -69,11 +70,7 @@ files = {
}
svc_systemd = {
'zfs-zed': {
'needs': {
'pkg_apt:zfs-zed'
},
},
'zfs-zed': {},
}
for name, attrs in node.metadata.get('zfs/datasets', {}).items():

View file

@ -16,6 +16,7 @@ defaults = {
},
'zfs-zed': {
'needed_by': {
'svc_systemd:zfs-zed',
'zfs_dataset:',
'zfs_pool:',
},
@ -58,6 +59,24 @@ defaults = {
},
},
},
'pacman': {
'additional_config': {
'[archzfs]\nServer = http://archzfs.com/archzfs/x86_64',
},
'packages': {
'zfs-linux-lts': {
'needed_by': {
'zfs_dataset:',
'zfs_pool:',
},
},
'zfs-utils': {
'needed_by': {
'svc_systemd:zfs-zed',
},
},
},
},
'zfs': {
'datasets': {},
'pools': {},