Source: mandos
Version: 1.8.11-1
Severity: important
Tags: patch upstream

mandos fails to build from source with glibc 2.31:

| g++ -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security -fPIC -c -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DREMOTE_KBD -DSDNOTIFY 
-DLIRC_DEVICE=\"/var/run/lirc/lircd\" -DVIDEODIR=\"/var/lib/video\" 
-DCONFDIR=\"/var/lib/vdr\" -DARGSDIR=\"/etc/vdr/conf.d\" 
-DCACHEDIR=\"/var/cache/vdr\" -DRESDIR=\"/usr/share/vdr\" 
-DPLUGINDIR=\"/usr/lib/vdr/plugins\" -DLOCDIR=\"/usr/share/locale\" 
-I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16   -o 
eitscan.o eitscan.c
| eit.c: In constructor ‘cTDT::cTDT(const u_char*)’:
| eit.c:394:13: error: ‘stime’ was not declared in this scope; did you mean 
‘ctime’?
|   394 |         if (stime(&dvbtim) == 0)
|       |             ^~~~~
|       |             ctime
| make[2]: *** [Makefile:135: eit.o] Error 1
| make[2]: *** Waiting for unfinished jobs....
| make[2]: Leaving directory '/<<PKGBUILDDIR>>'
| dh_auto_build: error: make -j4 "INSTALL=install --strip-program=true" 
PREFIX=/usr VIDEODIR=/var/lib/video LIBDIR=/usr/lib/vdr/plugins SDNOTIFY=1 
VERBOSE=1 returned exit code 2
| make[1]: *** [debian/rules:17: override_dh_auto_build] Error 25
| make[1]: Leaving directory '/<<PKGBUILDDIR>>'
| make: *** [debian/rules:14: build] Error 2
| dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

The full build log is available there:
http://qa-logs.debian.net/2020/06/24/mandos_1.8.11-1_unstable_glibc-exp.log

The stime function has been marked as obsolete for some time, and since
glibc 2.31 it is no longer available to newly linked binaries. The
clock_settime function should be used instead.

You will find attached a patch fixing that. It would be nice if it can
be fixed relatively soon so that we can start the transition.

Regards,
Aurelien
diff -Nru mandos-1.8.11/debian/patches/glibc-stime.patch 
mandos-1.8.11/debian/patches/glibc-stime.patch
--- mandos-1.8.11/debian/patches/glibc-stime.patch      1970-01-01 
00:00:00.000000000 +0000
+++ mandos-1.8.11/debian/patches/glibc-stime.patch      2020-07-03 
20:40:43.000000000 +0000
@@ -0,0 +1,17 @@
+The obsolete function stime is no longer available to newly linked binaries
+since glibc 2.31. Replace it by clock_settime.
+
+--- a/plugins.d/mandos-client.c
++++ b/plugins.d/mandos-client.c
+@@ -396,9 +396,8 @@ static bool init_gpgme(const char * cons
+       fprintf_plus(stderr,
+                    "Setting system clock to key file mtime");
+       }
+-      time_t keytime = keystat.st_mtim.tv_sec;
+-      if(stime(&keytime) != 0){
+-      perror_plus("stime");
++      if(clock_settime(CLOCK_REALTIME, &keystat.st_mtim) != 0){
++      perror_plus("clock_settime");
+       }
+       ret = lower_privileges();
+       if(ret != 0){
diff -Nru mandos-1.8.11/debian/patches/series 
mandos-1.8.11/debian/patches/series
--- mandos-1.8.11/debian/patches/series 1970-01-01 00:00:00.000000000 +0000
+++ mandos-1.8.11/debian/patches/series 2020-07-03 20:40:43.000000000 +0000
@@ -0,0 +1 @@
+glibc-stime.patch

Reply via email to