Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755078AbdLFKhn (ORCPT ); Wed, 6 Dec 2017 05:37:43 -0500 Received: from conssluserg-04.nifty.com ([210.131.2.83]:28101 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754965AbdLFKhk (ORCPT ); Wed, 6 Dec 2017 05:37:40 -0500 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com vB6AbQcN012672 X-Nifty-SrcIP: [209.85.213.52] X-Google-Smtp-Source: AGs4zMZg1rviEqnoQD3jSFmtsZWPOEHiBk5ho0MgzcqMeIJInudzr0pN30X8N9ITH2D/I2HVRfirJ4ZZeiwknN25W0A= MIME-Version: 1.0 In-Reply-To: References: <20171114123834.xsjiy2ynvott4gae@brain> <1511780854-7213-1-git-send-email-paolo.pisati@canonical.com> From: Masahiro Yamada Date: Wed, 6 Dec 2017 19:36:45 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3] scripts/package: snap-pkg target To: Jim Davis Cc: Paolo Pisati , Michal Marek , Behan Webster , Matthias Kaehlcke , =?UTF-8?Q?Vin=C3=ADcius_Tinti?= , linux-kbuild , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2011 Lines: 64 2017-12-06 6:23 GMT+09:00 Jim Davis : > On Tue, Dec 5, 2017 at 4:43 AM, Paolo Pisati 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