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
deja-dup-50.2.tar.bz2(1.6 MiB)
sha256956664cff547757a64127395a47f7e30b0c764b8265eeef253ede4ca47a7be88
upstream: https://gitlab.gnome.org/World/deja-dup/-/archive/50.2/deja-dup-50.2.tar.bz2
archive copy: sources-4/transfer--deja-dup-50.2.tar.bz2
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:
-Dpackagekit=disabled— Build without PackageKit, through which Déjà Dup offers to install a missing backup tool from the distribution’s repositories when it is needed. The option isautoupstream; PackageKit is not a port, and kpkg installs packages here.
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
- Duplicity is not a port. Upstream lists it as a run-time dependency for reading and writing existing Duplicity backups, and makes new backups with restic. Here every backup is a restic one, and a Duplicity backup made elsewhere cannot be restored; it is a row of Features whose library has no port.
- The scheduler is not started by the session.
build.shdeletes upstream’s/etc/xdg/autostart/org.gnome.DejaDup.Monitor.desktop: it names noOnlyShowIn, and Plasma would start/usr/libexec/deja-dup/deja-dup-monitorat every login, which activates dconf and four gvfs volume monitors even with “Back up automatically” off. Kup, the Backups page in System Settings, is the desktop’s scheduled backup. “Back up automatically” backs up only whiledeja-dup-monitorruns, started by hand or from an autostart entry the user adds in System Settings’ Autostart page; “Back Up Now” and restores work without it. - The menu icon. Upstream installs the application icon as
org.gnome.DejaDup.svgonly, andbuild.shalso renders 48, 64 and 128 pixel PNGs withrsvg-convert. - The menu entry is replaced. The GtkApplication id,
org.gnome.DejaDup, is the Wayland app_id and theStartupWMClass. Upstream’sMimeTypeline, which claims the two OAuth callback URL schemes a Google Drive or OneDrive location signs in through, is left out, and so isDBusActivatable, so the launcher runs the program named inExec. Those two locations need a browser sign-in and a network; a local disk, a folder and a restic repository do not. - English only. The help keeps its
Cpages and every translated one is removed.