mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-21 08:33:20 +00:00
fix(buildrpms): create the rpmbuild tree so a build never silently no-ops
buildrpms.pl stages source tarballs into $HOME/rpmbuild/SOURCES but only runs
rpmdev-setuptree in its one-time env-setup path. On a host where that never ran
(or $HOME/rpmbuild was cleaned) source staging fails with "SOURCES/...: No such
file or directory", no srpms/rpms are produced, and the run still exits 0 -- so
the deployable repo silently ends up empty. Create the rpmbuild tree up front so
a build no longer depends on prior manual setup.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit 552f87d4c2)
This commit is contained in:
committed by
Vinícius Ferrão
parent
623e02d38a
commit
c94c9ef6b5
@@ -50,6 +50,12 @@ use autodie;
|
||||
use autodie qw(cp);
|
||||
|
||||
my $SOURCES = "$ENV{HOME}/rpmbuild/SOURCES";
|
||||
# Ensure the rpmbuild tree exists. buildrpms stages source tarballs into $SOURCES, but it only
|
||||
# runs rpmdev-setuptree in the one-time env-setup path -- so on a host where that never ran (or
|
||||
# $HOME/rpmbuild was cleaned) source staging fails with "SOURCES/...: No such file or directory",
|
||||
# no srpms/rpms are produced, and the run still exits 0. Create the tree up front so a build never
|
||||
# depends on prior manual setup.
|
||||
system('mkdir', '-p', map { "$ENV{HOME}/rpmbuild/$_" } qw(SOURCES SPECS BUILD BUILDROOT RPMS SRPMS));
|
||||
my $VERSION = read_text("Version");
|
||||
my $PWD = Cwd::cwd();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user