294.5. gnome-disk-utility-46.1
Partition, format, encrypt, image and benchmark drives over udisks2 (GTK 3)
46.1-1 · GPL-2.0-or-later · 0.1 SBU · 963.4 KiB, 18 files · 44_apps, 60 of 422 · ports/core/disk/gnome-disk-utility
Homepage: https://apps.gnome.org/DiskUtility/
GNOME Disks partitions, formats, encrypts, images, restores and benchmarks drives, and reads their SMART data, all through udisks2. It is a GTK 3 application installed beside Plasma’s own disk tools for what they do not do: writing and restoring whole-disk images and benchmarking a drive. gnome-disk-image-mounter mounts an image file as a loop device.
Depends on: meson, ninja, pkgconf, glib, gettext, gtk3, libhandy, libcanberra, libdvdread, xz, libnotify, libsecret, libpwquality, udisks2, libxslt, docbook-xsl, librsvg, desktop-file-utils, elogind.
Required by: no port names it.
Sources: gnome-disk-utility-46.1.tar.xz (1.5 MiB). Every step kpkg takes applies to this port.
Install: script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install gnome-disk-utility'
build.sh:
meson setup build --prefix=/usr --sysconfdir=/etc --libdir=lib \
--buildtype=release --wrap-mode=nodownload \
-Dlogind=libelogind \
-Dgsd_plugin=false \
-Dman=true
meson compile -C build
DESTDIR=$PKG meson install --no-rebuild -C build
for s in 48 64 128; do
install -d "$PKG/usr/share/icons/hicolor/${s}x${s}/apps"
rsvg-convert -w $s -h $s data/icons/hicolor/scalable/apps/org.gnome.DiskUtility.svg \
-o "$PKG/usr/share/icons/hicolor/${s}x${s}/apps/org.gnome.DiskUtility.png"
done
rm -f "$PKG/usr/share/applications/gnome-disk-image-mounter.desktop" \
"$PKG/usr/share/applications/gnome-disk-image-writer.desktop"
cat > "$PKG/usr/share/applications/org.gnome.DiskUtility.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Disks (GNOME)
GenericName=Disk Utility
Comment=Manage drives and media
Exec=gnome-disks
Icon=org.gnome.DiskUtility
Terminal=false
StartupNotify=true
StartupWMClass=gnome-disks
Categories=GTK;Utility;System;
Keywords=disk;drive;volume;harddisk;hdd;disc;partition;format;iso;image;backup;restore;benchmark;raid;luks;encryption;smart;
DESKTOP
chmod 644 "$PKG/usr/share/applications/org.gnome.DiskUtility.desktop"
--wrap-mode=nodownload— Fail the configure on a missing dependency instead of letting meson look for a subproject to fetch.-Dlogind=libelogind— Link elogind’slibelogind(upstream’s choices arelibsystemd,libelogindandnone). Disks askssd-loginwhich seat its own session is on and, in its “attached to another seat” check, leaves out a drive udisks tags with a different seat. A drive with no seat tag, which is every drive on a single-seat machine, is shown either way.-Dgsd_plugin=false— Build no plug-in forgnome-settings-daemon, which warns about failing disks in a GNOME session. KDOS runs no GNOME session.-Dman=true— Installgnome-disks(1)andgnome-disk-image-mounter(1), built with libxslt and docbook-xsl.
Programs: gnome-disk-image-mounter, gnome-disks.
Directories: /usr/share/licenses/gnome-disk-utility.
build.sh removes gnome-disk-image-mounter.desktop and gnome-disk-image-writer.desktop, hidden entries that exist only to claim application/x-cd-image and the raw disk-image types. Installed, they would compete for those types with the handler mimeapps.list names, and an image would open in whichever entry sorted first.
It also replaces upstream’s org.gnome.DiskUtility.desktop with its own, named Disks (GNOME) so that the menu does not show two rows called Disks, and without DBusActivatable=true: no D-Bus service file is installed for the application, so an activatable entry would start nothing. Upstream installs the icon as SVG only; build.sh renders it to PNG in three hicolor sizes with librsvg’s rsvg-convert.