Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Oct 2019 09:08:48 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Ian Lepore <ian@freebsd.org>
Cc:        Emmanuel Vadot <manu@bidouilliste.com>, Glen Barber <gjb@freebsd.org>,  src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>,  svn-src-head <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r352520 - head/usr.sbin/pkg
Message-ID:  <CANCZdfrYjpUkVcYcV_81zd5DSh=BunTfF8Z2mhZLu22vY4xwWA@mail.gmail.com>
In-Reply-To: <955b9ea8c0a578a422acd508fa98db9af04850ce.camel@freebsd.org>
References:  <201909191643.x8JGhCJu089738@repo.freebsd.org> <20191008122652.63c1a55e76fca9c202e50f8e@bidouilliste.com> <955b9ea8c0a578a422acd508fa98db9af04850ce.camel@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 8, 2019 at 8:22 AM Ian Lepore <ian@freebsd.org> wrote:

> On Tue, 2019-10-08 at 12:26 +0200, Emmanuel Vadot wrote:
> >  Hi Glen,
> >
> > On Thu, 19 Sep 2019 16:43:12 +0000 (UTC)
> > Glen Barber <gjb@FreeBSD.org> wrote:
> >
> > > Author: gjb
> > > Date: Thu Sep 19 16:43:12 2019
> > > New Revision: 352520
> > > URL: https://svnweb.freebsd.org/changeset/base/352520
> > >
> > > Log:
> > >   Apply r346792 (cperciva) from stable/12 to head.  The original commit
> > >   message:
> > >
> > >    On non-x86 systems, use "quarterly" packages.
> > >
> > >    x86 architectures have "latest" package builds on stable/*, so keep
> using
> > >    those (they'll get switched over to "quarterly" during releases).
> > >
> > >   The original commit was a direct commit to stable/12, as at the time
> it
> > >   was presumed it would not be necessary for head.  However, when it
> is time
> > >   to create a releng branch or switch from PRERELEASE/STABLE to
> BETA/RC, the
> > >   pkg(7) Makefile needs further adjusting.  This commit includes those
> > >   further adjustments, evaluating the BRANCH variable from
> release/Makefile
> > >   to determine the pkg(7) repository to use.
> > >
> > >   MFC after:        immediate (if possible)
> > >   Sponsored by:     Rubicon Communications, LLC (Netgate)
> > >
> > > Modified:
> > >   head/usr.sbin/pkg/Makefile
> > >
> > > Modified: head/usr.sbin/pkg/Makefile
> > >
> ==============================================================================
> > > --- head/usr.sbin/pkg/Makefile      Thu Sep 19 15:12:32 2019
> (r352519)
> > > +++ head/usr.sbin/pkg/Makefile      Thu Sep 19 16:43:12 2019
> (r352520)
> > > @@ -1,6 +1,16 @@
> > >  # $FreeBSD$
> > >
> > > +.if ${MACHINE} != "amd64" && ${MACHINE} != "i386"
> > > +PKGCONFBRANCH?=    quarterly
> > > +.else
> > > +_BRANCH!=  ${MAKE} -C ${SRCTOP}/release -V BRANCH
> > > +BRANCH?=   ${_BRANCH}
> > > +. if ${BRANCH:MBETA*} || ${BRANCH:MRC*} || ${BRANCH:MRELEASE*}
> > > +PKGCONFBRANCH?=    quarterly
> > > +. else
> > >  PKGCONFBRANCH?=    latest
> > > +. endif
> > > +.endif
> > >  CONFS=             FreeBSD.conf.${PKGCONFBRANCH}
> > >  CONFSNAME= FreeBSD.conf
> > >  CONFSDIR=  /etc/pkg
> >
> >  Tier 2 (and weird tier1 like aarch64) only have latest for current so
> > this doesn't work.
> >  Also this depends on MACHINE and iirc MACHINE is always the host when
> > cross compiling.
> >  I think this need to be reverted.
> >
> >  Cheers,
> >
>
> MACHINE is the build host when you first launch make(1), but the
> crossbuild code in Makefile.inc1 overrides MACHINE to TARGET (and
> MACHINE_ARCH to TARGET_ARCH) and launches a sub-make that way.
>

MACHINE_ARCH likely should be used in the above, since MACHINE is the
KERNEL architecture and MACHINE_ARCH is the user-land architecture.
Packages are almost exclusively for user-land, and we normally test
MACHINE_ARCH outside of sys except for some very narrow cases (that likely
could go away now that we no longer have pc98). In this case, it likely
doesn't matter. It might for arm, though, since armv7 may have packages,
but armv6 or plain arm might not and we may want to configure them
differently as a result.

Ian is right that during a buildworld, we specify TARGET/TARGET_ARCH which
use use in Makefile.inc1 for various things, but for the actual building
MACHINE and MACHINE_ARCH are what are used/tested.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrYjpUkVcYcV_81zd5DSh=BunTfF8Z2mhZLu22vY4xwWA>