Merge lp:~osomon/webbrowser-app/lsb-release into lp:webbrowser-app

Proposed by Olivier Tilloy
Status: Merged
Approved by: Olivier Tilloy
Approved revision: 1434
Merged at revision: 1439
Proposed branch: lp:~osomon/webbrowser-app/lsb-release
Merge into: lp:webbrowser-app
Diff against target: 87 lines (+14/-5)
4 files modified
debian/control (+1/-0)
src/Ubuntu/CMakeLists.txt (+4/-0)
src/Ubuntu/Web/UserAgent02.qml (+2/-5)
src/Ubuntu/Web/plugin.cpp (+7/-0)
To merge this branch: bzr merge lp:~osomon/webbrowser-app/lsb-release
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+293132@code.launchpad.net

Commit message

Read the ubuntu version at build time, instead of hardcoding it.

To post a comment you must log in.
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

FAILED: Continuous integration, rev:1433
https://jenkins.canonical.com/system-apps/job/lp-webbrowser-app-ci/474/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/476
    FAILURE: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/32/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/476
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/475
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial/475
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/482
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/482/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial/482
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial/482/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/482
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/482/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial/482
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial/482/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/482
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/482/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial/482
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial/482/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-webbrowser-app-ci/474/rebuild

review: Needs Fixing (continuous-integration)
1434. By Olivier Tilloy

Compute ubuntu version at build time, to avoid apparmor denials at run time when running confined.

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

FAILED: Continuous integration, rev:1434
https://jenkins.canonical.com/system-apps/job/lp-webbrowser-app-ci/475/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/477
    FAILURE: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/33/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/477
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/476
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial/476
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/483
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/483/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial/483
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial/483/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/483
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/483/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial/483
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial/483/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/483
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/483/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial/483
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial/483/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-webbrowser-app-ci/475/rebuild

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/control'
--- debian/control 2016-04-15 11:37:29 +0000
+++ debian/control 2016-04-27 16:45:18 +0000
@@ -15,6 +15,7 @@
15 liboxideqt-qmlplugin (>= 1.12),15 liboxideqt-qmlplugin (>= 1.12),
16 libqt5sql5-sqlite,16 libqt5sql5-sqlite,
17 libudev-dev,17 libudev-dev,
18 lsb-release,
18 pkg-config,19 pkg-config,
19 python3-all,20 python3-all,
20 python3-flake8,21 python3-flake8,
2122
=== modified file 'src/Ubuntu/CMakeLists.txt'
--- src/Ubuntu/CMakeLists.txt 2014-05-29 17:03:44 +0000
+++ src/Ubuntu/CMakeLists.txt 2016-04-27 16:45:18 +0000
@@ -19,5 +19,9 @@
19 set(QT_INSTALL_QML "/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt5/qml")19 set(QT_INSTALL_QML "/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt5/qml")
20endif()20endif()
2121
22execute_process(COMMAND lsb_release --short --release
23 OUTPUT_VARIABLE UBUNTU_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
24add_definitions(-DUBUNTU_VERSION="${UBUNTU_VERSION}")
25
22add_subdirectory(Components)26add_subdirectory(Components)
23add_subdirectory(Web)27add_subdirectory(Web)
2428
=== modified file 'src/Ubuntu/Web/UserAgent02.qml'
--- src/Ubuntu/Web/UserAgent02.qml 2015-12-10 10:43:04 +0000
+++ src/Ubuntu/Web/UserAgent02.qml 2016-04-27 16:45:18 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2013-2015 Canonical Ltd.2 * Copyright 2013-2016 Canonical Ltd.
3 *3 *
4 * This file is part of webbrowser-app.4 * This file is part of webbrowser-app.
5 *5 *
@@ -47,9 +47,6 @@
47 // difference in the content served by certain sites (e.g. gmail.com)47 // difference in the content served by certain sites (e.g. gmail.com)
48 readonly property string _template: "Mozilla/5.0 (Linux; Ubuntu %1%2%3) AppleWebKit/%4 Chromium/%5 %6Safari/%7%8"48 readonly property string _template: "Mozilla/5.0 (Linux; Ubuntu %1%2%3) AppleWebKit/%4 Chromium/%5 %6Safari/%7%8"
4949
50 // FIXME: compute at build time (using lsb_release)
51 readonly property string _ubuntuVersion: "14.04"
52
53 readonly property string _attributes: smallScreen ? "like Android 4.4" : ""50 readonly property string _attributes: smallScreen ? "like Android 4.4" : ""
5451
55 readonly property string _hardwareID: ""52 readonly property string _hardwareID: ""
@@ -69,7 +66,7 @@
6966
70 property string defaultUA: {67 property string defaultUA: {
71 var ua = _template68 var ua = _template
72 ua = ua.arg(_ubuntuVersion) // %169 ua = ua.arg(ubuntuVersion) // %1
73 ua = ua.arg((_attributes !== "") ? " %1".arg(_attributes) : "") // %270 ua = ua.arg((_attributes !== "") ? " %1".arg(_attributes) : "") // %2
74 ua = ua.arg((_hardwareID !== "") ? "; %1".arg(_hardwareID) : "") // %371 ua = ua.arg((_hardwareID !== "") ? "; %1".arg(_hardwareID) : "") // %3
75 ua = ua.arg(_webkitVersion) // %472 ua = ua.arg(_webkitVersion) // %4
7673
=== modified file 'src/Ubuntu/Web/plugin.cpp'
--- src/Ubuntu/Web/plugin.cpp 2016-02-09 21:56:55 +0000
+++ src/Ubuntu/Web/plugin.cpp 2016-04-27 16:45:18 +0000
@@ -45,6 +45,7 @@
45 Q_PROPERTY(QString webviewDevtoolsDebugHost READ devtoolsHost CONSTANT)45 Q_PROPERTY(QString webviewDevtoolsDebugHost READ devtoolsHost CONSTANT)
46 Q_PROPERTY(int webviewDevtoolsDebugPort READ devtoolsPort CONSTANT)46 Q_PROPERTY(int webviewDevtoolsDebugPort READ devtoolsPort CONSTANT)
47 Q_PROPERTY(QStringList webviewHostMappingRules READ hostMappingRules CONSTANT)47 Q_PROPERTY(QStringList webviewHostMappingRules READ hostMappingRules CONSTANT)
48 Q_PROPERTY(QString ubuntuVersion READ ubuntuVersion CONSTANT)
4849
49public:50public:
50 UbuntuWebPluginContext(QObject* parent = 0);51 UbuntuWebPluginContext(QObject* parent = 0);
@@ -56,6 +57,7 @@
56 QString devtoolsHost();57 QString devtoolsHost();
57 int devtoolsPort();58 int devtoolsPort();
58 QStringList hostMappingRules();59 QStringList hostMappingRules();
60 QString ubuntuVersion() const;
5961
60Q_SIGNALS:62Q_SIGNALS:
61 void cacheLocationChanged() const;63 void cacheLocationChanged() const;
@@ -205,6 +207,11 @@
205 return m_devtoolsPort;207 return m_devtoolsPort;
206}208}
207209
210QString UbuntuWebPluginContext::ubuntuVersion() const
211{
212 return QStringLiteral(UBUNTU_VERSION);
213}
214
208void UbuntuWebPluginContext::onFocusWindowChanged(QWindow* window)215void UbuntuWebPluginContext::onFocusWindowChanged(QWindow* window)
209{216{
210 updateScreen();217 updateScreen();

Subscribers

People subscribed via source and target branches

to status/vote changes: