All we need is an easy explanation of the problem, so here it is.
When I am building a debian package, often many related packages that are bundled together are being build, and also the
foo-dbgsym-* versions and
For example, even relatively simple package such as
make, will build additional packages:
make-dbgsym_4.2.1-1.2_amd64.deb make-guile-dbgsym_4.2.1-1.2_amd64.deb make-guile_4.2.1-1.2_amd64.deb make_4.2.1-1.2_amd64.deb
Can I tell the build system to only build
make and not
Here is the process that I am using for building the package:
apt-get source make cd make* dpkg-buildpackage --build=binary --no-sign
Is there a general process how I can specify which packages I want to build?
Make is a simple example, but larger packages build many versions of package which I am not interested in, which need dependent libraries installed, and the build process takes longer.
How to solve :
I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.
dbgsym packages can be disabled using the
noautodbgsym build option:
DEB_BUILD_OPTIONS=noautodbgsym dpkg-buildpackage -us -uc
It’s also possible to build only architecture-dependent or architecture-independent packages, by changing the
--build option on
Other than that, there’s no generalised way of picking and choosing packages to build and dependencies to install. In particular, build dependencies aren’t tied to the binary packages they are relevant for.
Some packages support build profiles; you can determine that by looking for
Build-Profiles and/or angle-bracketed dependencies in
debian/control. On such packages,
-P option selects the appropriate profile(s), sometimes in combination with a build option. For example, on packages with a
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -Pnocheck
will skip the testing-related build-dependencies (if any) and skip running the tests.
In fact, the latest version of the
make package purports to provide a
noguile build profile, so it should be possible to skip Guile with
dpkg-buildpackage -Pnoguile -us -uc
except that the profile definition is incomplete.
It is always possible to edit
debian/control to remove irrelevant packages, and
debian/rules to remove irrelevant build steps.
Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