Avoid using fakeroot for rebuilding packages

For parallel builds, fakeroot limits actual concurrency a lot.  In
other cases it's still an unnecessary complication that slows things
down.

- Where appropriate, use dpkg-buildpackage instead.
- Otherwise, since src:linux has had "Rules-Requires-Root: no" since
  before buster, use DEB_RULES_REQUIRES_ROOT=no instead.  (Without
  either this or fakeroot, some debhelper commands would complain.)
- Remove fakeroot from lists of packages to be installed.
This commit is contained in:
Ben Hutchings 2023-05-01 23:39:45 +02:00
parent 6269f97f90
commit 3eb60d93a2
4 changed files with 37 additions and 38 deletions

View file

@ -278,7 +278,7 @@ Run the following commands:
</para>
<variablelist>
<varlistentry>
<term><prompt>#</prompt> <userinput>apt-get install build-essential fakeroot</userinput></term>
<term><prompt>#</prompt> <userinput>apt-get install build-essential</userinput></term>
<term><prompt>#</prompt> <userinput>apt-get build-dep linux</userinput></term>
<listitem>
<para>
@ -437,7 +437,7 @@ To change the configuration before building, for example for the 686-pae
flavour on i386, run the commands:
</para>
<screen>
<prompt>$</prompt> <userinput>fakeroot make -f debian/rules.gen setup_i386_none_686-pae</userinput>
<prompt>$</prompt> <userinput>make -f debian/rules.gen setup_i386_none_686-pae</userinput>
<prompt>$</prompt> <userinput>make -C debian/build/build_i386_none_686-pae nconfig</userinput>
</screen>
</section>
@ -447,19 +447,19 @@ flavour on i386, run the commands:
To build all possible packages for this architecture, run:
</para>
<screen>
<prompt>$</prompt> <userinput>fakeroot debian/rules binary</userinput>
<prompt>$</prompt> <userinput>dpkg-buildpackage -b -nc -uc</userinput>
</screen>
<para>
To build all architecture-dependent packages, run:
</para>
<screen>
<prompt>$</prompt> <userinput>fakeroot debian/rules binary-arch</userinput>
<prompt>$</prompt> <userinput>dpkg-buildpackage -B -nc -uc</userinput>
</screen>
<para>
To build all architecture-independent packages, run:
</para>
<screen>
<prompt>$</prompt> <userinput>fakeroot debian/rules binary-indep</userinput>
<prompt>$</prompt> <userinput>dpkg-buildpackage -A -nc -uc</userinput>
</screen>
</section>
@ -469,8 +469,8 @@ For example, to build only the binary packages for 686-pae flavour on i386
architecture, use the following commands:
</para>
<screen>
<prompt>$</prompt> <userinput>fakeroot debian/rules source</userinput>
<prompt>$</prompt> <userinput>fakeroot make -f debian/rules.gen binary-arch_i386_none_686-pae</userinput>
<prompt>$</prompt> <userinput>debian/rules source</userinput>
<prompt>$</prompt> <userinput>DEB_RULES_REQUIRES_ROOT=no make -f debian/rules.gen binary-arch_i386_none_686-pae</userinput>
</screen>
<para>
The target in this command has the general form of
@ -482,8 +482,8 @@ need the <package>linux-headers-<replaceable>version</replaceable>-common</packa
binary package, which can be built using the commands:
</para>
<screen>
<prompt>$</prompt> <userinput>fakeroot debian/rules source</userinput>
<prompt>$</prompt> <userinput>fakeroot make -f debian/rules.gen binary-arch_i386_none_real</userinput>
<prompt>$</prompt> <userinput>debian/rules source</userinput>
<prompt>$</prompt> <userinput>DEB_RULES_REQUIRES_ROOT=no make -f debian/rules.gen binary-arch_i386_none_real</userinput>
</screen>
<para>
The target in this command has the general form of
@ -500,7 +500,7 @@ version:
</para>
<variablelist>
<varlistentry>
<term><prompt>#</prompt> <userinput>apt-get install build-essential fakeroot rsync git</userinput></term>
<term><prompt>#</prompt> <userinput>apt-get install build-essential rsync git</userinput></term>
<term><prompt>#</prompt> <userinput>apt-get build-dep linux</userinput></term>
<listitem>
<para>
@ -551,7 +551,7 @@ of the various kernel flavours which can be built.
</listitem>
</varlistentry>
<varlistentry>
<term><prompt>$</prompt> <userinput>fakeroot debian/rules <replaceable>target</replaceable></userinput></term>
<term><prompt>$</prompt> <userinput>DEB_RULES_REQUIRES_ROOT=no debian/rules <replaceable>target</replaceable></userinput></term>
<listitem>
<para>
Finally, build binary packages as explained in <xref

View file

@ -120,7 +120,7 @@ If the kernel ABI has changed you must then change the ABI name in
<filename>debian/config/defines</filename>. Then run the command
</para>
<screen>
<prompt>$</prompt> <userinput>fakeroot debian/rules debian/control-real</userinput>
<prompt>$</prompt> <userinput>debian/rules debian/control-real</userinput>
</screen>
<para>
to regenerate the package definitions for this ABI name.

1
debian/changelog vendored
View file

@ -6,6 +6,7 @@ kernel-handbook (1.0.21) UNRELEASED; urgency=medium
- Deprecate older versions of test-patches
- Recommend changing ABI name before rebuilding
- Add command to enable parallel builds when invoking make directly
- Avoid using fakeroot
* Remove obsolete text referring to "patchlevels" in source packages
* Remove redundant "bash" from debian/bin/test-patches command lines
* Update instructions for disabling debug info (Closes: #1023773)

View file

@ -1704,8 +1704,8 @@ msgstr ""
#. type: Content of: <chapter><section><section><screen>
#: chapter-versions.dbk:112
#, no-wrap
msgid "<prompt>$</prompt> <userinput>fakeroot debian/rules debian/control-real</userinput>\n"
msgstr "<prompt>$</prompt> <userinput>fakeroot debian/rules debian/control-real</userinput>\n"
msgid "<prompt>$</prompt> <userinput>debian/rules debian/control-real</userinput>\n"
msgstr "<prompt>$</prompt> <userinput>debian/rules debian/control-real</userinput>\n"
#. type: Content of: <chapter><section><section><para>
#: chapter-versions.dbk:115
@ -1908,11 +1908,9 @@ msgstr "次のコマンドを実行します:"
#. type: Content of: <chapter><section><section><variablelist><varlistentry><term>
#: chapter-common-tasks.dbk:34
msgid ""
"<prompt>#</prompt> <userinput>apt-get install build-essential fakeroot</"
"userinput>"
"<prompt>#</prompt> <userinput>apt-get install build-essential</userinput>"
msgstr ""
"<prompt>#</prompt> <userinput>apt-get install build-essential fakeroot</"
"userinput>"
"<prompt>#</prompt> <userinput>apt-get install build-essential</userinput>"
#. type: Content of: <chapter><section><variablelist><varlistentry><term>
#: chapter-common-tasks.dbk:35 chapter-common-tasks.dbk:221
@ -2133,10 +2131,10 @@ msgstr ""
#: chapter-common-tasks.dbk:153
#, no-wrap
msgid ""
"<prompt>$</prompt> <userinput>fakeroot make -f debian/rules.gen setup_i386_none_686-pae</userinput>\n"
"<prompt>$</prompt> <userinput>make -f debian/rules.gen setup_i386_none_686-pae</userinput>\n"
"<prompt>$</prompt> <userinput>make -C debian/build/build_i386_none_686-pae nconfig</userinput>\n"
msgstr ""
"<prompt>$</prompt> <userinput>fakeroot make -f debian/rules.gen setup_i386_none_686-pae</userinput>\n"
"<prompt>$</prompt> <userinput>make -f debian/rules.gen setup_i386_none_686-pae</userinput>\n"
"<prompt>$</prompt> <userinput>make -C debian/build/build_i386_none_686-pae nconfig</userinput>\n"
#. type: Content of: <chapter><section><section><para>
@ -2164,8 +2162,8 @@ msgstr ""
#. type: Content of: <chapter><section><section><screen>
#: chapter-common-tasks.dbk:167
#, no-wrap
msgid "<prompt>$</prompt> <userinput>fakeroot debian/rules binary</userinput>\n"
msgstr "<prompt>$</prompt> <userinput>fakeroot debian/rules binary</userinput>\n"
msgid "<prompt>$</prompt> <userinput>dpkg-buildpackage -b -nc -uc</userinput>\n"
msgstr "<prompt>$</prompt> <userinput>dpkg-buildpackage -b -nc -uc</userinput>\n"
#. type: Content of: <chapter><section><section><para>
#: chapter-common-tasks.dbk:170
@ -2177,8 +2175,8 @@ msgstr ""
#. type: Content of: <chapter><section><section><screen>
#: chapter-common-tasks.dbk:173
#, no-wrap
msgid "<prompt>$</prompt> <userinput>fakeroot debian/rules binary-arch</userinput>\n"
msgstr "<prompt>$</prompt> <userinput>fakeroot debian/rules binary-arch</userinput>\n"
msgid "<prompt>$</prompt> <userinput>dpkg-buildpackage -B -nc -uc</userinput>\n"
msgstr "<prompt>$</prompt> <userinput>dpkg-buildpackage -B -nc -uc</userinput>\n"
#. type: Content of: <chapter><section><section><para>
#: chapter-common-tasks.dbk:176
@ -2190,8 +2188,8 @@ msgstr ""
#. type: Content of: <chapter><section><section><screen>
#: chapter-common-tasks.dbk:179
#, no-wrap
msgid "<prompt>$</prompt> <userinput>fakeroot debian/rules binary-indep</userinput>\n"
msgstr "<prompt>$</prompt> <userinput>fakeroot debian/rules binary-indep</userinput>\n"
msgid "<prompt>$</prompt> <userinput>dpkg-buildpackage -A -nc -uc</userinput>\n"
msgstr "<prompt>$</prompt> <userinput>dpkg-buildpackage -A -nc -uc</userinput>\n"
#. type: Content of: <chapter><section><section><title>
#: chapter-common-tasks.dbk:183
@ -2211,11 +2209,11 @@ msgstr ""
#: chapter-common-tasks.dbk:189
#, no-wrap
msgid ""
"<prompt>$</prompt> <userinput>fakeroot debian/rules source</userinput>\n"
"<prompt>$</prompt> <userinput>fakeroot make -f debian/rules.gen binary-arch_i386_none_686-pae</userinput>\n"
"<prompt>$</prompt> <userinput>debian/rules source</userinput>\n"
"<prompt>$</prompt> <userinput>DEB_RULES_REQUIRES_ROOT=no make -f debian/rules.gen binary-arch_i386_none_686-pae</userinput>\n"
msgstr ""
"<prompt>$</prompt> <userinput>fakeroot debian/rules source</userinput>\n"
"<prompt>$</prompt> <userinput>fakeroot make -f debian/rules.gen binary-arch_i386_none_686-pae</userinput>\n"
"<prompt>$</prompt> <userinput>debian/rules source</userinput>\n"
"<prompt>$</prompt> <userinput>DEB_RULES_REQUIRES_ROOT=no make -f debian/rules.gen binary-arch_i386_none_686-pae</userinput>\n"
#. type: Content of: <chapter><section><section><para>
#: chapter-common-tasks.dbk:193
@ -2244,11 +2242,11 @@ msgstr ""
#: chapter-common-tasks.dbk:202
#, no-wrap
msgid ""
"<prompt>$</prompt> <userinput>fakeroot debian/rules source</userinput>\n"
"<prompt>$</prompt> <userinput>fakeroot make -f debian/rules.gen binary-arch_i386_none_real</userinput>\n"
"<prompt>$</prompt> <userinput>debian/rules source</userinput>\n"
"<prompt>$</prompt> <userinput>DEB_RULES_REQUIRES_ROOT=no make -f debian/rules.gen binary-arch_i386_none_real</userinput>\n"
msgstr ""
"<prompt>$</prompt> <userinput>fakeroot debian/rules source</userinput>\n"
"<prompt>$</prompt> <userinput>fakeroot make -f debian/rules.gen binary-arch_i386_none_real</userinput>\n"
"<prompt>$</prompt> <userinput>debian/rules source</userinput>\n"
"<prompt>$</prompt> <userinput>DEB_RULES_REQUIRES_ROOT=no make -f debian/rules.gen binary-arch_i386_none_real</userinput>\n"
#. type: Content of: <chapter><section><section><para>
#: chapter-common-tasks.dbk:206
@ -2280,10 +2278,10 @@ msgstr ""
#. type: Content of: <chapter><section><variablelist><varlistentry><term>
#: chapter-common-tasks.dbk:220
msgid ""
"<prompt>#</prompt> <userinput>apt-get install build-essential fakeroot rsync "
"<prompt>#</prompt> <userinput>apt-get install build-essential rsync "
"git</userinput>"
msgstr ""
"<prompt>#</prompt> <userinput>apt-get install build-essential fakeroot rsync "
"<prompt>#</prompt> <userinput>apt-get install build-essential rsync "
"git</userinput>"
#. type: Content of: <chapter><section><variablelist><varlistentry><listitem><para>
@ -2372,10 +2370,10 @@ msgstr ""
#. type: Content of: <chapter><section><variablelist><varlistentry><term>
#: chapter-common-tasks.dbk:271
msgid ""
"<prompt>$</prompt> <userinput>fakeroot debian/rules <replaceable>target</"
"<prompt>$</prompt> <userinput>DEB_RULES_REQUIRES_ROOT=no debian/rules <replaceable>target</"
"replaceable></userinput>"
msgstr ""
"<prompt>$</prompt> <userinput>fakeroot debian/rules <replaceable>target</"
"<prompt>$</prompt> <userinput>DEB_RULES_REQUIRES_ROOT=no debian/rules <replaceable>target</"
"replaceable></userinput>"
#. type: Content of: <chapter><section><variablelist><varlistentry><listitem><para>