Skip to content

Commit 9c8de0e

Browse files
cgwaltersJohan-Liebert1
authored andcommitted
packaging: Preserve rpmbuild.env for F45+ RPM compatibility
There's a new `rpmbuild.env` file we need to preserve. Assisted-by: opencode (claude-opus-4-6) Signed-off-by: Colin Walters <walters@verbum.org>
1 parent a7f95e7 commit 9c8de0e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

contrib/packaging/bootc.spec

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,13 @@ cat vendor-config.toml >> .cargo/config.toml
112112
rm vendor-config.toml
113113
%else
114114
# Container build: source already at _builddir (/src), nothing to extract
115-
# RPM's %mkbuilddir creates a subdirectory; symlink it back to the source
115+
# RPM's %mkbuilddir creates a subdirectory; symlink it back to the source.
116+
# F45+ RPM also creates rpmbuild.env in the subdir that %build will source,
117+
# so preserve it before replacing the directory with a symlink.
116118
cd ..
119+
if [ -f %{name}-%{version}-build/rpmbuild.env ]; then
120+
mv %{name}-%{version}-build/rpmbuild.env .
121+
fi
117122
rm -rf %{name}-%{version}-build
118123
ln -s . %{name}-%{version}-build
119124
cd %{name}-%{version}-build

0 commit comments

Comments
 (0)