Q: How often do the ports get rebuilt?

  • I understand that for improving build time, ports are not always rebuilt - but is there a magic number of days or builds when ports get all rebuilt?

    Just asking ;-)

  • Rebel Alliance Developer Netgate

    On the builders? Or in packages?

    Mostly it's done on an as-needed basis. I'll go through and rebuild individual ports after they're updated.

    Occasionally something drastic happens (like the pcre bump) that requires a larger, more atomic update. I posted a notice to the dev list about that one yesterday, usually if something is likely to trip people up I do that.

    In those cases I take the "Dust off, nuke 'em from orbit" approach to port updates and run something like:

    # portsnap fetch extract
    # find /usr/ports -type d -name work -exec rm -rf {} \;
    # pkg_delete \*
    # cd /usr/ports/ports-mgmt/portupgrade/ && make install clean
    # rehash
    # portinstall --config textproc/expat2 devel/git sysutils/fastest_cvsup
    sysutils/screen www/thttpd emulators/open-vm-tools-nox11
    # rehash
    # cd /home/pfsense/tools/builder_scripts/
    # ./update_git_repos.sh
    # rm /tmp/pfSense_do_not_build_pfPorts
    # ./build_pfPorts.sh

    There has been talk over the years about automating that, so the snapshot build code could detect if a port was updated and rebuilt it automatically, but given the relative volatility of the ports tree dependencies, I'm not sure that would work long-term.

    As for packages, sort of the same deal, occasionally I will go through and have it rebuild all of the package binaries at once, but typically unless someone requests one be rebuilt we leave them alone.

  • Thanks Jim

    If there was the possibility to wipe the build VMs on regular basis and clone clean environments from somewhere automagically, that would be absolutely nice.
    People on illumos / OpenSolaris side use zones with ZFS which allows to spawn build environemts within seconds :-)

    (ezjails would be quite simple to plain jails but I haven't yet gained enough knowledge to spawn jails with write access to /usr/src nor given closer look at ZFS on FreeBSD)

  • Rebel Alliance Developer Netgate

    building in a jail doesn't work last I knew. It used to take several patches to the jail system to allow things we need to work properly. I'm not sure what the current state is though.

    As nice as that sounds, it's probably not really all that necessary except from a theoretical/unit testing type perspective. In reality most builders keep going indefinitely and don't need much prodding. The case with pcre would be unnoticed by someone who didn't update their ports tree or rebuild pfPorts. We could have kept building with what we had indefinitely, but the ports would have been outdated.

    In our colo we do have several "base" VMs that we clone from when making new builders, but they can also get a little stale now and then.

Log in to reply