The Debian packaging of openQA is maintained in git,
using the merging workflow described in dgit-maint-merge(7).
There isn't a patch queue that can be represented as a quilt series.

A detailed breakdown of the changes is available from their canonical
representation - git commits in the packaging repository.

For example, to see the changes made by the Debian maintainer in the first
upload of upstream version 1.2.3, you could use:

    % git clone https://git.dgit.debian.org/openqa
    % cd openqa
    % git log --oneline 1.2.3..debian/1.2.3-1 -- . ':!debian'

(If you have dgit, use `dgit clone openqa`, rather than plain `git clone`.)

A single combined diff, containing all the changes, follows.
--- openqa-4.6.1640268275.25ac0d7.orig/assets/stylesheets/dashboard.scss
+++ openqa-4.6.1640268275.25ac0d7/assets/stylesheets/dashboard.scss
@@ -24,6 +24,7 @@ td div.progress {
         // don' use flex box because it leads to undesired overflow behavior
         display: inline;
         overflow: hidden;
+        padding-top: 10px;
         a {
             display: block;
             width: 100%;
--- openqa-4.6.1640268275.25ac0d7.orig/assets/stylesheets/openqa.scss
+++ openqa-4.6.1640268275.25ac0d7/assets/stylesheets/openqa.scss
@@ -3,8 +3,11 @@
 @import "bootswatch_litera_theme.scss";
 @import "openqa_theme.scss";
 
-// include Roboto font
-@import url($web-font-path);
+// use Roboto font from linked build dependency on Debian
+@font-face {
+  font-family: 'Roboto';
+  src: url('../_debian/fonts-roboto-fontface/fonts/roboto/Roboto-Regular.ttf') format('truetype');
+}
 
 // include Bootstrap 4
 @import "../cache/raw.githubusercontent.com/twbs/bootstrap/v4.1.1/scss/bootstrap.scss";
--- openqa-4.6.1640268275.25ac0d7.orig/assets/stylesheets/openqa_theme.scss
+++ openqa-4.6.1640268275.25ac0d7/assets/stylesheets/openqa_theme.scss
@@ -6,7 +6,6 @@ $grid-breakpoints: (
     xl: 1000px
 );
 
-$web-font-path:               "https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" !default;
 $default-font:                "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
 $icon-font-path:              '/fonts/';
 $default-font-color:          #666666;
--- openqa-4.6.1640268275.25ac0d7.orig/etc/apache2/vhosts.d/openqa-ssl.conf.template
+++ openqa-4.6.1640268275.25ac0d7/etc/apache2/vhosts.d/openqa-ssl.conf.template
@@ -1,12 +1,12 @@
 # sample apache config file for the ssl enabled openqa vhost.
 # At the very minimum you need to set the ServerName.
 
-# Note that this file will be ignored unless "SSL" is added to
-# APACHE_SERVER_FLAGS in /etc/sysconfig/apache2 (at least under
-# openSUSE).
+# There is a matching file nearby for non-ssl vhosts (openqa.conf.template) that
+# describes how to set things up, which also applies when setting up SSL.
+#
+# For SSL, you'll also need to load:
 
-<IfDefine SSL>
-<IfDefine !NOSSL>
+# a2enmod ssl
 
 <VirtualHost *:443>
 
@@ -26,7 +26,3 @@
     Include /etc/apache2/vhosts.d/openqa-common.inc
 
 </VirtualHost>
-
-</IfDefine>
-</IfDefine>
-
--- openqa-4.6.1640268275.25ac0d7.orig/etc/apache2/vhosts.d/openqa.conf.template
+++ openqa-4.6.1640268275.25ac0d7/etc/apache2/vhosts.d/openqa.conf.template
@@ -17,6 +17,7 @@
 # a2enmod proxy_http
 # a2enmod proxy_wstunnel
 # a2enmod rewrite
+# a2enmod expires
 
 <VirtualHost *:80>
 
--- openqa-4.6.1640268275.25ac0d7.orig/etc/openqa/workers.ini
+++ openqa-4.6.1640268275.25ac0d7/etc/openqa/workers.ini
@@ -36,7 +36,7 @@
 # packages against the list of packages during the previous last good job.
 # Configuring this variable provides a command line to list the packages and
 # their versions in plain text.
-#PACKAGES_CMD = rpm -qa
+#PACKAGES_CMD = apt list --installed
 
 # The section ids are the instance of the workers.
 # The key/value pairs will appear in vars.json
--- openqa-4.6.1640268275.25ac0d7.orig/lib/OpenQA/CLI.pm
+++ openqa-4.6.1640268275.25ac0d7/lib/OpenQA/CLI.pm
@@ -32,8 +32,8 @@ openqa-cli - provides command-line acces
     # Show details for job from arbitrary host
     openqa-cli api --host http://openqa.example.com jobs/408
 
-    # Show details for OSD job (prettified JSON)
-    openqa-cli api --osd --pretty jobs/4160811
+    # Show details for open.debian.net job (prettified JSON)
+    openqa-cli api --odn --pretty jobs/4160811
 
     # Archive job from O3
     openqa-cli archive --o3 408 /tmp/job_408
@@ -46,6 +46,7 @@ openqa-cli - provides command-line acces
     -h, --help                  Get more information on a specific command
         --osd                   Set target host to http://openqa.suse.de
         --o3                    Set target host to https://openqa.opensuse.org
+        --odn                   Set target host to https://openqa.debian.net
 
   Configuration:
     API key and secret are read from "client.conf" if not specified via CLI
--- openqa-4.6.1640268275.25ac0d7.orig/lib/OpenQA/CLI/api.pm
+++ openqa-4.6.1640268275.25ac0d7/lib/OpenQA/CLI/api.pm
@@ -77,8 +77,8 @@ sub command {
     # Show details for job from arbitrary host
     openqa-cli api --host http://openqa.example.com jobs/408
 
-    # Show details for job from OSD (prettified JSON)
-    openqa-cli api --osd --pretty jobs/4160811
+    # Show details for job from open.debian.net (prettified JSON)
+    openqa-cli api --odn --pretty jobs/4160811
 
     # List all jobs (CAUTION: this might time out for a large instance)
     openqa-cli api --host openqa.example.com jobs
@@ -135,6 +135,7 @@ sub command {
     -j, --json                    Request content is JSON
         --osd                     Set target host to http://openqa.suse.de
         --o3                      Set target host to https://openqa.opensuse.org
+        --odn                     Set target host to https://openqa.debian.net
         --param-file <param=file> Load content of params from files instead of
                                   from command line arguments. Multiple params
                                   may be specified by adding the option
--- openqa-4.6.1640268275.25ac0d7.orig/lib/OpenQA/CLI/archive.pm
+++ openqa-4.6.1640268275.25ac0d7/lib/OpenQA/CLI/archive.pm
@@ -37,8 +37,8 @@ sub command {
 
   Usage: openqa-cli archive [OPTIONS] JOB PATH
 
-    # Download assets and test results from OSD to /tmp/job_416081
-    openqa-cli archive --osd 416081 /tmp/job_416081
+    # Download assets and test results from ODN to /tmp/job_416081
+    openqa-cli archive --odn 416081 /tmp/job_416081
 
     # Download assets and test results from arbitrary host
     openqa-cli archive --host http://openqa.example.com 407 /tmp/foo
@@ -56,6 +56,7 @@ sub command {
     -l, --asset-size-limit <num>   Asset size limit in bytes
         --osd                      Set target host to http://openqa.suse.de
         --o3                       Set target host to https://openqa.opensuse.org
+        --odn                      Set target host to https://openqa.debian.net
     -t, --with-thumbnails          Download thumbnails as well
 
 =cut
--- openqa-4.6.1640268275.25ac0d7.orig/lib/OpenQA/Command.pm
+++ openqa-4.6.1640268275.25ac0d7/lib/OpenQA/Command.pm
@@ -96,7 +96,8 @@ sub run {
       'apisecret=s' => sub { $self->apisecret($_[1]) },
       'host=s' => sub { $self->host($_[1] =~ m!^/|://! ? $_[1] : "https://$_[1]") },
       'o3' => sub { $self->host('https://openqa.opensuse.org') },
-      'osd' => sub { $self->host('http://openqa.suse.de') };
+      'osd' => sub { $self->host('http://openqa.suse.de') },
+      'odn' => sub { $self->host('https://openqa.debian.net') };
 
     return $self->command(@args);
 }
--- openqa-4.6.1640268275.25ac0d7.orig/lib/OpenQA/Utils.pm
+++ openqa-4.6.1640268275.25ac0d7/lib/OpenQA/Utils.pm
@@ -384,6 +384,8 @@ my %bugrefs = (
     kde => 'https://bugs.kde.org/show_bug.cgi?id=',
     fdo => 'https://bugs.freedesktop.org/show_bug.cgi?id=',
     jsc => 'https://jira.suse.de/browse/',
+    deb => 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=',
+    bts => 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=',
 );
 my %bugurls = (
     'https://bugzilla.novell.com/show_bug.cgi?id=' => 'bsc',
@@ -397,6 +399,7 @@ my %bugurls = (
     $bugrefs{kde} => 'kde',
     $bugrefs{fdo} => 'fdo',
     $bugrefs{jsc} => 'jsc',
+    $bugrefs{deb} => 'deb',
 );
 
 my $MARKER_REFS = join('|', keys %bugrefs);
--- /dev/null
+++ openqa-4.6.1640268275.25ac0d7/man/openqa-label-all.1.in
@@ -0,0 +1,72 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH OPENQA\-LABEL\-ALL 1 "15 September 2021" "openQA %%VER%%" "openQA Documentation"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+openqa-label-all \- apply labels to openQA jobs based on various criteria
+.SH SYNOPSIS
+.B openqa-label-all
+.RI [OPTIONS]
+.SH DESCRIPTION
+.B openqa-label-all
+allows comments to be applied to a set jobs,
+which match the specified options,
+on the specified server.
+.SH OPTIONS
+.B openqa-label-all
+allows comments to be applied to the set of failing jobs
+that match the specified options.
+.TP
+.BI \-\-build =BUILD
+The build for which to look for a failing module
+.TP
+.BI \-\-module =MODULE
+The failing module to look for. (required)
+.TP
+.BI \-\-groupid =GROUP_ID
+Limits labeling to this group only.
+.TP
+.BI \-\-openqa-host =HOST
+The openQA host to act on, default: 'https://salsa.debian.net'
+.TP
+.BI \-\-result =RESULT
+The result of the jobs to look for, default: 'failed'
+.TP
+.BI \-\-label =LABEL
+The label to write as comment for each found job
+.TP
+.B \-\-dry-run
+Do not do any action on openQA
+.TP
+.B \-\-no-restart
+Do not restart the jobs after labelling
+.TP
+.BR \-v ", " \-\-verbose
+Increase verbosity level, specify multiple times to increase verbosity.
+.TP
+.BR \-h ", " \-\-help
+Prints help.
+.SH BUGS
+The script currently relies on the
+.I /usr/share/openqa/script/client
+(deprecated)
+to connect to the server's API.
+It should be upgraded to use
+.BR openqa\-cli (1).
+
+.SH AUTHOR
+This manual page was written by Philip Hands <phil@hands.com>, for the Debian
+GNU/Linux system (but may be used by others).
--- openqa-4.6.1640268275.25ac0d7.orig/profiles/apparmor.d/usr.share.openqa.script.openqa
+++ openqa-4.6.1640268275.25ac0d7/profiles/apparmor.d/usr.share.openqa.script.openqa
@@ -84,6 +84,13 @@
   owner /var/lib/openqa/share/tests/** rwl,
   owner /var/lib/openqa/archive/** rwl,
 
+  # Debian specific access to local assets
+  /usr/share/fonts/*/fork-awesome/* r,
+  /usr/share/fonts-fork-awesome/css/* r,
+  /usr/share/javascript/** r,
+  /usr/share/sass/bootstrap/** r,
+  /usr/share/nodejs/** r,
+
 
   profile /usr/bin/ssh {
     #include <abstractions/base>
@@ -100,53 +107,6 @@
 
   }
 
-  # Cover hook script "openqa-trigger-from-obs"
-
-  #include <abstractions/bash>
-  #include <abstractions/openssl>
-
-  /opt/openqa-trigger-from-obs/ r,
-  /opt/openqa-trigger-from-obs/** r,
-  /opt/openqa-trigger-from-obs/*:*/.* rw,
-  /opt/openqa-trigger-from-obs/*:*/*/.* rw,
-  /opt/openqa-trigger-from-obs/*:*/*.lst rw,
-  /opt/openqa-trigger-from-obs/*:*/*/*.lst rw,
-  /opt/openqa-trigger-from-obs/*:*/*products* rw,
-  /opt/openqa-trigger-from-obs/*:*/*/*products* rw,
-
-  /opt/os-autoinst-scripts/** rix,
-  /usr/share/openqa/script/client rix,
-  /usr/share/openqa/script/openqa-cli px,
-  /usr/share/openqa/script/openqa-clone-job mrix,
-  /usr/share/openqa/script/openqa-clone-job r,
-  /{usr/,}bin/{b,d}ash rix,
-  /usr/bin/cat rix,
-  /usr/bin/curl rix,
-  /usr/bin/date mrix,
-  /usr/bin/cp ix,
-  /usr/bin/dirname ix,
-  /usr/bin/env mrix,
-  /usr/bin/gawk mrix,
-  /usr/bin/grep mrix,
-  /usr/bin/head mrix,
-  /usr/bin/hxselect mrix,
-  /usr/bin/hxnormalize mrix,
-  /usr/bin/jq rix,
-  /usr/bin/mv ix,
-  /usr/bin/mktemp rix,
-  /usr/bin/openqa-cli rix,
-  /usr/bin/perl ix,
-  /usr/bin/rm rix,
-  /usr/bin/rsync mrix,
-  /usr/bin/sed mrix,
-  /usr/bin/tac mrix,
-  /usr/bin/tail mrix,
-  /usr/bin/wget ix,
-
-  owner /var/log/openqa_gru wk,
-
-  /opt/openqa-trigger-from-obs/script/rsync.sh px -> /opt/openqa-trigger-from-obs/script/rsync.sh,
-
   # Site-specific additions and overrides. See local/README for details.
   #include <local/usr.share.openqa.script.openqa>
 }
--- openqa-4.6.1640268275.25ac0d7.orig/profiles/apparmor.d/usr.share.openqa.script.worker
+++ openqa-4.6.1640268275.25ac0d7/profiles/apparmor.d/usr.share.openqa.script.worker
@@ -27,8 +27,11 @@
   /dev/ptmx rw,
   /dev/pts/* rw,
   /dev/tty rw,
+  /etc/apt/** r,
+  /etc/dpkg/dpkg.cfg{,.d,.d/*} r,
   /etc/gitconfig r,
   /etc/libnl/classid r,
+  /etc/machine-id r,
   /etc/openqa/client.conf r,
   /etc/openqa/workers.ini r,
   /etc/qemu/* r,
@@ -36,6 +39,7 @@
   /etc/vde2/vdecmd r,
   /proc/*/auxv r,
   /proc/*/cmdline r,
+  /proc/*/fd/ r,
   /proc/*/mountinfo r,
   /proc/*/net/psched r,
   /proc/*/stat r,
@@ -60,12 +64,14 @@
   /sys/kernel/mm/transparent_hugepage/enabled r,
   /tmp/* rwk,
   /usr/bin/Xvnc rCx,
+  /usr/bin/apt rix,
   /{usr/,}bin/cat rix,
   /usr/bin/chattr rix,
   /usr/bin/cksum rix,
   /usr/bin/cp rix,
   /usr/bin/date rix,
   /usr/bin/dirname rix,
+  /usr/bin/dpkg rix,
   /usr/bin/eatmydata rix,
   /usr/bin/env rix,
   /usr/bin/find rix,
@@ -102,6 +108,7 @@
   /usr/bin/x3270 cx,
   /usr/bin/xterm-console rix,
   /usr/bin/xz rix,
+  /var/cache/apt/** r,
   /usr/lib*/qemu/block-curl.so rix,
   /usr/lib*/qemu/block-iscsi.so mr,
   /usr/lib*/qemu/block-rbd.so mr,
@@ -116,6 +123,7 @@
   /usr/lib/utempter/utempter rix,
   /usr/sbin/smbd rix,
   /usr/sbin/ipmiconsole rix,
+  /usr/share/dpkg/* r,
   /usr/share/openqa/lib/** r,
   /usr/share/openqa/lib/DBIx/Class/Timestamps.pm r,
   /usr/share/openqa/lib/OpenQA/** r,
@@ -126,6 +134,8 @@
   /usr/share/seabios/* r,
   /usr/share/qemu/keymaps/* r,
   /usr/share/OVMF/* rk,
+  /var/lib/apt/** r,
+  /var/lib/dpkg/status r,
   /var/lib/openqa/cache/ r,
   /var/lib/openqa/cache/** rwk,
   /var/lib/openqa/pool/ r,
--- openqa-4.6.1640268275.25ac0d7.orig/script/fetchneedles
+++ openqa-4.6.1640268275.25ac0d7/script/fetchneedles
@@ -1,19 +1,19 @@
 #!/bin/sh -e
 : "${dbuser:="geekotest"}"
-: "${dbgroup:="www"}"
+: "${dbgroup:="www-data"}"
 
-: "${dist_name:=${dist:-"openSUSE"}}" # the display name, for the help message
-: "${dist:="opensuse"}"
-: "${giturl:="git://github.com/os-autoinst/os-autoinst-distri-opensuse.git"}"
-: "${branch:="master"}"
-: "${email:="openqa@$HOST"}"
+: "${dist_name:=${dist:-"Debian"}}" # the display name, for the help message
+: "${dist:="debian"}"
+: "${giturl:="https://salsa.debian.org/qa/openqa/openqa-tests-debian.git"}"
+: "${branch:="debian"}"
+: "${email:="openqa@$(hostname -f)"}"
 : "${username:="openQA web UI"}"
 : "${product:="$dist"}"
 
-: "${git_lfs:="0"}"
-: "${needles_separate:="1"}"
-: "${needles_giturl:="git://github.com/os-autoinst/os-autoinst-needles-opensuse.git"}"
-: "${needles_branch:="master"}"
+: "${git_lfs:="1"}"
+: "${needles_separate:="0"}"
+: "${needles_giturl:="https://salsa.debian.org/qa/openqa/openqa-needles-debian.git"}"
+: "${needles_branch:="debian-needles"}"
 
 : "${updateall:="0"}"
 : "${force:="0"}"
--- openqa-4.6.1640268275.25ac0d7.orig/script/openqa-validate-yaml
+++ openqa-4.6.1640268275.25ac0d7/script/openqa-validate-yaml
@@ -19,6 +19,52 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
+=head1 NAME
+
+openqa-validate-yaml - check YAML files against a schema
+
+=head1 SYNOPSIS
+
+openqa-validate-yaml [I<OPTIONS>] [-] [I<file> ...]
+
+=head1 DESCRIPTION
+
+B<openqa-validate-yaml>
+should be given a list of one or more filenames.
+The files are expected to be YAML files.
+B<openqa-validate-yaml>
+tests each item in the list to see
+if the files are valid when checked against a Schema.
+
+'-' can be specified instead of a filename
+to read the test input from STDIN.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<--validate-schema>
+
+Validate the Schema file itself, in addition to any YAML files.
+
+=item B<--schema-file>=I<SCHEMA>
+
+Specify the schema file or URL to validate against (default .../public/schema/JobTemplates-01.yaml)'],
+
+=item B<-h>
+
+Print a usage message, and exit.
+
+=back
+
+=head1 AUTHOR
+
+This manual page was written by Philip Hands <phil@hands.com>,
+for the Debian GNU/Linux system (but may be used by others).
+
+=cut
+
+
 use strict;
 use warnings;
 use 5.010;
--- openqa-4.6.1640268275.25ac0d7.orig/systemd/openqa-webui.service
+++ openqa-4.6.1640268275.25ac0d7/systemd/openqa-webui.service
@@ -4,6 +4,7 @@ Wants=apache2.service openqa-setup-db.se
 Before=apache2.service
 After=postgresql.service openqa-setup-db.service openqa-scheduler.service nss-lookup.target remote-fs.target
 Requires=openqa-livehandler.service openqa-websockets.service openqa-gru.service openqa-enqueue-asset-cleanup.timer openqa-enqueue-result-cleanup.timer openqa-enqueue-bug-cleanup.timer
+Documentation=https://open.qa/docs/#_run_the_web_ui
 
 [Service]
 User=geekotest
--- openqa-4.6.1640268275.25ac0d7.orig/systemd/openqa-worker@.service
+++ openqa-4.6.1640268275.25ac0d7/systemd/openqa-worker@.service
@@ -7,6 +7,7 @@ Description=openQA Worker #%i
 Wants=network.target
 After=openqa-slirpvde.service network.target nss-lookup.target remote-fs.target
 PartOf=openqa-worker.target
+Documentation=https://open.qa/docs/#_run_openqa_workers
 
 [Service]
 Type=simple
--- openqa-4.6.1640268275.25ac0d7.orig/t/43-cli-api.t
+++ openqa-4.6.1640268275.25ac0d7/t/43-cli-api.t
@@ -93,6 +93,10 @@ subtest 'Host' => sub {
     like $@, qr/Usage: openqa-cli api/, 'usage';
     is $api->host, 'https://openqa.opensuse.org', 'host';
 
+    eval { $api->run('--odn') };
+    like $@, qr/Usage: openqa-cli api/, 'usage';
+    is $api->host, 'https://openqa.debian.net', 'host';
+
     eval { $api->run(@host) };
     like $@, qr/Usage: openqa-cli api/, 'usage';
     is $api->host, $host, 'host';
--- openqa-4.6.1640268275.25ac0d7.orig/t/43-cli-archive.t
+++ openqa-4.6.1640268275.25ac0d7/t/43-cli-archive.t
@@ -77,6 +77,10 @@ subtest 'Host' => sub {
     like $@, qr/Usage: openqa-cli archive/, 'usage';
     is $archive->host, 'https://openqa.opensuse.org', 'host';
 
+    eval { $archive->run('--odn') };
+    like $@, qr/Usage: openqa-cli archive/, 'usage';
+    is $archive->host, 'http://openqa.debian.net', 'host';
+
     eval { $archive->run(@host) };
     like $@, qr/Usage: openqa-cli archive/, 'usage';
     is $archive->host, $host, 'host';
--- openqa-4.6.1640268275.25ac0d7.orig/templates/webapi/comments/add_comment_form_groups.html.ep
+++ openqa-4.6.1640268275.25ac0d7/templates/webapi/comments/add_comment_form_groups.html.ep
@@ -19,7 +19,7 @@
                 </p>
                 <ul>
                     <li>
-                        For bugreferences write <code><i>bugtracker_shortname</i>#<i>bug_nr</i></code> in a comment, e.g. <code>bsc#1234</code>.
+                        For bugreferences write <code><i>bugtracker_shortname</i>#<i>bug_nr</i></code> in a comment, e.g. <code>deb#1234</code>.
                     </li>
                     <li>
                         For generic labels use <code>label:<i>keyword</i></code> where <i>keyword</i> can be any valid character up to the next whitespace, e.g. "false_positive".
--- openqa-4.6.1640268275.25ac0d7.orig/tools/generate-packed-assets
+++ openqa-4.6.1640268275.25ac0d7/tools/generate-packed-assets
@@ -35,6 +35,8 @@ ASSETPACK_PLUGINS=$(grep 'AssetPack' lib
 BUILD_CACHE="plugin AssetPack => { pipes => [qw(${ASSETPACK_PLUGINS})]} and app->asset->process()"
 BUILD_CACHE_OPTS='-Ilib/ -MMojolicious::Lite'
 
+MISSING=0
+
 generate() {
     # shellcheck disable=SC2039
     for _ in {1..3}; do
@@ -42,8 +44,15 @@ generate() {
         env MOJO_MODE="$1" perl $BUILD_CACHE_OPTS -e "$BUILD_CACHE" > /dev/null && return 0
         sleep 1
     done
+    MISSING=1
 }
 
 # Possibly requires a retry in case of CDN failures
 generate "test"
 generate "development"
+
+if [ "$GENERATE_PACKED_ASSETS_FAILS_ON_MISSING_ASSETS" ]; then
+    # for Debian packaging, fail at this point if any assets are missing
+    exit $MISSING
+fi
+exit 0
