Skip to content

Conversation

@ekohl
Copy link
Member

@ekohl ekohl commented Dec 19, 2025

This includes:

Currently known failing packages when building ruby_core_packages_tier1:

  • rubygem-safemode incompatible with Ruby >= 3.2. This is maintained by Foreman and needs work (Ruby 3.4 compatibility safemode#54). Currently hacked around
  • rubygem-sqlite3 fails to compile on EL10. We're on 1.4.4 which is 3 years old. Might be sufficient to upgrade to 3.x

Currently known failing packages when building ruby_core_packages_tier2:

What does work:

  • rails_core_packages
  • hammer_core_packages
  • other_core_packages

What doesn't work:

  • foreman_nodejs_packages has various issues and I haven't tried to figure out why. Some need their cache rebuilt for NPM 6, others complain about missing files
  • foreman needs at least rubygem-safemode and nodejs packages
  • foreman-installer is in the same group as its dependencies and needs to be split. It does build after you build all its dependencies.

I've built everything in https://copr.fedorainfracloud.org/coprs/ekohl/foreman-nightly-staging/ so there's where you can also find the build logs.

More background: https://community.theforeman.org/t/bootstrapping-foreman-rpm-packaging/45290.

ekohl added 12 commits November 29, 2025 22:56
In a fresh environment you need the foreman-build package, but you can't
build that without foreman itself. This uses RPM conditionals[1] to only
build the foreman-build and foreman-plugin packages.

It moves the macro definition next to the mkdir statement to have fewer
if statements.

[1]: https://rpm-software-management.github.io/rpm/manual/conditionalbuilds.html
This introduces a single variable to configure the buildroot as either
bootstrapping or not.

Recommended way of using it:

    obal copr-project foreman-copr -e bootstrap=true
    obal release foreman
    obal copr-project foreman-copr

Then build all the required packages.
This allows COPR to figure out the exact download URLs.
On EL9 and EL10 bundled(rubygem-racc) is provided so the additional
explicit requirement on ruby-default-gems isn't needed. Removing it
allows using Ruby 3.3 or greater.

Fixes: ec2eb97 ("Update rubygem-ruby_parser to 3.21.0")
@ekohl
Copy link
Member Author

ekohl commented Dec 24, 2025

Currently it installs a bunch of files in /usr/lib/node_modules_ which shouldn't happen:

# ls /usr/lib/node_modules*
/usr/lib/node_modules:
@apollo      argv-parse			 d3	   intl			    patternfly-react		 react-ace	  react-redux	    unleash-proxy-client
@babel	     babel-loader		 dnd-core  jed			    patternfly-react-extensions  react-diff-view  react-router	    webpack
@openshift   babel-preset-env		 dotenv    mini-css-extract-plugin  performance-now		 react-dnd	  react-router-dom  webpack-cli
@patternfly  compression-webpack-plugin  emotion   nodemon		    prop-types			 react-dom	  sanitize-html     yup
@reduxjs     connected-react-router	 formik    npm			    rc-input-number		 react-helmet	  sass
@theforeman  css-loader			 history   patternfly		    react			 react-intl	  style-loader

/usr/lib/node_modules_:
@babel		    ace-builds	    datatables.net-bs  harmony-reflect	  lodash		react-dnd-html5-backend      regenerator-runtime  unidiff
@module-federation  axios	    datatables.net-dt  humanize-duration  lodash.debounce	react-ellipsis-with-tooltip  reselect		  urijs
@novnc		    base64-js	    deep-diff	       ieee754		  loose-envify		react-loading-skeleton	     sass-loader	  uuid
@patternfly	    bootstrap-sass  diff	       ipaddr.js	  multiselect		react-onclickoutside	     seamless-immutable   webpack-stats-plugin
@scalprum	    buffer	    dsmorse-gridster   jquery		  neo-async		react-password-strength      select2		  zxcvbn
@spice-project	    c3		    file-saver	       jquery-ujs	  number_helpers	react-router-bootstrap	     sortabular
@theforeman	    classnames	    follow-redirects   js-cookie	  os-browserify		redux			     symbol-observable
@unleash	    core-js	    graphql	       js-tokens	  path-browserify	redux-logger		     table-resolver
@webcomponents	    datatables.net  graphql-tag        jstz		  react-debounce-input	redux-thunk		     tslib

/usr/lib/node_modules_22:
@apollo      argv-parse			 d3	   intl			    patternfly-react		 react-ace	  react-redux	    unleash-proxy-client
@babel	     babel-loader		 dnd-core  jed			    patternfly-react-extensions  react-diff-view  react-router	    webpack
@openshift   babel-preset-env		 dotenv    mini-css-extract-plugin  performance-now		 react-dnd	  react-router-dom  webpack-cli
@patternfly  compression-webpack-plugin  emotion   nodemon		    prop-types			 react-dom	  sanitize-html     yup
@reduxjs     connected-react-router	 formik    npm			    rc-input-number		 react-helmet	  sass
@theforeman  css-loader			 history   patternfly		    react			 react-intl	  style-loader

In /usr/lib/rpm/macros.d/macros.nodejs we can see:

# nodejs binary
%__nodejs %{_bindir}/node

# currently installed nodejs version
%nodejs_version %(%{__nodejs} -v | sed s/v//)
%_nodejs_major_version %(echo %{nodejs_version} | sed 's#^\\([0-9]\\+\\).*#\\1#')

# nodejs library directory
%nodejs_sitelib %{_prefix}/lib/node_modules_%{_nodejs_major_version}

It appears %_nodejs_major_version can't be resolved, probably because nodejs-packaging actually requires nodejs to be installed but our packaging doesn't do that. This feels like a RHEL bug to me. One we can work around, but still isn't nice.

@ekohl
Copy link
Member Author

ekohl commented Dec 24, 2025

Filed https://issues.redhat.com/browse/RHEL-121844 for that.

Due to a RHEL packaging bug this is needed right now.

Link: https://issues.redhat.com/browse/RHEL-121844
genisoimage has been unmaintained for some time and is dropped from
EL10. The modern replacement is xorriso and fog-libvirt should be
updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant