HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/relenv/build/__pycache__/linux.cpython-310.pyc
o

;j�r�	@s�dZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddl
mZddlmZddlmZmZmZmZdd	lmZmZmZmZmZmZmZmZeeZeeefZ d
Z!d~dd�Z"ddd�Z#ddd�Z$ddd�Z%ddd�Z&ddd�Z'ddd �Z(dd!d"�Z)dd#d$�Z*dd%d&�Z+d�d'd(�Z,dd)d*�Z-ej.d+e"d,�Z/ed-d+�Z0e0r�e0d.Z1e0d/Z2e0d0Z3nd1Z1d2Z2d3Z3e/j.d-ee2e1e3d4�d5�e/j.d6d-ged7d8d9d4�d:�ed;d+�Z4e4r�e4d.Z5e4d/Z6e4d0Z7nd<Z5d=Z6d>Z7e/j.d;e6e5e7d4�d?�ed@d+�Z8e8�re8d.Z9e8d/Z:e8d0Z;ndAZ9dBZ:dCZ;e/j.dDe:e9e;d4�d?�edEd+�Z<e<�r=e<d/Z=e<d0Z>e<�?dFdG�Z@ndGZ@dHZ=dIZ>e/j.dJee=e@e>d4�dK�edLd+�ZAeA�rdeAd.ZBeAd/ZCeAd0ZDndMZBdNZCdOZDe/j.dLe#eCeBeDd4�dK�edPd+�ZEeE�r�eEd.ZFeEd/ZGeEd0ZHndQZFdRZGdSZHe/j.dPe%eGeFeHd4�dK�edTd+�ZIeI�r�eId.ZJeId/ZKeId0ZLndUZJdVZKdWZLe/j.dTe&eKeJeLd4�dK�edXd+�ZMeM�r�eMd.ZNeMd/ZOeMd0ZPndYZNdZZOd[ZPe/j.dXe(eOeNePd4�d?�ed\d+�ZQeQ�reQd.ZReQd/ZSeQd0ZTnd]ZRd^ZSd_ZTe/j.d\e)eSeReTd4�d?�ed`d+�ZUeU�r'eUd.ZVeUd/ZWeUd0ZXndaZVdbZWdcZXe/j.d`eWeVeXd4�d?�eddd+�ZYeY�rMeYd.ZZeYd/Z[eYd0Z\ndeZZdfZ[dgZ\e/j.dde+d-ge[e[�]dhdi�eZe\dj�dk�edld+�Z^e^�r{e^d.Z_e^d/Z`e^d0ZandmZ_dnZ`doZae/j.dle'dTge`e_ead4�dk�edpd+�Zbeb�r�ebd.Zcebd/Zdebd0ZendqZcdrZddsZee/j.dpe*edeceed4�d5�edtd+�Zfef�r�efd.Zgefd/Zhefd0ZinduZgdvZhdwZie/j.dtddgehegeid4�dx�e/j.dye-gdz�d{e/jjdd4�dk�e/j.d|edyd6gd}�dS)�z
The linux build process.
�)�annotationsN)�MutableMapping)�IO�)�LINUX�Version�arches�runcmd�)�Dirs�
build_openssl�build_openssl_fips�build_sqlite�builds�finalize�get_dependency_version�update_sbom_checksumsa,--- ./setup.py
+++ ./setup.py
@@ -664,6 +664,7 @@
             self.failed.append(ext.name)

     def add_multiarch_paths(self):
+        return
         # Debian/Ubuntu multiarch support.
         # https://wiki.ubuntu.com/MultiarchSpec
         tmpfile = os.path.join(self.build_temp, 'multiarch')
