Merge branch 'staging' into staging-next (again)

The libtiff change brings security fixes, and the mesa change should be
fixing a rather painful problem for some GPUs, and the rebuilds only
just started.
This commit is contained in:
Vladimír Čunát 2018-08-10 09:44:36 +02:00
commit 3fbb842518
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
5 changed files with 59 additions and 6 deletions

View File

@ -6,8 +6,8 @@ assert x11Support -> libX11 != null
&& libSM != null;
let
version = "1.12.8";
sha256 = "1cvfi7jiby12h0f5gbysphhk99m6mch87ab3cqxkj0w36gkrkp72";
version = "1.12.10";
sha256 = "1xywijmgfad4m3cxp0b4l6kvypwc53ckmhwwzbrc6n32jwj3ssab";
self = stdenv.mkDerivation {
name = "dbus-${version}";

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, valgrind-light }:
stdenv.mkDerivation rec {
name = "libdrm-2.4.92";
name = "libdrm-2.4.93";
src = fetchurl {
url = "https://dri.freedesktop.org/libdrm/${name}.tar.bz2";
sha256 = "1yirzx8hmlvv6r0l7lb3zxmgy5la2mri9al0k16xqfg19pdqzr79";
sha256 = "0g6d9wsnb7lx8r1m4kq8js0wsc5jl20cz1csnlh6z9s8jpfd313f";
};
outputs = [ "out" "dev" "bin" ];

View File

@ -13,8 +13,8 @@ stdenv.mkDerivation rec {
prePatch = let
debian = fetchurl {
url = http://http.debian.net/debian/pool/main/t/tiff/tiff_4.0.9-5.debian.tar.xz;
sha256 = "15lwcsd46gini27akms2ngyxnwi1hs2yskrv5x2wazs5fw5ii62w";
url = http://http.debian.net/debian/pool/main/t/tiff/tiff_4.0.9-6.debian.tar.xz;
sha256 = "10yk5npchxscgsnd7ihd3bbbw2fxkl7ni0plm43c9q4nwp6ms52f";
};
in ''
tar xf ${debian}

View File

@ -88,6 +88,7 @@ let self = stdenv.mkDerivation {
patches = [
./symlink-drivers.patch
./missing-includes.patch # dev_t needs sys/stat.h, time_t needs time.h, etc.-- fixes build w/musl
./disk_cache-include-dri-driver-path-in-cache-key.patch
];
outputs = [ "out" "dev" "drivers" "osmesa" ];

View File

@ -0,0 +1,52 @@
From 9c9df280b318c26aece9873cf77b32e4f95634c1 Mon Sep 17 00:00:00 2001
From: David McFarland <corngood@gmail.com>
Date: Mon, 6 Aug 2018 15:52:11 -0300
Subject: [PATCH] disk_cache: include dri driver path in cache key
This fixes invalid cache hits on NixOS where all shared library
timestamps in /nix/store are zero.
---
src/util/Makefile.am | 3 +++
src/util/disk_cache.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 07bf052175..aea09f60b3 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -30,6 +30,9 @@ noinst_LTLIBRARIES = \
libmesautil.la \
libxmlconfig.la
+AM_CFLAGS = \
+ -DDISK_CACHE_KEY=\"$(drivers)\"
+
AM_CPPFLAGS = \
$(PTHREAD_CFLAGS) \
-I$(top_srcdir)/include
diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
index 4a762eff20..8086c0be75 100644
--- a/src/util/disk_cache.c
+++ b/src/util/disk_cache.c
@@ -388,8 +388,10 @@ disk_cache_create(const char *gpu_name, const char *timestamp,
/* Create driver id keys */
size_t ts_size = strlen(timestamp) + 1;
+ size_t key_size = strlen(DISK_CACHE_KEY) + 1;
size_t gpu_name_size = strlen(gpu_name) + 1;
cache->driver_keys_blob_size += ts_size;
+ cache->driver_keys_blob_size += key_size;
cache->driver_keys_blob_size += gpu_name_size;
/* We sometimes store entire structs that contains a pointers in the cache,
@@ -410,6 +412,7 @@ disk_cache_create(const char *gpu_name, const char *timestamp,
uint8_t *drv_key_blob = cache->driver_keys_blob;
DRV_KEY_CPY(drv_key_blob, &cache_version, cv_size)
DRV_KEY_CPY(drv_key_blob, timestamp, ts_size)
+ DRV_KEY_CPY(drv_key_blob, DISK_CACHE_KEY, key_size)
DRV_KEY_CPY(drv_key_blob, gpu_name, gpu_name_size)
DRV_KEY_CPY(drv_key_blob, &ptr_size, ptr_size_size)
DRV_KEY_CPY(drv_key_blob, &driver_flags, driver_flags_size)
--
2.18.0