All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Christian Kujau <lists@nerdbynature.de>
Cc: Emese Revfy <re.emese@gmail.com>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Michal Marek <mmarek@suse.com>
Subject: Re: [4.8-rc1] make bindeb-pkg O= fails
Date: Sun, 14 Aug 2016 12:46:11 -0700	[thread overview]
Message-ID: <CAGXu5jLaPK5w=K-rQhJXB6VQ=bFcgEEEz8+cJGEDLzqDUzw3FQ@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.20.14.1608141150220.8131@trent.utfs.org>

On Sun, Aug 14, 2016 at 11:53 AM, Christian Kujau <lists@nerdbynature.de> 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?

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
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.



-- 
Kees Cook
Nexus Security

      parent reply	other threads:[~2016-08-14 19:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08 17:22 [4.8-rc1] make bindeb-pkg O= fails frank paulsen
2016-08-09  8:19 ` Christian Kujau
2016-08-09  8:19   ` Christian Kujau
     [not found]   ` <alpine.DEB.2.20.14.1608141150220.8131@trent.utfs.org>
2016-08-14 19:46     ` Kees Cook [this message]

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='CAGXu5jLaPK5w=K-rQhJXB6VQ=bFcgEEEz8+cJGEDLzqDUzw3FQ@mail.gmail.com' \
    --to=keescook@chromium.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lists@nerdbynature.de \
    --cc=mmarek@suse.com \
    --cc=re.emese@gmail.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.