# $FreeBSD$ Last import was NTP 4.2.8p4. Below are steps taken for the import, to ease the next one. And don't forget to update this file afterwards. Import ------ # tar xzf ntp-4.2.8p4.tar.gz # mv ntp-4.2.8p4 4.2.8p4 Edit your ~/.subversion/config to avoid adding fbsd:* properties to vendor files. The golden rules for properties are: - All text files should have svn:eol-style set to native. - All binary files should have svn:mime-type set to application/octet-stream, unless there is a more appropriate media type. - There should be no other properties on any file. Note that some files (documentation in Japanese) conflict with FreeBSD repo commit hooks, and for now there is no better choice than give them application/octet-stream mime-type. # svn add 4.2.8p4 # svn commit Now we got vanilla 4.2.8p4 in the tree, and we need to update dist. # cd 4.2.8p4/ # rsync --archive --delete . ../dist/ # cd ../dist/ # svn rm $(svn stat | awk '$1 == "!" { print $2 }') # svn add --no-auto-props $(svn stat | awk '$1 == "?" { print $2 }') The dist is prepared for commit. Check that there is no difference to vanilla version and commit: # diff -ru ../4.2.8p4 . # svn commit Upgrade ------- Record the revision from the last commit. We are going to merge it to head/. # cd ${head}/contrib/ntp # svn merge -c rXXXXXX svn+ssh://repo.freebsd.org/base/vendor/ntp/dist Here is our exclusion list for NTP: # svn rm ports # svn rm ntpd/ntp_parser.y The ports dir is just not needed. The ntp_parser.y is harmful. Our build system will regenerate ntp_parser.c from it, which will produce bad ntpd. We should consider not importing the tests dir with next NTP upgrade, it is getting quite huge. Now it is time to compare vendor/ntp/dist and head/contrib/ntp with help of diff -ru. This is list of differencies, that should be there: r276071 ntpd/ntp_crypto.c r243933 libntp/Makefile.in ntp/libparse/Makefile.in ntpd/Makefile.in Only in vendor/ntp: ports Only in vendor/ntp: ntpd/ntp_parse.y If new import brings in new legitimate differencies, document them right here. Don't commit contrib/ntp yet. Updating usr.sbin/ntp --------------------- The config.h wasn't regenerated for a long time. It could be a good idea to do it with next upgrade. According to older documentation, last time it was regenerated with this command line: ./configure --disable-all-clocks --enable-NMEA --enable-ONCORE --enable-RAWDCF --with-crypto --disable-debugging --enable-LOCAL-CLOCK --with-sntp --with-arlib --prefix=/usr Quoting roberto@: "config.h was generated by running configure and excluding almost all clock drivers (what is included is DCF77 -- what I use --, NMEA, Motorola OnCORE and local clocks). The file is then edited to edit the value of "NO_PARENB_IGNPAR" because we need to set no parity on the serial port (needed for DCF77). All clock drivers are then disabled (some of them are included by default by ntpd). Note that there are two #ifdef to support other architectures (WRT to long size and endianness). They'll need to be redone for each upgrade to the vendor branch to keep config.h in sync." Updating usr.sbin/ntp/doc ------------------------- Paste this script into your shell. This will update manual pages. while read dst src; do sed -E -e '5a\ .\\" $FreeBSD$\ .\\"' \ -e 's/1ntp(d|dc|q|date)mdoc/8/' \ -e 's/1sntpmdoc/8/' \ -e 's/5mdoc/5/' \ -e 's/1ntp-keygenmdoc/8/' \ ../../../contrib/ntp/${src} > ${dst} done <