+
    ˜qgj™  ã                   óœ  a € RV tX0 t R t^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIH	t	 ^ RI
HtHtHtHt ^ RIHtHtHtHtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ]P>                  ! ] 4      t!R
t"Rt#Rt$Rt%Rt&RRRR/t'] ^ k RRR. RWOR]R. /t(] ^k Rt)Rt*Rt+Rt,RRRR /t-RR!RR!/t.R"R#.t/. RXOt0R$t1R]1/t2RYR% lt3R& R' lt4R( t5R) t6R* t7R+ t8R, t9R- t:R. t;R/ t<R0 t=R1 R2 lt>R3 R4 lt?R5 R6 lt@R7 R8 ltAR9 R: ltBR;R<R=R>R?R@/tCRAtDRB RC ltERD tFRZRE ltGRF tHR[RG ltIR\RH ltJRI tKRJ tLRK tMRL tNRM tORN tPRO tQRP tRRQ tSRYRR ltTRS tUR]RT ltVRU]:/tWR# )^z*Apt Configure: Configure apt for the user.N)Úindent)ÚDictÚIterableÚListÚMapping)ÚfeaturesÚ	lifecycleÚsubpÚ	templaterÚutil)ÚCloud)ÚConfig)Ú
MetaSchema)ÚGPG)ÚPER_INSTANCEz
^[\w-]+:\wz/etc/apt/trusted.gpgz/etc/apt/trusted.gpg.d/z/etc/apt/cloud-init.gpg.d/z&# cloud-init disable_suites redacted: úadd-apt-repositoryzsoftware-properties-commonÚgpgÚgnupgÚidÚcc_apt_configureÚdistrosÚubuntuÚ	frequencyÚactivate_by_schema_keysz/var/lib/apt/listsz'/etc/apt/apt.conf.d/94cloud-init-configz)/etc/apt/apt.conf.d/90cloud-init-aptproxyzkeyserver.ubuntu.comÚPRIMARYz!http://archive.ubuntu.com/ubuntu/ÚSECURITYz"http://security.ubuntu.com/ubuntu/z$http://ports.ubuntu.com/ubuntu-portsÚamd64Úi386a  # Ubuntu sources have moved to the /etc/apt/sources.list.d/ubuntu.sources
# file, which uses the deb822 format. Use deb822-formatted .sources files
# to manage package sources in the /etc/apt/sources.list.d/ directory.
# See the sources.list(5) manual page for details.
c                óÔ   € V f   \         P                  ! 4       p V \        9   d   \        P	                  4       # V \
        9   d   \        P	                  4       # \        RV ,          4      h)zšreturns the default mirrors for the target. These depend on the
architecture, for more see:
https://wiki.ubuntu.com/UbuntuDevelopment/PackageArchive#Portsz#No default mirror known for arch %s)r   Úget_dpkg_architectureÚPRIMARY_ARCHESÚPRIMARY_ARCH_MIRRORSÚcopyÚPORTS_ARCHESÚPORTS_MIRRORSÚ
ValueError©Úarchs   &ÚC/usr/lib/python3/dist-packages/cloudinit/config/cc_apt_configure.pyÚget_default_mirrorsr)   U   sV   € ð ‚|Ü×)Ò)Ó+ˆØŒ~ÔÜ#×(Ñ(Ó*Ð*ØŒ|ÔÜ×!Ñ!Ó#Ð#Ü
Ð:¸TÕAÓ
BÐBó    c          
      óL   € V ^8„  d   QhR\         R\        R\        R\        RR/# )é   ÚnameÚcfgÚcloudÚargsÚreturnN)Ústrr   r   Úlist)Úformats   "r(   Ú__annotate__r5   d   s/   € ÷ /ñ /”ð /œ6ð /¬%ð /´tð /Àñ /r*   c                ó@  € \        V4      pVP                  R/ 4      p\        V\        4      '       g%   \	        RP                  \        V4      R7      4      h\        V4       \        4       ;_uu_ 4       p\        WBV4       RRR4       R#   + '       g   i     R# ; i)z�process the config for apt_config. This can be called from
curthooks if a global apt config was provided or via the "apt"
standalone command.Úaptz9Expected dictionary for 'apt' config, found {config_type})Úconfig_typeN)
Úconvert_to_v3_apt_formatÚgetÚ
isinstanceÚdictr%   r4   ÚtypeÚapply_debconf_selectionsr   Ú	apply_apt)r-   r.   r/   r0   Úapt_cfgÚgpg_contexts   &&&&  r(   ÚhandlerB   d   sv   € ô
 # 3Ó
'€CØ�g‰g�e˜RÓ €Gä�gœt×$Ò$Üð"ß"(¡&´T¸'³] &Ó"Có
ð 	
ô
 ˜WÔ%Ü	�Œ�+Ü�' +Ô.÷ 
��Šús   Á5BÂB	c                  ó´   € \         P                  ! 4       '       d   R# \        P                  ! R4      '       g   \        P                  ! R4      '       g   R# R# )Fzapt-getr7   )Fzsystem is snappy.)Fzno apt commands.)TzApt is available.)r   Úsystem_is_snappyr	   Úwhich© r*   r(   Ú_should_configure_on_empty_aptrG   w   s@   € ä×Ò×ÒØ)Ð)Ü�JŠJ�y×!Ò!¤T§Z¢Z°×%6Ò%6Ø(Ð(Ø$Ð$r*   c                 ób  € V '       g-   \        4       w  r4V'       g   \        P                  R V4       R# \        P                  RV 4       \        P                  ! 4       R,          p\        P
                  ! 4       p\        WVR7      p\        P                  RV4       RpV P                  R\        4      p	V	'       d!   \        P                  ! V	4      P                  p\        WV4       \        P                  ! V P                  RR4      4      '       d%   \        WV4      p
\        WWqV
4       \!        Wv4        \#        V \$        \&        4       R
V 9   d,   TpW[R&   VR,          VR&   \/        V R
,          VVVVR7       R# R#   \(        \*        3 d    \        P-                  R	4        L\i ; i)z#Nothing to do: No apt config and %sNzhandling apt config: %sÚcodenamer&   zApt Mirror info: %sÚadd_apt_repo_matchÚpreserve_sources_listFz)Failed to apply proxy or apt config info:ÚsourcesÚRELEASEÚMIRROR)Útemplate_paramsÚaa_repo_match)rG   ÚLOGÚdebugr   Úlsb_releaser   Úfind_apt_mirror_infor:   ÚADD_APT_REPO_MATCHÚreÚcompileÚsearchÚ_ensure_dependenciesÚis_falseÚadd_mirror_keysÚgenerate_sources_listÚrename_apt_listsÚapply_apt_configÚAPT_PROXY_FNÚAPT_CONFIG_FNÚIOErrorÚOSErrorÚ	exceptionÚadd_apt_sources)r.   r/   r   Úshould_configÚmsgÚreleaser'   ÚmirrorsÚmatcherÚmatchcfgÚkeysÚparamss   &&&         r(   r?   r?   €   s`  € çÜ;Ó=ÑˆßÜ�I‰IÐ;¸SÔAÙä‡I�IÐ'¨Ô-ä×ÒÓ  Õ,€GÜ×%Ò%Ó'€DÜ" 3°DÔ9€GÜ‡I�IÐ# WÔ-à€GØ�w‰wÐ+Ô-?Ó@€HßÜ—*’*˜XÓ&×-Ñ-ˆÜ˜ uÔ-ä‡}‚}�S—W‘WÐ4°eÓ<×=Ò=Ü˜s¨3Ó/ˆÜ˜c¨G¸DÔAÜ˜Ô'ðCÜ˜œl¬MÔ:ð
 �CÔØˆØ#ˆyÑØ" 8Õ,ˆˆxÑäØ�	�NØØØ"Ø!÷	
ñ øô	 ”WÐô CÜ�‰ÐAÖBðCús   Ä<F Æ&F.Æ-F.c                 óz   € V P                  R 4      '       g
   V R ,          p \        P                  ! R.V RR7       R# )ó   
zdebconf-set-selectionsT©ÚdataÚcaptureN)Úendswithr	   )Ú
selectionss   &r(   Údebconf_set_selectionsrt   ®   s5   € Ø×Ñ˜u×%Ò%Ø�eÕˆ
Ü‡I‚IØ	!Ð"ØØ÷r*   c                 ó˜  € . p. pV  FZ  pV\         9   d<   \        P                  R V4       \         V,          ! 4        VP                  V4       KI  VP                  V4       K\  	  \	        V4      '       d   \        P                  RV4       \	        V4      '       d.   \        P                  ! RR.\        V4      ,           RRR7       R# R# )zunconfiguring %szSThe following packages were installed and preseeded, but cannot be unconfigured: %szdpkg-reconfigurez--frontend=noninteractiveNTro   )ÚCONFIG_CLEANERSrQ   rR   ÚappendÚlenÚwarningr	   r3   )ÚpackagesÚ	unhandledÚ	to_configÚpkgs   &   r(   Údpkg_reconfigurer~   ¸   s¬   € ð €IØ€IÛˆØ”/Ô!Ü�I‰IÐ(¨#Ô.Ü˜CÖ Ô"Ø×Ñ˜SÖ!à×Ñ˜SÖ!ñ ô ˆ9‡~‚~Ü�‰ð-àô	
ô ˆ9‡~‚~Ü�	Š	ØÐ!<Ð=Ü�9‹oõàØ÷		
ñ r*   c                óâ  € V P                  R4      pV'       g   \        P                  R4       R# RP                  \	        VP                  4       4       Uu. uF  q!V,          NK  	  up4      p\        VP                  4       4       \        4       pVP                  4        F^  w  rVVP                  4        FE  pVP                  R4      '       d   K  \        P                  ! RRV4      pVP                  V4       KG  	  K`  	  \        P                   ! 4       p	\        P                  RV4       VP#                  V	4      p
V
'       g   \        P                  R	4       R# \%        V
4       R# u upi )
z2apply_debconf_selections - push content to debconfÚdebconf_selectionsz(debconf_selections was not set in configNÚ
Ú#z[:\s].*Ú zpkgs_cfgd: %szno need for reconfig)r:   rQ   rR   ÚjoinÚsortedrk   rt   ÚencodeÚsetÚitemsÚ
splitlinesÚ
startswithrV   ÚsubÚaddr   Úget_installed_packagesÚintersectionr~   )r.   ÚselsetsÚkeyrs   Ú	pkgs_cfgdÚ_keyÚcontentÚliner}   Úpkgs_installedÚneed_reconfigs   &          r(   r>   r>   Ø   s  € ð �g‰gÐ*Ó+€GßÜ�	‰	Ð<Ô=Ùà—‘´F¸7¿<¹<»>Ô4JÓKÑ4J¨S CŸL˜LÑ4JÑKÓL€JÜ˜:×,Ñ,Ó.Ô/ô “€IØ Ÿ™ž‰ˆØ×&Ñ&Ö(ˆDØ�‰˜s×#Ò#ÙÜ—&’&˜ R¨Ó.ˆCØ�M‰M˜#Öó	 )ñ )ô ×0Ò0Ó2€Nä‡I�Iˆo˜yÔ)Ø×*Ñ*¨>Ó:€MçÜ�	‰	Ð(Ô)Ùä�]Ö#ùò+ Ls   ÁE,c                 óÆ   € \         P                   ! \        P                  ! RR7      4      p \        P	                  RV 4       V  F  p\
        P                  ! V4       K  	  R# )z%clean out any local cloud-init configz/etc/cloud/cloud.cfg.d/*dpkg*©Úpathz#cleaning cloud-init config from: %sN)Úglobr	   Útarget_pathrQ   rR   ÚosÚunlink)ÚflistÚdpkg_cfgs     r(   Úclean_cloud_initr    û   sA   € ä�IŠI”d×&Ò&Ð,KÔLÓM€Eä‡I�IÐ3°UÔ;ÛˆÜ
�	Š	�(Öó r*   c                ó¬   € T pVP                  R4      '       d   V^ R pVP                  R4      pV^ 8¼  d   W^,           R pVP                  RR4      pV# )zÎmirrorurl_to_apt_fileprefix
Convert a mirror url to the file prefix used by apt on disk to
store cache information for that mirror.
To do so do:
- take off ???://
- drop tailing /
- convert in string / to _Ú/z://NÚ_éÿÿÿÿ)rr   ÚfindÚreplace)ÚmirrorÚstringÚposs   &  r(   Úmirrorurl_to_apt_fileprefixrª     s[   € ð €FØ‡��s×ÒØ˜˜"�ˆØ
�+‰+�eÓ
€CØ
ˆa„xØ˜a�˜	Ð"ˆØ�^‰^˜C Ó%€FØ€Mr*   c                óª  € \        V4      p\        P                  ! \        4      pVP	                  4        Fð  w  rEV P                  V4      pV'       g   K   V\        P                  P                  ,           \        V4      ,           pV\        P                  P                  ,           \        V4      ,           pWx8X  d   KŠ  \        V4      p	\        P                  ! RV,          4       F:  p
V: W©R : 2p\        P                  RW«4        \        P                  ! W«4       K<  	  Kò  	  R#   \         d    \        P!                  RRR7        Ki  i ; i)z>rename_apt_lists - rename apt lists to preserve old cache dataz%s_*NzRenaming apt list %s to %szFailed to rename apt list:T)Úexc_info)r)   r	   r›   Ú	APT_LISTSrˆ   r:   rœ   r™   Úseprª   rx   rš   rQ   rR   Úrenamerb   ry   )Únew_mirrorsr'   Údefault_mirrorsÚprer-   ÚomirrorÚnmirrorÚoprefixÚnprefixÚolenÚfilenameÚnewnames   &&          r(   r]   r]     sü   € ä)¨$Ó/€Oä
×
Ò
œ9Ó
%€CØ(×.Ñ.Ö0‰ˆØ—/‘/ $Ó'ˆßÙàœŸ™Ÿ™Õ#Ô&AÀ'Ó&JÕJˆØœŸ™Ÿ™Õ#Ô&AÀ'Ó&JÕJˆØÔÙÜ�7‹|ˆÜŸ	š	 &¨7Õ"2Ö3ˆHÚ '¨°%ªÐ9ˆGÜ�I‰IÐ2°HÔFðIÜ—	’	˜(Ö,ó	 4ó 1øô ô Iä—‘Ð8À4�×HðIús   ÄD,Ä,"EÅEc           
     óX   € RRRRRRRRR	R
/p W,          pV#   \          d    T p T# i ; i)zÁthere are a few default names which will be auto-extended.
This comes at the inability to use those names literally as suites,
but on the other hand increases readability of the cfg quite a lotÚupdatesz$RELEASE-updatesÚ	backportsz$RELEASE-backportsÚsecurityz$RELEASE-securityÚproposedz$RELEASE-proposedrg   z$RELEASE)ÚKeyError)ÚsuiteÚmappingÚretsuites   &  r(   Úmap_known_suitesrÃ   /  sV   € ð
 	Ð%ØÐ)ØÐ'ØÐ'Ø�:ð€GðØ•>ˆð €Oøô ô Ø‰Ø€Oðús   Ž ˜)¨)c                ó0   € V ^8„  d   QhR\         R\         /# )r,   Údeb822_entryr1   ©r2   )r4   s   "r(   r5   r5   A  s   € ÷ ñ ¼ð Äñ r*   c                óÐ   € \         P                  ! RV 4      '       gI   \         P                  ! RRV 4      p \         P                  ! \         RV 4      p R\	        V R4      ,           # V # )z0If no active Suites, disable this deb822 source.z\nSuites:[ \t]+([\w-]+)z\nSuites:.*rƒ   z7## Entry disabled by cloud-init, due to disable_suites
z# disabled by cloud-init: )rV   Úfindallr‹   ÚDISABLE_SUITES_REDACT_PREFIXr   )rÅ   s   &r(   Ú%disable_deb822_section_without_suitesrÊ   A  sd   € ä�:Š:Ð0°,×?Ò?ô —v’v˜n¨b°,Ó?ˆÜ—v’vÜ,Ð-°°Ló
ˆð GÜ�\Ð#?Ó@õAð	
ð Ðr*   c                ó$   € V ^8„  d   QhR\         /# ©r,   r1   rÆ   )r4   s   "r(   r5   r5   Q  s   € ÷ ,ñ ,´Sñ ,r*   c                ó¤  € . pV  Uu. uF%  p\         P                  ! \        V4      RV/4      NK'  	  pp\        P	                  RW4       RpVP                  4        EF4  pVP                  R4      '       d(   V'       d   Wg R2,          pMVP                  V4       KB  V'       d   VP                  4       '       d8   V'       d   VP                  \        V4      4       RpVP                  V4       K—  TpVP                  R4      '       g   WgR,           ,          pKÁ  V'       d]   VP                  4       R,          p	V	 Uu. uF  pWE9  g   K  VNK  	  p
pW©8w  d'   V\         V R2,          pRR	P                  V
4       2pWhR,           ,          pEK7  	  V'       d   VP                  \        V4      4       RP                  V4      # u upi u upi )
z:reads the deb822 format config and comment disabled suitesrM   zDisabling suites %s as %srƒ   r‚   r�   zSuites:ºé   NNzSuites: Ú )r
   Úrender_stringrÃ   rQ   rR   r‰   rŠ   rw   ÚisspacerÊ   ÚsplitrÉ   r„   )ÚdisabledÚsrcrg   Únew_srcrÀ   Údisabled_suite_namesÚnew_deb822_entryr”   Únew_lineÚorig_suitesÚ
new_suitess   &&&        r(   Údisable_suites_deb822rÜ   Q  s­  € à€Gñ óáˆEô 	×ÒÔ 0°Ó 7¸)ÀWÐ9MÖNÙð ð ô ‡I�IÐ)¨8ÔJØÐØ—‘× ˆØ�?‰?˜3×ÒßØ  f¨B KÕ/Ñ à—‘˜tÔ$Ùß�t—|‘|—~’~çØ—‘Ü9Ð:JÓKôð $&Ð Ø�N‰N˜4Ô ÙØˆØ�‰˜y×)Ò)Ø t¥Õ+ÐÙçàŸ*™*›, rÕ*ˆKñ )óá(�EØÑ4÷ �Ù(ð ð ð
 Ô(Ø Ô'CÐ&DÀTÀFÈ"Ð$MÕMÐ Ø% c§h¡h¨zÓ&:Ð%;Ð<�Ø t�OÕ+ÓñA !÷B Ø�‰Ô<Ð=MÓNÔOØ�9‰9�WÓÐùòSùò<s   ‡+GÅ GÅGc                ó$   € V ^8„  d   QhR\         /# rÌ   rÆ   )r4   s   "r(   r5   r5   €  s   € ÷ %ñ %¬cñ %r*   c                ó|  € V '       g   V# Tp\        V4      '       d   \        WV4      # V  EF  p\        V4      p\        P                  ! VRV/4      p\
        P                  RWE4       RpVP                  R4       F´  pVP                  R4      '       d   Wg,          pK$  VP                  4       p\        V4      ^8”  di   ^p	V^,          P                  R4      '       d3   VR,           F%  p
V	^,          p	V
P                  R4      '       g   K%   M	  W‰,          V8X  d
   R	V,          pWg,          pK¶  	  TpEK  	  V# )
zNreads the config for suites to be disabled and removes those
from the templaterM   zDisabling suite %s as %srƒ   Tr‚   Ú[rÎ   Ú]z"# suite disabled by cloud-init: %s)Úis_deb822_sources_formatrÜ   rÃ   r
   rÑ   rQ   rR   r‰   rŠ   rÓ   rx   rr   )rÔ   rÕ   rg   ÚretsrcrÀ   ÚreleasesuiteÚnewsrcr”   ÚcolsÚpcolÚcols   &&&        r(   Údisable_suitesrè   €  s  € ÷ Øˆ
à€FÜ ×$Ò$Ü$ X°GÓ<Ð<ÜˆÜ  Ó'ˆÜ ×.Ò.¨u°yÀ'Ð6JÓKˆÜ�	‰	Ð,¨eÔBàˆØ×%Ñ% dÖ+ˆDØ�‰˜s×#Ò#Ø•�Ùð
 —:‘:“<ˆDÜ�4‹y˜1Œ}Ø�Ø˜•7×%Ñ% c×*Ò*Ø# BŸx˜x˜Ø �	˜ØŸ<™<¨×,Ô,Ù!ñ  (ð
 •: Ô-Ø?À$ÕF�DØ�NŠFñ' ,ð( ‹ñ5 ð8 €Mr*   c                óF   € V ^8„  d   QhR\         \        \        3,          /# rÌ   )r   r2   )r4   s   "r(   r5   r5   ¨  s   € ÷ ñ ¬´´S°Õ(9ñ r*   c           	     óŠ   € / pR F:  pV P                  V. 4       F!  p\        WQW$R7      pV'       g   K  WcV R2&   K#  	  K<  	  V# )z=Adds any keys included in the primary/security mirror clauses)Ú	file_namer’   ©Úprimaryr½   )r:   Úadd_apt_key)r.   r/   r   rk   r�   r§   Úresps   &&&    r(   r[   r[   ¨  sL   € à€DÛ&ˆØ—g‘g˜c 2Ö&ˆFÜ˜v¨cÔAˆDß‰tØ%)˜�u˜D�\Ó"ó 'ñ 'ð
 €Kr*   c                ó0   € V ^8„  d   QhR\         R\        /# )r,   Úapt_src_contentr1   )r2   Úbool)r4   s   "r(   r5   r5   ³  s   € ÷ ñ ¬cð ´dñ r*   c                óè   € \         P                  ! RV \         P                  4      '       d   R# \         P                  ! RV \         P                  4      '       d   R# \        P	                  R4       R# )a+  Simple check for deb822 format for apt source content

Only validates that minimal required keys are present in the file, which
indicates we are likely deb822 format.

Doesn't handle if multiple sections all contain deb822 keys.

Return True if content looks like it is deb822 formatted APT source.
z^(deb |deb-src )Fz'^(Types: |Suites: |Components: |URIs: )Tzapt.sources_list value does not match either deb822 source keys or deb/deb-src list keys. Assuming APT deb/deb-src list format.)rV   rÈ   ÚMrQ   ry   )rñ   s   &r(   rá   rá   ³  sW   € ô 
‡z‚zÐ% ¼¿¹×=Ò=ÙÜ	‡z‚zØ2°OÄRÇTÁT÷ò ñ ä‡K�Kð	Hôñ r*   úDir::Etczetc/aptúDir::Etc::sourcelistúsources.listúDir::Etc::sourcepartszsources.list.dz@(Dir::Etc|Dir::Etc::sourceparts|Dir::Etc::sourcelist) \"([^\"]+)c                óF   € V ^8„  d   QhR\         \        \        3,          /# rÌ   )r   r2   )r4   s   "r(   r5   r5   ×  s   € ÷ 0ñ 0”Tœ#œs˜(•^ñ 0r*   c            
     ó@  €  ^ RI p V P                  4        V P                  P                  R\        R,          4      pV P                  P                  R\        R,          4      pV P                  P                  R\        R,          4      pRRT RT 2R	RT RT R2/#   \
         dõ     \        P                  ! RR.4      w  rEMW  \        P                   d@    \        R,          p\        R,          p\        R,          pRRT RT 2R	RT RT R2/u u # i ; i\        P                  ! \        T4      p\        T4      pTP                  R\        R,          4      pTP                  R\        R,          4      pTP                  R\        R,          4      p ELi ; i)
zîReturn a dict of applicable apt configuration or defaults.

Prefer python apt_pkg if present.
Fallback to apt-config dump command if present out output parsed
Fallback to DEFAULT_APT_CFG if apt-config command absent or
output unparsable.
Nrõ   rö   rø   z
apt-configÚdumpÚ
sourcelistr¢   Úsourceparts)Úapt_pkgÚinit_configÚconfigr:   ÚDEFAULT_APT_CFGÚImportErrorr	   ÚProcessExecutionErrorrV   rÈ   Ú
APT_CFG_REr<   )rþ   Úetcrü   rý   Úapt_dumpr£   Úmatched_cfgÚapt_cmd_configs           r(   Úget_apt_cfgr	  ×  s¢  € ð$
ó 	à×ÑÔØ�n‰n× Ñ  ¬_¸ZÕ-HÓIˆØ—^‘^×'Ñ'Ø"¤OÐ4JÕ$Kó
ˆ
ð —n‘n×(Ñ(Ø#¤_Ð5LÕ%Mó
ˆð2 	˜˜#˜˜a 
˜|Ð,Ø˜˜3˜%˜q  ¨QÐ/ðð øô+ ô 
ð
	ÜŸ)š) \°6Ð$:Ó;‰KˆH�aøÜ×)Ñ)ô 	ä! *Õ-ˆCÜ(Ð)?Õ@ˆJÜ)Ð*AÕBˆKà  #  a¨
 |Ð4Ø  3 % q¨¨°QÐ7ðô ð	úô —j’j¤¨XÓ6ˆÜ˜kÓ*ˆØ× Ñ  ¬_¸ZÕ-HÓIˆØ#×'Ñ'Ø"¤OÐ4JÕ$Kó
ˆ
ð %×(Ñ(Ø#¤_Ð5LÕ%Mó
‹ð%
ús8   ‚B	B ÂFÂ*CÃFÃADÄFÄDÄB FÆFc                ó˜  € \        4       pVR,          pVR,           VP                  P                   R2p\        P                  '       d   TpMTpRVRV/p	V	P                  V4       V F%  p
W*,          Wš&   W*,          WšP                  4       &   K'  	  V P                  RR4      pV'       g©   \        P                  R4       \        P                  '       d   R	MR
pVP                  RVP                  P                   V 24      pV'       g   VP                  R4      pV'       g   \        P                  RV4       R# \        P                  ! V4      p\        P                  ! W¹4      pV'       dI   \!        V4      '       d    W†8X  d   \        P#                  RV4       TpM\        P#                  RV4       Tp\%        V P                  R4      Wá4      p\        P&                  ! W�RR7       W‡8X  d×   \(        P*                  P-                  V4      '       d°   \.        P                  VP                  P                  4      pV'       dQ   V\        P                  ! V4      8w  d4   \        P                  RV4       \        P&                  ! V\0        4       R# R# \        P                  RV4       \        P2                  ! V4       R# R# R# )z†generate_sources_list
create a source.list file based on a custom or default template
by replacing mirrors and release in the templaterü   rý   z.sourcesrM   rI   Úsources_listNz1No custom template provided, fall back to builtinz.deb822rƒ   zsources.list.r÷   z#No template found, not rendering %szAProvided 'sources_list' user-data is deb822 format, writing to %szFProvided 'sources_list' user-data is not deb822 format, fallback to %srè   i¤  )Úmodez*Replacing %s to favor deb822 source formatz)Removing %s to favor deb822 source format)r	  Údistror-   r   ÚAPT_DEB822_SOURCE_LIST_FILEÚupdateÚlowerr:   rQ   ÚinfoÚget_template_filenamery   r   Úload_text_filer
   rÑ   rá   rR   rè   Ú
write_filerœ   r™   ÚexistsÚDEB822_ALLOWED_APT_SOURCES_LISTÚUBUNTU_DEFAULT_APT_SOURCES_LISTÚdel_file)r.   rg   rh   r/   rk   r@   Úapt_sources_listÚapt_sources_deb822Úaptsrc_filerl   ÚkÚtmplÚtmpl_fmtÚtemplate_fnÚrenderedrÔ   Úexpected_contents   &&&&&            r(   r\   r\   
  sI  € ô ‹m€GØ˜|Õ,ÐØ# MÕ2Ð3°E·L±L×4EÑ4EÐ3FÀhÐOÐÜ×+×+Ð+Ø(‰à&ˆà˜ *¨gÐ6€FØ
‡M�M�$ÔÛˆØ•Jˆ‰	Ø#�Jˆ�w‰w‹yÓñ ð �7‰7�> 4Ó(€DßÜ�‰ÐDÔEÜ (× D× DÐ D‘9È"ˆØ×1Ñ1Ø˜EŸL™L×-Ñ-Ð.¨x¨jÐ9ó
ˆ÷ Ø×5Ñ5°nÓEˆKßÜ�K‰KÐ=¸{ÔKÙÜ×"Ò" ;Ó/ˆä×&Ò& tÓ4€HßÜ# H×-Ò-ØÔ.Ü—	‘	ð%à&ôð
 1�øä�I‰Ið"à ôð
 +ˆKÜ˜cŸg™gÐ&6Ó7¸ÓK€HÜ‡O‚O�K°Õ6ØÔ(¬R¯W©W¯^©^Ð<L×-MÒ-MÜ:×>Ñ>Ø�L‰L×Ñó
Ð÷ Ø¤4×#6Ò#6Ð7GÓ#HÔHÜ—‘Ø@Ø$ôô —’Ø$Ô&Eöñ Iô �H‰HØ;Ð=Môô �MŠMÐ*Ö+ñ# .NÑ(r*   c                óê   € \         P                  RV 4        \        P                  ! V4      P                  p\        RW$WR7      #   \        P                   d    \         P                  R4       h i ; i)zA
actual adding of a key as defined in key argument
to the system
zAdding key:
'%s'rŒ   )Úoutput_filerp   Úhardenedz(failed to add apt GPG Key to apt keyring)	rQ   rR   ÚpathlibÚPathÚstemÚapt_keyr	   r  rc   )r�   rë   r   r$  r-   s   &&&& r(   Úadd_apt_key_rawr)  Q  sg   € ô
 ‡I�IÐ! 3Ô'ðÜ�|Š|˜IÓ&×+Ñ+ˆÜØ�3¨sô
ð 	
øô ×%Ñ%ô Ü�‰Ð@ÔAØðús   ˜-A Á,A2c                ó  € . p\        4       p\        P                  ! V P                  RR4      4      '       d^   R FW  pV P                  V4      '       g   K  W,           F/  pRR0P	                  V4      '       g   K  VP                  R4       K1  	  KY  	  V P                  R/ 4      pVP                  4        F^  pRR0P	                  V4      '       d   VP                  R4       V! VP                  RR4      4      '       g   KM  VP                  R	4       K`  	  V F=  p	\        P                  ! V	4      '       d   K!  VP                  \        V	,          4       K?  	  V'       d'   VP                  P                  \        V4      4       R
# R
# )a°  Install missing package dependencies based on apt_sources config.

Inspect the cloud config user-data provided. When user-data indicates
conditions where add_apt_key or add-apt-repository will be called,
ensure the required command dependencies are present installed.

Perform this inspection upfront because it is very expensive to call
distro.install_packages due to a preliminary 'apt update' called before
package installation.
rK   Fr�   Úkeyidr   rL   Úsourcerƒ   r   Nrì   )r‡   r   rZ   r:   rŽ   rŒ   ÚvaluesÚshutilrE   rw   ÚPACKAGE_DEPENDENCY_BY_COMMANDr  Úinstall_packagesr…   )
r.   rP   r/   Úmissing_packagesÚrequired_cmdsÚ
mirror_keyÚmirror_itemÚapt_sources_dictÚentÚcommands
   &&&       r(   rY   rY   a  s9  € ð #%ÐÜ#&£5€MÜ‡}‚}�S—W‘WÐ4°eÓ<×=Ò=Û1ˆJØ�w‰w�z×"Ô"ð $'§? ?�KØ˜wÐ'×4Ñ4°[×AÔAØ%×)Ñ)¨%Ö0ó $3ñ	 2ð —w‘w˜y¨"Ó-ÐØ×&Ñ&Ö(ˆØ�7Ð×(Ñ(¨×-Ò-Ø×Ñ˜eÔ$Ù˜Ÿ™ ¨2Ó.×/Ô/Ø×ÑÐ2Ö3ñ	 )ó
 !ˆÜ�|Š|˜G×$Ô$Ø×#Ñ#Ô$AÀ'Õ$JÖKñ !÷ Ø�‰×%Ñ%¤fÐ-=Ó&>Ö?ñ r*   c                óà   € RV 9   d:   RV 9  d3   \         pRV 9   d
   V R,          pVP                  V R,          V4      V R&   RV 9   d'   \        V R,          T;'       g
    V R,          W#R7      # R# )z‹
Add key to the system as defined in ent (if any).
Supports raw keys or keyid's
The latter will as a first step fetched to get the raw key
r+  r�   Ú	keyserverr¸   ©r$  N)ÚDEFAULT_KEYSERVERÚ
getkeybyidr)  )r6  r/   r   r$  rë   r9  s   &&&&& r(   rî   rî   ƒ  sq   € ð �#„~˜% sÔ*Ü%ˆ	Ø˜#ÔØ˜KÕ(ˆIà—^‘^ C¨¥L°)Ó<ˆˆE‰
à�„|ÜØ��J˜	×4Ð4 S¨¥_°cô
ð 	
ñ r*   c                óŠ  € Vf   / pVf   \        R4      h\        V \        4      '       g   \        RV ,          4      hV  EF‰  pW,          p\        P                  RV4       RV9  d   WVR&   RV9   d"   RVR,          9   d   \        WaVRR	7      pWsR
&   M\        WaV4       RV9  d   Kj  VR,          p\        P                  ! Wƒ4      pVR,          P                  R4      '       g+   \        P                  P                  RVR,          4      VR&   VR,          P                  R4      '       g   VR;;,          R,          uu&   V! V4      '       d    \        P                  ! RRV.4       EK/  \        P"                  ! VR,          R7      p	 RV,          p
RpRV9   d   VR,          '       g   Rp\$        P&                  ! WšVR7       EKŒ  	  VP*                  P-                  RR7       R#   \        P                   d    \        P!                  R4       h i ; i  \(         d   p\        P!                  RYœ4       h Rp?ii ; i)aŠ  
install keys and repo source .list files defined in 'sources'

for each 'source' entry in the config:
    1. expand template variables and write source .list file in
            /etc/apt/sources.list.d/
    2. install defined keys
    3. update packages via distro-specific method (i.e. apt-key update)


@param srcdict: a dict containing elements required
@param cloud: cloud instance object

Example srcdict value:
{
'rio-grande-repo': {
    'source': 'deb [signed-by=$KEY_FILE] $MIRROR $RELEASE main',
    'keyid': 'B59D 5F15 97A5 04B7 E230  6DCA 0620 BBCF 0368 3F77',
    'keyserver': 'pgp.mit.edu'
    }
}

Note: Deb822 format is not supported
Nz did not get a valid repo matcherzunknown apt format: %szadding source/key '%s'r¸   r,  z	$KEY_FILETr:  ÚKEY_FILEr¢   z/etc/apt/sources.list.d/z.listr   z--no-updatezadd-apt-repository failed.r˜   z%s
Úarw   Úw)Úomodezfailed write to file %s: %s)Úforce)r%   r;   r<   Ú	TypeErrorrQ   rR   rî   r
   rÑ   rŠ   rœ   r™   r„   rr   r	   r  rc   r›   r   r  ra   r  Úupdate_package_sources)Úsrcdictr/   r   rO   rP   r¸   r6  Úkey_filer,  ÚsourcefnÚcontentsrA  Údetails   &&&&&        r(   rd   rd   –  sü  € ð6 ÒØˆàÒÜÐ;Ó<Ð<ä�gœt×$Ò$ÜÐ0°GÕ<Ó=Ð=äˆØÕˆÜ�	‰	Ð*¨CÔ0Ø˜SÔ Ø&�
‰Oà�sŒ?˜{¨c°(­mÔ;Ü" 3¨s¸TÔBˆHØ*2˜JÒ'ä˜ CÔ(à˜3ÔÙØ�X•ˆÜ×(Ò(¨ÓAˆà�:�×)Ñ)¨#×.Ò.Ü Ÿg™gŸl™lØ*¨C°
­OóˆC�
‰Oð �:�×'Ñ'¨×0Ò0Ø�
�O˜wÕ&‹Oá˜× Ò ðÜ—	’	Ø)¨=¸&ÐAôò ä×#Ò#¨¨Z­Ô9ˆð
	Ø Õ(ˆHØˆEà˜3Œ s¨8§}¤}Ø�ä�OŠO˜H°e×<Ð<ñU ð^ 
‡L�L×'Ñ'¨dÐ'Ô3á
øô) ×-Ñ-ô Ü—‘Ð:Ô;Øðûô ô 	Ü�M‰MÐ7¸ÔJØûð	ús*   ÅG,Æ HÆ/HÇ,,HÈIÈ&H=È=Ic                óP  € / p\         P                  ! RRRR7       \        V \        4      '       dR   \        P                  R4       V  F4  pRV9  d   RVR&   \        P                  ! VR4      pM	VR,          pW!V&   K6  	  V# \        V \        4      '       d   T pV# \        R4      h)	z1convert v1 apt format to v2 (dict in apt_sources)zConfig key 'apt_sources'ú22.1zUse 'apt' instead)Ú
deprecatedÚdeprecated_versionÚextra_messagez9apt config: convert V1 to V2 format (source list to dict)r¸   zcloud_config_sources.listzunknown apt_sources format)
r   Ú	deprecater;   r3   rQ   rR   r   Úrand_dict_keyr<   r%   )ÚsrclistrE  Úsrcentr�   s   &   r(   Úconvert_v1_to_v2_apt_formatrS  î  s¯   € à€GÜ×ÒØ-Ø!Ø)õô
 �'œ4× Ò Ü�	‰	ÐMÔNÛˆFØ Ô'ð &A��zÑ"Ü×(Ò(¨Ð2MÓN‘ð ˜ZÕ(�Ø!�C‹Lñ ð €Nô 
�GœT×	"Ò	"Øˆð €Nô Ð5Ó6Ð6r*   c                ó\   € V P                  VR4      e   V P                  V4      W&   W R# R# )zeconvert an old key to the new one if the old one exists
returns true if a key was found and convertedNTF©r:   )ÚoldcfgÚaptcfgÚoldkeyÚnewkeys   &&&&r(   Úconvert_keyrZ  
  s0   € ð ‡z�z�&˜$ÓÒ+ØŸ™ FÓ+ˆ‰ØˆNÙÙr*   c                ó~   € . ROpRpRR./pV F  w  rV\        WWV4      '       g   K  RpK  	  V'       d	   V.VR&   R# R# )zBconvert old apt_mirror keys into the new more advanced mirror specFÚarchesÚdefaultTrí   N))Ú
apt_mirrorÚuri)Úapt_mirror_searchrX   )Úapt_mirror_search_dnsÚ
search_dns)rZ  )rV  rW  ÚkeymapÚ	convertedÚnewmcfgrX  rY  s   &&     r(   Úconvert_mirrorrf    sP   € ò€Fð
 €IØ˜)˜Ð%€GÛ ‰ˆÜ�v¨×7Ô7ØŠIñ !÷
 Ø$˜IˆˆyÓñ r*   c                óØ  € RRRRRRRRRRR	R
RRRRRRRRRR/p. pV F-  pW09   g   K  W,          R9   d   W K  VP                  V4       K/  	  V'       g   V # \        P                  ! RV 2RR7       V P                  RR4      pVez   \        P                  ! RRR7       V FY  pW,          pW,          pW Ve   VP                  VR4      f   K/  WdV,          8w  g   K>  \	        RV: RWE,          : RV: 24      h	  V # / pV F"  pW,          f   K  \        WW1V,          4       K$  	  \        W4       V F)  pV P                  VR4      f   K  \	        RV,          4      h	  WpR&   V # )z:convert old to new keys and adapt restructured mirror specÚapt_sourcesrL   r^  Nr`  ra  Ú	apt_proxyÚproxyÚapt_http_proxyÚ
http_proxyÚapt_ftp_proxyÚhttps_proxyÚapt_https_proxyÚ	ftp_proxyÚapt_preserve_sources_listrK   Úapt_custom_sources_listr  rJ   zThe following config key(s): rK  )rL  rM  r7   z0Support for combined old and new apt module keysz3Old and New apt format defined with unequal values z vs z @ z&old apt key '%s' left after conversion)Nrƒ   )rw   r   rO  r:   r%   rZ  rf  )rV  Ú
mapoldkeysÚneedtoconvertrX  Ú	newaptcfgrY  ÚverifyrW  s   &       r(   Úconvert_v2_to_v3_apt_formatrw  &  s£  € ð 	�yØ�dØ˜TØ Ø�WØ˜,Ø˜Ø˜;Ø#Ð%<Ø! >ØÐ2ð€Jð €MÛˆØÖØ�~ Ô+Ø’Nà×$Ñ$ VÖ,ñ ÷ ØˆÜ×ÒØ2°=°/ÐBØ!õð —
‘
˜5 $Ó'€IØÒÜ×ÒØIØ%õ	
ó $ˆFØÕ'ˆFØ•^ˆFØ�ØŠ~ §¡¨v°tÓ!<Ò!DáØ 6Õ*Ö*Ý ó ˜y×0Ð0²&ð:óð ñ $ð ˆð €Fó ˆØÕÔ)Ü˜¨¸6Õ0BÖCñ ô
 �6Ô"ãˆØ�:‰:�f˜dÓ#Ô/ÜÐEÈÕNÓOÐOñ ð
 ˆ5�MØ€Mr*   c                ód   € V P                  RR4      pVe   \        V4      V R&   \        V 4      p V # )z…convert the old list based format to the new dict based one. After that
convert the old dict keys/format to v3 a.k.a 'new apt config'rh  N)r:   rS  rw  )r.   rh  s   & r(   r9   r9   p  s:   € ð —'‘'˜-¨Ó.€KØÒÜ8¸ÓEˆˆMÑô & cÓ
*€Cà€Jr*   c                ó  € RpV '       dû   Rp. pVR8X  d   RpMVR8X  d   RpM\        R4      h\        P                  ! W#4      P                  pRP	                  VP                  R4      R	,          4      pV'       d   VP                  R
V,          4       VP                  R4       . p	VP                  P                  p
RV
: RV: R: RV
: 2pV F  pV	P                  W¼,          4       K  	  \        P                  ! V	4      pV# )z?
Try to resolve a list of predefines DNS names to pick mirrors
Nrƒ   rí   r§   r½   zsecurity-mirrorzunknown mirror typeÚ.rÎ   z.%szhttp://Ú-z%sr¢   )z.localdomainrƒ   )r%   r   Úget_hostname_fqdnÚfqdnr„   rÓ   rw   Úextendr  r-   Úsearch_for_mirror)Ú
configuredÚ
mirrortyper.   r/   r§   ÚmydomÚdomsÚ	mirrordnsr}  Úmirror_listr  Ú	mirrorfmtÚposts   &&&&         r(   Úsearch_for_mirror_dnsrˆ    sé   € ð €FçØˆØˆà˜Ô"Ø ‰IØ˜:Ô%Ø)‰IäÐ2Ó3Ð3ô ×%Ò% cÓ1×6Ñ6ˆØ—‘˜Ÿ™ C›¨Õ,Ó-ˆßØ�K‰K˜ �Ô&à�‰ðô	
ð ˆØ—‘×"Ñ"‰Û+1²9»dÂFÐKˆ	ÛˆDØ×Ñ˜yÕ1Ö2ñ ô ×'Ò'¨Ó4ˆà€Mr*   c                óÐ   € V e   Vf   T pRV RV/# VP                   P                  4       pV'       d+   VP                  4       pVR,          VR&   VR,          VR&   V# \        V4      # )zZsets security mirror to primary if not defined.
returns defaults if no mirrors are definedr   r   rí   r½   )Ú
datasourceÚget_package_mirror_infor"   r)   )ÚpmirrorÚsmirrorr'   r/   Úmirror_infoÚms   &&&&  r(   Úupdate_mirror_infor�  ¨  sx   € ð ÒØŠ?ØˆGØ˜7 J°Ð8Ð8ð ×"Ñ"×:Ñ:Ó<€Kßð ×ÑÓˆØ˜•|ˆˆ)‰Ø˜*�ˆˆ*‰àˆô ˜tÓ$Ð$r*   c                ó¬   € V P                  VR4      pVf   R# RpV F3  pVP                  R4      ;'       g    . pW&9   d   Vu # RV9   g   K1  TpK5  	  V# )zqout of a list of potential mirror configurations select
and return the one matching the architecture (or default)Nr\  r]  rU  )r.   r�  r'   Úmirror_cfg_listr]  Úmirror_cfg_elemr\  s   &&&    r(   Úget_arch_mirrorconfigr”  À  se   € ð —g‘g˜j¨$Ó/€OØÒÙð €GÛ*ˆØ ×$Ñ$ XÓ.×4Ð4°"ˆØŒ>Ø"Ò"Ø˜ÖØ%ŠGñ +ð €Nr*   c                óä   € \        WV4      pVf   R# VP                  RR4      pVf'   \        P                  ! VP                  RR4      4      pVf   \	        VP                  RR4      WV4      pV# )zŠpass the three potential stages of mirror specification
returns None is neither of them found anything otherwise the first
hit is returnedNr_  rX   rb  )r”  r:   r   r  rˆ  )r.   r�  r'   r/   Úmcfgr§   s   &&&&  r(   Ú
get_mirrorr—  Ó  sv   € ô ! °$Ó7€DØ‚|Ùð �X‰X�e˜TÓ"€Fð ‚~ä×'Ò'¨¯©°¸4Ó(@ÓAˆð ‚~ä&Ø�H‰H�\ 4Ó(¨*¸5ó
ˆð €Mr*   c                ó   € Vf,   \         P                  ! 4       p\        P                  RV4       \	        V RW!4      p\        P                  RV4       \	        V RW!4      p\        P                  RV4       \        W4W!4      pVR,          VR&   V# )a  find_apt_mirror_info
find an apt_mirror given the cfg provided.
It can check for separate config of primary and security mirrors
If only primary is given security is assumed to be equal to primary
If the generic apt_mirror is given that is defining for both
z!got arch for mirror selection: %srí   zgot primary mirror: %sr½   zgot security mirror: %sr   rN   )r   r   rQ   rR   r—  r�  )r.   r/   r'   rŒ  r�  rŽ  s   &&&   r(   rT   rT   í  sƒ   € ð ‚|Ü×)Ò)Ó+ˆÜ�	‰	Ð5°tÔ<Ü˜˜i¨Ó5€GÜ‡I�IÐ&¨Ô0Ü˜˜j¨$Ó6€GÜ‡I�IÐ'¨Ô1ä$ W°tÓC€Kð (¨	Õ2€K�ÑàÐr*   c                ó8  € RpV UUu. uF5  w  rEV P                  V4      '       g   K  WPP                  V4      ,          NK7  	  ppp\        V4      '       dE   \        P                  RV4       \        P
                  ! VRP                  V4      R,           4       MQ\        P                  P                  V4      '       d-   \        P                  ! V4       \        P                  RV4       V P                  RR4      '       d>   \        P                  RV4       \        P
                  ! W P                  R4      4       R# \        P                  P                  V4      '       d/   \        P                  ! V4       \        P                  RV4       R# R# u uppi )	z@apply_apt_config
Applies any apt*proxy config from if specified
zwrite apt proxy info to %sr�   z#no apt proxy configured, removed %sÚconfNzwrite apt config info to %sz$no apt config configured, removed %s))rj  úAcquire::http::Proxy "%s";)rl  r›  )rp  zAcquire::ftp::Proxy "%s";)rn  zAcquire::https::Proxy "%s";)r:   rx   rQ   rR   r   r  r„   rœ   r™   Úisfiler  )r.   Úproxy_fnameÚconfig_fnameÚcfgsr-   ÚfmtÚproxiess   &&&    r(   r^   r^     s  € ð
€Dñ 7;ÔL±d¡{¨¸c¿g¹gÀd¿mÔ"ˆs—W‘W˜T“]×"Ð"±d€GÑLÜ
ˆ7‡|‚|Ü�	‰	Ð.°Ô<Ü�Š˜ T§Y¡Y¨wÓ%7¸$Õ%>Õ?Ü	�‰�‰˜×	$Ò	$Ü�Š�kÔ"Ü�	‰	Ð7¸ÔEà
‡w�wˆv�t×ÒÜ�	‰	Ð/°Ô>Ü�Š˜§g¡g¨f£oÖ6Ü	�‰�‰˜×	%Ò	%Ü�Š�lÔ#Ü�	‰	Ð8¸,ÖGñ 
&ùó Ms
   ˆF¨Fc                ó�   aaaaa€ R oVVV3R lpVV3R lpV R8X  d	   V! V4      # V R8X  g   V R8X  d	   V! V4      # \        R4      h)aH  apt-key replacement

commands implemented: 'add', 'list', 'finger'

@param output_file: name of output gpg file (without .gpg or .asc)
@param data: key contents
@param human_output: list keys formatted for human parsing
@param hardened: write keys to to /etc/apt/cloud-init.gpg.d/ (referred to
with [signed-by] in sources file)
c                 ó*  € \         P                  P                  \        4      '       d   \        .M. p \         P                  ! \
        4       F8  pVP                  R4      '       g   K  V P                  \
        V,           4       K:  	  V '       d   V # R# )z®return all apt keys

/etc/apt/trusted.gpg (if it exists) and all keyfiles (and symlinks to
keyfiles) in /etc/apt/trusted.gpg.d/ are returned

based on apt-key implementation
rƒ   )z.gpgz.asc)rœ   r™   rœ  ÚAPT_LOCAL_KEYSÚlistdirÚAPT_TRUSTED_GPG_DIRrr   rw   )Ú	key_filesÚfiles     r(   Ú_get_key_filesÚapt_key.<locals>._get_key_files4  sg   € ô )+¯©¯©´~×(FÒ(F”^Ñ$ÈBˆ	ä—J’JÔ2Ö3ˆDØ�}‰}Ð-×.Ô.Ø× Ñ Ô!4°tÕ!;Ö<ñ 4÷ &ˆyÐ-¨2Ð-r*   c                ó
  <€ RpS'       g-   \         P                  ! \        RP                  S4      4       V#  S'       d   \        M\
        pV P                  S4      pRP                  VS4      p\         P                  ! W4       V#   \        P                   d/    \         P                  ! \        RP                  S4      4        T# \         d/    \         P                  ! \        RP                  S4      4        T# i ; i)zYapt-key add <file>

returns filepath to new keyring, or '/dev/null' when an error occurs
z	/dev/nullz)Unknown filename, failed to add key: "{}"z{}{}.gpgz Gpg error, failed to add key: {}z#Decode error, failed to add key: {})r   ÚlogexcrQ   r4   ÚCLOUD_INIT_GPG_DIRr¦  Údearmorr  r	   r  ÚUnicodeDecodeError)rA   rë   Úkey_dirÚstdoutrp   r$  r#  s   &   €€€r(   Úapt_key_addÚapt_key.<locals>.apt_key_addC  sè   ø€ ð
  ˆ	ßÜ�KŠKÜÐ@×GÑGÈÓMôð& Ððç*2Õ&Ô8Kð ð %×,Ñ,¨TÓ2�Ø&×-Ñ-¨g°{ÓC�	Ü—’ 	Ô2ð Ðøô ×-Ñ-ô Ü—’ÜÐ;×BÑBÀ4ÓHõð Ðô	 &ô Ü—’ÜÐ>×EÑEÀdÓKõð Ðð	ús$   ¹B ÁAB Â?DÃ
DÃ+DÄDc                óþ   <€ . pS! 4        F&  p VP                  V P                  VSR7      4       K(  	  RP                  V4      #   \        P                   d"   p\        P                  RY#4        Rp?Kl  Rp?ii ; i)zgapt-key list

returns string of all trusted keys (in /etc/apt/trusted.gpg and
/etc/apt/trusted.gpg.d/)
)Úhuman_outputzFailed to list key "%s": %sNr�   )rw   Ú	list_keysr	   r  rQ   ry   r„   )rA   Úkey_listrF  Úerrorr©  rµ  s   &   €€r(   Úapt_key_listÚapt_key.<locals>.apt_key_list_  sy   ø€ ð ˆÙ&Ö(ˆHðLØ—‘Ø×)Ñ)¨(ÀÐ)ÓNöñ )ð �y‰y˜Ó"Ð"øô ×-Ñ-ô LÜ—‘Ð9¸8×KÒKûðLús   �"AÁA<ÁA7Á7A<rŒ   Úfingerr3   z@apt_key() commands add, list, and finger are currently supported)r%   )	r7  r   r#  rp   r$  rµ  r²  r¹  r©  s	   &&ffff  @r(   r(  r(  !  sQ   ü€ ò&.÷ö8#ð  �%ÔÙ˜3ÓÐØ	�HÔ	 ¨6Ô 1Ù˜CÓ Ð äØNó
ð 	
r*   z
cloud-initc                óŠ   € V ^8„  d   Qh/ ^ \         9   d   \        \        \        3,          ;R&   ^\         9   d
   \        ;R&   # )r,   r/  Úmeta)Ú__conditional_annotations__r   r2   r   )r4   s   "r(   r5   r5   	   s?   € × 0Ñ 0÷8ò œw¤s¬C xÕ0ñ ñ9 1÷Bò „jñ òC 1r*   )r   Údebianzraspberry-pi-os)Ús390xÚarm64ÚarmhfÚpowerpcÚppc64elÚriscv64)N)F)FN)NN)NNFT)Yr¾  Ú__doc__rš   Úloggingrœ   r%  rV   r.  Útextwrapr   Útypingr   r   r   r   Ú	cloudinitr   r   r	   r
   r   Úcloudinit.cloudr   Úcloudinit.configr   Úcloudinit.config.schemar   Úcloudinit.gpgr   Úcloudinit.settingsr   Ú	getLoggerÚ__name__rQ   rU   r¤  r¦  r­  rÉ   r/  r½  r­   r`   r_   r;  r!   r$   r    r#   r  r  r)   rB   rG   r?   rt   r~   r>   r    rª   r]   rÃ   rÊ   rÜ   rè   r[   rá   r  r  r	  r\   r)  rY   rî   rd   rS  rZ  rf  rw  r9   rˆ  r�  r”  r—  rT   r^   r(  rv   r5   )r¾  s   @r(   Ú<module>rÒ     s  øðö 1ã Û Û 	Û Û 	Û Ý ß 0Ó 0ç @Õ @Ý !Ý #Ý .Ý Ý +à×Ò˜Ó!€ð #Ð à'€Ø/Ð Ø1Ð ØGÐ ð Ð6Ø	ˆ7ð4Ð ó ð 	Ð
ØÒ6Ø�Ø˜rð	€ó ð !€	ð :€Ø:€ð +Ð ð Ð2ØÐ4ðÐ ð
 Ð5ØÐ6ð€ð ˜6Ð"€ÚK€ð#Ð ð $,Ð-LÐ"MÐ ôCõ/ò&%ò+
ò\ò
ò@ $òFòò$Iò2õ$õ ,õ^%õPõð4 �	Ø˜NØÐ-ð€ð Hð õ
0òfD,ôNò @ôD
ô&Uòpò8ò&ò$GòTò&òR%ò0ò&ô4ò0Hô8U
ðr Ð"ð‚r*   