Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754625AbaDOS1l (ORCPT ); Tue, 15 Apr 2014 14:27:41 -0400 Received: from gw-1.arm.linux.org.uk ([78.32.30.217]:35502 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751203AbaDOS1k (ORCPT ); Tue, 15 Apr 2014 14:27:40 -0400 Date: Tue, 15 Apr 2014 19:26:53 +0100 From: Russell King - ARM Linux To: Christoph Lameter Cc: Michal Marek , Vince Weaver , linux-kernel@vger.kernel.org, Jason Cooper , Grant Likely , Rob Herring Subject: Re: [bisected] broken make-kpkg kernel build in 3.15-rc1 Message-ID: <20140415182653.GR24070@n2100.arm.linux.org.uk> References: <534D4A59.6080401@suse.cz> <534D6510.3070509@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 15, 2014 at 12:22:51PM -0500, Christoph Lameter wrote: > On Tue, 15 Apr 2014, Michal Marek wrote: > > > > The problem is that the kernel build process should not write to anything > > > in the /etc/apt directory. > > > > Again: make install starts /sbin/installkernel and the rest is the job > > of this script. Which means you need to debug Debian's > > /sbin/installkernel why it suddenly wants to modify files in /etc/apt. > > Why then does reverting the patch fix the issue? > > Something in the patch causes install process to not divert correctly to > the install directory. It tries to go to the / directory instead. Right, so the thing to do is to run a build with the commit applied, without any -j arguments and V=1, logging the output (so that predictable output can be generated). Then run the same thing with the commit reverted, again logging it. Then diff the two and see what's different. I, too, can't see anything in that commit which would cause this regression. Looking at arch/x86/boot/install.sh, it contains these lines: if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi which will have the effect of running /sbin/installkernel. The Ubuntu /sbin/installkernel (which I assume is closely related to Debian's version) installs the kernel in the specified directory (indicated by $dir in the script), and then does this: run-parts --verbose --exit-on-error --arg="$ver" --arg="$dir/$img_dest-$ver" \ /etc/kernel/postinst.d which has the effect of running all hooks in /etc/kernel/postinst.d. One such hook is /etc/kernel/postinst.d/apt-auto-removal, which does this: eval $(apt-config shell APT_CONF_D Dir::Etc::parts/d) test -n "${APT_CONF_D}" || APT_CONF_D="/etc/apt/apt.conf.d" config_file=${APT_CONF_D}/01autoremove-kernels ... cat > "$config_file".dpkg-new <