DragonFly BSD


The art of releasing

This is a template on how to do a release.

The intended audience for this is a DragonFly developer, with ssh access to various machines in dragonflybsd.org, with a full release process.

If you're just looking to build your own modified image:

  1. git clone git://mirror-master.dragonflybsd.org/dragonfly.git
  2. git clone git://mirror-master.dragonflybsd.org/dports.git
  3. make any changes you want to make
  4. cd dragonfly/nrelease
  5. ... and proceed with "Build isos and imgs" below.


On crater branch the repo:

cd /repository/git/dragonfly.git
git branch DragonFly_RELEASE_x_y        (e.g. 2_8)

This is the only step that needs to happen remotely.

On your own system:

Check out two copies of /usr/src, one with master checked out, one with the new release branch checked out. Checkouts should be under your user id, NOT as root, or the later tagging operation will be unhappy.

mkdir master
cd master
git init
git remote add origin ssh://crater.dragonflybsd.org/repository/git/dragonfly.git
git fetch origin

cd ..
cp -R master x_y 
# x_y is the release; faster than rechecking out
cd master
git checkout master
cd ../x_y/
git branch DragonFly_RELEASE_x_y origin/DragonFly_RELEASE_x_y
git checkout DragonFly_RELEASE_x_y 

On the new branch:

vi sys/sys/param.h      

Edit __DragonFly_version and the comments lines. Two separate places! You only need to add a commented version number for the branch, not the new master.

vi sys/conf/newvers.sh  

Edit BRANCH, use 'RELEASE', update version. e.g. RELEASE_2_8

vi etc/Makefile.usr

Adjust the default src checkout in /usr/src/etc/Makefile.usr to pull this branch. Otherwise, anyone using the Makefile to download source will get master, and nrelease will build master.

On master:

vi sys/sys/param.h

Edit __DragonFly_version and related comments. Put in commented numbers for the new release and master.

vi sys/conf/newvers.sh  

Edit BRANCH, use 'DEVELOPMENT', update version.

Safety check

Before you tag, make sure there aren't any last minute surprises - build this new branch, current version, whatever.

Note that pushing these new tags changes the searched ABI for pkg. For a minor number change, this usually means the new release tag points at the packages used for DragonFly-current - they are usually tagged with the next version. It also means that the new DragonFly-current doesn't have a matching path until you build it.

For example: When 5.2 was the release, -current pointed at an ABI of 5.4 by default, and that's where packages were stored. Tag 5.4 and DragonFly-current, and 5.4 exists, but 5.6, where -current will point, does not.

The solution is to build on the new version ASAP.

Major version number changes leave everything without packages until new ones are build on the new major version number. It's probably possible to simulate corrected version numbers on a -current system, but I don't know it at the time of typing this.


Make sure all changes on the master branch and on the new branch have been committed and pushed before tagging anything.

On release:

git add sys/sys/param.h sys/conf/newvers.sh etc/Makefile.usr 
git commit
git push

On master:

git add sys/sys/param.h sys/conf/newvers.sh  
git commit
git push

man git-tag for info, the committer needs GPG set up so git tag -s works. Then you can use your own checkout. Be sure the checkouts are under your user id and you do the tagging as yourself instead of as root.

You may need to set GPG_TTY to get GPG to work if it tries to run pinentry-curses. This is the line for bash, since that's quoted most often for this fix.

export GPG_TTY=$(tty)

For tcsh:

 setenv GPG_TTY `tty`

In master

git tag -s -m "DragonFly x.x.0" vx.x.0
git push --tags

In the new branch

git tag -s -m "DragonFly x.y.0rc1" vx.y.0rc1
git push --tags

Do the x.x.0rc1 immediately. If you roll new release candidates, increment the rc number. Just before doing the final nrelease build roll a x.x.0 tag for the release branch - the same method, just without "rc1" for release candidate. Release as x.x.0.

A new tag may require a commit beforehand to the release branch to make sure it goes to the right branch.

Subsequent tag updates

When updating a x.x.1 version, you just need to tag.

If there's a significant change between versions - major library change or third-party software update, which is more likely in the development branch of DragonFly - update param.h

vi sys/sys/param.h 

updating UPDATING

Generally, any files not specifically mentioned above as specific to a branch should be updated in master and then cherry-picked to the release branch. src/UPDATING is the most common example.


Adjust the default pkg checkout in /usr/src/etc/Makefile.usr for both master and the new branch if necessary.

DragonFly-current looks to the next even number release, so until the path is created on mirror-master, ${ABI} will have to be set manually in /usr/local/etc/pkg/repos/df-latest.conf by any -current users.

dports for the new release should be built before announcing, so that people testing the release, or a release candidate, can install with immediately available packages.

Build isos and imgs

Make sure there's an appropriate dports path for pkg to download from when building images - especially release candidates. When there is a major version change, the packages for master will not be named correctly. (i.e. going from 3.8 to 4.0 means that the master packages were in 3.10, and the directory arrangement will reflect that). Tag, get packages built, then create initial ISO/IMG files.

Set DPORTS_PATH when building the image to pick where dports comes from. Ideally, there should be a release tag in dports that corresponds with the DragonFly release.

git fetch --tags
git checkout TAGNAME

If not, just point directly to the clone of the dports repo.

git clone git://git.dragonflybsd.org/dports.git

If your ISO is too big for a normal CD, try stripping modules. Make sure to use a blank make.conf so local changes don't interfere. Here's the "final" string:

make -DINSTALLSTRIPPEDMODULES __MAKE_CONF=/dev/null DPORTS_PATH=/the/path/to/dports release

To build it. (add pkg/gui/whatever targets as necessary.)


Testing should be done on real hardware, qemu and vmware. We have six isos/imgs that needs testing.

i386 iso, img, gui-img
x86_64 iso, img, gui-img

Test this:

Release Notes

Copy one of the existing release pages. The general format is :

Complete, or at least mostly complete, before announcing any versions.

Minor releases

File Copy

Place images in /ftp/iso-images on crater.dragonflybsd.org. They will be rsynced to mirror-master.

The file md5.txt should have the md5 output for all the compressed files. It should also have the md5 output for the uncompressed images, so don't just 'md5 *bz2 > md5.txt'; get that separately and copy it into the document.

/root/adm/domd5.sh will get the MD5 sums for the compressed and uncompressed images and print them to stdout. The script will run faster if you edit it to only check the new files, and then manually add the lines to md5.txt.

A BitTorrent setup would be desirable, but there's no standard process for it as part of release, yet.


users@, web page, Hacker News, Slashdot, Reddit