Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package umockdev for openSUSE:Factory 
checked in at 2024-04-16 20:02:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/umockdev (Old)
 and      /work/SRC/openSUSE:Factory/.umockdev.new.26366 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "umockdev"

Tue Apr 16 20:02:52 2024 rev:19 rq:1167664 version:0.18.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/umockdev/umockdev.changes        2024-03-18 
16:43:27.488521587 +0100
+++ /work/SRC/openSUSE:Factory/.umockdev.new.26366/umockdev.changes     
2024-04-16 20:03:07.294856276 +0200
@@ -1,0 +2,8 @@
+Wed Apr 10 14:58:38 UTC 2024 - Atri Bhattacharya <badshah...@gmail.com>
+
+- Update to version 0.18.1:
+  * preload: Provide wrappers for functions specific to 64-bit
+    time_t.
+  * preload: Fix building with _FILE_OFFSET_BITS.
+
+-------------------------------------------------------------------

Old:
----
  umockdev-0.18.0.tar.xz

New:
----
  umockdev-0.18.1.tar.xz

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

Other differences:
------------------
++++++ umockdev.spec ++++++
--- /var/tmp/diff_new_pack.uUxicZ/_old  2024-04-16 20:03:09.758946854 +0200
+++ /var/tmp/diff_new_pack.uUxicZ/_new  2024-04-16 20:03:09.758946854 +0200
@@ -19,7 +19,7 @@
 %define shlib libumockdev0
 %define shlibpre libumockdev-preload0
 Name:           umockdev
-Version:        0.18.0
+Version:        0.18.1
 Release:        0
 Summary:        Mock hardware devices for creating unit tests and bug reporting
 License:        LGPL-2.1-or-later

