J0mhdZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlmZddlmZej*dZdadZdBd ZdCd ZdBd ZdDd Zd ZdZdZdZ dZ!dZ"dZ#dZ$de jJddfdZ&dZ'dZ(dZ)de jJdfdZ*dZ+dZ,dEdddZ-dEdZ.dZ/d Z0d!Z1d"Z2d#Z3d$Z4d%Z5d&Z6d'Z7d(Z8d)Z9d*Z:d+Z;d,Zd/Z?d0Z@dFd1ed2eAd3dfd4ZBd5ZCd6ZDd7ZEdEd8ZFd9ZGd:ZHd;ZIdGd<ZJd=ZKd>ZLd?ZMdEd@ZNdAZOejjZQejjZRy)Hz/Convenience functions for use in package hooks.N)impl) ProblemReportz[^0-9a-zA-Z_.-]ct|tr|jd}tj d|j ddS)z{Generate a valid report key name from a file path. This will replace invalid punctuation symbols with valid ones. UTF-8. _) isinstancebytesdecode_invalid_key_chars_resubreplace)paths 2/usr/lib/python3/dist-packages/apport/hookutils.py path_to_keyr)s: ${{7# $ $S$,,sC*@ AATFcd|vry|s t|}tjj|rt |||||yy)aAttach file contents if file exists. If key is not specified, the key name will be derived from the file name with path_to_key(). If overwrite is True, an existing key will be updated. If it is False, a new key with '_' appended will be added instead. If the contents is valid UTF-8, or force_unicode is True, then the value will be a string, otherwise it will be bytes. ../N)rosrexists attach_filereportrkey overwrite force_unicodes rattach_file_if_existsr3s@ } $ ww~~dFD#y-@rcF d|vrytj|tjtjztjz}tj |}tj j|}|jtj|jk7s||k7rtj|ytj|jr>tj|d5}|jj}dddntj|y|rj!dd S j!dS#1swY0xYw#t"$rcYSwxYw#t$$r}d t'|cYd}~Sd}~wwxYw) a Return the contents of the specified path. If the contents is valid UTF-8, or force_unicode is True, then the value will a string, otherwise it will be bytes. Upon error, this will deliver a text representation of the error, instead of failing. rzError: invalid path.zError: path contained symlinks.rbNz#Error: path was not a regular file.rrerrorsError: )ropen O_NOFOLLOWO_RDONLY O_NONBLOCKfstatrrealpathst_inostatcloseS_ISREGst_modefdopenreadstripr UnicodeDecodeErrorOSErrorstr)rrfdst real_pathfcontentserrors r read_filer;KsC& D=) WWT2==2;;6F G XXb\GG$$T* 99 *11 1TY5F HHRL4 << #2t$ ,668>>+ , , HHRL8 ??79?= = ??7+ + , ," O  &U %%&seE?CE?5E?=E"E?;E?E."E+'E?. E<9E?;E<<E?? F  FF F c^|s t|}|s||vr |dz }||vr t||||<y)aAttach a file to the report. If key is not specified, the key name will be derived from the file name with path_to_key(). If overwrite is True, an existing key will be updated. If it is False, a new key with '_' appended will be added instead. If the contents is valid UTF-8, or force_unicode is True, then the value will a string, otherwise it will be bytes. r )rN)rr;rs rrrrs? $ Vm 3JCVmD >F3Krctj|}|jD]\}}|r||vr dt|}t |t r|dk(s|j dr|||<G|r#|jd|d}|r|||<n d||<nd||<tjjtj|j} | j|dt|<y) a(Attach information about any modified or deleted conffiles. If conffiles is given, only this subset will be attached. If ui is given, ask whether the contents of the file may be added to the report; if this is denied, or there is no UI, just mark it as "modified" in the report. zmodified.conffile.z [deleted]z [inaccessiblez,It seems you have modified the contents of "z@". Would you like to add the contents of it to your bug report?z [modified]zmtime.conffile.N) packagingget_modified_conffilesitemsrr r4 startswithyesnodatetime fromtimestamprr+st_mtime isoformat) rpackage conffilesuimodifiedrr9rresponsemtimes rattach_conffilesrMs//8H"..*Jh Y. ";t#4"56 h $  #x':':?'K"F3K  xx>tfEOPH&s *s &F3K!!// 0F0FG8=8IT!2 3451Jrc<tjdtdy)z4Attach information about any Upstart override files.z`apport.hookutils.attach_upstart_overrides() is obsolete. Upstart is dead. Please drop this call. stacklevelNwarningswarnPendingDeprecationWarningrrGs rattach_upstart_overridesrW MM 3! rc<tjdtdy)z:Attach information about a package's session upstart logs.z[apport.hookutils.attach_upstart_logs() is obsolete. Upstart is dead. Please drop this call.rOrPNrRrVs rattach_upstart_logsrZrXrcd|jddjstdg|d<yy)zwAttach information from the kernel ring buffer (dmesg). This will not overwrite already existing information. CurrentDmesgdmesgN)getr1root_command_outputrs r attach_dmesgrbs1 ::nb ) / / 1!4gY!?~ 2rcd}tjj|rtj|D]}|dvrtjj |d|}tj |}t j |jr|jdzdk(rs t|}|s||d|jdd<d |vrd |vr|d d |d |d <y y y #t$rYwxYw)zDAttach Desktop Management Interface (DMI) information to the report.z/sys/class/dmi/id>uevent subsystem/rzdmi.r rzdmi.sys.vendorzdmi.product.namer MachineTypeN) rrisdirlistdirr)r+r-r.r;r3r)rdmi_dirr8pr6values r attach_dmirns!G ww}}WG$ =A++  G9AaS!12AB<< + Q!0C !! 7<aiiS1234 ="6!&8F&B&'(&1C*D)E F }'C!   s+ C.. C:9C:ct|t|ddt|ddt|ddtjj dr t dd g|d <t dd g|d <t d g|d<t d dg|d<t d dg|d<t ddg|d<t gd|d<t dg|d<|d}tjdd|}tjdd|}tjdd|}tjdd|}tjdd|}tjdd|}||d<t|td rt d g|d!<td"rFt d"d#gj}|r||d$<t d"d%gj}|r||d&<y'y'y')(a~Attach a standard set of hardware-related data to the report, including: - kernel dmesg (boot and current) - /proc/interrupts - /proc/cpuinfo - /proc/cmdline - /proc/modules - lspci -vvnn - lscpi -vt - lsusb - lsusb -v - lsusb -t - devices from udev - DMI information from /sys - prtconf (sparc) - pccardctl status/ident z/proc/interruptsProcInterrupts /proc/cpuinfo ProcCpuinfo /proc/cmdlineProcKernelCmdLinez /sys/bus/pcilspci-vvnnLspciz-vtzLspci-vtlsusbLsusb-vzLsusb-vz-tzLsusb-tsort /proc/modules ProcModules)udevadminfoz --export-dbUdevDbz%/usr/share/apport/dump_acpi_tables.pyacpidumpzID_FS_LABEL=(.*)zID_FS_LABEL=zID_FS_LABEL_ENC=(.*)zID_FS_LABEL_ENC=z by-label/(.*)zby-label/prtconfPrtconf pccardctlstatusPccardctlStatusidentPccardctlIdentN) rbrrrrcommand_outputr`rerrncommand_availabler1)rlabelsouts rattach_hardwarers$*,<=7)<= ww~~n%('7);<w+We,<=z$gY/F7O&7F9&7F9*FO+DEF=%&HIF8,.U-VWF:H F VV&(> GF VV*,F OF VVO%8& AF VV&(> GF VV*,F OF VVO%8& AFF8v#*I;7y%k845;;= (+F$ %k734::< '*F# $  &rc jt|tjjddt|tjjddt|dt|ddt |dd t gd |d <t d d g|d<t dd g|d<t t|d<g}tjjdr^tdd5}|D]B}d|vs|jj}|jt|dD ddd|D]e}d|d}t ddt|dg||<d|d}t ddt|g||<tjd|dD]}tjj!|r?tjj#|}d|d t%|}t |||!btjj'|stjj#|}tj(|D]L} tjj+|| } d|d t%|d"t%| }t || |Nhy#1swYvxYw)#z(loosely based on http://www.alsa-project.org/alsa-info.sh) for systems where alsa-info is not installed (i e, *buntu 12.04 and earlier) z ~/.asoundrc UserAsoundrcz~/.asoundrc.asoundconfUserAsoundrcAsoundconfz/etc/asound.confz/proc/asound/version AlsaVersionrqrr)ls-lz /dev/snd/ AlsaDevicesaplayr AplayDevicesarecordArecordDevices PciMultimediaz/proc/asound/cardsutf-8encodingz]:rNCardz .Amixer.infoamixerz-crz.Amixer.valuesz/proc/asound/cardz/codec*z.Codecs.rr)rrr expanduserrr pci_devicesPCI_MULTIMEDIArr$lstripsplitappendintr4globisfilebasenamerrirjjoin) rcardsr5linefieldscardr codecpathcodecnamers rattach_alsa_oldr sy &"''"4"4]"C^T""#;<>V&"45&"8-H7*+DEF=+WdO-y$.?@F ).9F? E ww~~*+ & 9 1R 14<![[]002FLLVAY0 1 1 3TF,'$hc$i%HIs TF.)$hc$i%@As %6tfG#DE 3Iww~~i(((3TF(;u+=*>?FI37y)((3JJy13D77<< 48Dtf%'./qT1B0CE c2 3 3 3  1 1s+ J(6=J((J2cdtjjdrtgd|d<n;tjjdrtgd|d<n t |tddgt j dzt j d zt j d z|d <tjjd rtd dg|d<tjjdrtdg|d<t |t|y)z0Attach ALSA subsystem information to the report./usr/sbin/alsa-info)r--stdout --no-uploadAlsaInfo!/usr/share/alsa-base/alsa-info.sh)rrrfuserrzz /dev/dsp*z /dev/snd/*z /dev/seq*AudioDevicesInUsez/usr/bin/pacmdpacmdlist PulseListz/usr/bin/pa-infoPaInfoN)rrrrrrrnrbras r attach_alsarQs ww~~+,+ > z ; <+ L z "0 $ ))K  ! ))L ! " ))K  !#F  ww~~&',gv->?{ ww~~())+=*>?xvrcjdtjvrytjd}|jtjD]k}|stjj ||}tjj |sFtj|tjskyy)z/Is given command on the executable search path?PATHFT) renvironrpathseprrraccessX_OK)commandrelementfilenames rrros~ RZZ ::f D::bjj) 77<<1 77>>( # (BGG(D  rctjj}|sd|d< tj|d|tj ||}|jdk(r|jj}nSdt|jzd zt|jjzd z|jz}|r|jd d }|S#t $r}dt|cYd}~Sd}~wwxYw)a;Try to execute given command (list) and return its stdout. In case of failure, a textual error gets returned. This function forces LC_MESSAGES to C, to avoid translated output in bug reports. If decode_utf8 is True (default), the output will be converted to a string, otherwise left as bytes. C LC_MESSAGESF)checkinputstdoutstderrenvr#NrsError: command s failed with exit code s: rrr!) rrcopy subprocessrunPIPEr3r4 returncoderr1encoder ) rrr keep_locale decode_utf8rspr:ress rrr}s **// C  M & ^^ ??   }}iioo 'l!!# $( )"-- '') *   ii   jjj3 J# &U %%&s)C$$ D- D:DDctytjdk(rytjj sytj jdsy tjd\}}tjddt|dgdtjtjatj|tj 5} |j#|tj$|j'}|D]7\}}|tj(zstj|dddym#t$rYywxYw#1swYyxYw)Nrz/usr/bin/pkttyagent pkttyagentz --notify-fdz --fallbackF) close_fdsstdinr)_AGENTrgeteuidsysrisattyrrpipe2r3rPopenr4rr,selectepollregisterEPOLLINpollEPOLLHUP)rwreventsr event_types r_spawn_pkttyagentrs& zz|q 99    77>>/ 0!A    }c!fl;oo FHHQK 5 NN1fnn -ZZ\F!'  :/HHQK  s+ E#A E!1E!E! EE!E*cftytjtjday)z=Kill pkttyagent (from PolicyKit) if it was started by Apport.N)r terminatewaitrrkill_pkttyagentrs&~  KKM Frctjdk(rgStjjdr t dgSgS)Nrz/usr/bin/pkexecpkexec)rgetuidrrrrrr_root_command_prefixrs9 yy{a  ww~~'(z Ircjt|tsJdtt|z||d|}|S)a=Try to execute given command (list) as root and return its stdout. This passes the command through pkexec, unless the caller is already root. In case of failure, a textual error gets returned. If decode_utf8 is True (default), the output will be converted to a string, otherwise left as bytes. zcommand must be a listT)rr)r rrr)rrrroutputs rr`r`sB gt $>&>> $ (  F Mrc ,tjjtjjtjj ddd}t j} tjj|d}t|dd5}|jD]M\}}t|dsJd |j|d tjj||d O d d d tjt||gzd |D]}} ttjj||d5}|jj!} d d d   j%d}  r| ||<j) t+j,|y #1swYxYw#1swYWxYw#t"$rYwxYw#t&$rYbwxYw#t+j,|wxYw)a)Execute multiple commands as root and put their outputs into report. command_map is a keyname -> 'shell command' dictionary with the commands to run. They are all run through /bin/sh, so you need to take care of shell escaping yourself. To include stderr output of a command, end it with "2>&1". Just like root_command_output, this passes the command through pkexec, unless the caller is already root. This is preferable to using root_command_output() multiple times, as that will ask for the password every time. APPORT_DATA_DIRz/usr/share/apportroot_info_wrapperz:script:rrrr1z(command must be a string (shell command)z | cat >  NF)rr r)rrrabspathrr_tempfilemkdtempr$r@hasattrwriterrrr0r1r3r r2r,shutilrmtree) r command_map wrapper_pathworkdir script_pathscriptkeynamerr8bufs rattach_root_command_outputsrs77<<  '8:MNOL G#ggll7J7 +sW 5 V$/$5$5$7 V W>=>  y "'',,w2P1QQSTU  V V  "lK%@ @ # G "'',,w8$?+1&&(..*C+ jj)"%w GGI "  gA V V"++  &    gs1.G<A!G1G<3*GG<GG-G<G G<G G G*'G<)G**G<- G96G<8G99G<<Hcd}|jL|jD],}|jdd}|j|s(||z }.|jL|jD],}|jdd}|j|s(||z }.|jj |j |j dk(r|Sy)Nr]rrr!r)rrr searchr,rr)patternprocesslinesrs r__filter_re_processr7s E ,,. NN D;;wy;9D~~d#   ,,. {{79{5 >>$  TME NN LLNQ r)journald_only_systemcd|rddd|g}natjjdrgd}|r<|jdn*tjdtj rgd}ny t j|t j 5}t||cd d d S#1swYy xYw) aExtract recent system messages which match a regex. pattern should be a "re" object. By default, messages are read from the systemd journal, or /var/log/syslog; but when giving "path", messages are read from there instead. The journald_only_system parameter controls the scope of messages that are extracted when reading from the systemd journal. If set to True (the default), only messages from the system services are extracted. If set to False, all messages that the current user can see are extracted. tail-n10000/run/systemd/system) journalctlz--quiet-bz-az--system/var/log/syslog)rrrrr]rN) rrrrrR_OKrrrr)rrrrrs r recent_syslogr Ks 4$/ - .7  NN: & $bgg .<   '*// :5g"7G4555s  B&&B/ctjjd}tjj|r$tj|tj sy|st jd}d}t|d5}|D],}|jdd}|j|s(||z }. ddd|S#1swY|SxYw) alExtract messages from ~/.xsession-errors. By default this parses out glib-style warnings, errors, criticals etc. and X window errors. You can specify a "re" object as pattern to customize the filtering. Please note that you should avoid attaching the whole file to reports, as it can, and often does, contain sensitive and private data. z~/.xsession-errorsr]z^(\(.*:\d+\): \w+-(WARNING|CRITICAL|ERROR))|(Error: .*No Symbols named)|([^ ]+\[\d+\]: ([A-Z]+):)|([^ ]-[A-Z]+ \*\*:)|(received an X Window System error)|(^The error was \')|(^ \(Details: serial \d+ error_code)r rrr!N) rrrrrrrcompiler$r r)rrrr8rs rxsession_errorsr#ds 77  2 3D 77>>$ ryyrww'? ** 6  E dD Q D;;wy;9D~~d#   L  Ls *C4CCrOrg c|s tddgSd}tddg}|jdD]}d}d}|jdD]]} |jdd \}}|j}|j}|d k(rt |d d d } | dzdz }V|dk(s\|}_|s{|s~||vs|r|dz }|tdd|gjz }|S#t$rYwxYw)z9Return a text dump of PCI devices attached to the system.rurvr]z-vvmmnnz Nr:r$Classir)Slotz-vvnns)rr ValueErrorr1r) pci_classesresultr paragraph pci_classslotrrrmns rrrs w011 F Wi0 1F\\&)H  OOD) D !ZZQ/ UKKME))+Cg~b b)ZA-   ){":&  ngx%>?EEG GF)H, M  s C C)(C)ctddgS)z9Return a text dump of USB devices attached to the system.rxrz)rrrr usb_devicesr=s 7D/ **rctj|}|r2|Dcgc]%}tjj||s$|'}}|S|}|Scc}w)zKRetrieve a list of files owned by package, optionally matching globpat.)r> get_filesrfnmatch)rGglobpatfilesr8r7s rfiles_in_packagerCsV    (E"Gdll&:&:1g&F!GG M MHs %AAcy)z Obsolete.NrrVs r attach_gconfrEsrc <|jdd}i}tjj}d|d<t j dd|g|tj 5}|jD]>} |jdd \}}} | j} | |j|i|<@ dddt j dd|gtj 5}|jD]h} |jdd \}}} | j} | |j|ij|dk7sP|d k(r|d vrd } ||d|d| dz }j ddd||d<y#t$rYwxYw#1swYxYw#t$rYwxYw#1swY:xYw)z0Attach user-modified gsettings keys of a schema.GsettingsChangesr]z /nonexistingXDG_CONFIG_HOME gsettingszlist-recursively)rrNrOrsorg.gnome.shell> favorite-appscommand-historyzredacted by apportrr) r_rrrrrrrrrstripr5 setdefault) rschema cur_valuedefaultsrrIr schema_namerrms rattach_gsettings_schemarRs -r2IH **// C+C    (&1s:??  > $$ >D ,0JJtQ,?)c5 9>H   R 0 5  > >    (&1*// > $$ >D ,0JJtQ,?)c5  ["599#rBB"44A:1E }AcU!E7"==  >>$"+F -   > >$  >>sf!E72&E'E7 F1&F%F=F' E40E73E44E77F F FFFFct|dD]0}tjj|dd}t ||2y)z@Attach user-modified gsettings keys of all schemas in a package.z)/usr/share/glib-2.0/schemas/*.gschema.xmlNi)rCrrrrR)rrG schema_filerNs rattach_gsettings_packagerUsC'<0 !!+.t4/ 0rr time_windowreturnctjjdsy|j}|r||z }||z}d|d|g}nddg}t ddg|z|d <y) zAttach journal warnings and errors. If the report contains a date, get the journal logs around that date (plus/minus the time_window in seconds). Otherwise attach the latest 1000 journal logs since the last boot. rNz --since=@z --until=@rz --lines=1000rz--priority=warning JournalErrors)rrr get_timestampr)rrVcrash_timestamp before_crash after_crashargss rattach_journal_errorsr_s| 77>>/ 0**,O&4 % 3 L>*i },EFn%, +,t3F?rctddg|d<tddg|d<tt|d<t|dd d D]+}|tj vstj |||<-y ) z5Attach generic network-related information to report.iprouteIpRouteaddrIpAddr PciNetworkz/etc/network/interfacesIfupdownConfigr) http_proxy ftp_proxyno_proxyN)rr PCI_NETWORKrrr)rvars rattach_networkrmsq&g7F9%tVn5F8&{3F<&";AQR6* "** **S/F3K*rcttjd|d<tjddtjddtjddt d g|d <t d d g|d <t j jdrt gd}nd}||d<t|ddy)z5Attach wireless (WiFi) network information to report.zH(NetworkManager|modem-manager|dhclient|kernel|wpa_supplicant)(\[\d+\])?: WifiSyslogz ESSID:(.*)zESSID:zEncryption key:(.*)zEncryption key: zAccess Point: (.*)zAccess Point: iwconfigIwConfigrfkillrRfKillz/sbin/iw)iwregr_N/ACRDAz/var/log/wpa_supplicant.logWpaSupplicantLogrN) r rr"rrrrrr)r iw_outputs r attach_wifirzs(   F<   ! & FF$( |,   F:&x&89F8 ww~~j!"#78  F6N&"?EWXrct|ddt|ddtdg|d<tddg|d <tjd }|r*tgd |z}tjd d ||d<t d|d<y)zkAttach printing information to the report. Based on http://wiki.ubuntu.com/PrintingBugInfoScript. z/etc/papersize Papersizez/var/log/cups/error_log CupsErrorLoglocaleLocalelpstatrzLpstatz/etc/cups/ppd/*.ppd)fgrepz-Hz *NickNamez*/etc/cups/ppd/(.*).ppd:\*NickName: *"(.*)"z \g<1>: \g<2>PpdFiles) foo2zjsz foomatic-dbzfoomatic-db-enginefoomatic-db-gutenprintzfoomatic-db-hpijszfoomatic-filtersz foomatic-guihpijshplipm2300wmin12xxwc2050hpojpxljrpnm2ppasplixzhp-ppdz hpijs-ppdszlinuxprinting.org-ppdszopenprinting-ppdszopenprinting-ppds-extra ghostscriptcupszcups-driver-gutenprintr ijsgutenprintzcupsys-driver-gutenprintzgimp-gutenprintzgutenprint-doczgutenprint-localeszsystem-config-printer-commonkdeprintPrintingPackagesN)rrrrrpackage_versions)rppds nicknamess rattach_printingr;s &"2K@&";^L%xj1F8%x&67F8 99* +D "#?$#FG VV 9?I z"2!"F rcrt|tr|g}d}tj|tj}d}tj|tj}d|vr2dj tj |tdg|d<d|vr1tjjdrt|dd|d it|d d t|d d tj ||jdd|jddzD]}|s|jdgy |ddk(r|dd}n&t j#|j%dd}|D]0}tj*d|d|s|jdgy#t&t(f$rYwxYw)z0Attach MAC information and events to the report.z!audit\(|apparmor|selinux|securityz'apparmor="DENIED".+?profile=([^ ]+?)[ ]KernLogrr^AuditLogz/var/run/auditd.pidzegrep "z" /var/log/audit/audit.logz/proc/version_signatureProcVersionSignaturers ProcCmdliner]apparmorr"r$r2rrr!^$N)r r4rr" IGNORECASErfindallr`rrrrrrr_add_tagsr fromhexr IndexErrorr5match) rprofiles mac_regexmac_reaa_regexaa_rerprofilesearch_profiles rattach_mac_eventsrps(C :4I ZZ 2== 1F8H JJx /E II JJv2G9= > yBGGNN3H$I# Z79+5O!PQ &";=ST7 vzz)R(6::j"+EE OOZL )  Qx3"+--.55gi5P' Nxx!N+1-w7 - J'   s84F$$F65F6ct||d<y)zjAttach version information for related packages. In the future, this might also run their hooks. RelatedPackageVersionsN)r)rpackagess rattach_related_packagesrs (8'BF #$rc |syg}|D]l}|stj|}|s|j|dft|D]/} tj|}|d}|j||f1nt d|D}dj|Dcgc]\}}|d|dd|c}}S#t $rd}YhwxYwcc}}w)ztReturn a text listing of package names and versions. Arguments may be package names or globs, e. g. "foo*" r]rvc38K|]}t|dyw)rN)len).0versions r z#package_versions..s@GGAJ@sr<sr)r>package_name_globrsorted get_versionr5maxr) rversionspackage_patternmatching_packagesrGr package_widthrlvs rrrs H#0 %77H OO_e4 5/0 0G #//8 OOWg. / 00$@x@@M 99Jv11]O1,-Qqc2J KK  KsB7C 7 CCc tjd|gdtjtj}|jdk7ry |j j djD]@}|jdd }t|d kr$|dd k(s-|d jcSy#t$rYywxYw) z-Return the license for a given kernel module.z /sbin/modinfoF)rrrrinvalidNrr/r$rOlicense) rrrrr3rr splitlinesrrr1)modulemodinforrs r_get_module_licensers .. f %????      " #%%g.99;%C# v;?  !9 !!9??$ $ %  sAB77 CCc0 t|d5}|Dcgc]}|jd}}dddg}D]5}t|}|sd|vrd|vrd|vr d|vr%|j |7|Scc}w#1swYLxYw#t$rgcYSwxYw) zCCheck loaded modules and return a list of those which are not free.rrrNGPLBSDMPLMIT)r$rr3rr) module_listr8rmodsnonfreemrs rnonfree_kernel_modulesrs + 0 3A012DJJLO2D2 3 G   " eqjEQJ%1* NN1  N3 3 3  s7 BA;A6A;B6A;;BB BBcd}tj|D]}tjj||}|dk(stjj |sHt |d5}|j j}ddd|dk(rjdd}|dk(rtj}|dz }||d jd d d z }|S#1swY_xYw)Nr]rdr modes  edidz-base64z: rrr!r) rrjrrrr$r0r1rbase64 b64encoder )conrr8r con_info_filevals r__drm_con_infors D ZZ_ Bww||C# =t 4  $  /$$&,,.C / <++eT*C ;""3'C NA 1#R 79 =>bAA B K / /s ,C))C2 cld}tjj|sytj|D]z}tjj ||}tjj tjj |dsat ||dt|<|y)zWAdd information about DRM hardware. Collect information from /sys/class/drm/. z/sys/class/drmNenabledzDRM.)rrrirjrrrr)rdrm_dirr8rs rattach_drm_infors G 77== ! ZZ Bggll7A& 77>>"'',,sI6 7.s!CJ    **, WW'=j\%JKTT  ,,5    sAC  C C !C C$"C& C C#"C#& C21C2c:d}|s t|}tjj|r\t |dd5}|j Dcgc]}|j ds|nd}}dj|||<dddyycc}w#1swYyxYw) zQ,RS f $JJvo67E8_F34J%+F !"-0XXj-A)* JJ%r)NTF)F)NN)N)r+)r|)S__doc__rrCrrrrrrr+rrrrSapport.fileutilsapportapport.packaging_implrr>problem_reportrr"r rrrr;rrMrWrZrbrnrrrrSTDOUTrrrrr`rrr r#PCI_MASS_STORAGErk PCI_DISPLAYr PCI_MEMORY PCI_BRIDGEPCI_SIMPLE_COMMUNICATIONSPCI_BASE_SYSTEM_PERIPHERALSPCI_INPUT_DEVICESPCI_DOCKING_STATIONSPCI_PROCESSORSPCI_SERIAL_BUSrr=rCrErRrUrr_rmrzrrrrrrrrrrr fileutilsshared_librarieslinks_with_shared_libraryrrrrs5$  3(" #56 BA0$&N?,!JJ@ 67+t.3b<      ,^"J  1 1t.6r(5d52D      "@+  $+N0-c4, *Y>2j*ZCL<."$ B%-P,& &"##44",,FFr