aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2016-03-01 19:30:27 +0100
committerFlorian Bruhin <git@the-compiler.org>2016-03-01 21:35:19 +0100
commit47b1448093f561bb3663d0637be5fd612186df0e (patch)
treead7926bd211d8d3682ac6d64a0dbccd45086f190
parent735b641246c3e000f00e75f13c5b06080466e6b8 (diff)
downloadqt-debug-pkgbuild-47b1448093f561bb3663d0637be5fd612186df0e.tar.gz
qt-debug-pkgbuild-47b1448093f561bb3663d0637be5fd612186df0e.zip
Add new files and a script to build on segfault
-rw-r--r--Dockerfile82
-rwxr-xr-xbuild_segfault.sh20
-rwxr-xr-xbuild_segfault_docker.sh10
-rw-r--r--qt5/division-by-zero.patch34
-rw-r--r--qt5/fs48195.patch39
-rw-r--r--qt5/journald.patch56
-rw-r--r--qt5/rebuild.list6
7 files changed, 247 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..c890872
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,82 @@
+FROM base/archlinux
+MAINTAINER Florian Bruhin <me@the-compiler.org>
+
+RUN echo 'Server = http://mirror.de.leaseweb.net/archlinux/$repo/os/$arch' > /etc/pacman.d/mirrorlist
+RUN pacman-key --init && pacman-key --populate archlinux && pacman -Sy --noconfirm archlinux-keyring
+RUN pacman -Suy --noconfirm --needed \
+ git \
+ base-devel
+RUN pacman-db-upgrade
+RUN pacman -Suy --noconfirm --needed \
+ # pyqt5
+ python-sip \
+ python2-sip \
+ python-opengl \
+ python2-opengl \
+ python-dbus \
+ python2-dbus \
+ # qt5
+ libxcb \
+ xcb-proto \
+ xcb-util \
+ xcb-util-image \
+ xcb-util-wm \
+ xcb-util-keysyms \
+ mesa \
+ at-spi2-core \
+ alsa-lib \
+ gst-plugins-base-libs \
+ libjpeg-turbo \
+ cups \
+ libpulse \
+ hicolor-icon-theme \
+ desktop-file-utils \
+ postgresql-libs \
+ nss \
+ libmariadbclient \
+ sqlite \
+ unixodbc \
+ libfbclient \
+ libmng \
+ python2 \
+ ruby \
+ gperf \
+ libxslt \
+ libxcomposite \
+ fontconfig \
+ bluez-libs \
+ openal \
+ gtk2 \
+ libxkbcommon-x11 \
+ mtdev \
+ harfbuzz \
+ libwebp \
+ leveldb \
+ geoclue \
+ pciutils \
+ libinput \
+ yasm
+RUN sed -i 's/#MAKEFLAGS=.*/MAKEFLAGS="-j$(nproc)"/' /etc/makepkg.conf && \
+ sed -i 's|#BUILDDIR=.*|BUILDDIR="/tmp/makepkg"|' /etc/makepkg.conf && \
+ sed -i 's|#PKGDEST=.*|PKGDEST="/out"|' /etc/makepkg.conf && \
+ sed -i 's|COMPRESSXZ=.*|COMPRESSXZ=(xz -c -z --threads=0 -)|' /etc/makepkg.conf
+
+
+RUN mkdir /out && \
+ echo 'ALL ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers && \
+ useradd user -u 1001 && \
+ mkdir /home/user
+
+COPY ./qt5 /home/user/qt5
+COPY ./pyqt5 /home/user/pyqt5
+
+RUN chown -R user:users /home/user && \
+ chown user:users /out
+
+USER user
+WORKDIR /home/user
+
+CMD cd ~/qt5 && \
+ makepkg -i --noconfirm && \
+ cd ~/pyqt5 && \
+ makepkg -i --noconfirm
diff --git a/build_segfault.sh b/build_segfault.sh
new file mode 100755
index 0000000..4d38ec6
--- /dev/null
+++ b/build_segfault.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+set -e
+dir="$PWD"
+outdir=/srv/http/qutebrowser/qt-debug/x86_64
+qtbuilddir="~/docker/archlinux-qtbuild"
+
+ssh segfault mkdir -p "$qtbuilddir"
+rsync -avPh --files-from=<(git ls-files) . segfault:"$qtbuilddir"
+ssh segfault "$qtbuilddir/build_segfault_docker.sh"
+rm "$outdir"/*
+rsync -avPh segfault:"$qtbuilddir/out/" "$outdir"
+
+for f in "$outdir"/*.pkg.tar.xz; do
+ gpg --detach-sign --default-key 0xE80A0C82 "$f"
+done
+
+repo-add "$outdir/qt-debug.db.tar.gz" "$outdir"/*.pkg.tar.xz
+
+cd "$dir"
diff --git a/build_segfault_docker.sh b/build_segfault_docker.sh
new file mode 100755
index 0000000..8bddca2
--- /dev/null
+++ b/build_segfault_docker.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+mkdir -p ~/docker/archlinux-qtbuild 2>/dev/null
+cd ~/docker/archlinux-qtbuild
+
+mkdir out 2>/dev/null
+chmod 777 out
+
+rm out/*
+docker build -t archlinux-qtbuild .
+time docker run -i --tmpfs=/tmp:size=100G -v $PWD/out:/out archlinux-qtbuild
diff --git a/qt5/division-by-zero.patch b/qt5/division-by-zero.patch
new file mode 100644
index 0000000..a2b8e62
--- /dev/null
+++ b/qt5/division-by-zero.patch
@@ -0,0 +1,34 @@
+From 79447068579ea93d616d840bb8cbbf8adb1ed6ec Mon Sep 17 00:00:00 2001
+From: Nicolas Capens <capn@google.com>
+Date: Tue, 10 Nov 2015 00:03:34 -0500
+Subject: Fix potential division by zero.
+
+In a Chrome Remote Desktop session the htotal and/or vtotal timings
+can be zero and lead to a SIGFPE exception.
+
+Task-number: QTBUG-49322
+Change-Id: Id530335cc760d1938ed888ad095427fcf32c651d
+Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
+Reviewed-by: Nicolas Capens <nicolas.capens@gmail.com>
+Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
+---
+ src/plugins/platforms/xcb/qxcbscreen.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
+index 2a53b18..0e99d58 100644
+--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
++++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
+@@ -558,7 +558,8 @@ void QXcbScreen::updateRefreshRate(xcb_randr_mode_t mode)
+ for (; modesIter.rem; xcb_randr_mode_info_next(&modesIter)) {
+ xcb_randr_mode_info_t *modeInfo = modesIter.data;
+ if (modeInfo->id == mode) {
+- m_refreshRate = modeInfo->dot_clock / (modeInfo->htotal * modeInfo->vtotal);
++ const uint32_t dotCount = modeInfo->htotal * modeInfo->vtotal;
++ m_refreshRate = (dotCount != 0) ? modeInfo->dot_clock / dotCount : 0;
+ m_mode = mode;
+ break;
+ }
+--
+cgit v0.11.0
+
diff --git a/qt5/fs48195.patch b/qt5/fs48195.patch
new file mode 100644
index 0000000..c66400e
--- /dev/null
+++ b/qt5/fs48195.patch
@@ -0,0 +1,39 @@
+diff --git a/qt5/PKGBUILD b/qt5/PKGBUILD
+index 1342a77..0f25d81 100644
+--- a/qt5/PKGBUILD
++++ b/qt5/PKGBUILD
+@@ -30,7 +30,7 @@ pkgname=('qt5-3d-debug'
+ 'qt5-x11extras-debug'
+ 'qt5-xmlpatterns-debug')
+ pkgver=5.5.1
+-pkgrel=9
++pkgrel=9.1
+ arch=('i686' 'x86_64')
+ url='http://www.qt.io/developers'
+ license=('GPL3' 'LGPL' 'FDL' 'custom')
+@@ -44,17 +44,22 @@ makedepends=('libxcb' 'xcb-proto' 'xcb-util' 'xcb-util-image' 'xcb-util-wm' 'xcb
+ groups=('qt' 'qt5')
+ _pkgfqn="qt-everywhere-opensource-src-${pkgver}"
+ source=("http://download.qt-project.org/official_releases/qt/${pkgver%.*}/${pkgver}/single/${_pkgfqn}.tar.xz"
+- 'assistant.desktop' 'designer.desktop' 'linguist.desktop' 'qdbusviewer.desktop')
++ 'assistant.desktop' 'designer.desktop' 'linguist.desktop' 'qdbusviewer.desktop'
++ 'division-by-zero.patch::http://code.qt.io/cgit/qt/qtbase.git/patch/?id=79447068579ea93d616d840bb8cbbf8adb1ed6ec')
+ md5sums=('c2a249e8795d45200d997d96860d0353'
+ 'b2897dd6a2967bccf8f10e397aafee55'
+ '76e150b20178d2d43801f7367232e5f7'
+ '188da8f4c87316e730ebf1c6217bf5a0'
+- '322b419b16c75d4de0ee7ad0a246caa1')
++ '322b419b16c75d4de0ee7ad0a246caa1'
++ '43ed20fa76dc49aa5736fa6de9ddca03')
+ options=('debug' '!strip')
+
+ prepare() {
+ cd ${_pkgfqn}
+
++ # Fix division by zero when using a recent Xvfb (QTBUG-49322/FS#48195)
++ patch -d qtbase -p1 -i "${srcdir}/division-by-zero.patch"
++
+ # Build qmake using Arch {C,LD}FLAGS
+ # This also sets default {C,CXX,LD}FLAGS for projects built using qmake
+ sed -i -e "s|^\(QMAKE_CFLAGS_RELEASE.*\)|\1 ${CFLAGS}|" \
+
diff --git a/qt5/journald.patch b/qt5/journald.patch
new file mode 100644
index 0000000..b7aa0d4
--- /dev/null
+++ b/qt5/journald.patch
@@ -0,0 +1,56 @@
+From c689bcafd3196aad22372e8056fe0ccb13c15f35 Mon Sep 17 00:00:00 2001
+From: Heiko Becker <heirecka@exherbo.org>
+Date: Fri, 12 Feb 2016 12:37:15 +0100
+Subject: Search for libsystemd first, fall back to libsystemd-journal
+
+systemd >= 209 merged the individual libraries libsystemd-journal,
+libsystemd-login, libsystemd-id128 and libsystemd-daemon into
+a single library, libsystemd. To ease the transition one could pass
+an option to its build to generate stub libraries and matching
+pkg-config files. With systemd >= 229 this option has now been
+removed, causing the build to fail when the journald option is
+enabled.
+
+Change-Id: I26670f207f1a9e79c16be5ce8c8a49353143c5ba
+Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
+Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
+---
+ config.tests/unix/journald/journald.pro | 6 +++++-
+ src/corelib/global/global.pri | 5 ++++-
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/config.tests/unix/journald/journald.pro b/config.tests/unix/journald/journald.pro
+index 2bb50ce..ea76564 100644
+--- a/config.tests/unix/journald/journald.pro
++++ b/config.tests/unix/journald/journald.pro
+@@ -1,6 +1,10 @@
+ SOURCES = journald.c
+
+ CONFIG += link_pkgconfig
+-PKGCONFIG_PRIVATE += libsystemd-journal
++
++packagesExist(libsystemd): \
++ PKGCONFIG_PRIVATE += libsystemd
++else: \
++ PKGCONFIG_PRIVATE += libsystemd-journal
+
+ CONFIG -= qt
+diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri
+index aa4945f..dd84695 100644
+--- a/src/corelib/global/global.pri
++++ b/src/corelib/global/global.pri
+@@ -53,7 +53,10 @@ slog2 {
+
+ journald {
+ CONFIG += link_pkgconfig
+- PKGCONFIG_PRIVATE += libsystemd-journal
++ packagesExist(libsystemd): \
++ PKGCONFIG_PRIVATE += libsystemd
++ else: \
++ PKGCONFIG_PRIVATE += libsystemd-journal
+ DEFINES += QT_USE_JOURNALD
+ }
+
+--
+cgit v0.11.0
+
diff --git a/qt5/rebuild.list b/qt5/rebuild.list
new file mode 100644
index 0000000..5519fd7
--- /dev/null
+++ b/qt5/rebuild.list
@@ -0,0 +1,6 @@
+fcitx-qt5
+frameworkintegration
+gcin
+calibre
+akonadi
+skrooge