Skip to content

Commit

Permalink
Fix issues caught by piuparts
Browse files Browse the repository at this point in the history
Both -client and -export were missing dependencies on
desktop-file-utils, which is needed for the `update-desktop-database`
call in the postinst. -export also needed shared-mime-info.

As far as I can tell, the -dev and libtool-bin dependencies in -export
are unnecessary; we aren't compiling any C/C++ code at runtime that
should need them.

Finally, make the postrm commands optional per
<https://www.debian.org/doc/debian-policy/ch-relationships.html#binary-dependencies-depends-recommends-suggests-enhances-pre-depends>,
which states that "There is no guarantee that package dependencies will
be available when postrm is run".
  • Loading branch information
legoktm committed Feb 16, 2024
1 parent b68bccf commit 307d1b5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
5 changes: 3 additions & 2 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ X-Python3-Version: >= 3.5

Package: securedrop-client
Architecture: all
Depends: ${python3:Depends},${misc:Depends}, python3-pyqt5, python3-pyqt5.qtsvg, apparmor-utils
Depends: ${python3:Depends},${misc:Depends}, python3-pyqt5, python3-pyqt5.qtsvg, apparmor-utils, desktop-file-utils
Description: securedrop client for qubes workstation

Package: securedrop-export
Architecture: all
Depends: ${python3:Depends}, ${misc:Depends}, cryptsetup, cups, printer-driver-brlaser, printer-driver-hpcups, system-config-printer, xpp, libcups2-dev, python3-dev, libtool-bin, unoconv, gnome-disk-utility
Depends: ${python3:Depends}, ${misc:Depends}, cryptsetup, cups, printer-driver-brlaser, printer-driver-hpcups, system-config-printer, xpp, libcups2, unoconv, gnome-disk-utility,
desktop-file-utils, shared-mime-info
Description: Submission export scripts for SecureDrop Workstation
This package provides scripts used by the SecureDrop Qubes Workstation to
export submissions from the client to external storage, via the sd-export
Expand Down
10 changes: 8 additions & 2 deletions debian/securedrop-export.postrm
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ set -e
case "$1" in
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)

update-desktop-database /usr/share/applications
update-mime-database /usr/share/mime
# There is no guarantees dependencies are available in postrm, so
# conditionally issue these updates.
if [[ -x "/usr/bin/update-desktop-database" ]]; then
update-desktop-database /usr/share/applications
fi
if [[ -x "/usr/bin/update-mime-database" ]]; then
update-mime-database /usr/share/mime
fi
;;

*)
Expand Down

0 comments on commit 307d1b5

Please sign in to comment.