Skip to content

Build packages with EL10#12872

Draft
ekohl wants to merge 9 commits into
theforeman:rpm/developfrom
ekohl:rpm/develop-build-el10
Draft

Build packages with EL10#12872
ekohl wants to merge 9 commits into
theforeman:rpm/developfrom
ekohl:rpm/develop-build-el10

Conversation

@ekohl
Copy link
Copy Markdown
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
Copy link
Copy Markdown
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
Copy Markdown
Member Author

ekohl commented Dec 24, 2025

@ekohl ekohl force-pushed the rpm/develop-build-el10 branch 2 times, most recently from e5359c4 to 49f6672 Compare January 25, 2026 17:41
@ekohl
Copy link
Copy Markdown
Member Author

ekohl commented Jan 25, 2026

Rebased to remove some PRs that were already merged. I also included explicit merge commits with PRs that are also included elsewhere.

@ekohl ekohl force-pushed the rpm/develop-build-el10 branch from 49f6672 to b6af58b Compare February 17, 2026 17:12
@ekohl
Copy link
Copy Markdown
Member Author

ekohl commented Feb 17, 2026

Rebased now that @ogajduse merged many of the smaller PRs. Opened #13053.

What it now includes:

Once that is cleaned up it'll be interesting to see if it actually runs. After that the various plugins need to be built as well.

@ekohl ekohl force-pushed the rpm/develop-build-el10 branch from b6af58b to 1097dc2 Compare February 27, 2026 08:45
@ekohl
Copy link
Copy Markdown
Member Author

ekohl commented Feb 27, 2026

I gave this a spin with theforeman/foreman-oci-images#17 and ran into a problem with the racc dependency. I've written and included #13113 but haven't built nor tested that yet.

@ekohl ekohl force-pushed the rpm/develop-build-el10 branch from 1097dc2 to da029e2 Compare February 27, 2026 10:12
@ekohl
Copy link
Copy Markdown
Member Author

ekohl commented Feb 27, 2026

I've now done basic testing and this can boot up Foreman. No further extensive testing done, just logged in and did some basic API calls.

@ekohl ekohl force-pushed the rpm/develop-build-el10 branch 3 times, most recently from 1e2fec1 to 822833e Compare February 28, 2026 12:04
@ekohl
Copy link
Copy Markdown
Member Author

ekohl commented Feb 28, 2026

It now fails to find @patternfly/react-templates:

ERROR in resolving fallback for shared module @patternfly/react-templates
Module not found: Error: Can't resolve '@patternfly/react-templates' in '/builddir/build/BUILD/foreman-3.19.0-develop'
resolve '@patternfly/react-templates' in '/builddir/build/BUILD/foreman-3.19.0-develop'
  Parsed request is a module
  using description file: /builddir/build/BUILD/foreman-3.19.0-develop/package.json (relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      looking for modules in /builddir/build/BUILD/foreman-3.19.0-develop/node_modules
        single file module
          using description file: /builddir/build/BUILD/foreman-3.19.0-develop/package.json (relative path: ./node_modules/@patternfly/react-templates)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /builddir/build/BUILD/foreman-3.19.0-develop/node_modules/@patternfly/react-templates doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /builddir/build/BUILD/foreman-3.19.0-develop/node_modules/@patternfly/react-templates.js doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              /builddir/build/BUILD/foreman-3.19.0-develop/node_modules/@patternfly/react-templates.json doesn't exist
            .wasm
              Field 'browser' doesn't contain a valid alias configuration
              /builddir/build/BUILD/foreman-3.19.0-develop/node_modules/@patternfly/react-templates.wasm doesn't exist
        /builddir/build/BUILD/foreman-3.19.0-develop/node_modules/@patternfly/react-templates doesn't exist
      /builddir/build/BUILD/node_modules doesn't exist or is not a directory
      /builddir/build/node_modules doesn't exist or is not a directory
      /builddir/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory

Not sure why because when I inspect the package I don't see an obvious problem with it.

@ekohl ekohl force-pushed the rpm/develop-build-el10 branch from 822833e to da029e2 Compare March 3, 2026 09:16
@ekohl
Copy link
Copy Markdown
Member Author

ekohl commented Mar 3, 2026

I think that was just fallout from the COPR issues because it builds now. I also started to build the plugins in https://copr.fedorainfracloud.org/coprs/ekohl/plugins-nightly-staging/ and some observations while most are still building:

@ekohl ekohl force-pushed the rpm/develop-build-el10 branch from da029e2 to 5e83487 Compare March 3, 2026 16:50
@ekohl ekohl changed the title Build core packages with EL10 Build packages with EL10 Mar 3, 2026
@ekohl ekohl force-pushed the rpm/develop-build-el10 branch 3 times, most recently from ff4e4cf to 8d69e15 Compare March 8, 2026 12:41
@ekohl ekohl force-pushed the rpm/develop-build-el10 branch from 8d69e15 to 58a0a73 Compare March 17, 2026 17:30
@ekohl ekohl force-pushed the rpm/develop-build-el10 branch from 58a0a73 to ca9f36a Compare April 3, 2026 16:14
@ogajduse
Copy link
Copy Markdown
Member

[test rpm]

@ekohl
Copy link
Copy Markdown
Member Author

ekohl commented May 26, 2026

@ogajduse I think it would be best to regenerate all nodejs RPMs with the updated npm2rpm in a separate PR. Then I can drop a large part of this.

Then there's also a safemode 2.0.0 release that we need to package up. Updating Faraday is probably another big task.

@ogajduse
Copy link
Copy Markdown
Member

[test rpm]

Appreciate your input, but this was a scripted comment on all PRs with failed RPM check.

@ekohl
Copy link
Copy Markdown
Member Author

ekohl commented May 26, 2026

For future reference: it doesn't need to only be that comment. Even now that you quote it you're triggering another run. So you can add a text to it to describe it's an automated bulk rebuild. That helps others to ignore it.

ekohl added 9 commits June 6, 2026 17:59
The latest template in npm2rpm contains EL10 compatibility. It also
updates the vendored pacakges to have all the latest versions.

Created with:

    awk '/%global npm_name/ { print $3 }' packages/*/nodejs-*/*.spec | xargs -n 1 -I{} ./add_npm_package.sh {} current
    git diff --cached  --name-only  | grep spec | xargs -n 1 sed -i '0,/Update to/ s/Update to .\+/Regenerate spec file/'
@ekohl ekohl force-pushed the rpm/develop-build-el10 branch from ca9f36a to f18e66f Compare June 6, 2026 17:34
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.

2 participants