File reproducible.patch of Package libisofs

Index: libisofs-1.5.2/libisofs/make_isohybrid_mbr.c
===================================================================
--- libisofs-1.5.2.orig/libisofs/make_isohybrid_mbr.c
+++ libisofs-1.5.2/libisofs/make_isohybrid_mbr.c
@@ -153,6 +153,7 @@ int make_isohybrid_mbr(int bin_lba, int
     static int h = 64, s = 32;
 
     int i, id;
+    char *source_date_epoch;
     char *wpt;
     off_t imgsize, cylsize, frac, padding, c, cc;
 
@@ -213,7 +214,9 @@ int make_isohybrid_mbr(int bin_lba, int
      125: Whatever, i use some 32-bit random value with no crypto strength.
      */
     gettimeofday(&tv, NULL);
-    id = 0xffffffff & (tv.tv_sec ^ (tv.tv_usec * 2000));
+    if ((source_date_epoch = getenv("SOURCE_DATE_EPOCH")) == NULL ||
+    (id = strtoll(source_date_epoch, NULL, 10)) <= 0)
+        id = 0xffffffff & (tv.tv_sec ^ (tv.tv_usec * 2000));
 
     /*
      126: Adds 4 id bytes and 2 zero bytes.
openSUSE Build Service is sponsored by