linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Jim Davis <jim.epost@gmail.com>
Cc: "Paolo Pisati" <paolo.pisati@canonical.com>,
	"Michal Marek" <michal.lkml@markovi.net>,
	"Behan Webster" <behanw@converseincode.com>,
	"Matthias Kaehlcke" <mka@chromium.org>,
	"Vinícius Tinti" <viniciustinti@gmail.com>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] scripts/package: snap-pkg target
Date: Wed, 6 Dec 2017 19:36:45 +0900	[thread overview]
Message-ID: <CAK7LNAToQjqUoA17jwvQzFzyijOP9HNGz8js3GREKTHd2NyyTw@mail.gmail.com> (raw)
In-Reply-To: <CA+r1ZhjW+OeTnCkffjMfoORx63h8PTNW91HVyvbqVWCpud0UiQ@mail.gmail.com>

2017-12-06 6:23 GMT+09:00 Jim Davis <jim.epost@gmail.com>:
> On Tue, Dec 5, 2017 at 4:43 AM, Paolo Pisati <paolo.pisati@canonical.com> wrote:
>
>>> I noticed that if I tried to make snap-pkg with the O=/some/dir option
>>> the tar step failed but the rest of the build continued, and seems to
>>> have finished successfully.  Should the snap-pkg target stop after a
>>> tar failure?
>>
>> That is weird, how did you do that?
>
> make O=/some/dir defconfig (or your-config-of-choice)
> make O=/some/dir snap-pkg
>
> The snap-pkg target is calling the src_tar command, which bails when
> $(objtree) isn't $(srctree).
>
> Is $(objtree) = $(srctree) a necessary restriction with snap builds?
> It's a restriction for rpm builds for some reason or another,

Rather, restriction for our build system.

Working directory is changed at the top Makefile if O= is given.
This option is propagated to sub-make.


> but I
> thought that was just a peculiarity of the rpm build process.  If the
> snap's tarball could be built without using src_tar, like the buildtar
> script does, then Bob's your uncle.

Probably, you must reset O=, KBUILD_OUTPUT, KBUILD_SRC, etc.
before calling rpmbuild, snapcraft, etc.

This is not a peculiarity of rpmbuild or snapcraft.

I guess things are not so simple as they look at a glance.



> Though if the source tree is an essential part of the snap build then
> perhaps the build should just exit if the tarball can't be generated
> for whatever reason, including users doing weird things :)
>

I agree, but this is not a problem specific to snap-pkg,
so Paolo's work will not be blocked.

I sent this patch:
https://patchwork.kernel.org/patch/10095377/



Just one question to Paolo:

  If some change like firmware removal happens in the future,
  patching for snapcraft is necessary?
    (i.e. users are required to upgrade snapcraft from --edge ?)

I guess the answer is yes, because "plugin: kernel" needs to know
the kernel-build system internal.

-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2017-12-06 10:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20171114123834.xsjiy2ynvott4gae@brain>
2017-11-27 11:07 ` [PATCH v3] scripts/package: snap-pkg target Paolo Pisati
2017-11-27 18:33   ` Jim Davis
2017-11-28 17:14     ` Paolo Pisati
2017-11-28 19:35       ` Jim Davis
2017-11-29  7:33         ` Masahiro Yamada
2017-11-29 17:05           ` Paolo Pisati
2017-11-30 23:15             ` Jim Davis
2017-12-05 11:43               ` Paolo Pisati
2017-12-05 21:23                 ` Jim Davis
2017-12-06 10:36                   ` Masahiro Yamada [this message]
2017-12-06 18:14                     ` Paolo Pisati
2017-12-07 15:31                       ` Masahiro Yamada
2017-12-12 15:08                         ` Masahiro Yamada
2017-12-01 12:03             ` Riku Voipio
2017-12-05 11:31               ` Paolo Pisati
2017-11-29 17:03         ` Paolo Pisati

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=CAK7LNAToQjqUoA17jwvQzFzyijOP9HNGz8js3GREKTHd2NyyTw@mail.gmail.com \
    --to=yamada.masahiro@socionext.com \
    --cc=behanw@converseincode.com \
    --cc=jim.epost@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=mka@chromium.org \
    --cc=paolo.pisati@canonical.com \
    --cc=viniciustinti@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).