�env�
EnvMapping�dirsr�return�Nonec	CsD|j�d|d�d�|d<|j�d|d�d�|d<|j�d|j�d|d��|d<d	d
|j�d�d|j�d�d|j�d
|d�d�g}d�|�|d<dd|j�d�d|j�d�d|j�d�d|j�d
|d�d�g}d�|�|d<d|j�d�d|j�d�d|j�d�d|j�d
|d�d�g}d�|�|d<|j�d�|d<dS)z�
    Make sure we have the correct environment variables set.

    :param env: The environment dictionary
    :type env: dict
    :param dirs: The working directories
    :type dirs: ``relenv.build.common.Dirs``
    z/bin/�RELENV_HOSTz-gcc�CCz-g++�CXXz/bin/:�PATHz-Wl,--build-id=sha1�-Wl,--rpath=�/lib�-L�/z/sysroot/lib� �LDFLAGSz-g�-Iz/includez/include/readlinez/include/ncurseswz/sysroot/usr/include�CFLAGS�CPPFLAGS�/lib/pkgconfigZPKG_CONFIG_PATHN)�	toolchain�prefix�join)rrZldflagsZcflagsZcpplags�r)�F/opt/saltstack/salt/lib/python3.10/site-packages/relenv/build/linux.py�populate_env4s.
 ���r+�logfp�IO[str]cCs�tddd|j��d|d��dd|d��d	d
|d��dg	|||d
�tdddd|d��d|d��d	d
|d��g|||d
�t�dtj�|jd��dS)z�
    Build bzip2.

    :param env: The environment dictionary
    :type env: dict
    :param dirs: The working directories
    :type dirs: ``relenv.build.common.Dirs``
    :param logfp: A handle for the log file
    :type logfp: file
    �make�-j8�PREFIX=zLDFLAGS=r!zCFLAGS=-fPIC�CC=rzBUILD=x86_64-linux-gnuzHOST=r�install�r�stderr�stdoutz-fzMakefile-libbz2_sozlibbz2.so.1.0.8�libN)r	r'�shutil�copy2�os�pathr(�rrr,r)r)r*�build_bzip2_s:
���	�r<cCs`tdd|j��d|d��d|d��g|||d�tdd	g|||d�tdd
g|||d�dS)z�
    Build libxcrypt.

    :param env: The environment dictionary
    :type env: dict
    :param dirs: The working directories
    :type dirs: ``relenv.build.common.Dirs``
    :param logfp: A handle for the log file
    :type logfp: file
    �./configure�	--prefix=�--build=�RELENV_BUILD�--host=rr3r.r/r2N�r	r'r;r)r)r*�build_libxcrypt�s
��rCcCsbtdd|j��dd|d��d|d��g|||d�td	d
g|||d�td	dg|||d�dS)
z�
    Build gdbm.

    :param env: The environment dictionary
    :type env: dict
    :param dirs: The working directories
    :type dirs: ``relenv.build.common.Dirs``
    :param logfp: A handle for the log file
    :type logfp: file
    r=r>z--enable-libgdbm-compatr?r@rArr3r.r/r2NrBr;r)r)r*�
build_gdbm�s
��rDcCst�|j�d}|ddks|ddkr6t�|j�tt|�g||d�tgd�||d�tgd�||d�t�|j�tt|�dd	d
ddd
ddddd|j�d�dd|d��d|d��g|||d�tddg|||d�tt�|j�dd�}tdd|j��d|��d g|||d�d!S)"z�
    Build ncurses.

    :param env: The environment dictionary
    :type env: dict
    :param dirs: The working directories
    :type dirs: ``relenv.build.common.Dirs``
    :param logfp: A handle for the log file
    :type logfp: file
    �	configure�RELENV_BUILD_ARCH�aarch64�RELENV_HOST_ARCH�r4r5)r.�-C�include)r.rJ�progs�ticz
--prefix=/z
--with-sharedz--enable-termcapz--with-termlibz--without-cxx-sharedz--without-staticz
--without-cxxz--enable-widecz--without-normalz--disable-strippingz--with-pkg-config=r%z--enable-pc-filesr?r@rArr3r.r/rLrMzDESTDIR=z	TIC_PATH=r2N)	�pathlib�Path�sourcer9�chdir�tmpbuildr	�strr')rrr,rEZticdirr)r)r*�
build_ncurses�sP��
�
�rTcCs�|d�d�|d<dd|j��g}|d�d�dkr*|d|d	��d
|d��g7}t||||d�tdd
g|||d�tddg|||d�dS)z�
    Build readline library.

    :param env: The environment dictionary
    :type env: dict
    :param dirs: The working directories
    :type dirs: ``relenv.build.common.Dirs``
    :param logfp: A handle for the log file
    :type logfp: file
    r!z	 -ltinfowr=r>r�linux���r?r@rAr3r.r/r2N)r'�findr	)rrr,�cmdr)r)r*�build_readline�s
��rYcCsvtdd|j��dd|d��d|d��g|||d�tgd	�|||d�td
dg|||d�td
dg|||d�d
S)z�
    Build libffi.

    :param env: The environment dictionary
    :type env: dict
    :param dirs: The working directories
    :type dirs: ``relenv.build.common.Dirs``
    :param logfp: A handle for the log file
    :type logfp: file
    r=r>z--disable-multi-os-directoryr?r@rArr3)�sed�-iz
s/lib64/lib/gZMakefiler.r/r2NrBr;r)r)r*�build_libffis
��
r\cCshd|d��|d<tdd|j��d|j�d�dg|||d�tgd	�|||d�td
dg|||d�dS)
z�
    Build zlib.

    :param env: The environment dictionary
    :type env: dict
    :param dirs: The working directories
    :type dirs: ``relenv.build.common.Dirs``
    :param logfp: A handle for the log file
    :type logfp: file
    z-fPIC r#r=r>z	--libdir=rz--sharedr3)r.z-no-pier/r.r2NrBr;r)r)r*�
build_zlib3s
��r]c
Cs�t�t�|j�d�tddd|j��d|d��d|d�d	�d
|d�d�dg|||d
�tdddddd|j��d|d��g|||d
�dS)z�
    Build zstd.

    :param env: The environment dictionary
    :type env: dict
    :param dirs: The working directories
    :type dirs: ``relenv.build.common.Dirs``
    :param logfp: A handle for the log file
    :type logfp: file
    r6r.r/r0r1rzCFLAGS=r#z -fPIC -pthreadzLDFLAGS_DYNLIB=r!z	 -pthreadr3zinstall-staticzinstall-sharedz
install-pczinstall-includesN)r9rQrNrOrPr	r'r;r)r)r*�
build_zstdNs6
�	�
�	
�r^c	Cs�|d|dkrd|d<d|d<d|d<t�|jd�tgd	�||d
�tdd|j��d
dd|d��d|d��g|||d�tddg|||d�tddg|||d�dS)z�
    Build kerberos.

    :param env: The environment dictionary
    :type env: dict
    :param dirs: The working directories
    :type dirs: ``relenv.build.common.Dirs``
    :param logfp: A handle for the log file
    :type logfp: file
    rFrHzyes,yesZ#krb5_cv_attr_constructor_destructorZyesZac_cv_func_regcompZac_cv_printf_positional�src)rZr[zs/ kadmin / /gzMakefile.inrIr=r>z--without-system-vertoz--without-libeditr?r@rArr3r.r/r2N)r9rQrPr	r'r;r)r)r*�	build_krb|s(
��
r`cCstdd�}|s	dS|d}|�dd�}d|�d|�d	�}t�|j�d
d}|��s,dSt�|j�}|d|�d	�}tj�	|t
|��t�|��}	|	j
t
|�d�Wd�n1s[wY|d|��d
}
g}dD]+}t�t
|
|��D]}
|t�|
�j}|��r�|��t�|
t
|��|�|�qxqmt��}|D]
}t�|||f�q�|d}|��r�tt
|�d��0}|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�Wd�n1s�wYi}|D]}d|j��}|||<q�t|j|�dS)z�
    Update the bundled expat library to the latest version.

    Python ships with an older bundled expat. This function updates it
    to the latest version for security and bug fixes.
    ZexpatrUN�version�.�_z9https://github.com/libexpat/libexpat/releases/download/R_z/expat-z.tar.xzZModuleszexpat-)r:r6)z*.hz*.cz
xmlparse.c�az>
/* Relenv: include new entropy sources for expat >= 2.8.0 */
z6#if defined(_WIN32)
#include "random_rand_s.c"
#endif
zC#if defined(HAVE_GETENTROPY)
#include "random_getentropy.c"
#endif
z?#if defined(HAVE_GETRANDOM) || defined(HAVE_SYSCALL_GETRANDOM)
z%#include "random_getrandom.c"
#endif
zK#if defined(HAVE_ARC4RANDOM_BUF)
#include "random_arc4random_buf.c"
#endif
zC#if defined(HAVE_ARC4RANDOM)
#include "random_arc4random.c"
#endif
zX#if !defined(_WIN32) && defined(XML_DEV_URANDOM)
#include "random_dev_urandom.c"
#endif
zModules/expat/)r�replacerNrOrP�existsrR�urllib�requestZurlretrieverS�tarfile�open�
extractall�glob�name�unlinkr7r8�append�timer9�utime�writer)rrZ
expat_inforaZversion_tag�urlZ	expat_dirrRZtarball_path�tarZexpat_source_dirZ
updated_filesZsource_fileZ	file_pathZtarget_file�nowZ
xmlparse_c�fZfiles_to_updateZ
relative_pathr)r)r*�update_expat�sZ
��







