← Back to team overview

ubuntu-packaging-guide-team team mailing list archive

[Merge] lp:~mfo/ubuntu-packaging-guide/ubuntu-packaging-guide into lp:ubuntu-packaging-guide

 

Mauricio Faria de Oliveira has proposed merging lp:~mfo/ubuntu-packaging-guide/ubuntu-packaging-guide into lp:ubuntu-packaging-guide.

Commit message:
Updates for bzr dh-make and Focal (LP: #1954595)

Requested reviews:
  Ubuntu Packaging Guide Team (ubuntu-packaging-guide-team)
Related bugs:
  Bug #1954595 in Ubuntu Packaging Guide: "bzr dh-make crash - no attribute 'initialize_on_transport'"
  https://bugs.launchpad.net/ubuntu-packaging-guide/+bug/1954595

For more details, see:
https://code.launchpad.net/~mfo/ubuntu-packaging-guide/ubuntu-packaging-guide/+merge/423560

Chapter `Packaging New Software` needs updates for Ubuntu Focal,
regarding the ``bzr dh-make`` subcommand and some other steps.

-- 
Your team Ubuntu Packaging Guide Team is requested to review the proposed merge of lp:~mfo/ubuntu-packaging-guide/ubuntu-packaging-guide into lp:ubuntu-packaging-guide.
=== modified file 'ubuntu-packaging-guide/packaging-new-software.rst'
--- ubuntu-packaging-guide/packaging-new-software.rst	2018-01-04 09:48:28 +0000
+++ ubuntu-packaging-guide/packaging-new-software.rst	2022-05-27 17:09:18 +0000
@@ -33,7 +33,8 @@
 to prepare for compilation.
 
 This will check for the required build dependencies. As ``hello`` is a simple
-example, ``build-essential`` should provide everything we need. For more
+example, ``build-essential`` should provide everything we need (and, in more
+recent Ubuntu releases, e.g., 20.04, the ``texinfo`` package also).  For more
 complex programs, the command will fail if you do not have the needed libraries
 and development files. Install the needed packages and repeat until the command
 runs successfully.::
@@ -60,6 +61,10 @@
     $ cd ..
     $ bzr dh-make hello 2.10 hello-2.10.tar.gz
 
+Note: unfortunately the ``bzr dh-make`` subcommand is no longer available in
+releases later than Ubuntu 20.04; so, you might need a container or virtual
+machine (see `LXD <LXD_>`_) running Ubuntu 20.04 for this particular step.
+
 When it asks what type of package type ``s`` for single binary. This will import
 the code into a branch and add the ``debian/`` packaging directory.  Have a look
 at the contents.  Most of the files it adds are only needed for specialist
@@ -90,6 +95,11 @@
 
     Build-Depends: debhelper (>= 9)
 
+Or, in more recent Ubuntu releases (e.g., Ubuntu 20.04), append ``texinfo``,
+as noted earlier::
+
+    Build-Depends: debhelper-compat (= 12), texinfo
+
 You will also need to fill in a description of the program in the
 ``Description:`` field.
 
@@ -113,7 +123,8 @@
 All of these file are explained in more detail in the :doc:`overview of the
 debian directory<./debian-dir-overview>` article.
 
-Finally commit the code to your packaging branch::
+Finally commit the code to your packaging branch (make sure to ``bzr add``
+any files that changed; for example, ``debian/source/format``)::
 
     $ bzr add debian/source/format
     $ bzr commit -m "Initial commit of Debian packaging."
@@ -131,6 +142,14 @@
 The ``-us -uc`` tell it there is no need to GPG sign the package.  The result
 will be placed in ``..``.
 
+Note: if it fails with ``You must run ./configure before running 'make'.``,
+add this to ``debian/rules`` (make sure to ``bzr add/commit`` it) and retry
+``bzr builddeb``::
+
+    override_dh_auto_clean:
+            [ -f Makefile ] || ./configure
+            dh_auto_clean
+
 You can view the contents of the package with::
 
     $ lesspipe hello_2.10-0ubuntu1_amd64.deb
@@ -236,3 +255,4 @@
 .. _WNPP: http://www.debian.org/devel/wnpp/
 .. _DevRef: http://www.debian.org/doc/manuals/developers-reference/pkgs.html#newpackage
 .. _NewPackages: https://wiki.ubuntu.com/UbuntuDevelopment/NewPackages
+.. _LXD: https://linuxcontainers.org/lxd/


Follow ups