Public bug reported:
I'm using 2.6.24-16.30 and altering it for gNewSense.
The file debian/binary-custom.d/xen/patchset/001-xen-base.patch contains
patches to include files such as drivers/char/Kconfig.orig.
Our scripts alter drivers/char/Kconfig. This leads to the following:
1) Our scripts alter drivers/char/Kconfig
2) main bits build successfully
3) Xen custom-build starts
4) patch -p1 -d SOMETHING <
debian/binary-custom.d/xen/patchset/001-xen-base.patch
4.1) Patch of drivers/char/Kconfig succeeds, but at a offset.
drivers/char/Kconfig.orig is created
4.2) Patch of drivers/char/Kconfig.orig fails, as the file already exists
5) patch returns non-zero
6) build fails
This is obviously bad, as it makes the build much more brittle for
anyone who's altering the kernel.
Repo from a vanilla 2.6.24-16.30 (using /tmp/t as a tmpdir):
$ perl -i -ne 'BEGIN{$p=1} if(/^config
('COMPUTONE')$/){$p=0}elsif(/^(config|endmenu|source|endif)/){$p=1}; print if
$p' ./drivers/char/Kconfig
$ find . \( -path ./debian -o -path ./.git -o -name .gitignore \) -prune -o
-print | cpio -dumpl /tmp/t
$ patch -p1 -d /tmp/t < debian/binary-custom.d/xen/patchset/001-xen-base.patch
.
.
.
patching file drivers/char/agp/intel-agp.c
patching file drivers/char/Kconfig
Hunk #1 succeeded at 578 (offset -15 lines).
The next patch would create the file drivers/char/Kconfig.orig,
which already exists! Assume -R? [n]
Affected files:
$ grep -a '^+++.*\.orig'
./debian/binary-custom.d/xen/patchset/001-xen-base.patch | awk '{print $2}'
ubuntu-hardy-xen/arch/x86/Kconfig.debug.orig
ubuntu-hardy-xen/arch/x86/Kconfig.orig
ubuntu-hardy-xen/arch/x86/kernel/Makefile_32.orig
ubuntu-hardy-xen/arch/x86/kvm/Kconfig.orig
ubuntu-hardy-xen/drivers/char/Kconfig.orig
ubuntu-hardy-xen/drivers/char/mem.c.orig
ubuntu-hardy-xen/include/linux/sched.h.orig
ubuntu-hardy-xen/include/linux/skbuff.h.orig
ubuntu-hardy-xen/kernel/sysctl.c.orig
ubuntu-hardy-xen/mm/memory.c.orig
Suggested fix:
Remove the above files from the patch
Workaround:
sed -i 's/\(patch -p1\)/\1 --no-backup-if-mismatch/'
debian/rules.d/6-binary-custom.mk
(I'm still waiting for the build to finish on this, but this seems to work)
** Affects: linux (Ubuntu)
Importance: Undecided
Status: New
--
2.6.24-16: Xen patches contain unnessecary Kconfig.orig (causes compile
failures)
https://bugs.launchpad.net/bugs/223175
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs