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

300.6. deja-dup-50.2

Scheduled, encrypted backups to a disk or folder over restic

Version 50.2, release 2
Shelf transfer — File transfer, synchronisation, backup and BitTorrent
Phase 44_apps (Applications), 393 of 422 in build order
Licence GPL-3.0-or-later
Homepage https://apps.gnome.org/DejaDup/
Build time 1.8 SBU
Installed size 1.7 MiB in 29 files
Recipe ports/core/transfer/deja-dup/kpkgbuild

About

Déjà Dup is a GTK 4 and libadwaita front end for scheduled, encrypted backups. It stores nothing itself: restic writes and reads the backups, rclone reaches the cloud locations, and the setuid fusermount3 from fuse mounts a snapshot for browsing. Each is found by name at run time, which is why all three are in depends though none is linked. The passphrase is kept through libsecret, by whatever answers org.freedesktop.secrets.

Sources

Dependencies

Depends on: meson, ninja, pkgconf, gettext, glib, gtk4, libadwaita, json-glib, libsecret, libsoup3, vala, blueprint-compiler, itstool, librsvg, gsettings-desktop-schemas, glib-networking, restic, rclone, fuse.

Required by: no port names it.

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 deja-dup'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/transfer/deja-dup.

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/transfer/deja-dup
echo '956664cff547757a64127395a47f7e30b0c764b8265eeef253ede4ca47a7be88  deja-dup-50.2.tar.bz2' | 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/deja-dup
SRC=$SRC_ROOT/deja-dup-50.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf deja-dup-50.2.tar.bz2 -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:

meson setup build --prefix=/usr --sysconfdir=/etc --libdir=lib \
	--buildtype=release \
	-Dpackagekit=disabled
meson compile -C build
DESTDIR=$PKG meson install --no-rebuild -C build
rm "$PKG/etc/xdg/autostart/org.gnome.DejaDup.Monitor.desktop"

find "$PKG/usr/share/help" -mindepth 1 -maxdepth 1 ! -name C -exec rm -rf {} +

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/org.gnome.DejaDup.svg \
		-o "$PKG/usr/share/icons/hicolor/${s}x${s}/apps/org.gnome.DejaDup.png"
done

cat > "$PKG/usr/share/applications/org.gnome.DejaDup.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Déjà Dup Backups
GenericName=Backup
Comment=Protect yourself from data loss
TryExec=deja-dup
Exec=deja-dup %u
Icon=org.gnome.DejaDup
Terminal=false
StartupNotify=true
StartupWMClass=org.gnome.DejaDup
SingleMainWindow=true
Categories=GTK;GNOME;Utility;Archiving;
Keywords=deja;dup;backup;backups;back up;restore;snapshot;restic;
Actions=backup;

[Desktop Action backup]
Name=Back Up
Exec=deja-dup --backup
DESKTOP
chmod 644 "$PKG/usr/share/applications/org.gnome.DejaDup.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/deja-dup, 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 deja-dup-50.2-2.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/deja-dup, and runs the triggers its paths call for.

Contents

Installed programs: deja-dup.

Installed directories: /usr/lib/deja-dup, /usr/libexec/deja-dup, /usr/share/help/C/deja-dup, /usr/share/licenses/deja-dup.

Short descriptions

deja-dup a desktop backup tool

Notes