diff --git a/debian/apport-autoreport.path b/debian/apport-autoreport.path new file mode 100644 index 0000000..54314aa --- /dev/null +++ b/debian/apport-autoreport.path @@ -0,0 +1,9 @@ +[Unit] +Description=Process error reports when automatic reporting is enabled (file watch) +ConditionPathExists=/var/lib/apport/autoreport + +[Path] +PathExistsGlob=/var/crash/*.crash + +[Install] +WantedBy=paths.target diff --git a/debian/apport-autoreport.service b/debian/apport-autoreport.service new file mode 100644 index 0000000..5cb8523 --- /dev/null +++ b/debian/apport-autoreport.service @@ -0,0 +1,9 @@ +[Unit] +Description=Process error reports when automatic reporting is enabled +ConditionPathExists=/var/lib/apport/autoreport +Wants=whoopsie.service +After=whoopsie.service + +[Service] +Type=oneshot +ExecStart=/usr/share/apport/whoopsie-upload-all diff --git a/debian/apport-gtk.install b/debian/apport-gtk.install new file mode 100644 index 0000000..ff0900b --- /dev/null +++ b/debian/apport-gtk.install @@ -0,0 +1,2 @@ +usr/share/applications/*gtk* +usr/share/apport/*gtk* diff --git a/debian/apport-kde.install b/debian/apport-kde.install new file mode 100644 index 0000000..350cbd6 --- /dev/null +++ b/debian/apport-kde.install @@ -0,0 +1,9 @@ +usr/share/applications/apport-kde-mime.desktop +usr/share/applications/apport-kde-mimelnk.desktop usr/share/mimelnk/text +usr/share/apport/*kde* +usr/share/apport/bugreport.ui +usr/share/apport/choices.ui +usr/share/apport/error.ui +usr/share/apport/progress.ui +usr/share/apport/spinner.gif +usr/share/apport/userpass.ui diff --git a/debian/apport-noui.dirs b/debian/apport-noui.dirs new file mode 100644 index 0000000..4686121 --- /dev/null +++ b/debian/apport-noui.dirs @@ -0,0 +1 @@ +/var/lib/apport diff --git a/debian/apport-noui.postinst b/debian/apport-noui.postinst new file mode 100644 index 0000000..a8dbe6a --- /dev/null +++ b/debian/apport-noui.postinst @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +touch /var/lib/apport/autoreport + +# start the autoreport service on installation +if [ -x "/usr/bin/deb-systemd-helper" ]; then + deb-systemd-invoke start 'apport-autoreport.path' >/dev/null || true +fi + +#DEBHELPER# diff --git a/debian/apport-noui.prerm b/debian/apport-noui.prerm new file mode 100644 index 0000000..4d4f65f --- /dev/null +++ b/debian/apport-noui.prerm @@ -0,0 +1,19 @@ +#!/bin/sh + +set -e + +if [ "$1" = remove ]; then + rm -f /var/lib/apport/autoreport +fi + +# Transition the units to apport package itself +if [ -x "/usr/bin/deb-systemd-helper" ]; then + deb-systemd-invoke stop 'apport-noui.path' 'apport-noui.service' >/dev/null || true + deb-systemd-helper purge 'apport-noui.path' >/dev/null || true + deb-systemd-helper unmask 'apport-noui.path' >/dev/null || true + if dpkg --compare-versions "$2" ge 2.20.10-0ubuntu4; then + deb-systemd-invoke stop 'apport-autoreport.path' >/dev/null || true + fi +fi + +#DEBHELPER# diff --git a/debian/apport-retrace.install b/debian/apport-retrace.install new file mode 100644 index 0000000..6b27380 --- /dev/null +++ b/debian/apport-retrace.install @@ -0,0 +1,5 @@ +usr/bin/apport-retrace +usr/bin/crash-digger +usr/bin/dupdb-admin +usr/share/man/man1/apport-retrace.1 +usr/share/man/man1/dupdb-admin.1 diff --git a/debian/apport-valgrind.install b/debian/apport-valgrind.install new file mode 100644 index 0000000..448e695 --- /dev/null +++ b/debian/apport-valgrind.install @@ -0,0 +1,2 @@ +usr/bin/apport-valgrind +usr/share/man/man1/apport-valgrind.1 diff --git a/debian/apport.init b/debian/apport.init new file mode 120000 index 0000000..4c697d9 --- /dev/null +++ b/debian/apport.init @@ -0,0 +1 @@ +../etc/init.d/apport \ No newline at end of file diff --git a/debian/apport.install b/debian/apport.install new file mode 100644 index 0000000..81ca275 --- /dev/null +++ b/debian/apport.install @@ -0,0 +1,38 @@ +../../java/apport.jar usr/share/apport/ +../../java/crash.class usr/share/apport/testsuite/ +../../java/crash.jar usr/share/apport/testsuite/ +debian/apport-autoreport.path /lib/systemd/system +debian/apport-autoreport.service /lib/systemd/system +etc +lib/systemd/ +lib/udev/ +usr/bin/apport-bug +usr/bin/apport-cli +usr/bin/apport-collect +usr/bin/apport-unpack +usr/bin/oem-getlogs +usr/lib/pm-utils +usr/share/apport/apport +usr/share/apport/apport-checkreports +usr/share/apport/apportcheckresume +usr/share/apport/dump_acpi_tables.py +usr/share/apport/gcc_ice_hook +usr/share/apport/general-hooks +usr/share/apport/is-enabled +usr/share/apport/iwlwifi_error_dump +usr/share/apport/java_uncaught_exception +usr/share/apport/kernel_crashdump +usr/share/apport/kernel_oops +usr/share/apport/package-hooks +usr/share/apport/package_hook +usr/share/apport/recoverable_problem +usr/share/apport/root_info_wrapper +usr/share/apport/unkillable_shutdown +usr/share/apport/whoopsie-upload-all +usr/share/doc/apport +usr/share/icons +usr/share/locale +usr/share/man/man1/apport-bug.1 +usr/share/man/man1/apport-cli.1 +usr/share/man/man1/apport-unpack.1 +usr/share/polkit-1 diff --git a/debian/apport.links b/debian/apport.links new file mode 100644 index 0000000..4579c2a --- /dev/null +++ b/debian/apport.links @@ -0,0 +1,15 @@ +/usr/bin/apport-bug /usr/bin/ubuntu-bug +/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-5.4.py +/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-meta-oem-osp1.py +/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-meta-oem.py +/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-meta.py +/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-oem-5.4.py +/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-oem-osp1.py +/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-oem.py +/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-signed-5.4.py +/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-signed-oem-5.4.py +/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-signed-oem-osp1.py +/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-signed-oem.py +/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-signed.py +/usr/share/man/man1/apport-bug.1.gz /usr/share/man/man1/apport-collect.1.gz +/usr/share/man/man1/apport-bug.1.gz /usr/share/man/man1/ubuntu-bug.1.gz diff --git a/debian/apport.logrotate b/debian/apport.logrotate new file mode 100644 index 0000000..e255fea --- /dev/null +++ b/debian/apport.logrotate @@ -0,0 +1,9 @@ +/var/log/apport.log { + daily + rotate 7 + delaycompress + compress + notifempty + missingok +} + diff --git a/debian/apport.maintscript b/debian/apport.maintscript new file mode 100644 index 0000000..6b894bd --- /dev/null +++ b/debian/apport.maintscript @@ -0,0 +1,2 @@ +rm_conffile /etc/apport/native-origins.d/lts-q-backports 2.5.1-0ubuntu8~ +rm_conffile /etc/init/apport.conf 2.20.6-0ubuntu5~ diff --git a/debian/apport.postinst b/debian/apport.postinst new file mode 100644 index 0000000..3e98058 --- /dev/null +++ b/debian/apport.postinst @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +if [ "$1" = configure ]; then + # directory is required for package failures even if apport is disabled and + # thus the upstart job does not run + mkdir -p -m 1777 /var/crash +fi + +#DEBHELPER# diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..6dbd8f2 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +apport (2.20.11-ok1) yangtze; urgency=medium + + * Build for openKylin. + + -- openKylinBot Mon, 25 Apr 2022 22:03:04 +0800 diff --git a/debian/clean b/debian/clean new file mode 100644 index 0000000..3ec0e7f --- /dev/null +++ b/debian/clean @@ -0,0 +1,2 @@ +debhelper/dh_apport.1 +apport/packaging_impl.py diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..538db82 --- /dev/null +++ b/debian/control @@ -0,0 +1,205 @@ +Source: apport +Section: utils +Priority: optional +Build-Depends: debhelper (>= 9), + dh-systemd, + dh-translations, + gdb, + gir1.2-glib-2.0 (>= 1.29.17), + lsb-release, + net-tools, + python3-all, + python3-gi +Build-Depends-Indep: dbus-x11, + default-jdk | java-sdk, + dh-python, + gir1.2-gtk-3.0 (>= 3.1.90), + gir1.2-wnck-3.0, + gvfs-daemons, + intltool, + libc6-dbg | libc-dbg, + libglib2.0-dev, + procps, + psmisc, + pycodestyle | pep8, + pyflakes, + python3-apt (>= 0.7.9), + python3-distutils-extra (>= 2.24~), + python3-mock, + xterm, + xvfb +Maintainer: Ubuntu Developers +Standards-Version: 3.9.8 +X-Python3-Version: >= 3.0 +Vcs-Bzr: https://code.launchpad.net/~ubuntu-core-dev/ubuntu/focal/apport/ubuntu +Homepage: https://wiki.ubuntu.com/Apport + +Package: apport +Architecture: all +Depends: gir1.2-glib-2.0 (>= 1.29.17), + lsb-base (>= 3.0-0), + python3, + python3-apport (>= ${source:Version}), + python3-gi, + ${misc:Depends} +Recommends: apport-symptoms, python3-systemd +Suggests: apport-gtk | apport-kde, policykit-1 +Replaces: core-dump-handler, python-apport (<< 2.2-0) +Breaks: python-apport (<< 2.2-0) +Conflicts: core-dump-handler +Provides: core-dump-handler +Description: automatically generate crash reports for debugging + apport automatically collects data from crashed processes and + compiles a problem report in /var/crash/. This utilizes the crashdump + helper hook provided by the Ubuntu kernel. + . + This package also provides a command line frontend for browsing and + handling the crash reports. For desktops, you should consider + installing the GTK+ or Qt user interface (apport-gtk or apport-kde). + +Package: python3-problem-report +Section: python +Architecture: all +Depends: ${misc:Depends}, ${python3:Depends} +Description: Python 3 library to handle problem reports + This Python library provides an interface for creating, modifying, + and accessing standardized problem reports for program and kernel + crashes and packaging bugs. + . + These problem reports use standard Debian control format syntax + (RFC822). + +Package: python3-apport +Section: python +Architecture: all +Depends: lsb-release, + python3-apt (>= 0.7.9), + python3-httplib2, + python3-launchpadlib, + python3-problem-report (>= 0.94), + python3-requests-unixsocket, + ${misc:Depends}, + ${python3:Depends} +Recommends: apport +Description: Python 3 library for Apport crash report handling + This Python package provides high-level functions for creating and + handling apport crash reports: + . + * Query available and new reports. + * Add OS, packaging, and process runtime information to a report. + * Various frontend utility functions. + * Python hook to generate crash reports when Python scripts fail. + +Package: apport-retrace +Section: devel +Architecture: all +Depends: apt, + binutils, + dpkg-dev, + gdb, + libc6-dbg | libc6-dbgsym | libc-dbg, + python3, + python3-apport (>= ${source:Version}), + python3-launchpadlib, + ${misc:Depends} +Suggests: gdb-multiarch +Description: tools for reprocessing Apport crash reports + apport-retrace recombines an Apport crash report (either a file or a + Launchpad bug) and debug symbol packages (.ddebs) into fully symbolic + stack traces. This can optionally use a sandbox for installing debug symbol + packages and doing the processing, so that entire process of retracing crashes + can happen with normal user privileges without changing the system. + . + You need to install gdb-multiarch if you want to be able to retrace crash + reports which happened on a different architecture than the one you run + apport-retrace on. + +Package: apport-valgrind +Section: devel +Architecture: all +Depends: apt, + binutils, + dpkg-dev, + libc6-dbg | libc6-dbgsym | libc-dbg, + python3, + python3-apport (>= ${source:Version}), + valgrind (>= 3.8.1-0), + ${misc:Depends} +Description: valgrind wrapper that first downloads debug symbols + apport-valgrind is a valgrind wrapper that automatically downloads related + available debug symbols and provides them to valgrind's memcheck tool, which + is executed. The output is a valgrind log file ("valgrind.log") that contains + stack traces (with as many symbols resolved as available) and that shows + memory leaks. + +Package: apport-gtk +Section: gnome +Architecture: all +Depends: apport (>= 0.41), + gir1.2-gtk-3.0 (>= 3.1.90), + gir1.2-wnck-3.0, + procps, + python3, + python3-apport (>= ${source:Version}), + python3-gi, + whoopsie-preferences, + x-terminal-emulator, + ${misc:Depends} +Recommends: gdb | gdb-minimal, update-notifier +Description: GTK+ frontend for the apport crash report system + apport automatically collects data from crashed processes and + compiles a problem report in /var/crash/. This utilizes the crashdump + helper hook provided by the Ubuntu kernel. + . + This package provides a GTK+ frontend for browsing and handling the + crash reports. + +Package: apport-kde +Section: kde +Architecture: all +Depends: apport (>= 0.41), + procps, + python3, + python3-apport (>= ${source:Version}), + python3-pyqt5, + x-terminal-emulator, + ${misc:Depends} +Recommends: gdb-minimal | gdb, kubuntu-notification-helper | lxqt-notificationd +Description: KDE frontend for the apport crash report system + apport automatically collects data from crashed processes and + compiles a problem report in /var/crash/. This utilizes the crashdump + helper hook provided by the Ubuntu kernel. + . + This package provides a KDE frontend for browsing and handling the + crash reports. + +Package: dh-apport +Section: devel +Architecture: all +Multi-Arch: foreign +Depends: ${misc:Depends}, ${perl:Depends} +Description: debhelper extension for the apport crash report system + apport automatically collects data from crashed processes and + compiles a problem report in /var/crash/. This utilizes the crashdump + helper hook provided by the Ubuntu kernel. + . + This package provides a debhelper extension to make it easier for other + packages to include apport hooks. + +Package: apport-noui +Section: utils +Architecture: all +Depends: apport (>= 2.20.10-0), + gdb-minimal | gdb, + procps, + python3, + python3-apport (>= ${source:Version}), + whoopsie, + ${misc:Depends} +Description: tools for automatically reporting Apport crash reports + apport automatically collects data from crashed processes and + compiles a problem report in /var/crash/. This utilizes the crashdump + helper hook provided by the Ubuntu kernel. + . + Installing this package will configure your system to automatically submit + all new Apport crash reports. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..56980e2 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,15 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Contact: Martin Pitt +Source: https://launchpad.net/apport/+download + +Files: * +Copyright: + Copyright (C) 2006-2012 Canonical Ltd. +License: GPL-2+ + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + On Debian systems, the complete text of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL-2'. diff --git a/debian/dh-apport.install b/debian/dh-apport.install new file mode 100644 index 0000000..a6ad7c2 --- /dev/null +++ b/debian/dh-apport.install @@ -0,0 +1,2 @@ +../../debhelper/apport.pm usr/share/perl5/Debian/Debhelper/Sequence +../../debhelper/dh_apport usr/bin diff --git a/debian/dh-apport.manpages b/debian/dh-apport.manpages new file mode 100644 index 0000000..a15ac24 --- /dev/null +++ b/debian/dh-apport.manpages @@ -0,0 +1 @@ +debhelper/dh_apport.1 diff --git a/debian/python3-apport.install b/debian/python3-apport.install new file mode 100644 index 0000000..c899d80 --- /dev/null +++ b/debian/python3-apport.install @@ -0,0 +1,2 @@ +usr/lib/python3*/*-packages/apport/* +usr/lib/python3*/*-packages/apport_python_hook.py diff --git a/debian/python3-problem-report.install b/debian/python3-problem-report.install new file mode 100644 index 0000000..6451357 --- /dev/null +++ b/debian/python3-problem-report.install @@ -0,0 +1 @@ +usr/lib/python3*/*-packages/problem_report* diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..cc1d36f --- /dev/null +++ b/debian/rules @@ -0,0 +1,41 @@ +#!/usr/bin/make -f + +%: + dh "$@" --with python3,translations,systemd --buildsystem pybuild + +# needs manual commands for Python 3, see Debian #597105 +override_dh_auto_clean: + dh_auto_clean + rm -rf build + +override_dh_auto_build: + dh_auto_build + python3 setup.py build + +override_dh_auto_install: + dh_auto_install + set -ex; for python in $(shell py3versions -r); do \ + $$python setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \ + done + +override_dh_auto_test: +ifeq (, $(findstring nocheck, $(DEB_BUILD_OPTIONS))) + # drop LD_PRELOAD to avoid running under fakeroot; drop TMPDIR to work + # around LP#972324 (set by autopkgtest) + # run subset of tests that work on buildds, full tests are in + # autopkgtest + set -e; for t in apport_unpack apport_valgrind crashdb hooks packaging \ + parse_segv problem_report rethread; do \ + env -u LD_PRELOAD -u TMPDIR APPORT_TEST_NOXVFB=1 sh test/run $$t; \ + done +endif + +override_dh_installinit: + dh_installinit --error-handler=true + +override_dh_install: + dh_install -X.pyc -X.egg-info --list-missing + pod2man -c Debhelper -r "$(DEB_VERSION)" debhelper/dh_apport debhelper/dh_apport.1 + +override_dh_python3: + dh_python3 --skip-private diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..f79f6d8 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,17 @@ +Tests: upstream-system +Depends: apport, + apport-gtk, + apport-kde, + apport-retrace, + apport-valgrind, + at-spi2-core, + build-essential, + dbus-x11, + gnome-icon-theme, + gvfs-daemons, + libglib2.0-dev, + python-twisted-core, + python3-mock, + xterm, + xvfb +Restrictions: needs-root, allow-stderr diff --git a/debian/tests/upstream-system b/debian/tests/upstream-system new file mode 100644 index 0000000..505cf22 --- /dev/null +++ b/debian/tests/upstream-system @@ -0,0 +1,19 @@ +#!/bin/sh + +# do not run in the source tree, as we want to check the system-installed +# apport +TESTDIR=${ADTTMP:-/tmp}/apport-tests +mkdir -p $TESTDIR +cp test/test_* test/run "$TESTDIR" +cd "$TESTDIR" + +# clean up old crash reports +rm -rf /var/crash/* + +export GNUPGHOME=$TESTDIR/gnupg +mkdir -m 700 $GNUPGHOME + +./run +ret=$? +echo "Number of failed tests: $ret" +exit $ret diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..8728033 --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://launchpad.net/apport/+download .*/apport-([0-9.]+)\.tar\.gz