git: Add integrated dports build feature to build-all and install-all targets

Matthew Dillon dillon at crater.dragonflybsd.org
Tue Jan 16 14:23:14 PST 2024


commit a361ab312536a661d74caf5630c7ae20bcd8e3e4
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Mon Jan 1 20:57:00 2024 -0800

    Add integrated dports build feature to build-all and install-all targets
    
    When WITH_DPORTS=YES is used build-all and install-all, these targets will
    also build the base set of ports and all of their dependencies using
    configuration data and the "dragonfly/base" dport found in
    "/usr/src/dports.base".
    
    This feature is intended to be used by the nrelease build in an upcoming
    commit, and may also be used manually.
    
    The /usr/dports tree must exist and contains the dports repo to use as the
    basis of the dports build.  It will be null-mounted in the chroot and the
    "/usr/src/dports.base/dragonfly" directory will be null-mounted under it
    to provide the "dragonfly/base" meta-port.   The DPORTSBASE make variable
    may be used to override the location of the main dports repo.
    
    The build-all and install-all targets use a sophisticated chrooted
    environment to do a completely clean dports build with dsynth.  It
    It will actually "make installworld" plus a clean "make distribution"
    inside the chroot environment to create the environment, and the host
    system's /etc/resolv.conf will be copied in.
    
    build-all		- Augmented when used WITH_DPORTS=YES
    install-all		- Augmented when used WITH_DPORTS=YES
    buildportschroot	- Build a fresh chroot environment for dsynth
    mountports		- Do all null mounts and cp's needed for the env
    buildports		- Run dsynth build dragonfly/base in the env
    installports		- Install the built ports on the host system (see note)
    umountports		- Remove the null mounts
    
    WITH_DPORTS=YES		- executes buildportschroot, mountports, buildports,
    			  and umountports when run from build-all.
    
    			  executes mountports, installports, umountports
    			  when run from install-all.
    
    DPORTSBASE=path		- Defaults to /usr/dports, may be used to override
    			  the location where the main dports tree can be
    			  found.
    
    NOTE: Installports may require interactivity as the base system might already
          have installed ports.  Generally speaking it is best to not revert any
          ports you might already have installed, so feel free to tell it not to
          install anything.
    
    * Added various make targets and augmented build-all and install-all
    
    * /usr/local/sbin added and the stale /usr/pkg/bin removed from _HOSTPATH.
    
    * Add /usr/src/dports.base infrastructure.
    
      It contains the dsynth.ini and pkg.conf files that will be used for the
      local dsynth operations.  Some paths are replaced with SED when copied
      to the chroot.  The dsynth.ini is relative to the chroot.
    
      It also contains the dragonfly/base dport which is the meta-port that
      dsynth will be told to build.
    
      All other dports related files and directories are null-mounted from
      /usr/dports.
    
    * Add /usr/distfiles.base to mtree/BSD.usr.dist.  This directory is also
      created by the build if it does not exist since the host system might
      not have run a new installworld recently.
    
      This directory will be used during build-all (buildports) to store the
      distfiles required to build dragonfly/base, so they only need to be
      fetched once.
    
    * Add the "-C ConfigBase" option to dsynth to make running it from the
      chrooted environment easier.  This overrides the /etc/dsynth directory
      and removes /etc/dsynth as a fallback.
    
    * dsynth conditionalizes calling syscap_set() for backwards compatibility
      with older host systems that might not have been upgraded to include the
      feature yet.

Summary of changes:
 Makefile                             |  13 +++-
 Makefile.inc1                        | 122 +++++++++++++++++++++++++++++++++--
 dports.base/README.dports.base       |  29 +++++++++
 dports.base/dragonfly/base/Makefile  |  26 ++++++++
 dports.base/dragonfly/base/pkg-descr |   1 +
 dports.base/dsynth.ini               |  27 ++++++++
 dports.base/pkg.conf                 |  12 ++++
 etc/mtree/BSD.usr.dist               |   2 +
 usr.bin/dsynth/Makefile              |   1 +
 usr.bin/dsynth/build.c               |   1 +
 usr.bin/dsynth/config.c              |   7 +-
 usr.bin/dsynth/dsynth.c              |   9 ++-
 usr.bin/dsynth/subs.c                |   2 +
 13 files changed, 241 insertions(+), 11 deletions(-)
 create mode 100644 dports.base/README.dports.base
 create mode 100644 dports.base/dragonfly/base/Makefile
 create mode 100644 dports.base/dragonfly/base/pkg-descr
 create mode 100644 dports.base/dsynth.ini
 create mode 100644 dports.base/pkg.conf

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a361ab312536a661d74caf5630c7ae20bcd8e3e4


-- 
DragonFly BSD source repository


More information about the Commits mailing list