�
rwcCsFt||�d|j�d�}||dvr|�d|d��|d<tgd��tgd��t�d���r]tjdd	d
��}|�t	�|�
�tddd
|jg|||d�Wd�n1sXwYd|j�d�|d<d|j�d�|d<d|d��|d<tgd��t�
|d�t�
d�kr�tgd��tgd��nd|d<d|d<d d!d"|j��d#|j��d$d%d&|d'��d(|d)��d*d+d,d-d.d/g}|d0|d1kr�|d2|d3��g7}|d4d5g7}t||||d�td6d7��}|�d8tj�|�d9�Wd�n1s�wYd:D]}|�|��qtd;d<g|||d�td;d=g|||d�dS)>a
    Run the commands to build Python.

    :param env: The environment dictionary
    :type env: dict
    :param dirs: The working directories
    :type dirs: ``relenv.build.common.Dirs``
    :param logfp: A handle for the log file
    :type logfp: file
    rrr!r )rZr[z:s/ac_cv_buggy_getaddrinfo=yes/ac_cv_buggy_getaddrinfo=no/grE)rZr[zls/ac_cv_enable_implicit_function_declaration_error=yes/ac_cv_enable_implicit_function_declaration_error=no/grEzsetup.py�wZ_patch)�mode�suffixZpatchz-p0r[r3Nr"z /include  -Wno-coverage-mismatchZOPENSSL_CFLAGSrZOPENSSL_LDFLAGSz-Wno-coverage-mismatch r#)rZr[zUs/#readline readline.c -lreadline -ltermcap/readline readline.c -lreadline -ltinfow/g�
Modules/SetupZRELENV_PY_MAJOR_VERSIONz3.10)rZr[zgs/#_curses -lncurses -lncursesw -ltermcap _cursesmodule.c/_curses -lncursesw -ltinfow _cursesmodule.c/gr{)rZr[zfs/#_curses_panel _curses_panel.c -lpanel -lncurses/_curses_panel _curses_panel.c -lpanelw -lncursesw/gr{z-lncursesw -ltinfowZCURSES_LIBSz-lpanelwZ
PANEL_LIBSr=z-vr>z--with-openssl=z--enable-optimizationsz--with-ensurepip=nor?r@rArz--disable-test-modulesz!--with-ssl-default-suites=opensslz7--with-builtin-hashlib-hashes=blake2,md5,sha1,sha2,sha3z--with-readline=readlinez--with-pkg-config=yesz--with-zstd=yesrHrFz--with-build-python=ZRELENV_NATIVE_PYzac_cv_file__dev_ptmx=yeszac_cv_file__dev_ptc=nor{za+rz*disabled*
_tkinter
nsl
nis
)r!r#r$rrr.r/r2)rwr'r	rNrOrf�tempfileZNamedTemporaryFilerr�PATCH�flushrmr�parse_stringrj�seek�io�SEEK_END�pop)rrr,Z	ldflagoptZp_filerX�fprcr)r)r*�build_python�s�
��
��
���

����r�rU)r+�opensslrars�sha256z3.5.4z_https://github.com/openssl/openssl/releases/download/openssl-{version}/openssl-{version}.tar.gzZ(b75daac8e10f189abe28a076ba5905d363e4801f)rsra�checksum)�
build_func�downloadzopenssl-fips-modulez7https://www.openssl.org/source/openssl-{version}.tar.gzz3.1.2Z(206036c21264e53f0196f715d81d905742e6245b)�wait_onr�r��	libxcryptz4.4.38z]https://github.com/besser82/libxcrypt/releases/download/v{version}/libxcrypt-{version}.tar.xzZ(9aa2fa261be6144af492e9b6bfd03bfaa47f7159)r��xzz5.8.1z)http://tukaani.org/xz/xz-{version}.tar.gzZ(ed4d5589c4cfe84e1697bd02a9954b76af336931�XZZsqliteZ
sqliteversionZ3500400z8https://sqlite.org/2025/sqlite-autoconf-{version}.tar.gzZ(145048005c777796dd8494aa1cfed304e8c34283�SQLite)rmr�r��bzip2z1.0.8z7https://sourceware.org/pub/bzip2/bzip2-{version}.tar.gzZ(bf7badf7e248e0ecf465d33c2f5aeec774209227�gdbmz1.26z?https://mirrors.ocf.berkeley.edu/gnu/gdbm/gdbm-{version}.tar.gzZ(6cee3657de948e691e8df26509157be950cef4d4�ncursesz6.5zEhttps://mirrors.ocf.berkeley.edu/gnu/ncurses/ncurses-{version}.tar.gzZ(cde3024ac3f9ef21eaed6f001476ea8fffcaa381�libffiz3.5.2zUhttps://github.com/libffi/libffi/releases/download/v{version}/libffi-{version}.tar.gzZ(2bd35b135b0eeb5c631e02422c9dbe786ddb626a�zlibz1.3.1z.https://zlib.net/fossils/zlib-{version}.tar.gzZ(f535367b1a11e2f9ac3bec723fb007fbc0d189e5�uuidz1.0.3zGhttps://sourceforge.net/projects/libuuid/files/libuuid-{version}.tar.gzZ(46eaedb875ae6e63677b51ec583656199241d597�krb5z1.22z>https://kerberos.org/dist/krb5/{version}/krb5-{version}.tar.gzZ(3ad930ab036a8dc3678356fbb9de9246567e7984zhttps://kerberos.org/dist/z"https://web.mit.edu/kerberos/dist/)rsZfallback_urlrar�)r�r�r��readlinez8.3zGhttps://mirrors.ocf.berkeley.edu/gnu/readline/readline-{version}.tar.gzZ(2c05ae9350b695f69d70b47f17f092611de2081f�zstdz1.5.7zShttps://github.com/facebook/zstd/releases/download/v{version}/zstd-{version}.tar.gzZ@eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3�tirpcz1.3.4zJhttps://sourceforge.net/projects/libtirpc/files/libtirpc-{version}.tar.bz2Z(63c800f81f823254d2706637bab551dec176b99b)r�r��python)r�r�r�r�r�r�r�r�r�r�r�r�r�r�zChttps://www.python.org/ftp/python/{version}/Python-{version}.tar.xzzrelenv-finalize)r�r�)rrrrrr)rrrrr,r-rr)rrrrrr)k�__doc__�
__future__rrlr�r9rNr7rir|rp�urllib.requestrg�collections.abcr�typingr�commonrrrr	rrr
rrrrrZARCHESrSrr}r+r<rCrDrTrYr\r]r^r`rwr��add�buildZopenssl_infoZopenssl_versionZopenssl_urlZopenssl_checksumZlibxcrypt_infoZlibxcrypt_versionZ
libxcrypt_urlZlibxcrypt_checksumZxz_infoZ
xz_versionZxz_urlZxz_checksumZsqlite_infoZ
sqlite_urlZsqlite_checksum�getZsqlite_version_numZ
bzip2_infoZ
bzip2_versionZ	bzip2_urlZbzip2_checksumZ	gdbm_infoZgdbm_versionZgdbm_urlZ
gdbm_checksumZncurses_infoZncurses_versionZncurses_urlZncurses_checksumZlibffi_infoZlibffi_versionZ
libffi_urlZlibffi_checksumZ	zlib_infoZzlib_versionZzlib_urlZ
zlib_checksumZ	uuid_infoZuuid_verZuuid_urlZ
uuid_checksumZ	krb5_infoZkrb5_versionZkrb5_urlZ
krb5_checksumreZ
readline_infoZreadline_versionZreadline_urlZreadline_checksumZ	zstd_infoZzstd_versionZzstd_urlZ
zstd_checksumZ
tirpc_infoZ
tirpc_versionZ	tirpc_urlZtirpc_checksumrar)r)r)r*�<module>s:(

+
,


;



.
%
I

����


��


��

��

��

��

��

��

��

��


���

��

��

���
���
