From patchwork Sun Aug 14 19:46:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 9279759 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8DA7060839 for ; Sun, 14 Aug 2016 19:46:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E8BE289FA for ; Sun, 14 Aug 2016 19:46:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D19D28A21; Sun, 14 Aug 2016 19:46:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D655289FA for ; Sun, 14 Aug 2016 19:46:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751015AbcHNTqQ (ORCPT ); Sun, 14 Aug 2016 15:46:16 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:37418 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750845AbcHNTqP (ORCPT ); Sun, 14 Aug 2016 15:46:15 -0400 Received: by mail-wm0-f53.google.com with SMTP id i5so68719611wmg.0 for ; Sun, 14 Aug 2016 12:46:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=o1vHBu/ginG8UDJJcRojbUb4MwpSVJpvYelASe9+4is=; b=iR0y1nYKZ88x9TfdkNvnPq+55h6fyjG3GZ2MUE1rlcJ8lqIDxM7swdE91Nz2ASqYWi kElgmR1jBWmDbvWvisnfqF1/+mA41v97oecucT1O2wci6vcpswQtNkiX2YxWn7wKsbw5 l+DuI7A5+hI6sEOvdAwlWZoK6YRp03+Mc00aq5H6nLM5b36SpOhQXHEYIPM7o2B0IwuH aIcJlbTg5c/keRC1+b1Sj94MY6Rjbm+QUhUWFEtYXQSe5AjBYBmLDRUM+svFu3u2uiFI J9DPHM797kvKmAP47+1Sg9D1p9t5M7JJeOfrP8GtWyEcuimk1df8KXHNLn1XUyBzMdY6 eigg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=o1vHBu/ginG8UDJJcRojbUb4MwpSVJpvYelASe9+4is=; b=RrXLtpAHFwS6WztoJDgHEnkNkcueosv+Wncwy5DJrQZuIIHiJ9QoD+mUWXSp71eXia 1BLrVdLAjgfJ5ZCftefF+2kl+D/VuPhlo8BL76q6SvimyFjnu3YLJCVLV5JocQ4TUV3O +SKWquU6iplf5l/5lUeUwEt1rk09M5tFZxpRE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=o1vHBu/ginG8UDJJcRojbUb4MwpSVJpvYelASe9+4is=; b=eFZYrn1iT58hgGzMLhw00VuBsHv9m4QpD64UwWPs6wzA61HYg/12/ztRvenIe75pEP i60mPtD4ITHzTpPRnfoU2ZGWxHUHjCJ+36oruvI6Ertkio+2CsXPgWao0v6NJulAMIPw heb4J6RwN8PBNApgTLa67KxUaEewHMjeemV/FiZp1xedy0SIZhdOCygbFhirJa9pneOS Zf0h5mG12amT3fanhBLgQttmDRwQvrLQ1H4hhOXUKd5wiEBu2JyzFrIcUKbq+pL4GOJo 8trn3y7kAJ6qaDgagtz+omyVHH6riykn4al84lCa9tW4qGoOonQbAhZ0c0SdqrwMOoXw kWqg== X-Gm-Message-State: AEkoouuTFEujGrsP2WG0H+aaWRd7VydWV7JQZtfsKcITzE6fpeYR7IqO1F0gj9ShrlE4JFfLArcn1L3RtNJj1LMa X-Received: by 10.28.169.82 with SMTP id s79mr10788551wme.87.1471203972764; Sun, 14 Aug 2016 12:46:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.167.78 with HTTP; Sun, 14 Aug 2016 12:46:11 -0700 (PDT) In-Reply-To: References: From: Kees Cook Date: Sun, 14 Aug 2016 12:46:11 -0700 X-Google-Sender-Auth: W8ZF1S6C24f95jpLCForCoAl0iI Message-ID: Subject: Re: [4.8-rc1] make bindeb-pkg O= fails To: Christian Kujau Cc: Emese Revfy , linux-kbuild , LKML , Michal Marek Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Sun, Aug 14, 2016 at 11:53 AM, Christian Kujau wrote: > [CC'ing Michal, Kees] > > On Tue, 9 Aug 2016, Christian Kujau wrote: >> On Mon, 8 Aug 2016, frank paulsen wrote: >> > in 4.8-rc1 "make bindeb-pkg O=../debian" fails: >> > | find: `scripts/gcc-plugins': No such file or directory >> > | /usr/src/linus/scripts/package/Makefile:97: recipe for target >> > 'bindeb-pkg' failed >> > >> > this is due to a missing directory scripts/gcc-plugins if using O= >> > >> > removing line 335 of scripts/package/builddeb helps: >> > | (cd $objtree; find scripts/gcc-plugins -name \*.so -o -name >> > gcc-common.h) >> "$objtree/debian/hdrobjfiles" >> > >> > this clearly isn't the right fix, but i checked it anyway and the >> > paket gets built. >> >> This was introduced in 6b90bd4ba40b38dc13c2782469c1c77e4ed79915 ("GCC >> plugin infrastructure"). Not failing hard when scripts/gcc-plugins >> cannot be found, does the trick as well. But that too just papers over >> the issue. Hopefully Emese has a better idea on how to solve this :-) (Sorry for white-space damaging...) Does this fix it? gcc-common.h) >> "$objtree/debian/hdrobjfiles" +fi destdir=$kernel_headers_dir/usr/src/linux-headers-$version mkdir -p "$destdir" (cd $srctree; tar -c -f - -T -) < "$objtree/debian/hdrsrcfiles" | (cd $destdir; tar -xf -) (i.e. only attempt the find when CONFIG_GCC_PLUGINS has been selected in the .config) -Kees > > Emese, do you have a better approach here? > > Thanks, > Christian. > >> >> diff --git a/scripts/package/builddeb b/scripts/package/builddeb >> index e1c09e2..89757f6 100755 >> --- a/scripts/package/builddeb >> +++ b/scripts/package/builddeb >> @@ -332,7 +332,7 @@ if grep -q '^CONFIG_STACK_VALIDATION=y' >> $KCONFIG_CONFIG ; then >> (cd $objtree; find tools/objtool -type f -executable) >> >> "$objtree/debian/hdrobjfiles" >> fi >> (cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts >> -type f) >> "$objtree/debian/hdrobjfiles" >> -(cd $objtree; find scripts/gcc-plugins -name \*.so -o -name >> gcc-common.h) >> "$objtree/debian/hdrobjfiles" >> +(cd $objtree; find scripts/gcc-plugins -name \*.so -o -name >> gcc-common.h) >> "$objtree/debian/hdrobjfiles" || true >> destdir=$kernel_headers_dir/usr/src/linux-headers-$version >> mkdir -p "$destdir" >> (cd $srctree; tar -c -f - -T -) < "$objtree/debian/hdrsrcfiles" | (cd >> $destdir; tar -xf -) >> >> >> Thanks, >> Christian. > -- > BOFH excuse #382: > > Someone was smoking in the computer room and set off the halon systems. diff --git a/scripts/package/builddeb b/scripts/package/builddeb index e1c09e2f9be7..8ea9fd2b6573 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -332,7 +332,9 @@ if grep -q '^CONFIG_STACK_VALIDATION=y' $KCONFIG_CONFIG ; then (cd $objtree; find tools/objtool -type f -executable) >> "$objtree/debian/hdrobjfiles" fi (cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f) >> "$objtree/debian/hdrobjfiles" -(cd $objtree; find scripts/gcc-plugins -name \*.so -o -name gcc-common.h) >> "$objtree/debian/hdrobjfiles" +if grep -q '^CONFIG_GCC_PLUGINS=y' $KCONFIG_CONFIG ; then + (cd $objtree; find scripts/gcc-plugins -name \*.so -o -name