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

View file

@ -16,6 +16,7 @@ defaults = {
}, },
'zfs-zed': { 'zfs-zed': {
'needed_by': { 'needed_by': {
'svc_systemd:zfs-zed',
'zfs_dataset:', 'zfs_dataset:',
'zfs_pool:', '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': { 'zfs': {
'datasets': {}, 'datasets': {},
'pools': {}, 'pools': {},