Package Building Procedures
Prev |  | Next

# 10 Uploading Packages

Once a build has completed, packages and/or distfiles can be transferred to `ftp-master` for propagation to the FTP mirror network. If the build was run with `-nofinish`, then make sure to follow up with `dopackages -finish` to post-process the packages (removes `RESTRICTED` and `NO_CDROM` packages where appropriate, prunes packages not listed in `INDEX`, removes from `INDEX` references to packages not built, and generates a `CHECKSUM.MD5` summary); and distfiles (moves them from the temporary `distfiles/.pbtmp` directory into `distfiles/` and removes `RESTRICTED` and `NO_CDROM` distfiles).

It is usually a good idea to run the `restricted.sh` and/or `cdrom.sh` scripts by hand after `dopackages` finishes just to be safe. Run the `restricted.sh` script before uploading to `ftp-master`, then run `cdrom.sh` before preparing the final package set for a release.

The package subdirectories are named by whether they are for `release`, `stable`, or `current`. Examples:

- `packages-6.4-release`

- `packages-6-stable`

- `packages-7.2-release`

- `packages-7-stable`

- `packages-8-current`

> Note: Some of the directories on `ftp-master` are, in fact, symlinks. Examples:

> - `packages-stable`

> - `packages-current`

> Be sure you move the new packages directory over the real destination directory, and not one of the symlinks that points to it.

If you are doing a completely new package set (e.g. for a new release), copy packages to the staging area on `ftp-master` with something like the following:

    # cd /var/portbuild/${arch}/${branch}
    # tar cfv - packages/ | ssh portmgr@ftp-master tar xfC - w/ports/${arch}/tmp/${subdir}

Then log into `ftp-master`, verify that the package set was transferred successfully, remove the package set that the new package set is to replace (in `~/w/ports/`${arch}``), and move the new set into place. (`w/` is merely a shortcut.)

For incremental builds, packages should be uploaded using `rsync` so we do not put too much strain on the mirrors.

ALWAYS use `-n` first with `rsync` and check the output to make sure it is sane. If it looks good, re-run the `rsync` without the `-n` option.

Example `rsync` command for incremental package upload:

    # rsync -n -r -v -l -t -p --delete packages/ portmgr@ftp-master:w/ports/${arch}/${subdir}/ | tee log

Distfiles can be transferred with the `cpdistfiles` script:

    # /var/portbuild/scripts/cpdistfiles ${arch} ${branch}

Or you can do it by hand using `rsync` command:

    # cd /var/portbuild/${arch}/${branch}
    # rsync -n -r -v -l -p -c distfiles/ portmgr@ftp-master:w/ports/distfiles/ | tee log

Again, run the command without the `-n` option after you have checked it.

Prev | Home | Next
Release Builds |  | Experimental Patches Builds

This, and other documents, can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.

For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.