Your message dated Mon, 25 Nov 2024 18:20:28 +0000
with message-id <[email protected]>
and subject line Bug#783513: fixed in cdrkit 9:1.1.11-4
has caused the Debian Bug report #783513,
regarding cdrkit: please allow dates in PVD to be set
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
783513: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=783513
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: cdrkit
Version: 9:1.1.11-3
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: toolchain timestamps
Hi!
While working on the “reproducible builds” effort [1], we have noticed
that ISO images created by genisoimages could not be reproduced at a
later time. The times written the PVD are always set to the current
clock time. Same goes for RR relocations and files created on the fly
like the boot catalog.
The attached patch adds a “-creation-date” option to which can be
given an arbitrary epoch that will further be used in the PVD and for
the aforementioned files.
[1]: https://wiki.debian.org/ReproducibleBuilds
--
Lunar <[email protected]>
diff --git a/genisoimage/.eltorito.c.swp b/genisoimage/.eltorito.c.swp
new file mode 100644
index 0000000..a49fcbd
Binary files /dev/null and b/genisoimage/.eltorito.c.swp differ
diff --git a/genisoimage/genisoimage.1 b/genisoimage/genisoimage.1
index d05b24a..d69a1d4 100644
--- a/genisoimage/genisoimage.1
+++ b/genisoimage/genisoimage.1
@@ -976,6 +976,12 @@ in the
.I .genisoimagerc
file.
.TP
+.BI \-creation-date " epoch"
+Specifies the date to be used as creation, modification and effective
+date in the volume descriptor and for files and relocations created
+on the fly. Specified as a number of second since
+1970-01-01 00:00:00 +0000 (UTC); if 0, the current time is used.
+.TP
.B \-print\-size
Print estimated filesystem size in multiples of the sector size (2048 bytes)
and exit. This option is needed for
diff --git a/genisoimage/genisoimage.c b/genisoimage/genisoimage.c
index cfd079a..58397e9 100644
--- a/genisoimage/genisoimage.c
+++ b/genisoimage/genisoimage.c
@@ -169,6 +169,7 @@ char *abstract = ABSTRACT_DEFAULT;
char *volset_id = VOLSET_ID_DEFAULT;
char *volume_id = VOLUME_ID_DEFAULT;
char *system_id = SYSTEM_ID_DEFAULT;
+time_t creation_date = 0;
char *boot_catalog = BOOT_CATALOG_DEFAULT;
char *boot_image = BOOT_IMAGE_DEFAULT;
char *genboot_image = BOOT_IMAGE_DEFAULT;
@@ -405,6 +406,8 @@ struct ld_option {
#define OPTION_ALLOW_LEADING_DOTS 1070
#define OPTION_PUBLISHER 1071
+#define OPTION_CREATION_DATE 1072
+
#ifdef JIGDO_TEMPLATE
#define OPTION_JTT_OUTPUT 1101
#define OPTION_JTJ_OUTPUT 1102
@@ -522,6 +525,8 @@ static const struct ld_option ld_options[] =
'\0', "FILE", "Check all ISO9660 names from previous session", ONE_DASH},
{{"copyright", required_argument, NULL, OPTION_COPYRIGHT},
'\0', "FILE", "Set Copyright filename", ONE_DASH},
+ {{"creation-date", required_argument, NULL, OPTION_CREATION_DATE},
+ '\0', NULL, "Set volume creation date", ONE_DASH},
{{"debug", no_argument, NULL, OPTION_DEBUG},
'\0', NULL, "Set debug flag", ONE_DASH},
{{"eltorito-boot", required_argument, NULL, 'b'},
@@ -1721,6 +1726,22 @@ int main(int argc, char *argv[])
#endif
}
break;
+ case OPTION_CREATION_DATE:
+ {
+ char *end = 0;
+
+ creation_date = strtol(optarg, &end, 10);
+ if (!end || *end != 0) {
+#ifdef USE_LIBSCHILY
+ comerrno(EX_BAD, "Bad epoch for -creation-date\n");
+#else
+ fprintf(stderr, "Bad epoch for -creation-date\n");
+ exit(1);
+#endif
+ }
+ break;
+ }
+
case OPTION_DEBUG:
debug++;
break;
diff --git a/genisoimage/genisoimage.h b/genisoimage/genisoimage.h
index bbedfb0..c49576c 100644
--- a/genisoimage/genisoimage.h
+++ b/genisoimage/genisoimage.h
@@ -650,6 +650,7 @@ extern char *appid;
extern char *volset_id;
extern char *system_id;
extern char *volume_id;
+extern time_t creation_date;
extern char *boot_catalog;
extern char *boot_image;
extern char *genboot_image;
diff --git a/genisoimage/tree.c b/genisoimage/tree.c
index 7805888..f17a662 100644
--- a/genisoimage/tree.c
+++ b/genisoimage/tree.c
@@ -783,7 +783,11 @@ generate_reloc_directory()
struct directory_entry *s_entry;
/* Create an entry for our internal tree */
- time(¤t_time);
+ if (creation_date == 0) {
+ time(¤t_time);
+ } else {
+ current_time = creation_date;
+ }
reloc_dir = (struct directory *)
e_malloc(sizeof (struct directory));
memset(reloc_dir, 0, sizeof (struct directory));
@@ -2680,7 +2684,11 @@ init_fstatbuf()
time_t current_time;
if (fstatbuf.st_ctime == 0) {
- time(¤t_time);
+ if (creation_date == 0) {
+ time(¤t_time);
+ } else {
+ current_time = creation_date;
+ }
if (rationalize_uid)
fstatbuf.st_uid = uid_to_use;
else
diff --git a/genisoimage/write.c b/genisoimage/write.c
index a423ab1..f63507c 100644
--- a/genisoimage/write.c
+++ b/genisoimage/write.c
@@ -1885,12 +1885,17 @@ pvd_write(FILE *outfile)
int should_write;
struct tm local;
struct tm gmt;
+ time_t pvd_date;
time(&begun);
- local = *localtime(&begun);
- gmt = *gmtime(&begun);
+ if (creation_date == 0) {
+ creation_date = begun;
+ }
+
+ local = *localtime(&creation_date);
+ gmt = *gmtime(&creation_date);
/*
* There was a comment here about breaking in the year 2000.
signature.asc
Description: Digital signature
--- End Message ---
--- Begin Message ---
Source: cdrkit
Source-Version: 9:1.1.11-4
Done: Andreas Tille <[email protected]>
We believe that the bug you reported is fixed in the latest version of
cdrkit, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Andreas Tille <[email protected]> (supplier of updated cdrkit package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Fri, 15 Nov 2024 18:12:35 +0100
Source: cdrkit
Architecture: source
Version: 9:1.1.11-4
Distribution: unstable
Urgency: medium
Maintainer: Joerg Jaspert <[email protected]>
Changed-By: Andreas Tille <[email protected]>
Closes: 783513 902402 1085409
Changes:
cdrkit (9:1.1.11-4) unstable; urgency=medium
.
[ Andreas Tille ]
* Team upload of Debian team.
* Move packaging to Salsa Debian team
Closes: #1085409
* Standards-Version: 4.7.0 (routine-update)
* Reorder sequence of d/control fields by cme (routine-update)
* Remove trailing whitespace in debian/changelog (routine-update)
* Remove trailing whitespace in debian/control (routine-update)
* Remove trailing whitespace in debian/copyright (routine-update)
* Do not parse d/changelog (routine-update)
* Rules-Requires-Root: no (routine-update)
* Trim trailing whitespace.
* Doe not FTCBS / hides compiler invocations any more since 1.1.11-3.3
thus Closes: #902402
.
[ Lunar ]
* Allow dates in PVD to be set
Closes: #783513
(RIP Lunar!)
Checksums-Sha1:
b24f2a12164f22598a3760933c3207826ccce9c2 2127 cdrkit_1.1.11-4.dsc
785a5cfc71d95c5ba436f2be8c56f2f14b639b76 29888 cdrkit_1.1.11-4.debian.tar.xz
35093db638cd88c3c00cbedc477674e536c42f9e 8684 cdrkit_1.1.11-4_amd64.buildinfo
Checksums-Sha256:
29c99a928373c122b15091fbd7eac4711667bc73bb6fbee3ce2642b617aea040 2127
cdrkit_1.1.11-4.dsc
734912e1c2d43e7075e9c54b1d82e3dd6f027d776b1e822f2d0bd162073c37f6 29888
cdrkit_1.1.11-4.debian.tar.xz
a21c5038ffdf9f20a7dc321bffbc8307d8bad5b7add6b825b3d63344a4ca81a2 8684
cdrkit_1.1.11-4_amd64.buildinfo
Files:
38f8cf0ed6d33fc0439ddf2a16590004 2127 otherosfs optional cdrkit_1.1.11-4.dsc
bc98d23d33cd5aec19dbf929701a79a9 29888 otherosfs optional
cdrkit_1.1.11-4.debian.tar.xz
bf01f8de5fdc783a4bc4b45cb5bca636 8684 otherosfs optional
cdrkit_1.1.11-4_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJFBAEBCAAvFiEE8fAHMgoDVUHwpmPKV4oElNHGRtEFAmc3hqMRHHRpbGxlQGRl
Ymlhbi5vcmcACgkQV4oElNHGRtFDsw/9GNrQqA09TJDLBmsSIopQWCnUQt6yRvia
or1eAEMiYZMvnqTdfK/911yEUc6i/hNd2+PDA0k22YRJh83ON6LqJSMAg3uEwbRp
Q7pm568M5yhVzRcrjSi4Fcj4FCb6q34yM6xMb5tdsqYqNjnbn8Vf3AINUm5B2IGU
EOv2AxkP4Y1g7JIWKUPV/KqH3AM4a2HuipXjIkO78U/dGPGKX3hnruSPEIAIOHgm
i3LUAtGGADHzkcthbfyNRD4tgUTah7UU6Fb2PbJJNBzqd722ghAtv0N/3OdkY8bh
WmTu0Tt9/bG1w3xbptNGo6knznXvCVq+EGFOC/w5uMCDeoYzNLY6GQpZ7mWcHfV3
0GvVM/kPZxa1GNngTok7m2tXpDl6d/BkMmH9RR2G/j62puPl6GuslTQCE1wTfl/C
x7cMWrXLDD+DmUDN66B5NS91/As1Exjyj9Koz6oiTePe5VZirU+EewxZnD6b8/QM
SsazwOaC/zpgAnRIAfECahOMHZfoNGHVGhHkdhMFJQt47IQWlO4OduaT06OVY6lF
KYCjiypF4TV5B7DXtGemWHQETII/I7AIjhyoGOLbRI3LxdF7i5pqrSouTw7FOclG
AKm3Pm+cX38IQd+pHyiAiW9/mzumqcbvop+tZFUPUHGxWIvu142JJTmYfsKEigIy
VfZ5zxV1RD8=
=gen+
-----END PGP SIGNATURE-----
pgpyxvViWV9eq.pgp
Description: PGP signature
--- End Message ---