summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-01-07 15:49:01 +0100
committerMarius Bakke <mbakke@fastmail.com>2020-01-07 18:18:12 +0100
commitd2e1b2dac70807640cd8851c67dbf0cbb342bf5c (patch)
tree6bec8228e6b89f38baaba7be9be0f76c055a60d8 /gnu/packages
parent1ecadbfe601de5d853bfe5be17154a8bc1df6cf8 (diff)
downloadguix-d2e1b2dac70807640cd8851c67dbf0cbb342bf5c.tar.gz
gnu: appstream-glib: Fix test failure.
* gnu/packages/patches/appstream-glib-2020.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/glib.scm (appstream-glib)[source](patches): New field.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/glib.scm1
-rw-r--r--gnu/packages/patches/appstream-glib-2020.patch31
2 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 528b67e6cf..72d5ea0bdd 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -904,6 +904,7 @@ programming language.  It also contains the utility
               (uri (string-append "https://people.freedesktop.org/~hughsient/"
                                   "appstream-glib/releases/"
                                   "appstream-glib-" version ".tar.xz"))
+              (patches (search-patches "appstream-glib-2020.patch"))
               (sha256
                (base32
                 "14jr1psx5kxywdprgbqn79w309yz8lrqlsq7288hfrf87gbr1wh4"))))
diff --git a/gnu/packages/patches/appstream-glib-2020.patch b/gnu/packages/patches/appstream-glib-2020.patch
new file mode 100644
index 0000000000..ab8a4bbdee
--- /dev/null
+++ b/gnu/packages/patches/appstream-glib-2020.patch
@@ -0,0 +1,31 @@
+2020 is no longer the future.
+
+Taken from upstream:
+https://github.com/hughsie/appstream-glib/commit/953c8e529d7291e60a95e580967ed79ce2c9ccf0
+
+diff --git a/data/tests/broken.appdata.xml b/data/tests/broken.appdata.xml
+index f7a5386e..cf80f5b4 100644
+--- a/data/tests/broken.appdata.xml
++++ b/data/tests/broken.appdata.xml
+@@ -40,7 +40,7 @@
+         <p>This is a duplicate release on the same day!</p>
+       </description>
+     </release>
+-    <release date="2020-01-01" version="0.6.2">
++    <release date="2050-01-01" version="0.6.2">
+       <description>
+         <p>This is a release in the future!</p>
+       </description>
+diff --git a/libappstream-glib/as-app-validate.c b/libappstream-glib/as-app-validate.c
+index c1103ace..f50e4e41 100644
+--- a/libappstream-glib/as-app-validate.c
++++ b/libappstream-glib/as-app-validate.c
+@@ -864,7 +864,7 @@ as_app_validate_release (AsApp *app,
+ 				     AS_PROBLEM_KIND_ATTRIBUTE_MISSING,
+ 				     "<release> has no timestamp");
+ 	}
+-	if (timestamp > 20120101 && timestamp < 20251231) {
++	if (timestamp > 20120101 && timestamp < 20351231) {
+ 		ai_app_validate_add (helper,
+ 				     AS_PROBLEM_KIND_ATTRIBUTE_INVALID,
+ 				     "<release> timestamp should be a UNIX time");