The Debian packaging of OCRmyPDF is maintained using dgit.  For the
sake of an efficient workflow, Debian modifications to the upstream
source are squashed into a single diff, rather than a series of quilt
patches.  To obtain a patch queue for package version 1.2.3-1:

    # apt-get install dgit
    % dgit clone ocrmypdf
    % cd ocrmypdf
    % git log --oneline 1.2.3..debian/1.2.3-1 -- . ':!debian'

See dgit(1), dgit(7) and dgit-maint-merge(7) for more information.
--- ocrmypdf-8.0.1+dfsg.orig/docs/index.rst
+++ ocrmypdf-8.0.1+dfsg/docs/index.rst
@@ -16,7 +16,6 @@ PDF is the best format for storing and e
 
    introduction
    release_notes
-   installation
    languages
    jbig2
 
--- ocrmypdf-8.0.1+dfsg.orig/docs/languages.rst
+++ ocrmypdf-8.0.1+dfsg/docs/languages.rst
@@ -7,10 +7,7 @@ OCRmyPDF uses Tesseract for OCR, and rel
 
 Tesseract supports `most languages <https://github.com/tesseract-ocr/tesseract/blob/master/doc/tesseract.1.asc#languages>`_.
 
-For Linux users, you can often find packages that provide language packs:
-
-Debian and Ubuntu users
------------------------
+You can often find packages that provide language packs:
 
 .. code-block:: bash
 
@@ -22,55 +19,3 @@ Debian and Ubuntu users
 
 You can then pass the ``-l LANG`` argument to OCRmyPDF to give a hint as to what languages it should search for. Multiple
 languages can be requested using either ``-l eng+fre`` (English and French) or ``-l eng -l fre``.
-
-Fedora users
-------------
-
-.. code-block:: bash
-
-   # Display a list of all Tesseract language packs
-   dnf search tesseract
-
-   # Install Chinese Simplified language pack
-   dnf install tesseract-langpack-chi_sim
-
-You can then pass the ``-l LANG`` argument to OCRmyPDF to give a hint as to
-what languages it should search for. Multiple languages can be requested using
-either ``-l eng+fre`` (English and French) or ``-l eng -l fre``.
-
-macOS users
------------
-
-You can install additional language packs by :ref:`installing Tesseract using Homebrew with all language packs <macos-all-languages>`.
-
-Docker users
-------------
-
-Users of the Docker image may use the alternative :ref:`"polyglot" container <docker-polyglot>` which includes all languages.
-
-Adding individual language packs to a Docker image
-""""""""""""""""""""""""""""""""""""""""""""""""""
-
-If you wish to add a single language pack, you could do the following:
-
-* Download the desired ``.trainedata`` file from the `tessdata <https://github.com/tesseract-ocr/tessdata>`_ repository. Let's use Hebrew in this example (``heb.traineddata``)
-
-* Copy the file to ``/home/user/downloads/heb.traineddata``.
-
-* Create a new container based on the ocrmypdf-tess4 image and jump into it with a terminal:
-
-.. code-block:: bash
-
-	host$ docker run  -v /home/user/downloads:/home/docker -it --entrypoint /bin/bash ocrmypdf-tess4
-
-* Put the file where Tesseract expects it:
-
-.. code-block:: bash
-
-	docker$ cp /home/docker/heb.traineddata /usr/share/tesseract-ocr/tessdata
-
-* Note the container id, and save it as a new image (in this example, ``ocrmypdf-tess4-heb``)
-
-.. code-block:: bash
-
-    host$ docker commit <container_id> ocrmypdf-tess4-heb
--- ocrmypdf-8.0.1+dfsg.orig/setup.py
+++ ocrmypdf-8.0.1+dfsg/setup.py
@@ -240,7 +240,6 @@ setup(
         'cffi >= 1.9.1',        # to build the leptonica module
         'pytest-runner',        # to enable python setup.py test
         'setuptools_scm',       # so that version will work
-        'setuptools_scm_git_archive'    # enable version from github tarballs
     ],
     use_scm_version={'version_scheme': 'post-release'},
     cffi_modules=[
--- ocrmypdf-8.0.1+dfsg.orig/src/ocrmypdf/__main__.py
+++ ocrmypdf-8.0.1+dfsg/src/ocrmypdf/__main__.py
@@ -133,17 +133,17 @@ your PDF, use --output-type pdf.
 
 If OCRmyPDF is given an image file as input, it will attempt to convert the
 image to a PDF before processing.  For more control over the conversion of
-images to PDF, use the Python package img2pdf or other image to PDF software.
+images to PDF, use img2pdf, or other image to PDF software.
 
 For example, this command uses img2pdf to convert all .png files beginning
 with the 'page' prefix to a PDF, fitting each image on A4-sized paper, and
-sending the result to OCRmyPDF through a pipe.  img2pdf is a dependency of
-ocrmypdf so it is already installed.
+sending the result to OCRmyPDF through a pipe.
 
     img2pdf --pagesize A4 page*.png | ocrmypdf - myfile.pdf
 
-Online documentation is located at:
-    https://ocrmypdf.readthedocs.io/en/latest/introduction.html
+HTML documentation is located at:
+    /usr/share/doc/ocrmypdf/html/index.html
+after installing the ocrmypdf-doc package.
 
 """,
 )
--- ocrmypdf-8.0.1+dfsg.orig/tests/test_metadata.py
+++ ocrmypdf-8.0.1+dfsg/tests/test_metadata.py
@@ -322,43 +322,3 @@ def test_metadata_fixup_warning(resource
         context=context,
     )
     log.warning.assert_called_once()
-
-
-def test_prevent_gs_invalid_xml(resources, outdir):
-    from ocrmypdf.__main__ import parser
-    from ocrmypdf._pipeline import convert_to_pdfa
-    from ocrmypdf.pdfa import generate_pdfa_ps
-    from ocrmypdf.pdfinfo import PdfInfo
-
-    generate_pdfa_ps(outdir / 'pdfa.ps')
-    input_files = [
-        str(outdir / 'layers.rendered.pdf'),
-        str(outdir / 'pdfa.ps'),
-    ]
-    copyfile(resources / 'enron1.pdf', outdir / 'layers.rendered.pdf')
-    log = logging.getLogger()
-    context = JobContext()
-
-    options = parser.parse_args(args=[
-        '-j', '1', '--output-type', 'pdfa-2', 'a.pdf', 'b.pdf']
-    )
-    context.options = options
-    context.pdfinfo = PdfInfo(resources / 'enron1.pdf')
-
-    convert_to_pdfa(
-        input_files_groups=input_files,
-        output_file=outdir / 'pdfa.pdf',
-        log=log,
-        context=context
-    )
-
-    with open(outdir / 'pdfa.pdf', 'rb') as f:
-        with mmap.mmap(f.fileno(), 0, flags=mmap.MAP_PRIVATE, prot=mmap.PROT_READ) as mm:
-            # Since the XML may be invalid, we scan instead of actually feeding it
-            # to a parser.
-            XMP_MAGIC = b'W5M0MpCehiHzreSzNTczkc9d'
-            xmp_start = mm.find(XMP_MAGIC)
-            xmp_end = mm.rfind(b'<?xpacket end', xmp_start)
-            assert 0 < xmp_start < xmp_end
-            assert mm.find(b'&#0;', xmp_start, xmp_end) == -1, "found escaped nul"
-            assert mm.find(b'\x00', xmp_start, xmp_end) == -1
