Skip to content

Custom INI-esque parser for repart config files#36

Merged
madonuko merged 22 commits intomainfrom
cappy/systemd-ini
Dec 28, 2024
Merged

Custom INI-esque parser for repart config files#36
madonuko merged 22 commits intomainfrom
cappy/systemd-ini

Conversation

@korewaChino
Copy link
Member

This PR adds a custom systemd-repart config parser which allows for duplicate keys inside the config files, i.e

[Partition]
Type=root
Format=btrfs
Subvolumes=/@ /@home
MountPoint=/:rw,seclabel,relatime,compress=zstd:1,ssd,discard=async,space_cache=v2,subvolid=257,subvol=/@
MountPoint=/home:rw,seclabel,relatime,compress=zstd:1,ssd,discard=async,space_cache=v2,subvolid=256,subvol=/@home
FactoryReset=yes
# This path is actually relative; see man repart.d at --copy-source option
CopyFiles=/:/
ExcludeFiles=/boot/

It does this by storing the values as an enum of either a normal string or a Vec of strings, converting when multiple duplicate keys are found.

I don't know if it would be useful in place of the original serde_ini implementation,. but it kind of fixes the issue behind BTRFS subvolume mounts in #34

@madonuko
Copy link
Member

can we test this build of readymade?

@korewaChino korewaChino requested a review from lleyton December 28, 2024 18:21
@korewaChino korewaChino changed the title wip: Custom INI-esque parser for repart config files Custom INI-esque parser for repart config files Dec 28, 2024
@madonuko madonuko merged commit 5e96388 into main Dec 28, 2024
5 of 9 checks passed
@madonuko madonuko deleted the cappy/systemd-ini branch April 26, 2025 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants