From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [RFC kernel 6/6] d/rules: close race between 'cp' and module handling
Date: Tue, 15 Jun 2021 13:27:29 +0200 [thread overview]
Message-ID: <20210615112729.1099797-7-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20210615112729.1099797-1-f.gruenbichler@proxmox.com>
sometimes the build would fail with
cp: cannot stat 'ubuntu-hirsute/.tmp_1987275': No such file or directory
make[1]: *** [debian/rules:181: .headers_prepare_mark] Error 1
make[1]: Leaving directory '/home/fgruenbichler/pve-kernel/build'
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2
make: *** [Makefile:58: pve-kernel-5.11.21-1-pve_5.11.21-1_amd64.deb] Error 2
if copying was slow enough.
so let's do the copying first, then do the rest in parallel without
needing to worry about side-effects.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
Notes:
resulting debs show the same contents over a few rebuilds, but a
second pair of eyes does not hurt!
debian/rules | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/debian/rules b/debian/rules
index 0bd8eb5..6be3f18 100755
--- a/debian/rules
+++ b/debian/rules
@@ -114,6 +114,9 @@ binary: install
.config_mark:
cd ${KERNEL_SRC}; scripts/config ${PVE_CONFIG_OPTS}
${MAKE} -C ${KERNEL_SRC} oldconfig
+ # copy to allow building in parallel to kernel/module compilation without interference
+ rm -rf ${KERNEL_SRC_COPY}
+ cp -ar ${KERNEL_SRC} ${KERNEL_SRC_COPY}
touch $@
.compile_mark: .config_mark
@@ -179,9 +182,6 @@ binary: install
rm -rf debian/${PVE_HEADER_PKG}
mkdir -p debian/${PVE_HEADER_PKG}/usr/src/linux-headers-${KVNAME}
install -m 0644 ${KERNEL_SRC}/.config debian/${PVE_HEADER_PKG}/usr/src/linux-headers-${KVNAME}
- # copy to allow building in parallel to kernel/module compilation without interference
- rm -rf ${KERNEL_SRC_COPY}
- cp -ar ${KERNEL_SRC} ${KERNEL_SRC_COPY}
make -C ${KERNEL_SRC_COPY} mrproper
cd ${KERNEL_SRC_COPY}; find . -path './debian/*' -prune \
-o -path './include/*' -prune \
--
2.30.2
next prev parent reply other threads:[~2021-06-15 11:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-15 11:27 [pve-devel] [PATCH bullseye kernel 0/6] debug package and packaging/build cleanups Fabian Grünbichler
2021-06-15 11:27 ` [pve-devel] [PATCH kernel 1/6] build: keep unstripped kernel and module files Fabian Grünbichler
2021-06-15 11:27 ` [pve-devel] [PATCH kernel 2/6] d/rules: build perf with python3 Fabian Grünbichler
2021-06-15 11:27 ` [pve-devel] [PATCH kernel 3/6] d/control: provide linux-libc-dev with version Fabian Grünbichler
2021-06-15 11:27 ` [pve-devel] [PATCH kernel 4/6] d/control: remove references to 2.6 kernel Fabian Grünbichler
2021-06-15 11:27 ` [pve-devel] [PATCH kernel 5/6] d/control: wrap-and-sort Fabian Grünbichler
2021-06-15 11:27 ` Fabian Grünbichler [this message]
2021-06-15 12:34 ` [pve-devel] applied: [PATCH bullseye kernel 0/6] debug package and packaging/build cleanups Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210615112729.1099797-7-f.gruenbichler@proxmox.com \
--to=f.gruenbichler@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal