Bug#951216: poppler-utils: pdfinfo incorrectly reports date metadata under reprotest

Chris Lamb lamby at debian.org
Thu Feb 13 15:27:09 GMT 2020


user reproducible-builds at lists.alioth.debian.org
usertag 951216 + toolchain timestamps
thanks

> poppler-utils: pdfinfo incorrectly reports date metadata under reprotest

It's unclear to me whether this is a bug in Poppler or reprotest. When
I try and reproduce this outside of reprotest, for example with something
like:

  $ TZ="/usr/share/zoneinfo/Etc/GMT-14" pdfinfo foo.pdf

… and:

  $ TZ="/usr/share/zoneinfo/Etc/GMT+12" pdfinfo foo.pdf

… I get the expected results. Saying that, poppler has the following
"smoking gun"-like comment:

    // TODO do something with the timezone info

… but that curiously is then followed by code that appears to do
something with the timezone info:

    s = obj.getString()->c_str();
    // TODO do something with the timezone info
    if ( parseDateString( s, &year, &mon, &day, &hour, &min, &sec, &tz, &tz_hour, &tz_minute ) ) {
      tmStruct.tm_year = year - 1900;
      tmStruct.tm_mon = mon - 1;
      tmStruct.tm_mday = day;
      tmStruct.tm_hour = hour;
      tmStruct.tm_min = min;
      tmStruct.tm_sec = sec;
      tmStruct.tm_wday = -1;
      tmStruct.tm_yday = -1;
      tmStruct.tm_isdst = -1;
      // compute the tm_wday and tm_yday fields
      time = timegm(&tmStruct);
      if (time != (time_t)-1) {
	int offset = (tz_hour*60 + tz_minute)*60;
	if (tz == '-')
	  offset *= -1;
	time -= offset;
	localtime_r(&time, &tmStruct);
	strftime(buf, sizeof(buf), "%c %Z", &tmStruct);
	fputs(buf, stdout);

But I might be missing something.

Can I suggest two things at this point? First, could you attach your
generated test.pdf to this bug so that we are completely on the same
page and using the exactly the same file? Secondly, perhaps you could
systematically alter the settings of reprotest in order to identify
which is the variation employed that is causing this to happen?


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-



More information about the Pkg-freedesktop-maintainers mailing list