rpmbuild on Ubuntu 26.04: "cp: cannot stat 'usr/*'" and v6 packages
ubuntu-latest is moving from Ubuntu 24.04 to 26.04 between October 19 and November 19, 2026 (what else changes). The rpm package goes from 4.18.2 on 24.04 to 6.0.1 on 26.04 (Ubuntu's package list, November 4). Two changes in between break release jobs that build .rpm files on an Ubuntu runner: since rpm 4.20, rpmbuild runs the build in a directory of its own for each package (RPM 4.20.0 release notes), and since rpm 6.0 it builds the new v6 package format unless told otherwise (RPM 6.0.0 release notes).
What it looks like
cp: cannot stat 'usr/*': No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.XXXXXX (%install)
This is the %install section of a spec that copies files by a relative path. The files are where they always were, but the section now starts in BUILD/<name>-<version>-build, which is empty. The other change shows up only later, outside the job: a registry or an older rpm that does not take the v6 file. One report saw rpm begins with wrong magic number from Artifact Registry (WendyOS #2521).
Where the reports came from
- Electron Forge's RPM maker, which uses
electron-installer-redhat: its spec template copiesusr/*relative to the current directory. 3.4.0 and 4.0.0 fail (wcpos/electron #556, opengrep-playground #88). A fix is open upstream (electron-installer-redhat #347); the same error was first reported on Fedora 41 (#343). - Flutter's
flutter_app_packager(FastForge):cp: cannot stat '<app>/*'in the generated%install(flutter_google_datastore #85). - electron-builder's
rpmtarget, through fpm: one release job failed with onlyrpmbuild failed (exit code 1), with the same electron-builder and fpm that had passed on 24.04 (claudius #332). A failed rpm target fails the whole job, so the AppImage and deb from the same job are not uploaded either.
Fix: copy from an absolute path in %install
For your own spec, or a spec template you can override, point the copy at the top build directory, where the files were staged:
%install
mkdir -p %{buildroot}/usr/
cp -r %{_builddir}/usr/* %{buildroot}/usr/
%{_builddir} is the same BUILD directory on rpm 4.18 and on 4.20 and later; the new per-package directory is the separate %builddir macro. So this works on both images. For Electron Forge, copy electron-installer-redhat's resources/spec.ejs into your repository, change that line, and pass the file as specTemplate in the RPM maker's options.
Make v4 packages
rpmbuild -bb --define "_rpmformat 4" app.spec
With fpm, pass --rpm-rpmbuild-define "_rpmformat 4". electron-builder merged the same define on October 28 (electron-builder #10472, and #10476 for 26.x); until your version has it, add it through rpm.fpm. RPM 6 says v6 packages can be installed with rpm 4.14 and later, with limits; v4 is what every rpm reads. Older rpm ignores the unknown macro, so the define is safe on 24.04 too.
To see which format a package is, on rpm 6:
rpm -qp --qf '%{rpmformat}\n' dist/app.rpm
Or keep the packaging job on 24.04
runs-on: ubuntu-24.04 for the job that builds the .rpm brings back rpm 4.18.2, and the other jobs can stay on ubuntu-latest. It holds until GitHub retires the 24.04 image. Building there also keeps native add-ons linked against glibc 2.39 rather than 2.43, which matters if your users run older distributions ("GLIBC_2.43 not found").
Telling it apart
rpmbuild --versionprintsRPM version 6.0.1on 26.04 and 4.18.2 on 24.04.- The failing line is in
%installand names a relative path: it is the build directory. A failure in%fileswith "File not found" is a different problem with the file list. - Look at "Set up job": the Runner Image group shows the image. Until November 19 a re-run can land on 24.04 and pass, so a green re-run proves nothing.
Other 26.04 failures
- "version `GLIBC_2.43' not found" after building on Ubuntu 26.04: glibc is 2.43, so binaries built there can need
GLIBC_2.42orGLIBC_2.43and fail to start on Ubuntu 24.04, Debian 13 and older; build releases on an older image and check the floor in CI. - "cannot enable executable stack" on Ubuntu 26.04: glibc 2.43 refuses to
dlopena library that asks for an executable stack, so Julia 1.10.0 to 1.10.8, conda-forge TensorFlow 2.19 and some MEX files fail with "Invalid argument". - libpcre3 and libpcre3-dev on Ubuntu 26.04: Ubuntu 26.04 has no PCRE1, so
libpcre3-devis gone from apt and programs built for 24.04 cannot loadlibpcre.so.3. - C and C++ builds that fail with GCC 15 on Ubuntu 26.04: the default gcc goes from 13 to 15, so C is compiled as C23, six old warnings are errors, and C++ headers no longer pull in
<cstdint>for you. - apt on Ubuntu 26.04: renamed and removed packages.
- "coreutils: unknown program": most core tools are uutils.
See failed jobs from IntelliJ IDEA
Pipeline Inbox for GitHub Actions Workflows, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the runs of all your repositories in an IDE tool window, with their jobs and steps, and your current branch's runs are in the status bar. Reading is free; re-running failed jobs, cancelling, running workflows and reviewing deployments are Pro (US$1.50 a month, with a 30-day trial).
Get it on JetBrains Marketplace
GitHub and GitHub Actions are trademarks of GitHub, Inc.; Ubuntu is a trademark of Canonical Ltd.; Electron is a trademark of the OpenJS Foundation; Flutter is a trademark of Google LLC; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with, sponsored or endorsed by GitHub, Inc., Canonical, the OpenJS Foundation, Google, the RPM project or JetBrains.
More: "The ubuntu-latest label will migrate to Ubuntu 26" · apt on Ubuntu 26.04 · GitHub Actions plugins for IntelliJ IDEA compared · 日本語