+
    ÷™Gj˜•  ã                   óö  € R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIt^ RIHtHt ^ RIt^ RIHt ^ RIHt ]P0                  ! R4      tRsR tR<R	 ltR=R
 ltR<R ltR>R ltR t R t!R t"R t#R R lt$R t%R t&R t'R t(R]
PR                  RR3R lt*R t+R t,R t-R]
PR                  R3R lt.R R lt/R R lt0R  t1R?R!R/R" llt2R?R# lt3^t4^t5^t6^t7^t8^t9^t:^t;^	t<^
t=^t>^t?R$ t@R% tAR?R& ltBR' tCR( tDR) tER@R* R+ lltFR, tGR- R. ltHR/ tIR0 tJR?R1 R2 lltKR3 tLR4 tMR5 tNRAR6 ltOR7 tPR8 tQR9 tRR?R: ltSR; tT]Pª                  P¬                  tV]Pª                  P®                  tWR# )Bz/Convenience functions for use in package hooks.N)ÚIterableÚMapping)Úimpl)ÚProblemReportz[^0-9a-zA-Z_.-]c                óœ   € \        V \        4      '       d   V P                  R4      p \        P	                  RV P                  RR4      4      # )zsGenerate a valid report key name from a file path.

This will replace invalid punctuation symbols with valid ones.
úUTF-8Ú.Ú Ú_)Ú
isinstanceÚbytesÚdecodeÚ_invalid_key_chars_reÚsubÚreplace)Úpaths   &Ú2/usr/lib/python3/dist-packages/apport/hookutils.pyÚpath_to_keyr   (   s=   € ô
 �$œ×ÒØ�{‰{˜7Ó#ˆÜ ×$Ñ$ S¨$¯,©,°s¸CÓ*@ÓAÐAó    TFc                ó¦   € RV9   d   R# V'       g   \        V4      p\        P                  P                  V4      '       d   \	        WW#V4       R# R# )av  Attach 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)r   Úosr   ÚexistsÚattach_file©Úreportr   ÚkeyÚ	overwriteÚforce_unicodes   &&&&&r   Úattach_file_if_existsr   2   s?   € ð �„}ÙçÜ˜$Óˆä	‡w�w‡~�~�d×ÒÜ�F #°-Ö@ñ r   c                ó²  €  RV 9   d   R# \         P                  ! V \         P                  \         P                  ,          \         P                  ,          4      p\         P
                  ! V4      p\         P                  P                  V 4      pVP                  \         P                  ! V4      P                  8w  g   W8w  d   \         P                  ! V4       R# \        P                  ! VP                  4      '       g   \         P                  ! V4       R# \         P                  ! VR4      ;_uu_ 4       pVP                  4       P                  4       pRRR4       T'       d   XP%                  RR	R
7      #  XP%                  R4      #   + '       g   i     L=; i  \          d   pR\#        T4       2u Rp?# Rp?ii ; i  \&         d    Xu # i ; i)z÷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.
r   zError: invalid path.zError: path contained symlinks.z#Error: path was not a regular file.ÚrbNúError: r   r   ©Úerrors)r   ÚopenÚ
O_NOFOLLOWÚO_RDONLYÚ
O_NONBLOCKÚfstatr   ÚrealpathÚst_inoÚstatÚcloseÚS_ISREGÚst_modeÚfdopenÚreadÚstripÚOSErrorÚstrr   ÚUnicodeDecodeError)r   r   ÚfdÚstÚ	real_pathÚfÚcontentsÚerrors   &&      r   Ú	read_filer<   K   s;  € ð&à�DŒ=Ù)Ü�WŠW�Tœ2Ÿ=™=¬2¯;©;Õ6¼¿¹ÕFÓGˆÜ�XŠX�b‹\ˆä—G‘G×$Ñ$ TÓ*ˆ	Ø�9‰9œŸš 	Ó*×1Ñ1Ô1°TÔ5FÜ�HŠH�RŒLÙ4ä�|Š|˜BŸJ™J×'Ò'Ü�HŠH�RŒLÙ8Ü�YŠY�r˜4× Ô  AØ—v‘v“x—~‘~Ó'ˆH÷ !÷
 Ø�‰˜w¨yˆÓ9Ð9ðØ�‰˜wÓ'Ð'÷ !× ûäô &Øœ˜U›˜Ð%Õ%ûð&ûô ô ØŠðúse   ‚F  ‹CF  Ã%F  ÄF  ÄF  Ä9FÅF  Å<G ÆF	ÆF  ÆF  Æ GÆ+F>Æ8GÆ>GÇGÇGc                óz   € V'       g   \        V4      pV'       g   W 9   d   VR,          pK  \        WR7      W&   R# )ak  Attach 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
   )r   N)r   r<   r   s   &&&&&r   r   r   p   s0   € ÷ Ü˜$Óˆ÷ ØŒmØ�3�JŠCÜ˜DÔ>€FƒKr   c                ó2  € \         P                  ! V4      pVP                  4        Fì  w  rVV'       d	   WR9  d   K  R\        V4       2p\	        V\
        4      '       d%   VR8X  g   VP                  R4      '       d   W`V&   K]  V'       d(   VP                  RV R24      pV'       d   W`V&   M	RW&   MRW&   \        P                  P                  \        P                  ! V4      P                  4      p	V	P                  4       V R\        V4       2&   Kî  	  R# )	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.
zmodified.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]zmtime.conffile.N)Ú	packagingÚget_modified_conffilesÚitemsr   r   r4   Ú
startswithÚyesnoÚdatetimeÚfromtimestampr   r,   Úst_mtimeÚ	isoformat)
r   ÚpackageÚ	conffilesÚuiÚmodifiedr   r:   r   ÚresponseÚmtimes
   &&&&      r   Úattach_conffilesrN   †   sô   € ô ×/Ò/°Ó8€Hà"Ÿ.™.Ö*‰ˆß˜Ô.Ùà"¤;¨tÓ#4Ð"5Ð6ˆÜ�h¤×$Ò$Ø˜Ô# x×':Ñ':¸?×'KÒ'Kà"�3‰KÙçØ—x‘xØ>¸t¸fð EOð PóˆH÷ Ø&�s’à*�’à&ˆF‰Kä×!Ñ!×/Ñ/´·²¸³×0FÑ0FÓGˆØ8=¿¹Ó8Iˆ�¤¨TÓ!2Ð 3Ð4Ó5ó1 +r   c                ó@   € \         P                  ! R\        ^R7       R# )z4Attach information about any Upstart override files.z`apport.hookutils.attach_upstart_overrides() is obsolete. Upstart is dead. Please drop this call.©Ú
stacklevelN©ÚwarningsÚwarnÚPendingDeprecationWarning©r   rH   s   &&r   Úattach_upstart_overridesrW   «   ó   € ä‡M‚Mð	3ä!Ø÷	r   c                ó@   € \         P                  ! R\        ^R7       R# )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.rP   NrR   rV   s   &&r   Úattach_upstart_logsrZ   ¶   rX   r   c                ót   € V P                  RR4      P                  4       '       g   \        R.4      V R&   R# R# )zoAttach information from the kernel ring buffer (dmesg).

This will not overwrite already existing information.
ÚCurrentDmesgÚ ÚdmesgN)Úgetr2   Úroot_command_output©r   s   &r   Úattach_dmesgrb   À   s4   € ð
 �:‰:�n bÓ)×/Ñ/×1Ò1Ü!4°g°YÓ!?ˆˆ~Óñ 2r   c                óf  € Rp\         P                  P                  V4      '       dÎ   \         P                  ! V4       F³  pVR9   d   K  \         P                  P	                  V RV 24      p\         P
                  ! V4      p\
        P                  ! VP                  4      '       d   VP                  ^,          ^ 8X  d   K†   \        V4      pT'       g   Kœ  YPRTP                  RR4       2&   Kµ  	  RV 9   d$   RV 9   d   V R,           RV R,           2V R	&   R
# R
# R
#   \         d     Kñ  i ; i)zDAttach Desktop Management Interface (DMI) information to the report.z/sys/class/dmi/idÚ/zdmi.r
   r   zdmi.sys.vendorzdmi.product.namer	   ÚMachineTypeN>   ÚueventÚ	subsystem)r   r   ÚisdirÚlistdirr*   r,   r.   r/   r<   r3   r   )r   Údmi_dirr9   Úpr7   Úvalues   &     r   Ú
attach_dmirm   É   s  € à!€GÜ	‡w�w‡}�}�W×ÒÜ—’˜GÖ$ˆAØÐ+Ô+ÙÜ—‘× Ñ  G 9¨A¨a¨SÐ!1Ó2ˆAÜ—’˜“ˆBä—<’< §
¡
×+Ò+°·
±
¸QµÀ!Ô0CÙðÜ! !›�÷ ‰uØ7<˜˜aŸi™i¨¨SÓ1Ð2Ð3Ó4ñ %ð" ˜6Ô!Ð&8¸FÔ&BàÐ&Õ'Ð(¨¨&Ð1CÕ*DÐ)EÐFð 	ˆ}Óñ 'CÑ!øô ô Úðús   ÃD!Ä!D0Ä/D0c                ó0   € V ^8„  d   QhR\         R\         /# )é   ÚudevdbÚreturn)r4   )Úformats   "r   Ú__annotate__rs   ä   s   € ÷ ñ œcð ¤cñ r   c                ó–   € \         P                  ! RRV 4      p \         P                  ! RRV 4      p \         P                  ! RRV 4      p V # )zWTake the output of udevadm info -e and return a string with redacted
filesystem labels.zID_FS_LABEL=(.*)zID_FS_LABEL=<hidden>zID_FS_LABEL_ENC=(.*)zID_FS_LABEL_ENC=<hidden>zby-label/[^ /\n]*zby-label/<hidden>)Úrer   )rp   s   &r   Úanonymized_udevdbrv   ä   sG   € ô
 �VŠVÐ'Ð)?ÀÓH€FÜ�VŠVÐ+Ð-GÈÓP€Fô �VŠVÐ(Ð*=¸vÓF€FØ€Mr   c                óÞ  € \        V 4       \        V RR4       \        V RR4       \        V RR4       \        P                  P	                  R4      '       d!   \        RR	.4      V R
&   \        RR.4      V R&   \        R.4      V R&   \        RR.4      V R&   \        RR.4      V R&   \        RR.4      V R&   \        \        . R!O4      4      V R&   \        R.4      V R&   \        V 4       \        R4      '       d   \        R.4      V R&   \        R4      '       dS   \        RR.4      P                  4       pV'       d   WR&   \        RR.4      P                  4       pV'       d   WR&   R # R # R # )"aB  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/interruptsÚProcInterruptsú/proc/cpuinfoÚProcCpuinfoú/proc/cmdlineÚProcKernelCmdLinez/sys/bus/pciÚlspciú-vvnnÚLspciz-vtzLspci-vtÚlsusbÚLsusbú-vzLsusb-vz-tzLsusb-tÚsortú/proc/modulesÚProcModulesÚUdevDbz%/usr/share/apport/dump_acpi_tables.pyÚacpidumpÚprtconfÚPrtconfÚ	pccardctlÚstatusÚPccardctlStatusÚidentÚPccardctlIdentN)ÚudevadmÚinfoz--export-db)rb   r   r   r   r   Úcommand_outputrv   r`   rm   Úcommand_availabler2   )r   Úouts   & r   Úattach_hardwarer”   õ   se  € ô$ �Ôä�Ð*Ð,<Ô=Ü�˜¨Ô7Ü�˜Ð)<Ô=ä	‡w�w‡~�~�n×%Ò%Ü(¨'°7Ð);Ó<ˆˆw‰Ü+¨W°eÐ,<Ó=ˆˆzÑÜ$ g YÓ/€Fˆ7�OÜ&¨° Ó7€Fˆ9ÑÜ&¨° Ó7€Fˆ9ÑÜ*¨F°OÐ+DÓE€Fˆ=ÑÜ(ÜÒ9Ó:ó€Fˆ8Ñô -Ð.UÐ-VÓW€Fˆ:ÑäˆvÔä˜×#Ò#Ü*¨I¨;Ó7ˆˆyÑä˜×%Ò%Ü˜k¨8Ð4Ó5×;Ñ;Ó=ˆßØ(+Ð$Ñ%Ü˜k¨7Ð3Ó4×:Ñ:Ó<ˆßØ'*Ð#Ó$ñ ñ &r   c                óÊ  € \        V \        P                  P                  R4      R4       \        V \        P                  P                  R4      R4       \        V R4       \        V RR4       \	        V RR	4       \        . R!O4      V R&   \        RR
.4      V R&   \        RR
.4      V R&   \        \        4      V R&   . p\        P                  P                  R4      '       dp   \        RRR7      ;_uu_ 4       pV FK  pRV9   g   K  VP                  4       P                  4       pVP                  \        V^ ,          4      4       KM  	  RRR4       V EFu  pRV R2p\        RR\        V4      R.4      W&   RV R2p\        RR\        V4      .4      W&   \        P                  ! RV R24       EF  p\        P                  P!                  V4      '       d@   \        P                  P#                  V4      pRV R\%        V4       2p\	        WVR7       Kh  \        P                  P'                  V4      '       g   K�  \        P                  P#                  V4      p\        P(                  ! V4       FK  p	\        P                  P+                  Wy4      p
RV R\%        V4       R \%        V	4       2p\	        W
V4       KM  	  EK  	  EKx  	  R#   + '       g   i     EL�; i)"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.asoundconfÚUserAsoundrcAsoundconfz/etc/asound.confz/proc/asound/versionÚAlsaVersionry   rz   ú-lÚAlsaDevicesÚaplayÚAplayDevicesÚarecordÚArecordDevicesÚPciMultimediaz/proc/asound/cardsúutf-8©Úencodingz]:NÚCardz.Amixer.infoÚamixerz-cr�   z.Amixer.valuesz/proc/asound/cardz/codec*z.Codecs.©r   r   )Úlsr™   z	/dev/snd/)r   r   r   Ú
expanduserr   r‘   Úpci_devicesÚPCI_MULTIMEDIAr   r%   ÚlstripÚsplitÚappendÚintr4   ÚglobÚisfileÚbasenamer   rh   ri   Újoin)r   Úcardsr6   ÚlineÚfieldsÚcardr   Ú	codecpathÚcodecÚnamer   s   &          r   Úattach_alsa_oldr¹   '  sd  € ô
 ˜&¤"§'¡'×"4Ñ"4°]Ó"CÀ^ÔTÜØ”—‘×"Ñ"Ð#;Ó<Ð>Vôô ˜&Ð"4Ô5Ü˜&Ð"8¸-ÔHÜ�˜¨Ô7ä*Ò+DÓE€Fˆ=ÑÜ+¨W°d¨OÓ<€Fˆ>ÑÜ-¨y¸$Ð.?Ó@€FÐÑä)¬.Ó9€Fˆ?Ñà€EÜ	‡w�w‡~�~Ð*×+Ò+ÜÐ&°×9Õ9¸RÛ�Ø˜4–<Ø!Ÿ[™[›]×0Ñ0Ó2�FØ—L‘L¤ V¨A¥Y£Ö0ñ ÷ :ô ˆØ�T�F˜,Ð'ˆÜ$ h°´c¸$³iÀÐ%HÓIˆ‰Ø�T�F˜.Ð)ˆÜ$ h°´c¸$³iÐ%@ÓAˆ‰äŸšÐ%6°t°f¸GÐ#D×EˆIÜ�w‰w�~‰~˜i×(Ò(ÜŸ™×(Ñ(¨Ó3�Ø˜T˜F (¬;°uÓ+=Ð*>Ð?�Ü˜F°3×7Ü—‘—‘˜y×)Ô)ÜŸ™×(Ñ(¨Ó3�ÜŸJšJ yÖ1�DÜŸ7™7Ÿ<™<¨	Ó8�Dà˜t˜fð %Ü'¨Ó.Ð/¨q´¸TÓ1BÐ0CðEð ô   ¨cÖ2ô 2ô Fó ÷ :×9Ð9ús   Ã9
