Date: Mon, 26 Oct 2015 15:38:58 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r290010 - vendor/ntp Message-ID: <201510261538.t9QFcwog014561@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Mon Oct 26 15:38:58 2015 New Revision: 290010 URL: https://svnweb.freebsd.org/changeset/base/290010 Log: Document NTP import procedure, using experience from the last one. Sponsored by: Nginx, Inc. Deleted: vendor/ntp/FREEBSD-Xlist Modified: vendor/ntp/FREEBSD-upgrade Modified: vendor/ntp/FREEBSD-upgrade ============================================================================== --- vendor/ntp/FREEBSD-upgrade Mon Oct 26 15:20:45 2015 (r290009) +++ vendor/ntp/FREEBSD-upgrade Mon Oct 26 15:38:58 2015 (r290010) @@ -1,55 +1,128 @@ -# ex:ts=8 -# # $FreeBSD$ -NTP 4.2.8 - originals can be found on http://www.ntp.org/downloads.html +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 ------ -For the import of NTP the following files were removed: +# tar xzf ntp-4.2.8p4.tar.gz +# mv ntp-4.2.8p4 4.2.8p4 - ports/* NT files - html/pic/* GIF files - html/build/hints/solaris.xtra.4095849 Trigger merge conflict script +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. -The stripped down version was created using FREEBSD-Xlist during -extraction: +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. - tar -X FREEBSD-Xlist -xvzf ntp-4.2.8.tar.gz - mv ntp-4.2.8 4.2.8 +# svn add 4.2.8p4 +# svn commit -Imported by: - See procedure on -https://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/subversion-primer.html +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 -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). - +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. - -ntpd/ntp_control.c is now the only file that is different from the vendor -branch for unsigned char/int fixes and removal of a DoS. +vendor branch to keep config.h in sync." -Documentation in /usr/share/doc/ntp is generated from the HTML files with -lynx (without the GIF files of course). +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 <<EOLIST +ntp.conf.5 ntpd/ntp.conf.5mdoc +ntp.keys.5 ntpd/ntp.keys.5mdoc +ntp-keygen.8 util/ntp-keygen.1ntp-keygenmdoc +ntpd.8 ntpd/ntpd.1ntpdmdoc +ntpdc.8 ntpdc/ntpdc.1ntpdcmdoc +ntpq.8 ntpq/ntpq.1ntpqmdoc +sntp.8 sntp/sntp.1sntpmdoc +EOLIST + +Check script results with svn diff. Note that ntptime.8 and ntpdate.8 +manual pages are no longer shipped with NTP, but we keep installing the +latest versions. -A patch to fix IPV6_MULTICAST_LOOP was committed to head as r222444 and -filed as http://bugs.ntp.org/show_bug.cgi?id=1936. Check if still needed -or re-apply on update. +Test the build, installation and operation of ntpd and commit contrib/ntp +and usr.sbin/ntp in one commit: +# svn commit contrib/ntp usr.sbin/ntpd
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510261538.t9QFcwog014561>