<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>60384</bug_id>
          
          <creation_ts>2026-09-03 13:53:32 +0300</creation_ts>
          <short_desc>enc.rb использует удалённый метод File.exists?</short_desc>
          <delta_ts>2026-09-03 13:53:32 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>puppet-theforeman-puppetserver-foreman</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Vladislav Glinkin">glinkinvd</reporter>
          <assigned_to name="majioa@altlinux.org">majioa</assigned_to>
          <cc>admsasha</cc>
    
    <cc>cas</cc>
    
    <cc>majioa</cc>
    
    <cc>mike</cc>
    
    <cc>nbr</cc>
    
    <cc>pav</cc>
    
    <cc>placeholder</cc>
    
    <cc>rider</cc>
    
    <cc>thatman</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>294959</commentid>
    <comment_count>0</comment_count>
    <who name="Vladislav Glinkin">glinkinvd</who>
    <bug_when>2026-09-03 13:53:32 +0300</bug_when>
    <thetext>Пакет: puppet-theforeman-puppetserver-foreman-2.2.0-alt2

---
Описание:
Поставляемый ENC-скрипт использует:
`File.exists?(...)`

В используемой версии Ruby этот alias уже отсутствует, поэтому ENC сразу завершается:
`undefined method `exists?&apos; for class File`

После этой ошибки Puppet Server не может использовать Foreman как ENC.

---
Предусловия:
Настроенный Puppet + PuppetServer + Foreman
В /etc/puppet/puppet.conf используется настройки:
```
    external_nodes = /usr/lib/puppet-modules/theforeman-puppetserver-foreman/files/enc.rb
    node_terminus = exec
```

Шаги воспроизведения:
# /usr/lib/puppet-modules/theforeman-puppetserver-foreman/files/enc.rb $(hostname -f)

---
Фактический результат:
Ошибка `undefined method &apos;exists?&apos; for class File` и ненулевой exit code.

---
Предлагаемое исправление:
Заменить во всём enc.rb:
`File.exists?`

на:
`File.exist?`

Минимальная исправляющая команда:
# sed -i &apos;s/File\.exists?/File.exist?/g&apos; \
/usr/lib/puppet-modules/theforeman-puppetserver-foreman/files/enc.rb

После этой замены ENC начинает выполняться дальше, то есть дефект воспроизводимо устранён.

---
Дополнительная информация:
Сам по себе пакета в нашем репозитории устарел. Upstream предлагает версию 4.3.0
https://github.com/theforeman/puppet-puppetserver_foreman/tags

Быть может, проблема решится простым обновлением пакета.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>