Package: ntpsec-ntpdate
Version: 1.2.0+dfsg1-4
Severity: normal

Dear Maintainer,

ntpdate is documented as accepting option "-d" but does in fact reject
it.

$ man ntpdate | grep debugging\ mode
       -d     Enable  the debugging mode, in which ntpdate will go through all

$ ntpdate -d -v time.loc
Illegal option -d
...

$ grep getopt /usr/sbin/ntpdate
while getopts 46a:bBe:k:no:p:qst:uv opt
$  grep getopt /usr/sbin/ntpdate | sed -e 's/[^d]*//'

$ echo no d here

I would suggest to add "d" to the getopt like:
---8<---
--- /usr/sbin/ntpdate.oorig     2021-09-21 12:45:55.189280225 +0200
+++ /usr/sbin/ntpdate   2021-09-21 12:46:52.509374336 +0200
@@ -45,7 +45,7 @@ TIMEOUT="-t 1"
 setclock=yes
 echo=no
 log=no
-while getopts 46a:bBe:k:no:p:qst:uv opt
+while getopts 46a:bBde:k:no:p:qst:uv opt
 do
     case $opt in
        4) PASSTHROUGH="$PASSTHROUGH -4";;

---8<---

which would work as expected:
$ ntpdate -d -v time.loc
ntpdig: querying 192.168.100.46 (time.loc)
org t1: e4f436a0.3d2e1000 rec t2: e4f436a0.3d7b7648
xmt t3: e4f436a0.3d842762 dst t4: e4f436a0.3db9f000
org t1: 1632221216.238984 rec t2: 1632221216.240165
xmt t3: 1632221216.240298 dst t4: 1632221216.241118
rec-org t21: 0.001181  xmt-dst t34: -0.000821
{"time":"2021-09- .....

TIA

-- System Information:
Debian Release: bookworm/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-8-amd64 (SMP w/16 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ntpsec-ntpdate depends on:
ii  netbase      6.3
ii  python3      3.9.2-3
ii  python3-ntp  1.2.0+dfsg1-4

ntpsec-ntpdate recommends no packages.

ntpsec-ntpdate suggests no packages.

-- no debconf information
--- /usr/sbin/ntpdate.oorig     2021-09-21 12:45:55.189280225 +0200
+++ /usr/sbin/ntpdate   2021-09-21 12:46:52.509374336 +0200
@@ -45,7 +45,7 @@ TIMEOUT="-t 1"
 setclock=yes
 echo=no
 log=no
-while getopts 46a:bBe:k:no:p:qst:uv opt
+while getopts 46a:bBde:k:no:p:qst:uv opt
 do
     case $opt in
        4) PASSTHROUGH="$PASSTHROUGH -4";;

Reply via email to