libtracker-miners-common: Add newstatat/statat64 syscalls
This MR is against a potential debian/bullseye
branch based on the debian/2.3.5-2
tag. I'm happy to prepare a release and ask for a freeze exception if this looks sane.
Backport upstream commit b3fdbaf1 to avoid constant crashes every 2s like
Program terminated with signal SIGSYS, Bad system call.
#0 __GI___xstat (vers=<optimized out>, name=0xffff803cd178 "/etc/localtime", buf=0xffff4ae26bd0) at ../sysdeps/unix/sysv/linux/generic/xstat.c:36
36 ../sysdeps/unix/sysv/linux/generic/xstat.c: No such file or directory.
[Current thread is 1 (Thread 0xffff4ae28050 (LWP 3217))]
(gdb) bt
#0 __GI___xstat (vers=<optimized out>, name=0xffff803cd178 "/etc/localtime", buf=0xffff4ae26bd0) at ../sysdeps/unix/sysv/linux/generic/xstat.c:36
#1 0x0000ffff8033411c in __tzfile_read (file=file@entry=0xffff803cd178 "/etc/localtime", extra=extra@entry=0, extrap=extrap@entry=0x0) at tzfile.c:155
#2 0x0000ffff80333cd0 in tzset_internal (always=always@entry=1) at tzset.c:405
#3 0x0000ffff80333e14 in __tzset () at tzset.c:551
#4 0x0000ffff80332b14 in __GI_mktime (tp=tp@entry=0xffff4ae26d00) at mktime.c:529
#5 0x0000ffff8094e7a0 in tracker_date_format_to_iso8601 (date_string=date_string@entry=0xffff4ae26d68 "2021:04:26 16:10:14", format=format@entry=0xffff80952200 "%Y:%m:%d %H:%M:%S")
at ../src/libtracker-extract/tracker-utils.c:464
#6 0x0000ffff8094a4a8 in get_date (exif=exif@entry=0xffff2c00ff20, tag=tag@entry=EXIF_TAG_DATE_TIME) at ../src/libtracker-extract/tracker-exif.c:83
#7 0x0000ffff8094b154 in parse_exif (buffer=buffer@entry=0xffff2c014840 "Exif", len=len@entry=342, data=data@entry=0xffff2c00f6e0, uri=0xffff2c0105d0 "file:///home/purism/Pictures/IMG20210426161014.jpg")
at ../src/libtracker-extract/tracker-exif.c:478
#8 0x0000ffff8094bc7c in tracker_exif_new (buffer=buffer@entry=0xffff2c014840 "Exif", len=len@entry=342, uri=uri@entry=0xffff2c0105d0 "file:///home/purism/Pictures/IMG20210426161014.jpg")
at ../src/libtracker-extract/tracker-exif.c:614
#9 0x0000ffff7c32faec in tracker_extract_get_metadata (info=0xaaaad820b040) at ../src/tracker-extract/tracker-extract-jpeg.c:230
#10 0x0000aaaab303f620 in get_file_metadata (task=task@entry=0xaaaad850f590, info_out=info_out@entry=0xffff4ae277e0) at ../src/tracker-extract/tracker-extract.c:302
#11 0x0000aaaab303fd80 in get_metadata (task=0xaaaad850f590) at ../src/tracker-extract/tracker-extract.c:511
#12 0x0000aaaab303fdd4 in single_thread_get_metadata (queue=0xaaaad8515200) at ../src/tracker-extract/tracker-extract.c:539
#13 0x0000ffff805468f4 in g_thread_proxy (data=0xaaaad8522a40) at ../../../glib/gthread.c:820
#14 0x0000ffff80419628 in start_thread (arg=0xffff4ae27950) at pthread_create.c:477
#15 0x0000ffff8037101c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78
Closes: #983637
Edited by Guido Günther