Repository navigation
Conversation
|
@theforeman/packaging |
|
The remaining EL9 RPM failure occurs during dependency resolution: DNF rejects ruby-default-gems and ruby-bundled-gems providers due to modular filtering, before building Foreman. EL10 RPM CI passed. The EL9 package/module selection still needs investigation; I have not removed the explicit syslog dependency to hide that failure. |
Declare syslog for Ruby 3.4 and later, while older versions retain their standard-library copy without generating unavailable EL9 RPM requirements. Load it explicitly before the logging gem and cover standalone loading. AI assistance: Codex. Project signature: GPT_5.6 Sol.
dc8bf64 to
7de3308
Compare
|
Fixed the EL9 RPM dependency failure in 7de3308 and rebased onto current develop. The syslog gem is now declared only for Ruby 3.4 and later; earlier Ruby versions keep their standard-library copy, avoiding providers from inactive Ruby streams. The explicit require and standalone logging regression remain. Bundler evaluation of the actual Gemfile passed for eight simulated version values, along with syntax/diff checks. This was dependency-declaration validation, not eight runtime tests. The PR still contains one commit; fresh application and RPM CI is pending. |
What
Declare
syslogas a direct dependency on Ruby 3.4 and later, and load it explicitly before Foreman's logging library on every supported Ruby version. Earlier Ruby versions keep using their standard-library copy. Add a subprocess regression test that loadsforeman/loggingwithout Rails initialization and checks that the required syslog facility constant is available.Why
Ruby 3.4 moved
syslogfrom a default gem to a bundled gem, which must be declared when used with Bundler (Ruby release notes). Foreman usesSyslog::Constantswhen constructing its root logger but previously relied on the standard-library/transitive dependency being available.With Ruby 4.0.7 the application currently fails with
NameError: uninitialized constant Syslog. This also affects file/stdout logging because the facility constant is resolved before selecting an appender. The change keeps existing logging behavior rather than silently disabling a backend.Reproduction: https://github.com/jakduch/foreman/actions/runs/38784634977/job/116593360504
Testing
Earlier diagnostic revision:
dc8bf64.The diagnostic jobs additionally include the independent PostgreSQL CI client fix (#39911), and the Ruby 4 job uses the proposed ldap_fluff and safemode changes to get through dependency resolution. Those overrides are confined to the fork's investigation workflow and are not part of this PR. This fixes one concrete startup blocker, not the complete Ruby 4 migration or package qualification.
Issue: https://projects.theforeman.org/issues/39912
Related tracking: https://projects.theforeman.org/issues/39910
EL9 build compatibility follow-up
The previous EL9 RPM build used Ruby 3.0. The unconditional Gemfile entry generated a
rubygem(syslog)build requirement, whose available providers belonged to inactive Ruby streams. The dependency is now conditional on Ruby 3.4 and later; the explicitrequireand subprocess logging regression remain. The single commit is rebased onto currentdevelop.Locally, Bundler evaluated the actual Gemfile under eight simulated Ruby version values: 3.0.7, 3.1.7, 3.2.0, 3.3.12, 3.4.0, 3.5.0, 3.10.0 and 4.0.7. The syslog gem dependency was absent before 3.4 and present from 3.4 onward. This checks dependency declaration, not execution on eight Ruby runtimes. Three Ruby syntax checks and
git diff --checkalso passed. Full application and RPM validation is left to the fresh CI run.AI assistance: Codex. Project signature: GPT_5.6 Sol.