Example #1
0
def add_info(report, ui):
    attach_file(report, '/proc/version_signature', 'ProcVersionSignature')
    attach_file(report, '/proc/cmdline', 'ProcKernelCmdline')

    sec_re = re.compile('audit\(|apparmor|selinux|security', re.IGNORECASE)
    report['KernLog'] = recent_kernlog(sec_re)
    # DBus messages are reported to syslog
    dbus_sec_re = re.compile('dbus.* apparmor', re.IGNORECASE)
    report['Syslog'] = recent_syslog(dbus_sec_re)

    packages = [
        'apparmor', 'apparmor-utils', 'libapparmor1', 'libapparmor-dev',
        'libapparmor-perl', 'apparmor-utils', 'apparmor-docs',
        'apparmor-profiles', 'apparmor-easyprof', 'python3-apparmor',
        'python-apparmor', 'libpam-apparmor', 'libapache2-mod-apparmor',
        'python3-libapparmor', 'python-libapparmor', 'auditd', 'libaudit0'
    ]

    versions = ''
    for package in packages:
        try:
            version = packaging.get_version(package)
        except ValueError:
            version = 'N/A'
        if version is None:
            version = 'N/A'
        versions += '%s %s\n' % (package, version)
    report['ApparmorPackages'] = versions

    # These need to be run as root
    report['ApparmorStatusOutput'] = root_command_output(
        ['/usr/sbin/apparmor_status'])
    report['PstreeP'] = command_output(['/usr/bin/pstree', '-p'])
    attach_file_if_exists(report, '/var/log/audit/audit.log', 'audit.log')
Example #2
0
def add_info(report):
    """add report info"""
    attach_file_if_exists(report, lyricue_config,
                                  "LyricueConfig")
    attach_file_if_exists(report, lyricue_frontend_log,
                                  "LyricueFrontendLog")
    attach_file_if_exists(report, lyricue_server_log,
                                  "LyricueServerLog")
    attach_file_if_exists(report, lyricue_preview_log,
                                  "LyricuePreviewLog")
    attach_file_if_exists(report, lyricue_frontend_old_log,
                                  "LyricueFrontendOldLog")
    attach_file_if_exists(report, lyricue_server_old_log,
                                  "LyricueServerOldLog")
    attach_file_if_exists(report, lyricue_preview_old_log,
                                  "LyricuePreviewOldLog")
    attach_file_if_exists(report, '/var/log/Xorg.0.log', 'XorgLog')

    if os.environ.get('DISPLAY'):
        log = command_output(['xrandr', '-q'])
        if not log or log[:5] == "Error":
            return
        report['Xrandr'] = log

    if not apport.packaging.is_distro_package(report['Package'].split()[0]):
        report['ThirdParty'] = 'True'
        report['CrashDB'] = 'lyricue'

    packages = ['lyricue',
		'libclutter-1.0-0',
		'libclutter-gst-1.0-0',
		'libclutter-gtk-1.0-0',
		'libclutter-gtk-0.10-0',
		'mysql-server']

    versions = ''
    for package in packages:
        try:
            version = packaging.get_version(package)
        except ValueError:
            version = 'N/A'
        if version is None:
            version = 'N/A'
        versions += '%s %s\n' % (package, version)
    report['LyricuePackages'] = versions
Example #3
0
def add_info(report):
    """add report info"""
    attach_file_if_exists(report, lyricue_config, "LyricueConfig")
    attach_file_if_exists(report, lyricue_frontend_log, "LyricueFrontendLog")
    attach_file_if_exists(report, lyricue_server_log, "LyricueServerLog")
    attach_file_if_exists(report, lyricue_preview_log, "LyricuePreviewLog")
    attach_file_if_exists(report, lyricue_frontend_old_log,
                          "LyricueFrontendOldLog")
    attach_file_if_exists(report, lyricue_server_old_log,
                          "LyricueServerOldLog")
    attach_file_if_exists(report, lyricue_preview_old_log,
                          "LyricuePreviewOldLog")
    attach_file_if_exists(report, '/var/log/Xorg.0.log', 'XorgLog')

    if os.environ.get('DISPLAY'):
        log = command_output(['xrandr', '-q'])
        if not log or log[:5] == "Error":
            return
        report['Xrandr'] = log

    if not apport.packaging.is_distro_package(report['Package'].split()[0]):
        report['ThirdParty'] = 'True'
        report['CrashDB'] = 'lyricue'

    packages = [
        'lyricue', 'libclutter-1.0-0', 'libclutter-gst-1.0-0',
        'libclutter-gtk-1.0-0', 'libclutter-gtk-0.10-0', 'mysql-server'
    ]

    versions = ''
    for package in packages:
        try:
            version = packaging.get_version(package)
        except ValueError:
            version = 'N/A'
        if version is None:
            version = 'N/A'
        versions += '%s %s\n' % (package, version)
    report['LyricuePackages'] = versions
def add_info(report):
    """add report info"""
    attach_file_if_exists(report, u1_except_log,
                                  "UbuntuOneSyncdaemonExceptionsLog")
    attach_file_if_exists(report, u1_invalidnames_log,
                                  "UbuntuOneSyncdaemonInvalidNamesLog")
    attach_file_if_exists(report, u1_oauth_log,
                                  "UbuntuOneOAuthLoginLog")
    attach_file_if_exists(report, u1_prefs_log,
                                  "UbuntuOnePreferencesLog")
    attach_file_if_exists(report, u1_usersd_conf,
                                  "UbuntuOneUserSyncdaemonConfig")
    attach_file_if_exists(report, u1_sd_conf,
                                  "UbuntuOneSyncdaemonConfig")
    attach_file_if_exists(report, u1_user_conf,
                                  "UbuntuOneClientConfig")

    if not apport.packaging.is_distro_package(report['Package'].split()[0]):
        report['ThirdParty'] = 'True'
        report['CrashDB'] = 'ubuntuone'

    packages = ['ubuntuone-client',
                'python-ubuntuone-client',
                'ubuntuone-client-tools',
                'ubuntuone-client-gnome',
                'python-ubuntuone-storageprotocol',
                'ubuntuone-ppa-beta']

    versions = ''
    for package in packages:
        try:
            version = packaging.get_version(package)
        except ValueError:
            version = 'N/A'
        if version is None:
            version = 'N/A'
        versions += '%s %s\n' % (package, version)
    report['UbuntuOneClientPackages'] = versions