KÄAKËK"	c                ó´  € \         P                  P                  R4      '       d   \        . RO4      V R&   MA\         P                  P                  R4      '       d   \        . RO4      V R&   M\	        V 4       \        RR.\
        P
                  ! R4      ,           \
        P
                  ! R4      ,           \
        P
                  ! R4      ,           4      V R	&   \         P                  P                  R
4      '       d   \        RR.4      V R&   \         P                  P                  R4      '       d   \        R.4      V R&   \        V 4       \        V 4       R# )z0Attach ALSA subsystem information to the report.ú/usr/sbin/alsa-infoÚAlsaInfoú!/usr/share/alsa-base/alsa-info.shÚfuserr‚   z	/dev/dsp*z
/dev/snd/*z	/dev/seq*ÚAudioDevicesInUsez/usr/bin/pacmdÚpacmdÚlistÚ	PulseListz/usr/bin/pa-infoÚPaInfoN)r»   ú--stdoutú--no-upload)r½   rÄ   rÅ   )r   r   r   r‘   r¹   r®   rm   rb   ra   s   &r   Úattach_alsarÆ   X  s  € ä	‡w�w‡~�~Ð+×,Ò,Ü+Ú>ó
ˆˆzÒô 
�‰�‰Ð;×	<Ò	<Ü+ÚLó
ˆˆzÒô 	˜Ôä"0Ø	�$ˆÜ
�)Š)�KÓ
 õ	!ä
�)Š)�LÓ
!õ	"ô �)Š)�KÓ
 õ	!ó#€FÐÑô 
‡w�w‡~�~Ð&×'Ò'Ü,¨g°vÐ->Ó?ˆˆ{Ñä	‡w�w‡~�~Ð(×)Ò)Ü)Ð+=Ð*>Ó?ˆˆxÑäˆvÔÜ�Ör   c                óª  € R\         P                  9  d   R# \         P                  R,          pVP                  \         P                  4       F�  pV'       g   K  \         P                  P                  W 4      p\         P                  P                  V4      '       g   KS  \         P                  ! V\         P                  4      '       g   K€   R# 	  R# )z/Is given command on the executable search path?ÚPATHFT)	r   Úenvironr«   Úpathsepr   r±   r¯   ÚaccessÚX_OK)Úcommandr   ÚelementÚfilenames   &   r   r’   r’   v  s}   € à”R—Z‘ZÔÙÜ�:‰:�fÕ€DØ—:‘:œbŸj™jÖ)ˆßÙÜ—7‘7—<‘< Ó1ˆÜ�7‰7�>‰>˜(×#Ô#¬¯	ª	°(¼B¿G¹G×(DÔ(DÚñ *ñ r   c           	     óZ  € \         P                  P                  4       pV'       g   RVR&    \        P                  ! V RV\        P
                  VVR7      pTP                  ^ 8X  d   TP                  P                  4       pMgR\        T 4      P                  4       ,           R,           \        TP                  4      P                  4       ,           R	,           TP                  ,           pT'       d   TP                  R
RR7      pT#   \         d   pR\        T4       2u Rp?# Rp?ii ; i)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)ÚcheckÚinputÚstdoutÚstderrÚenvr"   Ns   Error: command s    failed with exit code s   : r   r   r#   )r   rÉ   ÚcopyÚ
subprocessÚrunÚPIPEr3   r4   Ú
returncoderÕ   r2   Úencoder   )	rÍ   rÔ   rÖ   Úkeep_localeÚdecode_utf8r×   Úspr;   Úress	   &&&&&    r   r‘   r‘   „  s  € ô �*‰*�/‰/Ó
€CßØ ˆˆMÑð
&Ü�^Š^ØØØÜ—?‘?ØØô
ˆð 
‡}�}˜ÔØ�i‰i�o‰oÓ‰ð Ü�'‹l×!Ñ!Ó#õ$à(õ)ô �"—-‘-Ó ×'Ñ'Ó)õ*ð õ	ð
 �i‰iõð 	÷ Ø�j‰j˜¨ˆjÓ3ˆØ€Jøô# ô &Øœ˜U›˜Ð%Õ%ûð&ús   ­*D ÄD*ÄD%ÄD*Ä%D*c                  óL  € \         e   R # \        P                  ! 4       ^ 8X  d   R # \        P                  P                  4       '       g   R # \        P                  P                  R4      '       g   R #  \        P                  ! ^ 4      w  r\        P                  ! RR\        T4      R.R\        P                  \        P                  R7      s \        P                  ! T4       \        P                   ! 4       ;_uu_ 4       p TP#                  T \        P$                  4       TP'                  4       pT FC  w  rET\        P(                  ,          '       g   K$  \        P                  ! T 4        R R R 4       R # 	  K|    \         d     R # i ; i  + '       g   i     R # ; i)Nz/usr/bin/pkttyagentÚ
pkttyagentz--notify-fdz
--fallbackF)Ú	close_fdsÚstdinrÕ   )Ú_AGENTr   ÚgeteuidÚsysrå   Úisattyr   r   Úpipe2r3   rÙ   ÚPopenr4   rÛ   r-   ÚselectÚepollÚregisterÚEPOLLINÚpollÚEPOLLHUP)ÚrÚwrí   Úeventsr
   Ú
event_types         r   Ú_spawn_pkttyagentrö   ³  s  € ô ÒÙÜ	‡z‚zƒ|�qÔÙÜ�9‰9×Ñ×ÒÙÜ�7‰7�>‰>Ð/×0Ò0ÙðÜ�xŠx˜‹{‰ˆô
 ×ÒØ	�}¤c¨!£f¨lÐ;ØÜ�o‰oÜ�‰ô	€Fô ‡H‚HˆQ„Kä	�Š�Œ˜5ØØ�N‰N˜1œfŸn™nÔ-Ø—Z‘Z“\ˆFÛ!'‘�Ø¤§¡×/Ö/Ü—H’H˜Q”KØ÷ 
‰ó "(øô# ô Úðú÷ 
�ˆús+   Á5F  ÄAFÅFÅ<FÆ FÆFÆF#	c                 ón   € \         f   R# \         P                  4        \         P                  4        Rs R# )z=Kill pkttyagent (from PolicyKit) if it was started by Apport.N)ræ   Ú	terminateÚwait© r   r   Úkill_pkttyagentrû   Ø  s&   € ô ‚~Ùä
×ÑÔÜ
‡K�K„MØ‚Fr   c                  ó¢   € \         P                  ! 4       ^ 8X  d   . # \         P                  P                  R4      '       d   \	        4        R.# . # )é    z/usr/bin/pkexecÚpkexec)r   Úgetuidr   r   rö   rú   r   r   Ú_root_command_prefixr   ä  s<   € Ü	‡y‚yƒ{�aÔØˆ	Ü	‡w�w‡~�~Ð'×(Ò(ÜÔØˆzÐà€Ir   c                ó~   € \        V \        4      '       g   Q R4       h\        \        4       V ,           VVRVR7      pV# )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.
zcommand must be a listT)rÞ   rß   )r   rÁ   r‘   r   )rÍ   rÔ   rÖ   rß   Úoutputs   &&&& r   r`   r`   î  sE   € ô �gœt×$Ò$Ð>Ð&>Ó>Ð$ÜÜÓ Õ(ØØØØô€Fð €Mr   c                óŠ   € V ^8„  d   QhR\         \        \        3,          R\        \        \        \        ,          3,          /# )ro   Úcommand_maprq   )r   r4   Údictr   )rr   s   "r   rs   rs     s3   € ÷ ;ñ ;Üœœc˜Õ"ð;ä	Œ#Œs”U�{Ð
Õñ;r   c                ó˜  € V '       g   / # / p\         P                  P                  \         P                  P                  \         P                  P                  RR4      4      R4      p\        P                  ! 4       p \         P                  P                  VR4      p\        VRRR7      ;_uu_ 4       pV P                  4        FR  w  rg\        VR4      '       g   Q R	4       hVP                  V R
\         P                  P                  W64       R24       KT  	  RRR4       \        P                  ! \        4       W$.,           RR7       V  Fz  p \        \         P                  P                  W64      R4      ;_uu_ 4       pVP                  4       P!                  4       p	RRR4       X	'       g   Kf   T	P%                  R4      Y&   K|  	  V\(        P*                  ! V4       #   + '       g   i     LÐ; i  + '       g   i     L]; i  \"         d     KÊ  i ; i  \&         d	    Y‘T&    Kà  i ; i  \(        P*                  ! T4       i ; i)a  Execute multiple commands as root and return their respective outputs.

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/apportÚroot_info_wrapperz:script:ró   r    r¡   r2   z(command must be a string (shell command)z	 | cat > Ú
NF)rÓ   r!   r   )r   r   r±   ÚabspathrÉ   r_   ÚtempfileÚmkdtempr%   rA   ÚhasattrÚwriterÙ   rÚ   r   r1   r2   r3   r   r5   ÚshutilÚrmtree)
r  r  Úwrapper_pathÚworkdirÚscript_pathÚscriptÚkeynamerÍ   r9   Úbufs
   &         r   Úexecute_multiple_root_commandsr    sÆ  € ÷  Øˆ	à%'€FÜ—7‘7—<‘<Ü
�‰�‰œŸ
™
Ÿ™Ð'8Ð:MÓNÓOØó€Lô ×ÒÓ €Gð"ä—g‘g—l‘l 7¨JÓ7ˆÜ�+˜s¨W×5Õ5¸Ø$/×$5Ñ$5Ö$7Ñ �ÜØ˜W÷ò ð >à=ó>ð ð
 —‘ ˜y¨	´"·'±'·,±,¸wÓ2PÐ1QÐQSÐTÖUñ %8÷ 6ô 	�ŠÜ Ó" lÐ%@Õ@Èõ	
ó
 #ˆGðÜœ"Ÿ'™'Ÿ,™, wÓ8¸$×?Ô?À1ØŸ&™&›(Ÿ.™.Ó*�C÷ @÷ ‰sð*Ø&)§j¡j°Ó&9�F“Oñ #ð ä�Š�gÕ÷? 6×5ú÷" @×?ûäô ò ðûô *ô *Ø&)˜7”Oð*ûô 	�Š�gÕús‘   Á>6H1 Â4A'G#Ä5H1 Å1H	ÆG6Æ!H	Æ)H1 Æ4HÇH1 Ç#G3	Ç.H1 Ç6HÈH	ÈH1 ÈH	È	HÈH1 ÈHÈH1 ÈH.È*H1 È-H.È.H1 È1I	c                óV   € V ^8„  d   QhR\         R\        \        \        3,          RR/# )ro   r   r  rq   N)r   r   r4   )rr   s   "r   rs   rs   C  s-   € ÷ ñ ÜðÜ(/´´S°Õ(9ðà	ñr   c                óR   € \        V4      P                  4        F	  w  r#W0V&   K  	  R# )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.
N)r  rA   )r   r  ÚkÚvs   &&  r   Úattach_root_command_outputsr  C  s&   € ô  /¨{Ó;×AÑAÖC‰ˆØˆq‹	ó Dr   c                 óÈ  € R pVP                  4       fJ   VP                   F7  pVP                  RRR7      pV P                  V4      '       g   K/  W#,          pK9  	  K[  VP                   F7  pVP                  RRR7      pV P                  V4      '       g   K/  W#,          pK9  	  VP                  P	                  4        VP                  4        VP                  ^ 8X  d   V# R # )r]   r   r   r#   )rð   rÕ   r   Úsearchr-   rù   rÜ   )ÚpatternÚprocessÚlinesr³   s   &&  r   Ú__filter_re_processr"  W  s²   € Ø€Eà
�,‰,‹.Ò
 Ø—N”NˆDØ—;‘;˜w¨y�;Ó9ˆDØ�~‰~˜d×#Ô#Ø•’ó #ð
 —”ˆØ�{‰{˜7¨9ˆ{Ó5ˆØ�>‰>˜$×ÔØ�MŠEñ ð ‡N�N×ÑÔØ‡L�L„NØ×Ñ˜QÔØˆÙr   Újournald_only_systemc               óº  € V'       d   RRRV.pMu\         P                  P                  R4      '       d   . R
OpV'       d   VP                  R4       M2\         P                  ! R\         P
                  4      '       d   . ROpMR# \        P                  ! V\        P                  R7      ;_uu_ 4       p\        W4      uuR	R	R	4       #   + '       g   i     R	# ; i)aû  Extract 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ú-nÚ10000ú/run/systemd/systemz--systemú/var/log/syslogr]   ©rÕ   N)Ú
journalctlz--quietú-bz-a)r%  r&  r'  r)  )
r   r   r   r¬   rË   ÚR_OKrÙ   rë   rÛ   r"  )r  r   r#  rÍ   r   s   &&$  r   Úrecent_syslogr.  k  sŒ   € ÷ Ø˜4 ¨$Ð/‰Ü	�‰�‰Ð-×	.Ò	.Ú7ˆßØ�N‰N˜:Ô&øÜ	�ŠÐ$¤b§g¡g×	.Ò	.Ú<‰áÜ	×	Ò	˜'¬*¯/©/×	:Õ	:¸gÜ" 7Ó4÷ 
;×	:×	:Ó	:ús   Â3C	Ã	C	c                ó  € \         P                  P                  R4      p\         P                  P                  V4      '       d,   \         P                  ! V\         P
                  4      '       g   R# V '       g   \        P                  ! R4      p Rp\        VR4      ;_uu_ 4       pV F7  pVP                  RRR7      pV P                  V4      '       g   K/  W$,          pK9  	  RRR4       V#   + '       g   i     T# ; i)	aT  Extract 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!   r   r   r#   N)r   r   r§   r   rË   r-  ru   Úcompiler%   r   r  )r  r   r!  r9   r³   s   &    r   Úxsession_errorsr1  „  s½   € ô �7‰7×ÑÐ2Ó3€DÜ�7‰7�>‰>˜$×Ò¤r§y¢y°´r·w±w×'?Ò'?ÙçÜ—*’*ð6ó
ˆð €EÜ	ˆd�D×	Ô	˜QÛˆDØ—;‘;˜w¨y�;Ó9ˆDØ�~‰~˜d×#Ô#Ø•’ñ ÷ 
ð
 €L÷ 
Ö	ð
 €Lús   Â&-C.ÃC.Ã.C?	c                 óJ  € V '       g   \        RR.4      # Rp\        RR.4      pVP                  R4       F×  pRpRpVP                  R4       Fk  p VP                  R^4      w  rxTP                  4       pTP                  4       pTR	8X  d"   \	        TRR ^4      p	T	R
,          ^,	          pK`  TR8X  g   Ki  TpKm  	  V'       g   K‘  V'       g   K›  W@9   g   K£  V'       d
   VR,          pV\        RRV.4      P                  4       ,          pKÙ  	  V#   \         d     KÓ  i ; i)z9Return a text dump of PCI devices attached to the system.r}   r~   r]   z-vvmmnnz

Nr	  Ú:ÚClassi ÿ  ÚSlotz-vvnnséûÿÿÿéÿÿÿÿ)r‘   r«   Ú
ValueErrorr2   r­   )
Úpci_classesÚresultr  Ú	paragraphÚ	pci_classÚslotr³   r   rl   Úns
   *         r   r¨   r¨   ´  s  € çÜ˜w¨Ð0Ó1Ð1à€FÜ˜W iÐ0Ó1€FØ—\‘\ &Ö)ˆ	Øˆ	Øˆà—O‘O DÖ)ˆDðØ!ŸZ™Z¨¨QÓ/‘
�ð —K‘K“MˆEØ—)‘)“+ˆCØ�gŒ~Ü˜˜b ˜ bÓ)�Ø �Z¨AÕ-’	Ø˜–Ø’ñ *÷ ‰9Ÿ™ )Ö":ßØ˜&Õ �Ø”n g¨x¸Ð%>Ó?×EÑEÓGÕGŠFñ) *ð, €Møô ô Úðús   ÁDÄD"Ä!D"c                 ó   € \        RR.4      # )z9Return a text dump of USB devices attached to the system.r€   r‚   )r‘   rú   r   r   Úusb_devicesr@  Ô  s   € ô ˜7 D˜/Ó*Ð*r   c                óÄ   € \         P                  ! V 4      pV'       d;   V Uu. uF,  p\        P                  P                  W14      '       g   K*  VNK.  	  ppV# TpV# u upi )zGRetrieve a list of files owned by package, optionally matching
globpat.)r?   Ú	get_filesr®   Úfnmatch)rH   ÚglobpatÚfilesr9   r:  s   &&   r   Úfiles_in_packagerF  Ú  sW   € ô ×Ò Ó(€EßÙ"ÓG™U˜¤d§l¡l×&:Ñ&:¸1×&F—!�!™UˆÐGð €Mð ˆØ€Mùò Hs   £'AÁAc                ó   € R# )z	Obsolete.Nrú   rV   s   &&r   Úattach_gconfrH  å  s   ‚ r   c           
     óÚ  € V P                  RR4      p/ p\        P                  P                  4       pRVR&   \        P
                  ! RRV.V\        P                  R7      ;_uu_ 4       pVP                  f   Q hVP                   F=  p VP                  R^4      w  rxp	V	P                  4       p	Y“P                  T/ 4      T&   K?  	  RRR4       \        P
                  ! RRV.\        P                  R	7      ;_uu_ 4       pVP                  f   Q hVP                   Fr  p VP                  R^4      w  rxp	V	P                  4       p	Y“P                  T/ 4      P                  TR4      8w  g   KQ  TR
8X  d
   TR9   d   Rp	Y' RT RT	 R2,          pKt  	  RRR4       W R&   R#   \         d     EK*  i ; i  + '       g   i     Lõ; i  \         d     K¸  i ; i  + '       g   i     LN; i)z0Attach user-modified gsettings keys of a schema.ÚGsettingsChangesr]   z/nonexistingÚXDG_CONFIG_HOMEÚ	gsettingszlist-recursively)r×   rÕ   Nr*  s   org.gnome.shellzredacted by apportr	   r	  >   ó   favorite-appsó   command-history)r_   r   rÉ   rØ   rÙ   rë   rÛ   rÕ   r«   Úrstripr8  Ú
setdefault)
r   ÚschemaÚ	cur_valueÚdefaultsr×   rL  r³   Úschema_namer   rl   s
   &&        r   Úattach_gsettings_schemarU  ê  sÔ  € à—
‘
Ð-¨rÓ2€Ià€HÜ
�*‰*�/‰/Ó
€CØ+€CÐÑÜ	×	Ò	Ø	Ð(¨&Ð1°sÄ:Ç?Á?÷
õ 
à	Ø×ÑÒ+Ð+Ð+Ø×$Ô$ˆDðØ*.¯*©*°T¸1Ó*=Ñ'� %ØŸ™›�ð 9>×Ñ ¨RÓ0°Ó5ñ %÷	
ô 
×	Ò	Ø	Ð(¨&Ð1¼*¿/¹/÷
õ 
à	Ø×ÑÒ+Ð+Ð+Ø×$Ô$ˆDðØ*.¯*©*°T¸1Ó*=Ñ'� %ØŸ™›�ð Ÿ™ [°"Ó5×9Ñ9¸#¸rÓBÖBØÐ"4Ô4¸ð Aô :ð 1�EØ˜}¨A¨c¨U°!°E°7¸"Ð=Õ=’	ñ %÷	
ð& "+ÐÓøô/ ô Ûðú÷
÷ 
ûô( ô Úðú÷
÷ 
úsf   Á* F5Â%F"Â0F5Ä GÄ"%GÅ#GÅ/%GÆ"F2	Æ-F5Æ1F2	Æ2F5Æ5G	ÇG	ÇGÇG	ÇGÇG*	c                ó†   € \        VR4       F0  p\        P                  P                  V4      RR p\	        W4       K2  	  R# )z@Attach user-modified gsettings keys of all schemas in a package.z)/usr/share/glib-2.0/schemas/*.gschema.xmlNiôÿÿÿ)rF  r   r   r°   rU  )r   rH   Úschema_filerQ  s   &&  r   Úattach_gsettings_packagerX    s<   € ä'ØÐ<öˆô —‘×!Ñ! +Ó.¨t°Ð4ˆÜ Ö/ó	r   c                ó4   € V ^8„  d   QhR\         R\        RR/# )ro   r   Útime_windowrq   N)r   r­   )rr   s   "r   rs   rs     s!   € ÷ ñ ¤-ð ¼cð È4ñ r   c                óð   € \         P                  P                  R4      '       g   R# V P                  4       pV'       d   W!,
          pW!,           pRV 2RV 2.pMRR.p\	        RR.V,           4      V R	&   R# )
zÖAttach 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.
r(  Nz	--since=@z	--until=@r,  z--lines=1000r+  z--priority=warningÚJournalErrors)r   r   r   Úget_timestampr‘   )r   rZ  Úcrash_timestampÚbefore_crashÚafter_crashÚargss   &&    r   Úattach_journal_errorsrb    s{   € ô �7‰7�>‰>Ð/×0Ò0Ùà×*Ñ*Ó,€OßØ&Õ4ˆØ%Õ3ˆØ˜L˜>Ð*¨i¸°}Ð,EÐF‰à�nÐ%ˆÜ,Ø	Ð+Ð,¨tÕ3ó€Fˆ?Ór   c                óø   € \        RR.4      V R&   \        RR.4      V R&   \        \        4      V R&   \        V RRR	7       R F3  pV\        P
                  9   g   K  \        P
                  V,          W&   K5  	  R
# )z5Attach generic network-related information to report.ÚipÚrouteÚIpRouteÚaddrÚIpAddrÚ
PciNetworkz/etc/network/interfacesÚIfupdownConfigr¥   N)Ú
http_proxyÚ	ftp_proxyÚno_proxy)r‘   r¨   ÚPCI_NETWORKr   r   rÉ   )r   Úvars   & r   Úattach_networkrp  2  sj   € ä&¨¨g Ó7€Fˆ9ÑÜ% t¨V nÓ5€Fˆ8ÑÜ&¤{Ó3€Fˆ<ÑÜ˜&Ð";ÐAQÕRã6ˆØ”"—*‘*ÖÜŸ*™* S�/ˆF‹Kó 7r   c                ó:   € V ^8„  d   QhR\         \        ,          /# )ro   rq   )rÁ   r4   )rr   s   "r   rs   rs   >  s   € ÷ Mñ Mœt¤C�yñ Mr   c                 ó‚   € \         P                   ! R4       U u. uF  q P                  R4      ^,          NK  	  up # u up i )z.Return list of wireless devices on the system.z/sys/class/net/*/wirelessrd   )r®   r«   )rk   s    r   Ú_get_wireless_devicesrs  >  s2   € ä%)§Y¢YÐ/JÔ%KÓLÑ%K �G‰G�C‹L˜�OˆOÑ%KÑLÐLùÒLs   ™ <c                óº  € \        \        P                  ! R4      4      V R&   \        RR.4      V R&   \        P
                  P                  R4      '       dp   \        4        FS  p\        P                  ! RR\        P                  ! R	R
\        RRVR.4      4      4      V RVP                  4        R2&   KU  	  \        . RO4      pMRpW R&   \        V RRR7       R# )z5Attach wireless (WiFi) network information to report.zH(NetworkManager|modem-manager|dhclient|kernel|wpa_supplicant)(\[\d+\])?:Ú
WifiSyslogÚrfkillrÁ   ÚRfKillz/sbin/iwz([0-9a-f]{2}:){5}[0-9a-f]{2}z<hidden-mac>z
SSID: (.*)zSSID: <hidden>ÚiwÚdevÚlinkÚIwDevÚLinkúN/AÚCRDAz/var/log/wpa_supplicant.logÚWpaSupplicantLogr¥   N)rx  Úregr_   )r.  ru   r0  r‘   r   r   r   rs  r   Ú
capitalizer   )r   Úwireless_deviceÚ	iw_outputs   &  r   Úattach_wifir„  C  sÏ   € ä(Ü
�
Š
ðó	
ó€Fˆ<Ñô & x°Ð&8Ó9€Fˆ8ÑÜ	‡w�w‡~�~�j×!Ò!Ü4Ö6ˆOÜACÇÂØ.ØÜ—’Ø Ø$Ü" D¨%°À&Ð#IÓJóóBˆF�U˜?×5Ñ5Ó7Ð8¸Ð=Ó>ñ  7ô #Ò#7Ó8‰	àˆ	Øˆ6�Nä˜&Ð"?ÐEW×Xr   c                ó*  € \        V RR4       \        V RR4       \        R.4      V R&   \        RR.4      V R	&   \        P                  ! R
4      pV'       d0   \        . ROV,           4      p\        P                  ! RRV4      V R&   \        R!  V R&   R# )zcAttach printing information to the report.

Based on http://wiki.ubuntu.com/PrintingBugInfoScript.
z/etc/papersizeÚ	Papersizez/var/log/cups/error_logÚCupsErrorLogÚlocaleÚLocaleÚlpstatr‚   ÚLpstatz/etc/cups/ppd/*.ppdz*/etc/cups/ppd/(.*).ppd:\*NickName: *"(.*)"z\g<1>: \g<2>ÚPpdFilesÚPrintingPackagesN)Úfgrepz-Hz	*NickName) Úfoo2zjszfoomatic-dbzfoomatic-db-engineúfoomatic-db-gutenprintzfoomatic-db-hpijszfoomatic-filterszfoomatic-guiÚhpijsÚhplipÚm2300wÚmin12xxwÚc2050ÚhpojÚpxljrÚpnm2ppaÚsplixzhp-ppdz
hpijs-ppdszlinuxprinting.org-ppdszopenprinting-ppdszopenprinting-ppds-extraÚghostscriptÚcupszcups-driver-gutenprintr�  Úijsgutenprintzcupsys-driver-gutenprintzgimp-gutenprintzgutenprint-doczgutenprint-localeszsystem-config-printer-commonÚkdeprint)r   r‘   r®   ru   r   Úpackage_versions)r   ÚppdsÚ	nicknamess   &  r   Úattach_printingr¡  _  s‘   € ô
 ˜&Ð"2°KÔ@Ü˜&Ð";¸^ÔLÜ% x jÓ1€Fˆ8ÑÜ% x°Ð&6Ó7€Fˆ8Ñä�9Š9Ð*Ó+€DßÜ"Ò#?À$Õ#FÓGˆ	ÜŸVšVØ9¸?ÈIó
ˆˆzÑô "2ò !"€FÐÓr   c                ón   € V ^8„  d   QhR\         R\        \        ,          \        ,          R,          RR/# )ro   r   ÚprofilesNrq   )r   r   r4   )rr   s   "r   rs   rs   –  s2   € ÷ 4ñ 4Üð4Ü%-¬c¥]´SÕ%8¸4Õ%?ð4à	ñ4r   c           
     óh  € \        V\        4      '       d   V.pRp\        P                  ! V\        P                  4      pRp\        P                  ! V\        P                  4      p/ pRV 9  d   RVR&   RV 9  d/   \
        P                  P                  R4      '       d
   RV R2VR&   \        V4      pRV9   dJ   VR,          p\        V\        4      '       g   Q hR	P                  \        P                  ! W84      4      V R&   RV9   d   VR,          V R&   \        V R
R4       \        V RR4       \        P                  ! VR	P                  V P                  RR4      V P                  RR4      34      4       F›  p	V'       g   V P                  R.4        R#  V	^ ,          R8X  d   V	^R p
M'\        P!                  V	4      P#                  RRR7      p
 V F9  p\        P(                  ! RV R2V
4      '       g   K&  V P                  R.4        K™  	  K�  	  R#   \$        \&        3 d     Kµ  i ; i)z0Attach MAC information and events to the report.z'(?:audit\(|apparmor|selinux|security).*z'apparmor="DENIED".+?profile=([^ ]+?)[ ]ÚKernLogr^   ÚAuditLogz/var/run/auditd.pidzegrep "z" /var/log/audit/audit.logr	  z/proc/version_signatureÚProcVersionSignaturer{   ÚProcCmdliner]   ÚapparmorÚ"r   r   r#   Ú^Ú$Nr7  )r   r4   ru   r0  Ú
IGNORECASEr   r   r   r  r±   Úfindallr   r   r_   Úadd_tagsr   Úfromhexr   Ú
IndexErrorr8  Úmatch)r   r£  Ú	mac_regexÚmac_reÚaa_regexÚaa_reÚprivileged_commandsÚprivileged_outputsr  r²  ÚprofileÚsearch_profiles   &&          r   Úattach_mac_eventsr»  –  só  € ô
 �(œC× Ò Ø�:ˆà:€IÜ�ZŠZ˜	¤2§=¡=Ó1€FØ8€HÜ�JŠJ�x¤§¡Ó/€EàÐØ˜ÔØ'.Ð˜GÑ$à˜Ô¤B§G¡G§N¡NÐ3H×$IÒ$Ià�i�[Ð :Ð;ð 	˜JÑ'ô 8Ð8KÓLÐàÐ$Ô$Ø# GÕ,ˆÜ˜&¤#×&Ò&Ð&Ð&Ø ŸI™I¤b§j¢j°Ó&@ÓAˆˆyÑØÐ'Ô'Ø/°
Õ;ˆˆzÑä˜&Ð";Ð=SÔTÜ�˜¨Ô7ä—’Øˆt�y‰y˜&Ÿ*™* Y°Ó3°V·Z±ZÀ
ÈBÓ5OÐPÓQöˆ÷ Ø�O‰O˜Z˜LÔ)Úð	Ø�Q�x˜3ŒØ  "˜+‘äŸ-™-¨Ó.×5Ñ5°gÀiÐ5ÓP‘ó 'ˆNÜ�xŠx˜!˜NÐ+¨1Ð-¨w×7Ô7Ø—‘  Ô-Úó 'óøô œJÐ'ô 	Úð	ús   ÆHÆ0&HÈH1È0H1c                ó   € \        V!  V R&   R# )zbAttach version information for related packages.

In the future, this might also run their hooks.
ÚRelatedPackageVersionsN)rž  )r   Úpackagess   &&r   Úattach_related_packagesr¿  Í  s   € ô
 (8¸Ñ'B€FÐ#Ó$r   c            
     óØ  € V '       g   R# . pV  F  pV'       g   K  \         P                  ! V4      pV'       g   VP                  VR34       \        V4       F2  p \         P                  ! V4      pVf   RpVP                  WE34       K4  	  K�  	  \        R V 4       4      pRP                  V UUu. uF  w  rxVRV R2 RV 2NK  	  upp4      #   \
         d    Rp Lpi ; iu uppi )zlReturn a text listing of package names and versions.

Arguments may be package names or globs, e. g. "foo*"
r]   r}  c              3   óF   "  € T F  p\        V^ ,          4      x € K  	  R# 5i)rý   N)Úlen)Ú.0Úversions   & r   Ú	<genexpr>Ú#package_versions.<locals>.<genexpr>ï  s   é € Ð@±x¨Gœ˜G A�JŸ˜³xùs   ‚!r	  Ú<Úsr	   )r?   Úpackage_name_globr¬   ÚsortedÚget_versionr8  Úmaxr±   )	r¾  ÚversionsÚpackage_patternÚmatching_packagesrH   rÄ  Úpackage_widthrk   r  s	   *        r   rž  rž  Õ  sè   € ÷
 ÙØ€HÛ#ˆßÙä%×7Ò7¸ÓHÐç Ø�O‰O˜_¨eÐ4Ô5äÐ/Ö0ˆGð Ü#×/Ò/°Ó8�ð ŠØ�Ø�O‰O˜WÐ.Ö/ó 1ñ $ô$ Ñ@±xÓ@Ó@€MØ�9‰9ÁÔJÁ±v¸˜˜1˜]˜O¨1Ð,Ð-¨Q¨q¨cÓ2ÁÒJÓKÐKøô ô  Ø’ð üó Ks   ÁCÂ4C&
ÃC#Ã"C#c                óº  €  \         P                  ! RV .R\         P                  \         P                  R7      pVP                  ^ 8w  d   R#  TP
                  P                  R4      P                  4        FN  pTP                  R^4      p\        T4      ^8  d   K'  T^ ,          R8X  g   K7  T^,          P                  4       u # 	  R#   \         d     R# i ; i)	z-Return the license for a given kernel module.z/sbin/modinfoF)rÓ   rÕ   rÖ   ÚinvalidNr   r3  Úlicense)rÙ   rÚ   rÛ   rÜ   r3   rÕ   r   Ú
splitlinesr«   rÂ  r2   )ÚmoduleÚmodinfor³   r´   s   &   r   Ú_get_module_licenser×  ó  s¾   € ð
Ü—.’.Ø˜fÐ%ØÜ—?‘?Ü—?‘?ô	
ˆð ×Ñ Ô"Ùð #ð —‘×%Ñ% gÓ.×9Ñ9Ö;ˆØ—‘˜C Ó#ˆÜˆv‹;˜Œ?ÙØ�!�9˜	Ö!Ø˜!•9—?‘?Ó$Ò$ñ <ñ øô ô Úðús   ‚A	C ÃCÃCc                óŽ  €  \        V RR7      ;_uu_ 4       pV Uu. uF  q"P                  4       ^ ,          NK  	  ppRRR4       . pX FM  p\        T4      pT'       g   K  RT9   d   K!  RT9   d   K*  RT9   d   K3  RT9   d   K<  TP	                  T4       KO  	  T# u upi   + '       g   i     Ll; i  \         d    . u # i ; i)zCCheck loaded modules and return a list of those which are not free.r    r¡   NÚGPLÚBSDÚMPLÚMIT)r%   r«   r3   r×  r¬   )Úmodule_listr9   r³   ÚmodsÚnonfreeÚmrÈ  s   &      r   Únonfree_kernel_modulesrá  
  s¥   € ðÜ�+¨×0Õ0°AÙ01Ó2±¨—J‘J“L —O�O±ˆDÐ2÷ 1ð
 €GÛˆÜ Ó"ˆß‰1�e˜q–j E¨Q¦J°%¸1¶*ÀÈÆ
Ø�N‰N˜1Öñ ð
 €Nùò 3÷ 1×0ûäô ØŠ	ðús=   ‚B4 —B!œB»B!½B4 ÂB!Â!B1	Â,B4 Â1B4 Â4CÃCc           	      ó6  € R p\         P                  ! V 4       Fé  p\         P                  P                  W4      pVR8X  g&   \         P                  P	                  V4      '       g   KP  \        VR4      ;_uu_ 4       pVP                  4       P                  4       pRRR4       VR8X  d   XP                  RR4      pVR8X  d    \        P                  ! X4      pVR,          pW R	XP                  R
RR7       R2,          pKë  	  V#   + '       g   i     Lt; i)r]   rf   r!   NÚmodesó   
ó    Úedidz-base64z: r   r   r#   r	  )r   ri   r   r±   r¯   r%   r1   r2   r   Úbase64Ú	b64encoder   )Úconr�   r9   r   Úcon_info_fileÚvals   &     r   Ú__drm_con_inforì    sÞ   € Ø€DÜ�ZŠZ˜Ž_ˆÜ�w‰w�|‰|˜CÓ#ˆØ�Œ=¤§¡§¡¨t× 4Ò 4ÙÜ�$˜×Ô Ø×$Ñ$Ó&×,Ñ,Ó.ˆC÷ ð �Œ<Ø—+‘+˜e TÓ*ˆCØ�Œ;Ü×"Ò" 3Ó'ˆCØ��NˆAØ�#�R˜Ÿ
™
 7°9˜
Ó=Ð>¸bÐAÕAŠñ ð €K÷ ×ús   Á=DÄDc                óŽ  € Rp\         P                  P                  V4      '       g   R# \         P                  ! V4       F�  p\         P                  P	                  W4      p\         P                  P                  \         P                  P	                  VR4      4      '       g   Kg  \        V4      V R\        V4       2&   Kƒ  	  R# )zOAdd information about DRM hardware.

Collect information from /sys/class/drm/.
z/sys/class/drmNÚenabledzDRM.)r   r   rh   ri   r±   r   rì  r   )r   Údrm_dirr9   ré  s   &   r   Úattach_drm_inforð  -  s�   € ð
 €GÜ�7‰7�=‰=˜×!Ò!ÙÜ�ZŠZ˜Ö ˆÜ�g‰g�l‰l˜7Ó&ˆÜ�7‰7�>‰>œ"Ÿ'™'Ÿ,™, s¨IÓ6×7Ô7ä.<¸SÓ.AˆF�Tœ+ a›.Ð)Ð*Ó+ó	 !r   c                óP  € \         P                  P                  R4      pV'       g‹   \        RRR7      ;_uu_ 4       pV FZ  pVP	                  4       pRV9   g   K  VP                  R4      '       g   K5  RV9   g   K>  VP                  R^4      ^,          RR
 p M	   RRR4       R#  RRR4        V P                  4       pTf   R#  \         P                  ! R	T 24      P                  pYT8*  #   + '       g   i     LO; i  \         d     R# i ; i  \         d     R# i ; i)zÎCheck if the problem happened in the currently running XDG session.

This can be used to determine if e. g. ~/.xsession-errors is relevant and
should be attached.

Return None if this cannot be determined.
ÚXDG_SESSION_IDz/proc/self/cgroupr    r¡   zname=systemd:z.scopez	/session-Nz/run/systemd/sessions/iúÿÿÿ)r   rÉ   r_   r%   r2   Úendswithr«   r]  ÚAttributeErrorr,   rF   r3   )r   Ú
session_idr9   r³   Úreport_timeÚsession_start_times   &     r   Úin_session_of_problemrø  <  s  € ô —‘—‘Ð 0Ó1€JßäÐ%°×8Õ8¸AÛ�Ø—z‘z“|�à# tÖ+ØŸ™ h×/Ô/Ø# tÖ+à!%§¡¨K¸Ó!;¸AÕ!>¸sÀÐ!C�JÙñ ð ÷ 9Ñ8ð ÷ 9ðØ×*Ñ*Ó,ˆð ÒÙðÜŸWšWÐ'=¸j¸\Ð%JÓK×TÑTÐð Ñ,Ð,÷5 9×8ûô ô Úðûô ô ÚðúsA   ½C1ÁC1Á5C1Á>!C1Â3D Ã
#D Ã1D	ÄDÄDÄD%Ä$D%c                ó„  € RpV'       g   \        V4      p\        P                  P                  V4      '       dm   \	        VRRR7      ;_uu_ 4       pVP                  4        Uu. uF  pVP                  R4      '       g   TMRNK   	  ppRP                  V4      W&   RRR4       R# R# u upi   + '       g   i     R# ; i)	z<Attach /etc/default/grub after filtering out password lines.z/etc/default/grubrò   r    r¡   Úpasswordz### PASSWORD LINE REMOVED ###r]   N)r   r   r   r   r%   Ú	readlinesrB   r±   )r   r   r   r9   r³   Úfiltereds   &&    r   Úattach_default_grubrý  d  s­   € à€DßÜ˜$Óˆä	‡w�w‡~�~�d×ÒÜ�$˜ g×.Õ.°!ð ŸK™KœMóñ *�Dð  Ÿ?™?¨:×6Ò6ñ à8ò9ñ *ð ð ð Ÿ'™' (Ó+ˆF‰K÷ /Ñ.ñ ùò÷ /×.Ð.ús$   ÁB.Á$B)Â B)ÂB.Â)B.Â.B?	c                ó^  € Rp. p\         P                  P                  V4      '       dR   \        V RRV R2/4       RV 9   d9   \        P
                  ! V R,          4      pVR,          pVP                  R. 4      pW R&   V'       d   RP                  V4      V R	&   V P                  RR
4       R
# )z;Attach the results of the casper md5check of install media.ÚunknownÚCasperMD5jsonzcat 'Ú'r:  Úchecksum_missmatchÚCasperMD5CheckResultr	   ÚCasperMD5CheckMismatchesN)	r   r   r   r  ÚjsonÚloadsr_   r±   Úpop)r   Úlocationr:  Ú
mismatchesrÓ   s   &&   r   Úattach_casper_md5checkr
  w  sš   € à€FØ€JÜ	‡w�w‡~�~�h×ÒÜ# F¨_ÀÀhÀZÈqÐ>QÐ,RÔSØ˜fÔ$Ü—J’J˜v oÕ6Ó7ˆEØ˜8•_ˆFàŸ™Ð#7¸Ó<ˆJØ%+Ð!Ñ"ßØ-0¯X©X°jÓ-AˆÐ)Ñ*Ø
‡J�Jˆ Ö%r   )NTF)F)NN)N)é
   )r„   )XÚ__doc__rç  rD   r®   r  r   ru   rì   r  r,   rÙ   rè   r  rS   Úcollections.abcr   r   Úapport.fileutilsÚapportÚapport.packaging_implr   r?   Úproblem_reportr   r0  r   ræ   r   r   r<   r   rN   rW   rZ   rb   rm   rv   r”   r¹   rÆ   r’   ÚSTDOUTr‘   rö   rû   r   r`   r  r  r"  r.  r1  ÚPCI_MASS_STORAGErn  ÚPCI_DISPLAYr©   Ú
PCI_MEMORYÚ
PCI_BRIDGEÚPCI_SIMPLE_COMMUNICATIONSÚPCI_BASE_SYSTEM_PERIPHERALSÚPCI_INPUT_DEVICESÚPCI_DOCKING_STATIONSÚPCI_PROCESSORSÚPCI_SERIAL_BUSr¨   r@  rF  rH  rU  rX  rb  rp  rs  r„  r¡  r»  r¿  rž  r×  rá  rì  rð  rø  rý  r
  Ú	fileutilsÚshared_librariesÚlinks_with_shared_libraryrú   r   r   Ú<module>r      sÜ  ðÙ 5ó  Û Û Û Û 	Û 	Û Û Û Û Û 
Û Û ß -ã Ý 3Ý (àŸ
š
Ð#5Ó6Ð Ø	€òBôAô2"ôJ?ô,!JòJòò@ò
õ6ò"/+òd.3òbò<ð  Ø×ÑØØô,ò^"òJ	òð  
× 1Ñ 1¸tôõ.;õ|ò(ñ(5¸dõ 5ô2ðD Ð Ø€Ø€Ø€Ø€
Ø€
Ø Ð Ø"Ð ØÐ ØÐ Ø€Ø€òò@+ôòò
&+òR0÷ò,	*õMò
Yò82÷n4ònCòLò<ô.ò"ò$Bò%-ôP,ò&&ð$ ×#Ñ#×4Ñ4Ð Ø"×,Ñ,×FÑFÒ r   