mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
	 Nicolas Schier <nicolas@fjasle.eu>,
	"Jan Alexander Steffens (heftig)" <heftig@archlinux.org>,
	 linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org
Subject: Re: [PATCH v2] kbuild: add script and target to generate pacman package
Date: Mon, 8 Jul 2024 22:00:39 +0200	[thread overview]
Message-ID: <005e1bca-0061-452e-b8ce-0b8e99bda757@t-8ch.de> (raw)
In-Reply-To: <20240708165342.GA2417540@thelio-3990X>

On 2024-07-08 09:53:42+0000, Nathan Chancellor wrote:
> On Mon, Jul 08, 2024 at 05:56:44PM +0200, Thomas Weißschuh wrote:
> > On 2024-07-07 22:50:46+0000, Nathan Chancellor wrote:
> > > On Sat, Jul 06, 2024 at 09:33:46AM +0200, Thomas Weißschuh wrote:

<snip>

> > > > diff --git a/scripts/package/PKGBUILD b/scripts/package/PKGBUILD
> > > > new file mode 100644
> > > > index 000000000000..fe899c77a976
> > > > --- /dev/null
> > > > +++ b/scripts/package/PKGBUILD
> > > > @@ -0,0 +1,83 @@
> > > > +# SPDX-License-Identifier: GPL-2.0-only
> > > > +# Maintainer: Thomas Weißschuh <linux@weissschuh.net>
> > > > +# Contributor: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
> > > > +
> > > > +pkgbase=linux-upstream
> > > > +pkgname=("$pkgbase" "$pkgbase-headers" "$pkgbase-api-headers")
> > > > +pkgver="${KERNELRELEASE//-/_}"
> > > > +pkgrel="$KBUILD_REVISION"
> > > > +pkgdesc='Linux'
> > > > +url='https://www.kernel.org/'
> > > > +arch=(any)
> > > 
> > > I see why you went this way but this feels a little dangerous because
> > > this means the package will be installable on architectures other than
> > > the one that it is built for. I think a better solution for this problem
> > > would be moving arch back to $UTS_MACHINE but setting CARCH to that same
> > > value in scripts/Makefile.package above. This diff works for me,
> > > allowing me to build an aarch64 package on x86_64:
> > 
> > This is what I used in v1 of the patch.
> 
> You had $UTS_MACHINE as arch but I don't see where CARCH was set for
> makepkg? If you tried to cross compile with v1, there was an error
> because the default CARCH value (the host) does not match the arch
> value, but explicitly passing CARCH to makepkg with $UTS_MACHINE should
> allow makepkg to build a package that is only installable on that
> machine?

Indeed.

> > But I felt that this only works by pure chance.
> 
> I don't think it is by pure chance, it should be entirely based off of the
> builder's ARCH value, no? I might be misunderstanding something though.

"Chance" for the fact that UTS_MACHINE and Arch Linux CARCH are
matching.

> > IMO users of this feature should know what they are doing.
> > 
> > That said, if anybody has strong opinions on this, I'll be happy to change it.
> 
> I don't feel strongly about it but I think this is different from pretty
> much all of the other package builds, which only build a package that is
> installable/usable on one archictecture, and the solution seems
> simple/robust enough.

I'll pick up your proposal and will send v3 with it and your tags.

      reply	other threads:[~2024-07-08 20:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-06  7:33 Thomas Weißschuh
2024-07-08  5:50 ` Nathan Chancellor
2024-07-08 15:56   ` Thomas Weißschuh
2024-07-08 16:53     ` Nathan Chancellor
2024-07-08 20:00       ` Thomas Weißschuh [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=005e1bca-0061-452e-b8ce-0b8e99bda757@t-8ch.de \
    --to=linux@weissschuh.net \
    --cc=heftig@archlinux.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    --cc=nicolas@fjasle.eu \
    /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

all inboxes | Powered by JetHome®