Package Building Procedures
Prev |  | Next

# 17 How to configure a new architecture

> Note: The initial steps need to be done using sudo.

- Create a new `ports-`arch`` user and group.

-     mkdir /var/portbuild/arch

- Create a new zfs filesystem:

      zfs create -o mountpoint=/a/portbuild/arch a/portbuild/arch

-     chown ports-arch:portmgr /var/portbuild/arch;
      chmod 755 /var/portbuild/arch;
      cd /var/portbuild/arch

- Create and populate the `.ssh` directory.

- Create a directory for buildlogs and errorlogs:

      mkdir /dumpster/pointyhat/arch/archive

  > Note: It is possible that `/dumpster/pointyhat` will not have enough space. In that case, create the archive directory as `/dumpster/pointyhat/`arch`/archive` and symlink to that. (This needs to be sorted out.)

- Create a link to the above for the webserver:

      ln -s /dumpster/pointyhat/arch/archive archive

> Note: The next steps are most easily done as user `ports-`arch``.

- In the `/var/portbuild/`arch`` directory:

      mkdir clients

- Populate `clients` as usual.

-     mkdir loads

-     mkdir lockfiles

- Create a local `make.conf`. In the most trivial case, you can

      ln ../make.conf ./make.conf

- Create an empty `mlist` file.

- (Only necessary for old codebase) Create `pnohang.`arch``. (The easiest way may be to do the following on a client, and then copy it back):

      cc pnohang.c -o pnohang-arch

- Create a fresh `portbuild.conf` file from one of the ones for another architecture.

- Create customized `portbuild.`machinename`.conf` files as appropriate.

-     cd .ssh && ssh-keygen

- Edit the `.ssh/config` file for convenience in using ssh.

- Make the private configuration directory:

      mkdir /var/portbuild/conf/arch

- In that directory: create any `dotunnel.*` scripts needed.

> Note: Once again using sudo:

- Tell qmanager about the arch:

      python path/qmanager/qclient add_acl name=ports-arch uidlist=ports-arch gidlist=portmgr sense=1

- (Only necessary for new codebase): Add `arch` to `SUPPORTED_ARCHS` in `/var/portbuild/`arch`/server.conf`.

- (Only necessary for old codebase): Edit `/var/portbuild/scripts/buildenv`.

- Add the `arch` directory to `/var/portbuild/scripts/zbackup` and `/var/portbuild/scripts/zexpire`.

- (Only necessary for old codebase): As with the procedure for creating a new branch: in the `/var/portbuild/errorlogs/` directory, create links for the webserver:

      ln -s ../arch/branch/builds/latest/bak/errors arch-branch-full
      ln -s ../arch/branch/builds/latest/bak/logs arch-branch-full-logs
      ln -s ../arch/branch/builds/latest/errors arch-branch-latest
      ln -s ../arch/branch/builds/latest/logs arch-branch-latest-logs
      ln -s ../arch/branch/builds/latest/bak/packages arch-branch-packages-full
      ln -s ../arch/branch/builds/latest/packages arch-branch-packages-latest

- In the `/var/portbuild/errorlogs/` directory, create two more links for the webserver:

      ln -s ../arch/archive/buildlogs arch-buildlogs
      ln -s ../arch/archive/errorlogs arch-errorlogs

> Note: Again, as `ports-`arch``:

- For each branch that will be supported, do the following:

  - Kick-start the build for the branch with

        build create arch branch

  - Create `bindist.tar`.

> Note: One last time using sudo:

- (Only necessary for old codebase): Only after the first time a dopackages has been run for the arch: add the arch to `/var/portbuild/scripts/dopackagestats`.

- Add an appropriate `arch` entry for `/var/portbuild/scripts/dologs` to the root `crontab`. (This is a hack and should go away.)

Prev | Home | Next
How to rebase on a supported FreeBSD branch |  | How to configure a new head node (pointyhat instance)