Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lastlog2 for openSUSE:Factory 
checked in at 2023-04-12 12:50:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lastlog2 (Old)
 and      /work/SRC/openSUSE:Factory/.lastlog2.new.19717 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "lastlog2"

Wed Apr 12 12:50:55 2023 rev:5 rq:1078399 version:1.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/lastlog2/lastlog2.changes        2023-04-05 
21:36:08.274733818 +0200
+++ /work/SRC/openSUSE:Factory/.lastlog2.new.19717/lastlog2.changes     
2023-04-12 12:50:57.704708050 +0200
@@ -1,0 +2,8 @@
+Tue Apr 11 09:56:19 UTC 2023 - Thorsten Kukuk <ku...@suse.com>
+
+- Version 1.1.0
+  - Add option to install lastlog compat symlink
+  - lastlog2: add --service option
+  - liblastlog2: sort output according to user names
+
+-------------------------------------------------------------------

Old:
----
  lastlog2-1.0.1.tar.xz

New:
----
  lastlog2-1.1.0.tar.xz

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

Other differences:
------------------
++++++ lastlog2.spec ++++++
--- /var/tmp/diff_new_pack.zQr3xJ/_old  2023-04-12 12:50:58.188710879 +0200
+++ /var/tmp/diff_new_pack.zQr3xJ/_new  2023-04-12 12:50:58.196710926 +0200
@@ -18,7 +18,7 @@
 
 %define lname   liblastlog2-1
 Name:           lastlog2
-Version:        1.0.1
+Version:        1.1.0
 Release:        0
 Summary:        Reports most recent login of users
 License:        BSD-2-Clause

++++++ lastlog2-1.0.1.tar.xz -> lastlog2-1.1.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lastlog2-1.0.1/NEWS new/lastlog2-1.1.0/NEWS
--- old/lastlog2-1.0.1/NEWS     2023-04-05 16:23:04.000000000 +0200
+++ new/lastlog2-1.1.0/NEWS     2023-04-11 11:55:40.000000000 +0200
@@ -1,3 +1,8 @@
+Version 1.1.0
+* Add option to install lastlog compat symlink
+* lastlog2: add --service option
+* liblastlog2: sort output according to user names
+
 Version 1.0.1
 * liblastlog2: fix memory leak
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lastlog2-1.0.1/lib/lastlog2.c 
new/lastlog2-1.1.0/lib/lastlog2.c
--- old/lastlog2-1.0.1/lib/lastlog2.c   2023-04-05 16:23:04.000000000 +0200
+++ new/lastlog2-1.1.0/lib/lastlog2.c   2023-04-11 11:55:40.000000000 +0200
@@ -383,7 +383,7 @@
   if ((db = open_database_ro (lastlog2_path, error)) == NULL)
     return -1;
 
-  char *sql = "SELECT * FROM Lastlog2";
+  char *sql = "SELECT * FROM Lastlog2 ORDER BY Name ASC";
 
   if (sqlite3_exec (db, sql, callback, cb_func, &err_msg) != SQLITE_OK)
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lastlog2-1.0.1/meson.build 
new/lastlog2-1.1.0/meson.build
--- old/lastlog2-1.0.1/meson.build      2023-04-05 16:23:04.000000000 +0200
+++ new/lastlog2-1.1.0/meson.build      2023-04-11 11:55:40.000000000 +0200
@@ -11,7 +11,7 @@
                  'b_pie=true',
                  'warning_level=2',],
   license : ['BSD-2-Clause',],
-  version : '1.0.1',
+  version : '1.1.0',
 )
 
 cc = meson.get_compiler('c')
@@ -140,6 +140,12 @@
            link_with : liblastlog2,
            install : true)
 
+if get_option('compat-symlink')
+  install_symlink('lastlog',
+                  pointing_to: 'lastlog2',
+                  install_dir: 'bin')
+endif
+
 subdir('tmpfiles.d')
 subdir('units')
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lastlog2-1.0.1/meson_options.txt 
new/lastlog2-1.1.0/meson_options.txt
--- old/lastlog2-1.0.1/meson_options.txt        2023-04-05 16:23:04.000000000 
+0200
+++ new/lastlog2-1.1.0/meson_options.txt        2023-04-11 11:55:40.000000000 
+0200
@@ -9,4 +9,6 @@
 option('man', type : 'combo', choices : ['auto', 'true', 'false'],
        value : 'auto',
        description : 'build and install man pages')
-
+option('compat-symlink', type : 'boolean',
+       value : 'false',
+       description : 'create lastlog compat symlink')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lastlog2-1.0.1/src/lastlog2.c 
new/lastlog2-1.1.0/src/lastlog2.c
--- old/lastlog2-1.0.1/src/lastlog2.c   2023-04-05 16:23:04.000000000 +0200
+++ new/lastlog2-1.1.0/src/lastlog2.c   2023-04-11 11:55:40.000000000 +0200
@@ -42,11 +42,12 @@
 static time_t b_days = 0;
 static int tflg = 0;
 static time_t t_days = 0;
+static int sflg = 0;
 
 static int
 print_entry (const char *user, time_t ll_time,
             const char *tty, const char *rhost,
-            const char *pam_service __attribute__((__unused__)))
+            const char *pam_service)
 {
   static int once = 0;
   char *datep;
@@ -79,11 +80,14 @@
 
   if (!once)
     {
-      printf ("Username         Port     From%*s Latest\n", maxIPv6Addrlen-4, 
" ");
+      printf ("Username         Port     From%*s Latest%*s%s\n",
+             maxIPv6Addrlen-4, " ",
+             sflg?(int)strlen (datep)-5:0, " ", sflg?"Service":"");
       once = 1;
     }
-  printf ("%-16s %-8.8s %*s %s\n", user, tty ? tty : "",
-         -maxIPv6Addrlen, rhost ? rhost : "", datep);
+  printf ("%-16s %-8.8s %*s %s%*s%s\n", user, tty ? tty : "",
+         -maxIPv6Addrlen, rhost ? rhost : "", datep,
+         sflg?31-(int)strlen(datep):0, " ", 
sflg?(pam_service?pam_service:""):"");
 
   return 0;
 }
@@ -101,6 +105,7 @@
   fputs ("  -h, --help            Display this help message and exit\n", 
output);
   fputs ("  -i, --import FILE     Import data from old lastlog file\n", 
output);
   fputs ("  -r, --rename NEWNAME  Rename existing user to NEWNAME (requires 
-u)\n", output);
+  fputs ("  -s, --service SERVICE Display PAM service\n", output);
   fputs ("  -S, --set             Set lastlog record to current time (requires 
-u)\n", output);
   fputs ("  -t, --time DAYS       Print only lastlog records more recent than 
DAYS\n", output);
   fputs ("  -u, --user LOGIN      Print lastlog record of the specified 
LOGIN\n", output);
@@ -129,6 +134,7 @@
     {"help",     no_argument,       NULL, 'h'},
     {"import",   required_argument, NULL, 'i'},
     {"rename",   required_argument, NULL, 'r'},
+    {"service",  no_argument,       NULL, 's'},
     {"set",      no_argument,       NULL, 'S'},
     {"time",     required_argument, NULL, 't'},
     {"user",     required_argument, NULL, 'u'},
@@ -146,7 +152,7 @@
   const char *lastlog_file = NULL;
   int c;
 
-  while ((c = getopt_long (argc, argv, "b:Cd:hi:r:St:u:v", longopts, NULL)) != 
-1)
+  while ((c = getopt_long (argc, argv, "b:Cd:hi:r:sSt:u:v", longopts, NULL)) 
!= -1)
     {
       switch (c)
        {
@@ -184,6 +190,9 @@
          rflg = 1;
          newname = optarg;
          break;
+       case 's':
+         sflg = 1;
+         break;
        case 'S':
          /* Set lastlog record of a user to the current time. */
          Sflg = 1;

Reply via email to