Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ntp for openSUSE:Factory checked in 
at 2021-02-17 18:12:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ntp (Old)
 and      /work/SRC/openSUSE:Factory/.ntp.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ntp"

Wed Feb 17 18:12:14 2021 rev:126 rq:871212 version:4.2.8p15

Changes:
--------
--- /work/SRC/openSUSE:Factory/ntp/ntp.changes  2020-10-30 11:45:59.705618456 
+0100
+++ /work/SRC/openSUSE:Factory/.ntp.new.28504/ntp.changes       2021-02-17 
18:13:16.530025793 +0100
@@ -1,0 +2,18 @@
+Mon Feb  8 12:50:47 UTC 2021 - Reinhard Max <[email protected]>
+
+- bsc#1181788: Make the code for the service name change robust to
+  the simplified systemd-sysv-convert script.
+- Fix systemd dependencies.
+
+-------------------------------------------------------------------
+Fri Jan  8 21:36:45 UTC 2021 - Martin Hauke <[email protected]>
+
+- Package statsdir /var/log/ntpstats/
+- Let system-user-ntp handle the user/group generation 
+- Introduce subpackage dcf77-tools
+  * testdcf, a simple DCF77 raw impulse test program
+  * dcfd, a simple DCF77 raw impulse receiver 
+- Add patch testdcf-gude.diff
+  * Improves testdcf's compatibility with GUDE DCF77 receivers
+
+-------------------------------------------------------------------
@@ -73 +91 @@
-- Silence an OpenSSL version warning (bsc#992038,
+- Silence an OpenSSL version warning (bsc#992038,bsc#1125401
@@ -90 +108 @@
-- removal of SuSEfirewall2 service, since SuSEfirewall2 has been replaced by
+- removal of ntp.firewall, since SuSEfirewall2 has been replaced by
@@ -105 +123 @@
-- Drop the omc config fate#301838:
+- Drop the omc config ntp.xml fate#301838:
@@ -148 +166 @@
-- Update to 4.2.8p12
+- Update to 4.2.8p12 (bsc#1111853):

New:
----
  testdcf-gude.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ntp.spec ++++++
--- /var/tmp/diff_new_pack.xKHBuS/_old  2021-02-17 18:13:17.334026451 +0100
+++ /var/tmp/diff_new_pack.xKHBuS/_new  2021-02-17 18:13:17.338026454 +0100
@@ -58,6 +58,7 @@
 Patch29:        ntp-pathfind.patch
 Patch30:        ntp-move-kod-file.patch
 Patch33:        ntp-sntp-libevent.patch
+Patch34:        testdcf-gude.diff
 
 BuildRequires:  avahi-compat-mDNSResponder-devel
 BuildRequires:  fdupes
@@ -68,11 +69,12 @@
 BuildRequires:  pps-tools-devel
 %endif
 BuildRequires:  readline-devel
-BuildRequires:  pkgconfig(systemd)
+BuildRequires:  systemd-rpm-macros
+%systemd_ordering
 Requires:       /bin/logger
 Requires:       timezone
 Requires(pre):  %fillup_prereq
-Requires(pre):  shadow
+Requires(pre):  user(ntp)
 Requires(post): /usr/bin/base64
 Requires(post): /usr/bin/gawk
 Suggests:       logrotate
@@ -112,6 +114,18 @@
 first try on a non-technical Mini-HOWTO and FAQ on NTP). Edited by
 Ulrich Windl and David Dalton.
 
+%package dcf77-tools
+Summary:        DCF77 related tools
+Group:          Hardware/Other
+
+%description dcf77-tools
+DCF77 related programs.
+
+There are currently two tools:
+  * testdcf, a simple DCF77 raw impulse test program.
+  * dcfd, a simple DCF77 raw impulse receiver with NTP loopfilter
+    mechanics for synchronisation.
+
 %prep
 %setup -q
 # unpack ntp-faq
@@ -131,6 +145,7 @@
 %patch29
 %patch30
 %patch33
+%patch34 -p1
 
 # fix DOS line breaks
 sed -i 's/\r//g' html/scripts/{footer.txt,style.css}
@@ -222,17 +237,25 @@
 install -d %{buildroot}%{_localstatedir}/log/
 touch %{buildroot}%{_localstatedir}/log/ntp
 #
+# statsdir
+#
+install -d %{buildroot}%{_localstatedir}/log/ntpstats
+#
 # service xml
 #
 install -m 755 scripts/ntp-wait/ntp-wait %{buildroot}%{_sbindir}/
 install -d %{buildroot}/var/lib/ntp
 install -m 644 /dev/null %{buildroot}/var/lib/ntp/kod
 
+#
+# DCF77 tools
+#
+install -d %{buildroot}%{_bindir}/
+install -m 755 parseutil/testdcf %{buildroot}%{_bindir}/
+install -m 755 parseutil/dcfd %{buildroot}%{_bindir}/
+
+
 %pre
-getent group ntp >/dev/null || %{_sbindir}/groupadd -r ntp
-getent passwd ntp >/dev/null || %{_sbindir}/useradd -r -o -g ntp -u 74 \
-       -s /bin/false -c "NTP daemon" -d %{_localstatedir}/lib/ntp ntp
-%{_sbindir}/usermod -g ntp ntp 2>/dev/null || :
 test -L %{_localstatedir}/run/ntp  || rm -rf %{_localstatedir}/run/ntp && :
 %service_add_pre ntp.service ntpd.service
 %service_add_pre ntp-wait.service
@@ -351,8 +374,8 @@
 fi
 %service_add_post ntpd.service
 %service_add_post ntp-wait.service
-if [ ! -e "%{_localstatedir}/lib/systemd/migrated/ntpd" ]; then
-  touch %{_localstatedir}/lib/systemd/migrated/ntpd
+if [ -e "%{_localstatedir}/lib/systemd/migrated/ntp" ]; then
+  mv "%{_localstatedir}/lib/systemd/migrated/ntp" 
"%{_localstatedir}/lib/systemd/migrated/ntpd"
 fi
 
 %postun
@@ -388,9 +411,13 @@
 %{_fillupdir}/*
 %attr(0755,ntp,root) %{_localstatedir}/lib/ntp%{_localstatedir}/run/ntp
 %ghost %config(noreplace) %{_localstatedir}/log/ntp
-/var/lib/ntp
+%attr(0755,ntp,ntp) %dir %{_localstatedir}/log/ntpstats
 
 %files doc
 %doc %{_docdir}/ntp-doc
 
+%files dcf77-tools
+%{_bindir}/dcfd
+%{_bindir}/testdcf
+
 %changelog


++++++ testdcf-gude.diff ++++++
--- a/parseutil/testdcf.c.orig  2015-06-29 21:38:01.000000000 +0200
+++ b/parseutil/testdcf.c       2016-06-08 10:16:23.478480393 +0200
@@ -67,7 +67,8 @@
 
 typedef struct clocktime clocktime_t;
 
-static char type(unsigned int);
+static char type(unsigned int, unsigned int);
+static void usage(void);
 
 #define TIMES10(_X_) (((_X_) << 3) + ((_X_) << 1))
 
@@ -129,7 +130,7 @@
  * 59                - usually missing (minute indication), except for leap 
insertion
  */
 
-static char revision[] = "4.10";
+static char revision[] = "4.11 (d)";
 
 static struct rawdcfcode
 {
@@ -291,11 +292,12 @@
 
 static char
 type(
-       unsigned int c
+       unsigned int c,
+       unsigned int thresh
        )
 {
        c ^= 0xFF;
-       return (c >= 0xF);
+       return (c > thresh);
 }
 
 static const char *wday[8] =
@@ -314,48 +316,106 @@
 
 #define LINES (24-2)   /* error lines after which the two headlines are 
repeated */
 
+#if defined(TIOCMBIC) && defined(TIOCMBIS)
+#ifdef TIOCM_RTS
+#define RTSOPT "|--rts={0,1}"
+#else
+#define RTSOPT ""
+#endif
+#ifdef TIOCM_DTR
+#define DTROPT "|--dtr={0,1}"
+#else
+#define DTROPT ""
+#endif
+#else
+#define DTROPT ""
+#define RTSOPT ""
+#endif
+
+static void
+usage(void) {
+       fprintf(stderr, "usage: testdcf [-f|-t|-ft|-tf%s%s|--type=[0,1]] 
<device>\n", RTSOPT, DTROPT);
+}
+
 int
 main(
        int argc,
        char *argv[]
        )
 {
-       if ((argc != 2) && (argc != 3))
-       {
-               fprintf(stderr, "usage: %s [-f|-t|-ft|-tf] <device>\n", 
argv[0]);
-               exit(1);
-       }
-       else
-       {
-               unsigned char c;
-               char *file;
-               int fd;
-               int offset = 15;
-               int trace = 0;
-               int errs = LINES+1;
-
-               /*
-                * SIMPLE(!) argument "parser"
-                */
-               if (argc == 3)
-               {
-                       if (strcmp(argv[1], "-f") == 0)
-                           offset = 0;
-                       if (strcmp(argv[1], "-t") == 0)
-                           trace = 1;
-                       if ((strcmp(argv[1], "-ft") == 0) ||
-                           (strcmp(argv[1], "-tf") == 0))
+       int aidx=1;
+       unsigned char c;
+       char *file = NULL;
+       int fd;
+       int offset = 0;
+       int trace = 0;
+       int errs = LINES+1;
+       int modem_set_bits = TIOCM_DTR;
+       int modem_clear_bits = TIOCM_RTS;
+       int baudrate = B50;
+       int debug_raw = 0;
+       unsigned char thresh_raw = 0x1F;
+
+       do {
+               if (argv[aidx] && argv[aidx][0]=='-') {
+                       if (strcmp(argv[aidx], "-f") == 0)
+                       {
+                               offset = 15;
+                       } else if (strcmp(argv[aidx], "-t") == 0)
                        {
-                               offset = 0;
                                trace = 1;
+                       } else if ((strcmp(argv[aidx], "-ft") == 0) ||
+                                  (strcmp(argv[aidx], "-tf") == 0))
+                       {
+                               offset = 15;
+                               trace = 1;
+#if defined(TIOCMBIS) && defined(TIOCMBIC) && defined(TIOCM_RTS)
+                       } else if ((strncmp(argv[aidx], "--rts=", 6) == 0) &&
+                                  (strlen(argv[aidx]) == 7)) {
+                               if (argv[aidx][6] == '1') {
+                                       modem_set_bits   |= TIOCM_RTS;
+                                       modem_clear_bits &= ~TIOCM_RTS;
+                               } else {
+                                       modem_set_bits   &= ~TIOCM_RTS;
+                                       modem_clear_bits |= TIOCM_RTS;
+                               }
+#endif
+#if defined(TIOCMBIS) && defined(TIOCMBIC) && defined(TIOCM_DTR)
+                       } else if ((strncmp(argv[aidx], "--dtr=", 6) == 0) &&
+                                  (strlen(argv[aidx]) == 7)) {
+                               if (argv[aidx][6] == '1') {
+                                       modem_set_bits   |= TIOCM_DTR;
+                                       modem_clear_bits &= ~TIOCM_DTR;
+                               } else {
+                                       modem_set_bits   &= ~TIOCM_DTR;
+                                       modem_clear_bits |= TIOCM_DTR;
+                               }
+#endif
+                       } else if ((strncmp(argv[aidx], "--type=", 7) == 0) &&
+                                   (strlen(argv[aidx]) == 8)) {
+                              if (argv[aidx][7] == '1') {
+                                // mouseCLOCK USB v2.0
+                                baudrate = B4800;
+                              } else {
+                                // mouseCLOCK standart
+                                baudrate = B50;
+                              }
+                       } else if (strcmp(argv[aidx], "-d") == 0) {
+                               debug_raw = 1;
+                       } else if (strncmp(argv[aidx], "--thresh=", 9) == 0) {
+                               sscanf(argv[aidx] + 9, "%d", &thresh_raw);
+                       } else {
+                               usage();
+                               return(0);
                        }
-                       file = argv[2];
-               }
-               else
-               {
-                       file = argv[1];
+               } else {
+                       file = argv[aidx];
                }
+               aidx++;
+       } while (aidx < argc);
 
+       if (file)
+       {
                fd = open(file, O_RDONLY);
                if (fd == -1)
                {
@@ -365,9 +425,6 @@
                else
                {
                        int i;
-#ifdef TIOCM_RTS
-                       int on = TIOCM_RTS;
-#endif
                        struct timeval t, tt, tlast;
                        char buf[61];
                        clocktime_t clock_time;
@@ -392,8 +449,8 @@
                        term.c_oflag = 0;
                        term.c_lflag = 0;
 
-                       cfsetispeed(&term, B50);
-                       cfsetospeed(&term, B50);
+                       cfsetispeed(&term, baudrate);
+                       cfsetospeed(&term, baudrate);
 
                        if (tcsetattr(fd, TCSANOW, &term) == -1)
                        {
@@ -405,14 +462,23 @@
                        while (ioctl(fd, I_POP, 0) == 0)
                            ;
 #endif
-#if defined(TIOCMBIC) && defined(TIOCM_RTS)
-                       if (ioctl(fd, TIOCMBIC, (caddr_t)&on) == -1)
-                       {
-                               perror("TIOCM_RTS");
+
+#if defined(TIOCMBIS) && defined(TIOCMBIC)
+                        if ((modem_set_bits==TIOCM_DTR) && 
(modem_clear_bits==TIOCM_RTS))
+                               printf ("\n\E[37;40m\033[1m  setting 
\E[32;40mRTS/DTR\E[37;40m\033[1m for GudeADS \E[33;40m\033[1mExpert mouseCLOCK 
%s\033[0m...\n\n",
+                                        (baudrate==B50)?"":"USB v2.0");
+
+                       /* set RTS / DTR if needed */
+                       if (modem_set_bits | modem_clear_bits) {
+                               if (ioctl(fd, TIOCMBIS, &modem_set_bits) == -1) 
{
+                                       perror("TIOCMBIS");
+                               }
+                               if (ioctl(fd, TIOCMBIC, &modem_clear_bits) == 
-1) {
+                                       perror("TIOCMBIC");
+                               }
                        }
 #endif
-
-                       printf("  DCF77 monitor %s - Copyright (C) 1993-2005, 
Frank Kardel\n\n", revision);
+                       printf("  DCF77 monitor %s - Copyright (C) 1993-2006, 
Frank Kardel\n\n", revision);
 
                        clock_time.hour = 0;
                        clock_time.minute = 0;
@@ -445,6 +511,12 @@
                                        printf("  %s", 
&"---------------RADMLS1248124P124812P1248121241248112481248P\n"[offset]);
                                        errs = 0;
                                }
+                               
+                               
+                               if (debug_raw)
+                               {
+                                       printf ("%5i: %3i \n", (t.tv_sec * 1000 
+ t.tv_usec / 1000), c ^ 0xFF);
+                               }
 
                                if (t.tv_sec > 1 ||
                                    (t.tv_sec == 1 &&
@@ -468,7 +540,7 @@
                                        if (((c^0xFF)+1) & (c^0xFF))
                                            buf[0] = '?';
                                        else
-                                           buf[0] = type(c) ? '#' : '-';
+                                           buf[0] = type(c, thresh_raw) ? '#' 
: '-';
 
                                        for ( i = 1; i < 60; i++)
                                            buf[i] = '.';
@@ -480,7 +552,7 @@
                                        if (((c^0xFF)+1) & (c^0xFF))
                                            buf[i] = '?';
                                        else
-                                           buf[i] = type(c) ? '#' : '-';
+                                           buf[i] = type(c, thresh_raw) ? '#' 
: '-';
 
                                        printf("%c %.*s ", pat[i % 
(sizeof(pat)-1)], 59 - offset, &buf[offset]);
                                }
@@ -516,6 +588,8 @@
                        }
                        close(fd);
                }
+       } else {
+               usage();
        }
        return 0;
 }

Reply via email to