Bug#891194: 3dldf: please make the build reproducible

2019-08-02 Thread Chris Lamb
[Adding reproducible-b...@lists.alioth.debian.org to CC]

Hi Hilmar,

> The provided patch disables time stamping in general. I don't think this
> is a good idea, as users might complain about changed program behavior.

Is that likely? Genuine question. :)

> Could you extend the patch so the program obeys the SOURCE_DATE_EPOCH
> variable and changes its behavior only if that variable is set?

Yes, but is this really worth any potential "regression" when compared
to the admittedly-minor additionally code complexity you are proposing?

Note that if we do change the behaviour based on SOURCE_DATE_EPOCH we
have two options. First, we simply hide the date if this variable is
exported or secondly we do some ugly parsing and use the value of this
variable instead.

(Naturally, the former is somewhat simpler.)


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org  chris-lamb.co.uk
   `-



Bug#891194: 3dldf: please make the build reproducible

2019-07-31 Thread Hilmar Preuße
Am 23.02.2018 um 11:10 teilte Chris Lamb mit:

Hi Chris,

> Whilst working on the Reproducible Builds effort [0], we noticed
> that 3dldf could not be built reproducibly as it needlessly
> includes timestamps in the generated (eg.) dodec_03.mp files.
> 
> Patch attached. An alternative would be to parse SOURCE_DATE_EPOCH
> [1].
> 
The provided patch disables time stamping in general. I don't think this
is a good idea, as users might complain about changed program behavior.
Could you extend the patch so the program obeys the SOURCE_DATE_EPOCH
variable and changes its behavior only if that variable is set?

Thanks,
  Hilmar
-- 
sigfault
#206401 http://counter.li.org



signature.asc
Description: OpenPGP digital signature


Bug#891194: 3dldf: please make the build reproducible

2019-01-29 Thread Hilmar Preuße
forwarded 891194 https://savannah.gnu.org/bugs/?55605
stop

On 23.02.18 11:10, Chris Lamb wrote:

Hi Chris,

> Whilst working on the Reproducible Builds effort [0], we noticed
> that 3dldf could not be built reproducibly as it needlessly
> includes timestamps in the generated (eg.) dodec_03.mp files.
> 
> Patch attached. An alternative would be to parse SOURCE_DATE_EPOCH
>
I tend to leave these kind of decisions to upstream authors. I've
forwarded the issue to upstream, but I have only small hope, that there
will be a reaction. I've got E-Mails form LDF, but mostly he only
promised to do something.

Hilmar
-- 
sigfault
#206401 http://counter.li.org



signature.asc
Description: OpenPGP digital signature


Bug#891194: 3dldf: please make the build reproducible

2018-02-23 Thread Chris Lamb
Source: 3dldf
Version: 2.0.3+dfsg-7
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed
that 3dldf could not be built reproducibly as it needlessly
includes timestamps in the generated (eg.) dodec_03.mp files.

Patch attached. An alternative would be to parse SOURCE_DATE_EPOCH
[1].

 [0] https://reproducible-builds.org/
 [1] https://reproducible-builds.org/specs/source-date-epoch/


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-
--- a/debian/patches/reproducible-build.patch   1970-01-01 01:00:00.0 
+0100
--- b/debian/patches/reproducible-build.patch   2018-02-23 09:19:05.116436650 
+
@@ -0,0 +1,111 @@
+Description: Make the build reproducible
+Author: Chris Lamb 
+Last-Update: 2018-02-23
+
+--- 3dldf-2.0.3+dfsg.orig/src/io.web
 3dldf-2.0.3+dfsg/src/io.web
+@@ -771,13 +771,6 @@ void
+ initialize_io(string in_stream_name, string out_stream_name,
+   string tex_stream_name, char* program_name)
+ {
+-  time_t tt;
+-  tm *lt;
+-  tt = time(0);
+-  lt =localtime();
+-
+-  string datestamp(asctime(lt));
+-  datestamp.erase(datestamp.size() - 1); // Remove terminal line-feed.
+ 
+ @ Open |out_stream| and |tex_stream|.  
+ |in_stream| is currently not opened.  \initials{LDF 2003.08.29.}  
+@@ -800,14 +793,14 @@ initialize_io(string in_stream_name, str
+ 
+   tex_stream.open(tex_stream_name.c_str());
+ 
+-  /* Write datestamp to |out_stream|. */
++  /* Write program_name to |out_stream|. */
+   out_stream << " This is " << out_stream_name << "." << endl
+-<< " Generated on " << datestamp << " from " << program_name
++<< " Generated from " << program_name
+   << ".\n\n";
+ 
+-  /* Write datestamp to |tex_stream|. */
++  /* Write program_name to |tex_stream|. */
+   tex_stream << " This is " << tex_stream_name << "." << endl
+-<< " Generated on " << datestamp << " from " << program_name
++<< " Generated from " << program_name
+   << ".\n\n";
+ }
+ 
+--- 3dldf-2.0.3+dfsg.orig/src/main.web
 3dldf-2.0.3+dfsg/src/main.web
+@@ -1266,20 +1266,10 @@ Added |do|---|while| loop that wraps the
+ #endif 
+ #endif 
+ 
+-  time_t tt;
+-  tm *lt;
+-  tt = time(0);
+-  lt =localtime();
+-
+-  string datestamp(asctime(lt));
+-  datestamp.erase(datestamp.size() - 1); /*  Remove terminal line-feed.  
*/
+-
+-
+   *(scanner_node_stdin->out[Run_State::METAPOST]->stream_ptr) 
+  << " " << default_out_filename_metapost 
+  << "." << endl
+- << " Generated on " << datestamp << endl 
+- << " from standard input by GNU 3DLDF "
++ << " Generated from standard input by GNU 3DLDF "
+  << VERSION_3DLDF << "."
+  << endl << endl << flush; 
+ 
+--- 3dldf-2.0.3+dfsg.orig/src/pspglb.web
 3dldf-2.0.3+dfsg/src/pspglb.web
+@@ -1861,17 +1861,8 @@ Thread_Info_Type::get_thread_info(bool c
+ 
+thread_info->log_stream.open(s.str().c_str());
+ 
+-   time_t tt;
+-   tm *lt;
+-   tt = time(0);
+-   lt =localtime();
+-
+-   string datestamp(asctime(lt));
+-   datestamp.erase(datestamp.size() - 1); /*  Remove terminal line-feed.  */
+-
+thread_info->log_stream << " " << s.str() << endl
+-   << " Generated on " 
+-   << datestamp << " from GNU 3DLDF " 
++   << " Generated from GNU 3DLDF " 
+<< VERSION_3DLDF << "." 
+<< endl << endl << flush;
+thread_ctr++;
+--- 3dldf-2.0.3+dfsg.orig/src/sctpcrt.web
 3dldf-2.0.3+dfsg/src/sctpcrt.web
+@@ -632,14 +632,6 @@ needed, because this function predefines
+ 
+ @=
+ 
+-  time_t tt;
+-  tm *lt;
+-  tt = time(0);
+-  lt =localtime();
+-
+-  string datestamp(asctime(lt));
+-  datestamp.erase(datestamp.size() - 1); // Remove terminal line-feed.
+-
+   if (  scanner_node->in->type 
+  == Io_Struct::FILE_TYPE 
+   && r.do_output[Run_State::METAPOST])
+@@ -662,8 +654,7 @@ needed, because this function predefines
+ #endif 
+   
+   *out_file_metapost << " " << out_filename_metapost << "." << endl
+- << " Generated on " << datestamp << endl 
+- << " from " << in_filename << " by "
++ << " Generated from " << in_filename << " by "
+  << "GNU 3DLDF " << VERSION_3DLDF << "."
+  << endl << endl << flush; 
+ 
--- a/debian/patches/series 2018-02-23 08:44:45.856096353 +
--- b/debian/patches/series 2018-02-23 09:19:04.060442545 +
@@ -10,3 +10,4 @@