$ show storaged-project/blivet-gui
blivet-gui is a graphical storage configuration tool for Linux, built on the blivet library. It operates with a two-process architecture: an unprivileged GTK3 frontend communicates over a Unix socket with a root-privileged daemon (spawned via pkexec). The application provides a comprehensive set of dialogs and visualizations for managing disks, partitions, LVM2 (VGs, LVs, thin pools, snapshots), Btrfs volumes/subvolumes, software RAID (MDRAID), Stratis pools/filesystems, LUKS encryption, and DM Integrity. It also integrates with the Anaconda installer as a storage spoke. The codebase is written in Python, uses Glade UI files, and follows a clear client-server proxy pattern for operations. Translations are managed via gettext with Weblate, though many locales are untranslated. The project includes a test suite that uses targetcli-created virtual disks for backend testing. While the architecture is sound, some areas show drift: mixed Glade version conventions, a security-sensitive pickle-based IPC layer (mitigated with a restricted unpickler), and heavy use of MagicMock in tests.
The LLM identified 4 files worth highlighting for reuse:
Implements a proxy-based RPC mechanism over Unix sockets using pickle serialization. Key classes: ProxyDataContainer (a picklable namedtuple-like container for user input/server answers), ProxyID (opaque identifier for remote objects), and helper functions safe_pickle_loads/_RestrictedUnpickler that harden the IPC against arbitrary code execution. The pattern elegantly hides the process boundary, allowing client code to operate on proxied objects almost transparently.
A self-contained GTK3 custom widget for interactive size selection (with support for min/max, reserved size, and parent device management). It loads its own Glade UI, handles signals, and validates user input. Could be extracted and reused in other storage tools that require size-picking with constraints (e.g., LVM extended size, RAID chunk size).
Provides a BlivetGUIConfig class that implements dict-like configuration storage with attribute access (e.g., config.my_key). It is simple, self-contained, and could serve as a lightweight config pattern for any Python application that wants dot-notation access to settings without heavy frameworks.
Defines BlivetUtilsTestCase, a test base class that programmatically creates and destroys virtual SCSI disks using targetcli (fileio backstores). This enables realistic, repeatable storage tests without physical hardware. The pattern is novel and reusable for any project that needs to test partition/format/RAID operations in CI or development environments.