From c03690fe88eb997e583aed16266dc3ec1f9bdf8e Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sun, 8 Dec 2024 14:10:59 +0100 Subject: [PATCH] bundles/pacman: always use linux-lts please --- bundles/pacman/files/pacman.conf | 14 +------------- bundles/pacman/items.py | 8 ++------ bundles/pacman/metadata.py | 1 + bundles/zfs/items.py | 3 +++ bundles/zfs/metadata.py | 27 ++++++--------------------- nodes/kunsi-p14s.py | 8 ++++---- 6 files changed, 17 insertions(+), 44 deletions(-) diff --git a/bundles/pacman/files/pacman.conf b/bundles/pacman/files/pacman.conf index 834108e..7fb4e48 100644 --- a/bundles/pacman/files/pacman.conf +++ b/bundles/pacman/files/pacman.conf @@ -32,21 +32,9 @@ Include = /etc/pacman.d/mirrorlist Server = ${node.metadata.get('pacman/repository')} Include = /etc/pacman.d/mirrorlist % endif -% if node.metadata.get('pacman/enable_aurto', True): +% if node.metadata.get('pacman/enable_aurto'): [aurto] Server = https://aurto.kunbox.net/ SigLevel = Optional TrustAll % endif -% if node.has_bundle('zfs'): - -[archzfs] -Server = http://archzfs.com/archzfs/x86_64 - -% if node.metadata.get('pacman/linux-lts', False): -[zfs-linux-lts] -% else: -[zfs-linux] -% endif -Server = http://kernels.archzfs.com/$repo/ -% endif diff --git a/bundles/pacman/items.py b/bundles/pacman/items.py index 9f80ca7..fe4f605 100644 --- a/bundles/pacman/items.py +++ b/bundles/pacman/items.py @@ -33,6 +33,7 @@ svc_systemd['paccache.timer'] = { } pkg_pacman = { + 'acpi_call-lts': {}, 'at': {}, 'autoconf': {}, 'automake': {}, @@ -61,6 +62,7 @@ pkg_pacman = { 'ldns': {}, 'less': {}, 'libtool': {}, + 'linux-lts': {}, 'logrotate': {}, 'lsof': {}, 'm4': {}, @@ -102,12 +104,6 @@ pkg_pacman = { 'zip': {}, } -if node.metadata.get('pacman/linux-lts', False): - pkg_pacman['linux-lts'] = {} - pkg_pacman['acpi_call-lts'] = {} -else: - pkg_pacman['linux'] = {} - pkg_pacman['acpi_call'] = {} for pkg, config in node.metadata.get('pacman/packages', {}).items(): pkg_pacman[pkg] = config diff --git a/bundles/pacman/metadata.py b/bundles/pacman/metadata.py index fb69a04..1c60981 100644 --- a/bundles/pacman/metadata.py +++ b/bundles/pacman/metadata.py @@ -4,6 +4,7 @@ defaults = { 'glibc', 'pacman', }, + 'enable_aurto': True, 'no_extract': { 'etc/cron.d/0hourly', # don't install systemd-homed pam module. It produces a lot of spam in diff --git a/bundles/zfs/items.py b/bundles/zfs/items.py index c63250e..8b13f4b 100644 --- a/bundles/zfs/items.py +++ b/bundles/zfs/items.py @@ -2,6 +2,9 @@ from json import dumps from bundlewrap.metadata import MetadataJSONEncoder +if node.has_bundle('pacman'): + assert node.metadata.get('pacman/enable_aurto'), f'{node.name}: bundle:zfs needs aurto for zfs-linux-lts package' + files = { '/etc/modprobe.d/zfs.conf': { 'source': 'zfs-modprobe.conf', diff --git a/bundles/zfs/metadata.py b/bundles/zfs/metadata.py index 01ed900..4191834 100644 --- a/bundles/zfs/metadata.py +++ b/bundles/zfs/metadata.py @@ -48,6 +48,12 @@ defaults = { 'etc/sudoers.d/zfs', }, 'packages': { + 'zfs-linux-lts': { + 'needed_by': { + 'zfs_dataset:', + 'zfs_pool:', + }, + }, 'zfs-utils': { 'needed_by': { 'svc_systemd:zfs-zed', @@ -121,27 +127,6 @@ if node.has_bundle('telegraf'): } -@metadata_reactor.provides( - 'pacman/packages', -) -def packages(metadata): - if node.metadata.get('pacman/linux-lts', False): - pkgname = 'zfs-linux-lts' - else: - pkgname = 'zfs-linux' - return { - 'pacman': { - 'packages': { - pkgname: { - 'needed_by': { - 'zfs_dataset:', - 'zfs_pool:', - }, - }, - }, - }, - } - @metadata_reactor.provides( 'apt/packages', ) diff --git a/nodes/kunsi-p14s.py b/nodes/kunsi-p14s.py index b94f2b0..385cf3f 100644 --- a/nodes/kunsi-p14s.py +++ b/nodes/kunsi-p14s.py @@ -115,10 +115,10 @@ nodes['kunsi-p14s'] = { 'entries': { 'arch': { 'title': 'Arch Linux', - 'linux': '/vmlinuz-linux', + 'linux': '/vmlinuz-linux-lts', 'initrd': [ '/amd-ucode.img', - '/initramfs-linux.img', + '/initramfs-linux-lts.img', ], 'options': { 'net.ifnames=0', @@ -128,9 +128,9 @@ nodes['kunsi-p14s'] = { }, 'arch-fallback': { 'title': 'Arch Linux (no ucode, fallback initramfs)', - 'linux': '/vmlinuz-linux', + 'linux': '/vmlinuz-linux-lts', 'initrd': [ - '/initramfs-linux-fallback.img', + '/initramfs-linux-lts-fallback.img', ], 'options': { 'net.ifnames=0',