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
1=== modified file 'debian/control'
2--- debian/control 2016-04-15 11:37:29 +0000
3+++ debian/control 2016-04-27 16:45:18 +0000
4@@ -15,6 +15,7 @@
5 liboxideqt-qmlplugin (>= 1.12),
6 libqt5sql5-sqlite,
7 libudev-dev,
8+ lsb-release,
9 pkg-config,
10 python3-all,
11 python3-flake8,
12
13=== modified file 'src/Ubuntu/CMakeLists.txt'
14--- src/Ubuntu/CMakeLists.txt 2014-05-29 17:03:44 +0000
15+++ src/Ubuntu/CMakeLists.txt 2016-04-27 16:45:18 +0000
16@@ -19,5 +19,9 @@
17 set(QT_INSTALL_QML "/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt5/qml")
18 endif()
19
20+execute_process(COMMAND lsb_release --short --release
21+ OUTPUT_VARIABLE UBUNTU_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
22+add_definitions(-DUBUNTU_VERSION="${UBUNTU_VERSION}")
23+
24 add_subdirectory(Components)
25 add_subdirectory(Web)
26
27=== modified file 'src/Ubuntu/Web/UserAgent02.qml'
28--- src/Ubuntu/Web/UserAgent02.qml 2015-12-10 10:43:04 +0000
29+++ src/Ubuntu/Web/UserAgent02.qml 2016-04-27 16:45:18 +0000
30@@ -1,5 +1,5 @@
31 /*
32- * Copyright 2013-2015 Canonical Ltd.
33+ * Copyright 2013-2016 Canonical Ltd.
34 *
35 * This file is part of webbrowser-app.
36 *
37@@ -47,9 +47,6 @@
38 // difference in the content served by certain sites (e.g. gmail.com)
39 readonly property string _template: "Mozilla/5.0 (Linux; Ubuntu %1%2%3) AppleWebKit/%4 Chromium/%5 %6Safari/%7%8"
40
41- // FIXME: compute at build time (using lsb_release)
42- readonly property string _ubuntuVersion: "14.04"
43-
44 readonly property string _attributes: smallScreen ? "like Android 4.4" : ""
45
46 readonly property string _hardwareID: ""
47@@ -69,7 +66,7 @@
48
49 property string defaultUA: {
50 var ua = _template
51- ua = ua.arg(_ubuntuVersion) // %1
52+ ua = ua.arg(ubuntuVersion) // %1
53 ua = ua.arg((_attributes !== "") ? " %1".arg(_attributes) : "") // %2
54 ua = ua.arg((_hardwareID !== "") ? "; %1".arg(_hardwareID) : "") // %3
55 ua = ua.arg(_webkitVersion) // %4
56
57=== modified file 'src/Ubuntu/Web/plugin.cpp'
58--- src/Ubuntu/Web/plugin.cpp 2016-02-09 21:56:55 +0000
59+++ src/Ubuntu/Web/plugin.cpp 2016-04-27 16:45:18 +0000
60@@ -45,6 +45,7 @@
61 Q_PROPERTY(QString webviewDevtoolsDebugHost READ devtoolsHost CONSTANT)
62 Q_PROPERTY(int webviewDevtoolsDebugPort READ devtoolsPort CONSTANT)
63 Q_PROPERTY(QStringList webviewHostMappingRules READ hostMappingRules CONSTANT)
64+ Q_PROPERTY(QString ubuntuVersion READ ubuntuVersion CONSTANT)
65
66 public:
67 UbuntuWebPluginContext(QObject* parent = 0);
68@@ -56,6 +57,7 @@
69 QString devtoolsHost();
70 int devtoolsPort();
71 QStringList hostMappingRules();
72+ QString ubuntuVersion() const;
73
74 Q_SIGNALS:
75 void cacheLocationChanged() const;
76@@ -205,6 +207,11 @@
77 return m_devtoolsPort;
78 }
79
80+QString UbuntuWebPluginContext::ubuntuVersion() const
81+{
82+ return QStringLiteral(UBUNTU_VERSION);
83+}
84+
85 void UbuntuWebPluginContext::onFocusWindowChanged(QWindow* window)
86 {
87 updateScreen();

Subscribers

People subscribed via source and target branches

to status/vote changes: