Skip to content

Commit 7875c2a

Browse files
committed
improve build task flow, add build_deploy
Signed-off-by: Zen <[email protected]>
1 parent 33cfd0b commit 7875c2a

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
lines changed

src/ugrd/base/core.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ minor = 1
3737
[imports.build_pre]
3838
"ugrd.base.core" = [ "detect_tmpdir", "clean_build_dir", "find_libgcc" ]
3939

40-
[imports.build_tasks]
40+
[imports.build_deploy]
4141
"ugrd.base.core" = [ "generate_structure",
4242
"deploy_dependencies",
4343
"deploy_xz_dependencies",

src/ugrd/crypto/cryptsetup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__author__ = 'desultory'
2-
__version__ = '2.6.2'
2+
__version__ = '2.6.3'
33

44
from zenlib.util import contains
55

@@ -183,7 +183,10 @@ def _validate_cryptsetup_device(self, mapped_name) -> None:
183183
else:
184184
raise ValueError("[%s] Unable to validate LUKS UUID: %s" % (mapped_name, cryptsetup_token))
185185

186-
for dep in self['dependencies']:
186+
if 'Cipher: aes-xts-plain64' in luks_info:
187+
self['kernel_modules'] = 'crypto_xts'
188+
189+
for dep in self['dependencies']: # Ensure argon is installed if argon2id is used
187190
if dep.name.startswith('libargon2.so'):
188191
break
189192
else:

src/ugrd/fs/mounts.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ late_fstab = "/etc/fstab.late"
2121
"ugrd.fs.mounts" = [ "_process_mounts_multi", "_process_late_mounts_multi", "_process_mount_timeout" ]
2222

2323
[imports.build_pre]
24-
"ugrd.fs.mounts" = [ "get_mounts_info", "get_virtual_block_info", "get_blkid_info", "autodetect_root", "autodetect_mounts", "autodetect_root_dm" ]
24+
"ugrd.fs.mounts" = [ "get_mounts_info", "get_virtual_block_info", "get_blkid_info",
25+
"autodetect_root", "autodetect_mounts", "autodetect_root_dm", "autodetect_init_mount" ]
2526

2627
[imports.build_tasks]
27-
"ugrd.fs.mounts" = [ "autodetect_init_mount", "export_mount_info", "export_root_target" ]
28+
"ugrd.fs.mounts" = [ "export_mount_info", "export_root_target" ]
2829

2930
[imports.build_final]
3031
"ugrd.fs.mounts" = [ "generate_fstab" ]

src/ugrd/initramfs_generator.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ def __init__(self, config='/etc/ugrd/config.toml', *args, **kwargs):
1515
# Used for functions that are added to the bash source file
1616
self.included_functions = {}
1717

18-
# Used for functions that are run as part of the build process, build_final is run after init generation
19-
self.build_tasks = ['build_pre', 'build_tasks']
18+
# Used for functions that are run as part of the build process
19+
self.build_tasks = ['build_pre', 'build_tasks', 'build_deploy', 'build_final']
2020

2121
# init_pre and init_final are run as part of generate_initramfs_main
2222
self.init_types = ['init_debug', 'init_early', 'init_main', 'init_late', 'init_premount', 'init_mount', 'init_mount_late', 'init_cleanup']
@@ -78,7 +78,6 @@ def build(self) -> None:
7878
self.config_dict.validate()
7979

8080
self.generate_init()
81-
self.run_hook('build_final')
8281
self.pack_build()
8382
self.run_checks()
8483
self.run_tests()

src/ugrd/kmod/kmod.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ no_kmod = "bool" # Disables kernel modules entirely
2424
"ugrd.kmod.kmod" = [ "_process_kmod_init_multi", "_process_kernel_modules_multi", "_process__kmod_auto_multi" ]
2525

2626
[imports.build_pre]
27-
"ugrd.kmod.kmod" = [ "get_kernel_metadata",
28-
"autodetect_modules",
29-
"process_modules", "process_ignored_modules", "process_module_metadata" ]
27+
"ugrd.kmod.kmod" = [ "get_kernel_metadata", "autodetect_modules" ]
3028

3129
[imports.build_tasks]
30+
"ugrd.kmod.kmod" = [ "process_modules", "process_ignored_modules", "process_module_metadata" ]
31+
32+
[imports.build_final]
3233
"ugrd.kmod.kmod" = [ "regen_kmod_metadata" ]
3334

3435
[imports.init_pre]

0 commit comments

Comments
 (0)