Page MenuHomeLubuntu

Calamares needs per-package apport hook
Closed, ResolvedPublic

Description

Calamares has no apport per-package hook, which means that when an error is reported, little information is collected. ubiquity provides all sorts of great info that can help diagnose issues. At minimum, the Calamares.log in $HOME/.cache/Calamares/Calamares would be a good inclusion.

Bug report

Event Timeline

wxl created this task.May 20 2018, 8:55 PM
wxl triaged this task as Normal priority.
wxl removed a project: Release Management.

What do we know about how this is already implemented?

I would have absolutely zero idea for how to start here.

wxl added a comment.May 20 2018, 9:44 PM

It's actually fairly well documented.

tsimonq2 raised the priority of this task from Normal to High.May 20 2018, 9:55 PM

I would consider this pretty high-priority then.

Wanna take this one, @wxl? (Whoever does it, the other should review either way to make sure we don't screw this one up.)

tsimonq2 assigned this task to wxl.May 20 2018, 10:06 PM

As said over IRC.

wxl moved this task from New to Blocked on the QA board.Aug 19 2018, 1:48 PM

Well, I have a fix, but I can't really test it because it fails to build as do other packages thanks to Boost 1.67. For what it's worth, here's the debdiff:

diff -Nru calamares-3.2.1/debian/changelog calamares-3.2.1/debian/changelog
--- calamares-3.2.1/debian/changelog	2018-08-14 22:15:54.000000000 +0000
+++ calamares-3.2.1/debian/changelog	2018-08-19 17:32:53.000000000 +0000
@@ -1,3 +1,9 @@
+calamares (3.2.1-1ubuntu2) cosmic; urgency=medium
+
+  * Add package hook for apport. 
+
+ -- root <root@cosmic.lxd>  Sun, 19 Aug 2018 17:32:53 +0000
+
 calamares (3.2.1-1ubuntu1) cosmic; urgency=medium
 
   * Add a build dependency on libpwquality-dev.
diff -Nru calamares-3.2.1/debian/control calamares-3.2.1/debian/control
--- calamares-3.2.1/debian/control	2018-08-14 22:15:35.000000000 +0000
+++ calamares-3.2.1/debian/control	2018-08-19 17:32:53.000000000 +0000
@@ -8,13 +8,13 @@
                debhelper (>= 11),
                extra-cmake-modules,
                gettext,
-               libkf5kio-dev,
                libatasmart-dev,
                libboost-python-dev,
                libkf5config-dev,
                libkf5coreaddons-dev,
                libkf5i18n-dev,
                libkf5iconthemes-dev,
+               libkf5kio-dev,
                libkf5parts-dev,
                libkf5service-dev,
                libkf5solid-dev,
@@ -22,9 +22,11 @@
                libparted-dev,
                libpolkit-qt5-1-dev,
                libpwquality-dev,
-               libyaml-cpp-dev,
+               libpythonqt-qt5-python3-dev,
+               libpythonqt-qtall-qt5-python3-dev,
                libqt5svg5-dev,
                libqt5webkit5-dev,
+               libyaml-cpp-dev,
                os-prober,
                pkg-config,
                pkg-kde-tools,
@@ -37,9 +39,7 @@
                qtbase5-dev,
                qtdeclarative5-dev,
                qttools5-dev,
-               qttools5-dev-tools,
-               libpythonqt-qt5-python3-dev,
-               libpythonqt-qtall-qt5-python3-dev
+               qttools5-dev-tools
 Standards-Version: 4.1.4
 Homepage: https://github.com/calamares/calamares
 Vcs-Browser: https://salsa.debian.org/qt-kde-team/kde-extras/calamares
@@ -48,7 +48,7 @@
 Package: calamares
 Architecture: linux-any
 Depends: os-prober, ${misc:Depends}, ${shlibs:Depends}
-Recommends: squashfs-tools, btrfs-progs
+Recommends: btrfs-progs, squashfs-tools
 Description: distribution-independent installer framework
  Calamares is a distribution-independent installer framework.
  .
diff -Nru calamares-3.2.1/debian/copyright calamares-3.2.1/debian/copyright
--- calamares-3.2.1/debian/copyright	2018-06-26 12:33:04.000000000 +0000
+++ calamares-3.2.1/debian/copyright	2018-08-19 17:32:53.000000000 +0000
@@ -121,4 +121,3 @@
  On Debian systems the full text of the GNU General Public License
  version 3 can be found in the file
  `/usr/share/common-licenses/GPL-3'.
-
diff -Nru calamares-3.2.1/debian/patches/apport-package-hook.patch calamares-3.2.1/debian/patches/apport-package-hook.patch
--- calamares-3.2.1/debian/patches/apport-package-hook.patch	1970-01-01 00:00:00.000000000 +0000
+++ calamares-3.2.1/debian/patches/apport-package-hook.patch	2018-08-19 17:32:53.000000000 +0000
@@ -0,0 +1,12 @@
+Description: Add package hook for apport.
+Author: Walter Lapchynski <wxl@ubuntu.com>
+Index: calamares-3.2.1/calamares.py
+===================================================================
+--- /dev/null
++++ calamares-3.2.1/calamares.py
+@@ -0,0 +1,5 @@
++from apport.hookutils import *
++
++def add_info(report, ui):
++    attach_file_if_exists(report, '~/.cache/Calamares/session.log', key='Calamares session.log')
++    attach_related_packages(report, ['calamares-settings-ubuntu-common', 'calamares-settings-lubuntu', 'xfsprogs', 'btrfs-progs'])
diff -Nru calamares-3.2.1/debian/patches/series calamares-3.2.1/debian/patches/series
--- calamares-3.2.1/debian/patches/series	2018-06-18 11:30:49.000000000 +0000
+++ calamares-3.2.1/debian/patches/series	2018-08-19 17:32:53.000000000 +0000
@@ -1,3 +1,4 @@
 0001-replace-pkexec-by-sudo.patch
 0002-Add-patch-to-compile-with-pythonQt.patch
 0003-remove-wrong-path.patch
+apport-package-hook.patch
tsimonq2 moved this task from Blocked to In progress on the QA board.Aug 19 2018, 3:24 PM

The FTBFS is now fixed, but be sure to pull in the yaml-cpp that's in cosmic-proposed.

tsimonq2 closed this task as Resolved.Aug 20 2018, 10:46 PM

Sponsored earlier today.