++++++ umockdev-0.18.0.tar.xz -> umockdev-0.18.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umockdev-0.18.0/.version new/umockdev-0.18.1/.version
--- old/umockdev-0.18.0/.version        2024-03-03 08:35:10.200798700 +0100
+++ new/umockdev-0.18.1/.version        2024-03-24 11:52:22.607220400 +0100
@@ -1 +1 @@
-0.18.0
+0.18.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umockdev-0.18.0/meson.build 
new/umockdev-0.18.1/meson.build
--- old/umockdev-0.18.0/meson.build     2024-03-03 08:33:20.000000000 +0100
+++ new/umockdev-0.18.1/meson.build     2024-03-24 11:49:19.000000000 +0100
@@ -41,6 +41,8 @@
   cc.get_supported_arguments(
     # Vala doesn't have `const void*`, or a way to selectively #pragma these 
in the code
     '-Wno-error=discarded-qualifiers',
+    # spi_ioc_transfer.[rx]x_buf are pointers, but declared u64 everywhere; 
Vala can't selectively #pragma these
+    '-Wno-error=pointer-to-int-cast',
     # mostly const dropping and dropped "volatile" in fully autogenerated code;
     # upstream Vala does not support fixing this warning
     '-Wno-error=incompatible-pointer-types',
@@ -101,6 +103,7 @@
 vapi_posix = valac.find_library('posix')
 vapi_linux = valac.find_library('linux')
 vapi_linux_fixes = valac.find_library('linux_fixes', dirs: srcdir)
+vapi_glibc = valac.find_library('glibc', dirs: srcdir)
 vala_libudev = cc.find_library('udev')
 vala_libutil = cc.find_library('util')
 
@@ -254,6 +257,7 @@
 
 add_test_setup('valgrind',
   exe_wrapper: [srcdir / 'umockdev-wrapper', 'valgrind', '-q', 
'--leak-check=full', '--show-possibly-lost=no',
+    '--gen-suppressions=all', '--suppressions=' + srcdir / 'valgrind.supp',
     '--errors-for-leak-kinds=definite', '--error-exitcode=33',
     '--trace-children=yes', 
'--trace-children-skip=/bin*,/usr/bin/*,/usr/local/bin/*'],
   timeout_multiplier: 10,
@@ -278,7 +282,7 @@
 
   test('umockdev-vala', executable('test-umockdev-vala',
       'tests/test-umockdev-vala.vala',
-      dependencies: [glib, gobject, gio, gudev, vapi_posix, vapi_assertions, 
vapi_ioctl, vapi_selinux, selinux],
+      dependencies: [glib, gobject, gio, gudev, vapi_posix, vapi_assertions, 
vapi_ioctl, vapi_glibc, vapi_selinux, selinux],
       link_with: [umockdev_lib, umockdev_utils_lib],
       vala_args: optional_defines),
     depends: [preload_lib],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umockdev-0.18.0/src/glibc.vapi 
new/umockdev-0.18.1/src/glibc.vapi
--- old/umockdev-0.18.0/src/glibc.vapi  1970-01-01 01:00:00.000000000 +0100
+++ new/umockdev-0.18.1/src/glibc.vapi  2024-03-24 11:49:19.000000000 +0100
@@ -0,0 +1,14 @@
+[CCode (cheader_filename = "sys/utsname.h")]
+namespace GLibc {
+    [CCode (cname = "struct utsname", destroy_function="")]
+    public struct Utsname {
+        unowned string sysname;
+        unowned string nodename;
+        unowned string release;
+        unowned string version;
+        unowned string machine;
+    }
+
+    [CCode (cname = "uname")]
+    public void uname (out Utsname buf);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umockdev-0.18.0/src/libumockdev-preload.c 
new/umockdev-0.18.1/src/libumockdev-preload.c
--- old/umockdev-0.18.0/src/libumockdev-preload.c       2024-03-03 
08:33:20.000000000 +0100
+++ new/umockdev-0.18.1/src/libumockdev-preload.c       2024-03-24 
11:49:19.000000000 +0100
@@ -22,12 +22,30 @@
  * along with umockdev; If not, see <http://www.gnu.org/licenses/>.
  */
 
-/* override -D_FILE_OFFSET_BITS, it breaks us */
-#undef _FILE_OFFSET_BITS
-
 /* for getting stat64 */
 #define _GNU_SOURCE
 
+#include <features.h>
+
+#ifdef __GLIBC__
+/* Remove gcc asm aliasing so that our interposed symbols work as expected */
+#include <sys/cdefs.h>
+
+#include <stddef.h>
+extern int __REDIRECT_NTH (__ttyname_r_alias, (int __fd, char *__buf,
+                                               size_t __buflen), ttyname_r);
+
+#ifdef __REDIRECT
+#undef __REDIRECT
+#endif
+#define __REDIRECT(name, proto, alias) name proto
+#ifdef __REDIRECT_NTH
+#undef __REDIRECT_NTH
+#endif
+#define __REDIRECT_NTH(name, proto, alias) name proto __THROW
+
+#endif /* __GLIBC__ */
+
 #include <assert.h>
 #include <errno.h>
 #include <dirent.h>
@@ -63,6 +81,14 @@
 #include "utils.h"
 #include "ioctl_tree.h"
 
+#ifdef __GLIBC__
+/* Fixup for making a mess with __REDIRECT above */
+#ifdef __USE_TIME_BITS64
+#define clock_gettime __clock_gettime64
+extern int clock_gettime(clockid_t clockid, struct timespec *tp);
+#endif
+#endif
+
 /* fix missing O_TMPFILE on some systems */
 #ifndef O_TMPFILE
 #define O_TMPFILE (__O_TMPFILE | O_DIRECTORY)
@@ -1213,6 +1239,8 @@
  * the emulated /dev to indicate a block device (the sticky bit has no
  * real functionality for device nodes) */
 #define WRAP_STAT(prefix, suffix) \
+extern int prefix ## stat ## suffix (const char *path, \
+                                     struct stat ## suffix *st); \
 int prefix ## stat ## suffix (const char *path, struct stat ## suffix *st) \
 { \
     const char *p;                                                             
\
@@ -1233,6 +1261,8 @@
 
 /* wrapper template for fstatat family */
 #define WRAP_FSTATAT(prefix, suffix) \
+extern int prefix ## fstatat ## suffix (int dirfd, const char *path, \
+                                        struct stat ## suffix *st, int flags); 
\
 int prefix ## fstatat ## suffix (int dirfd, const char *path, struct stat ## 
suffix *st, int flags) \
 { \
     const char *p;                                                             
\
@@ -1390,6 +1420,12 @@
 WRAP_STAT(l,64);
 WRAP_FSTATAT(,64);
 WRAP_FOPEN(,64);
+#if defined(__USE_FILE_OFFSET64) && defined(__USE_TIME_BITS64)
+#define stat64_time64 stat64
+WRAP_STAT(__,64_time64);
+WRAP_STAT(__l,64_time64);
+WRAP_FSTATAT(__,64_time64);
+#endif
 #endif
 
 WRAP_3ARGS(ssize_t, -1, readlink, char *, size_t);
@@ -1759,6 +1795,18 @@
     return ret;
 }
 
+extern ssize_t __recvmsg64(int sockfd, struct msghdr * msg, int flags);
+ssize_t
+__recvmsg64(int sockfd, struct msghdr * msg, int flags)
+{
+    libc_func(__recvmsg64, int, int, struct msghdr *, int);
+    ssize_t ret = ___recvmsg64(sockfd, msg, flags);
+
+    netlink_recvmsg(sockfd, msg, ret);
+
+    return ret;
+}
+
 int
 socket(int domain, int type, int protocol)
 {
@@ -1876,6 +1924,42 @@
     return result;
 }
 
+#ifdef __GLIBC__
+
+extern int __ioctl_time64 (int __fd, unsigned long int __request, ...) __THROW;
+int
+__ioctl_time64(int d, IOCTL_REQUEST_TYPE request, ...)
+{
+    libc_func(__ioctl_time64, int, int, IOCTL_REQUEST_TYPE, ...);
+    int result;
+    va_list ap;
+    void* arg;
+
+    /* one cannot reliably forward arbitrary varargs
+     * (http://c-faq.com/varargs/handoff.html), but we know that ioctl gets at
+     * most one extra argument, and almost all of them are pointers or ints,
+     * both of which fit into a void*.
+     */
+    va_start(ap, request);
+    arg = va_arg(ap, void*);
+    va_end(ap);
+
+    result = remote_emulate(d, IOCTL_REQ_IOCTL, (unsigned int) request, (long) 
arg);
+    if (result != UNHANDLED) {
+       DBG(DBG_IOCTL, "ioctl fd %i request %X: emulated, result %i\n", d, 
(unsigned) request, result);
+       return result;
+    }
+
+    /* fallback to call original ioctl */
+    result = ___ioctl_time64(d, request, arg);
+    DBG(DBG_IOCTL, "ioctl fd %i request %X: original, result %i\n", d, 
(unsigned) request, result);
+
+    return result;
+}
+
+#endif /* __GLIBC__ */
+
+
 int
 isatty(int fd)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umockdev-0.18.0/src/valgrind.supp 
new/umockdev-0.18.1/src/valgrind.supp
--- old/umockdev-0.18.0/src/valgrind.supp       1970-01-01 01:00:00.000000000 
+0100
+++ new/umockdev-0.18.1/src/valgrind.supp       2024-03-24 11:49:19.000000000 
+0100
@@ -0,0 +1,11 @@
+# started on Debian testing in March 2024
+{
+   dyn_linker_invalid_write
+   Memcheck:Addr8
+   obj:/usr/lib/x86_64-linux-gnu/liblzma.so.5.6.0
+   ...
+   fun:elf_machine_rela
+   fun:elf_dynamic_do_Rela
+   fun:_dl_relocate_object
+   ...
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umockdev-0.18.0/tests/test-umockdev-run.vala 
new/umockdev-0.18.1/tests/test-umockdev-run.vala
--- old/umockdev-0.18.0/tests/test-umockdev-run.vala    2024-03-03 
08:33:20.000000000 +0100
+++ new/umockdev-0.18.1/tests/test-umockdev-run.vala    2024-03-24 
11:49:19.000000000 +0100
@@ -214,7 +214,12 @@
 
 #if HAVE_SELINUX
     // we may run on a system without SELinux
-    if (FileUtils.test("/sys/fs/selinux", FileTest.EXISTS)) {
+    try {
+        Process.spawn_command_line_sync ("command -v selinuxenabled", null, 
null, out exit);
+    } catch (SpawnError e) {
+        exit = 1;
+    }
+    if (exit == 0) {
         check_program_out("true", "-d " + umockdev_file + " -- stat -c %C 
/dev/loop23",
                           "system_u:object_r:fixed_disk_device_t:s0\n");
     } else {
@@ -352,7 +357,12 @@
 
 #if HAVE_SELINUX
     // we may run on a system without SELinux
-    if (FileUtils.test("/sys/fs/selinux", FileTest.EXISTS)) {
+    try {
+        Process.spawn_command_line_sync ("command -v selinuxenabled", null, 
null, out exit);
+    } catch (SpawnError e) {
+        exit = 1;
+    }
+    if (exit == 0) {
         string orig_context;
         assert_cmpint (Selinux.lgetfilecon ("/dev/null", out orig_context), 
CompareOperator.GT, 0);
         check_program_out("true", "-d " + umockdev_file + " -- stat -c %C 
/dev/null", orig_context + "\n");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umockdev-0.18.0/tests/test-umockdev-vala.vala 
new/umockdev-0.18.1/tests/test-umockdev-vala.vala
--- old/umockdev-0.18.0/tests/test-umockdev-vala.vala   2024-03-03 
08:33:20.000000000 +0100
+++ new/umockdev-0.18.1/tests/test-umockdev-vala.vala   2024-03-24 
11:49:19.000000000 +0100
@@ -20,6 +20,7 @@
 
 using UMockdevUtils;
 using Assertions;
+using GLibc;
 
 #if HAVE_SELINUX
 using Selinux;
@@ -202,7 +203,13 @@
 void
 t_testbed_selinux ()
 {
-  if (!FileUtils.test("/sys/fs/selinux", FileTest.EXISTS)) {
+  int exit;
+  try {
+      Process.spawn_command_line_sync ("command -v selinuxenabled", null, 
null, out exit);
+  } catch (SpawnError e) {
+      exit = 1;
+  }
+  if (exit != 0) {
       stdout.printf ("[SKIP SELinux not active]\n");
       return;
   }
@@ -549,6 +556,13 @@
   string device;
   Ioctl.usbdevfs_urb* urb_reap = null;
 
+  GLibc.Utsname utsbuf;
+  GLibc.uname (out utsbuf);
+  if (utsbuf.machine ==  "sparc64") {
+      stdout.printf ("[SKIP pre-recorded pcap does not work on sparc64]\n");
+      return;
+  }
+
   /* NOTE: This test is a bit ugly. It wasn't the best idea to use a USB 
keyboard. */
 
   checked_file_get_contents (Path.build_filename(rootdir + 
"/devices/input/usbkbd.pcap.umockdev"), out device);
@@ -696,6 +710,7 @@
   tx_buf[1] = 0xff;
 
   Posix.memset (xfer, 0, sizeof (Ioctl.spi_ioc_transfer) * 2);
+  /* these casts are evil, bad, and wrong -- but that's how Linux defines 
them, even 32 bit platforms have u64 */
   xfer[0].tx_buf = (uint64) tx_buf;
   xfer[0].len = 2;
   xfer[1].rx_buf = (uint64) rx_buf;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umockdev-0.18.0/tests/test-umockdev.c 
new/umockdev-0.18.1/tests/test-umockdev.c
--- old/umockdev-0.18.0/tests/test-umockdev.c   2024-03-03 08:33:20.000000000 
+0100
+++ new/umockdev-0.18.1/tests/test-umockdev.c   2024-03-24 11:49:19.000000000 
+0100
@@ -1578,7 +1578,12 @@
   int fd;
   char buf[1024];
 
+#if __BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64)
   struct timeval dummy = {0};
+#else
+  __kernel_ulong_t dummy = 0;
+#endif
+
   /* Simple evdev stream - x coordinate followed by SYN, times 2 */
   struct input_event dummy_events[] = {
       {dummy, 0003, 0000, 2534},

Reply via email to