[ntpsec commit] Impose a uniform set of man section assignments and install directories...

Eric S. Raymond esr at ntpsec.org
Tue Oct 13 02:56:49 UTC 2015


Module:    ntpsec
Branch:    master
Commit:    02438820d6a1bc79bbc430d7b2a11bc7e4dc5aeb
Changeset: http://git.ntpsec.org/ntpsec/commit/?id=02438820d6a1bc79bbc430d7b2a11bc7e4dc5aeb

Author:    Eric S. Raymond <esr at thyrsus.com>
Date:      Mon Oct 12 22:55:39 2015 -0400

Impose a uniform set of man section assignments and install directories...

...replacing the platform-dependent mess in NTP Classic.  The reason
dumping all that complexity makes sense is that most of our targets
have a packaging layer that will adjust these to local tastes no
matter what our install productions do.

Here is the mapping in NTP Classic.  My analysis, a slightly edited form
of an email on the topic, follows.

             darwin  debian  legacy  netbsd  redhat  solaris
	     ------  ------  ------  ------  ------  -------
calc-tickadj -       sbin,8  bin,1   -       sbin,8  sbin,1m
ntp-keygen   bin,8   sbin,8  bin,1   sbin,8  sbin,8  sbin,1m
ntp-wait     sbin,8  sbin,8  bin,1   sbin,8  sbin,8  libexec,1m
ntpd         sbin,8  sbin,8  bin,1   sbin,8  sbin,8  sbin,1m
ntpdate      sbin,8  sbin,8  bin,1   sbin,8  sbin,8  sbin,1m
ntpdsim      sbin,8  sbin,8  bin,1   sbin,8  -       sbin,1m
ntpq         bin,8   bin,1   bin,1   sbin,8  sbin,8  sbin,1m
ntpsweep     -       bin,1   -       -       -       -
ntptime      sbin,8  sbin,8  bin,1   sbin,8  sbin,8  sbin,1m
ntptrace     sbin,8  bin,1   bin,1   sbin,8  sbin,8  sbin,1m
ntptickadj   -       sbin,8  bin,1   -       sbin,8  sbin,1m
sntp         bin,8   bin,1   bin,1   sbin,1  sbin,8  sbin,1m
update-leap  sbin,8  sbin,8  bin,1   sbin,8  -       sbin,1m

All the 'bin' entries are actually /usr/bin.  Section 1m is an
obsolete System V equivalent of section 8.

That...is rather a dog's breakfast.  Bletch.  There's less consistency
here, and less guidance, than I expected.  Even if you throw out 'legacy'
which is obviously a dumb fallback to ancient Unixes.

So let's go to first principles.  The sbin directory is supposed to be
reserved for binaries that may have to be available during boot,
possibly before /usr/bin is mounted. It's generally considered bad
form to drop stuff there *unless* it's needed early.  (Many of the
above columns exhibit a degree of bad form that surprises me.)

Aha. I went Googling for "/sbin directory".  Right away I found that
the Linux Filesystem Hierarchy portion of the FSSTND states the above
more formally:

  /sbin should contain only binaries essential for booting, restoring,
  recovering, and/or repairing the system in addition to the binaries
  in /bin.

It costs us little to be FSSTND-conformant, makes us look like good
Linux citizens, and won't offend people packaging for non-Linuxes.

By this criterion ntp-wait, ntpd, ntpdate, and sntp clearly belong in /sbin
(sntp so we can use it in the ntpdate wrapper, it might be questionable
otherwise).  These are the commands that may be required to update the
system clock at boot time.

Just as clearly calc-tickadj, ntp-keygen, ntpdsim, ntpq, ntpsweep,
ntptime, ntptrace, and ntptickadj do not belong there. The latter are
tuning and diagnostic tools to be run after boot, from the shell, by
NTP admins.  So they go in /usr/bin.

update-leap is never required for system initialization, but it's not
a userland command either - it's really meant to be run from a cron
job every couple of weeks. Because it's not required early I'm going
to say /usr/bin.

There's a little more uniformity about existing practice in where the
manual pages go. Once we toss out the 'legacy' column and realize that
1m = 8, the only commands that ever land in section 1 are ntpq, ntpsweep,
ntptrace, and sntp.

Historically there are two schools of thought about the general
question. One is that anything administrative goes in section 8.  The
other is that admin commands which do not require elevated privileges
go in section 1.  (su(1) is an exception.)

That's pretty much exactly what we see in the Debian column.  All the
section 8 commands require library or system calls with privilege
barriers, or to modify files in system space. None of the Section 1
files do.

The 'debian' column wins this one by a nose because, taken together,
distributions in that family are likely to have a majority of our
deployments.  But this is a weak argument and I could be talked into
"everything goes to section 8" pretty easily.

Inventorying every executable that this codebase might potentially install
and applying these rules, we have the following table.

Name          Installdir  man  Now installed?
------------  ----------  ---  --------------
calc-tickadj  /usr/bin/    8     No
ntp-keygen    /usr/bin/    8     Yes
ntp-wait      /sbin        8     No
ntpd          /sbin        8     Yes
ntpdate       /sbin        -     No
ntpdsim       /usr/bin/    8     No
ntpq          /usr/bin/    1     Yes
ntpsweep      /usr/bin/    1     No
ntptime       /usr/bin/    8     Yes
ntptrace      /usr/bin/    1     No
ntptickadj    /usr/bin/    8     Yes
plot-summary  /usr/bin/    1     No
sntp          /sbin        1     Yes
summary       /usr/bin/    1     No
update-leap   /usr/bin/    8     No

The last column describes, whether, at the time of this commit, there is
an install production for the given binary or script.

Note: One issue with the install productions as presently written is that
they're written to install to ${PREFIX}/bin and {PREFIX}/sbin.  This
is right if we're trying to install a test setup to userspace but wrong
in the normal case - we want /sbin, not /usr/sbin.

---

 devel-docs/TODO                       |  20 ++-
 docs/asciidoc.conf                    |  10 +-
 ntp-keygen/ntp-keygen-man.txt.in      |   2 +-
 ntp-keygen/wscript                    |   2 +-
 ntpd/ntp.keys.txt                     |   2 +-
 ntpd/ntpd-man.txt.in                  |   2 +-
 ntpq/ntpq-man.txt.in                  |   2 +-
 ntpq/wscript                          |   2 +-
 scripts/calc_tickadj/calc_tickadj.txt |   2 +-
 scripts/ntp-wait/ntp-wait-man.txt.in  |   2 +-
 scripts/update-leap/update-leap.txt   |   8 +-
 sntp/loc/README                       |  17 ---
 sntp/loc/darwin                       |  14 --
 sntp/loc/debian                       |  17 ---
 sntp/loc/freebsd                      |  14 --
 sntp/loc/legacy                       |  17 ---
 sntp/loc/netbsd                       |  14 --
 sntp/loc/redhat                       |  16 ---
 sntp/loc/solaris                      |  16 ---
 sntp/scripts/cvo.sh                   | 156 ---------------------
 sntp/scripts/genLocInfo               | 256 ----------------------------------
 sntp/scripts/mansec2subst.sed         |  24 ----
 sntp/sntp-man.txt.in                  |   2 +-
 sntp/wscript                          |   2 +-
 util/ntptickadj-man.txt.in            |   2 +-
 util/ntptime-man.txt.in               |   2 +-
 util/wscript                          |   2 +-
 27 files changed, 37 insertions(+), 588 deletions(-)

diff --git a/devel-docs/TODO b/devel-docs/TODO
index daeba65..8735152 100644
--- a/devel-docs/TODO
+++ b/devel-docs/TODO
@@ -24,6 +24,14 @@ None right now. (Sep-22 2015)
   is a prerequisite for this, then the *-man.txt files need to be passed
   through asciidoc to make generated man pages.
 
+* An issue with the install productions as presently written is that
+  they're written to install to ${PREFIX}/bin and {PREFIX}/sbin.  This
+  is right if we're trying to install a test setup to userspace but wrong
+  in the normal case - we want /sbin, not /usr/sbin.
+
+* There's no installation yet for the Perl executables under scripts/, or
+  their support library under scripts/lib/.
+
 * The install production needs to warn of stale ntpdc and ntpdate binaries.
 
 * Add support for enabling all conditional checks to ensure none are broken.
@@ -99,12 +107,12 @@ is not yet tested anywhere but in ntpd itself.
 
 * These manpages have no corresponding material inside docs/.  Is that OK?
 
-  ntpd/ntp.keys.txt,
-  scripts/calc_tickadj/calc_tickadj.txt,
-  scripts/summary.txt,
-  scripts/ntpsweep/ntpsweep.txt,
-  scripts/plot_summary.txt,
-  scripts/update-leap/update-leap.txt,
+  ntpd/ntp.keys.txt
+  scripts/calc_tickadj/calc_tickadj.txt
+  scripts/summary.txt
+  scripts/ntpsweep/ntpsweep.txt
+  scripts/plot_summary.txt
+  scripts/update-leap/update-leap.txt
 
 * In the docs subdirectory, include/command.txt is an HTML passthrough
   in a not entirely successful attempt to emulate the look of the
diff --git a/docs/asciidoc.conf b/docs/asciidoc.conf
index dcf8738..0cf7e9a 100644
--- a/docs/asciidoc.conf
+++ b/docs/asciidoc.conf
@@ -25,12 +25,14 @@ ntptickadj=ntptickadj
 ntptime=ntptime
 ntpwait=ntp-wait
 sntp=sntp
-ntpdman=ntpd(8)
-ntpconfman=ntp.conf(5)
+# Annoyingly, these have to be *manually* synchronized with the headers
+# on their manual pages - asciidoc doesn't expand attributes in header lines.
+ntpdconfman=ntp.conf(5)
 ntpkeygenman=ntp-keygen(8)
 ntpkeysman=ntp.keys(5)
+ntpdman=ntpd(8)
 ntpqman=ntpq(1)
 ntptickadjman=tntptickadj(8)
-ntptimeman=ntptime(1)
-ntpwaitman=ntp-wait(1)
+ntptimeman=ntptime(8)
+ntpwaitman=ntp-wait(8)
 sntpman=sntp(1)
diff --git a/ntp-keygen/ntp-keygen-man.txt.in b/ntp-keygen/ntp-keygen-man.txt.in
index 6e8f618..625c9a5 100644
--- a/ntp-keygen/ntp-keygen-man.txt.in
+++ b/ntp-keygen/ntp-keygen-man.txt.in
@@ -1,4 +1,4 @@
-= {ntpkeygenman} =
+= ntp-keygen(8) =
 :doctype: manpage
 
 == NAME ==
diff --git a/ntp-keygen/wscript b/ntp-keygen/wscript
index 79bbf1d..60b6b83 100644
--- a/ntp-keygen/wscript
+++ b/ntp-keygen/wscript
@@ -16,6 +16,6 @@ def build(ctx):
 					"%s/ntp-keygen/" % bldnode
 				],
 		use		= "ntp opts isc M RT LIBEVENT LIBEVENT_CORE LIBEVENT_PTHREADS PTHREAD CRYPTO",
-		install_path= "${PREFIX}/sbin/"
+		install_path= "${PREFIX}/bin/"
 	)
 
diff --git a/ntpd/ntp.keys.txt b/ntpd/ntp.keys.txt
index 53b5582..aa8dd2a 100644
--- a/ntpd/ntp.keys.txt
+++ b/ntpd/ntp.keys.txt
@@ -1,4 +1,4 @@
-= {ntpkeysman} =
+= ntp.keys(5) =
 :doctype: manpage
 
 == NAME ==
diff --git a/ntpd/ntpd-man.txt.in b/ntpd/ntpd-man.txt.in
index 687268d..65f2b49 100644
--- a/ntpd/ntpd-man.txt.in
+++ b/ntpd/ntpd-man.txt.in
@@ -1,4 +1,4 @@
-= {ntpdman} =
+= ntpd(8) =
 :doctype: manpage
 
 == NAME ==
diff --git a/ntpq/ntpq-man.txt.in b/ntpq/ntpq-man.txt.in
index 2ca1387..e5f5c59 100644
--- a/ntpq/ntpq-man.txt.in
+++ b/ntpq/ntpq-man.txt.in
@@ -1,4 +1,4 @@
-= {ntpqman} =
+= ntoq(1) =
 :doctype: manpage
 
 == NAME ==
diff --git a/ntpq/wscript b/ntpq/wscript
index f56f0cc..2983730 100644
--- a/ntpq/wscript
+++ b/ntpq/wscript
@@ -30,6 +30,6 @@ def build(ctx):
 		includes	= [
 						"%s/ntpq/" % bldnode
 		],
-		install_path= "${PREFIX}/sbin/",
+		install_path= "${PREFIX}/bin/",
 	)
 
diff --git a/scripts/calc_tickadj/calc_tickadj.txt b/scripts/calc_tickadj/calc_tickadj.txt
index 80e1b06..8d42742 100644
--- a/scripts/calc_tickadj/calc_tickadj.txt
+++ b/scripts/calc_tickadj/calc_tickadj.txt
@@ -1,4 +1,4 @@
-= calc_tickadj(1) =
+= calc_tickadj(8) =
 :doctype: manpage
 
 == NAME ==
diff --git a/scripts/ntp-wait/ntp-wait-man.txt.in b/scripts/ntp-wait/ntp-wait-man.txt.in
index 873b59e..0424693 100644
--- a/scripts/ntp-wait/ntp-wait-man.txt.in
+++ b/scripts/ntp-wait/ntp-wait-man.txt.in
@@ -1,4 +1,4 @@
-== {ntpwaitman} ==
+== ntp-wait(8) ==
 :doctype: manpage
 
 == NAME ==
diff --git a/scripts/update-leap/update-leap.txt b/scripts/update-leap/update-leap.txt
index 5635de7..72ac288 100644
--- a/scripts/update-leap/update-leap.txt
+++ b/scripts/update-leap/update-leap.txt
@@ -31,7 +31,7 @@ need not be run more frequently than about once every three weeks.
 
 For cron-friendly behavior, define CRONJOB=1 in the crontab.
 
-= OPTIONS
+== OPTIONS ==
 
 `-s` string, `--source-url`=_string_::
   The URL of the master copy of the leapseconds file.
@@ -72,11 +72,11 @@ Force update even if current file is OK and not close to expiring.
 `--dont-wait`::
   Don't wait for keystroke between plots.
 
-= USAGE
+== USAGE ==
 
 Usage stuff
 
-= EXIT STATUS
+== EXIT STATUS ==
 
 One of the following exit values will be returned:
 
@@ -85,7 +85,7 @@ One of the following exit values will be returned:
 1 (EXIT_FAILURE)::
   The operation failed or the command syntax was not valid.
 
-= AUTHORS
+== AUTHORS ==
 
 Timothe Litt
 
diff --git a/sntp/loc/README b/sntp/loc/README
deleted file mode 100644
index 58f2169..0000000
--- a/sntp/loc/README
+++ /dev/null
@@ -1,17 +0,0 @@
-If you look at the files here you should be able to figure out what is
-being done.
-
-../scripts/genLocInfo handles the parsing of these files.
-
-If no "more specific" file has been found and cvo.sh says the OS is
-redhat* or fedora*, we will look for loc/redhat .
-
-If no "mode specific" file has been found and the "uname" command returns
-"Linux", we will look for loc/linux .
-
-Note that automake has interesting behavior - we build the man pages using
-the man_MANS target, but they are actually installed using the empty
-manX_MANS= target, which "does the right thing".  This means that we
-need to have empty manX_MANS= targets for each possible X, based on
-the data in the loc/ files.  For executables, this generally means
-sections 1 and 8.
diff --git a/sntp/loc/darwin b/sntp/loc/darwin
deleted file mode 100644
index d4877a4..0000000
--- a/sntp/loc/darwin
+++ /dev/null
@@ -1,14 +0,0 @@
-# Darwin (Mac OS X) installations and man page suffixes
-MDOC
-ntp-keygen,bin,8
-ntp-wait,sbin,8
-ntpd,sbin,8
-ntpdate,sbin,8
-ntpdsim,sbin,8
-ntpq,bin,8
-ntpsnmpd,sbin,8
-ntpsweep,noinst,8
-ntptime,sbin,8
-ntptrace,sbin,8
-sntp,bin,8
-update-leap,sbin,8
diff --git a/sntp/loc/debian b/sntp/loc/debian
deleted file mode 100644
index 4090a9c..0000000
--- a/sntp/loc/debian
+++ /dev/null
@@ -1,17 +0,0 @@
-# Debian installations and man page suffixes
-MDOC
-calc_tickadj,sbin,8
-ntp-keygen,sbin,8
-ntp-wait,sbin,8
-ntpd,sbin,8
-ntpdate,sbin,8
-ntpdsim,sbin,8
-ntpq,bin,1
-ntpsnmpd,sbin,8
-ntpsweep,bin,1
-ntptime,sbin,8
-ntptrace,bin,1
-sntp,bin,1
-ntptickadj,sbin,8
-timetrim,sbin,8
-update-leap,sbin,8
diff --git a/sntp/loc/freebsd b/sntp/loc/freebsd
deleted file mode 100644
index 732a711..0000000
--- a/sntp/loc/freebsd
+++ /dev/null
@@ -1,14 +0,0 @@
-# FreeBSD installations and man page suffixes
-MDOC
-ntp-keygen,sbin,8
-ntp-wait,sbin,8
-ntpd,sbin,8
-ntpdate,sbin,8
-ntpdsim,sbin,8
-ntpq,sbin,8
-ntpsnmpd,sbin,8
-ntptime,sbin,8
-ntpsweep,noinst,8
-ntptrace,sbin,8
-sntp,sbin,8
-update-leap,sbin,8
diff --git a/sntp/loc/legacy b/sntp/loc/legacy
deleted file mode 100644
index 185d73a..0000000
--- a/sntp/loc/legacy
+++ /dev/null
@@ -1,17 +0,0 @@
-# Legacy installations and man page suffixes
-MAN
-calc_tickadj,bin,1
-ntp-keygen,bin,1
-ntp-wait,bin,1
-ntpd,bin,1
-ntpdate,bin,1
-ntpdsim,bin,1
-ntpq,bin,1
-ntpsnmpd,bin,1
-ntpsweep,noinst,1
-ntptime,bin,1
-ntptrace,bin,1
-sntp,bin,1
-ntptickadj,bin,1
-timetrim,bin,1
-update-leap,bin,1
diff --git a/sntp/loc/netbsd b/sntp/loc/netbsd
deleted file mode 100644
index 5adfc12..0000000
--- a/sntp/loc/netbsd
+++ /dev/null
@@ -1,14 +0,0 @@
-# NetBSD installations and man page suffixes
-MDOC
-ntp-keygen,sbin,8
-ntp-wait,sbin,8
-ntpd,sbin,8
-ntpdate,sbin,8
-ntpdsim,sbin,8
-ntpq,sbin,8
-ntpsnmpd,sbin,8
-ntpsweep,noinst,8
-ntptime,sbin,8
-ntptrace,sbin,8
-sntp,sbin,1
-update-leap,sbin,8
diff --git a/sntp/loc/redhat b/sntp/loc/redhat
deleted file mode 100644
index 4ce2c5f..0000000
--- a/sntp/loc/redhat
+++ /dev/null
@@ -1,16 +0,0 @@
-# RedHat/Fedora installations and man page suffixes
-MAN
-calc_tickadj,sbin,8
-ntp-keygen,sbin,8
-ntp-wait,sbin,8
-ntpd,sbin,8
-ntpdate,sbin,8
-ntpdsim,sbin,8
-ntpq,sbin,8
-ntpsnmpd,sbin,8
-ntpsweep,noinst,8
-ntptime,sbin,8
-ntptrace,sbin,8
-sntp,sbin,8
-ntptickadj,sbin,8
-timetrim,sbin,8
diff --git a/sntp/loc/solaris b/sntp/loc/solaris
deleted file mode 100644
index 9980941..0000000
--- a/sntp/loc/solaris
+++ /dev/null
@@ -1,16 +0,0 @@
-# Solaris installations and man page suffixes
-MAN
-calc_tickadj,sbin,1m
-ntp-keygen,sbin,1m
-ntp-wait,libexec,1m
-ntpd,libexec,1m
-ntpdate,sbin,1m
-ntpdsim,sbin,1m
-ntpq,sbin,1m
-ntpsnmpd,libexec,1m
-ntpsweep,noinst,1m
-ntptime,sbin,1m
-ntptrace,sbin,1m
-sntp,sbin,1m
-ntptickadj,sbin,1m
-update-leap,sbin,1m
diff --git a/sntp/scripts/cvo.sh b/sntp/scripts/cvo.sh
deleted file mode 100755
index ecd8092..0000000
--- a/sntp/scripts/cvo.sh
+++ /dev/null
@@ -1,156 +0,0 @@
-#! /bin/sh
-
-# Copyright 2002, 2009, 2010 Harlan Stenn.  Used by NTP with permission.
-# Author: Harlan Stenn <harlan+cvo at pfcs.com>
-
-# Possible output formats:
-#
-# CVO=...		Shell variable
-# CVO=... ; export CVO	Old-style exported envariable
-# export CVO=...	New-style exported envariable
-# setenv CVO ...	csh-style exported envariable
-
-TS="$*"
-
-CVO_raw=`config.guess`
-CVO=$CVO_raw
-
-set 1 `echo $CVO | tr '-' ' '`
-shift
-
-case "$#" in
- 4) # eg: i686-pc-linux-gnu
-    CVO_CPU=$1
-    CVO_VENDOR=$2
-    cvo_KERN=$3			# Note the capitalization...
-    CVO_OS=$4
-    case "$cvo_KERN" in
-     linux)			# Braindamage.  We want OS, not kernel info
-	if lsb_release > /dev/null 2>&1
-	then
-	    CVO_OS=`lsb_release --id --short | tr '[:upper:]' '[:lower:]'`
-	    CVO_OS="$CVO_OS`lsb_release --release --short`"
-	elif test -f /etc/debian_version
-	then
-	    set `cat /etc/debian_version`
-	    CVO_OS=debian$1
-	    CVO_KOSVER=`uname -r`
-	elif test -f /etc/mandrake-release
-	then
-	    set `cat /etc/mandrake-release`
-	    CVO_OS=mandrake$4
-	    CVO_KOSVER=`uname -r`
-	elif test -f /etc/redhat-release
-	then
-	    set `cat /etc/redhat-release`
-	    case "$1" in
-	     CentOS)
-		case "$2" in
-		 Linux)
-		    CVO_OS=centos$4
-		    ;;
-		 *) CVO_OS=centos$3
-		    ;;
-		esac
-	        ;;
-	     Fedora)
-	        CVO_OS=fedora$3
-	        ;;
-	    *)
-		case "$3" in
-		 Enterprise)
-		    CVO_OS=redhat$7.E
-		    ;;
-		 Linux)
-		    CVO_OS=redhat$5
-		    ;;
-		esac
-		;;
-	    esac
-	    CVO_KOSVER=`uname -r`
-	elif test -f /etc/slackware-version
-	then
-	    set `cat /etc/slackware-version`
-	    CVO_OS=slackware$2
-	    CVO_KOSVER=`uname -r`
-	elif test -f /etc/SuSE-release
-	then
-	    set `cat /etc/SuSE-release`
-	    CVO_OS=suse$9
-	    CVO_KOSVER=`uname -r`
-	else
-	    CVO_OS=$cvo_KERN`uname -r`
-
-	fi
-	;;
-     nto)	# QNX
-	CVO_KOSVER=`uname -r`
-	;;
-     *)
-	echo "gronk - I don't understand <$CVO>!"
-	exit 1
-	;;
-    esac
-    ;;
- 3) CVO_CPU=$1
-    CVO_VENDOR=$2
-    CVO_OS=$3
-    ;;
- *) echo "gronk - config.guess returned $# pieces, not 3 pieces!"
-    exit 1
-    ;;
-esac
-
-case "$CVO_OS" in
- cygwin)
-    # Decisions, decisions.
-    # uname -r is the cygwin version #, eg: 1.3.3(0.46/3/2)
-    # uname -s returns something like CYGWIN_NT-5.0
-    CVO_OS="$CVO_OS`uname -r | sed 's/(.*//'`"
-    ;;
-esac
-set `echo $CVO_OS | sed 's/\([0-9]\)/ \1/'`
-
-case "$#" in
- 2) ;;
- *) echo "gronk - <$CVO_OS> expanded to $#, not 2 pieces!"
-    exit 1
-    ;;
-esac
-
-CVO_OSNAME=$1
-CVO_OSVER=$2
-
-case "$CVO_OSNAME" in
- solaris)
-    CVO_KOSVER=`uname -v`
-    ;;
-esac
-
-CVO=$CVO_CPU-$CVO_VENDOR-$CVO_OS
-
-case "$TS" in
- '')
-    set | grep CVO
-    ;;
- *)
-    # keys['cvo'] = "cvo.CVO['CVO']"
-    TS=`echo $TS | sed -e s/@cvo@/$CVO/g`
-    # keys['cpu'] = "cvo.CVO['CVO_CPU']"
-    TS=`echo $TS | sed -e s/@cpu@/$CVO_CPU/g`
-    # keys['kosver'] = "cvo.CVO['CVO_KOSVER']"
-    TS=`echo $TS | sed -e s/@kosver@/$CVO_KOSVER/g`
-    # keys['os'] = "cvo.CVO['CVO_OS']"
-    TS=`echo $TS | sed -e s/@os@/$CVO_OS/g`
-    # keys['osname'] = "cvo.CVO['CVO_OSNAME']"
-    TS=`echo $TS | sed -e s/@osname@/$CVO_OSNAME/g`
-    # keys['osver'] = "cvo.CVO['CVO_OSVER']"
-    TS=`echo $TS | sed -e s/@osver@/$CVO_OSVER/g`
-    # keys['vendor'] = "cvo.CVO['CVO_VENDOR']"
-    TS=`echo $TS | sed -e s/@vendor@/$CVO_VENDOR/g`
-    # keys['raw'] = "cvo.CVO['CVO_raw']"
-    TS=`echo $TS | sed -e s/@raw@/$CVO_raw/g`
-
-    echo $TS
-    ;;
-esac
diff --git a/sntp/scripts/genLocInfo b/sntp/scripts/genLocInfo
deleted file mode 100755
index d761c4c..0000000
--- a/sntp/scripts/genLocInfo
+++ /dev/null
@@ -1,256 +0,0 @@
-#! /bin/sh
-
-args=`getopt d:f:v $*`
-set -- $args
-
-LF=
-V=": "
-
-for i
-do
-    case "$i" in
-     -d) sdir="$2" ; shift 2 ;;
-     -f) locfile="$2" ; shift 2 ;;
-     -v) V= ; shift ;;
-     --) shift ; break ;;
-    esac
-done
-
-case "$sdir" in
- '')
-    sdir=.
-esac
-
-case "$locfile" in
- */*)
-    LF=$locfile
-    ;;
- '')
-    ;;
- *)
-    lf=loc/$locfile
-    if test -f $lf
-    then
-	LF=$lf
-    fi
-    ;;
-esac
-
-# If we have a file to use (ie, LF is not empty) then look for one.
-case "$LF" in
- '')
-    PATH=$PATH:libevent/build-aux
-    export PATH
-    set `scripts/cvo.sh @osname@ @osver@` || exit 1
-
-    CVO_OSNAME=$1
-    CVO_OSVER=$2
-
-    x=$CVO_OSVER
-
-    while true
-    do
-	case "$x" in
-	 '') break ;;
-	esac
-lf=loc/$CVO_OSNAME$x
-${V}echo "Looking for <$lf>" >&2
-	if test -f $lf
-	then
-	    LF=$lf
-	    break
-	fi
-	case "$x" in
-	 *.*) x=`echo $x | sed -e 's/\.[^.]*$//'` ;;
-	 *) x= ;;
-	esac
-    done
-    case "$LF" in
-     '')
-	lf=loc/$CVO_OSNAME
-${V}echo "Looking for <$lf>" >&2
-	if test -f $lf
-	then
-	    LF=$lf
-	fi
-	;;
-    esac
-    # Handle some "aliases"
-    case "$LF" in
-     '')
-	case "$CVO_OSNAME" in
-	 redhat* | fedora*)
-	    lf=loc/redhat
-${V}echo "Looking for <$lf>" >&2
-	    if test -f $lf
-	    then
-		LF=$lf
-	    fi
-	    ;;
-	esac
-	;;
-    esac
-
-    # This might be a good place to see if uname returns "Linux",
-    # and if so, use a generic file for that.
-    case "$LF" in
-     '')
-	case "`uname`" in
-	 Linux)
-	    lf=loc/linux
-${V}echo "Looking for <$lf>" >&2
-	    if test -f $lf
-	    then
-		LF=$lf
-	    fi
-	    ;;
-	esac
-	;;
-    esac
-
-    # Finally, 'legacy'
-    case "$LF" in
-     '')
-	lf=loc/legacy
-${V}echo "Looking for <$lf>" >&2
-	if test -f $lf
-	then
-	    LF=$lf
-	fi
-	;;
-    esac
-
-    case "$LF" in
-     '')
-	echo "No loc/XXX file found!" >&2
-	exit 1
-	;;
-    esac
-    ;;
-esac
-
-${V}echo "Using <$LF>" >&2
-echo "GENLOCINFOFILE=$LF"
-
-###
-
-rm -f $sdir/genLocInfo.rc?
-
-oIFS=$IFS
-IFS=","
-
-while true
-do
-    if read c d s x
-    then
-	# echo "Got <$c><$d><$s><$x>" >&2
-	case "$c" in
-	 \#*) continue ;;
-	esac
-	case "$x" in
-	 '') ;;
-	 *) echo "Unrecognized input: <$c,$d,$s,$x>" >&2
-	    touch $sdir/genLocInfo.rc1
-	    continue
-	    ;;
-	esac
-	case "$c,$d,$s" in
-	 [Mm][Aa][Nn],,)
-	    echo "MANTAGFMT=man"
-	    continue
-	    ;;
-	 [Mm][Dd][Oo][Cc],,)
-	    echo "MANTAGFMT=mdoc"
-	    continue
-	    ;;
-	esac
-
-	case "$c,$d,$s" in
-	 *,bin,*)  DB=bin ; DL= ; DS= ; NI= ;;
-	 *,libexec,*)  DB= ; DL=libexec ; DS= ; NI= ;;
-	 *,noinst,*)  DB= ; DL= ; DS= ; NI=noinst ;;
-	 *,sbin,*) DB= ; DL= ; DS=sbin ; NI= ;;
-	 *) echo "Unrecognized input: <$c,$d,$s>" >&2
-	    touch $sdir/genLocInfo.rc1
-	    continue
-	    ;;
-	esac
-	case "$c,$d,$s" in
-	 *,*,1) ;;
-	 *,*,1m) ;;
-	 *,*,1M) ;;
-	 *,*,8) ;;
-	 *) echo "Unrecognized input: <$c,$d,$s>" >&2
-	    touch $sdir/genLocInfo.rc1
-	    continue
-	    ;;
-	esac
-
-	# Should be OK, mostly...
-	C=`echo $c | sed -e 'y/abcdefghijklmnopqrstuvwxyz-/ABCDEFGHIJKLMNOPQRSTUVWXYZ_/'`
-	# echo "c: <$c>, C: <$C>, DB: <$DB>, DL: <$DL>, DS: <$DS>" >&2
-
-	case "$d" in
-	 bin)
-	    eval ${C}_DB=$c
-	    eval ${C}_DL=
-	    eval ${C}_DS=
-	    eval ${C}_NI=
-	    ;;
-	 libexec)
-	    eval ${C}_DB=
-	    eval ${C}_DL=$c
-	    eval ${C}_DS=
-	    eval ${C}_NI=
-	    ;;
-	 noinst)
-	    eval ${C}_DB=
-	    eval ${C}_DL=
-	    eval ${C}_DS=
-	    eval ${C}_NI=$c
-	    ;;
-	 sbin)
-	    eval ${C}_DB=
-	    eval ${C}_DL=
-	    eval ${C}_DS=$c
-	    eval ${C}_NI=
-	    ;;
-	 *) echo "$0: installdir <$d> must be bin, sbin, libexec, or noinst" >&2
-	    exit 1
-	    ;;
-	esac
-	eval ${C}_MS=$s
-
-	# echo "<$c> gets installed in <$d> with a <$s> manpage suffix" >&2
-	# echo "${C}_DB is <`eval echo '$'${C}_DB`>" >&2
-	# echo "${C}_DL is <`eval echo '$'${C}_DL`>" >&2
-	# echo "${C}_DS is <`eval echo '$'${C}_DS`>" >&2
-	# echo "${C}_NI is <`eval echo '$'${C}_NI`>" >&2
-	# echo "${C}_MS is <`eval echo '$'${C}_MS`>" >&2
-	echo "${C}_DB=`eval echo '$'${C}_DB`"
-	echo "${C}_DL=`eval echo '$'${C}_DL`"
-	echo "${C}_DS=`eval echo '$'${C}_DS`"
-	echo "${C}_NI=`eval echo '$'${C}_NI`"
-	echo "${C}_MS=`eval echo '$'${C}_MS`"
-
-	touch $sdir/genLocInfo.rc0
-    else
-	break
-    fi
-done < $LF
-IFS=$oIFS
-
-if test -f $sdir/genLocInfo.rc1
-then
-    rm $sdir/genLocInfo.rc?
-    exit 1
-fi
-
-if test -f $sdir/genLocInfo.rc0
-then
-    rm $sdir/genLocInfo.rc?
-    echo 'GENLOCINFO=OK'
-    exit 0
-fi
-
-exit 1
diff --git a/sntp/scripts/mansec2subst.sed b/sntp/scripts/mansec2subst.sed
deleted file mode 100644
index c2599b9..0000000
--- a/sntp/scripts/mansec2subst.sed
+++ /dev/null
@@ -1,24 +0,0 @@
-s/1ntp-keygenman/@NTP_KEYGEN_MS@/g
-s/1ntp-keygenmdoc/@NTP_KEYGEN_MS@/g
-s/1ntp-waitman/@NTP_WAIT_MS@/g
-s/1ntp-waitmdoc/@NTP_WAIT_MS@/g
-s/1ntpdateman/@NTPDATE_MS@/g
-s/1ntpdatemdoc/@NTPDATE_MS@/g
-s/1ntpdsimman/@NTPDSIM_MS@/g
-s/1ntpdsimmdoc/@NTPDSIM_MS@/g
-s/1ntpqman/@NTPQ_MS@/g
-s/1ntpqmdoc/@NTPQ_MS@/g
-s/1ntpsnmpdman/@NTPSNMPD_MS@/g
-s/1ntpsnmpdmdoc/@NTPSNMPD_MS@/g
-s/1ntptimeman/@NTPTIME_MS@/g
-s/1ntptimemdoc/@NTPTIME_MS@/g
-s/1ntptraceman/@NTPTRACE_MS@/g
-s/1ntptracemdoc/@NTPTRACE_MS@/g
-s/1sntpman/@SNTP_MS@/g
-s/1sntpmdoc/@SNTP_MS@/g
-s/1tickadjman/@TICKADJ_MS@/g
-s/1tickadjmdoc/@TICKADJ_MS@/g
-s/1timetrimman/@TIMETRIM_MS@/g
-s/1timetrimmdoc/@TIMETRIM_MS@/g
-s/5man/5/g
-s/5mdoc/5/g
diff --git a/sntp/sntp-man.txt.in b/sntp/sntp-man.txt.in
index ec388e9..3e4f6b9 100644
--- a/sntp/sntp-man.txt.in
+++ b/sntp/sntp-man.txt.in
@@ -1,4 +1,4 @@
-= {sntpman} =
+= sntp(1) =
 :doctype: manpage
 
 == NAME ==
diff --git a/sntp/wscript b/sntp/wscript
index 0d6cc73..1779bd0 100644
--- a/sntp/wscript
+++ b/sntp/wscript
@@ -20,5 +20,5 @@ def build(ctx):
 		includes	= [
 						"%s/sntp/" % bldnode
 					] + ctx.env.PLATFORM_INCLUDES, # XXX: Hack needs to use libevent_inc or something else.
-		install_path= "${PREFIX}/sbin/",
+		install_path= "${PREFIX}/bin/",
 	)
diff --git a/util/ntptickadj-man.txt.in b/util/ntptickadj-man.txt.in
index 905a1fa..a11523f 100644
--- a/util/ntptickadj-man.txt.in
+++ b/util/ntptickadj-man.txt.in
@@ -1,4 +1,4 @@
-= {ntptickadjman} =
+= ntptickadj(8) =
 :doctype: manpage
 
 == NAME ==
diff --git a/util/ntptime-man.txt.in b/util/ntptime-man.txt.in
index 606ab02..d3d5d0e 100644
--- a/util/ntptime-man.txt.in
+++ b/util/ntptime-man.txt.in
@@ -1,4 +1,4 @@
-= {ntptimeman} =
+= ntptime(8) =
 :doctype: manpage
 
 == NAME ==
diff --git a/util/wscript b/util/wscript
index 446ee26..8a9cf2e 100644
--- a/util/wscript
+++ b/util/wscript
@@ -22,7 +22,7 @@ def build(ctx):
 						"%s/%s/" % (bldnode, name)
 					],
 			use		= "ntp opts isc M RT PTHREAD",
-			install_path= False
+			install_path = "${PREFIX}/bin/"
 		)
 
 



More information about the vc mailing list