summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-12-12 22:00:52 +0100
committerMarius Bakke <mbakke@fastmail.com>2018-12-12 22:00:52 +0100
commit12878d12acccf83ef3258a53a01f851088f0aa9e (patch)
tree47f875b50bd7714251256475317e96f4e6d73f55 /gnu/packages/patches
parent17c3e0d85d9c1a6b4c09d09dd9238297b6165a2f (diff)
parent7b046b1bdc0b1cbc50428d4e08136a110f0a12af (diff)
downloadguix-12878d12acccf83ef3258a53a01f851088f0aa9e.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/allegro-fix-compilation-mesa-18.2.5-and-later.patch41
-rw-r--r--gnu/packages/patches/borg-respect-storage-quota.patch32
-rw-r--r--gnu/packages/patches/openjdk-10-idlj-reproducibility.patch36
-rw-r--r--gnu/packages/patches/polkit-CVE-2018-19788.patch197
4 files changed, 274 insertions, 32 deletions
diff --git a/gnu/packages/patches/allegro-fix-compilation-mesa-18.2.5-and-later.patch b/gnu/packages/patches/allegro-fix-compilation-mesa-18.2.5-and-later.patch
new file mode 100644
index 0000000000..fa273a5dfa
--- /dev/null
+++ b/gnu/packages/patches/allegro-fix-compilation-mesa-18.2.5-and-later.patch
@@ -0,0 +1,41 @@
+Fixes compilation with Mesa >= 18.2.5.
+
+Taken from upstream:
+
+https://github.com/liballeg/allegro5/commit/a40d30e21802ecf5c9382cf34af9b01bd3781e47
+
+diff --git a/include/allegro5/allegro_opengl.h b/include/allegro5/allegro_opengl.h
+index 0f86a6768..652dd024e 100644
+--- a/include/allegro5/allegro_opengl.h
++++ b/include/allegro5/allegro_opengl.h
+@@ -103,10 +103,14 @@
+
+ /* HACK: Prevent both Mesa and SGI's broken headers from screwing us */
+ #define __glext_h_
++#define __gl_glext_h_
+ #define __glxext_h_
++#define __glx_glxext_h_
+ #include <GL/gl.h>
+ #undef  __glext_h_
++#undef  __gl_glext_h_
+ #undef  __glxext_h_
++#undef  __glx_glxext_h_
+
+ #endif /* ALLEGRO_MACOSX */
+
+diff --git a/include/allegro5/opengl/GLext/glx_ext_defs.h b/include/allegro5/opengl/GLext/glx_ext_defs.h
+index 49c502091..fba8aea5d 100644
+--- a/include/allegro5/opengl/GLext/glx_ext_defs.h
++++ b/include/allegro5/opengl/GLext/glx_ext_defs.h
+@@ -1,7 +1,9 @@
+ /* HACK: Prevent both Mesa and SGI's broken headers from screwing us */
+ #define __glxext_h_
++#define __glx_glxext_h_
+ #include <GL/glx.h>
+ #undef __glxext_h_
++#undef __glx_glxext_h_
+
+ #ifndef GLX_VERSION_1_3
+ #define _ALLEGRO_GLX_VERSION_1_3
+--
+2.20.0
diff --git a/gnu/packages/patches/borg-respect-storage-quota.patch b/gnu/packages/patches/borg-respect-storage-quota.patch
deleted file mode 100644
index d23d1ffc01..0000000000
--- a/gnu/packages/patches/borg-respect-storage-quota.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Make sure the client respects the storage quota set by the server:
-
-https://github.com/borgbackup/borg/issues/4093
-
-Patch copied from upstream source repository:
-
-https://github.com/borgbackup/borg/commit/975cc33206e0e3644626fb7204c34d2157715b61
-
-From 975cc33206e0e3644626fb7204c34d2157715b61 Mon Sep 17 00:00:00 2001
-From: Manu <manu@snapdragon.cc>
-Date: Wed, 3 Oct 2018 23:47:36 +0800
-Subject: [PATCH] Add storage_quota for forced_result if set by serve command.
-
----
- src/borg/archiver.py | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/borg/archiver.py b/src/borg/archiver.py
-index 916725e7..279194c1 100644
---- a/src/borg/archiver.py
-+++ b/src/borg/archiver.py
-@@ -4276,6 +4276,7 @@ def get_args(self, argv, cmd):
-             result.restrict_to_paths = forced_result.restrict_to_paths
-             result.restrict_to_repositories = forced_result.restrict_to_repositories
-             result.append_only = forced_result.append_only
-+            result.storage_quota = forced_result.storage_quota
-         return result
- 
-     def parse_args(self, args=None):
--- 
-2.19.1
-
diff --git a/gnu/packages/patches/openjdk-10-idlj-reproducibility.patch b/gnu/packages/patches/openjdk-10-idlj-reproducibility.patch
new file mode 100644
index 0000000000..b29a06f272
--- /dev/null
+++ b/gnu/packages/patches/openjdk-10-idlj-reproducibility.patch
@@ -0,0 +1,36 @@
+From a0a0c6a43b88d946f2b5484892cf0209bd7c0e68 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= <boskovits@gmail.com>
+Date: Sat, 8 Dec 2018 21:25:31 +0100
+Subject: [PATCH] Make idlj respect SOURCE_DATE_EPOCH.
+
+---
+ .../sun/tools/corba/se/idl/toJavaPortable/Util.java | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/src/java.corba/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java b/src/java.corba/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java
+index 7397619f2..583d6b8e4 100644
+--- a/src/java.corba/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java
++++ b/src/java.corba/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java
+@@ -1146,7 +1146,18 @@ public class Util extends com.sun.tools.corba.se.idl.Util
+     else
+       formatter.setTimeZone (java.util.TimeZone.getDefault ());
+ 
+-    stream.println ("* " + formatter.format (new Date ()));
++    try {
++	String epoch = System.getenv("SOURCE_DATE_EPOCH");
++	if(epoch != null) {
++	    long unixTime = Long.parseLong(epoch);
++	    stream.println ("* " + formatter.format (new Date (unixTime*1000L)));
++	} else {
++	    stream.println ("* " + formatter.format (new Date ()));
++	}
++    } catch (Exception e) {
++	//in case of error fall back to default
++	stream.println ("* " + formatter.format (new Date ()));
++    }
+ 
+     // <daz>
+     ///////////////
+-- 
+2.19.2
+
diff --git a/gnu/packages/patches/polkit-CVE-2018-19788.patch b/gnu/packages/patches/polkit-CVE-2018-19788.patch
new file mode 100644
index 0000000000..58cde6c5dc
--- /dev/null
+++ b/gnu/packages/patches/polkit-CVE-2018-19788.patch
@@ -0,0 +1,197 @@
+Fix CVE-2018-19788:
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-19788
+https://gitlab.freedesktop.org/polkit/polkit/issues/74
+
+Patch copied from upstream source repository:
+
+https://gitlab.freedesktop.org/polkit/polkit/commit/2cb40c4d5feeaa09325522bd7d97910f1b59e379
+
+From 2cb40c4d5feeaa09325522bd7d97910f1b59e379 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Mon, 3 Dec 2018 10:28:58 +0100
+Subject: [PATCH] Allow negative uids/gids in PolkitUnixUser and Group objects
+
+(uid_t) -1 is still used as placeholder to mean "unset". This is OK, since
+there should be no users with such number, see
+https://systemd.io/UIDS-GIDS#special-linux-uids.
+
+(uid_t) -1 is used as the default value in class initialization.
+
+When a user or group above INT32_MAX is created, the numeric uid or
+gid wraps around to negative when the value is assigned to gint, and
+polkit gets confused. Let's accept such gids, except for -1.
+
+A nicer fix would be to change the underlying type to e.g. uint32 to
+not have negative values. But this cannot be done without breaking the
+API, so likely new functions will have to be added (a
+polkit_unix_user_new variant that takes a unsigned, and the same for
+_group_new, _set_uid, _get_uid, _set_gid, _get_gid, etc.). This will
+require a bigger patch.
+
+Fixes https://gitlab.freedesktop.org/polkit/polkit/issues/74.
+---
+ src/polkit/polkitunixgroup.c   | 15 +++++++++++----
+ src/polkit/polkitunixprocess.c | 12 ++++++++----
+ src/polkit/polkitunixuser.c    | 13 ++++++++++---
+ 3 files changed, 29 insertions(+), 11 deletions(-)
+
+diff --git a/src/polkit/polkitunixgroup.c b/src/polkit/polkitunixgroup.c
+index c57a1aa..309f689 100644
+--- a/src/polkit/polkitunixgroup.c
++++ b/src/polkit/polkitunixgroup.c
+@@ -71,6 +71,7 @@ G_DEFINE_TYPE_WITH_CODE (PolkitUnixGroup, polkit_unix_group, G_TYPE_OBJECT,
+ static void
+ polkit_unix_group_init (PolkitUnixGroup *unix_group)
+ {
++  unix_group->gid = -1; /* (git_t) -1 is not a valid GID under Linux */
+ }
+ 
+ static void
+@@ -100,11 +101,14 @@ polkit_unix_group_set_property (GObject      *object,
+                                GParamSpec   *pspec)
+ {
+   PolkitUnixGroup *unix_group = POLKIT_UNIX_GROUP (object);
++  gint val;
+ 
+   switch (prop_id)
+     {
+     case PROP_GID:
+-      unix_group->gid = g_value_get_int (value);
++      val = g_value_get_int (value);
++      g_return_if_fail (val != -1);
++      unix_group->gid = val;
+       break;
+ 
+     default:
+@@ -131,9 +135,9 @@ polkit_unix_group_class_init (PolkitUnixGroupClass *klass)
+                                    g_param_spec_int ("gid",
+                                                      "Group ID",
+                                                      "The UNIX group ID",
+-                                                     0,
++                                                     G_MININT,
+                                                      G_MAXINT,
+-                                                     0,
++                                                     -1,
+                                                      G_PARAM_CONSTRUCT |
+                                                      G_PARAM_READWRITE |
+                                                      G_PARAM_STATIC_NAME |
+@@ -166,9 +170,10 @@ polkit_unix_group_get_gid (PolkitUnixGroup *group)
+  */
+ void
+ polkit_unix_group_set_gid (PolkitUnixGroup *group,
+-                          gint gid)
++                           gint gid)
+ {
+   g_return_if_fail (POLKIT_IS_UNIX_GROUP (group));
++  g_return_if_fail (gid != -1);
+   group->gid = gid;
+ }
+ 
+@@ -183,6 +188,8 @@ polkit_unix_group_set_gid (PolkitUnixGroup *group,
+ PolkitIdentity *
+ polkit_unix_group_new (gint gid)
+ {
++  g_return_val_if_fail (gid != -1, NULL);
++
+   return POLKIT_IDENTITY (g_object_new (POLKIT_TYPE_UNIX_GROUP,
+                                        "gid", gid,
+                                        NULL));
+diff --git a/src/polkit/polkitunixprocess.c b/src/polkit/polkitunixprocess.c
+index 972b777..b02b258 100644
+--- a/src/polkit/polkitunixprocess.c
++++ b/src/polkit/polkitunixprocess.c
+@@ -159,9 +159,14 @@ polkit_unix_process_set_property (GObject      *object,
+       polkit_unix_process_set_pid (unix_process, g_value_get_int (value));
+       break;
+ 
+-    case PROP_UID:
+-      polkit_unix_process_set_uid (unix_process, g_value_get_int (value));
++    case PROP_UID: {
++      gint val;
++
++      val = g_value_get_int (value);
++      g_return_if_fail (val != -1);
++      polkit_unix_process_set_uid (unix_process, val);
+       break;
++    }
+ 
+     case PROP_START_TIME:
+       polkit_unix_process_set_start_time (unix_process, g_value_get_uint64 (value));
+@@ -239,7 +244,7 @@ polkit_unix_process_class_init (PolkitUnixProcessClass *klass)
+                                    g_param_spec_int ("uid",
+                                                      "User ID",
+                                                      "The UNIX user ID",
+-                                                     -1,
++                                                     G_MININT,
+                                                      G_MAXINT,
+                                                      -1,
+                                                      G_PARAM_CONSTRUCT |
+@@ -303,7 +308,6 @@ polkit_unix_process_set_uid (PolkitUnixProcess *process,
+                              gint               uid)
+ {
+   g_return_if_fail (POLKIT_IS_UNIX_PROCESS (process));
+-  g_return_if_fail (uid >= -1);
+   process->uid = uid;
+ }
+ 
+diff --git a/src/polkit/polkitunixuser.c b/src/polkit/polkitunixuser.c
+index 8bfd3a1..234a697 100644
+--- a/src/polkit/polkitunixuser.c
++++ b/src/polkit/polkitunixuser.c
+@@ -72,6 +72,7 @@ G_DEFINE_TYPE_WITH_CODE (PolkitUnixUser, polkit_unix_user, G_TYPE_OBJECT,
+ static void
+ polkit_unix_user_init (PolkitUnixUser *unix_user)
+ {
++  unix_user->uid = -1;  /* (uid_t) -1 is not a valid UID under Linux */
+   unix_user->name = NULL;
+ }
+ 
+@@ -112,11 +113,14 @@ polkit_unix_user_set_property (GObject      *object,
+                                GParamSpec   *pspec)
+ {
+   PolkitUnixUser *unix_user = POLKIT_UNIX_USER (object);
++  gint val;
+ 
+   switch (prop_id)
+     {
+     case PROP_UID:
+-      unix_user->uid = g_value_get_int (value);
++      val = g_value_get_int (value);
++      g_return_if_fail (val != -1);
++      unix_user->uid = val;
+       break;
+ 
+     default:
+@@ -144,9 +148,9 @@ polkit_unix_user_class_init (PolkitUnixUserClass *klass)
+                                    g_param_spec_int ("uid",
+                                                      "User ID",
+                                                      "The UNIX user ID",
+-                                                     0,
++                                                     G_MININT,
+                                                      G_MAXINT,
+-                                                     0,
++                                                     -1,
+                                                      G_PARAM_CONSTRUCT |
+                                                      G_PARAM_READWRITE |
+                                                      G_PARAM_STATIC_NAME |
+@@ -182,6 +186,7 @@ polkit_unix_user_set_uid (PolkitUnixUser *user,
+                           gint uid)
+ {
+   g_return_if_fail (POLKIT_IS_UNIX_USER (user));
++  g_return_if_fail (uid != -1);
+   user->uid = uid;
+ }
+ 
+@@ -196,6 +201,8 @@ polkit_unix_user_set_uid (PolkitUnixUser *user,
+ PolkitIdentity *
+ polkit_unix_user_new (gint uid)
+ {
++  g_return_val_if_fail (uid != -1, NULL);
++
+   return POLKIT_IDENTITY (g_object_new (POLKIT_TYPE_UNIX_USER,
+                                         "uid", uid,
+                                         NULL));
+-- 
+2.18.1
+