Neon/Locally build packages: Difference between revisions

From KDE Community Wiki
mNo edit summary
(Added known false negatives and tidied up existing content to be more clear.)
Line 3: Line 3:
= Prerequisites =
= Prerequisites =


* A pre-existing KDE [https://community.kde.org/Get_Involved/development development environment]
* A pre-existing KDE [https://community.kde.org/Get_Involved/development development environment].
* <code>dpkg-dev</code> package will include the standard debian toolchain for building packages.
* <code>dpkg-dev</code> package will include the standard debian toolchain for building packages.


Line 11: Line 11:
# Create a <code>usr/share/locale</code> to simulate CI locale injection, <code>mkdir -p usr/share/locale && touch usr/share/locale/stub</code>
# Create a <code>usr/share/locale</code> to simulate CI locale injection, <code>mkdir -p usr/share/locale && touch usr/share/locale/stub</code>
# Remove symbols to simulate CI removing the symbol files, <code>rm debian/*.symbols</code>
# Remove symbols to simulate CI removing the symbol files, <code>rm debian/*.symbols</code>
# Change debian/source/format to use native instead of quilt, <code>sed -i 's/quilt/native/' debian/source/format</code>
Or in one command:
<code>mkdir -p usr/share/locale && touch usr/share/locale/stub && rm -f debian/*.symbols && sed -i 's/quilt/native/' debian/source/format</code>


= Building the package =
= Building the package =


Because a tarball does not exist, you will need to tell the package builder to not clean the environment before build <code>-nc</code>. It's helpful to further clean the environment after <code>-tc</code> for easier git usage for committing content. To do this, run:
Use your favorite tool:
* <code>dpkg-buildpackage</code>
* <code>debuild</code>


<code>dpkg-buildpackage -nc -tc</code>
= Known false negatives =


Alternatively, change the contents of <code>debian/source/format</code> to <code>native</code> and the tooling can be used without specifying options like <code>-nc</code>.
* Complaints about dsc and missing key.
* Lintian returns <code>malformed-debian-changelog-version</code>.

Revision as of 10:38, 17 December 2020

This page describes some basics in taking a package from https://invent.kde.org/neon/ and building it locally. This can be useful for doing local testing before committing changes.

Prerequisites

  • A pre-existing KDE development environment.
  • dpkg-dev package will include the standard debian toolchain for building packages.

Setting up local files for building package

  1. Clone the package repository repository, i.e. https://invent.kde.org/neon/kde/libkdegames
  2. Copy the source tree from your kde sources to where the debian/ path resides.
  3. Create a usr/share/locale to simulate CI locale injection, mkdir -p usr/share/locale && touch usr/share/locale/stub
  4. Remove symbols to simulate CI removing the symbol files, rm debian/*.symbols
  5. Change debian/source/format to use native instead of quilt, sed -i 's/quilt/native/' debian/source/format

Or in one command: mkdir -p usr/share/locale && touch usr/share/locale/stub && rm -f debian/*.symbols && sed -i 's/quilt/native/' debian/source/format

Building the package

Use your favorite tool:

  • dpkg-buildpackage
  • debuild

Known false negatives

  • Complaints about dsc and missing key.
  • Lintian returns malformed-debian-changelog-version.