on db67117 help sign in
15 files changed+86−38
since splitsnapshots
unifiedsplit
CMakeLists.txt+1−1 Jenkinsfile+4−1 data/unity8-session+45 data/unity8.service+11 debian/changelog+1−1 debian/control+9−8 debian/rules+1−1 debian/unity8.install+2−1 plugins/Unity/Session/dbusunitysessionservice.cpp+5−11 tests/plugins/Unity/Session/CMakeLists.txt+1 tests/plugins/Unity/Session/LogindServer.cpp−5 tests/plugins/Unity/Session/LogindServer.h−1 tests/plugins/Unity/Session/interfaces.xml−4 tests/plugins/Unity/Session/server.cpp+1−1 tests/plugins/Unity/Session/sessionbackendtest.cpp+5−3
CMakeLists.txt+1−1
@@ -78,7 +78,7 @@ pkg_check_modules(GLIB REQUIRED glib-2.0>=2.32)
7878pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=12)
7979pkg_check_modules(QMENUMODEL REQUIRED qmenumodel)
8080pkg_check_modules(GD3 REQUIRED gnome-desktop-3.0)
81−pkg_check_modules(UAL REQUIRED ubuntu-app-launch-2)
81+pkg_check_modules(UAL REQUIRED ubuntu-app-launch-3)
8282pkg_check_modules(UBUNTUGESTURES REQUIRED UbuntuGestures)
8383pkg_check_modules(QTDBUSTEST REQUIRED
8484 libqtdbustest-1
Jenkinsfile+4−1
@@ -28,7 +28,7 @@ build-binary.sh'''
2828 cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, deleteDirs: true)
2929 unstash 'source'
3030 sh '''export architecture="arm64"
31− build-binary.sh'''
31+ # build-binary.sh'''
3232 stash(includes: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.changes,*.buildinfo,lintian.txt', name: 'build-arm64')
3333 cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, deleteDirs: true)
3434 }
@@ -38,6 +38,9 @@ build-binary.sh'''
3838 cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, deleteDirs: true)
3939 unstash 'source'
4040 sh '''export architecture="amd64"
41+ export DEBBUILDOPTS=-sa
42+export SKIP_ARCH_BUILD=false
43+export SKIP_SOURCE_REMOVAL=true
4144 build-binary.sh'''
4245 stash(includes: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.changes,*.buildinfo,lintian.txt', name: 'build-amd64')
4346 cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, deleteDirs: true)
data/unity8-sessionnew file+45
@@ -0,0 +1,45 @@
1+#!/bin/sh
2+# -*- Mode: sh; indent-tabs-mode: nil; tab-width: 2 -*-
3+
4+# Ensure the shell always gets unthrottled touch events, so that applications
5+# who want full speed low-latency input can get it (LP: #1497105) and so that
6+# apps can use QML touch compression safely (the QML touch compression
7+# algorithm does not support nesting well - LP: #1486341, LP: #1556763 - so
8+# must be fed by the raw input event stream from Unity8).
9+export QML_NO_TOUCH_COMPRESSION=1
10+
11+export MIR_SERVER_PROMPT_FILE=1
12+
13+# Hard code socket path because our snappy apparmor profile
14+# only lets us put the socket in one place. And consumers expect it there.
15+# (XDG_RUNTIME_DIR isn't typical under snappy)
16+export MIR_SERVER_FILE=/run/user/$(id -u)/mir_socket
17+
18+rm -f "$MIR_SERVER_FILE"
19+rm -f "${MIR_SERVER_FILE}_trusted"
20+
21+if [ "$XDG_SESSION_DESKTOP" = "ubuntu-touch" ]; then
22+ # On Ubuntu Touch, we currently use a trick where we auto-login the
23+ # user without a LightDM greeter at all. In this case, we want to
24+ # start with the lockscreen visible. Once we switch to using a
25+ # proper greeter for the first login, we can remove this code path.
26+ MODE=full-greeter
27+else
28+ MODE=full-shell
29+fi
30+
31+dbus-update-activation-environment --systemd MIR_SOCKET=$MIR_SERVER_FILE
32+
33+# Tell unity-mir to raise SIGSTOP after we start, which we use to tell
34+# systemd when we are done starting up.
35+export UNITY_MIR_EMITS_SIGSTOP=1
36+
37+trap 'exit 0' USR1
38+
39+(trap 'kill -CONT $$; kill -USR1 $(jobs -p)' STOP;
40+ exec ${BINARY:-unity8} --mode=$MODE "$@") &
41+
42+#FIXME -- we keep hitting this timeout
43+sleep 30 # timeout for u8 startup (change to 'infinity' to disable timeout)
44+echo "Aborting unity8 launch: didn't hear back from Mir"
45+exit 100
data/unity8.servicenew file+11
@@ -0,0 +1,11 @@
1+[Unit]
2+Description=Unity Shell v8
3+PartOf=graphical-session.target
4+Requires=dbus.socket
5+After=dbus.socket
6+
7+[Service]
8+Type=forking
9+ExecStart=/usr/bin/unity8-session
10+ExecStopPost=/usr/bin/dbus-update-activation-environment --systemd MIR_SOCKET=
11+Restart=on-failure
debian/changelog+1−1
@@ -1,4 +1,4 @@
1−unity8 (8.16.1+ubports) xenial; urgency=medium
1+unity8 (8.16.1+ubports) bionic; urgency=medium
22
33 * Imported to UBports
44
debian/control+9−8
@@ -34,7 +34,7 @@ Build-Depends: cmake,
3434 libqt5svg5-dev,
3535 libqt5xmlpatterns5-dev,
3636 libsystemsettings-dev,
37− libubuntu-app-launch2-dev,
37+ libubuntu-app-launch3-dev,
3838 libubuntu-download-manager-common-dev,
3939 libubuntugestures5-dev (>= 1.3.2030),
4040 libubuntugestures5-private-dev (>= 1.3.2030),
@@ -61,7 +61,7 @@ Build-Depends: cmake,
6161 qml-module-qtsysteminfo,
6262 qml-module-qttest,
6363 qml-module-ubuntu-components (>= 1.3.2030) | qml-module-ubuntu-components-gles (>= 1.3.2030),
64− qml-module-ubuntu-web,
64+# qml-module-ubuntu-web,
6565 qt5-default,
6666 qtbase5-dev (>= 5.6),
6767 qtbase5-dev-tools,
@@ -120,20 +120,21 @@ Description: Development tool for Unity scopes
120120Package: unity8
121121Architecture: any
122122Provides: indicator-renderer,
123−Depends: dmz-cursor-theme,
123+Depends: dbus,
124+ dmz-cursor-theme,
124125 gsettings-desktop-schemas,
125126 libcap2-bin,
126127 libglib2.0-bin,
127128 qmenumodel-qml (>= 0.2.11),
128− qml-module-biometryd,
129+# qml-module-biometryd,
129130 qml-module-qt-labs-folderlistmodel,
130131 qml-module-qt-labs-settings,
131132 qml-module-qtqml-statemachine,
132133 qml-module-qtquick-xmllistmodel,
133134 qml-module-qtsysteminfo,
134− qml-module-ubuntu-web,
135+# qml-module-ubuntu-web,
135136 qtdeclarative5-qtmir-plugin (>= 0.4.8),
136− qtdeclarative5-ubuntu-telephony0.1,
137+# qtdeclarative5-ubuntu-telephony0.1,
137138 ubuntu-system-settings (>= 0.4),
138139 unity-launcher-impl-12,
139140 unity8-common (= ${source:Version}),
@@ -167,8 +168,8 @@ Depends: qml-module-qtquick-layouts,
167168 ubuntu-wallpapers,
168169 unity-application-impl-27,
169170 unity-notifications-impl-3,
170− unity-plugin-scopes | unity-scopes-impl,
171− unity-scopes-impl-12,
171+# unity-plugin-scopes | unity-scopes-impl,
172+# unity-scopes-impl-12,
172173 unity8-tests | unity-application-impl,
173174 ${misc:Depends},
174175Breaks: unity8 (<< 7.86),
debian/rules+1−1
@@ -30,7 +30,7 @@ override_dh_install:
3030 dh_install -X'*.pyc' --fail-missing
3131
3232override_dh_installdeb:
33− dh_apparmor --profile-name=usr.bin.unity8-dash -punity8-dash
33+ #dh_apparmor --profile-name=usr.bin.unity8-dash -punity8-dash
3434 dh_installdeb
3535
3636# use private lib directories
debian/unity8.install+2−1
@@ -1,7 +1,8 @@
11debian/usr.bin.unity8-dash etc/apparmor.d
22var/lib/unity8/version
33data/unity8-filewatcher.conf usr/share/upstart/sessions/
4−data/unity8.conf usr/share/upstart/sessions/
4+data/unity8.service usr/lib/systemd/user
5+data/unity8-session usr/bin
56data/devices.conf etc/ubuntu/
67data/test.sensors etc/ubuntusensors/
78usr/bin/unity8
plugins/Unity/Session/dbusunitysessionservice.cpp+5−11
@@ -36,6 +36,7 @@
3636
3737#define LOGIN1_SERVICE QStringLiteral("org.freedesktop.login1")
3838#define LOGIN1_PATH QStringLiteral("/org/freedesktop/login1")
39+#define LOGIN1_SESSION_ROOT QStringLiteral("/org/freedesktop/login1/session/")
3940#define LOGIN1_IFACE QStringLiteral("org.freedesktop.login1.Manager")
4041#define LOGIN1_SESSION_IFACE QStringLiteral("org.freedesktop.login1.Session")
4142
@@ -58,16 +59,9 @@ public:
5859
5960 void init()
6061 {
61− // get our logind session path
62− QDBusMessage msg = QDBusMessage::createMethodCall(LOGIN1_SERVICE,
63− LOGIN1_PATH,
64− LOGIN1_IFACE,
65− QStringLiteral("GetSessionByPID"));
66− msg << (quint32) getpid();
67−
68− QDBusReply<QDBusObjectPath> reply = QDBusConnection::SM_BUSNAME().call(msg);
69− if (reply.isValid()) {
70− logindSessionPath = reply.value().path();
62+ QString sessionID = QString::fromLocal8Bit(qgetenv("XDG_SESSION_ID"));
63+ if (!sessionID.isEmpty()) {
64+ logindSessionPath = LOGIN1_SESSION_ROOT + sessionID;
7165
7266 // start watching the Active property
7367 QDBusConnection::SM_BUSNAME().connect(LOGIN1_SERVICE, logindSessionPath, QStringLiteral("org.freedesktop.DBus.Properties"), QStringLiteral("PropertiesChanged"),
@@ -79,7 +73,7 @@ public:
7973 QDBusConnection::SM_BUSNAME().connect(LOGIN1_SERVICE, LOGIN1_PATH, LOGIN1_IFACE, QStringLiteral("PrepareForSleep"),
8074 this, SLOT(onResuming(bool)));
8175 } else {
82− qWarning() << "Failed to get logind session path" << reply.error().message();
76+ qWarning() << "Failed to get logind session: XDG_SESSION_ID is not set";
8377 }
8478 }
8579
tests/plugins/Unity/Session/CMakeLists.txt+1
@@ -60,6 +60,7 @@ install(TARGETS sessionbackendtestExec
6060
6161add_unity8_unittest(SessionBackend dbus-test-runner
6262 ENVIRONMENT LD_PRELOAD=$<TARGET_FILE:SessionBackendTestPreload>
63+ XDG_SESSION_ID=testing
6364 XDG_SESSION_PATH=/session
6465 ARG_PREFIX "--parameter"
6566 ARGS
tests/plugins/Unity/Session/LogindServer.cpp−5
@@ -22,11 +22,6 @@ LogindServer::LogindServer(QObject *parent)
2222{
2323}
2424
25−QDBusObjectPath LogindServer::GetSessionByPID(quint32)
26−{
27− return QDBusObjectPath("/logindsession");
28−}
29−
3025void LogindServer::Reboot(bool interactive)
3126{
3227 Q_EMIT RebootCalled(interactive);
tests/plugins/Unity/Session/LogindServer.h−1
@@ -30,7 +30,6 @@ public:
3030 explicit LogindServer(QObject *parent = nullptr);
3131
3232public Q_SLOTS:
33− QDBusObjectPath GetSessionByPID(quint32 pid);
3433 void Reboot(bool interactive);
3534 void PowerOff(bool interactive);
3635
tests/plugins/Unity/Session/interfaces.xml−4
@@ -3,10 +3,6 @@
33 <method name="Lock" />
44 </interface>
55 <interface name="org.freedesktop.login1.Manager">
6− <method name="GetSessionByPID">
7− <arg name="pid" type="u" direction="in" />
8− <arg name="session" type="o" direction="out" />
9− </method>
106 <method name="Reboot">
117 <arg name="interactive" type="b" direction="in" />
128 </method>
tests/plugins/Unity/Session/server.cpp+1−1
@@ -37,7 +37,7 @@ int main(int argc, char *argv[])
3737 auto connection = QDBusConnection::sessionBus();
3838 if (!connection.registerObject("/org/freedesktop/login1", logind))
3939 return 1;
40− if (!connection.registerObject("/logindsession", logind))
40+ if (!connection.registerObject("/org/freedesktop/login1/session/testing", logind))
4141 return 1;
4242 if (!connection.registerService("org.freedesktop.login1"))
4343 return 1;
tests/plugins/Unity/Session/sessionbackendtest.cpp+5−3
@@ -103,8 +103,8 @@ private Q_SLOTS:
103103 QCoreApplication::processEvents(); // to let the services register on DBus
104104
105105 QDBusInterface login1Interface("org.freedesktop.login1",
106− "/logindsession",
107− "org.freedesktop.login1.Manager");
106+ "/org/freedesktop/login1/session/testing",
107+ "org.freedesktop.login1.Manager");
108108 QSignalSpy spy(&login1Interface, signal.toUtf8().data());
109109
110110 QDBusInterface dbusGnomeSessionWrapper("org.gnome.SessionManager",
@@ -225,7 +225,9 @@ private Q_SLOTS:
225225 DBusUnitySessionService dbusUnitySessionService;
226226 QCoreApplication::processEvents(); // to let the service register on DBus
227227
228− QDBusInterface iface("org.freedesktop.login1", "/logindsession", "org.freedesktop.login1.Session");
228+ QDBusInterface iface("org.freedesktop.login1",
229+ "/org/freedesktop/login1/session/testing",
230+ "org.freedesktop.login1.Session");
229231 QVERIFY(iface.isValid());
230232
231233 QSignalSpy spy(&dbusUnitySessionService, SIGNAL(Unlocked()));