Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

295.1. k3b-26.08.2

KDE disc burner — data, audio and video CDs, DVDs and Blu-ray, copies and rips

Version 26.08.2, release 1
Shelf optical — CD, DVD and Blu-ray burning, mastering and CD reading or ripping
Phase 44_apps (Applications), 319 of 422 in build order
Licence GPL-2.0-or-later
Homepage https://apps.kde.org/k3b/
Build time 6.1 SBU
Installed size 19.0 MiB in 327 files
Recipe ports/core/optical/k3b/kpkgbuild

About

K3b is KDE’s disc-burning program: data, audio and video CDs, DVDs and Blu-ray discs, disc copies, image writing, and ripping of audio CDs and video DVDs. It is a Qt 6 and KDE Frameworks application, and it writes discs through external programs it finds on PATH: cdrskin from libburn for CD and DVD, growisofs from dvd+rw-tools for DVD and Blu-ray, cdrdao for disc-at-once writing and copies, and mkisofs, which libisoburn installs as a link to xorriso, for data images.

Sources

Dependencies

Depends on: cmake, ninja, extra-cmake-modules, pkgconf, qt6-qtbase, qt6-qtwayland, karchive, kauth, kconfig, kcoreaddons, kfilemetadata, ki18n, kiconthemes, kjobwidgets, kcmutils, kio, knotifications, knewstuff, knotifyconfig, solid, kwidgetsaddons, kxmlgui, kdoctools, libkcddb, libsamplerate, libdvdread, taglib, ffmpeg, flac, libmad, libsndfile, lame, libvorbis, libogg, libburn, libisoburn, cdrdao, dvd+rw-tools, libcdio-paranoia, sox, udisks2, shared-mime-info.

Required by (1): kde-gear-multimedia.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install k3b'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/optical/k3b.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/optical/k3b
echo '04bb92de933388cdfe17c8d38bd192256c6b868c1fa16d1e6679405ea6fd3aed  k3b-26.08.2.tar.xz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/k3b
SRC=$SRC_ROOT/k3b-26.08.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf k3b-26.08.2.tar.xz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

cmake -S . -B build -G Ninja \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D KDE_INSTALL_LIBDIR=lib \
	-D CMAKE_BUILD_TYPE=Release \
	-D KDE_INSTALL_USE_QT_SYS_PATHS=ON \
	-D BUILD_TESTING=OFF \
	-D K3B_DOC=ON \
	-D K3B_DEBUG=OFF \
	-D K3B_BUILD_API_DOCS=OFF \
	-D K3B_ENABLE_DVD_RIPPING=ON \
	-D K3B_ENABLE_TAGLIB=ON \
	-D K3B_BUILD_FFMPEG_DECODER_PLUGIN=ON \
	-D K3B_BUILD_OGGVORBIS_DECODER_PLUGIN=ON \
	-D K3B_BUILD_OGGVORBIS_ENCODER_PLUGIN=ON \
	-D K3B_BUILD_MAD_DECODER_PLUGIN=ON \
	-D K3B_BUILD_MUSE_DECODER_PLUGIN=OFF \
	-D K3B_BUILD_FLAC_DECODER_PLUGIN=ON \
	-D K3B_BUILD_SNDFILE_DECODER_PLUGIN=ON \
	-D K3B_BUILD_LAME_ENCODER_PLUGIN=ON \
	-D K3B_BUILD_SOX_ENCODER_PLUGIN=ON \
	-D K3B_BUILD_EXTERNAL_ENCODER_PLUGIN=ON \
	-D K3B_BUILD_WAVE_DECODER_PLUGIN=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_DvdRead=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_Taglib=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_FFmpeg=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_Flac=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_Flac++=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_Mad=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_Sndfile=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_Lame=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_OggVorbis=ON \
	-D CMAKE_DISABLE_FIND_PACKAGE_Qt6WebEngineWidgets=ON \
	-D KF_SKIP_PO_PROCESSING=ON \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

cat > "$PKG/usr/share/applications/org.kde.k3b.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=K3b
GenericName=Disc Burning
Comment=Burn, copy and rip CDs, DVDs and Blu-ray discs
TryExec=k3b
Exec=k3b %U
Icon=k3b
Terminal=false
StartupNotify=true
StartupWMClass=org.kde.k3b
X-DocPath=k3b/index.html
MimeType=application/x-k3b;
Categories=Qt;KDE;AudioVideo;DiscBurning;
Keywords=burn;cd;dvd;blu-ray;iso;rip;disc;k3b;
DESKTOP
chmod 644 "$PKG/usr/share/applications/org.kde.k3b.desktop"

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/k3b, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf k3b-26.08.2-1.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/k3b, and runs the triggers its paths call for.

Contents

Installed programs: k3b.

Installed libraries: libk3bdevice.so, libk3blib.so.

Installed directories: /usr/lib/qt6/plugins/k3b_plugins, /usr/share/doc/HTML/en/k3b, /usr/share/k3b, /usr/share/licenses/k3b.

Notes

Audio-CD ripping opens libcdio-paranoia at run time with dlopen(). The KAuth helper k3bhelper runs as root behind two polkit actions, each of which asks for an administrator’s password: org.kde.k3b.updatepermissions sets the group and mode of the burner devices and of the burning programs K3b runs, setuid root where K3b asks for it, and org.kde.k3b.addtogroup adds a user to a group with gpasswd.

build.sh replaces upstream’s desktop entry. KAboutData sets the desktop file name, so the Wayland app id is org.kde.k3b, not the k3b upstream’s entry names in StartupWMClass, and the new entry names org.kde.k3b there. It also claims only K3b’s own project type: disc images and blank media are types other programs open too, and a default among them is chosen in mimeapps.list.