3
0
Fork 0
forked from mirrors/nixpkgs

qt4: maintenance update 4.8.4 -> 4.8.5

Also fixed search path for libGL.
Tested building against master.
This commit is contained in:
Vladimír Čunát 2013-07-04 11:37:25 +02:00
parent b0b5c24fa6
commit e9f0d1013d
5 changed files with 66 additions and 97 deletions

View file

@ -137,7 +137,7 @@ stdenv.mkDerivation {
''; '';
#ToDo: @vcunat isn't sure if drirc will be found when in $out/etc/, but it doesn't seem important ATM #ToDo: @vcunat isn't sure if drirc will be found when in $out/etc/, but it doesn't seem important ATM
passthru = { inherit libdrm; inherit version; }; passthru = { inherit libdrm version driverLink; };
meta = { meta = {
description = "An open source implementation of OpenGL"; description = "An open source implementation of OpenGL";

View file

@ -1,66 +0,0 @@
From 20b26bdb3dd5e46b01b9a7e1ce8342074df3c89c Mon Sep 17 00:00:00 2001
From: Thiago Macieira <thiago.macieira@intel.com>
Date: Sat, 22 Dec 2012 08:32:12 -0800
Subject: [PATCH] Change all shmget calls to user-only memory
Drop the read and write permissions for group and other users in the
system.
Change-Id: I8fc753f09126651af3fb82df3049050f0b14e876
(cherry-picked from Qt 5 commit 856f209fb63ae336bfb389a12d2a75fa886dc1c5)
Reviewed-by: Richard J. Moore <rich@kde.org>
---
src/corelib/kernel/qsharedmemory_unix.cpp | 6 +++---
src/corelib/kernel/qsystemsemaphore_unix.cpp | 4 ++--
diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp
index 20d76e3..4cf3acf 100644
--- a/src/corelib/kernel/qsharedmemory_unix.cpp
+++ b/src/corelib/kernel/qsharedmemory_unix.cpp
@@ -238,7 +238,7 @@ bool QSharedMemoryPrivate::create(int size)
}
// create
- if (-1 == shmget(unix_key, size, 0666 | IPC_CREAT | IPC_EXCL)) {
+ if (-1 == shmget(unix_key, size, 0600 | IPC_CREAT | IPC_EXCL)) {
QString function = QLatin1String("QSharedMemory::create");
switch (errno) {
case EINVAL:
@@ -293,7 +293,7 @@ bool QSharedMemoryPrivate::attach(QSharedMemory::AccessMode mode)
{
#ifndef QT_POSIX_IPC
// grab the shared memory segment id
- int id = shmget(unix_key, 0, (mode == QSharedMemory::ReadOnly ? 0444 : 0660));
+ int id = shmget(unix_key, 0, (mode == QSharedMemory::ReadOnly ? 0400 : 0600));
if (-1 == id) {
setErrorString(QLatin1String("QSharedMemory::attach (shmget)"));
return false;
@@ -381,7 +381,7 @@ bool QSharedMemoryPrivate::detach()
size = 0;
// Get the number of current attachments
- int id = shmget(unix_key, 0, 0444);
+ int id = shmget(unix_key, 0, 0400);
cleanHandle();
struct shmid_ds shmid_ds;
diff --git a/src/corelib/kernel/qsystemsemaphore_unix.cpp b/src/corelib/kernel/qsystemsemaphore_unix.cpp
index fad9acc..e77456b 100644
--- a/src/corelib/kernel/qsystemsemaphore_unix.cpp
+++ b/src/corelib/kernel/qsystemsemaphore_unix.cpp
@@ -153,10 +153,10 @@ key_t QSystemSemaphorePrivate::handle(QSystemSemaphore::AccessMode mode)
}
// Get semaphore
- semaphore = semget(unix_key, 1, 0666 | IPC_CREAT | IPC_EXCL);
+ semaphore = semget(unix_key, 1, 0600 | IPC_CREAT | IPC_EXCL);
if (-1 == semaphore) {
if (errno == EEXIST)
- semaphore = semget(unix_key, 1, 0666 | IPC_CREAT);
+ semaphore = semget(unix_key, 1, 0600 | IPC_CREAT);
if (-1 == semaphore) {
setErrorString(QLatin1String("QSystemSemaphore::handle"));
cleanHandle();
--
1.7.1

View file

@ -17,18 +17,23 @@
with stdenv.lib; with stdenv.lib;
let v = "4.8.4"; in let
v_maj = "4.8";
v_min = "5";
vers = "${v_maj}.${v_min}";
in
# TODO: # TODO:
# * move some plugins (e.g., SQL plugins) to dedicated derivations to avoid # * move some plugins (e.g., SQL plugins) to dedicated derivations to avoid
# false build-time dependencies # false build-time dependencies
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "qt-${v}"; name = "qt-${vers}";
src = fetchurl { src = fetchurl {
url = "http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-${v}.tar.gz"; url = "http://download.qt-project.org/official_releases/qt/"
sha256 = "0w1j16q6glniv4hppdgcvw52w72gb2jab35ylkw0qjn5lj5y7c1k"; + "${v_maj}/${vers}/qt-everywhere-opensource-src-${vers}.tar.gz";
sha256 = "0f51dbgn1dcck8pqimls2qyf1pfmsmyknh767cvw87c3d218ywpb";
}; };
prePatch = '' prePatch = ''
@ -39,11 +44,11 @@ stdenv.mkDerivation rec {
patches = patches =
[ ./glib-2.32.patch [ ./glib-2.32.patch
./CVE-2013-0254.patch
(substituteAll { (substituteAll {
src = ./dlopen-absolute-paths.diff; src = ./dlopen-absolute-paths.diff;
inherit cups icu libXfixes; inherit cups icu libXfixes;
glibc = stdenv.gcc.libc; glibc = stdenv.gcc.libc;
openglDriver = mesa.driverLink;
}) })
] ++ stdenv.lib.optional gtkStyle (substituteAll { ] ++ stdenv.lib.optional gtkStyle (substituteAll {
src = ./dlopen-gtkstyle.diff; src = ./dlopen-gtkstyle.diff;

View file

@ -1,7 +1,8 @@
diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/corelib/tools/qlocale_icu.cpp qt-everywhere-opensource-src-4.8.3/src/corelib/tools/qlocale_icu.cpp diff --git a/src/corelib/tools/qlocale_icu.cpp b/src/corelib/tools/qlocale_icu.cpp
--- qt-everywhere-opensource-src-4.8.3-orig/src/corelib/tools/qlocale_icu.cpp 2012-09-10 21:36:50.000000000 -0400 index c3e2907..2fac4e1 100644
+++ qt-everywhere-opensource-src-4.8.3/src/corelib/tools/qlocale_icu.cpp 2012-09-28 22:57:40.764153828 -0400 --- a/src/corelib/tools/qlocale_icu.cpp
@@ -81,7 +81,7 @@ +++ b/src/corelib/tools/qlocale_icu.cpp
@@ -81,7 +81,7 @@ bool qt_initIcu(const QString &localeString)
if (status == NotLoaded) { if (status == NotLoaded) {
// resolve libicui18n // resolve libicui18n
@ -10,7 +11,7 @@ diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/corelib/tools/qlocale_icu.c
lib.setLoadHints(QLibrary::ImprovedSearchHeuristics); lib.setLoadHints(QLibrary::ImprovedSearchHeuristics);
if (!lib.load()) { if (!lib.load()) {
qWarning() << "Unable to load library icui18n" << lib.errorString(); qWarning() << "Unable to load library icui18n" << lib.errorString();
@@ -111,7 +111,7 @@ @@ -111,7 +111,7 @@ bool qt_initIcu(const QString &localeString)
} }
// resolve libicuuc // resolve libicuuc
@ -19,10 +20,11 @@ diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/corelib/tools/qlocale_icu.c
ucLib.setLoadHints(QLibrary::ImprovedSearchHeuristics); ucLib.setLoadHints(QLibrary::ImprovedSearchHeuristics);
if (!ucLib.load()) { if (!ucLib.load()) {
qWarning() << "Unable to load library icuuc" << ucLib.errorString(); qWarning() << "Unable to load library icuuc" << ucLib.errorString();
diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/gui/painting/qcups.cpp qt-everywhere-opensource-src-4.8.3/src/gui/painting/qcups.cpp diff --git a/src/gui/painting/qcups.cpp b/src/gui/painting/qcups.cpp
--- qt-everywhere-opensource-src-4.8.3-orig/src/gui/painting/qcups.cpp 2012-09-10 21:36:51.000000000 -0400 index 99ea43f..acdf9c9 100644
+++ qt-everywhere-opensource-src-4.8.3/src/gui/painting/qcups.cpp 2012-09-28 18:08:26.600720491 -0400 --- a/src/gui/painting/qcups.cpp
@@ -87,7 +87,7 @@ +++ b/src/gui/painting/qcups.cpp
@@ -87,7 +87,7 @@ static CupsPrintFile _cupsPrintFile = 0;
static void resolveCups() static void resolveCups()
{ {
@ -31,10 +33,11 @@ diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/gui/painting/qcups.cpp qt-e
if(cupsLib.load()) { if(cupsLib.load()) {
_cupsGetDests = (CupsGetDests) cupsLib.resolve("cupsGetDests"); _cupsGetDests = (CupsGetDests) cupsLib.resolve("cupsGetDests");
_cupsFreeDests = (CupsFreeDests) cupsLib.resolve("cupsFreeDests"); _cupsFreeDests = (CupsFreeDests) cupsLib.resolve("cupsFreeDests");
diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/gui/painting/qprinterinfo_unix.cpp qt-everywhere-opensource-src-4.8.3/src/gui/painting/qprinterinfo_unix.cpp diff --git a/src/gui/painting/qprinterinfo_unix.cpp b/src/gui/painting/qprinterinfo_unix.cpp
--- qt-everywhere-opensource-src-4.8.3-orig/src/gui/painting/qprinterinfo_unix.cpp 2012-09-10 21:36:51.000000000 -0400 index 3d15538..f0f5351 100644
+++ qt-everywhere-opensource-src-4.8.3/src/gui/painting/qprinterinfo_unix.cpp 2012-09-28 18:08:26.601720488 -0400 --- a/src/gui/painting/qprinterinfo_unix.cpp
@@ -454,7 +454,7 @@ +++ b/src/gui/painting/qprinterinfo_unix.cpp
@@ -454,7 +454,7 @@ int qt_retrieveNisPrinters(QList<QPrinterDescription> *printers)
char *domain; char *domain;
int err; int err;
@ -43,22 +46,50 @@ diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/gui/painting/qprinterinfo_u
typedef int (*ypGetDefaultDomain)(char **); typedef int (*ypGetDefaultDomain)(char **);
ypGetDefaultDomain _ypGetDefaultDomain = (ypGetDefaultDomain)lib.resolve("yp_get_default_domain"); ypGetDefaultDomain _ypGetDefaultDomain = (ypGetDefaultDomain)lib.resolve("yp_get_default_domain");
typedef int (*ypAll)(const char *, const char *, const struct ypall_callback *); typedef int (*ypAll)(const char *, const char *, const struct ypall_callback *);
diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/network/kernel/qhostinfo_unix.cpp qt-everywhere-opensource-src-4.8.3/src/network/kernel/qhostinfo_unix.cpp diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
--- qt-everywhere-opensource-src-4.8.3-orig/src/network/kernel/qhostinfo_unix.cpp 2012-09-10 21:36:51.000000000 -0400 index 6b42d1e..f88b628 100644
+++ qt-everywhere-opensource-src-4.8.3/src/network/kernel/qhostinfo_unix.cpp 2012-09-28 18:08:53.186643755 -0400 --- a/src/network/kernel/qhostinfo_unix.cpp
@@ -95,7 +95,7 @@ +++ b/src/network/kernel/qhostinfo_unix.cpp
@@ -95,7 +95,7 @@ static res_state_ptr local_res = 0;
static void resolveLibrary() static void resolveLibrary()
{ {
#ifndef QT_NO_LIBRARY #if !defined(QT_NO_LIBRARY) && !defined(Q_OS_QNX)
- QLibrary lib(QLatin1String("resolv")); - QLibrary lib(QLatin1String("resolv"));
+ QLibrary lib(QLatin1String("@glibc@/lib/libresolv")); + QLibrary lib(QLatin1String("@glibc@/lib/libresolv"));
lib.setLoadHints(QLibrary::ImprovedSearchHeuristics); lib.setLoadHints(QLibrary::ImprovedSearchHeuristics);
if (!lib.load()) if (!lib.load())
return; return;
diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/plugins/platforms/xlib/qxlibstatic.cpp qt-everywhere-opensource-src-4.8.3/src/plugins/platforms/xlib/qxlibstatic.cpp diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp
--- qt-everywhere-opensource-src-4.8.3-orig/src/plugins/platforms/xlib/qxlibstatic.cpp 2012-09-10 21:36:51.000000000 -0400 index 229d6f9..c122bf3 100644
+++ qt-everywhere-opensource-src-4.8.3/src/plugins/platforms/xlib/qxlibstatic.cpp 2012-09-28 18:08:26.601720488 -0400 --- a/src/plugins/platforms/xcb/qglxintegration.cpp
@@ -242,7 +242,7 @@ +++ b/src/plugins/platforms/xcb/qglxintegration.cpp
@@ -136,7 +136,7 @@ void* QGLXContext::getProcAddress(const QString& procName)
{
extern const QString qt_gl_library_name();
// QLibrary lib(qt_gl_library_name());
- QLibrary lib(QLatin1String("GL"));
+ QLibrary lib(QLatin1String("@openglDriver@/lib/libGL"));
glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB");
}
}
diff --git a/src/plugins/platforms/xlib/qglxintegration.cpp b/src/plugins/platforms/xlib/qglxintegration.cpp
index 2467247..a2441d4 100644
--- a/src/plugins/platforms/xlib/qglxintegration.cpp
+++ b/src/plugins/platforms/xlib/qglxintegration.cpp
@@ -137,7 +137,7 @@ void* QGLXContext::getProcAddress(const QString& procName)
{
extern const QString qt_gl_library_name();
// QLibrary lib(qt_gl_library_name());
- QLibrary lib(QLatin1String("GL"));
+ QLibrary lib(QLatin1String("@openglDriver@/lib/libGL"));
glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB");
}
}
diff --git a/src/plugins/platforms/xlib/qxlibstatic.cpp b/src/plugins/platforms/xlib/qxlibstatic.cpp
index f8f3d69..d63c5bc 100644
--- a/src/plugins/platforms/xlib/qxlibstatic.cpp
+++ b/src/plugins/platforms/xlib/qxlibstatic.cpp
@@ -242,7 +242,7 @@ static void* qt_load_library_runtime(const char *library, int vernum,
} }
# define XFIXES_LOAD_RUNTIME(vernum, symbol, symbol_type) \ # define XFIXES_LOAD_RUNTIME(vernum, symbol, symbol_type) \

View file

@ -5077,13 +5077,12 @@ let
qt48 = callPackage ../development/libraries/qt-4.x/4.8 { qt48 = callPackage ../development/libraries/qt-4.x/4.8 {
# GNOME dependencies are not used unless gtkStyle == true # GNOME dependencies are not used unless gtkStyle == true
mesa = mesa_noglu;
inherit (pkgs.gnome) libgnomeui GConf gnome_vfs; inherit (pkgs.gnome) libgnomeui GConf gnome_vfs;
cups = if stdenv.isLinux then cups else null; cups = if stdenv.isLinux then cups else null;
}; };
qt48Full = callPackage ../development/libraries/qt-4.x/4.8 { qt48Full = qt48.override {
# GNOME dependencies are not used unless gtkStyle == true
inherit (pkgs.gnome) libgnomeui GConf gnome_vfs;
docs = true; docs = true;
demos = true; demos = true;
examples = true; examples = true;