[Reproducible-commits] [ckbuilder] 03/03: Honor SOURCE_DATE_EPOCH
Boy Ska
boyska-guest at moszumanska.debian.org
Wed Mar 30 04:07:40 UTC 2016
This is an automated email from the git hooks/post-receive script.
boyska-guest pushed a commit to branch pu/reproducible_builds
in repository ckbuilder.
commit 7dba10854fb4f26e934d541cabc6041738e09d06
Author: boyska <piuttosto at logorroici.org>
Date: Wed Mar 30 00:04:05 2016 -0400
Honor SOURCE_DATE_EPOCH
---
debian/changelog | 6 +++
.../patches/now-respects-source-date-epoch.patch | 63 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 70 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 98e47d0..4f53bb9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ckbuilder (2.3.0+dfsg-2.0~reproducible1) UNRELEASED; urgency=medium
+
+ * FIX timestamps in copyright notices
+
+ -- boyska <piuttosto at logorroici.org> Mon, 28 Mar 2016 21:23:15 -0400
+
ckbuilder (2.3.0+dfsg-2) unstable; urgency=medium
* Depends += "libprotobuf-java".
diff --git a/debian/patches/now-respects-source-date-epoch.patch b/debian/patches/now-respects-source-date-epoch.patch
new file mode 100644
index 0000000..6a84658
--- /dev/null
+++ b/debian/patches/now-respects-source-date-epoch.patch
@@ -0,0 +1,63 @@
+Description: respect SOURCE_DATE_EPOCH spec
+ ckbuilder puts a buildtime timestamp both in comments and in other part of
+ generated js. This patch make it observe SOURCE_DATE_EPOCH, so to allow for
+ reproducible builds
+ See https://reproducible-builds.org/specs/source-date-epoch/
+ .
+ ckbuilder (2.3.0+dfsg-2.0~reproducible1) UNRELEASED; urgency=medium
+ .
+ * FIX timestamps in copyright notices
+Author: boyska <piuttosto at logorroici.org>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: https://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- a/src/ckbuilder.js
++++ b/src/ckbuilder.js
+@@ -35,7 +35,11 @@
+ } catch ( e ) {
+ isMinified = false;
+ }
+- var now = new Date();
++ if(System.env.get('SOURCE_DATE_EPOCH') !== null) {
++ var now = new Date(parseInt(System.getenv("SOURCE_DATE_EPOCH"), 10) * 1000);
++ } else {
++ var now = new Date();
++ }
+ var timestamp = Integer.toString( now.getUTCFullYear() % 1000, 36 ) + Integer.toString( now.getUTCMonth(), 36 ) + Integer.toString( now.getUTCDate(), 36 ) + Integer.toString( now.getUTCHours(), 36 );
+ timestamp = timestamp.toUpperCase();
+
+--- a/src/lib/utils.js
++++ b/src/lib/utils.js
+@@ -30,8 +30,12 @@
+ * @static
+ */
+ copyright: function( eol ) {
+- var copyright,
+- date = new Date();
++ var copyright;
++ if(System.env.get('SOURCE_DATE_EPOCH') !== null) {
++ var date = new Date(parseInt(System.getenv("SOURCE_DATE_EPOCH"), 10) * 1000);
++ } else {
++ var date = new Date();
++ }
+
+ if ( CKBuilder.options.commercial )
+ copyright = "/*" + eol + "This software is covered by CKEditor Commercial License. Usage without proper license is prohibited." + eol + "Copyright (c) 2003-" + date.getFullYear() + ", CKSource - Frederico Knabben. All rights reserved." + eol + "*/" + eol;
+@@ -221,4 +225,4 @@
+ return result;
+ }
+ };
+-}() );
+\ No newline at end of file
++}() );
diff --git a/debian/patches/series b/debian/patches/series
index 11053e4..549e272 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
make.patch
notar.patch
unmerge.patch
+now-respects-source-date-epoch.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/ckbuilder.git
More information about the Reproducible-commits
mailing list